about summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/aio.h2
-rw-r--r--include/assert.h4
-rw-r--r--include/ctype.h6
-rw-r--r--include/dirent.h4
-rw-r--r--include/dlfcn.h2
-rw-r--r--include/fcntl.h2
-rw-r--r--include/fnmatch.h2
-rw-r--r--include/glob.h2
-rw-r--r--include/grp.h2
-rw-r--r--include/libio.h2
-rw-r--r--include/locale.h2
-rw-r--r--include/math.h2
-rw-r--r--include/net/if.h2
-rw-r--r--include/netdb.h2
-rw-r--r--include/netinet/in.h2
-rw-r--r--include/pthread.h2
-rw-r--r--include/pwd.h2
-rw-r--r--include/regex.h2
-rw-r--r--include/sched.h2
-rw-r--r--include/search.h2
-rw-r--r--include/setjmp.h4
-rw-r--r--include/signal.h2
-rw-r--r--include/stdio.h8
-rw-r--r--include/stdlib.h10
-rw-r--r--include/string.h4
-rw-r--r--include/stropts.h1
-rw-r--r--include/sys/cdefs.h14
-rw-r--r--include/sys/mman.h2
-rw-r--r--include/sys/msg.h2
-rw-r--r--include/sys/resource.h2
-rw-r--r--include/sys/select.h2
-rw-r--r--include/sys/socket.h2
-rw-r--r--include/sys/stat.h2
-rw-r--r--include/sys/statvfs.h2
-rw-r--r--include/sys/time.h2
-rw-r--r--include/sys/times.h2
-rw-r--r--include/sys/uio.h2
-rw-r--r--include/sys/utsname.h2
-rw-r--r--include/sys/wait.h2
-rw-r--r--include/termios.h2
-rw-r--r--include/time.h6
-rw-r--r--include/uchar.h1
-rw-r--r--include/ulimit.h2
-rw-r--r--include/unistd.h2
-rw-r--r--include/utime.h2
-rw-r--r--include/wchar.h2
-rw-r--r--include/wctype.h4
-rw-r--r--include/wordexp.h2
48 files changed, 115 insertions, 23 deletions
diff --git a/include/aio.h b/include/aio.h
index c81dae9706..90c74f9951 100644
--- a/include/aio.h
+++ b/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/include/assert.h b/include/assert.h
index 573eb404ec..d0d9259ab3 100644
--- a/include/assert.h
+++ b/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/include/ctype.h b/include/ctype.h
index 4b5abda375..6a18039e3f 100644
--- a/include/ctype.h
+++ b/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/include/dirent.h b/include/dirent.h
index 28bf432301..2e88005e00 100644
--- a/include/dirent.h
+++ b/include/dirent.h
@@ -1,6 +1,7 @@
 #ifndef _DIRENT_H
-# include <dirstream.h>
 # include <dirent/dirent.h>
+# ifndef _ISOMAC
+# include <dirstream.h>
 # include <sys/stat.h>
 # include <stdbool.h>
 
@@ -44,5 +45,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/include/dlfcn.h b/include/dlfcn.h
index ae9c886087..a67b2e3251 100644
--- a/include/dlfcn.h
+++ b/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/include/fcntl.h b/include/fcntl.h
index 7afbd1c74c..b645ffc000 100644
--- a/include/fcntl.h
+++ b/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/include/fnmatch.h b/include/fnmatch.h
index 2cdad0a40f..9ef8150eda 100644
--- a/include/fnmatch.h
+++ b/include/fnmatch.h
@@ -2,6 +2,8 @@
 
 #include <posix/fnmatch.h>
 
+#ifndef _ISOMAC
 libc_hidden_proto (fnmatch)
+#endif
 
 #endif
diff --git a/include/glob.h b/include/glob.h
index a0c05977f7..228fe30ca8 100644
--- a/include/glob.h
+++ b/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/include/grp.h b/include/grp.h
index 9fa71eac75..0fb5c9a574 100644
--- a/include/grp.h
+++ b/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/include/libio.h b/include/libio.h
index 633ee51bb7..aca7000f8e 100644
--- a/include/libio.h
+++ b/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/include/locale.h b/include/locale.h
index a296a5f8f6..8091e1dc80 100644
--- a/include/locale.h
+++ b/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/include/math.h b/include/math.h
index 3934880171..2b040c67fd 100644
--- a/include/math.h
+++ b/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/include/net/if.h b/include/net/if.h
index 872ab6da15..1d862260c7 100644
--- a/include/net/if.h
+++ b/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/include/netdb.h b/include/netdb.h
index 0db3579259..3f2ae06451 100644
--- a/include/netdb.h
+++ b/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
@@ -280,5 +281,6 @@ DECLARE_NSS_PROTOTYPES (nis)
 DECLARE_NSS_PROTOTYPES (nisplus)
 
 #undef DECLARE_NSS_PROTOTYPES
+#endif
 
 #endif /* !_NETDB_H */
diff --git a/include/netinet/in.h b/include/netinet/in.h
index 876f1a4369..6fb5c86de9 100644
--- a/include/netinet/in.h
+++ b/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/include/pthread.h b/include/pthread.h
index f8860bdf93..51854f6053 100644
--- a/include/pthread.h
+++ b/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/include/pwd.h b/include/pwd.h
index 465c17c50c..bd7fecc16e 100644
--- a/include/pwd.h
+++ b/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/include/regex.h b/include/regex.h
index a7606c5e0d..fd4beeff3d 100644
--- a/include/regex.h
+++ b/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/include/sched.h b/include/sched.h
index 1eae9f72ff..4f59397090 100644
--- a/include/sched.h
+++ b/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/include/search.h b/include/search.h
index d1f3a92e83..cf9c343708 100644
--- a/include/search.h
+++ b/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/include/setjmp.h b/include/setjmp.h
index 6863f51c11..622bb319f3 100644
--- a/include/setjmp.h
+++ b/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/include/signal.h b/include/signal.h
index 6250d30f77..c43f2abeec 100644
--- a/include/signal.h
+++ b/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/include/stdio.h b/include/stdio.h
index 48aa765e02..bd0209aaac 100644
--- a/include/stdio.h
+++ b/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/include/stdlib.h b/include/stdlib.h
index fc9ef7f5d6..de0b414d86 100644
--- a/include/stdlib.h
+++ b/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/include/string.h b/include/string.h
index 0b49b8fe7c..f1077f66ed 100644
--- a/include/string.h
+++ b/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/include/stropts.h b/include/stropts.h
new file mode 100644
index 0000000000..27ab60ac7f
--- /dev/null
+++ b/include/stropts.h
@@ -0,0 +1 @@
+#include <streams/stropts.h>
diff --git a/include/sys/cdefs.h b/include/sys/cdefs.h
index a2bdf20d93..fa93982af9 100644
--- a/include/sys/cdefs.h
+++ b/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/include/sys/mman.h b/include/sys/mman.h
index a4687b30f7..0a0e4a6533 100644
--- a/include/sys/mman.h
+++ b/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/include/sys/msg.h b/include/sys/msg.h
index 03e17f915e..43ec5b9472 100644
--- a/include/sys/msg.h
+++ b/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/include/sys/resource.h b/include/sys/resource.h
index b4ea1ae592..c35df435a5 100644
--- a/include/sys/resource.h
+++ b/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/include/sys/select.h b/include/sys/select.h
index 2e5901c13d..07bb49b994 100644
--- a/include/sys/select.h
+++ b/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/include/sys/socket.h b/include/sys/socket.h
index d45c99d1cf..2ae3428bdd 100644
--- a/include/sys/socket.h
+++ b/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/include/sys/stat.h b/include/sys/stat.h
index a6cf60f401..7a65d608c5 100644
--- a/include/sys/stat.h
+++ b/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/include/sys/statvfs.h b/include/sys/statvfs.h
index 74ef2db45d..fa3045386d 100644
--- a/include/sys/statvfs.h
+++ b/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/include/sys/time.h b/include/sys/time.h
index a5ec500cde..d5de942ed6 100644
--- a/include/sys/time.h
+++ b/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/include/sys/times.h b/include/sys/times.h
index 6ad39fb8c5..026d140fe1 100644
--- a/include/sys/times.h
+++ b/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/include/sys/uio.h b/include/sys/uio.h
index 1e5d64e47e..0ec9ab09a8 100644
--- a/include/sys/uio.h
+++ b/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/include/sys/utsname.h b/include/sys/utsname.h
index a6b4ceb97e..66a5289638 100644
--- a/include/sys/utsname.h
+++ b/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/include/sys/wait.h b/include/sys/wait.h
index efabd0cc45..2239501614 100644
--- a/include/sys/wait.h
+++ b/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/include/termios.h b/include/termios.h
index 8916f1434f..fad51f8385 100644
--- a/include/termios.h
+++ b/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/include/time.h b/include/time.h
index 0bda094cb4..f056542a10 100644
--- a/include/time.h
+++ b/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/include/uchar.h b/include/uchar.h
new file mode 100644
index 0000000000..f456684706
--- /dev/null
+++ b/include/uchar.h
@@ -0,0 +1 @@
+#include <wcsmbs/uchar.h>
diff --git a/include/ulimit.h b/include/ulimit.h
index d2430fa6a3..dd83faa049 100644
--- a/include/ulimit.h
+++ b/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/include/unistd.h b/include/unistd.h
index 4664dc2852..2e6101b0d0 100644
--- a/include/unistd.h
+++ b/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/include/utime.h b/include/utime.h
index aecd6a14d8..5049251311 100644
--- a/include/utime.h
+++ b/include/utime.h
@@ -2,6 +2,8 @@
 
 #include <io/utime.h>
 
+#ifndef _ISOMAC
 libc_hidden_proto (utime)
+#endif
 
 #endif /* utime.h */
diff --git a/include/wchar.h b/include/wchar.h
index d2f9e0d166..f927a95fdf 100644
--- a/include/wchar.h
+++ b/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/include/wctype.h b/include/wctype.h
index 9833f958dd..a2ee9ff880 100644
--- a/include/wctype.h
+++ b/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/include/wordexp.h b/include/wordexp.h
index 27ae0454c5..33c90c15c0 100644
--- a/include/wordexp.h
+++ b/include/wordexp.h
@@ -2,6 +2,8 @@
 
 #include <posix/wordexp.h>
 
+#ifndef _ISOMAC
 libc_hidden_proto (wordfree)
+#endif
 
 #endif