aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/generic/bits
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/generic/bits')
-rw-r--r--sysdeps/generic/bits/dirent.h24
-rw-r--r--sysdeps/generic/bits/elfclass.h8
-rw-r--r--sysdeps/generic/bits/endian.h9
-rw-r--r--sysdeps/generic/bits/errno.h40
-rw-r--r--sysdeps/generic/bits/fcntl.h85
-rw-r--r--sysdeps/generic/bits/fenv.h61
-rw-r--r--sysdeps/generic/bits/huge_val.h26
-rw-r--r--sysdeps/generic/bits/ioctls.h1
-rw-r--r--sysdeps/generic/bits/ipc.h56
-rw-r--r--sysdeps/generic/bits/libc-lock.h109
-rw-r--r--sysdeps/generic/bits/local_lim.h3
-rw-r--r--sysdeps/generic/bits/mathinline.h12
-rw-r--r--sysdeps/generic/bits/msq.h47
-rw-r--r--sysdeps/generic/bits/nan.h5
-rw-r--r--sysdeps/generic/bits/posix_opt.h2
-rw-r--r--sysdeps/generic/bits/sem.h61
-rw-r--r--sysdeps/generic/bits/setjmp.h3
-rw-r--r--sysdeps/generic/bits/shm.h53
-rw-r--r--sysdeps/generic/bits/sigcontext.h29
-rw-r--r--sysdeps/generic/bits/signum.h53
-rw-r--r--sysdeps/generic/bits/stat.h74
-rw-r--r--sysdeps/generic/bits/stdio_lim.h37
-rw-r--r--sysdeps/generic/bits/string.h12
-rw-r--r--sysdeps/generic/bits/time.h44
-rw-r--r--sysdeps/generic/bits/waitflags.h27
25 files changed, 881 insertions, 0 deletions
diff --git a/sysdeps/generic/bits/dirent.h b/sysdeps/generic/bits/dirent.h
new file mode 100644
index 0000000000..2f7dca78aa
--- /dev/null
+++ b/sysdeps/generic/bits/dirent.h
@@ -0,0 +1,24 @@
+/* Directory entry structure `struct dirent'. Stub version.
+ Copyright (C) 1996 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 Library General Public License as
+ published by the Free Software Foundation; either version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+struct dirent
+ {
+ char d_name[1]; /* Variable length. */
+ int d_fileno;
+ };
diff --git a/sysdeps/generic/bits/elfclass.h b/sysdeps/generic/bits/elfclass.h
new file mode 100644
index 0000000000..1ad12954b2
--- /dev/null
+++ b/sysdeps/generic/bits/elfclass.h
@@ -0,0 +1,8 @@
+/* This file specifies the native word size of the machine, which indicates
+ the ELF file class used for executables and shared objects on this
+ machine. */
+
+#define __ELF_NATIVE_CLASS ??
+
+/* This file goes in sysdeps/wordsize-?? and sysdeps/MACHINE/Implies lists
+ wordsize-?? for MACHINE's wordsize. */
diff --git a/sysdeps/generic/bits/endian.h b/sysdeps/generic/bits/endian.h
new file mode 100644
index 0000000000..597f079a0f
--- /dev/null
+++ b/sysdeps/generic/bits/endian.h
@@ -0,0 +1,9 @@
+/* This file should define __BYTE_ORDER as appropriate for the machine
+ in question. See string/endian.h for how to define it.
+
+ If only the stub bits/endian.h applies to a particular configuration,
+ bytesex.h is generated by running a program on the host machine.
+ So if cross-compiling to a machine with a different byte order,
+ the bits/endian.h file for that machine must exist. */
+
+#error Machine byte order unknown.
diff --git a/sysdeps/generic/bits/errno.h b/sysdeps/generic/bits/errno.h
new file mode 100644
index 0000000000..e197c3603d
--- /dev/null
+++ b/sysdeps/generic/bits/errno.h
@@ -0,0 +1,40 @@
+/* Copyright (C) 1991, 1994, 1996, 1997 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 Library General Public License as
+ published by the Free Software Foundation; either version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This file defines the `errno' constants. */
+
+#if !defined(__Emath_defined) && (defined(_ERRNO_H) || defined(__need_Emath))
+#undef __need_Emath
+#define __Emath_defined 1
+
+#define EDOM 1
+#define ERANGE 2
+#endif
+
+#ifdef _ERRNO_H
+#define ENOSYS 3
+#define EINVAL 4
+#define ESPIPE 5
+#define EBADF 6
+#define ENOMEM 7
+#define EACCES 8
+#define ENFILE 9
+#define EMFILE 10
+#endif
+
+#define __set_errno(val) errno = (val)
diff --git a/sysdeps/generic/bits/fcntl.h b/sysdeps/generic/bits/fcntl.h
new file mode 100644
index 0000000000..24a1c38be6
--- /dev/null
+++ b/sysdeps/generic/bits/fcntl.h
@@ -0,0 +1,85 @@
+/* O_*, F_*, FD_* bit values for stub configuration.
+ Copyright (C) 1991, 1992, 1997 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 Library General Public License as
+ published by the Free Software Foundation; either version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* These values should be changed as appropriate for your system. */
+
+#ifndef _FCNTL_H
+#error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
+#endif
+
+
+/* File access modes for `open' and `fcntl'. */
+#define O_RDONLY 0 /* Open read-only. */
+#define O_WRONLY 1 /* Open write-only. */
+#define O_RDWR 2 /* Open read/write. */
+
+
+/* Bits OR'd into the second argument to open. */
+#define O_CREAT 0x0200 /* Create file if it doesn't exist. */
+#define O_EXCL 0x0800 /* Fail if file already exists. */
+#define O_TRUNC 0x0400 /* Truncate file to zero length. */
+#define O_NOCTTY 0x0100 /* Don't assign a controlling terminal. */
+
+/* File status flags for `open' and `fcntl'. */
+#define O_APPEND 0x0008 /* Writes append to the file. */
+#define O_NONBLOCK 0x0004 /* Non-blocking I/O. */
+
+#ifdef __USE_BSD
+#define O_NDELAY O_NONBLOCK
+#endif
+
+/* Mask for file access modes. This is system-dependent in case
+ some system ever wants to define some other flavor of access. */
+#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
+
+/* Values for the second argument to `fcntl'. */
+#define F_DUPFD 0 /* Duplicate file descriptor. */
+#define F_GETFD 1 /* Get file descriptor flags. */
+#define F_SETFD 2 /* Set file descriptor flags. */
+#define F_GETFL 3 /* Get file status flags. */
+#define F_SETFL 4 /* Set file status flags. */
+#ifdef __USE_BSD
+#define F_GETOWN 5 /* Get owner (receiver of SIGIO). */
+#define F_SETOWN 6 /* Set owner (receiver of SIGIO). */
+#endif
+#define F_GETLK 7 /* Get record locking info. */
+#define F_SETLK 8 /* Set record locking info. */
+#define F_SETLKW 9 /* Set record locking info, wait. */
+
+/* File descriptor flags used with F_GETFD and F_SETFD. */
+#define FD_CLOEXEC 1 /* Close on exec. */
+
+
+#include <bits/types.h>
+
+/* The structure describing an advisory lock. This is the type of the third
+ argument to `fcntl' for the F_GETLK, F_SETLK, and F_SETLKW requests. */
+struct flock
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+ __off_t l_start; /* Offset where the lock begins. */
+ __off_t l_len; /* Size of the locked area; zero means until EOF. */
+ __pid_t l_pid; /* Process holding the lock. */
+ };
+
+/* Values for the `l_type' field of a `struct flock'. */
+#define F_RDLCK 1 /* Read lock. */
+#define F_WRLCK 2 /* Write lock. */
+#define F_UNLCK 3 /* Remove lock. */
diff --git a/sysdeps/generic/bits/fenv.h b/sysdeps/generic/bits/fenv.h
new file mode 100644
index 0000000000..f45deb07c1
--- /dev/null
+++ b/sysdeps/generic/bits/fenv.h
@@ -0,0 +1,61 @@
+/* Copyright (C) 1997 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 Library General Public License as
+ published by the Free Software Foundation; either version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _FENV_H
+#error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+#endif
+
+
+/* Here should be the exception be defined:
+ FE_INVALID
+ FE_DIVBYZERO
+ FE_OVERFLOW
+ FE_UNDERFLOW
+ FE_INEXACT
+ We define no macro which signals no exception is supported. */
+
+#define FE_ALL_EXCEPT 0
+
+
+/* Here should the rounding modes be defined:
+ FE_TONEAREST
+ FE_DOWNWARD
+ FE_UPWARD
+ FE_TOWARDSZERO
+ We define no macro which signals no rounding mode is selectable. */
+
+
+/* Type representing exception flags.
+ XXX Probably we should also include the signal handler here. */
+typedef struct
+ {
+ unsigned int flags;
+ }
+fexcept_t;
+
+
+/* Type representing floating-point environment. */
+typedef struct
+ {
+ fexcept_t excepts;
+ /* XXX I don't know what else we should save. */
+ }
+fenv_t;
+
+/* If the default argument is used we use this value. */
+#define FE_DFL_ENV ((fenv_t *) -1l)
diff --git a/sysdeps/generic/bits/huge_val.h b/sysdeps/generic/bits/huge_val.h
new file mode 100644
index 0000000000..8f137d1734
--- /dev/null
+++ b/sysdeps/generic/bits/huge_val.h
@@ -0,0 +1,26 @@
+/* Stub `HUGE_VAL' constant.
+ Used by <stdlib.h> and <math.h> functions for overflow.
+ Copyright (C) 1992, 1996 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 Library General Public License as
+ published by the Free Software Foundation; either version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _MATH_H
+#error "Never use <bits/huge_val.h> directly; include <math.h> instead."
+#endif
+
+
+#define HUGE_VAL 1e37
diff --git a/sysdeps/generic/bits/ioctls.h b/sysdeps/generic/bits/ioctls.h
new file mode 100644
index 0000000000..3b6178bfae
--- /dev/null
+++ b/sysdeps/generic/bits/ioctls.h
@@ -0,0 +1 @@
+/* This space intentionally left blank. */
diff --git a/sysdeps/generic/bits/ipc.h b/sysdeps/generic/bits/ipc.h
new file mode 100644
index 0000000000..a5ecbd90b7
--- /dev/null
+++ b/sysdeps/generic/bits/ipc.h
@@ -0,0 +1,56 @@
+/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_IPC_BUF_H
+
+#define _SYS_IPC_BUF_H 1
+#include <features.h>
+
+#include <sys/types.h>
+
+/* Mode bits for `msgget', `semget', and `shmget'. */
+#define IPC_CREAT 01000 /* create key if key does not exist */
+#define IPC_EXCL 02000 /* fail if key exists */
+#define IPC_NOWAIT 04000 /* return error on wait */
+
+/* Control commands for `msgctl', `semctl', and `shmctl'. */
+#define IPC_RMID 0 /* remove identifier */
+#define IPC_SET 1 /* set `ipc_perm' options */
+#define IPC_STAT 2 /* get `ipc_perm' options */
+
+
+__BEGIN_DECLS
+
+/* Special key values. */
+#define IPC_PRIVATE ((key_t) 0) /* private key */
+
+
+/* Data structure used to pass permission information to IPC operations. */
+struct ipc_perm
+{
+ __uid_t uid; /* owner's user ID */
+ __gid_t gid; /* owner's group ID */
+ __uid_t cuid; /* creator's user ID */
+ __gid_t cgid; /* creator's group ID */
+ __mode_t mode; /* read/write permission */
+};
+
+__END_DECLS
+
+#endif /* _SYS_IPC_BUF_H */
diff --git a/sysdeps/generic/bits/libc-lock.h b/sysdeps/generic/bits/libc-lock.h
new file mode 100644
index 0000000000..c24dcd047a
--- /dev/null
+++ b/sysdeps/generic/bits/libc-lock.h
@@ -0,0 +1,109 @@
+/* libc-internal interface for mutex locks. Stub version.
+ Copyright (C) 1996, 1997 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 Library General Public License as
+ published by the Free Software Foundation; either version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _BITS_LIBC_LOCK_H
+#define _BITS_LIBC_LOCK_H 1
+
+
+/* Define a lock variable NAME with storage class CLASS. The lock must be
+ initialized with __libc_lock_init before it can be used (or define it
+ with __libc_lock_define_initialized, below). Use `extern' for CLASS to
+ declare a lock defined in another module. In public structure
+ definitions you must use a pointer to the lock structure (i.e., NAME
+ begins with a `*'), because its storage size will not be known outside
+ of libc. */
+#define __libc_lock_define(CLASS,NAME)
+
+/* Define an initialized lock variable NAME with storage class CLASS. */
+#define __libc_lock_define_initialized(CLASS,NAME)
+
+/* Define an initialized recursive lock variable NAME with storage
+ class CLASS. */
+#define __libc_lock_define_initialized_recursive(CLASS,NAME)
+
+/* Initialize the named lock variable, leaving it in a consistent, unlocked
+ state. */
+#define __libc_lock_init(NAME)
+
+/* Same as last but this time we initialize a recursive mutex. */
+#define __libc_lock_init_recursive(NAME)
+
+/* Finalize the named lock variable, which must be locked. It cannot be
+ used again until __libc_lock_init is called again on it. This must be
+ called on a lock variable before the containing storage is reused. */
+#define __libc_lock_fini(NAME)
+
+/* Finalize recursive named lock. */
+#define __libc_lock_fini_recursive(NAME)
+
+/* Lock the named lock variable. */
+#define __libc_lock_lock(NAME)
+
+/* Lock the recursive named lock variable. */
+#define __libc_lock_lock_recursive(NAME)
+
+/* Try to lock the named lock variable. */
+#define __libc_lock_trylock(NAME) 0
+
+/* Try to lock the recursive named lock variable. */
+#define __libc_lock_trylock_recursive(NAME) 0
+
+/* Unlock the named lock variable. */
+#define __libc_lock_unlock(NAME)
+
+/* Unlock the recursive named lock variable. */
+#define __libc_lock_unlock_recursive(NAME)
+
+
+/* Define once control variable. */
+#define __libc_once_define(CLASS, NAME) CLASS int NAME = 0
+
+/* Call handler iff the first call. */
+#define __libc_once(ONCE_CONTROL, INIT_FUNCTION) \
+ do { \
+ if ((ONCE_CONTROL) == 0) { \
+ INIT_FUNCTION (); \
+ (ONCE_CONTROL) = 1; \
+ } \
+ } while (0)
+
+
+/* Start critical region with cleanup. */
+#define __libc_cleanup_region_start(FCT, ARG)
+
+/* End critical region with cleanup. */
+#define __libc_cleanup_region_end(DOIT)
+
+
+/* We need portable names for some of the functions. */
+#define __libc_mutex_unlock
+
+/* Type for key of thread specific data. */
+typedef int __libc_key_t;
+
+/* Create key for thread specific data. */
+#define __libc_key_create(KEY,DEST) -1
+
+/* Set thread-specific data associated with KEY to VAL. */
+#define __libc_setspecific(KEY,VAL) -1
+
+/* Get thread-specific data associated with KEY. */
+#define __libc_getspecific(KEY) 0
+
+#endif /* bits/libc-lock.h */
diff --git a/sysdeps/generic/bits/local_lim.h b/sysdeps/generic/bits/local_lim.h
new file mode 100644
index 0000000000..42cc7ebbc9
--- /dev/null
+++ b/sysdeps/generic/bits/local_lim.h
@@ -0,0 +1,3 @@
+/* This file should define the implementation-specific limits described
+ in posix[12]_lim.h. If there are no useful values to give a limit,
+ don't define it. */
diff --git a/sysdeps/generic/bits/mathinline.h b/sysdeps/generic/bits/mathinline.h
new file mode 100644
index 0000000000..5498af6b63
--- /dev/null
+++ b/sysdeps/generic/bits/mathinline.h
@@ -0,0 +1,12 @@
+/* This file should provide inline versions of math functions.
+
+ Surround GCC-specific parts with #ifdef __GNUC__, and use `extern __inline'.
+
+ This file should define __MATH_INLINES if functions are actually defined as
+ inlines. */
+
+#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
+
+/* Here goes the real code. */
+
+#endif
diff --git a/sysdeps/generic/bits/msq.h b/sysdeps/generic/bits/msq.h
new file mode 100644
index 0000000000..37daa9bf8c
--- /dev/null
+++ b/sysdeps/generic/bits/msq.h
@@ -0,0 +1,47 @@
+/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_MSG_H
+#error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
+#endif
+
+
+#include <features.h>
+#include <sys/types.h>
+
+/* Define options for message queue functions. */
+#define MSG_NOERROR 010000 /* no error if message is too big */
+
+__BEGIN_DECLS
+
+/* Structure of record for one message inside the kernel.
+ The type `struct __msg' is opaque. */
+struct msqid_ds
+{
+ struct ipc_perm msg_perm; /* structure describing operation permission */
+ __time_t msg_stime; /* time of last msgsnd command */
+ __time_t msg_rtime; /* time of last msgrcv command */
+ __time_t msg_ctime; /* time of last change */
+ unsigned short int msg_qnum; /* number of messages currently on queue */
+ unsigned short int msg_qbytes;/* max number of bytes allowed on queue */
+ __pid_t msg_lspid; /* pid of last msgsnd() */
+ __pid_t msg_lrpid; /* pid of last msgrcv() */
+};
+
+__END_DECLS
diff --git a/sysdeps/generic/bits/nan.h b/sysdeps/generic/bits/nan.h
new file mode 100644
index 0000000000..ab38168ea4
--- /dev/null
+++ b/sysdeps/generic/bits/nan.h
@@ -0,0 +1,5 @@
+#ifndef _MATH_H
+#error "Never use <bits/nan.h> directly; include <math.h> instead."
+#endif
+
+/* This file should define `NAN' on machines that have such things. */
diff --git a/sysdeps/generic/bits/posix_opt.h b/sysdeps/generic/bits/posix_opt.h
new file mode 100644
index 0000000000..54f5a79aa2
--- /dev/null
+++ b/sysdeps/generic/bits/posix_opt.h
@@ -0,0 +1,2 @@
+/* This file should define the POSIX options described in <unistd.h>,
+ or leave them undefined, as appropriate. */
diff --git a/sysdeps/generic/bits/sem.h b/sysdeps/generic/bits/sem.h
new file mode 100644
index 0000000000..1d3e41bd56
--- /dev/null
+++ b/sysdeps/generic/bits/sem.h
@@ -0,0 +1,61 @@
+/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_SEM_H
+#error "Never use <bits/sem.h> directly; include <sys/sem.h> instead."
+#endif
+
+
+#include <features.h>
+#include <sys/types.h>
+
+/* Flags for `semop'. */
+#define SEM_UNDO 0x1000 /* undo the operation on exit */
+
+/* Commands for `semctl'. */
+#define GETPID 11 /* get sempid */
+#define GETVAL 12 /* get semval */
+#define GETALL 13 /* get all semval's */
+#define GETNCNT 14 /* get semncnt */
+#define GETZCNT 15 /* get semzcnt */
+#define SETVAL 16 /* set semval */
+#define SETALL 17 /* set all semval's */
+
+
+__BEGIN_DECLS
+
+/* Data structure describing a set of semaphores. */
+struct semid_ds
+{
+ struct ipc_perm sem_perm; /* operation permission struct */
+ __time_t sem_otime; /* last semop() time */
+ __time_t sem_ctime; /* last time changed by semctl() */
+ unsigned short int sem_nsems; /* number of semaphores in set */
+};
+
+/* Union used for argument for `semctl'. */
+union semun
+{
+ int val; /* value for SETVAL */
+ struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */
+ unsigned short int *array; /* array for GETALL & SETALL */
+ struct seminfo *__buf; /* buffer for IPC_INFO */
+ };
+
+__END_DECLS
diff --git a/sysdeps/generic/bits/setjmp.h b/sysdeps/generic/bits/setjmp.h
new file mode 100644
index 0000000000..6620e5ab15
--- /dev/null
+++ b/sysdeps/generic/bits/setjmp.h
@@ -0,0 +1,3 @@
+/* Define the machine-dependent type `jmp_buf'. Stub version. */
+
+typedef int __jmp_buf[1];
diff --git a/sysdeps/generic/bits/shm.h b/sysdeps/generic/bits/shm.h
new file mode 100644
index 0000000000..b41d0c1e86
--- /dev/null
+++ b/sysdeps/generic/bits/shm.h
@@ -0,0 +1,53 @@
+/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_SHM_H
+#error "Never use <bits/shm.h> directly; include <sys/shm.h> instead."
+#endif
+
+
+#include <features.h>
+#include <sys/types.h>
+
+/* Flags for `shmat'. */
+#define SHM_RDONLY 010000 /* attach read-only else read-write */
+#define SHM_RND 020000 /* round attach address to SHMLBA */
+#define SHM_REMAP 040000 /* take-over region on attach */
+
+/* Commands for `shmctl'. */
+#define SHM_LOCK 11 /* lock segment (root only) */
+#define SHM_UNLOCK 12 /* unlock segment (root only) */
+
+
+__BEGIN_DECLS
+
+/* Data structure describing a set of semaphores. */
+struct shmid_ds
+{
+ struct ipc_perm sem_perm; /* operation permission struct */
+ int shm_segsz; /* size of segment in bytes */
+ __time_t sem_atime; /* time of last shmat() */
+ __time_t sem_dtime; /* time of last shmdt() */
+ __time_t sem_ctime; /* time of last change by shmctl() */
+ __pid_t shm_cpid; /* pid of creator */
+ __pid_t shm_lpid; /* pid of last shmop */
+ unsigned short int shm_nattch; /* number of current attaches */
+};
+
+__END_DECLS
diff --git a/sysdeps/generic/bits/sigcontext.h b/sysdeps/generic/bits/sigcontext.h
new file mode 100644
index 0000000000..46e4df8c64
--- /dev/null
+++ b/sysdeps/generic/bits/sigcontext.h
@@ -0,0 +1,29 @@
+/* Structure describing state saved while handling a signal. Stub version.
+ Copyright (C) 1991, 1994, 1997 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 Library General Public License as
+ published by the Free Software Foundation; either version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* State of this thread when the signal was taken. */
+struct sigcontext
+ {
+ int sc_onstack;
+ __sigset_t sc_mask;
+
+ /* Registers and such. */
+ };
+
+/* Signal subcodes should be defined here. */
diff --git a/sysdeps/generic/bits/signum.h b/sysdeps/generic/bits/signum.h
new file mode 100644
index 0000000000..6b4693f64c
--- /dev/null
+++ b/sysdeps/generic/bits/signum.h
@@ -0,0 +1,53 @@
+/* Copyright (C) 1991, 1993, 1996 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 Library General Public License as
+ published by the Free Software Foundation; either version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifdef _SIGNAL_H
+
+/* Fake signal functions. */
+extern void _sig_ign __P ((int sig));
+extern void _sig_dfl __P ((int sig));
+
+#define SIG_ERR ((__sighandler_t) 0) /* Error return. */
+#define SIG_DFL _sig_dfl /* Default action. */
+#define SIG_IGN _sig_ign /* Ignore signal. */
+
+
+/* ANSI signals. */
+#define SIGABRT 1 /* Abnormal termination. */
+#define SIGFPE 2 /* Erroneous arithmetic operation. */
+#define SIGILL 3 /* Illegal instruction. */
+#define SIGINT 3 /* Interactive attention signal. */
+#define SIGSEGV 4 /* Invalid access to storage. */
+#define SIGTERM 5 /* Termination request. */
+
+/* POSIX signals. */
+#define SIGHUP 6 /* Hangup. */
+#define SIGQUIT 7 /* Quit. */
+#define SIGPIPE 8 /* Broken pipe. */
+#define SIGKILL 9 /* Kill (cannot be blocked, caught, or ignored). */
+#define SIGALRM 10 /* Alarm clock. */
+#define SIGSTOP 11 /* Stop (cannot be blocked, caught, or ignored). */
+#define SIGTSTP 12 /* Keyboard stop. */
+#define SIGCONT 13 /* Continue. */
+#define SIGCHLD 14 /* Child terminated or stopped. */
+#define SIGTTIN 15 /* Background read from control terminal. */
+#define SIGTTOU 16 /* Background write to control terminal. */
+
+#endif /* <signal.h> included. */
+
+#define _NSIG 17
diff --git a/sysdeps/generic/bits/stat.h b/sysdeps/generic/bits/stat.h
new file mode 100644
index 0000000000..dab0cd00cb
--- /dev/null
+++ b/sysdeps/generic/bits/stat.h
@@ -0,0 +1,74 @@
+/* Copyright (C) 1992, 1996 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 Library General Public License as
+ published by the Free Software Foundation; either version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/*
+ * Never include this file directly; use <sys/stat.h> instead.
+ */
+
+/* This structure needs to be defined in accordance with the
+ implementation of __stat, __fstat, and __lstat. */
+
+#ifndef _BITS_STAT_H
+#define _BITS_STAT_H 1
+
+#include <bits/types.h>
+
+/* Structure describing file characteristics. */
+struct stat
+ {
+ /* These are the members that POSIX.1 requires. */
+
+ __mode_t st_mode; /* File mode. */
+ __ino_t st_ino; /* File serial number. */
+ __dev_t st_dev; /* Device containing the file. */
+ __nlink_t st_nlink; /* Link count. */
+
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group. */
+ __off_t st_size; /* Size of file, in bytes. */
+
+ __time_t st_atime; /* Time of last access. */
+ __time_t st_mtime; /* Time of last modification. */
+ __time_t st_ctime; /* Time of last status change. */
+
+ /* This should be defined if there is a `st_blksize' member. */
+#undef _STATBUF_ST_BLKSIZE
+ };
+
+/* Encoding of the file mode. These are the standard Unix values,
+ but POSIX.1 does not specify what values should be used. */
+
+#define __S_IFMT 0170000 /* These bits determine file type. */
+
+/* File types. */
+#define __S_IFDIR 0040000 /* Directory. */
+#define __S_IFCHR 0020000 /* Character device. */
+#define __S_IFBLK 0060000 /* Block device. */
+#define __S_IFREG 0100000 /* Regular file. */
+#define __S_IFIFO 0010000 /* FIFO. */
+
+/* Protection bits. */
+
+#define __S_ISUID 04000 /* Set user ID on execution. */
+#define __S_ISGID 02000 /* Set group ID on execution. */
+#define __S_IREAD 0400 /* Read by owner. */
+#define __S_IWRITE 0200 /* Write by owner. */
+#define __S_IEXEC 0100 /* Execute by owner. */
+
+
+#endif /* bits/stat.h */
diff --git a/sysdeps/generic/bits/stdio_lim.h b/sysdeps/generic/bits/stdio_lim.h
new file mode 100644
index 0000000000..ef873777c9
--- /dev/null
+++ b/sysdeps/generic/bits/stdio_lim.h
@@ -0,0 +1,37 @@
+/* Copyright (C) 1994, 1997 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 Library General Public License as
+ published by the Free Software Foundation; either version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* <bits/stdio_lim.h>: stdio limits for non-POSIX systems.
+ * Never include this file directly; use <stdio.h> instead.
+ */
+
+#ifndef _BITS_STDIO_LIM_H
+#define _BITS_STDIO_LIM_H
+
+#define L_tmpnam 1
+#define TMP_MAX 0
+
+#ifdef __USE_POSIX
+#define L_ctermid 1
+#define L_cuserid 1
+#endif
+
+#define FOPEN_MAX 16
+#define FILENAME_MAX 14
+
+#endif
diff --git a/sysdeps/generic/bits/string.h b/sysdeps/generic/bits/string.h
new file mode 100644
index 0000000000..ad68b038b6
--- /dev/null
+++ b/sysdeps/generic/bits/string.h
@@ -0,0 +1,12 @@
+/* This file should provide inline versions of string functions.
+
+ Surround GCC-specific parts with #ifdef __GNUC__, and use `extern __inline'.
+
+ This file should define __STRING_INLINES if functions are actually defined
+ as inlines. */
+
+#ifndef _BITS_STRING_H
+#define _BITS_STRING_H 1
+
+
+#endif /* bits/string.h */
diff --git a/sysdeps/generic/bits/time.h b/sysdeps/generic/bits/time.h
new file mode 100644
index 0000000000..e41a991b44
--- /dev/null
+++ b/sysdeps/generic/bits/time.h
@@ -0,0 +1,44 @@
+/* System-dependent timing definitions. Stub version.
+ Copyright (C) 1996, 1997 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 Library General Public License as
+ published by the Free Software Foundation; either version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/*
+ * Never include this file directly; use <time.h> instead.
+ */
+
+#ifdef __need_timeval
+# undef __need_timeval
+# ifndef _STRUCT_TIMEVAL
+# define _STRUCT_TIMEVAL 1
+/* A time value that is accurate to the nearest
+ microsecond but also has a range of years. */
+struct timeval
+ {
+ time_t tv_sec; /* Seconds. */
+ time_t tv_usec; /* Microseconds. */
+ };
+# endif /* struct timeval */
+#endif /* need timeval */
+
+
+#ifndef _BITS_TIME_H
+#define _BITS_TIME_H 1
+
+#define CLOCKS_PER_SEC 60
+
+#endif /* bits/time.h */
diff --git a/sysdeps/generic/bits/waitflags.h b/sysdeps/generic/bits/waitflags.h
new file mode 100644
index 0000000000..127eb6ce4c
--- /dev/null
+++ b/sysdeps/generic/bits/waitflags.h
@@ -0,0 +1,27 @@
+/* Definitions of flag bits for `waitpid' et al.
+ Copyright (C) 1992, 1996, 1997 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 Library General Public License as
+ published by the Free Software Foundation; either version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_WAIT_H
+#error "Never use <bits/waitflags.h> directly; include <sys/wait.h> instead."
+#endif
+
+
+/* Bits in the third argument to `waitpid'. */
+#define WNOHANG 1 /* Don't block waiting. */
+#define WUNTRACED 2 /* Report status of stopped children. */