summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Kabaev <kan@FreeBSD.org>2004-07-28 03:12:12 +0000
committerAlexander Kabaev <kan@FreeBSD.org>2004-07-28 03:12:12 +0000
commit4a883d1141a9a9105097c4fcdd3a3a80960c1907 (patch)
tree692b0b1ffb09a0fba199d48352cc84bcdeadcdb9
parentffeaf689a248da869b6bc8d4fd2233dfe513c060 (diff)
downloadsrc-test2-4a883d1141a9a9105097c4fcdd3a3a80960c1907.tar.gz
src-test2-4a883d1141a9a9105097c4fcdd3a3a80960c1907.zip
Gcc 3.4.2 20040728 Objective C support bits.
Notes
Notes: svn path=/vendor/gcc/dist/; revision=132722
-rw-r--r--contrib/libobjc/ChangeLog153
-rw-r--r--contrib/libobjc/Makefile.in31
-rw-r--r--contrib/libobjc/NXConstStr.m8
-rw-r--r--contrib/libobjc/Object.m8
-rw-r--r--contrib/libobjc/Protocol.m30
-rw-r--r--contrib/libobjc/aclocal.m48
-rw-r--r--contrib/libobjc/archive.c8
-rw-r--r--contrib/libobjc/class.c8
-rwxr-xr-xcontrib/libobjc/configure159
-rw-r--r--contrib/libobjc/configure.in28
-rw-r--r--contrib/libobjc/encoding.c23
-rw-r--r--contrib/libobjc/gc.c8
-rw-r--r--contrib/libobjc/hash.c8
-rw-r--r--contrib/libobjc/init.c65
-rw-r--r--contrib/libobjc/libobjc.def8
-rw-r--r--contrib/libobjc/libobjc_entry.c8
-rw-r--r--contrib/libobjc/linking.m8
-rw-r--r--contrib/libobjc/makefile.dos8
-rw-r--r--contrib/libobjc/misc.c8
-rw-r--r--contrib/libobjc/nil_method.c8
-rw-r--r--contrib/libobjc/objc/NXConstStr.h8
-rw-r--r--contrib/libobjc/objc/Object.h8
-rw-r--r--contrib/libobjc/objc/Protocol.h8
-rw-r--r--contrib/libobjc/objc/encoding.h8
-rw-r--r--contrib/libobjc/objc/hash.h16
-rw-r--r--contrib/libobjc/objc/objc-api.h8
-rw-r--r--contrib/libobjc/objc/objc-list.h12
-rw-r--r--contrib/libobjc/objc/objc.h8
-rw-r--r--contrib/libobjc/objc/runtime.h8
-rw-r--r--contrib/libobjc/objc/sarray.h40
-rw-r--r--contrib/libobjc/objc/thr.h12
-rw-r--r--contrib/libobjc/objc/typedstream.h8
-rw-r--r--contrib/libobjc/objects.c8
-rw-r--r--contrib/libobjc/sarray.c15
-rw-r--r--contrib/libobjc/selector.c10
-rw-r--r--contrib/libobjc/sendmsg.c84
-rw-r--r--contrib/libobjc/thr-dce.c8
-rw-r--r--contrib/libobjc/thr-decosf1.c8
-rw-r--r--contrib/libobjc/thr-irix.c8
-rw-r--r--contrib/libobjc/thr-mach.c8
-rw-r--r--contrib/libobjc/thr-objc.c10
-rw-r--r--contrib/libobjc/thr-os2.c8
-rw-r--r--contrib/libobjc/thr-posix.c8
-rw-r--r--contrib/libobjc/thr-pthreads.c8
-rw-r--r--contrib/libobjc/thr-rtems.c8
-rw-r--r--contrib/libobjc/thr-single.c8
-rw-r--r--contrib/libobjc/thr-solaris.c8
-rw-r--r--contrib/libobjc/thr-vxworks.c8
-rw-r--r--contrib/libobjc/thr-win32.c8
-rw-r--r--contrib/libobjc/thr.c8
50 files changed, 556 insertions, 412 deletions
diff --git a/contrib/libobjc/ChangeLog b/contrib/libobjc/ChangeLog
index 9dc94ee979f2..ba61c0315a58 100644
--- a/contrib/libobjc/ChangeLog
+++ b/contrib/libobjc/ChangeLog
@@ -1,30 +1,114 @@
-2003-10-16 Release Manager
+2004-07-01 Release Manager
- * GCC 3.3.2 Released.
+ * GCC 3.4.1 released.
-2003-09-09 Alan Modra <amodra@bigpond.net.au>
+2004-04-18 Release Manager
- * configure: Regenerate.
+ * GCC 3.4.0 released.
+
+2004-03-01 Michael Matz <matz@suse.de>
+
+ * Makefile.in (ALL_CFLAGS): Add -fno-strict-aliasing.
+
+2004-01-17 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR target/10781
+ * encoding.c (rs6000_special_round_type_align): Define.
+
+2004-01-14 Adam Fedor <fedor@gnu.org>
+
+ PR libobjc/12155
+ * selector.c (__objc_register_instance_methods_to_class): Free
+ new_list if not used.
+
+2004-01-09 Andrew Ruder <aeruder@ksu.edu>
+
+ PR libobjc/11904
+ * sarray.c (sarray_free): Free array->is_copy_of latter.
+
+2003-12-01 Zack Weinberg <zack@codesourcery.com>
+
+ PR 11433
+ * Protocol.m (descriptionForInstanceMethod): Don't dereference
+ instance_methods if it's NULL.
+ (descriptionForClassMethod): Likewise for class_methods.
+
+2003-10-24 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
-2003-08-04 Release Manager
+ * Makefile.in (runtime-info.h): Remove -Wp.
- * GCC 3.3.1 Released.
+2003-10-21 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
-2003-08-04 Release Manager
+ * Makefile.in (CC1OBJ): Remove.
+ (runtime-info.h): Invoke $(CC) so all MULTIFLAGS are handled
+ correctly.
+ Use .m extension for temporary file.
+ Remove assembler temp file.
- * GCC 3.3.1 Released.
+2003-10-20 Joseph S. Myers <jsm@polyomino.org.uk>
-2003-05-13 Release Manager
+ * objc/hash.h (hash_string): Don't use a cast as an lvalue.
- * GCC 3.3 Released.
+2003-10-17 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
-2003-05-13 Release Manager
+ * Makefile.in (runtime-info.h): Use MULTIFLAGS.
- * GCC 3.3 Released.
+2003-09-09 Alan Modra <amodra@bigpond.net.au>
+
+ * configure: Regenerate.
-2003-05-13 Release Manager
+2003-08-27 Alexander Malmberg <alexander@malmberg.org>
- * GCC 3.3 Released.
+ * Makefile.in, aclocal.m4: Update to $(libdir)/gcc/ instead of
+ (libdir)/gcc-lib/ when installing.
+ * configure: Regenerate.
+
+Thu Jul 10 10:27:43 2003 Nicola Pero <n.pero@mi.flashnet.it>
+
+ libobjc/9969
+ * sendmsg.c (get_imp): Fixed rare threading problem.
+ (__objc_responds_to): Similar fixes.
+ (objc_msg_lookup): Similar fixes.
+ (__objc_init_install_dtable): Lock the runtime before checking if the
+ table is installed.
+
+2003-05-23 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * hash.c, init.c, libobjc.def, libobjc_entry.c, linking.m,
+ makefile.dos, misc.c, nil_method.c, objects.c, sarray.c,
+ selector.c, sendmsg.c, thr-dce.c, thr-decosf1.c, thr-irix.c,
+ thr-mach.c, thr-objc.c, thr-os2.c, thr-posix.c, thr-pthreads.c,
+ thr-rtems.c, thr-single.c, thr-solaris.c, thr-vxworks.c,
+ thr-win32.c, thr.c: Replace "GNU CC" with "GCC".
+ * Makefile.in, NXConstStr.m, Object.m, Protocol.m, archive.c,
+ class.c, encoding.c, gc.c, objc/NXConstStr.h, objc/Object.h,
+ objc/Protocol.h, objc/encoding.h, objc/hash.h, objc/objc-api.h,
+ objc/objc-list.h, objc/objc.h, ocjc/runtime.h, objc/sarray.h,
+ objc/thr.h, objc/typedstream.h: Replace "GNU CC" with "GCC".
+
+Tue May 13 14:56:03 2003 Richard Frith-Macdonald <rfm@gnu.org>
+ Nicola Pero <n.pero@mi.flashnet.it>
+
+ libobjc/10742
+ * init.c (class_superclass_of_class): New function.
+ (create_tree_of_subclasses_inherited_from): Use it.
+ (__objc_tree_insert_class): Likewise.
+ (class_is_subclass_of_class): Likewise.
+
+2003-04-11 David Chad <davidc@freebsd.org>
+ Loren J. Rittle <ljrittle@acm.org>
+
+ libobjc/8562
+ * objc/hash.h (hash_string): Constify correctly.
+ (compare_ptrs): Use direct compare.
+ * objc/objc-list.h (list_nth): Rename index to indx to avoid shadow.
+ * objc/sarray.h: Global rename index to indx to avoid shadow.
+
+2003-03-12 Andreas Schwab <schwab@suse.de>
+
+ * aclocal.m4 (GLIBCPP_EXPORT_INSTALL_INFO): Avoid trailing /. in
+ glibcpp_toolexeclibdir.
+ * configure: Rebuilt.
2003-02-20 Alexandre Oliva <aoliva@redhat.com>
@@ -39,12 +123,25 @@
version_specific_libs is enabled.
* configure: Rebuilt.
-2003-01-26 Christian Cornelssen <ccorn@cs.tu-berlin.de>
+2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
* Makefile.in (FLAGS_TO_PASS): Also pass DESTDIR.
(install-libs, install-headers): Prepend $(DESTDIR) to
destination paths in all (un)installation commands.
+2002-12-02 Zack Weinberg <zack@codesourcery.com>
+
+ * thr-objc.c: Include coretypes.h and tm.h.
+
+2002-12-01 Zack Weinberg <zack@codesourcery.com>
+
+ * encoding.c, sendmsg.c: Include coretypes.h and tm.h.
+
+2002-11-26 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * configure.in: Remove skip-this-dir support.
+ * configure: Regenerate.
+
2002-09-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (all): Fix multilib parallel build.
@@ -188,7 +285,7 @@ Mon Dec 17 17:02:12 2001 Nicola Pero <nicola@brainstorm.co.uk>
2001-11-14 Aldy Hernandez <aldyh@redhat.com>
- * encoding.c: Add target_flags.
+ * encoding.c: Add target_flags.
2001-11-07 Aldy Hernandez <aldyh@redhat.com>
@@ -199,18 +296,18 @@ Mon Dec 17 17:02:12 2001 Nicola Pero <nicola@brainstorm.co.uk>
Mon Oct 29 21:29:21 2001 Nicola Pero <n.pero@mi.flashnet.it>
* class.c: Rewritten the class table to use optimized, lock-free
- lookup. This more than doubles the speed of class method
- invocations. (class_table_setup), (class_table_insert),
- (class_table_replace), (class_table_get_safe),
- (class_table_next), (class_table_print),
- (class_table_print_histogram): New functions.
- (__objc_init_class_tables): Use class_table_setup.
- (__objc_add_class_to_hash): Use class_table_get_safe and
- class_table_insert. (objc_lookup_class), (objc_get_class): Do not
- assert the existence of the table; do not lock the runtime; use
- class_table_get_safe. (objc_next_class): Use class_table_next.
- (__objc_resolve_class_links): Use class_table_next.
- (class_pose_as): Use class_table_replace.
+ lookup. This more than doubles the speed of class method
+ invocations. (class_table_setup), (class_table_insert),
+ (class_table_replace), (class_table_get_safe),
+ (class_table_next), (class_table_print),
+ (class_table_print_histogram): New functions.
+ (__objc_init_class_tables): Use class_table_setup.
+ (__objc_add_class_to_hash): Use class_table_get_safe and
+ class_table_insert. (objc_lookup_class), (objc_get_class): Do not
+ assert the existence of the table; do not lock the runtime; use
+ class_table_get_safe. (objc_next_class): Use class_table_next.
+ (__objc_resolve_class_links): Use class_table_next.
+ (class_pose_as): Use class_table_replace.
2001-09-10 Ovidiu Predescu <ovidiu@cup.hp.com>
diff --git a/contrib/libobjc/Makefile.in b/contrib/libobjc/Makefile.in
index 244f1e75a1a3..ad91e72b30a7 100644
--- a/contrib/libobjc/Makefile.in
+++ b/contrib/libobjc/Makefile.in
@@ -1,20 +1,21 @@
-#Makefile for GNU Objective C runtime library.
-#Copyright (C) 1993, 95-98, 1999, 2001 Free Software Foundation, Inc.
+# Makefile for GNU Objective C runtime library.
+# Copyright (C) 1993, 95-98, 1999, 2001, 2002, 2003
+# Free Software Foundation, Inc.
-#This file is part of GNU CC.
+#This file is part of GCC.
-#GNU CC is free software; you can redistribute it and/or modify
+#GCC is free software; you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation; either version 2, or (at your option)
#any later version.
-#GNU CC is distributed in the hope that it will be useful,
+#GCC is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU General Public License for more details.
#You should have received a copy of the GNU General Public License
-#along with GNU CC; see the file COPYING. If not, write to
+#along with GCC; see the file COPYING. If not, write to
#the Free Software Foundation, 59 Temple Place - Suite 330,
#Boston, MA 02111-1307, USA. */
@@ -43,7 +44,7 @@ glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@
top_builddir = .
libdir = $(exec_prefix)/lib
-libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version)
+libsubdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)
# Multilib support variables.
MULTISRCTOP =
@@ -70,7 +71,7 @@ CFLAGS = @CFLAGS@
WARN_CFLAGS = -W -Wall -Wwrite-strings -Wstrict-prototypes
GTHREAD_FLAGS=@GTHREAD_FLAGS@
ALL_CFLAGS = -I. -I$(srcdir) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(WARN_CFLAGS) \
- $(GTHREAD_FLAGS) -DIN_GCC -DIN_TARGET_LIBS
+ $(GTHREAD_FLAGS) -DIN_GCC -DIN_TARGET_LIBS -fno-strict-aliasing
# Libtool
# The following strings describe the version of the obj-C library
@@ -87,14 +88,6 @@ LIBTOOL_INSTALL = $(LIBTOOL) --mode=install
LIBTOOL_CLEAN = $(LIBTOOL) --mode=clean
#LIBTOOL_UNINSTALL = $(LIBTOOL) --mode=uninstall
-#
-# Define the cc1obj in terms of the CC that is passed on from higher
-# level make. This is needed to make sure we can create runtime-info.h
-# when doing canadian cross builds where running ../../gcc/cc1obj
-# does not make any sense.
-#
-CC1OBJ = `$(CC) -print-prog-name=cc1obj`
-
INCLUDES = -I$(srcdir)/objc -I$(srcdir)/$(MULTISRCTOP)../gcc \
-I$(srcdir)/$(MULTISRCTOP)../gcc/config -I$(MULTIBUILDTOP)../../gcc \
-I$(srcdir)/$(MULTISRCTOP)../include
@@ -160,10 +153,10 @@ OBJS_GC = archive_gc.lo class_gc.lo encoding_gc.lo gc_gc.lo hash_gc.lo \
$(OBJC_THREAD_FILE)_gc.lo
runtime-info.h:
- echo "" > tmp-runtime
+ echo "" > tmp-runtime.m
echo "/* This file is automatically generated */" > $@
- $(CC1OBJ) -print-objc-runtime-info tmp-runtime >> $@
- rm -f tmp-runtime
+ $(CC) $(MULTIFLAGS) -print-objc-runtime-info -S tmp-runtime.m >> $@
+ rm -f tmp-runtime.m tmp-runtime.s
archive_gc.lo: archive.c
$(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
diff --git a/contrib/libobjc/NXConstStr.m b/contrib/libobjc/NXConstStr.m
index 4d2f3e1d7fc0..4f75bdb99de2 100644
--- a/contrib/libobjc/NXConstStr.m
+++ b/contrib/libobjc/NXConstStr.m
@@ -2,20 +2,20 @@
Copyright (C) 1995 Free Software Foundation, Inc.
Contributed by Pieter J. Schoenmakers <tiggr@es.ele.tue.nl>
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it
+GCC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
-GNU CC is distributed in the hope that it will be useful, but WITHOUT
+GCC is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
License for more details.
You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
+along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/contrib/libobjc/Object.m b/contrib/libobjc/Object.m
index 1882754d605e..7425ff33877a 100644
--- a/contrib/libobjc/Object.m
+++ b/contrib/libobjc/Object.m
@@ -1,20 +1,20 @@
/* The implementation of class Object for Objective-C.
Copyright (C) 1993, 1994, 1995, 1997, 2002 Free Software Foundation, Inc.
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it
+GCC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
-GNU CC is distributed in the hope that it will be useful, but WITHOUT
+GCC is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
License for more details.
You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
+along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/contrib/libobjc/Protocol.m b/contrib/libobjc/Protocol.m
index 3c18a02ce977..06a25acabbef 100644
--- a/contrib/libobjc/Protocol.m
+++ b/contrib/libobjc/Protocol.m
@@ -1,20 +1,20 @@
/* This file contains the implementation of class Protocol.
Copyright (C) 1993 Free Software Foundation, Inc.
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify
+GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-GNU CC is distributed in the hope that it will be useful,
+GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
+along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
@@ -80,11 +80,12 @@ struct objc_method_description_list {
const char* name = sel_get_name (aSel);
struct objc_method_description *result;
- for (i = 0; i < instance_methods->count; i++)
- {
- if (!strcmp ((char*)instance_methods->list[i].name, name))
- return &(instance_methods->list[i]);
- }
+ if (instance_methods)
+ for (i = 0; i < instance_methods->count; i++)
+ {
+ if (!strcmp ((char*)instance_methods->list[i].name, name))
+ return &(instance_methods->list[i]);
+ }
for (proto_list = protocol_list; proto_list; proto_list = proto_list->next)
{
@@ -107,11 +108,12 @@ struct objc_method_description_list {
const char* name = sel_get_name (aSel);
struct objc_method_description *result;
- for (i = 0; i < class_methods->count; i++)
- {
- if (!strcmp ((char*)class_methods->list[i].name, name))
- return &(class_methods->list[i]);
- }
+ if (class_methods)
+ for (i = 0; i < class_methods->count; i++)
+ {
+ if (!strcmp ((char*)class_methods->list[i].name, name))
+ return &(class_methods->list[i]);
+ }
for (proto_list = protocol_list; proto_list; proto_list = proto_list->next)
{
diff --git a/contrib/libobjc/aclocal.m4 b/contrib/libobjc/aclocal.m4
index ed643f6038ce..458b157cf02a 100644
--- a/contrib/libobjc/aclocal.m4
+++ b/contrib/libobjc/aclocal.m4
@@ -196,7 +196,7 @@ if test $version_specific_libs = yes; then
# and header files if --enable-version-specific-runtime-libs option
# is selected.
changequote(,)dnl
- glibcpp_toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
+ glibcpp_toolexecdir='$(libdir)/gcc/$(target_alias)'
glibcpp_toolexeclibdir='$(toolexecdir)/'${gcc_version}'$(MULTISUBDIR)'
changequote([,])dnl
fi
@@ -212,7 +212,11 @@ if test x"$glibcpp_toolexecdir" = x"no"; then
glibcpp_toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
glibcpp_toolexeclibdir='$(libdir)'
fi
- glibcpp_toolexeclibdir=$glibcpp_toolexeclibdir/`$CC -print-multi-os-directory`
+ multi_os_directory=`$CC -print-multi-os-directory`
+ case $multi_os_directory in
+ .) ;; # Avoid trailing /.
+ *) glibcpp_toolexeclibdir=$glibcpp_toolexeclibdir/$multi_os_directory ;;
+ esac
fi
AC_SUBST(glibcpp_prefixdir)
diff --git a/contrib/libobjc/archive.c b/contrib/libobjc/archive.c
index f98379bc99db..aca648ec669a 100644
--- a/contrib/libobjc/archive.c
+++ b/contrib/libobjc/archive.c
@@ -2,19 +2,19 @@
Copyright (C) 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc.
Contributed by Kresten Krab Thorup
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it under the
+GCC is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
-GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
-GNU CC; see the file COPYING. If not, write to the Free Software
+GCC; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/contrib/libobjc/class.c b/contrib/libobjc/class.c
index 1740f38788ee..9638f5d37844 100644
--- a/contrib/libobjc/class.c
+++ b/contrib/libobjc/class.c
@@ -6,19 +6,19 @@
Lock-free class table code designed and written from scratch by
Nicola Pero, 2001.
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it under the
+GCC is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
-GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
-GNU CC; see the file COPYING. If not, write to the Free Software
+GCC; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with files compiled with
diff --git a/contrib/libobjc/configure b/contrib/libobjc/configure
index ed95402332d8..55eb9ce8c2ea 100755
--- a/contrib/libobjc/configure
+++ b/contrib/libobjc/configure
@@ -1255,7 +1255,7 @@ if test $version_specific_libs = yes; then
# Need the gcc compiler version to know where to install libraries
# and header files if --enable-version-specific-runtime-libs option
# is selected.
- glibcpp_toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
+ glibcpp_toolexecdir='$(libdir)/gcc/$(target_alias)'
glibcpp_toolexeclibdir='$(toolexecdir)/'${gcc_version}'$(MULTISUBDIR)'
fi
@@ -1270,7 +1270,11 @@ if test x"$glibcpp_toolexecdir" = x"no"; then
glibcpp_toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
glibcpp_toolexeclibdir='$(libdir)'
fi
- glibcpp_toolexeclibdir=$glibcpp_toolexeclibdir/`$CC -print-multi-os-directory`
+ multi_os_directory=`$CC -print-multi-os-directory`
+ case $multi_os_directory in
+ .) ;; # Avoid trailing /.
+ *) glibcpp_toolexeclibdir=$glibcpp_toolexeclibdir/$multi_os_directory ;;
+ esac
fi
@@ -1278,39 +1282,6 @@ fi
-# If the language specific compiler does not exist, but the "gcc" directory
-# does, we do not build anything. Note, $r is set by the top-level Makefile.
-# Note that when we look for the compiler, we search both with and without
-# extension to handle cross and canadian cross builds.
-compiler_name=cc1obj
-rm -f skip-this-dir
-echo $ac_n "checking if compiler $compiler_name has been built""... $ac_c" 1>&6
-echo "configure:1289: checking if compiler $compiler_name has been built" >&5
-if eval "test \"`echo '$''{'objc_cv_compiler_exists'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- objc_cv_compiler_exists=yes
-if test -n "$r"; then
- if test -d "$r"/gcc; then
- if test -f "$r"/gcc/$compiler_name \
- || test -f "$r"/gcc/$compiler_name.exe; then
- true
- else
- objc_cv_compiler_exists=no
- echo "rm -f config.cache config.log multilib.out" > skip-this-dir
- fi
- fi
-fi
-
-fi
-
-echo "$ac_t""$objc_cv_compiler_exists" 1>&6
-if test x$objc_cv_compiler_exists = xno
-then
- rm -f Makefile conftest* confdefs* core
- exit 0
-fi
-
# Disable shared libs by default
# Check whether --enable-shared or --disable-shared was given.
@@ -1397,7 +1368,7 @@ ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:1401: checking for ld used by GCC" >&5
+echo "configure:1372: checking for ld used by GCC" >&5
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -1427,10 +1398,10 @@ echo "configure:1401: checking for ld used by GCC" >&5
esac
elif test "$with_gnu_ld" = yes; then
echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:1431: checking for GNU ld" >&5
+echo "configure:1402: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1434: checking for non-GNU ld" >&5
+echo "configure:1405: checking for non-GNU ld" >&5
fi
if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1465,7 +1436,7 @@ else
fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1469: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:1440: checking if the linker ($LD) is GNU ld" >&5
if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1482,7 +1453,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
-echo "configure:1486: checking for $LD option to reload object files" >&5
+echo "configure:1457: checking for $LD option to reload object files" >&5
if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1494,7 +1465,7 @@ reload_flag=$lt_cv_ld_reload_flag
test -n "$reload_flag" && reload_flag=" $reload_flag"
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1498: checking for BSD-compatible nm" >&5
+echo "configure:1469: checking for BSD-compatible nm" >&5
if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1532,7 +1503,7 @@ NM="$lt_cv_path_NM"
echo "$ac_t""$NM" 1>&6
echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
-echo "configure:1536: checking how to recognise dependant libraries" >&5
+echo "configure:1507: checking how to recognise dependant libraries" >&5
if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1642,7 +1613,7 @@ irix5* | irix6*)
# This must be Linux ELF.
linux-gnu*)
case $host_cpu in
- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
+ alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* )
lt_cv_deplibs_check_method=pass_all ;;
*)
# glibc up to 2.1.1 does not perform some relocations on ARM
@@ -1705,13 +1676,13 @@ file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:1709: checking for object suffix" >&5
+echo "configure:1680: checking for object suffix" >&5
if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest*
echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:1715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
for ac_file in conftest.*; do
case $ac_file in
*.c) ;;
@@ -1735,7 +1706,7 @@ case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
-echo "configure:1739: checking for ${ac_tool_prefix}file" >&5
+echo "configure:1710: checking for ${ac_tool_prefix}file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1797,7 +1768,7 @@ fi
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
echo $ac_n "checking for file""... $ac_c" 1>&6
-echo "configure:1801: checking for file" >&5
+echo "configure:1772: checking for file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1868,7 +1839,7 @@ esac
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1872: checking for $ac_word" >&5
+echo "configure:1843: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1900,7 +1871,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1904: checking for $ac_word" >&5
+echo "configure:1875: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1935,7 +1906,7 @@ fi
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1939: checking for $ac_word" >&5
+echo "configure:1910: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1967,7 +1938,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1971: checking for $ac_word" >&5
+echo "configure:1942: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2034,8 +2005,8 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 2038 "configure"' > conftest.$ac_ext
- if { (eval echo configure:2039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 2009 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:2010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if test "$lt_cv_prog_gnu_ld" = yes; then
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
@@ -2068,7 +2039,7 @@ case $host in
ia64-*-hpux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
- if { (eval echo configure:2072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ if { (eval echo configure:2043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case "`/usr/bin/file conftest.o`" in
*ELF-32*)
HPUX_IA64_MODE="32"
@@ -2084,7 +2055,7 @@ ia64-*-hpux*)
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
- if { (eval echo configure:2088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ if { (eval echo configure:2059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case "`/usr/bin/file conftest.o`" in
*32-bit*)
case $host in
@@ -2128,7 +2099,7 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:2132: checking whether the C compiler needs -belf" >&5
+echo "configure:2103: checking whether the C compiler needs -belf" >&5
if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2141,14 +2112,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 2145 "configure"
+#line 2116 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lt_cv_cc_needs_belf=yes
else
@@ -2178,7 +2149,7 @@ echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
set dummy ${ac_tool_prefix}dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2182: checking for $ac_word" >&5
+echo "configure:2153: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2210,7 +2181,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "dlltool", so it can be a program name with args.
set dummy dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2214: checking for $ac_word" >&5
+echo "configure:2185: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2245,7 +2216,7 @@ fi
# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
set dummy ${ac_tool_prefix}as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2249: checking for $ac_word" >&5
+echo "configure:2220: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2277,7 +2248,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "as", so it can be a program name with args.
set dummy as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2281: checking for $ac_word" >&5
+echo "configure:2252: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2312,7 +2283,7 @@ fi
# Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
set dummy ${ac_tool_prefix}objdump; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2316: checking for $ac_word" >&5
+echo "configure:2287: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2344,7 +2315,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "objdump", so it can be a program name with args.
set dummy objdump; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2348: checking for $ac_word" >&5
+echo "configure:2319: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2380,12 +2351,12 @@ fi
# recent cygwin and mingw systems supply a stub DllMain which the user
# can override, but on older systems we have to supply one
echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
-echo "configure:2384: checking if libtool should supply DllMain function" >&5
+echo "configure:2355: checking if libtool should supply DllMain function" >&5
if eval "test \"`echo '$''{'lt_cv_need_dllmain'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2389 "configure"
+#line 2360 "configure"
#include "confdefs.h"
int main() {
@@ -2393,7 +2364,7 @@ extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
DllMain (0, 0, 0);
; return 0; }
EOF
-if { (eval echo configure:2397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lt_cv_need_dllmain=no
else
@@ -2414,19 +2385,19 @@ echo "$ac_t""$lt_cv_need_dllmain" 1>&6
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -mdll"
echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
-echo "configure:2418: checking how to link DLLs" >&5
+echo "configure:2389: checking how to link DLLs" >&5
if eval "test \"`echo '$''{'lt_cv_cc_dll_switch'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2423 "configure"
+#line 2394 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lt_cv_cc_dll_switch=-mdll
else
@@ -2544,7 +2515,7 @@ else
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2548: checking for $ac_word" >&5
+echo "configure:2519: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2584,7 +2555,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2588: checking for a BSD compatible install" >&5
+echo "configure:2559: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2637,7 +2608,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:2641: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:2612: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2666,7 +2637,7 @@ fi
# Sanity check for the cross-compilation case:
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2670: checking how to run the C preprocessor" >&5
+echo "configure:2641: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -2681,13 +2652,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 2685 "configure"
+#line 2656 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2662: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -2698,13 +2669,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 2702 "configure"
+#line 2673 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2708: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -2715,13 +2686,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 2719 "configure"
+#line 2690 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -2747,17 +2718,17 @@ echo "$ac_t""$CPP" 1>&6
ac_safe=`echo "stdio.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for stdio.h""... $ac_c" 1>&6
-echo "configure:2751: checking for stdio.h" >&5
+echo "configure:2722: checking for stdio.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2756 "configure"
+#line 2727 "configure"
#include "confdefs.h"
#include <stdio.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2785,12 +2756,12 @@ fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2789: checking for ANSI C header files" >&5
+echo "configure:2760: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2794 "configure"
+#line 2765 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -2798,7 +2769,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2815,7 +2786,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2819 "configure"
+#line 2790 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -2833,7 +2804,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2837 "configure"
+#line 2808 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -2854,7 +2825,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 2858 "configure"
+#line 2829 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2865,7 +2836,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:2869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -2893,17 +2864,17 @@ for ac_hdr in sched.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2897: checking for $ac_hdr" >&5
+echo "configure:2868: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2902 "configure"
+#line 2873 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2933,7 +2904,7 @@ done
# Determine CFLAGS for gthread.
echo $ac_n "checking for gthread cflags""... $ac_c" 1>&6
-echo "configure:2937: checking for gthread cflags" >&5
+echo "configure:2908: checking for gthread cflags" >&5
if eval "test \"`echo '$''{'objc_cv_gthread_flags'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
diff --git a/contrib/libobjc/configure.in b/contrib/libobjc/configure.in
index ac92c4234503..b20671faadff 100644
--- a/contrib/libobjc/configure.in
+++ b/contrib/libobjc/configure.in
@@ -39,34 +39,6 @@ AC_SUBST(target_alias)
GLIBCPP_CONFIGURE(.)
GLIBCPP_EXPORT_INSTALL_INFO
-# If the language specific compiler does not exist, but the "gcc" directory
-# does, we do not build anything. Note, $r is set by the top-level Makefile.
-# Note that when we look for the compiler, we search both with and without
-# extension to handle cross and canadian cross builds.
-compiler_name=cc1obj
-rm -f skip-this-dir
-AC_MSG_CHECKING(if compiler $compiler_name has been built)
-AC_CACHE_VAL(objc_cv_compiler_exists,
-[objc_cv_compiler_exists=yes
-if test -n "$r"; then
- if test -d "$r"/gcc; then
- if test -f "$r"/gcc/$compiler_name \
- || test -f "$r"/gcc/$compiler_name.exe; then
- true
- else
- objc_cv_compiler_exists=no
- echo "rm -f config.cache config.log multilib.out" > skip-this-dir
- fi
- fi
-fi
-])
-AC_MSG_RESULT($objc_cv_compiler_exists)
-if test x$objc_cv_compiler_exists = xno
-then
- rm -f Makefile conftest* confdefs* core
- exit 0
-fi
-
dnl Checks for programs.
# Disable shared libs by default
diff --git a/contrib/libobjc/encoding.c b/contrib/libobjc/encoding.c
index be4c08b423e2..17bc8d4e2e14 100644
--- a/contrib/libobjc/encoding.c
+++ b/contrib/libobjc/encoding.c
@@ -4,20 +4,20 @@
Contributed by Kresten Krab Thorup
Bitfield support by Ovidiu Predescu
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify
+GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-GNU CC is distributed in the hope that it will be useful,
+GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
+along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
@@ -27,7 +27,11 @@ Boston, MA 02111-1307, USA. */
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
+/* FIXME: This file has no business including tm.h. */
+
#include "tconfig.h"
+#include "coretypes.h"
+#include "tm.h"
#include "objc-api.h"
#include "encoding.h"
#include <stdlib.h>
@@ -84,6 +88,17 @@ Boston, MA 02111-1307, USA. */
eliminate the warning. */
static int __attribute__ ((__unused__)) target_flags = 0;
+
+/* FIXME: while this file has no business including tm.h, this
+ definitely has no business defining this macro but it
+ is only way around without really rewritting this file,
+ should look after the branch of 3.4 to fix this. */
+#define rs6000_special_round_type_align(STRUCT, COMPUTED, SPECIFIED) \
+ ((TYPE_FIELDS (STRUCT) != 0 \
+ && DECL_MODE (TYPE_FIELDS (STRUCT)) == DFmode) \
+ ? MAX (MAX (COMPUTED, SPECIFIED), 64) \
+ : MAX (COMPUTED, SPECIFIED))
+
/*
return the size of an object specified by type
*/
diff --git a/contrib/libobjc/gc.c b/contrib/libobjc/gc.c
index 1010508f64cf..8f13dbc33ca6 100644
--- a/contrib/libobjc/gc.c
+++ b/contrib/libobjc/gc.c
@@ -2,20 +2,20 @@
Copyright (C) 1998, 2002 Free Software Foundation, Inc.
Contributed by Ovidiu Predescu.
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify
+GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-GNU CC is distributed in the hope that it will be useful,
+GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
+along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/contrib/libobjc/hash.c b/contrib/libobjc/hash.c
index 2f58b2c54729..ac0da21fdee0 100644
--- a/contrib/libobjc/hash.c
+++ b/contrib/libobjc/hash.c
@@ -1,20 +1,20 @@
/* Hash tables for Objective C internal structures
Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify
+GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-GNU CC is distributed in the hope that it will be useful,
+GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
+along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/contrib/libobjc/init.c b/contrib/libobjc/init.c
index 098e253649ff..33a933875b0e 100644
--- a/contrib/libobjc/init.c
+++ b/contrib/libobjc/init.c
@@ -3,19 +3,19 @@
Contributed by Kresten Krab Thorup
+load support contributed by Ovidiu Predescu <ovidiu@net-community.com>
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it under the
+GCC is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
-GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
-GNU CC; see the file COPYING. If not, write to the Free Software
+GCC; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with files compiled with
@@ -99,6 +99,50 @@ static struct objc_list *__objc_class_tree_list = NULL;
should not be destroyed during the execution of the program. */
static cache_ptr __objc_load_methods = NULL;
+/* This function is used when building the class tree used to send
+ ordinately the +load message to all classes needing it. The tree
+ is really needed so that superclasses will get the message before
+ subclasses.
+
+ This tree will contain classes which are being loaded (or have just
+ being loaded), and whose super_class pointers have not yet been
+ resolved. This implies that their super_class pointers point to a
+ string with the name of the superclass; when the first message is
+ sent to the class (/an object of that class) the class links will
+ be resolved, which will replace the super_class pointers with
+ pointers to the actual superclasses.
+
+ Unfortunately, the tree might also contain classes which had been
+ loaded previously, and whose class links have already been
+ resolved.
+
+ This function returns the superclass of a class in both cases, and
+ can be used to build the determine the class relationships while
+ building the tree.
+*/
+static Class class_superclass_of_class (Class class)
+{
+ char *super_class_name;
+
+ /* If the class links have been resolved, use the resolved
+ * links. */
+ if (CLS_ISRESOLV (class))
+ return class->super_class;
+
+ /* Else, 'class' has not yet been resolved. This means that its
+ * super_class pointer is really the name of the super class (rather
+ * than a pointer to the actual superclass). */
+ super_class_name = (char *)class->super_class;
+
+ /* Return Nil for a root class. */
+ if (super_class_name == NULL)
+ return Nil;
+
+ /* Lookup the superclass of non-root classes. */
+ return objc_lookup_class (super_class_name);
+}
+
+
/* Creates a tree of classes whose topmost class is directly inherited
from `upper' and the bottom class in this tree is
`bottom_class'. The classes in this tree are super classes of
@@ -127,9 +171,7 @@ create_tree_of_subclasses_inherited_from (Class bottom_class, Class upper)
tree = objc_calloc (1, sizeof (objc_class_tree));
tree->class = superclass;
tree->subclasses = list_cons (prev, tree->subclasses);
- superclass = (superclass->super_class ?
- objc_lookup_class ((char *) superclass->super_class)
- : Nil);
+ superclass = class_superclass_of_class (superclass);
prev = tree;
}
@@ -157,10 +199,7 @@ __objc_tree_insert_class (objc_class_tree *tree, Class class)
DEBUG_PRINTF ("1. class %s was previously inserted\n", class->name);
return tree;
}
- else if ((class->super_class ?
- objc_lookup_class ((char *) class->super_class)
- : Nil)
- == tree->class)
+ else if (class_superclass_of_class (class) == tree->class)
{
/* If class is a direct subclass of tree->class then add class to the
list of subclasses. First check to see if it wasn't already
@@ -370,9 +409,7 @@ class_is_subclass_of_class (Class class, Class superclass)
{
if (class == superclass)
return YES;
- class = (class->super_class ?
- objc_lookup_class ((char *) class->super_class)
- : Nil);
+ class = class_superclass_of_class (class);
}
return NO;
diff --git a/contrib/libobjc/libobjc.def b/contrib/libobjc/libobjc.def
index 7e0a857ecf77..2443d4c7b4c9 100644
--- a/contrib/libobjc/libobjc.def
+++ b/contrib/libobjc/libobjc.def
@@ -2,19 +2,19 @@
; Copyright (C) 1997 Free Software Foundation, Inc.
; Contributed by Scott Christley <scottc@net-community.com>
;
-; This file is part of GNU CC.
+; This file is part of GCC.
;
-; GNU CC is free software; you can redistribute it and/or modify it under the
+; GCC is free software; you can redistribute it and/or modify it under the
; terms of the GNU General Public License as published by the Free Software
; Foundation; either version 2, or (at your option) any later version.
;
-; GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY
+; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
; WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
; details.
;
; You should have received a copy of the GNU General Public License along with
-; GNU CC; see the file COPYING. If not, write to the Free Software
+; GCC; see the file COPYING. If not, write to the Free Software
; Foundation, 59 Temple Place - Suite 330,
; Boston, MA 02111-1307, USA.
diff --git a/contrib/libobjc/libobjc_entry.c b/contrib/libobjc/libobjc_entry.c
index 2d584ab3c1ef..22ff959dca97 100644
--- a/contrib/libobjc/libobjc_entry.c
+++ b/contrib/libobjc/libobjc_entry.c
@@ -2,20 +2,20 @@
Copyright (C) 1997 Free Software Foundation, Inc.
Contributed by Scott Christley <scottc@net-community.com>
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it
+GCC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
-GNU CC is distributed in the hope that it will be useful, but WITHOUT
+GCC is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to the Free
+along with GCC; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/contrib/libobjc/linking.m b/contrib/libobjc/linking.m
index 8ecca0281106..a54ae012356c 100644
--- a/contrib/libobjc/linking.m
+++ b/contrib/libobjc/linking.m
@@ -2,20 +2,20 @@
Copyright (C) 1997 Free Software Foundation, Inc.
Contributed by Ovidiu Predescu (ovidiu@net-community.com).
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify
+GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-GNU CC is distributed in the hope that it will be useful,
+GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
+along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/contrib/libobjc/makefile.dos b/contrib/libobjc/makefile.dos
index 3e1b1871e40e..63903cb660e7 100644
--- a/contrib/libobjc/makefile.dos
+++ b/contrib/libobjc/makefile.dos
@@ -1,19 +1,19 @@
# GNU Objective C Runtime Makefile for compiling with djgpp
# Copyright (C) 1993, 1994, 1996 Free Software Foundation, Inc.
#
-# This file is part of GNU CC.
+# This file is part of GCC.
#
-# GNU CC is free software; you can redistribute it and/or modify it under the
+# GCC is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2, or (at your option) any later version.
#
-# GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY
+# GCC is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
-# GNU CC; see the file COPYING. If not, write to the Free Software
+# GCC; see the file COPYING. If not, write to the Free Software
# Foundation, 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
diff --git a/contrib/libobjc/misc.c b/contrib/libobjc/misc.c
index 9572d3f00507..3ae8a55cfe66 100644
--- a/contrib/libobjc/misc.c
+++ b/contrib/libobjc/misc.c
@@ -3,20 +3,20 @@
Free Software Foundation, Inc.
Contributed by Kresten Krab Thorup
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it
+GCC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
-GNU CC is distributed in the hope that it will be useful, but WITHOUT
+GCC is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to the Free
+along with GCC; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/contrib/libobjc/nil_method.c b/contrib/libobjc/nil_method.c
index 5e37c4d5dfb4..d35ccdc92bb8 100644
--- a/contrib/libobjc/nil_method.c
+++ b/contrib/libobjc/nil_method.c
@@ -2,19 +2,19 @@
Copyright (C) 1993, 1995, 1996, 2002 Free Software Foundation, Inc.
Contributed by Kresten Krab Thorup
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it under the
+GCC is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
-GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
-GNU CC; see the file COPYING. If not, write to the Free Software
+GCC; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/contrib/libobjc/objc/NXConstStr.h b/contrib/libobjc/objc/NXConstStr.h
index c9799544a029..f87c05e895ba 100644
--- a/contrib/libobjc/objc/NXConstStr.h
+++ b/contrib/libobjc/objc/NXConstStr.h
@@ -2,20 +2,20 @@
Copyright (C) 1995 Free Software Foundation, Inc.
Contributed by Pieter J. Schoenmakers <tiggr@es.ele.tue.nl>
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it
+GCC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
-GNU CC is distributed in the hope that it will be useful, but WITHOUT
+GCC is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
License for more details.
You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
+along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/contrib/libobjc/objc/Object.h b/contrib/libobjc/objc/Object.h
index a762acc3f7db..ea3e7d775770 100644
--- a/contrib/libobjc/objc/Object.h
+++ b/contrib/libobjc/objc/Object.h
@@ -1,20 +1,20 @@
/* Interface for the Object class for Objective-C.
Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it
+GCC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
-GNU CC is distributed in the hope that it will be useful, but WITHOUT
+GCC is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
License for more details.
You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
+along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/contrib/libobjc/objc/Protocol.h b/contrib/libobjc/objc/Protocol.h
index f54b7cd2393a..b39edf84a855 100644
--- a/contrib/libobjc/objc/Protocol.h
+++ b/contrib/libobjc/objc/Protocol.h
@@ -1,20 +1,20 @@
/* Declare the class Protocol for Objective C programs.
Copyright (C) 1993 Free Software Foundation, Inc.
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify
+GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-GNU CC is distributed in the hope that it will be useful,
+GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
+along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/contrib/libobjc/objc/encoding.h b/contrib/libobjc/objc/encoding.h
index 36a3d892137d..684d70d0fdc2 100644
--- a/contrib/libobjc/objc/encoding.h
+++ b/contrib/libobjc/objc/encoding.h
@@ -3,20 +3,20 @@
Author: Kresten Krab Thorup
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify
+GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-GNU CC is distributed in the hope that it will be useful,
+GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
+along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/contrib/libobjc/objc/hash.h b/contrib/libobjc/objc/hash.h
index e695012aa437..02aca6e8765a 100644
--- a/contrib/libobjc/objc/hash.h
+++ b/contrib/libobjc/objc/hash.h
@@ -1,20 +1,20 @@
/* Hash tables for Objective C method dispatch.
Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify
+GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-GNU CC is distributed in the hope that it will be useful,
+GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
+along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
@@ -172,10 +172,10 @@ hash_string (cache_ptr cache, const void *key)
{
unsigned int ret = 0;
unsigned int ctr = 0;
+ const char *ckey = key;
-
- while (*(char *) key) {
- ret ^= *(char *) key++ << ctr;
+ while (*ckey) {
+ ret ^= *ckey++ << ctr;
ctr = (ctr + 1) % sizeof (void *);
}
@@ -187,7 +187,7 @@ hash_string (cache_ptr cache, const void *key)
static inline int
compare_ptrs (const void *k1, const void *k2)
{
- return ! (k1 - k2);
+ return (k1 == k2);
}
diff --git a/contrib/libobjc/objc/objc-api.h b/contrib/libobjc/objc/objc-api.h
index 92680209eab7..b50fa1bda907 100644
--- a/contrib/libobjc/objc/objc-api.h
+++ b/contrib/libobjc/objc/objc-api.h
@@ -1,20 +1,20 @@
/* GNU Objective-C Runtime API.
Copyright (C) 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc.
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it
+GCC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
-GNU CC is distributed in the hope that it will be useful, but WITHOUT
+GCC is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
License for more details.
You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
+along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/contrib/libobjc/objc/objc-list.h b/contrib/libobjc/objc/objc-list.h
index de083a5861e5..06dbb39fbcc5 100644
--- a/contrib/libobjc/objc/objc-list.h
+++ b/contrib/libobjc/objc/objc-list.h
@@ -2,20 +2,20 @@
Copyright (C) 1993, 1994, 1996 Free Software Foundation, Inc.
Contributed by Kresten Krab Thorup.
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify
+GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-GNU CC is distributed in the hope that it will be useful,
+GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
+along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
@@ -64,9 +64,9 @@ list_length(struct objc_list* list)
larger than the list length, NULL is returned */
static inline void*
-list_nth(int index, struct objc_list* list)
+list_nth(int indx, struct objc_list* list)
{
- while(index-- != 0)
+ while(indx-- != 0)
{
if(list->tail)
list = list->tail;
diff --git a/contrib/libobjc/objc/objc.h b/contrib/libobjc/objc/objc.h
index 699542c493bc..3b57900d0acf 100644
--- a/contrib/libobjc/objc/objc.h
+++ b/contrib/libobjc/objc/objc.h
@@ -1,20 +1,20 @@
/* Basic data types for Objective C.
Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify
+GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-GNU CC is distributed in the hope that it will be useful,
+GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
+along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/contrib/libobjc/objc/runtime.h b/contrib/libobjc/objc/runtime.h
index bea9253a8be1..72e79be30a7f 100644
--- a/contrib/libobjc/objc/runtime.h
+++ b/contrib/libobjc/objc/runtime.h
@@ -2,19 +2,19 @@
Copyright (C) 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc.
Contributed by Kresten Krab Thorup
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it under the
+GCC is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
-GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
-GNU CC; see the file COPYING. If not, write to the Free Software
+GCC; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with files compiled with
diff --git a/contrib/libobjc/objc/sarray.h b/contrib/libobjc/objc/sarray.h
index 17da27203641..a94a98ac5a17 100644
--- a/contrib/libobjc/objc/sarray.h
+++ b/contrib/libobjc/objc/sarray.h
@@ -2,20 +2,20 @@
Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
Contributed by Kresten Krab Thorup.
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify
+GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-GNU CC is distributed in the hope that it will be useful,
+GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
+along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
@@ -146,8 +146,8 @@ struct sarray* sarray_new(int, void* default_element);
void sarray_free(struct sarray*);
struct sarray* sarray_lazy_copy(struct sarray*);
void sarray_realloc(struct sarray*, int new_size);
-void sarray_at_put(struct sarray*, sidx index, void* elem);
-void sarray_at_put_safe(struct sarray*, sidx index, void* elem);
+void sarray_at_put(struct sarray*, sidx indx, void* elem);
+void sarray_at_put_safe(struct sarray*, sidx indx, void* elem);
struct sarray* sarray_hard_copy(struct sarray*); /* ... like the name? */
void sarray_remove_garbage(void);
@@ -156,10 +156,10 @@ void sarray_remove_garbage(void);
#ifdef PRECOMPUTE_SELECTORS
/* Transform soffset values to ints and vica verca */
static inline unsigned int
-soffset_decode(sidx index)
+soffset_decode(sidx indx)
{
union sofftype x;
- x.idx = index;
+ x.idx = indx;
#ifdef OBJC_SPARSE3
return x.off.eoffset
+ (x.off.boffset*BUCKET_SIZE)
@@ -186,9 +186,9 @@ soffset_encode(size_t offset)
#else /* not PRECOMPUTE_SELECTORS */
static inline size_t
-soffset_decode(sidx index)
+soffset_decode(sidx indx)
{
- return index;
+ return indx;
}
static inline sidx
@@ -198,13 +198,13 @@ soffset_encode(size_t offset)
}
#endif /* not PRECOMPUTE_SELECTORS */
-/* Get element from the Sparse array `array' at offset `index' */
+/* Get element from the Sparse array `array' at offset `indx' */
-static inline void* sarray_get(struct sarray* array, sidx index)
+static inline void* sarray_get(struct sarray* array, sidx indx)
{
#ifdef PRECOMPUTE_SELECTORS
union sofftype x;
- x.idx = index;
+ x.idx = indx;
#ifdef OBJC_SPARSE3
return
array->
@@ -217,19 +217,19 @@ static inline void* sarray_get(struct sarray* array, sidx index)
#else /* not PRECOMPUTE_SELECTORS */
#ifdef OBJC_SPARSE3
return array->
- indices[index/INDEX_CAPACITY]->
- buckets[(index/BUCKET_SIZE)%INDEX_SIZE]->
- elems[index%BUCKET_SIZE];
+ indices[indx/INDEX_CAPACITY]->
+ buckets[(indx/BUCKET_SIZE)%INDEX_SIZE]->
+ elems[indx%BUCKET_SIZE];
#else /* OBJC_SPARSE2 */
- return array->buckets[index/BUCKET_SIZE]->elems[index%BUCKET_SIZE];
+ return array->buckets[indx/BUCKET_SIZE]->elems[indx%BUCKET_SIZE];
#endif /* not OBJC_SPARSE3 */
#endif /* not PRECOMPUTE_SELECTORS */
}
-static inline void* sarray_get_safe(struct sarray* array, sidx index)
+static inline void* sarray_get_safe(struct sarray* array, sidx indx)
{
- if(soffset_decode(index) < array->capacity)
- return sarray_get(array, index);
+ if(soffset_decode(indx) < array->capacity)
+ return sarray_get(array, indx);
else
return (array->empty_bucket->elems[0]);
}
diff --git a/contrib/libobjc/objc/thr.h b/contrib/libobjc/objc/thr.h
index 48ad0befa0df..1178f2ed743d 100644
--- a/contrib/libobjc/objc/thr.h
+++ b/contrib/libobjc/objc/thr.h
@@ -2,29 +2,29 @@
Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc.
Contributed by Galen C. Hunt (gchunt@cs.rochester.edu)
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify
+GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-GNU CC is distributed in the hope that it will be useful,
+GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-GNU CC is free software; you can redistribute it and/or modify it under the
+GCC is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
-GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
-GNU CC; see the file COPYING. If not, write to the Free Software
+GCC; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/contrib/libobjc/objc/typedstream.h b/contrib/libobjc/objc/typedstream.h
index eb4642f344be..ed78bf76a78d 100644
--- a/contrib/libobjc/objc/typedstream.h
+++ b/contrib/libobjc/objc/typedstream.h
@@ -1,20 +1,20 @@
/* GNU Objective-C Typed Streams interface.
Copyright (C) 1993, 1995 Free Software Foundation, Inc.
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it
+GCC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
-GNU CC is distributed in the hope that it will be useful, but WITHOUT
+GCC is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
License for more details.
You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
+along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/contrib/libobjc/objects.c b/contrib/libobjc/objects.c
index 6858fed20131..e4920a650a8c 100644
--- a/contrib/libobjc/objects.c
+++ b/contrib/libobjc/objects.c
@@ -2,19 +2,19 @@
Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
Contributed by Kresten Krab Thorup
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it under the
+GCC is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
-GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
-GNU CC; see the file COPYING. If not, write to the Free Software
+GCC; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/contrib/libobjc/sarray.c b/contrib/libobjc/sarray.c
index e78e36d01f18..c37633ba33e7 100644
--- a/contrib/libobjc/sarray.c
+++ b/contrib/libobjc/sarray.c
@@ -1,20 +1,20 @@
/* Sparse Arrays for Objective C dispatch tables
Copyright (C) 1993, 1995, 1996, 2002 Free Software Foundation, Inc.
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify
+GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-GNU CC is distributed in the hope that it will be useful,
+GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
+along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
@@ -402,9 +402,6 @@ sarray_free (struct sarray *array) {
#else
old_buckets = array->buckets;
#endif
-
- if ((array->is_copy_of) && ((array->is_copy_of->ref_count - 1) == 0))
- sarray_free (array->is_copy_of);
/* Free all entries that do not point to empty_bucket */
for (counter = 0; counter <= old_max_index; counter++ ) {
@@ -462,6 +459,10 @@ sarray_free (struct sarray *array) {
#endif
+ /* If this is a copy, go ahead and decrement/deallocate the original */
+ if (array->is_copy_of)
+ sarray_free (array->is_copy_of);
+
/* free array */
sarray_free_garbage (array);
}
diff --git a/contrib/libobjc/selector.c b/contrib/libobjc/selector.c
index 5f5a26bc9af0..06743b03ff4e 100644
--- a/contrib/libobjc/selector.c
+++ b/contrib/libobjc/selector.c
@@ -2,19 +2,19 @@
Copyright (C) 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc.
Contributed by Kresten Krab Thorup
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it under the
+GCC is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
-GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
-GNU CC; see the file COPYING. If not, write to the Free Software
+GCC; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with files compiled with
@@ -148,6 +148,8 @@ void __objc_register_instance_methods_to_class (Class class)
new_list->method_next = class->class_pointer->methods;
class->class_pointer->methods = new_list;
}
+ else
+ objc_free(new_list);
__objc_update_dispatch_table_for_class (class->class_pointer);
}
diff --git a/contrib/libobjc/sendmsg.c b/contrib/libobjc/sendmsg.c
index 6ef711b50d35..0214e77afcd8 100644
--- a/contrib/libobjc/sendmsg.c
+++ b/contrib/libobjc/sendmsg.c
@@ -3,19 +3,19 @@
2001, 2002 Free Software Foundation, Inc.
Contributed by Kresten Krab Thorup
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it under the
+GCC is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
-GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
-GNU CC; see the file COPYING. If not, write to the Free Software
+GCC; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
@@ -25,7 +25,11 @@ Boston, MA 02111-1307, USA. */
however invalidate any other reasons why the executable file might be
covered by the GNU General Public License. */
+/* FIXME: This file has no business including tm.h. */
+
#include "tconfig.h"
+#include "coretypes.h"
+#include "tm.h"
#include "runtime.h"
#include "sarray.h"
#include "encoding.h"
@@ -115,6 +119,14 @@ __inline__
IMP
get_imp (Class class, SEL sel)
{
+ /* In a vanilla implementation we would first check if the dispatch
+ table is installed. Here instead, to get more speed in the
+ standard case (that the dispatch table is installed) we first try
+ to get the imp using brute force. Only if that fails, we do what
+ we should have been doing from the very beginning, that is, check
+ if the dispatch table needs to be installed, install it if it's
+ not installed, and retrieve the imp from the table if it's
+ installed. */
void *res = sarray_get_safe (class->dtable, (size_t) sel->sel_id);
if (res == 0)
{
@@ -123,7 +135,16 @@ get_imp (Class class, SEL sel)
{
/* The dispatch table needs to be installed. */
objc_mutex_lock (__objc_runtime_mutex);
- __objc_install_dispatch_table_for_class (class);
+
+ /* Double-checked locking pattern: Check
+ __objc_uninstalled_dtable again in case another thread
+ installed the dtable while we were waiting for the lock
+ to be released. */
+ if (class->dtable == __objc_uninstalled_dtable)
+ {
+ __objc_install_dispatch_table_for_class (class);
+ }
+
objc_mutex_unlock (__objc_runtime_mutex);
/* Call ourselves with the installed dispatch table
and get the real method */
@@ -131,10 +152,22 @@ get_imp (Class class, SEL sel)
}
else
{
- /* The dispatch table has been installed so the
- method just doesn't exist for the class.
- Return the forwarding implementation. */
- res = __objc_get_forward_imp (sel);
+ /* The dispatch table has been installed. */
+
+ /* Get the method from the dispatch table (we try to get it
+ again in case another thread has installed the dtable just
+ after we invoked sarray_get_safe, but before we checked
+ class->dtable == __objc_uninstalled_dtable).
+ */
+ res = sarray_get_safe (class->dtable, (size_t) sel->sel_id);
+ if (res == 0)
+ {
+ /* The dispatch table has been installed, and the method
+ is not in the dispatch table. So the method just
+ doesn't exist for the class. Return the forwarding
+ implementation. */
+ res = __objc_get_forward_imp (sel);
+ }
}
}
return res;
@@ -153,7 +186,10 @@ __objc_responds_to (id object, SEL sel)
if (object->class_pointer->dtable == __objc_uninstalled_dtable)
{
objc_mutex_lock (__objc_runtime_mutex);
- __objc_install_dispatch_table_for_class (object->class_pointer);
+ if (object->class_pointer->dtable == __objc_uninstalled_dtable)
+ {
+ __objc_install_dispatch_table_for_class (object->class_pointer);
+ }
objc_mutex_unlock (__objc_runtime_mutex);
}
@@ -188,10 +224,19 @@ objc_msg_lookup (id receiver, SEL op)
}
else
{
- /* The dispatch table has been installed so the
- method just doesn't exist for the class.
- Attempt to forward the method. */
- result = __objc_get_forward_imp (op);
+ /* The dispatch table has been installed. Check again
+ if the method exists (just in case the dispatch table
+ has been installed by another thread after we did the
+ previous check that the method exists).
+ */
+ result = sarray_get_safe (receiver->class_pointer->dtable,
+ (sidx)op->sel_id);
+ if (result == 0)
+ {
+ /* If the method still just doesn't exist for the
+ class, attempt to forward the method. */
+ result = __objc_get_forward_imp (op);
+ }
}
}
return result;
@@ -235,13 +280,16 @@ __objc_init_dispatch_tables ()
static void
__objc_init_install_dtable (id receiver, SEL op __attribute__ ((__unused__)))
{
+ objc_mutex_lock (__objc_runtime_mutex);
+
/* This may happen, if the programmer has taken the address of a
method before the dtable was initialized... too bad for him! */
if (receiver->class_pointer->dtable != __objc_uninstalled_dtable)
- return;
-
- objc_mutex_lock (__objc_runtime_mutex);
-
+ {
+ objc_mutex_unlock (__objc_runtime_mutex);
+ return;
+ }
+
if (CLS_ISCLASS (receiver->class_pointer))
{
/* receiver is an ordinary object */
diff --git a/contrib/libobjc/thr-dce.c b/contrib/libobjc/thr-dce.c
index 3fa5b9b1b3ed..8350db2e0bbb 100644
--- a/contrib/libobjc/thr-dce.c
+++ b/contrib/libobjc/thr-dce.c
@@ -2,19 +2,19 @@
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Contributed by Galen C. Hunt (gchunt@cs.rochester.edu)
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it under the
+GCC is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
-GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
-GNU CC; see the file COPYING. If not, write to the Free Software
+GCC; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/contrib/libobjc/thr-decosf1.c b/contrib/libobjc/thr-decosf1.c
index 0f7063b7e836..cfb2cbc487f1 100644
--- a/contrib/libobjc/thr-decosf1.c
+++ b/contrib/libobjc/thr-decosf1.c
@@ -2,19 +2,19 @@
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Contributed by Galen C. Hunt (gchunt@cs.rochester.edu)
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it under the
+GCC is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
-GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
-GNU CC; see the file COPYING. If not, write to the Free Software
+GCC; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/contrib/libobjc/thr-irix.c b/contrib/libobjc/thr-irix.c
index 528a3e3a434d..6eb06ec48ecc 100644
--- a/contrib/libobjc/thr-irix.c
+++ b/contrib/libobjc/thr-irix.c
@@ -2,19 +2,19 @@
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Contributed by Galen C. Hunt (gchunt@cs.rochester.edu)
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it under the
+GCC is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
-GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
-GNU CC; see the file COPYING. If not, write to the Free Software
+GCC; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/contrib/libobjc/thr-mach.c b/contrib/libobjc/thr-mach.c
index e95460746d11..b0f864d71008 100644
--- a/contrib/libobjc/thr-mach.c
+++ b/contrib/libobjc/thr-mach.c
@@ -4,19 +4,19 @@
Modified for Mach threads by Bill Bumgarner <bbum@friday.com>
Condition functions added by Mircea Oancea <mircea@first.elcom.pub.ro>
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it under the
+GCC is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
-GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
+along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/contrib/libobjc/thr-objc.c b/contrib/libobjc/thr-objc.c
index 48150f0ef3e4..5afef683a24b 100644
--- a/contrib/libobjc/thr-objc.c
+++ b/contrib/libobjc/thr-objc.c
@@ -1,19 +1,19 @@
/* GNU Objective C Runtime Thread Interface.
Copyright (C) 1999 Free Software Foundation, Inc.
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it under the
+GCC is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
-GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
+along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
@@ -25,6 +25,8 @@ Boston, MA 02111-1307, USA. */
#define _LIBOBJC
#include "tconfig.h"
+#include "coretypes.h"
+#include "tm.h"
#include "defaults.h"
#include <objc/thr.h>
#include "runtime.h"
diff --git a/contrib/libobjc/thr-os2.c b/contrib/libobjc/thr-os2.c
index a0d7d436613e..d43d225650cd 100644
--- a/contrib/libobjc/thr-os2.c
+++ b/contrib/libobjc/thr-os2.c
@@ -2,19 +2,19 @@
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Contributed by Thomas Baier (baier@ci.tuwien.ac.at)
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it under the
+GCC is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
-GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
+along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/contrib/libobjc/thr-posix.c b/contrib/libobjc/thr-posix.c
index 71a9660f7eae..710bebf30e61 100644
--- a/contrib/libobjc/thr-posix.c
+++ b/contrib/libobjc/thr-posix.c
@@ -4,19 +4,19 @@
Modified for Linux/Pthreads by Kai-Uwe Sattler (kus@iti.cs.uni-magdeburg.de)
Modified for posix compliance by Chris Ball (cball@fmco.com)
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it under the
+GCC is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
-GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
+along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/contrib/libobjc/thr-pthreads.c b/contrib/libobjc/thr-pthreads.c
index 2efdd15bc541..c00c6016bff9 100644
--- a/contrib/libobjc/thr-pthreads.c
+++ b/contrib/libobjc/thr-pthreads.c
@@ -3,19 +3,19 @@
Contributed by Scott Christley <scottc@net-community.com>
Condition functions added by: Mircea Oancea <mircea@first.elcom.pub.ro>
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it under the
+GCC is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
-GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
+along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/contrib/libobjc/thr-rtems.c b/contrib/libobjc/thr-rtems.c
index 3fd50bef9c8d..8683d769d5cb 100644
--- a/contrib/libobjc/thr-rtems.c
+++ b/contrib/libobjc/thr-rtems.c
@@ -4,19 +4,19 @@
Renamed from thr-vxworks.c to thr-rtems.c by
Ralf Corsepius (corsepiu@faw.uni-ulm.de)
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it under the
+GCC is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
-GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
-GNU CC; see the file COPYING. If not, write to the Free Software
+GCC; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/contrib/libobjc/thr-single.c b/contrib/libobjc/thr-single.c
index b196677c6b69..24ab5d7b630d 100644
--- a/contrib/libobjc/thr-single.c
+++ b/contrib/libobjc/thr-single.c
@@ -2,19 +2,19 @@
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Contributed by Galen C. Hunt (gchunt@cs.rochester.edu)
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it under the
+GCC is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
-GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
-GNU CC; see the file COPYING. If not, write to the Free Software
+GCC; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/contrib/libobjc/thr-solaris.c b/contrib/libobjc/thr-solaris.c
index 90351b43cf6c..447d0c45f9e3 100644
--- a/contrib/libobjc/thr-solaris.c
+++ b/contrib/libobjc/thr-solaris.c
@@ -3,19 +3,19 @@
Contributed by Galen C. Hunt (gchunt@cs.rochester.edu)
Conditions added by Mircea Oancea (mircea@first.elcom.pub.ro)
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it under the
+GCC is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
-GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
-GNU CC; see the file COPYING. If not, write to the Free Software
+GCC; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/contrib/libobjc/thr-vxworks.c b/contrib/libobjc/thr-vxworks.c
index b196677c6b69..24ab5d7b630d 100644
--- a/contrib/libobjc/thr-vxworks.c
+++ b/contrib/libobjc/thr-vxworks.c
@@ -2,19 +2,19 @@
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Contributed by Galen C. Hunt (gchunt@cs.rochester.edu)
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it under the
+GCC is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
-GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
-GNU CC; see the file COPYING. If not, write to the Free Software
+GCC; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/contrib/libobjc/thr-win32.c b/contrib/libobjc/thr-win32.c
index 8570ffd997ef..3447a02d65ae 100644
--- a/contrib/libobjc/thr-win32.c
+++ b/contrib/libobjc/thr-win32.c
@@ -2,19 +2,19 @@
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Contributed by Galen C. Hunt (gchunt@cs.rochester.edu)
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it under the
+GCC is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
-GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
-GNU CC; see the file COPYING. If not, write to the Free Software
+GCC; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/contrib/libobjc/thr.c b/contrib/libobjc/thr.c
index bc94473ce684..c8e8173ad8b3 100644
--- a/contrib/libobjc/thr.c
+++ b/contrib/libobjc/thr.c
@@ -2,19 +2,19 @@
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Contributed by Galen C. Hunt (gchunt@cs.rochester.edu)
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it under the
+GCC is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
-GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
-GNU CC; see the file COPYING. If not, write to the Free Software
+GCC; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */