From bdbf022df8d6df07ae7c69b7e386278e27804e58 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 9 Aug 1998 17:39:48 +0000 Subject: Update. 1998-08-09 09:40 Ulrich Drepper * 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. --- include/sys/file.h | 3 +++ include/sys/gmon.h | 6 ++++++ include/sys/ioctl.h | 3 +++ include/sys/mman.h | 13 +++++++++++++ include/sys/resource.h | 5 +++++ include/sys/select.h | 5 +++++ include/sys/socket.h | 3 +++ include/sys/stat.h | 32 ++++++++++++++++++++++++++++++++ include/sys/statfs.h | 4 ++++ include/sys/time.h | 12 ++++++++++++ include/sys/times.h | 3 +++ include/sys/uio.h | 8 ++++++++ include/sys/wait.h | 8 ++++++++ 13 files changed, 105 insertions(+) create mode 100644 include/sys/mman.h (limited to 'include/sys') 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 + +/* 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 + +/* 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 + +/* 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 + +/* 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 + +/* 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 + +/* 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 + +/* 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 +/* 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 + +/* 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