summary refs log tree commit diff
path: root/sysdeps/stub
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1995-09-17 20:23:15 +0000
committerRoland McGrath <roland@gnu.org>1995-09-17 20:23:15 +0000
commit60478656fad8d8a487e9bc52d025f69767c3262b (patch)
tree0ae0836023f1c2f80064e7611f91d19c482208d9 /sysdeps/stub
parent9fd18b6c1b397e1af82a0b544f10f946c73864b6 (diff)
downloadglibc-60478656fad8d8a487e9bc52d025f69767c3262b.tar.gz
glibc-60478656fad8d8a487e9bc52d025f69767c3262b.tar.xz
glibc-60478656fad8d8a487e9bc52d025f69767c3262b.zip
Sat Sep 16 17:47:19 1995 Ulrich Drepper <drepper@ipd.info.uni-karlsruhe.de>
	* elf/elf.h (AT_GID): Fix typo: Read -> Real.

	* misc/efgvt_r.c: New file.  Reentrant version of [efg]cvt functions.
	* misc/efgcvt.c: Rewrite to use reentrant functions.
	* misc/hsearch_r.c: New file.  Reentrant version of functions from
	hsearch family.
	* misc/hsearch.c, misc/tsearch.c: New files.
	* misc/Makefile (routines): Add efgcvt_r, hsearch_r, hsearch, tsearch.

	* posix/unistd.h (ttyname_r): Add prototype for new function.

	* stdlib/drand48_r.c, stdlib/erand48_r.c, stdlib/jrand48_r.c,
	stdlib/lrand48_r.c, stdlib/mrand48_r.c, stdlib/nrand48_r.c,
	stdlib/seed48_r.c, stdlib/srand48_r.c, stdlib/lcong48_r.c,
	stdlib/drand48-iter.c: New files implementing reentrant versions
	of functions from drand48 family.
	* stdlib/seed48.c, stdlib/drand48.c, stdlib/erand48.c,
	stdlib/jrand48.c, stdlib/lrand48.c, stdlib/mrand48.c,
	stdlib/nrand48.c, stdlib/srand48.c, stdlib/lcong48.c:
	Rewrite to use reentrant versions.
	* stdlib/a64l.c, stdlib/l64a.c: New files.  Implement a64l()
	and l64a() functions from SysV library.
	* stdlib/Makefile (routines): Add drand48_r, erand48_r, lrand48_r,
	nrand48_r, mrand48_r, jrand48_r, srand48_r, seed48_r, lcong48_r,
	drand48-iter, a64l, l64a.
	* stdlib/stdlib.h: Declare them.

	* stdlib/random_r.c: New file.  Reentrant version of functions
	from random family.
	* stdlib/stdlib.h: Declare them.
	* stdlib/random.c: Rewrite to use reentrant functions.

	* string/strerror_r.c: New file.  Reentrant version.
	* string/strerror.c: Change for new _strerror_internal form.
	* string/Makefile (routines): Add strerror_r.

	* sysdeps/generic/dl-sysdep.c (_dl_sysdep_start): Set default
	value of user_entry to `_start'.
	Close AT_ENTRY case with `break'.

	* sysdeps/generic/strstr.c: New and much faster implementation
	by Stephen R. van den Berg.

	* sysdeps/generic/_strerror.c: _strerror_internal now takes
	three argument and has and explicit buffer length.
	* sysdeps/mach/_strerror.c: Change for new interface with three
	arguments.
	* stdio/perror.c, stdio/vfprintf.c: Callers changed.
	
	* sysdeps/mach/hurd/ttyname_r.c: New file.  Reentrant version.
	* sysdeps/posix/ttyname_r.c: New file.  Reentrant version.
	* sysdeps/stub/ttyname_r: New file.  Define as dummy function.

	* sysdeps/posix/utimes.c: Include <utime.h> for prototype.
	(utimes): First parameter to utime must be file, not path.

	* sysdeps/posix/sysconf.c (__sysconf): Test for CLK_TCK in case
	_SC_CLK_TCK and return it when available.
	Test for STREAM_MAX in case _SC_STREAM_MAX and return it when
	available.
	Add case for _SC_2_LOCALEDEF which is now available.

	* posix/sys/types.h [__USE_SVID] (key_t): New type.
	* sysvipc/Makefile, sysvipc/ftok.c, sysvipc/sys/ipc.h,
	sysvipc/sys/msg.h, sysvipc/sys/sem.h, sysvipc/sys/shm.h,
	sysdeps/stub/sys/msq_buf.h, sysdeps/stub/sys/sem_buf.h,
	sysdeps/stub/sys/shm_buf.h, sysdeps/stub/sys/ipc_buf.h,
	sysdeps/stub/semctl.c, sysdeps/stub/semget.c, sysdeps/stub/semop.c,
	sysdeps/stub/shmat.c, sysdeps/stub/shmctl.c, sysdeps/stub/shmdt.c,
	sysdeps/stub/shmget.c, sysdeps/stub/msgctl.c, sysdeps/stub/msgget.c,
	sysdeps/stub/msgrcv.c, sysdeps/stub/msgsnd.c: New files.
	Add implementation of System V IPC.
Diffstat (limited to 'sysdeps/stub')
-rw-r--r--sysdeps/stub/msgctl.c36
-rw-r--r--sysdeps/stub/msgget.c35
-rw-r--r--sysdeps/stub/msgrcv.c41
-rw-r--r--sysdeps/stub/msgsnd.c40
-rw-r--r--sysdeps/stub/semctl.c37
-rw-r--r--sysdeps/stub/semget.c36
-rw-r--r--sysdeps/stub/semop.c35
-rw-r--r--sysdeps/stub/shmat.c37
-rw-r--r--sysdeps/stub/shmctl.c35
-rw-r--r--sysdeps/stub/shmdt.c34
-rw-r--r--sysdeps/stub/shmget.c36
-rw-r--r--sysdeps/stub/sys/ipc_buf.h58
-rw-r--r--sysdeps/stub/sys/msq_buf.h47
-rw-r--r--sysdeps/stub/sys/sem_buf.h52
-rw-r--r--sysdeps/stub/sys/shm_buf.h53
-rw-r--r--sysdeps/stub/ttyname_r.c42
16 files changed, 654 insertions, 0 deletions
diff --git a/sysdeps/stub/msgctl.c b/sysdeps/stub/msgctl.c
new file mode 100644
index 0000000000..8212f096c1
--- /dev/null
+++ b/sysdeps/stub/msgctl.c
@@ -0,0 +1,36 @@
+/* Copyright (C) 1995 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.  */
+
+#include <sys/msg.h>
+#include <errno.h>
+
+/* Allows to control internal state and destruction of message queue
+   objects.  */
+
+int
+msgctl (msqid, cmd, buf)
+     int msqid;
+     int cmd;
+     struct msqid_ds *buf;
+{
+  errno = ENOSYS;
+  return -1;
+}
+
+stub_warning (msgctl)
diff --git a/sysdeps/stub/msgget.c b/sysdeps/stub/msgget.c
new file mode 100644
index 0000000000..3ee2b3dacd
--- /dev/null
+++ b/sysdeps/stub/msgget.c
@@ -0,0 +1,35 @@
+/* Copyright (C) 1995 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.  */
+
+#include <sys/msg.h>
+#include <errno.h>
+
+/* Return descriptor for message queue associated with KEY.  The MSGFLG
+   parameter describes how to proceed with clashing of key values.  */
+
+int
+msgget (key, msgflg)
+     key_t key;
+     int msgflg;
+{
+  errno = ENOSYS;
+  return -1;
+}
+
+stub_warning (msgget)
diff --git a/sysdeps/stub/msgrcv.c b/sysdeps/stub/msgrcv.c
new file mode 100644
index 0000000000..3d5dfc5523
--- /dev/null
+++ b/sysdeps/stub/msgrcv.c
@@ -0,0 +1,41 @@
+/* Copyright (C) 1995 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.  */
+
+#include <sys/msg.h>
+#include <errno.h>
+
+/* Read a message from the queue associated with the message queue
+   descriptor MSQID.  At most MSGSZ bytes of the message are placed
+   in the buffer specified by the MSGP parameter.  The MSGTYP parameter
+   describes which message is returned in MSGFLG describes the behaviour
+   in buffer overflow or queue underflow.  */
+
+int
+msgrcv (msqid, msgp, msgsz, msgtyp, msgflg)
+     int msqid;
+     void *msgp;
+     size_t msgsz;
+     long msgtyp;
+     int msgflg;
+{
+  errno = ENOSYS;
+  return -1;
+}
+
+stub_warning (msgrcv)
diff --git a/sysdeps/stub/msgsnd.c b/sysdeps/stub/msgsnd.c
new file mode 100644
index 0000000000..77d188017d
--- /dev/null
+++ b/sysdeps/stub/msgsnd.c
@@ -0,0 +1,40 @@
+/* Copyright (C) 1995 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.  */
+
+#include <sys/msg.h>
+#include <errno.h>
+
+/* Send a message to the queue associated with the message queue
+   descriptor MSQID.  The parameter MSGP points to a structure
+   describing messages where the parameter MSGSZ gives the length
+   of the text.  The MSGFLG parameter describes the action taken
+   when the limit of the message queue length is reached.  */
+
+int
+msgsnd (msqid, msgp, msgsz, msgflg)
+     int msqid;
+     void *msgp;
+     size_t msgsz;
+     int msgflg;
+{
+  errno = ENOSYS;
+  return -1;
+}
+
+stub_warning (msgsnd)
diff --git a/sysdeps/stub/semctl.c b/sysdeps/stub/semctl.c
new file mode 100644
index 0000000000..8f2fe99400
--- /dev/null
+++ b/sysdeps/stub/semctl.c
@@ -0,0 +1,37 @@
+/* Copyright (C) 1995 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.  */
+
+#include <sys/sem.h>
+#include <errno.h>
+
+/* Return identifier for array of NSEMS semaphores associated with
+   KEY.  */
+
+int
+semctl (semid, semnum, cmd, arg)
+     int semid;
+     int semnum;
+     int cmd;
+     union semun arg;
+{
+  errno = ENOSYS;
+  return -1;
+}
+
+stub_warning (semctl)
diff --git a/sysdeps/stub/semget.c b/sysdeps/stub/semget.c
new file mode 100644
index 0000000000..3ccf2717d4
--- /dev/null
+++ b/sysdeps/stub/semget.c
@@ -0,0 +1,36 @@
+/* Copyright (C) 1995 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.  */
+
+#include <sys/sem.h>
+#include <errno.h>
+
+/* Return identifier for array of NSEMS semaphores associated with
+   KEY.  */
+
+int
+semget (key, nsems, semflg)
+     key_t key;
+     int nsems;
+     int semflg;
+{
+  errno = ENOSYS;
+  return -1;
+}
+
+stub_warning (semget)
diff --git a/sysdeps/stub/semop.c b/sysdeps/stub/semop.c
new file mode 100644
index 0000000000..2bba8628e6
--- /dev/null
+++ b/sysdeps/stub/semop.c
@@ -0,0 +1,35 @@
+/* Copyright (C) 1995 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.  */
+
+#include <sys/sem.h>
+#include <errno.h>
+
+/* Perform user-defined atomical operation of array of semaphores.  */
+
+int
+semop (semid, sops, nsops)
+     int semid;
+     struct sembuf *sops;
+     unsigned int nsops;
+{
+  errno = ENOSYS;
+  return -1;
+}
+
+stub_warning (semop)
diff --git a/sysdeps/stub/shmat.c b/sysdeps/stub/shmat.c
new file mode 100644
index 0000000000..099f2279d2
--- /dev/null
+++ b/sysdeps/stub/shmat.c
@@ -0,0 +1,37 @@
+/* Copyright (C) 1995 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.  */
+
+#include <sys/shm.h>
+#include <errno.h>
+
+/* Attach the shared memory segment associated with SHMID to the data
+   segment of the calling process.  SHMADDR and SHMFLG determine how
+   and where the segment is attached.  */
+
+char *
+shmat (shmid, shmaddr, shmflg)
+     int shmid;
+     char *shmaddr;
+     int shmflg;
+{
+  errno = ENOSYS;
+  return (char *) -1;
+}
+
+stub_warning (shmat)
diff --git a/sysdeps/stub/shmctl.c b/sysdeps/stub/shmctl.c
new file mode 100644
index 0000000000..75a4613166
--- /dev/null
+++ b/sysdeps/stub/shmctl.c
@@ -0,0 +1,35 @@
+/* Copyright (C) 1995 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.  */
+
+#include <sys/shm.h>
+#include <errno.h>
+
+/* Provide operations to control over shared memory segments.  */
+
+int
+shmctl (shmid, cmd, buf)
+     int shmid;
+     int cmd;
+     struct shmid_ds *buf;
+{
+  errno = ENOSYS;
+  return -1;
+}
+
+stub_warning (shmctl)
diff --git a/sysdeps/stub/shmdt.c b/sysdeps/stub/shmdt.c
new file mode 100644
index 0000000000..8affa6c15a
--- /dev/null
+++ b/sysdeps/stub/shmdt.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 1995 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.  */
+
+#include <sys/shm.h>
+#include <errno.h>
+
+/* Detach shared memory segment starting at address specified by SHMADDR
+   from the caller's data segment.  */
+
+int
+shmdt (shmaddr)
+     char *shmaddr;
+{
+  errno = ENOSYS;
+  return -1;
+}
+
+stub_warning (shmdt)
diff --git a/sysdeps/stub/shmget.c b/sysdeps/stub/shmget.c
new file mode 100644
index 0000000000..d59ff90c99
--- /dev/null
+++ b/sysdeps/stub/shmget.c
@@ -0,0 +1,36 @@
+/* Copyright (C) 1995 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.  */
+
+#include <sys/shm.h>
+#include <errno.h>
+
+/* Return an identifier for an shared memory segment of at least size SIZE
+   which is associated with KEY.  */
+
+int
+shmget (key, size, shmflg)
+     key_t key;
+     int size;
+     int shmflg;
+{
+  errno = ENOSYS;
+  return -1;
+}
+
+stub_warning (shmget)
diff --git a/sysdeps/stub/sys/ipc_buf.h b/sysdeps/stub/sys/ipc_buf.h
new file mode 100644
index 0000000000..fc2ad03873
--- /dev/null
+++ b/sysdeps/stub/sys/ipc_buf.h
@@ -0,0 +1,58 @@
+/* Copyright (C) 1995 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
+
+#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
+
+/* Data type for key value.  */
+typedef int key_t;
+
+/* 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/stub/sys/msq_buf.h b/sysdeps/stub/sys/msq_buf.h
new file mode 100644
index 0000000000..0222a652ab
--- /dev/null
+++ b/sysdeps/stub/sys/msq_buf.h
@@ -0,0 +1,47 @@
+/* Copyright (C) 1995 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_MSQ_BUF_H
+#define _SYS_MSQ_BUF_H
+
+#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
+
+#endif /* sys/msq_buf.h */
diff --git a/sysdeps/stub/sys/sem_buf.h b/sysdeps/stub/sys/sem_buf.h
new file mode 100644
index 0000000000..b301525408
--- /dev/null
+++ b/sysdeps/stub/sys/sem_buf.h
@@ -0,0 +1,52 @@
+/* Copyright (C) 1995 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_BUF_H
+#define _SYS_SEM_BUF_H
+
+#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 permisson 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 */
+};
+
+__END_DECLS
+
+#endif /* sys/sem_buf.h */
diff --git a/sysdeps/stub/sys/shm_buf.h b/sysdeps/stub/sys/shm_buf.h
new file mode 100644
index 0000000000..c665d6c160
--- /dev/null
+++ b/sysdeps/stub/sys/shm_buf.h
@@ -0,0 +1,53 @@
+/* Copyright (C) 1995 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_BUF_H
+#define _SYS_SHM_BUF_H
+
+#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 permisson 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
+
+#endif /* sys/shm_buf.h */
diff --git a/sysdeps/stub/ttyname_r.c b/sysdeps/stub/ttyname_r.c
new file mode 100644
index 0000000000..875929e3f3
--- /dev/null
+++ b/sysdeps/stub/ttyname_r.c
@@ -0,0 +1,42 @@
+/* Copyright (C) 1991, 1995 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., 675 Mass Ave,
+Cambridge, MA 02139, USA.  */
+
+#include <errno.h>
+#include <unistd.h>
+
+
+/* Store at most BUFLEN characters the pathname of the terminal FD is
+   open on in BUF.  Return 0 on success, -1 otherwise.  */
+int
+ttyname_r (fd, buf, buflen)
+     int fd;
+     char *buf;
+     int buflen;
+{
+  errno = ENOSYS;
+  return -1;
+}
+
+
+#ifdef	 HAVE_GNU_LD
+
+#include <gnu-stabs.h>
+
+stub_warning(ttyname_r);
+
+#endif	/* GNU stabs.  */