diff options
Diffstat (limited to 'include/sys')
-rw-r--r-- | include/sys/file.h | 3 | ||||
-rw-r--r-- | include/sys/gmon.h | 6 | ||||
-rw-r--r-- | include/sys/ioctl.h | 3 | ||||
-rw-r--r-- | include/sys/mman.h | 13 | ||||
-rw-r--r-- | include/sys/resource.h | 5 | ||||
-rw-r--r-- | include/sys/select.h | 5 | ||||
-rw-r--r-- | include/sys/socket.h | 3 | ||||
-rw-r--r-- | include/sys/stat.h | 32 | ||||
-rw-r--r-- | include/sys/statfs.h | 4 | ||||
-rw-r--r-- | include/sys/time.h | 12 | ||||
-rw-r--r-- | include/sys/times.h | 3 | ||||
-rw-r--r-- | include/sys/uio.h | 8 | ||||
-rw-r--r-- | include/sys/wait.h | 8 |
13 files changed, 105 insertions, 0 deletions
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)); |