]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
In libobjc/:
authorNicola Pero <nicola.pero@meta-innovation.com>
Sat, 11 Sep 2010 22:47:14 +0000 (22:47 +0000)
committerNicola Pero <nicola@gcc.gnu.org>
Sat, 11 Sep 2010 22:47:14 +0000 (22:47 +0000)
       * objc/objc.h (__GNU_LIBOBJC__): New #define providing an easy way
        to check the API version.  Added some comments.

        * objc-private/common.h: New file.
        * NXConstStr.m: Include objc-private/common.h.
        * Object.m: Same change.
        * Protocol.m: Same change.
        * archive.c: Same change.
        * class.c: Same change.
        * encoding.c: Same change.
        * exception.c: Same change.
        * gc.c: Same change.
        * hash.c: Same change.
        * init.c: Same change.
        * libobjc_entry.c: Same change.
        * linking.m: Same change.
        * misc.c: Same change (and added a comment).
        * nil_method.c: Same change.
        * objects.c: Same change.
        * sarray.c: Same change.
        * selector.c: Same change.
        * sendmsg.c: Same change.
        * thr.c: Same change.

From-SVN: r164218

22 files changed:
libobjc/ChangeLog
libobjc/NXConstStr.m
libobjc/Object.m
libobjc/Protocol.m
libobjc/archive.c
libobjc/class.c
libobjc/encoding.c
libobjc/exception.c
libobjc/gc.c
libobjc/hash.c
libobjc/init.c
libobjc/libobjc_entry.c
libobjc/linking.m
libobjc/misc.c
libobjc/nil_method.c
libobjc/objc-private/common.h [new file with mode: 0644]
libobjc/objc/objc.h
libobjc/objects.c
libobjc/sarray.c
libobjc/selector.c
libobjc/sendmsg.c
libobjc/thr.c

index 7830d06487cfb48d1e106b470636e01e32da07a6..0fdcb6e46213652aed625edd81864afdaf417fea 100644 (file)
@@ -1,3 +1,29 @@
+2010-09-12  Nicola Pero  <nicola.pero@meta-innovation.com>
+
+       * objc/objc.h (__GNU_LIBOBJC__): New #define providing an easy way
+       to check the API version.  Added some comments.
+
+       * objc-private/common.h: New file.
+       * NXConstStr.m: Include objc-private/common.h.
+       * Object.m: Same change.
+       * Protocol.m: Same change.
+       * archive.c: Same change.
+       * class.c: Same change.
+       * encoding.c: Same change.
+       * exception.c: Same change.
+       * gc.c: Same change.
+       * hash.c: Same change.
+       * init.c: Same change.
+       * libobjc_entry.c: Same change.
+       * linking.m: Same change.
+       * misc.c: Same change (and added a comment).
+       * nil_method.c: Same change.
+       * objects.c: Same change.
+       * sarray.c: Same change.
+       * selector.c: Same change.
+       * sendmsg.c: Same change.
+       * thr.c: Same change.
+
 2010-09-11  Nicola Pero  <nicola.pero@meta-innovation.com>
 
        * objc/objc-api.h: Removed obsolete #ifdef for NeXTSTEP.
index 92281f618f115d6878ab7c3b5c69b38860d8f7ae..7ff553b58ed4aaac02f224ce1a8b1ad012ea0cf1 100644 (file)
@@ -23,6 +23,7 @@ a copy of the GCC Runtime Library Exception along with this program;
 see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 <http://www.gnu.org/licenses/>.  */ 
 
+#include "objc-private/common.h"
 #include "objc/NXConstStr.h"
 
 @implementation NXConstantString
index 377f0594d1bf8cf92fd58a839b56152f4869d4a1..3a5bcb31688c1336960e0078351871357cc3a727 100644 (file)
@@ -22,6 +22,7 @@ a copy of the GCC Runtime Library Exception along with this program;
 see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 <http://www.gnu.org/licenses/>.  */
 
+#include "objc-private/common.h"
 #include <stdarg.h>
 #include <errno.h>
 #include "objc/Object.h"
index 9fa7f92587318d6b9f9c6af9552dd14d3ca2a3f5..49b7b3a43d422b35acbaa849dba4f32a8687c440 100644 (file)
@@ -22,6 +22,7 @@ a copy of the GCC Runtime Library Exception along with this program;
 see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 <http://www.gnu.org/licenses/>.  */ 
 
+#include "objc-private/common.h"
 #include "objc/Protocol.h"
 #include "objc/objc-api.h"
 
index 87d5ad8375d0f2dec244d20ed0f37c4b3b0699e5..6603ab12d51cec1bc537264b945a5e292d84caf7 100644 (file)
@@ -22,6 +22,7 @@ a copy of the GCC Runtime Library Exception along with this program;
 see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 <http://www.gnu.org/licenses/>.  */
 
+#include "objc-private/common.h"
 #include "tconfig.h"
 #include "objc/objc.h"
 #include "objc/objc-api.h"
index c86cbb4dcc984729b89b4d9eca5c6f12028f6ccb..37b2b4eebf9b6de94356d65aecf013f8425f54d3 100644 (file)
@@ -87,6 +87,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
   classes from the table - and the difficult thing with lock-free data
   structures is freeing data when is removed from the structures.  */
 
+#include "objc-private/common.h"
 #include "objc/objc.h"
 #include "objc/objc-api.h"
 #include "objc/thr.h"
index c743d865e17e0c7c1ab84d899f52a428f49f0b71..5694530a2200694083b5c044db25aaeb1934121a 100644 (file)
@@ -27,6 +27,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 
 /* FIXME: This file has no business including tm.h.  */
 
+#include "objc-private/common.h"
 #include "tconfig.h"
 #include "coretypes.h"
 #include "tm.h"
index 210beaee406538c67829fe58197aed9a601bfdae..bb6a9194af1e4ab3989bffb9177b04a78e75d2df 100644 (file)
@@ -22,6 +22,7 @@ a copy of the GCC Runtime Library Exception along with this program;
 see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 <http://www.gnu.org/licenses/>.  */
 
+#include "objc-private/common.h"
 #include <stdlib.h>
 #include "config.h"
 #include "objc/objc-api.h"
index 70b3af4d948a31034b2477e528e9ebf73a23eac0..a67ba1c985531e03f779c8a146ddae002caabff8 100644 (file)
@@ -23,6 +23,7 @@ a copy of the GCC Runtime Library Exception along with this program;
 see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 <http://www.gnu.org/licenses/>.  */
 
+#include "objc-private/common.h"
 #include "tconfig.h"
 #include "objc/objc.h"
 #include "objc/encoding.h"
index 697f2e1b69bbdb47dc7b196b95bffcb373bacbd8..9e0a608c13019599aa5dea43e164387c1dedf402 100644 (file)
@@ -22,6 +22,7 @@ a copy of the GCC Runtime Library Exception along with this program;
 see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 <http://www.gnu.org/licenses/>.  */
 
+#include "objc-private/common.h"
 #include "assert.h"
 
 #include "objc/objc.h"
index ea6ab38569ea6a9f36dc7b21903595a1df9a9100..75e0b1036ead019c24865857c2aa583b70cb93f7 100644 (file)
@@ -24,6 +24,7 @@ a copy of the GCC Runtime Library Exception along with this program;
 see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 <http://www.gnu.org/licenses/>.  */
 
+#include "objc-private/common.h"
 #include "objc/objc.h"
 #include "objc/objc-api.h"
 #include "objc/thr.h"
index 13e47492136d4969fb7e8ccaf99268b6c0dc86d7..5cbc89c4f1321bbbbc8c7501ed92170bb31d009f 100644 (file)
@@ -23,7 +23,7 @@ a copy of the GCC Runtime Library Exception along with this program;
 see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 <http://www.gnu.org/licenses/>.  */
 
-
+#include "objc-private/common.h"
 #include <windows.h>
 
 /*
index fa31bdf3c96fb2a1a4cff6f4573a79922818e603..6372e91df4518d454cd867114c248e085fecba1d 100644 (file)
@@ -23,7 +23,7 @@ a copy of the GCC Runtime Library Exception along with this program;
 see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 <http://www.gnu.org/licenses/>.  */
 
-
+#include "objc-private/common.h"
 #include <objc/Object.h>
 #include <objc/NXConstStr.h>
 
index e67f345df5e96d6b857821b2442ad50da609dda5..fde1f3086719f9f77220f4ca21615ea9370ae443 100644 (file)
@@ -24,9 +24,15 @@ a copy of the GCC Runtime Library Exception along with this program;
 see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 <http://www.gnu.org/licenses/>.  */
 
+#include "objc-private/common.h"
 
+/* __USE_FIXED_PROTOTYPES__ used to be required to get prototypes for
+   malloc, free, etc. on some platforms.  It is unclear if we still
+   need it, but it can't hurt.
+*/
 #define __USE_FIXED_PROTOTYPES__
 #include <stdlib.h>
+
 #include "objc/objc.h"
 #include "objc/objc-api.h"
 #include "objc-private/runtime.h"
index a5364eab4ce178758753aeb86c432247b0999329..752115f869e1bb877110a9f739dbe1d049e7cd15 100644 (file)
@@ -26,6 +26,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 /* This is the nil method, the function that is called when the receiver
    of a method is nil */
 
+#include "objc-private/common.h"
 #include "objc/objc.h"
 
 /* When the receiver of a method invocation is nil, the runtime
diff --git a/libobjc/objc-private/common.h b/libobjc/objc-private/common.h
new file mode 100644 (file)
index 0000000..1642faa
--- /dev/null
@@ -0,0 +1,38 @@
+/* GNU Objective C Runtime Common Private Definitions
+   Copyright (C) 2010 Free Software Foundation, Inc.
+   Contributed by Nicola Pero
+
+This file is part of GCC.
+
+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 3, or (at your option) any later version.
+
+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.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+<http://www.gnu.org/licenses/>.  */
+
+#ifndef __objc_private_common_INCLUDE_GNU
+#define __objc_private_common_INCLUDE_GNU
+
+/* This file contains definitions that should be included by all .c
+   and .m files in libobjc.
+*/
+
+/* This variable allows the public headers to determine when they are
+   being included by a file inside libobjc itself, or when they are
+   being included by an external file.
+*/
+#define GNU_LIBOBJC_COMPILING_LIBOBJC_ITSELF 1
+
+#endif /* __objc_private_common_INCLUDE_GNU */
index 17ae49b17472711176c46b26b9a349d215db0236..6c3214f5e08b4d55213e128ee1345291f59074ba 100644 (file)
@@ -26,12 +26,27 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #ifndef __objc_INCLUDE_GNU
 #define __objc_INCLUDE_GNU
 
+/* This file contains the definition of the basic types used by the
+   Objective-C language.  It needs to be included to do almost
+   anything with Objective-C.
+*/
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 #include <stddef.h>
 
+/* The current version of the GNU Objective-C Runtime library in
+   compressed ISO date format.  This should be updated any time a new
+   version is released with changes to the public API (there is no
+   need to update it if there were no API changes since the previous
+   release).  This macro is only defined starting with the GNU
+   Objective-C Runtime shipped with GCC 4.6.0.  If it is not defined,
+   it is either an older version of the runtime, or another runtime.
+*/
+#define __GNU_LIBOBJC__ 20100911
+
 /*
   Definition of the boolean type.
 
index fcfce1e490dad71df743e1247f5fc2a2e7f790b3..0743af427a04158f6412e14fc38a20091339f1f2 100644 (file)
@@ -22,7 +22,7 @@ a copy of the GCC Runtime Library Exception along with this program;
 see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 <http://www.gnu.org/licenses/>.  */
 
-
+#include "objc-private/common.h"
 #include "tconfig.h"         /* include defs of bzero for target */
 #include "objc/objc.h"
 #include "objc/objc-api.h"
index 79172ea93beee6b8d68d405b34d7e0a91b6d25eb..dd140c76f3638bcc72ac326e1511cccda10e0b60 100644 (file)
@@ -22,7 +22,7 @@ a copy of the GCC Runtime Library Exception along with this program;
 see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 <http://www.gnu.org/licenses/>.  */
 
-
+#include "objc-private/common.h"
 #include "objc/sarray.h"
 #include "objc/objc.h"
 #include "objc/objc-api.h"
index 1b611419da7fe0533cd3ff1139c445081acf1f5a..52b6ba12da5083ba8bd00743fa11f80638f082e6 100644 (file)
@@ -22,7 +22,7 @@ a copy of the GCC Runtime Library Exception along with this program;
 see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 <http://www.gnu.org/licenses/>.  */
 
-
+#include "objc-private/common.h"
 #include "objc/objc.h"
 #include "objc/objc-api.h"
 #include "objc/thr.h"
index 682fbe11022a027127e0748bf3184c95bef58e4b..3bf28b9758875dc37b31e30eb5b3df2923764440 100644 (file)
@@ -28,6 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 /* FIXME: This should be using libffi instead of __builtin_apply
    and friends.  */
 
+#include "objc-private/common.h"
 #include "tconfig.h"
 #include "coretypes.h"
 #include "tm.h"
index 5b39ada2788274638725b6a307105898ac86f682..0a5853608d6f5aba3d42a4acb1b83d6161798d98 100644 (file)
@@ -22,6 +22,7 @@ a copy of the GCC Runtime Library Exception along with this program;
 see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 <http://www.gnu.org/licenses/>.  */
 
+#include "objc-private/common.h"
 #define _LIBOBJC
 /* The line below is needed for declarations of functions such as
    pthread_mutexattr_settype, without which gthr-posix.h may fail to