diff options
author | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2012-03-03 18:18:04 +0000 |
---|---|---|
committer | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2012-03-03 18:18:04 +0000 |
commit | c0102611b1f1bd1ce2a2952e9b74ff33fa02717e (patch) | |
tree | 31177266a6797f3c30d0493619d0f06f3f59afe1 /libc/include | |
parent | 33f3f8954d202664c7c7a224d13ba5a0c14a0e01 (diff) |
Merge changes between r17194 and r17384 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@17385 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/include')
55 files changed, 166 insertions, 30 deletions
diff --git a/libc/include/aio.h b/libc/include/aio.h index c81dae970..90c74f995 100644 --- a/libc/include/aio.h +++ b/libc/include/aio.h @@ -1,6 +1,7 @@ #ifndef _AIO_H #include <rt/aio.h> +#ifndef _ISOMAC /* Now define the internal interfaces. */ extern void __aio_init (const struct aioinit *__init); @@ -8,5 +9,6 @@ extern void __aio_init (const struct aioinit *__init); lio_listio and we do not issue events for each individual list element. */ #define LIO_NO_INDIVIDUAL_EVENT 128 +#endif #endif diff --git a/libc/include/arpa/inet.h b/libc/include/arpa/inet.h index dc4434114..63ece7029 100644 --- a/libc/include/arpa/inet.h +++ b/libc/include/arpa/inet.h @@ -1,5 +1,6 @@ #include <inet/arpa/inet.h> +#ifndef _ISOMAC extern int __inet_aton (const char *__cp, struct in_addr *__inp); libc_hidden_proto (__inet_aton) @@ -8,3 +9,4 @@ libc_hidden_proto (inet_ntop) libc_hidden_proto (inet_pton) libc_hidden_proto (inet_makeaddr) libc_hidden_proto (inet_netof) +#endif diff --git a/libc/include/assert.h b/libc/include/assert.h index 573eb404e..d0d9259ab 100644 --- a/libc/include/assert.h +++ b/libc/include/assert.h @@ -1,5 +1,6 @@ #include <assert/assert.h> +#ifndef _ISOMAC /* This prints an "Assertion failed" message and aborts. In installed assert.h this is only conditionally declared, so it has to be repeated here. */ @@ -19,7 +20,8 @@ extern void __assert_fail_base (const char *fmt, const char *assertion, const char *function) __THROW __attribute__ ((__noreturn__)); -#if !defined NOT_IN_libc || defined IS_IN_rtld +# if !defined NOT_IN_libc || defined IS_IN_rtld hidden_proto (__assert_fail) hidden_proto (__assert_perror_fail) +# endif #endif diff --git a/libc/include/bits/dlfcn.h b/libc/include/bits/dlfcn.h index c31a645bc..47652a11a 100644 --- a/libc/include/bits/dlfcn.h +++ b/libc/include/bits/dlfcn.h @@ -1,3 +1,5 @@ #include_next <bits/dlfcn.h> +#ifndef _ISOMAC libc_hidden_proto (_dl_mcount_wrapper_check) +#endif diff --git a/libc/include/ctype.h b/libc/include/ctype.h index 4b5abda37..6a18039e3 100644 --- a/libc/include/ctype.h +++ b/libc/include/ctype.h @@ -1,5 +1,6 @@ #ifndef _CTYPE_H +#ifndef _ISOMAC /* Initialize ctype locale data. */ extern void __ctype_init (void); libc_hidden_proto (__ctype_init) @@ -46,9 +47,11 @@ __ctype_tolower_loc (void) } # endif /* Not NOT_IN_libc. */ +#endif -# include <ctype/ctype.h> +#include <ctype/ctype.h> +#ifndef _ISOMAC # if !defined __NO_CTYPE && !defined NOT_IN_libc /* The spec says that isdigit must only match the decimal digits. We can check this without a memory access. */ @@ -59,5 +62,6 @@ __ctype_tolower_loc (void) # undef __isdigit_l # define __isdigit_l(c, l) ({ int __c = (c); __c >= '0' && __c <= '9'; }) # endif +#endif #endif /* ctype.h */ diff --git a/libc/include/dirent.h b/libc/include/dirent.h index 28bf43230..8e4823ce7 100644 --- a/libc/include/dirent.h +++ b/libc/include/dirent.h @@ -1,6 +1,9 @@ #ifndef _DIRENT_H -# include <dirstream.h> +# ifndef _ISOMAC +# include <dirstream.h> +# endif # include <dirent/dirent.h> +# ifndef _ISOMAC # include <sys/stat.h> # include <stdbool.h> @@ -44,5 +47,6 @@ extern void __scandir_cancel_handler (void *arg); libc_hidden_proto (rewinddir) libc_hidden_proto (scandirat) libc_hidden_proto (scandirat64) +# endif #endif diff --git a/libc/include/dlfcn.h b/libc/include/dlfcn.h index ae9c88608..a67b2e325 100644 --- a/libc/include/dlfcn.h +++ b/libc/include/dlfcn.h @@ -1,5 +1,6 @@ #ifndef _DLFCN_H #include <dlfcn/dlfcn.h> +#ifndef _ISOMAC #include <link.h> /* For ElfW. */ #include <stdbool.h> @@ -146,5 +147,6 @@ extern void __libc_register_dl_open_hook (struct link_map *map) extern void __libc_register_dlfcn_hook (struct link_map *map) attribute_hidden; #endif +#endif #endif diff --git a/libc/include/fcntl.h b/libc/include/fcntl.h index 7afbd1c74..b645ffc00 100644 --- a/libc/include/fcntl.h +++ b/libc/include/fcntl.h @@ -1,6 +1,7 @@ #ifndef _FCNTL_H #include <io/fcntl.h> +#ifndef _ISOMAC /* Now define the internal interfaces. */ extern int __open64 (const char *__file, int __oflag, ...); libc_hidden_proto (__open64) @@ -44,5 +45,6 @@ extern int __have_atfcts attribute_hidden; #ifdef O_CLOEXEC extern int __have_o_cloexec attribute_hidden; #endif +#endif #endif diff --git a/libc/include/features.h b/libc/include/features.h index 606979eec..201cda665 100644 --- a/libc/include/features.h +++ b/libc/include/features.h @@ -1,5 +1,4 @@ -/* Copyright (C) 1991-1993,1995-2007,2009,2010,2011 - Free Software Foundation, Inc. +/* Copyright (C) 1991-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -337,11 +336,9 @@ # define __USE_FORTIFY_LEVEL 0 #endif -/* Define __STDC_IEC_559__ and other similar macros. */ -#include <bits/predefs.h> - -/* wchar_t uses ISO 10646-1 (2nd ed., published 2000-09-15) / Unicode 3.1. */ -#define __STDC_ISO_10646__ 200009L +/* Get definitions of __STDC_* predefined macros, if the compiler has + not preincluded this header automatically. */ +#include <stdc-predef.h> /* This macro indicates that the installed library is the GNU C Library. For historic reasons the value now is 6 and this will stay from now diff --git a/libc/include/fnmatch.h b/libc/include/fnmatch.h index 2cdad0a40..9ef8150ed 100644 --- a/libc/include/fnmatch.h +++ b/libc/include/fnmatch.h @@ -2,6 +2,8 @@ #include <posix/fnmatch.h> +#ifndef _ISOMAC libc_hidden_proto (fnmatch) +#endif #endif diff --git a/libc/include/glob.h b/libc/include/glob.h index a0c05977f..228fe30ca 100644 --- a/libc/include/glob.h +++ b/libc/include/glob.h @@ -1,6 +1,7 @@ #ifndef _GLOB_H #include <posix/glob.h> +#ifndef _ISOMAC libc_hidden_proto (glob) libc_hidden_proto (glob64) libc_hidden_proto (globfree) @@ -11,5 +12,6 @@ extern int __glob_pattern_p (const char *__pattern, int __quote); extern int __glob64 (const char *__pattern, int __flags, int (*__errfunc) (const char *, int), glob64_t *__pglob); +#endif #endif diff --git a/libc/include/grp.h b/libc/include/grp.h index 9fa71eac7..0fb5c9a57 100644 --- a/libc/include/grp.h +++ b/libc/include/grp.h @@ -1,6 +1,7 @@ #ifndef _GRP_H #include <grp/grp.h> +#ifndef _ISOMAC libc_hidden_proto (setgroups) /* Now define the internal interfaces. */ @@ -60,3 +61,4 @@ DECLARE_NSS_PROTOTYPES (nisplus) #undef DECLARE_NSS_PROTOTYPES #endif +#endif diff --git a/libc/include/langinfo.h b/libc/include/langinfo.h index 37a91c699..d60d7f638 100644 --- a/libc/include/langinfo.h +++ b/libc/include/langinfo.h @@ -2,9 +2,11 @@ #include <locale/langinfo.h> +#ifndef _ISOMAC libc_hidden_proto (nl_langinfo) extern __typeof (nl_langinfo_l) __nl_langinfo_l; libc_hidden_proto (__nl_langinfo_l) +#endif #endif diff --git a/libc/include/libio.h b/libc/include/libio.h index 633ee51bb..aca7000f8 100644 --- a/libc/include/libio.h +++ b/libc/include/libio.h @@ -1,5 +1,6 @@ #include <libio/libio.h> +#ifndef _ISOMAC #ifndef _LIBC_LIBIO_H #define _LIBC_LIBIO_H @@ -22,3 +23,4 @@ libc_hidden_proto (__wuflow) #endif #endif +#endif diff --git a/libc/include/locale.h b/libc/include/locale.h index a296a5f8f..8091e1dc8 100644 --- a/libc/include/locale.h +++ b/libc/include/locale.h @@ -1,6 +1,7 @@ #ifndef _LOCALE_H #include <locale/locale.h> +#ifndef _ISOMAC extern __typeof (uselocale) __uselocale; libc_hidden_proto (setlocale) @@ -22,3 +23,4 @@ extern struct lconv *__localeconv (void); extern const char *__current_locale_name (int category) attribute_hidden; #endif +#endif diff --git a/libc/include/math.h b/libc/include/math.h index 393488017..2b040c67f 100644 --- a/libc/include/math.h +++ b/libc/include/math.h @@ -2,6 +2,7 @@ #include <math/math.h> +#ifndef _ISOMAC /* Now define the internal interfaces. */ extern int __matherr (struct exception *__exc); @@ -36,3 +37,4 @@ extern int __isinf_nsf (float); extern int __isinf_nsl (long double); #endif +#endif diff --git a/libc/include/monetary.h b/libc/include/monetary.h index 98b3dbf29..e6870138f 100644 --- a/libc/include/monetary.h +++ b/libc/include/monetary.h @@ -1,5 +1,7 @@ #include <stdlib/monetary.h> +#ifndef _ISOMAC #include <stdarg.h> extern ssize_t __vstrfmon_l (char *s, size_t maxsize, __locale_t loc, const char *format, va_list ap); +#endif diff --git a/libc/include/net/if.h b/libc/include/net/if.h index 872ab6da1..1d862260c 100644 --- a/libc/include/net/if.h +++ b/libc/include/net/if.h @@ -2,9 +2,11 @@ # include_next <net/if.h> +#ifndef _ISOMAC libc_hidden_proto (if_nametoindex) libc_hidden_proto (if_indextoname) libc_hidden_proto (if_nameindex) libc_hidden_proto (if_freenameindex) +#endif #endif diff --git a/libc/include/netdb.h b/libc/include/netdb.h index 2bc3869fe..e0a63c77f 100644 --- a/libc/include/netdb.h +++ b/libc/include/netdb.h @@ -1,6 +1,7 @@ #ifndef _NETDB_H #include <resolv/netdb.h> +#ifndef _ISOMAC /* Macros for accessing h_errno from inside libc. */ # undef h_errno # ifdef _LIBC_REENTRANT @@ -284,5 +285,6 @@ DECLARE_NSS_PROTOTYPES (nis) DECLARE_NSS_PROTOTYPES (nisplus) #undef DECLARE_NSS_PROTOTYPES +#endif #endif /* !_NETDB_H */ diff --git a/libc/include/netinet/in.h b/libc/include/netinet/in.h index 876f1a436..6fb5c86de 100644 --- a/libc/include/netinet/in.h +++ b/libc/include/netinet/in.h @@ -2,8 +2,10 @@ #include <inet/netinet/in.h> +#ifndef _ISOMAC libc_hidden_proto (bindresvport) libc_hidden_proto (in6addr_loopback) libc_hidden_proto (in6addr_any) +#endif #endif diff --git a/libc/include/pthread.h b/libc/include/pthread.h index f8860bdf9..51854f605 100644 --- a/libc/include/pthread.h +++ b/libc/include/pthread.h @@ -1,4 +1,6 @@ #include_next <pthread.h> +#ifndef _ISOMAC /* This function is called to initialize the pthread library. */ extern void __pthread_initialize (void) __attribute__ ((weak)); +#endif diff --git a/libc/include/pwd.h b/libc/include/pwd.h index 465c17c50..bd7fecc16 100644 --- a/libc/include/pwd.h +++ b/libc/include/pwd.h @@ -1,6 +1,7 @@ #ifndef _PWD_H #include <pwd/pwd.h> +#ifndef _ISOMAC /* Now define the internal interfaces. */ extern int __getpwent_r (struct passwd *__resultbuf, char *__buffer, size_t __buflen, struct passwd **__result) @@ -51,5 +52,6 @@ DECLARE_NSS_PROTOTYPES (nis) DECLARE_NSS_PROTOTYPES (nisplus) #undef DECLARE_NSS_PROTOTYPES +#endif #endif diff --git a/libc/include/regex.h b/libc/include/regex.h index a7606c5e0..fd4beeff3 100644 --- a/libc/include/regex.h +++ b/libc/include/regex.h @@ -1,6 +1,7 @@ #ifndef _REGEX_H #include <posix/regex.h> +#ifndef _ISOMAC /* Document internal interfaces. */ extern reg_syntax_t __re_set_syntax (reg_syntax_t syntax); @@ -41,3 +42,4 @@ extern size_t __regerror (int __errcode, const regex_t *__preg, extern void __regfree (regex_t *__preg); #endif +#endif diff --git a/libc/include/sched.h b/libc/include/sched.h index 1eae9f72f..4f5939709 100644 --- a/libc/include/sched.h +++ b/libc/include/sched.h @@ -1,6 +1,7 @@ #ifndef _SCHED_H #include <posix/sched.h> +#ifndef _ISOMAC /* Now define the internal interfaces. */ extern int __sched_setparam (__pid_t __pid, const struct sched_param *__param); @@ -21,3 +22,4 @@ extern int __clone (int (*__fn) (void *__arg), void *__child_stack, extern int __clone2 (int (*__fn) (void *__arg), void *__child_stack_base, size_t __child_stack_size, int __flags, void *__arg, ...); #endif +#endif diff --git a/libc/include/search.h b/libc/include/search.h index d1f3a92e8..cf9c34370 100644 --- a/libc/include/search.h +++ b/libc/include/search.h @@ -1,6 +1,7 @@ #ifndef _SEARCH_H #include <misc/search.h> +#ifndef _ISOMAC libc_hidden_proto (hcreate_r) libc_hidden_proto (hdestroy_r) libc_hidden_proto (hsearch_r) @@ -17,3 +18,4 @@ extern void *__tdelete (const void *__key, void **__rootp, extern void __twalk (const void *__root, __action_fn_t action); extern void __tdestroy (void *__root, __free_fn_t freefct); #endif +#endif diff --git a/libc/include/setjmp.h b/libc/include/setjmp.h index 6863f51c1..622bb319f 100644 --- a/libc/include/setjmp.h +++ b/libc/include/setjmp.h @@ -1,6 +1,7 @@ #ifndef _SETJMP_H #include <setjmp/setjmp.h> +#ifndef _ISOMAC /* Now define the internal interfaces. */ /* Internal machine-dependent function to restore context sans signal mask. */ @@ -16,12 +17,13 @@ extern int __sigjmp_save (jmp_buf __env, int __savemask); extern void _longjmp_unwind (jmp_buf env, int val); extern void __libc_siglongjmp (sigjmp_buf env, int val) - __attribute__ ((noreturn)); + __attribute__ ((noreturn)); extern void __libc_longjmp (sigjmp_buf env, int val) __attribute__ ((noreturn)); libc_hidden_proto (__libc_longjmp) libc_hidden_proto (_setjmp) libc_hidden_proto (__sigsetjmp) +#endif #endif diff --git a/libc/include/signal.h b/libc/include/signal.h index 6250d30f7..c43f2abee 100644 --- a/libc/include/signal.h +++ b/libc/include/signal.h @@ -4,6 +4,7 @@ #else # include <signal/signal.h> +# ifndef _ISOMAC libc_hidden_proto (sigemptyset) libc_hidden_proto (sigfillset) libc_hidden_proto (sigaddset) @@ -58,5 +59,6 @@ extern int __xpg_sigpause (int sig); /* Allocate real-time signal with highest/lowest available priority. */ extern int __libc_allocate_rtsig (int __high); +# endif #endif #endif diff --git a/libc/include/stdc-predef.h b/libc/include/stdc-predef.h new file mode 100644 index 000000000..c2896edda --- /dev/null +++ b/libc/include/stdc-predef.h @@ -0,0 +1,35 @@ +/* Copyright (C) 1991-2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _STDC_PREDEF_H +#define _STDC_PREDEF_H 1 + +/* This header is separate from features.h so that the compiler can + include it implicitly at the start of every compilation. It must + not itself include <features.h> or any other header that includes + <features.h> because the implicit include comes before any feature + test macros that may be defined in a source file before it first + explicitly includes a system header. GCC knows the name of this + header in order to preinclude it. */ + +/* Define __STDC_IEC_559__ and other similar macros. */ +#include <bits/predefs.h> + +/* wchar_t uses ISO 10646-1 (2nd ed., published 2000-09-15) / Unicode 3.1. */ +#define __STDC_ISO_10646__ 200009L + +#endif diff --git a/libc/include/stdio.h b/libc/include/stdio.h index 48aa765e0..bd0209aaa 100644 --- a/libc/include/stdio.h +++ b/libc/include/stdio.h @@ -1,5 +1,5 @@ #ifndef _STDIO_H -# if defined __need_FILE || defined __need___FILE +# if defined __need_FILE || defined __need___FILE || defined _ISOMAC # include <libio/stdio.h> # else # include <libio/stdio.h> @@ -29,7 +29,7 @@ extern int __vsscanf (const char *__restrict __s, _G_va_list __arg) __attribute__ ((__format__ (__scanf__, 2, 0))); -#ifndef __cplusplus +# ifndef __cplusplus extern int __sprintf_chk (char *, int, size_t, const char *, ...) __THROW; extern int __snprintf_chk (char *, size_t, int, size_t, const char *, ...) __THROW; @@ -51,7 +51,7 @@ extern int __obstack_printf_chk (struct obstack *, int, const char *, ...) __THROW; extern int __obstack_vprintf_chk (struct obstack *, int, const char *, _G_va_list) __THROW; -#endif +# endif extern int __isoc99_fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __wur; @@ -119,7 +119,7 @@ extern int _sys_nerr_internal attribute_hidden; extern int __asprintf_internal (char **__restrict __ptr, const char *__restrict __fmt, ...) attribute_hidden __attribute__ ((__format__ (__printf__, 2, 3))); -# if !defined NOT_IN_libc && !defined _ISOMAC +# if !defined NOT_IN_libc # define __asprintf(ptr, fmt, args...) \ INTUSE(__asprintf) (ptr, fmt, ##args) diff --git a/libc/include/stdlib.h b/libc/include/stdlib.h index fc9ef7f5d..de0b414d8 100644 --- a/libc/include/stdlib.h +++ b/libc/include/stdlib.h @@ -4,14 +4,14 @@ #define __Need_M_And_C #endif -#include <stddef.h> +#ifndef _ISOMAC +# include <stddef.h> +#endif #include <stdlib/stdlib.h> /* Now define the internal interfaces. */ -#ifndef __Need_M_And_C -# ifndef _ISOMAC -# include <sys/stat.h> -# endif +#if !defined __Need_M_And_C && !defined _ISOMAC +# include <sys/stat.h> __BEGIN_DECLS diff --git a/libc/include/string.h b/libc/include/string.h index 0b49b8fe7..f1077f66e 100644 --- a/libc/include/string.h +++ b/libc/include/string.h @@ -1,5 +1,6 @@ #ifndef _STRING_H +#ifndef _ISOMAC #include <sys/types.h> extern void *__memccpy (void *__dest, const void *__src, @@ -43,11 +44,13 @@ extern void *__memchr (const void *__s, int __c, size_t __n) extern int __ffs (int __i) __attribute__ ((const)); extern char *__strerror_r (int __errnum, char *__buf, size_t __buflen); +#endif /* Now the real definitions. We do this here since some of the functions above are defined as macros in the headers. */ #include <string/string.h> +#ifndef _ISOMAC extern __typeof (strcoll_l) __strcoll_l; extern __typeof (strxfrm_l) __strxfrm_l; extern __typeof (strcasecmp_l) __strcasecmp_l; @@ -142,5 +145,6 @@ extern char *__strcat_chk (char *__restrict __dest, extern char *__strncat_chk (char *__restrict __dest, const char *__restrict __src, size_t __len, size_t __destlen) __THROW; +#endif #endif diff --git a/libc/include/stropts.h b/libc/include/stropts.h new file mode 100644 index 000000000..27ab60ac7 --- /dev/null +++ b/libc/include/stropts.h @@ -0,0 +1 @@ +#include <streams/stropts.h> diff --git a/libc/include/sys/cdefs.h b/libc/include/sys/cdefs.h index a2bdf20d9..fa93982af 100644 --- a/libc/include/sys/cdefs.h +++ b/libc/include/sys/cdefs.h @@ -2,21 +2,23 @@ #include <misc/sys/cdefs.h> +#ifndef _ISOMAC /* The compiler will optimize based on the knowledge the parameter is not NULL. This will omit tests. A robust implementation cannot allow this so when compiling glibc itself we ignore this attribute. */ -#undef __nonnull -#define __nonnull(params) +# undef __nonnull +# define __nonnull(params) extern void __chk_fail (void) __attribute__ ((__noreturn__)); libc_hidden_proto (__chk_fail) rtld_hidden_proto (__chk_fail) -#if __GNUC_PREREQ (4,3) -# define __attribute_alloc_size(...) __attribute__ ((alloc_size (__VA_ARGS__))) -#else -# define __attribute_alloc_size(...) +# if __GNUC_PREREQ (4,3) +# define __attribute_alloc_size(...) __attribute__ ((alloc_size (__VA_ARGS__))) +# else +# define __attribute_alloc_size(...) +# endif #endif #endif diff --git a/libc/include/sys/mman.h b/libc/include/sys/mman.h index a4687b30f..0a0e4a653 100644 --- a/libc/include/sys/mman.h +++ b/libc/include/sys/mman.h @@ -1,6 +1,7 @@ #ifndef _SYS_MMAN_H #include <misc/sys/mman.h> +#ifndef _ISOMAC /* Now define the internal interfaces. */ extern void *__mmap (void *__addr, size_t __len, int __prot, int __flags, int __fd, __off_t __offset); @@ -14,5 +15,6 @@ extern void *__mremap (void *__addr, size_t __old_len, size_t __new_len, int __flags, ...); libc_hidden_proto (madvise); +#endif #endif diff --git a/libc/include/sys/msg.h b/libc/include/sys/msg.h index 03e17f915..43ec5b947 100644 --- a/libc/include/sys/msg.h +++ b/libc/include/sys/msg.h @@ -1,9 +1,11 @@ #ifndef _SYS_MSG_H #include <sysvipc/sys/msg.h> +#ifndef _ISOMAC extern ssize_t __libc_msgrcv (int msqid, void *msgp, size_t msgsz, long int msgtyp, int msgflg); extern int __libc_msgsnd (int msqid, const void *msgp, size_t msgsz, int msgflg); +#endif #endif diff --git a/libc/include/sys/poll.h b/libc/include/sys/poll.h index 4285eee55..a42bc9387 100644 --- a/libc/include/sys/poll.h +++ b/libc/include/sys/poll.h @@ -1,9 +1,11 @@ #ifndef _SYS_POLL_H # include <io/sys/poll.h> +#ifndef _ISOMAC extern int __poll (struct pollfd *__fds, unsigned long int __nfds, int __timeout); libc_hidden_proto (__poll) libc_hidden_proto (ppoll) +#endif #endif diff --git a/libc/include/sys/resource.h b/libc/include/sys/resource.h index b4ea1ae59..c35df435a 100644 --- a/libc/include/sys/resource.h +++ b/libc/include/sys/resource.h @@ -1,6 +1,7 @@ #ifndef _SYS_RESOURCE_H #include <resource/sys/resource.h> +#ifndef _ISOMAC libc_hidden_proto (getpriority) libc_hidden_proto (setpriority) libc_hidden_proto (getrlimit64) @@ -14,3 +15,4 @@ extern int __getrusage (enum __rusage_who __who, struct rusage *__usage) extern int __setrlimit (enum __rlimit_resource __resource, const struct rlimit *__rlimits); #endif +#endif diff --git a/libc/include/sys/select.h b/libc/include/sys/select.h index 2e5901c13..07bb49b99 100644 --- a/libc/include/sys/select.h +++ b/libc/include/sys/select.h @@ -1,6 +1,7 @@ #ifndef _SYS_SELECT_H #include <misc/sys/select.h> +#ifndef _ISOMAC /* Now define the internal interfaces. */ extern int __pselect (int __nfds, fd_set *__readfds, fd_set *__writefds, fd_set *__exceptfds, @@ -14,3 +15,4 @@ extern int __select (int __nfds, fd_set *__restrict __readfds, libc_hidden_proto (__select) #endif +#endif diff --git a/libc/include/sys/socket.h b/libc/include/sys/socket.h index d45c99d1c..2ae3428bd 100644 --- a/libc/include/sys/socket.h +++ b/libc/include/sys/socket.h @@ -1,6 +1,7 @@ #ifndef _SYS_SOCKET_H #include <socket/sys/socket.h> +#ifndef _ISOMAC /* Now define the internal interfaces. */ /* Create a new socket of type TYPE in domain DOMAIN, using @@ -162,3 +163,4 @@ extern int __have_sock_cloexec; #endif #endif +#endif diff --git a/libc/include/sys/stat.h b/libc/include/sys/stat.h index a6cf60f40..7a65d608c 100644 --- a/libc/include/sys/stat.h +++ b/libc/include/sys/stat.h @@ -1,6 +1,7 @@ #ifndef _SYS_STAT_H #include <io/sys/stat.h> +#ifndef _ISOMAC /* Now define the internal interfaces. */ extern int __stat (const char *__file, struct stat *__buf); extern int __fstat (int __fd, struct stat *__buf); @@ -55,3 +56,4 @@ libc_hidden_proto (__fxstatat64) #define __fstatat64(dfd, fname, buf, flag) \ __fxstatat64 (_STAT_VER, dfd, fname, buf, flag) #endif +#endif diff --git a/libc/include/sys/statvfs.h b/libc/include/sys/statvfs.h index 74ef2db45..fa3045386 100644 --- a/libc/include/sys/statvfs.h +++ b/libc/include/sys/statvfs.h @@ -1,6 +1,7 @@ #ifndef _SYS_STATVFS_H #include <io/sys/statvfs.h> +#ifndef _ISOMAC /* Now define the internal interfaces. */ extern int __statvfs64 (const char *__file, struct statvfs64 *__buf); extern int __fstatvfs64 (int __fildes, struct statvfs64 *__buf); @@ -8,3 +9,4 @@ extern int __fstatvfs64 (int __fildes, struct statvfs64 *__buf); libc_hidden_proto (statvfs) libc_hidden_proto (fstatvfs) #endif +#endif diff --git a/libc/include/sys/time.h b/libc/include/sys/time.h index a5ec500cd..d5de942ed 100644 --- a/libc/include/sys/time.h +++ b/libc/include/sys/time.h @@ -1,6 +1,7 @@ #ifndef _SYS_TIME_H #include <time/sys/time.h> +#ifndef _ISOMAC /* Now document the internal interfaces. */ extern int __gettimeofday (struct timeval *__tv, struct timezone *__tz); @@ -27,3 +28,4 @@ extern int __futimes (int fd, const struct timeval tvp[2]) attribute_hidden; #endif #endif +#endif diff --git a/libc/include/sys/times.h b/libc/include/sys/times.h index 6ad39fb8c..026d140fe 100644 --- a/libc/include/sys/times.h +++ b/libc/include/sys/times.h @@ -1,6 +1,8 @@ #ifndef _SYS_TIMES_H #include <posix/sys/times.h> +#ifndef _ISOMAC /* Now define the internal interfaces. */ extern clock_t __times (struct tms *__buffer); #endif +#endif diff --git a/libc/include/sys/uio.h b/libc/include/sys/uio.h index 1e5d64e47..0ec9ab09a 100644 --- a/libc/include/sys/uio.h +++ b/libc/include/sys/uio.h @@ -1,6 +1,7 @@ #ifndef _SYS_UIO_H #include <misc/sys/uio.h> +#ifndef _ISOMAC /* Now define the internal interfaces. */ extern ssize_t __readv (int __fd, const struct iovec *__vector, int __count); @@ -11,3 +12,4 @@ extern ssize_t __writev (int __fd, const struct iovec *__vector, extern ssize_t __libc_writev (int __fd, const struct iovec *__vector, int __count); #endif +#endif diff --git a/libc/include/sys/utsname.h b/libc/include/sys/utsname.h index a6b4ceb97..66a528963 100644 --- a/libc/include/sys/utsname.h +++ b/libc/include/sys/utsname.h @@ -1,8 +1,10 @@ #ifndef _SYS_UTSNAME_H #include <posix/sys/utsname.h> +#ifndef _ISOMAC extern int __uname (struct utsname *__name); libc_hidden_proto (uname) libc_hidden_proto (__uname) #endif +#endif diff --git a/libc/include/sys/wait.h b/libc/include/sys/wait.h index efabd0cc4..223950161 100644 --- a/libc/include/sys/wait.h +++ b/libc/include/sys/wait.h @@ -1,6 +1,7 @@ #ifndef _SYS_WAIT_H #include <posix/sys/wait.h> +#ifndef _ISOMAC /* Now define the internal interfaces. */ extern __pid_t __waitpid (__pid_t __pid, int *__stat_loc, int __options); @@ -16,3 +17,4 @@ extern __pid_t __wait4 (__pid_t __pid, __WAIT_STATUS __stat_loc, int __options, struct rusage *__usage) attribute_hidden; #endif +#endif diff --git a/libc/include/termios.h b/libc/include/termios.h index 8916f1434..fad51f838 100644 --- a/libc/include/termios.h +++ b/libc/include/termios.h @@ -1,6 +1,7 @@ #ifndef _TERMIOS_H #include <termios/termios.h> +#ifndef _ISOMAC /* Now define the internal interfaces. */ extern int __tcgetattr (int __fd, struct termios *__termios_p); @@ -11,3 +12,4 @@ libc_hidden_proto (cfsetispeed) libc_hidden_proto (cfsetospeed) #endif +#endif diff --git a/libc/include/time.h b/libc/include/time.h index 0bda094cb..f056542a1 100644 --- a/libc/include/time.h +++ b/libc/include/time.h @@ -1,5 +1,5 @@ #ifndef _TIME_H -#if defined __need_time_t || defined __need_clock_t || defined __need_timespec +#if defined __need_time_t || defined __need_clock_t || defined __need_timespec || defined _ISOMAC # include <time/time.h> #else # include <time/time.h> @@ -106,9 +106,7 @@ extern double __difftime (time_t time1, time_t time0); /* Use in the clock_* functions. Size of the field representing the actual clock ID. */ -#ifndef _ISOMAC -# define CLOCK_IDFIELD_SIZE 3 -#endif +#define CLOCK_IDFIELD_SIZE 3 __END_DECLS diff --git a/libc/include/uchar.h b/libc/include/uchar.h new file mode 100644 index 000000000..f45668470 --- /dev/null +++ b/libc/include/uchar.h @@ -0,0 +1 @@ +#include <wcsmbs/uchar.h> diff --git a/libc/include/ulimit.h b/libc/include/ulimit.h index d2430fa6a..dd83faa04 100644 --- a/libc/include/ulimit.h +++ b/libc/include/ulimit.h @@ -1,6 +1,8 @@ #ifndef _ULIMIT_H #include <resource/ulimit.h> +#ifndef _ISOMAC /* Now define the internal interfaces. */ extern long int __ulimit (int __cmd, ...); #endif +#endif diff --git a/libc/include/unistd.h b/libc/include/unistd.h index 4664dc285..2e6101b0d 100644 --- a/libc/include/unistd.h +++ b/libc/include/unistd.h @@ -1,6 +1,7 @@ #ifndef _UNISTD_H # include <posix/unistd.h> +# ifndef _ISOMAC __BEGIN_DECLS libc_hidden_proto (_exit, __noreturn__) @@ -182,5 +183,6 @@ extern int __getlogin_r_loginuid (char *name, size_t namesize) attribute_hidden; __END_DECLS +# endif #endif diff --git a/libc/include/utime.h b/libc/include/utime.h index aecd6a14d..504925131 100644 --- a/libc/include/utime.h +++ b/libc/include/utime.h @@ -2,6 +2,8 @@ #include <io/utime.h> +#ifndef _ISOMAC libc_hidden_proto (utime) +#endif #endif /* utime.h */ diff --git a/libc/include/wchar.h b/libc/include/wchar.h index d2f9e0d16..f927a95fd 100644 --- a/libc/include/wchar.h +++ b/libc/include/wchar.h @@ -1,6 +1,7 @@ #ifndef _WCHAR_H #include <wcsmbs/wchar.h> +# ifndef _ISOMAC # ifdef _WCHAR_H extern __typeof (wcscasecmp_l) __wcscasecmp_l; @@ -194,6 +195,7 @@ extern size_t __mbsrtowcs_l (wchar_t *dst, const char **src, size_t len, # define __mbsinit(state) ((state)->__count == 0) # endif +# endif #endif /* Undefine all __need_* constants in case we are included to get those diff --git a/libc/include/wctype.h b/libc/include/wctype.h index 9833f958d..a2ee9ff88 100644 --- a/libc/include/wctype.h +++ b/libc/include/wctype.h @@ -1,5 +1,6 @@ #ifndef _WCTYPE_H +#ifndef _ISOMAC /* We try to get wint_t from <stddef.h>, but not all GCC versions define it there. So define it ourselves if it remains undefined. */ # define __need_wint_t @@ -33,9 +34,11 @@ libc_hidden_proto (iswspace) libc_hidden_proto (iswxdigit) libc_hidden_proto (towlower) libc_hidden_proto (towupper) +#endif #include <wctype/wctype.h> +#ifndef _ISOMAC /* Internal interfaces. */ extern int __iswalpha_l_internal (wint_t __wc, __locale_t __locale) attribute_hidden; @@ -96,3 +99,4 @@ libc_hidden_proto (__towupper_l) # endif #endif +#endif diff --git a/libc/include/wordexp.h b/libc/include/wordexp.h index 27ae0454c..33c90c15c 100644 --- a/libc/include/wordexp.h +++ b/libc/include/wordexp.h @@ -2,6 +2,8 @@ #include <posix/wordexp.h> +#ifndef _ISOMAC libc_hidden_proto (wordfree) +#endif #endif |