From: pinskia Date: Fri, 13 Aug 2004 22:23:58 +0000 (+0000) Subject: 2004-08-13 Andrew Pinski X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=35072fc18bb2c5b7aeaad7688a79ea36e814efb6 2004-08-13 Andrew Pinski * objc/Object.h: Move includes out of extern "C" blocks. * objc/encoding.h: Likewise. * objc/hash.h: Likewise. * objc/objc-api.h: Likewise. * objc/runtime.h: Likewise. * objc/sarray.h: Likewise. * objc/typedstream.h: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85968 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/libobjc/ChangeLog b/libobjc/ChangeLog index 9d83ac568c6..c549a2c3333 100644 --- a/libobjc/ChangeLog +++ b/libobjc/ChangeLog @@ -1,3 +1,13 @@ +2004-08-13 Andrew Pinski + + * objc/Object.h: Move includes out of extern "C" blocks. + * objc/encoding.h: Likewise. + * objc/hash.h: Likewise. + * objc/objc-api.h: Likewise. + * objc/runtime.h: Likewise. + * objc/sarray.h: Likewise. + * objc/typedstream.h: Likewise. + 2004-08-12 Ziemowit Laski * objc/NXConstStr.h: Update copyright date; bracket with diff --git a/libobjc/objc/Object.h b/libobjc/objc/Object.h index f4e56c5e7d5..b159b59079d 100644 --- a/libobjc/objc/Object.h +++ b/libobjc/objc/Object.h @@ -27,13 +27,13 @@ Boston, MA 02111-1307, USA. */ #ifndef __object_INCLUDE_GNU #define __object_INCLUDE_GNU +#include +#include + #ifdef __cplusplus extern "C" { #endif -#include -#include - /* * All classes are derived from Object. As such, * this is the overhead tacked onto those objects. diff --git a/libobjc/objc/encoding.h b/libobjc/objc/encoding.h index 42ebc1a2d31..57cf390fe4b 100644 --- a/libobjc/objc/encoding.h +++ b/libobjc/objc/encoding.h @@ -30,13 +30,12 @@ Boston, MA 02111-1307, USA. */ #define __encoding_INCLUDE_GNU #include +#include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ -#include - #define _C_CONST 'r' #define _C_IN 'n' #define _C_INOUT 'N' diff --git a/libobjc/objc/hash.h b/libobjc/objc/hash.h index 91a5eba5781..f56e0c01841 100644 --- a/libobjc/objc/hash.h +++ b/libobjc/objc/hash.h @@ -28,15 +28,14 @@ Boston, MA 02111-1307, USA. */ #ifndef __hash_INCLUDE_GNU #define __hash_INCLUDE_GNU +#include +#include #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ -#include -#include - /* * This data structure is used to hold items * stored in a hash table. Each node holds diff --git a/libobjc/objc/objc-api.h b/libobjc/objc/objc-api.h index de10249f4d0..58df4ea0487 100644 --- a/libobjc/objc/objc-api.h +++ b/libobjc/objc/objc-api.h @@ -31,14 +31,13 @@ Boston, MA 02111-1307, USA. */ #include #include #include +#include +#include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ -#include -#include - /* For functions which return Method_t */ #define METHOD_NULL (Method_t)0 /* Boolean typedefs */ diff --git a/libobjc/objc/runtime.h b/libobjc/objc/runtime.h index 91e16a2c5e2..f9612818c44 100644 --- a/libobjc/objc/runtime.h +++ b/libobjc/objc/runtime.h @@ -26,6 +26,14 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __objc_runtime_INCLUDE_GNU #define __objc_runtime_INCLUDE_GNU +#include /* for varargs and va_list's */ + +#include +#include + +#include /* so noone else will get system versions */ +#include + #include /* core data types */ #include /* runtime api functions */ @@ -38,14 +46,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ extern "C" { #endif /* __cplusplus */ -#include /* for varargs and va_list's */ - -#include -#include - -#include /* so noone else will get system versions */ -#include - 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) */ diff --git a/libobjc/objc/sarray.h b/libobjc/objc/sarray.h index 59ab6ea1fa2..535c6cc5222 100644 --- a/libobjc/objc/sarray.h +++ b/libobjc/objc/sarray.h @@ -30,10 +30,6 @@ Boston, MA 02111-1307, USA. */ #include -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - #define OBJC_SPARSE2 /* 2-level sparse array */ /* #define OBJC_SPARSE3 */ /* 3-level sparse array */ @@ -47,11 +43,20 @@ extern const char* __objc_sparse3_id; #include +#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 /* An unsigned integer of same size as a pointer */ @@ -146,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*); diff --git a/libobjc/objc/typedstream.h b/libobjc/objc/typedstream.h index 826ebe54717..0846d172d13 100644 --- a/libobjc/objc/typedstream.h +++ b/libobjc/objc/typedstream.h @@ -30,12 +30,12 @@ Boston, MA 02111-1307, USA. */ #include #include +#include + #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ -#include - 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*);