OSDN Git Service

2004-06-24 Andrew Pinski <apinski@apple.com>
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 25 Jun 2004 04:31:51 +0000 (04:31 +0000)
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 25 Jun 2004 04:31:51 +0000 (04:31 +0000)
        * objc/encoding.h: Wrap the functions with extern "C" for C++
        mode.
        * objc/hash.h: Likewise.
        * objc/objc-api.h: Likewise.
        * objc/objc-list.h: Likewise.
        * objc/runtime.h: Likewise.
        * objc/sarray.h: Likewise.
        * objc/thr.h: Likewise.
        * objc/typedstream.h: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83635 138bc75d-0d04-0410-961f-82ee72b054a4

libobjc/ChangeLog
libobjc/objc/encoding.h
libobjc/objc/hash.h
libobjc/objc/objc-api.h
libobjc/objc/objc-list.h
libobjc/objc/runtime.h
libobjc/objc/sarray.h
libobjc/objc/thr.h
libobjc/objc/typedstream.h

index 6196832..3e8c956 100644 (file)
@@ -1,3 +1,16 @@
+2004-06-24  Andrew Pinski  <apinski@apple.com>
+
+       * objc/encoding.h: Wrap the functions with extern "C" for C++
+       mode. 
+       * objc/hash.h: Likewise.
+       * objc/objc-api.h: Likewise.
+       * objc/objc-list.h: Likewise.
+       * objc/runtime.h: Likewise.
+       * objc/sarray.h: Likewise.
+       * objc/thr.h: Likewise.
+       * objc/typedstream.h: Likewise.
+
+
 2004-06-21  Nick Clifton  <nickc@redhat.com>
 
        * encoding.c (BITS_PER_UNIT): Define if a definition is not
index 684d70d..b6287fc 100644 (file)
@@ -32,6 +32,10 @@ Boston, MA 02111-1307, USA.  */
 #include <ctype.h>
 #include "objc/objc-api.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
 #define _C_CONST       'r'
 #define _C_IN          'n'
 #define _C_INOUT       'N'
@@ -96,4 +100,8 @@ void objc_layout_structure_get_info (struct objc_struct_layout *layout,
                                      unsigned int *align,
                                      const char **type);
 
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
 #endif /* __encoding_INCLUDE_GNU */
index 4c54531..47715af 100644 (file)
@@ -32,6 +32,11 @@ Boston, MA 02111-1307, USA.  */
 #include <string.h>
 #include <objc/objc.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
 /*
  * This data structure is used to hold items
  *  stored in a hash table.  Each node holds 
@@ -203,5 +208,9 @@ compare_strings (const void *k1, const void *k2)
     return ! strcmp ((const char *) k1, (const char *) k2);
 }
 
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
 
 #endif /* not __hash_INCLUDE_GNU */
index 52ad50a..03bbe66 100644 (file)
@@ -34,6 +34,11 @@ Boston, MA 02111-1307, USA.  */
 #include <stdio.h>
 #include <stdarg.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
 /* For functions which return Method_t */
 #define METHOD_NULL    (Method_t)0
                                                 /* Boolean typedefs */
@@ -606,6 +611,11 @@ object_is_meta_class (id object)
 struct sarray* 
 objc_get_uninstalled_dtable(void);
 
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+
 #endif /* not __objc_api_INCLUDE_GNU */
 
 
index 06dbb39..866095d 100644 (file)
@@ -28,6 +28,11 @@ Boston, MA 02111-1307, USA.  */
 #ifndef __GNU_OBJC_LIST_H
 #define __GNU_OBJC_LIST_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
 struct objc_list {
   void *head;
   struct objc_list *tail;
@@ -144,4 +149,10 @@ list_free(struct objc_list* list)
       objc_free(list);
     }
 }
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+
 #endif /* not __GNU_OBJC_LIST_H */
index 17a3e5e..d4179f2 100644 (file)
@@ -42,6 +42,11 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "objc/hash.h"         /* hash structures */
 #include "objc/objc-list.h"    /* linear lists */
 
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
 extern void __objc_add_class_to_hash(Class);   /* (objc-class.c) */
 extern void __objc_init_selector_tables(void); /* (objc-sel.c) */
 extern void __objc_init_class_tables(void);    /* (objc-class.c) */
@@ -85,6 +90,11 @@ SEL  __sel_register_typed_name (const char*, const char*,
                                struct objc_selector*, BOOL is_const);
 extern void __objc_generate_gc_type_description (Class);
 
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+
 #endif /* not __objc_runtime_INCLUDE_GNU */
 
 
index a94a98a..5956a43 100644 (file)
@@ -43,11 +43,20 @@ extern const char* __objc_sparse3_id;
 
 #include "objc/thr.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
 extern int nbuckets;           /* for stats */
 extern int nindices;
 extern int narrays;
 extern int idxsize;
 
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+
 #include <assert.h>
 
 /* An unsigned integer of same size as a pointer */
@@ -142,6 +151,10 @@ struct sarray {
   size_t capacity;
 };
 
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
 struct sarray* sarray_new(int, void* default_element);
 void sarray_free(struct sarray*);
 struct sarray* sarray_lazy_copy(struct sarray*);
@@ -234,4 +247,9 @@ static inline void* sarray_get_safe(struct sarray* array, sidx indx)
     return (array->empty_bucket->elems[0]);
 }
 
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+
 #endif /* __sarray_INCLUDE_GNU */
index 1178f2e..b4472fe 100644 (file)
@@ -40,6 +40,10 @@ Boston, MA 02111-1307, USA.  */
 
 #include "objc/objc.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
 /*************************************************************************
  *  Universal static variables:
  */
@@ -142,4 +146,9 @@ objc_thread_t __objc_thread_id (void);
 int __objc_thread_set_data (void *value);
 void * __objc_thread_get_data (void);
 
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+
 #endif /* not __thread_INCLUDE_GNU */
index 48456a6..8e9e2e3 100644 (file)
@@ -31,6 +31,11 @@ Boston, MA 02111-1307, USA.  */
 #include "objc/hash.h"
 #include <stdio.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
 typedef int (*objc_typed_read_func)(void*, char*, int);
 typedef int (*objc_typed_write_func)(void*, const char*, int);
 typedef int (*objc_typed_flush_func)(void*);
@@ -129,4 +134,9 @@ void objc_close_typed_stream (TypedStream* stream);
 BOOL objc_end_of_typed_stream (TypedStream* stream);
 void objc_flush_typed_stream (TypedStream* stream);
 
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+
 #endif /* not __typedstream_INCLUDE_GNU */