about summary refs log tree commit diff
path: root/sysdeps/stub
diff options
context:
space:
mode:
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.  */