summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-08-09 17:39:48 +0000
committerUlrich Drepper <drepper@redhat.com>1998-08-09 17:39:48 +0000
commitbdbf022df8d6df07ae7c69b7e386278e27804e58 (patch)
tree0022dc1ab91d8469229566153fabe35c9b6c8978 /include
parentcf0fd0161c73af42b7755043fa9a2a0ac0177a08 (diff)
downloadglibc-bdbf022df8d6df07ae7c69b7e386278e27804e58.tar.gz
glibc-bdbf022df8d6df07ae7c69b7e386278e27804e58.tar.xz
glibc-bdbf022df8d6df07ae7c69b7e386278e27804e58.zip
Update.
1998-08-09 09:40  Ulrich Drepper  <drepper@cygnus.com>

	* nss/nss_files/files-XXX.c (internal_getent): In case of an read
	error do not trust errno value, set it to ENOENT.

	* db2/db_185.h: Move __ prototypes into include/* header.
	* dirent/dirent.h: Likewise.
	* elf/dlfcn.h: Likewise.
	* gmon/sys/gmon.h: Likewise.
	* grp/grp.h: Likewise.
	* intl/libintl.h: Likewise.
	* io/fcntl.h: Likewise.
	* io/sys/stat.h: Likewise.
	* io/sys/statfs.h: Likewise.
	* io/sys/statvfs.h: Likewise.
	* libio/stdio.h: Likewise.
	* login/utmp.h: Likewise.
	* misc/mntent.h: Likewise.
	* misc/search.h: Likewise.
	* misc/sys/file.h: Likewise.
	* misc/sys/ioctl.h: Likewise.
	* misc/sys/select.h: Likewise.
	* misc/sys/uio.h: Likewise.
	* misc/sys/ustat.h: Likewise.
	* posix/unistd.h: Likewise.
	* posix/sys/times.h: Likewise.
	* posix/sys/wait.h: Likewise.
	* pwd/pwd.h: Likewise.
	* resource/ulimit.h: Likewise.
	* resource/sys/resource.h: Likewise.
	* setjmp/setjmp.h: Likewise.
	* shadow/shadow.h: Likewise.
	* signal/signal.h: Likewise.
	* socket/sys/socket.h: Likewise.
	* stdlib/alloca.h: Likewise.
	* stdlib/stdlib.h: Likewise.
	* string/string.h: Likewise.
	* sysdeps/generic/sys/mman.h: Likewise.
	* sysdeps/unix/bsd/osf/sys/mman.h: Likewise.
	* sysdeps/unix/bsd/sun/sunos4/sys/mman.h: Likewise.
	* sysdeps/unix/bsd/ultrix4/sys/mman.h: Likewise.
	* sysdeps/unix/sysv/irix4/sys/mman.h: Likewise.
	* sysdeps/unix/sysv/linux/bits/sched.h: Likewise.
	* sysdeps/unix/sysv/linux/sys/mman.h: Likewise.
	* termios/termios.h: Likewise.
	* time/time.h: Likewise.
	* time/sys/time.h: Likewise.
	* wcsmbs/wchar.h: Likewise.

	* include/alloca.h: Add __ prototypes here.
	* include/db_185.h: Likewise.
	* include/dirent.h: Likewise.
	* include/dlfcn.h: Likewise.
	* include/fcntl.h: Likewise.
	* include/grp.h: Likewise.
	* include/libintl.h: Likewise.
	* include/mntent.h: Likewise.
	* include/pwd.h: Likewise.
	* include/sched.h: Likewise.
	* include/search.h: Likewise.
	* include/setjmp.h: Likewise.
	* include/shadow.h: Likewise.
	* include/signal.h: Likewise.
	* include/stdio.h: Likewise.
	* include/stdlib.h: Likewise.
	* include/string.h: Likewise.
	* include/termios.h: Likewise.
	* include/time.h: Likewise.
	* include/ulimit.h: Likewise.
	* include/unistd.h: Likewise.
	* include/utmp.h: Likewise.
	* include/wchar.h: Likewise.
	* include/sys/file.h: Likewise.
	* include/sys/gmon.h: Likewise.
	* include/sys/ioctl.h: Likewise.
	* include/sys/mman.h: Likewise.
	* include/sys/resource.h: Likewise.
	* include/sys/select.h: Likewise.
	* include/sys/socket.h: Likewise.
	* include/sys/stat.h: Likewise.
	* include/sys/statfs.h: Likewise.
	* include/sys/time.h: Likewise.
	* include/sys/times.h: Likewise.
	* include/sys/uio.h: Likewise.
	* include/sys/wait.h: Likewise.

	* Makeconfig (+includes): Search in $(..)include first.

	* io/fstat.c: Undefine __fstat.
	* io/lstat.c: Undefine __lstat.

	* wcsmbs/Versions: Add __mbrlen.
Diffstat (limited to 'include')
-rw-r--r--include/alloca.h9
-rw-r--r--include/db_185.h3
-rw-r--r--include/dirent.h10
-rw-r--r--include/dlfcn.h4
-rw-r--r--include/fcntl.h3
-rw-r--r--include/grp.h7
-rw-r--r--include/libintl.h6
-rw-r--r--include/mntent.h10
-rw-r--r--include/pwd.h13
-rw-r--r--include/sched.h6
-rw-r--r--include/search.h11
-rw-r--r--include/setjmp.h12
-rw-r--r--include/shadow.h15
-rw-r--r--include/signal.h26
-rw-r--r--include/stdio.h22
-rw-r--r--include/stdlib.h40
-rw-r--r--include/string.h7
-rw-r--r--include/sys/file.h3
-rw-r--r--include/sys/gmon.h6
-rw-r--r--include/sys/ioctl.h3
-rw-r--r--include/sys/mman.h13
-rw-r--r--include/sys/resource.h5
-rw-r--r--include/sys/select.h5
-rw-r--r--include/sys/socket.h3
-rw-r--r--include/sys/stat.h32
-rw-r--r--include/sys/statfs.h4
-rw-r--r--include/sys/time.h12
-rw-r--r--include/sys/times.h3
-rw-r--r--include/sys/uio.h8
-rw-r--r--include/sys/wait.h8
-rw-r--r--include/termios.h3
-rw-r--r--include/time.h38
-rw-r--r--include/ulimit.h3
-rw-r--r--include/unistd.h62
-rw-r--r--include/utmp.h16
-rw-r--r--include/wchar.h29
36 files changed, 457 insertions, 3 deletions
diff --git a/include/alloca.h b/include/alloca.h
index 34eeeab78e..ae41090bd1 100644
--- a/include/alloca.h
+++ b/include/alloca.h
@@ -1 +1,10 @@
 #include <stdlib/alloca.h>
+
+#undef	__alloca
+
+/* Now define the internal interfaces.  */
+extern __ptr_t __alloca __P ((size_t __size));
+
+#ifdef	__GNUC__
+# define __alloca(size)	__builtin_alloca (size)
+#endif /* GCC.  */
diff --git a/include/db_185.h b/include/db_185.h
index d303a1ce50..db78199865 100644
--- a/include/db_185.h
+++ b/include/db_185.h
@@ -1 +1,4 @@
 #include <db2/db_185.h>
+
+/* Now define the internal interfaces.  */
+DB *__dbopen __P((const char *, int, int, DBTYPE, const void *));
diff --git a/include/dirent.h b/include/dirent.h
index f59a6b778b..594d90d89f 100644
--- a/include/dirent.h
+++ b/include/dirent.h
@@ -1 +1,11 @@
 #include <dirent/dirent.h>
+
+/* Now define the internal interfaces.  */
+extern DIR *__opendir __P ((__const char *__name));
+extern int __closedir __P ((DIR *__dirp));
+extern struct dirent *__readdir __P ((DIR *__dirp));
+extern struct dirent64 *__readdir64 __P ((DIR *__dirp));
+extern int __readdir_r __P ((DIR *__dirp, struct dirent *__entry,
+			     struct dirent **__result));
+extern __ssize_t __getdirentries __P ((int __fd, char *__buf,
+				       size_t __nbytes, __off_t *__basep));
diff --git a/include/dlfcn.h b/include/dlfcn.h
index 92804a1c1c..766c80a11a 100644
--- a/include/dlfcn.h
+++ b/include/dlfcn.h
@@ -1 +1,5 @@
 #include <elf/dlfcn.h>
+
+/* Now define the internal interfaces.  */
+extern void *__dlvsym __P ((void *__handle, __const char *__name,
+			    __const char *__version));
diff --git a/include/fcntl.h b/include/fcntl.h
index bac1e8685d..cce3d5ee10 100644
--- a/include/fcntl.h
+++ b/include/fcntl.h
@@ -1 +1,4 @@
 #include <io/fcntl.h>
+
+/* Now define the internal interfaces.  */
+extern int __open64 __P ((__const char *__file, int __oflag, ...));
diff --git a/include/grp.h b/include/grp.h
index 250092cbf1..ddde842fe6 100644
--- a/include/grp.h
+++ b/include/grp.h
@@ -1 +1,8 @@
 #include <grp/grp.h>
+
+/* Now define the internal interfaces.  */
+extern int __getgrent_r __P ((struct group *__resultbuf, char *buffer,
+			      size_t __buflen, struct group **__result));
+extern int __fgetgrent_r __P ((FILE * __stream, struct group *__resultbuf,
+			       char *buffer, size_t __buflen,
+			       struct group **__result));
diff --git a/include/libintl.h b/include/libintl.h
index be1062ca03..582cb05d74 100644
--- a/include/libintl.h
+++ b/include/libintl.h
@@ -1 +1,7 @@
 #include <intl/libintl.h>
+
+/* Now define the internal interfaces.  */
+extern char *__gettext __P ((__const char *__msgid));
+extern char *__textdomain __P ((__const char *__domainname));
+extern char *__bindtextdomain __P ((__const char *__domainname,
+				    __const char *__dirname));
diff --git a/include/mntent.h b/include/mntent.h
index 87a6fb9f2c..d869625607 100644
--- a/include/mntent.h
+++ b/include/mntent.h
@@ -1 +1,11 @@
 #include <misc/mntent.h>
+
+/* Now define the internal interfaces.  */
+extern FILE *__setmntent __P ((__const char *__file, __const char *__mode));
+extern struct mntent *__getmntent_r __P ((FILE *__stream,
+					  struct mntent *__result,
+					  char *__buffer, int __bufsize));
+extern int __addmntent __P ((FILE *__stream, __const struct mntent *__mnt));
+extern int __endmntent __P ((FILE *__stream));
+extern char *__hasmntopt __P ((__const struct mntent *__mnt,
+			       __const char *__opt));
diff --git a/include/pwd.h b/include/pwd.h
index 28d59a6a0a..2c57df938f 100644
--- a/include/pwd.h
+++ b/include/pwd.h
@@ -1 +1,14 @@
 #include <pwd/pwd.h>
+
+/* Now define the internal interfaces.  */
+extern int __getpwent_r __P ((struct passwd *__resultbuf, char *__buffer,
+			      size_t __buflen, struct passwd **__result));
+extern int __getpwuid_r __P ((__uid_t __uid, struct passwd *__resultbuf,
+			      char *__buffer, size_t __buflen,
+			      struct passwd **__result));
+extern int __getpwnam_r __P ((__const char *__name, struct passwd *__resultbuf,
+			      char *__buffer, size_t __buflen,
+			      struct passwd **__result));
+extern int __fgetpwent_r __P ((FILE * __stream, struct passwd *__resultbuf,
+			       char *__buffer, size_t __buflen,
+			       struct passwd **__result));
diff --git a/include/sched.h b/include/sched.h
index b9bebc9dee..02dc60a872 100644
--- a/include/sched.h
+++ b/include/sched.h
@@ -1 +1,7 @@
 #include "posix/sched.h"
+
+/* Now define the internal interfaces.  */
+
+/* This is Linux specific.  */
+extern int __clone __P ((int (*__fn) (void *__arg), void *__child_stack,
+			 int __flags, void *__arg));
diff --git a/include/search.h b/include/search.h
index ff24508172..05dc75aee9 100644
--- a/include/search.h
+++ b/include/search.h
@@ -1 +1,12 @@
 #include <misc/search.h>
+
+/* Now define the internal interfaces.  */
+extern void __hdestroy __P ((void));
+extern void *__tsearch __PMT ((__const void *__key, void **__rootp,
+			       __compar_fn_t compar));
+extern void *__tfind __PMT ((__const void *__key, void *__const *__rootp,
+			     __compar_fn_t compar));
+extern void *__tdelete __PMT ((__const void *__key, void **__rootp,
+			       __compar_fn_t compar));
+extern void __twalk __PMT ((__const void *__root, __action_fn_t action));
+extern void __tdestroy __PMT ((void *__root, __free_fn_t freefct));
diff --git a/include/setjmp.h b/include/setjmp.h
index c78a964566..34fc9e5f69 100644
--- a/include/setjmp.h
+++ b/include/setjmp.h
@@ -1 +1,13 @@
 #include <setjmp/setjmp.h>
+
+/* Now define the internal interfaces.  */
+
+/* Internal machine-dependent function to restore context sans signal mask.  */
+extern void __longjmp __P ((__jmp_buf __env, int __val))
+     __attribute__ ((__noreturn__));
+
+/* Internal function to possibly save the current mask of blocked signals
+   in ENV, and always set the flag saying whether or not it was saved.
+   This is used by the machine-dependent definition of `__sigsetjmp'.
+   Always returns zero, for convenience.  */
+extern int __sigjmp_save __P ((jmp_buf __env, int __savemask));
diff --git a/include/shadow.h b/include/shadow.h
index 4848197be1..5e7f943bc0 100644
--- a/include/shadow.h
+++ b/include/shadow.h
@@ -1 +1,16 @@
 #include <shadow/shadow.h>
+
+/* Now define the internal interfaces.  */
+extern int __getspent_r __P ((struct spwd *__result_buf, char *__buffer,
+			      size_t __buflen, struct spwd **__result));
+extern int __getspnam_r __P ((__const char *__name, struct spwd *__result_buf,
+			      char *__buffer, size_t __buflen,
+			      struct spwd **__result));
+extern int __sgetspent_r __P ((__const char *__string,
+			       struct spwd *__result_buf, char *__buffer,
+			       size_t __buflen, struct spwd **__result));
+extern int __fgetspent_r __P ((FILE *__stream, struct spwd *__result_buf,
+			       char *__buffer, size_t __buflen,
+			       struct spwd **__result));
+extern int __lckpwdf __P ((void));
+extern int __ulckpwdf __P ((void));
diff --git a/include/signal.h b/include/signal.h
index d9939c4e83..693aeb807a 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -1 +1,25 @@
-#include <signal/signal.h>
+#if defined __need_sig_atomic_t || defined __need_sigset_t
+# include <signal/signal.h>
+#else
+# include <signal/signal.h>
+
+/* Now define the internal interfaces.  */
+extern __sighandler_t __bsd_signal __P ((int __sig, __sighandler_t __handler));
+extern int __kill __P ((__pid_t __pid, int __sig));
+extern int __sigblock __P ((int __mask));
+extern int __sigsetmask __P ((int __mask));
+extern int __sigprocmask __P ((int __how,
+			       __const sigset_t *__set, sigset_t *__oset));
+extern int __sigsuspend __P ((__const sigset_t *__set));
+extern int __sigwait __P ((__const sigset_t *__set, int *__sig));
+extern int __sigwaitinfo __P ((__const sigset_t *__set, siginfo_t *__info));
+extern int __sigtimedwait __P ((__const sigset_t *__set, siginfo_t *__info,
+				__const struct timespec *__timeout));
+extern int __sigqueue __P ((__pid_t __pid, int __sig,
+			    __const union sigval __val));
+extern int __sigvec __P ((int __sig, __const struct sigvec *__vec,
+			  struct sigvec *__ovec));
+extern int __sigreturn __P ((struct sigcontext *__scp));
+extern int __sigaltstack __P ((__const struct sigaltstack *__ss,
+			       struct sigaltstack *__oss));
+#endif
diff --git a/include/stdio.h b/include/stdio.h
index 457eabe32f..c0ca6027e8 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -1,5 +1,25 @@
 #ifdef USE_IN_LIBIO
-#include <libio/stdio.h>
+#ifdef __need_FILE
+# include <libio/stdio.h>
+#else
+# include <libio/stdio.h>
+
+/* Now define the internal interfaces.  */
+extern int __fcloseall __P ((void));
+extern int __snprintf __P ((char *__restrict __s, size_t __maxlen,
+			    __const char *__restrict __format, ...))
+     __attribute__ ((__format__ (__printf__, 3, 4)));
+extern int __vfscanf __P ((FILE *__restrict __s,
+			   __const char *__restrict __format,
+			   _G_va_list __arg))
+     __attribute__ ((__format__ (__scanf__, 2, 0)));
+extern int __vscanf __P ((__const char *__restrict __format,
+			  _G_va_list __arg))
+     __attribute__ ((__format__ (__scanf__, 1, 0)));
+extern _IO_ssize_t __getline __P ((char **__lineptr, size_t *__n,
+				   FILE *__stream));
+
+#endif
 #else
 #include <stdio/stdio.h>
 #endif
diff --git a/include/stdlib.h b/include/stdlib.h
index c0887a99e9..c45730428b 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -1 +1,41 @@
 #include <stdlib/stdlib.h>
+
+/* Now define the internal interfaces.  */
+extern int32_t __random __P ((void));
+extern void __srandom __P ((unsigned int __seed));
+extern __ptr_t __initstate __P ((unsigned int __seed, __ptr_t __statebuf,
+				 size_t __statelen));
+extern __ptr_t __setstate __P ((__ptr_t __statebuf));
+extern int __random_r __P ((struct random_data *__buf, int32_t *__result));
+extern int __srandom_r __P ((unsigned int __seed, struct random_data *__buf));
+extern int __initstate_r __P ((unsigned int __seed, __ptr_t __statebuf,
+			       size_t __statelen, struct random_data *__buf));
+extern int __setstate_r __P ((__ptr_t __statebuf, struct random_data *__buf));
+extern int __rand_r __P ((unsigned int *__seed));
+extern int __erand48_r __P ((unsigned short int __xsubi[3],
+			     struct drand48_data *__buffer, double *__result));
+extern int __nrand48_r __P ((unsigned short int __xsubi[3],
+			     struct drand48_data *__buffer,
+			     long int *__result));
+extern int __jrand48_r __P ((unsigned short int __xsubi[3],
+			     struct drand48_data *__buffer,
+			     long int *__result));
+extern int __srand48_r __P ((long int __seedval,
+			     struct drand48_data *__buffer));
+extern int __seed48_r __P ((unsigned short int __seed16v[3],
+			    struct drand48_data *__buffer));
+extern int __lcong48_r __P ((unsigned short int __param[7],
+			     struct drand48_data *__buffer));
+
+/* Internal function to compute next state of the generator.  */
+extern int __drand48_iterate __P ((unsigned short int __xsubi[3],
+				   struct drand48_data *__buffer));
+
+extern int __setenv __P ((__const char *__name, __const char *__value,
+			  int __replace));
+extern void __unsetenv __P ((__const char *__name));
+extern int __clearenv __P ((void));
+extern char *__canonicalize_file_name __P ((__const char *__name));
+extern char *__realpath __P ((__const char *__name, char *__resolved));
+extern int __ptsname_r __P ((int __fd, char *__buf, size_t __buflen));
+extern int __getpt __P ((void));
diff --git a/include/string.h b/include/string.h
index b557c65f39..1ee7ced249 100644
--- a/include/string.h
+++ b/include/string.h
@@ -1 +1,8 @@
 #include <string/string.h>
+
+/* Now define the internal interfaces.  */
+extern __ptr_t __memccpy __P ((__ptr_t __dest, __const __ptr_t __src,
+			       int __c, size_t __n));
+extern size_t __strnlen __P ((__const char *__string, size_t __maxlen));
+extern char *__strsep __P ((char **__stringp, __const char *__delim));
+extern int __strverscmp __P ((__const char *__s1, __const char *__s2));
diff --git a/include/sys/file.h b/include/sys/file.h
index fb3cd7544e..ec7f3de73d 100644
--- a/include/sys/file.h
+++ b/include/sys/file.h
@@ -1 +1,4 @@
 #include <misc/sys/file.h>
+
+/* Now define the internal interfaces.  */
+extern int __flock __P ((int __fd, int __operation));
diff --git a/include/sys/gmon.h b/include/sys/gmon.h
index 987589fcfe..2e56188027 100644
--- a/include/sys/gmon.h
+++ b/include/sys/gmon.h
@@ -1 +1,7 @@
 #include <gmon/sys/gmon.h>
+
+/* Now define the internal interfaces.  */
+
+/* Write current profiling data to file.  */
+extern void __write_profiling __P ((void));
+extern void write_profiling __P ((void));
diff --git a/include/sys/ioctl.h b/include/sys/ioctl.h
index 8cc77757f6..e07b08a64f 100644
--- a/include/sys/ioctl.h
+++ b/include/sys/ioctl.h
@@ -1 +1,4 @@
 #include <misc/sys/ioctl.h>
+
+/* Now define the internal interfaces.  */
+extern int __ioctl __P ((int __fd, unsigned long int __request, ...));
diff --git a/include/sys/mman.h b/include/sys/mman.h
new file mode 100644
index 0000000000..3a6c33a354
--- /dev/null
+++ b/include/sys/mman.h
@@ -0,0 +1,13 @@
+#include_next <sys/mman.h>
+
+/* Now define the internal interfaces.  */
+extern __ptr_t __mmap __P ((__ptr_t __addr, size_t __len, int __prot,
+			    int __flags, int __fd, __off_t __offset));
+extern __ptr_t __mmap64 __P ((__ptr_t __addr, size_t __len, int __prot,
+			      int __flags, int __fd, __off64_t __offset));
+extern int __munmap __P ((__ptr_t __addr, size_t __len));
+extern int __mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
+
+/* This one is Linux specific.  */
+extern __ptr_t __mremap __P ((__ptr_t __addr, size_t __old_len,
+			    size_t __new_len, int __may_move));
diff --git a/include/sys/resource.h b/include/sys/resource.h
index 33e6f4de9e..36950e2f10 100644
--- a/include/sys/resource.h
+++ b/include/sys/resource.h
@@ -1 +1,6 @@
 #include <resource/sys/resource.h>
+
+/* Now define the internal interfaces.  */
+extern int __getrlimit __P ((enum __rlimit_resource __resource,
+			     struct rlimit *__rlimits));
+extern int __getrusage __P ((enum __rusage_who __who, struct rusage *__usage));
diff --git a/include/sys/select.h b/include/sys/select.h
index f793af7bf0..860b01347d 100644
--- a/include/sys/select.h
+++ b/include/sys/select.h
@@ -1 +1,6 @@
 #include <misc/sys/select.h>
+
+/* Now define the internal interfaces.  */
+extern int __pselect __P ((int __nfds, __fd_set *__readfds,
+			   __fd_set *__writefds, __fd_set *__exceptfds,
+			   struct timespec *__timeout));
diff --git a/include/sys/socket.h b/include/sys/socket.h
index 999a683016..a319272b55 100644
--- a/include/sys/socket.h
+++ b/include/sys/socket.h
@@ -1 +1,4 @@
 #include <socket/sys/socket.h>
+
+/* Now define the internal interfaces.  */
+extern int __socket __P ((int __domain, int __type, int __protocol));
diff --git a/include/sys/stat.h b/include/sys/stat.h
index 16950eb039..768630fd34 100644
--- a/include/sys/stat.h
+++ b/include/sys/stat.h
@@ -1,5 +1,35 @@
+#ifndef _SYS_STAT_H
 #include <io/sys/stat.h>
 
+/* Now define the internal interfaces. */
+extern int __stat __P ((__const char *__file, struct stat *__buf));
+extern int __fstat __P ((int __fd, struct stat *__buf));
+extern int __lstat __P ((__const char *__file, struct stat *__buf));
+extern int __chmod __P ((__const char *__file, __mode_t __mode));
+extern int __fchmod __P ((int __fd, __mode_t __mode));
+extern __mode_t __umask __P ((__mode_t __mask));
+extern int __mkdir __P ((__const char *__path, __mode_t __mode));
+extern int __mknod __P ((__const char *__path,
+			 __mode_t __mode, __dev_t __dev));
+extern __inline__ int __stat (__const char *__path, struct stat *__statbuf)
+{
+  return __xstat (_STAT_VER, __path, __statbuf);
+}
+extern __inline__ int __lstat (__const char *__path, struct stat *__statbuf)
+{
+  return __lxstat (_STAT_VER, __path, __statbuf);
+}
+extern __inline__ int __fstat (int __fd, struct stat *__statbuf)
+{
+  return __fxstat (_STAT_VER, __fd, __statbuf);
+}
+extern __inline__ int __mknod (__const char *__path, __mode_t __mode,
+			       __dev_t __dev)
+{
+  return __xmknod (_MKNOD_VER, __path, __mode, &__dev);
+}
+
+
 /* The `stat', `fstat', `lstat' functions have to be handled special since
    even while not compiling the library with optimization calls to these
    functions in the shared library must reference the `xstat' etc functions.
@@ -7,8 +37,10 @@
    since on user level we must use real functions.  */
 #define stat(fname, buf) __xstat (_STAT_VER, fname, buf)
 #define fstat(fd, buf) __fxstat (_STAT_VER, fd, buf)
+#define __fstat(fd, buf)  __fxstat (_STAT_VER, fd, buf)
 #define lstat(fname, buf)  __lxstat (_STAT_VER, fname, buf)
 #define __lstat(fname, buf)  __lxstat (_STAT_VER, fname, buf)
 #define stat64(fname, buf) __xstat64 (_STAT_VER, fname, buf)
 #define fstat64(fd, buf) __fxstat64 (_STAT_VER, fd, buf)
 #define lstat64(fname, buf)  __lxstat64 (_STAT_VER, fname, buf)
+#endif
diff --git a/include/sys/statfs.h b/include/sys/statfs.h
index d42df4b65d..bb4999e2a3 100644
--- a/include/sys/statfs.h
+++ b/include/sys/statfs.h
@@ -1 +1,5 @@
 #include <io/sys/statfs.h>
+
+/* Now define the internal interfaces.  */
+extern int __statfs __P ((__const char *__file, struct statfs *__buf));
+extern int __fstatfs __P ((int __fildes, struct statfs *__buf));
diff --git a/include/sys/time.h b/include/sys/time.h
index 5595a957a0..fd9f46778d 100644
--- a/include/sys/time.h
+++ b/include/sys/time.h
@@ -1 +1,13 @@
 #include <time/sys/time.h>
+
+/* Now document the internal interfaces.  */
+extern int __settimeofday __P ((__const struct timeval *__tv,
+				__const struct timezone *__tz));
+extern int __adjtime __P ((__const struct timeval *__delta,
+			   struct timeval *__olddelta));
+extern int __getitimer __P ((enum __itimer_which __which,
+			     struct itimerval *__value));
+extern int __setitimer __P ((enum __itimer_which __which,
+			     __const struct itimerval *__new,
+			     struct itimerval *__old));
+extern int __utimes __P ((__const char *__file, struct timeval __tvp[2]));
diff --git a/include/sys/times.h b/include/sys/times.h
index 16ca91138a..95162b8931 100644
--- a/include/sys/times.h
+++ b/include/sys/times.h
@@ -1 +1,4 @@
 #include <posix/sys/times.h>
+
+/* Now define the internal interfaces.  */
+extern clock_t __times __P ((struct tms *__buffer));
diff --git a/include/sys/uio.h b/include/sys/uio.h
index 03afd84b87..a3f51e5f6c 100644
--- a/include/sys/uio.h
+++ b/include/sys/uio.h
@@ -1 +1,9 @@
+#ifndef _SYS_UIO_H
 #include <misc/sys/uio.h>
+
+/* Now define the internal interfaces.  */
+extern ssize_t __readv __P ((int __fd, __const struct iovec *__vector,
+			     int __count));
+extern ssize_t __writev __P ((int __fd, __const struct iovec *__vector,
+			      int __count));
+#endif
diff --git a/include/sys/wait.h b/include/sys/wait.h
index 379d5cc7a5..eefc14d705 100644
--- a/include/sys/wait.h
+++ b/include/sys/wait.h
@@ -1 +1,9 @@
 #include <posix/sys/wait.h>
+
+/* Now define the internal interfaces.  */
+extern __pid_t __waitpid __P ((__pid_t __pid, int *__stat_loc,
+			       int __options));
+extern __pid_t __wait3 __P ((__WAIT_STATUS __stat_loc,
+			     int __options, struct rusage * __usage));
+extern __pid_t __wait4 __P ((__pid_t __pid, __WAIT_STATUS __stat_loc,
+			     int __options, struct rusage *__usage));
diff --git a/include/termios.h b/include/termios.h
index 3f754ac900..90237a8101 100644
--- a/include/termios.h
+++ b/include/termios.h
@@ -1 +1,4 @@
 #include <termios/termios.h>
+
+/* Now define the internal interfaces.  */
+extern int __tcgetattr __P ((int __fd, struct termios *__termios_p));
diff --git a/include/time.h b/include/time.h
index b2a33bf5c3..bc8ce0662a 100644
--- a/include/time.h
+++ b/include/time.h
@@ -1 +1,37 @@
-#include <time/time.h>
+#if defined __need_time_t  || defined __need_clock_t || defined __need_timespec
+# include <time/time.h>
+#else
+# include <time/time.h>
+
+/* Now define the internal interfaces.  */
+struct tm;
+
+/* Subroutine of `mktime'.  Return the `time_t' representation of TP and
+   normalize TP, given that a `struct tm *' maps to a `time_t' as performed
+   by FUNC.  Keep track of next guess for time_t offset in *OFFSET.  */
+extern time_t __mktime_internal __P ((struct tm *__tp,
+				      struct tm *(*__func) (const time_t *,
+							    struct tm *),
+				      time_t *__offset));
+extern struct tm *__localtime_r __P ((__const time_t *__timer,
+				      struct tm *__tp));
+
+/* Compute the `struct tm' representation of *T,
+   offset OFFSET seconds east of UTC,
+   and store year, yday, mon, mday, wday, hour, min, sec into *TP.
+   Return nonzero if successful.  */
+extern int __offtime __P ((__const time_t *__timer,
+			   long int __offset,
+			   struct tm *__tp));
+
+extern char *__asctime_r __P ((__const struct tm *__tp, char *__buf));
+extern void __tzset __P ((void));
+
+/* Return the maximum length of a timezone name.
+   This is what `sysconf (_SC_TZNAME_MAX)' does.  */
+extern long int __tzname_max __P ((void));
+
+extern int __nanosleep __P ((__const struct timespec *__requested_time,
+			     struct timespec *__remaining));
+extern int __getdate_r __P ((__const char *__string, struct tm *__resbufp));
+#endif
diff --git a/include/ulimit.h b/include/ulimit.h
index 1e6cf9e95a..c1523a1864 100644
--- a/include/ulimit.h
+++ b/include/ulimit.h
@@ -1 +1,4 @@
 #include <resource/ulimit.h>
+
+/* Now define the internal interfaces.  */
+extern long int __ulimit __P ((int __cmd, ...));
diff --git a/include/unistd.h b/include/unistd.h
index 77901d9846..f676cad415 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -1 +1,63 @@
 #include <posix/unistd.h>
+
+/* Now define the internal interfaces.  */
+extern int __access __P ((__const char *__name, int __type));
+extern int __euidaccess __P ((__const char *__name, int __type));
+extern __off64_t __lseek64 __P ((int __fd, __off64_t __offset, int __whence));
+extern ssize_t __pread __P ((int __fd, __ptr_t __buf, size_t __nbytes,
+			     __off_t __offset));
+extern ssize_t __pwrite __P ((int __fd, __const __ptr_t __buf, size_t __n,
+			      __off_t __offset));
+extern int __pipe __P ((int __pipedes[2]));
+extern unsigned int __sleep __P ((unsigned int __seconds));
+extern int __chown __P ((__const char *__file,
+			 __uid_t __owner, __gid_t __group));
+extern int __fchown __P ((int __fd,
+			  __uid_t __owner, __gid_t __group));
+extern int __lchown __P ((__const char *__file, __uid_t __owner,
+			  __gid_t __group));
+extern int __fchdir __P ((int __fd));
+extern char *__getcwd __P ((char *__buf, size_t __size));
+
+/* Get the canonical absolute name of the named directory, and put it in SIZE
+   bytes of BUF.  Returns NULL if the directory couldn't be determined or
+   SIZE was too small.  If successful, returns BUF.  In GNU, if BUF is
+   NULL, an array is allocated with `malloc'; the array is SIZE bytes long,
+   unless SIZE <= 0, in which case it is as big as necessary.  */
+
+char *__canonicalize_directory_name_internal __P ((__const char *__thisdir,
+						   char *__buf,
+						   size_t __size));
+
+extern int __dup __P ((int __fd));
+extern int __dup2 __P ((int __fd, int __fd2));
+extern int __execve __P ((__const char *__path, char *__const __argv[],
+			  char *__const __envp[]));
+extern long int __pathconf __P ((__const char *__path, int __name));
+extern long int __fpathconf __P ((int __fd, int __name));
+extern long int __sysconf __P ((int __name));
+extern __pid_t __getppid __P ((void));
+extern __pid_t __setsid __P ((void));
+extern __uid_t __getuid __P ((void));
+extern __uid_t __geteuid __P ((void));
+extern __gid_t __getgid __P ((void));
+extern __gid_t __getegid __P ((void));
+extern int __getgroups __P ((int __size, __gid_t __list[]));
+extern int __group_member __P ((__gid_t __gid));
+extern int __setuid __P ((__uid_t __uid));
+extern int __setreuid __P ((__uid_t __ruid, __uid_t __euid));
+extern int __setgid __P ((__gid_t __gid));
+extern int __setregid __P ((__gid_t __rgid, __gid_t __egid));
+extern __pid_t __vfork __P ((void));
+extern int __ttyname_r __P ((int __fd, char *__buf, size_t __buflen));
+extern int __isatty __P ((int __fd));
+extern int __link __P ((__const char *__from, __const char *__to));
+extern int __symlink __P ((__const char *__from, __const char *__to));
+extern int __readlink __P ((__const char *__path, char *__buf, size_t __len));
+extern int __unlink __P ((__const char *__name));
+extern int __rmdir __P ((__const char *__path));
+extern int __gethostname __P ((char *__name, size_t __len));
+extern int __profil __P ((unsigned short int *__sample_buffer, size_t __size,
+			  size_t __offset, unsigned int __scale));
+extern int __getdtablesize __P ((void));
+extern int __brk __P ((__ptr_t __addr));
diff --git a/include/utmp.h b/include/utmp.h
index c0c21a4436..4535acb6a0 100644
--- a/include/utmp.h
+++ b/include/utmp.h
@@ -1 +1,17 @@
 #include <login/utmp.h>
+
+/* Now define the internal interfaces.  */
+extern void __updwtmp __P ((__const char *__wtmp_file,
+			    __const struct utmp *__utmp));
+extern int __utmpname __P ((__const char *__file));
+extern struct utmp *__getutent __P ((void));
+extern void __setutent __P ((void));
+extern void __endutent __P ((void));
+extern struct utmp *__getutid __P ((__const struct utmp *__id));
+extern struct utmp *__getutline __P ((__const struct utmp *__line));
+extern struct utmp *__pututline __P ((__const struct utmp *__utmp_ptr));
+extern int __getutent_r __P ((struct utmp *__buffer, struct utmp **__result));
+extern int __getutid_r __P ((__const struct utmp *__id, struct utmp *__buffer,
+			     struct utmp **__result));
+extern int __getutline_r __P ((__const struct utmp *__line,
+			       struct utmp *__buffer, struct utmp **__result));
diff --git a/include/wchar.h b/include/wchar.h
index c87ffb851b..95a8c431ab 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -1 +1,30 @@
 #include <wcsmbs/wchar.h>
+
+/* Now define the internal interfaces.  */
+extern int __wcscasecmp __P ((__const wchar_t *__s1, __const wchar_t *__s2));
+extern int __wcsncasecmp __P ((__const wchar_t *__s1, __const wchar_t *__s2,
+                               size_t __n));
+extern size_t __wcsnlen __P ((__const wchar_t *__s, size_t __maxlen));
+extern wint_t __btowc __P ((int __c));
+extern int __mbsinit __P ((__const mbstate_t *__ps));
+extern size_t __mbrtowc __P ((wchar_t *__restrict __pwc,
+			      __const char *__restrict __s, size_t __n,
+			      mbstate_t *__restrict __p));
+extern size_t __wcrtomb __P ((char *__restrict __s, wchar_t __wc,
+			      mbstate_t *__restrict __ps));
+extern size_t __mbsrtowcs __P ((wchar_t *__restrict __dst,
+				__const char **__restrict __src,
+				size_t __len, mbstate_t *__restrict __ps));
+extern size_t __wcsrtombs __P ((char *__restrict __dst,
+				__const wchar_t **__restrict __src,
+				size_t __len, mbstate_t *__restrict __ps));
+extern size_t __mbsnrtowcs __P ((wchar_t *__restrict __dst,
+				 __const char **__restrict __src, size_t __nmc,
+				 size_t __len, mbstate_t *__restrict __ps));
+extern size_t __wcsnrtombs __P ((char *__restrict __dst,
+				 __const wchar_t **__restrict __src,
+				 size_t __nwc, size_t __len,
+				 mbstate_t *__restrict __ps));
+extern wchar_t *__wcpcpy __P ((wchar_t *__dest, __const wchar_t *__src));
+extern wchar_t *__wcpncpy __P ((wchar_t *__dest, __const wchar_t *__src,
+				size_t __n));