about summary refs log tree commit diff
path: root/sysdeps/unix
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/linux/alpha/bits/fcntl.h12
-rw-r--r--sysdeps/unix/sysv/linux/arm/errlist.c55
-rw-r--r--sysdeps/unix/sysv/linux/arm/init-first.h55
-rw-r--r--sysdeps/unix/sysv/linux/bits/fcntl.h5
-rw-r--r--sysdeps/unix/sysv/linux/bits/siginfo.h4
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/fcntl.h16
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/fcntl.h13
7 files changed, 138 insertions, 22 deletions
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index 14840649ea..0dc0c47b1a 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux.
-   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1998 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
@@ -25,11 +25,6 @@
 #include <sys/types.h>
 
 
-/* In GNU, read and write are bits (unlike BSD).  */
-#ifdef __USE_GNU
-# define O_READ		O_RDONLY /* Open for reading.  */
-# define O_WRITE	O_WRONLY /* Open for writing.  */
-#endif
 /* open/fcntl - O_SYNC is only implemented on blocks devices and on files
    located on an ext2 file system */
 #define O_ACCMODE	  0003
@@ -71,6 +66,11 @@
 # define F_GETOWN	6	/* Set owner of socket (receiver of SIGIO).  */
 #endif
 
+#ifdef __USE_GNU
+# define F_SETSIG	10	/* Set number of signal to be sent.  */
+# define F_GETSIG	11	/* Get number of signal to be sent.  */
+#endif
+
 /* for F_[GET|SET]FL */
 #define FD_CLOEXEC	1	/* actually anything with low bit set goes */
 
diff --git a/sysdeps/unix/sysv/linux/arm/errlist.c b/sysdeps/unix/sysv/linux/arm/errlist.c
new file mode 100644
index 0000000000..e249522514
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/errlist.c
@@ -0,0 +1,55 @@
+/* Copyright (C) 1998 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.  */
+
+#include <sizes.h>
+#include <errlist.h>
+
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+
+# define SYS_ERRLIST __new_sys_errlist
+# define SYS_NERR __new_sys_nerr
+
+asm (".data; .globl __old_sys_errlist;  __old_sys_errlist:");
+#endif
+
+#include <sysdeps/gnu/errlist.c>
+
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+asm (".type __old_sys_errlist,%object;.size __old_sys_errlist,"
+     OLD_ERRLIST_SIZE_STR "*" PTR_SIZE_STR);
+
+extern const char *const *__old_sys_errlist;
+
+const int __old_sys_nerr = OLD_ERRLIST_SIZE;
+
+strong_alias (__old_sys_nerr, _old_sys_nerr);
+weak_alias (__old_sys_nerr, _old_sys_nerr)
+symbol_version (__old_sys_nerr, _sys_nerr, GLIBC_2.0);
+symbol_version (_old_sys_nerr, sys_nerr, GLIBC_2.0);
+weak_alias (__old_sys_errlist, _old_sys_errlist);
+symbol_version (__old_sys_errlist, _sys_errlist, GLIBC_2.0);
+symbol_version (_old_sys_errlist, sys_errlist, GLIBC_2.0);
+
+weak_alias (__new_sys_nerr, _new_sys_nerr)
+default_symbol_version (__new_sys_nerr, _sys_nerr, GLIBC_2.1);
+default_symbol_version (_new_sys_nerr, sys_nerr, GLIBC_2.1);
+weak_alias (__new_sys_errlist, _new_sys_errlist)
+default_symbol_version (__new_sys_errlist, _sys_errlist, GLIBC_2.1);
+default_symbol_version (_new_sys_errlist, sys_errlist, GLIBC_2.1);
+
+#endif
diff --git a/sysdeps/unix/sysv/linux/arm/init-first.h b/sysdeps/unix/sysv/linux/arm/init-first.h
new file mode 100644
index 0000000000..d68c368cc2
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/init-first.h
@@ -0,0 +1,55 @@
+/* Prepare arguments for library initialization function.
+   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.  */
+
+/* The job of this fragment it to find argc and friends for INIT.
+   This is done in one of two ways: either in the stack context
+   of program start, or having dlopen pass them in.  
+   
+   */
+
+#define SYSDEP_CALL_INIT(NAME, INIT)					      \
+void NAME (void* arg, ...)			\
+{		\
+  int argc; \
+  char** argv; \
+  char** envp; 							      \
+  /* The next variable is only here to work around a bug in gcc <= 2.7.2.2.   \
+     If the address would be taken inside the expression the optimizer	      \
+     would try to be too smart and throws it away.  Grrr.  */		      \
+  int *dummy_addr = &_dl_starting_up;					      \
+									      \
+  __libc_multiple_libcs = dummy_addr && !_dl_starting_up;		      \
+						\
+  if (!__libc_multiple_libcs)			\
+    {						\
+	/* The ... in the arg list above forces the gnu ARM compiler to \
+	push r0, r1, r2, r3 onto the stack. This way we can get the address */ \
+      argc = *(int*) (&arg+4);			\
+      argv = (char **) &arg + 5;		\
+      envp = &argv[argc+1];			\
+    }						\
+  else /* the three were passed as arguments */	\
+      {						\
+      argc = (int)arg;				\
+      argv = (char**)*(&arg + 1); 		\
+      envp = (char**)*(&arg + 2); 		\
+      }						\
+						\
+  INIT (argc, argv, envp);			\
+}
diff --git a/sysdeps/unix/sysv/linux/bits/fcntl.h b/sysdeps/unix/sysv/linux/bits/fcntl.h
index 51e845b9c1..223cb99e75 100644
--- a/sysdeps/unix/sysv/linux/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/bits/fcntl.h
@@ -74,6 +74,11 @@
 # define F_GETOWN	9	/* Set owner of socket (receiver of SIGIO).  */
 #endif
 
+#ifdef __USE_GNU
+# define F_SETSIG	10	/* Set number of signal to be sent.  */
+# define F_GETSIG	11	/* Get number of signal to be sent.  */
+#endif
+
 /* For F_[GET|SET]FL.  */
 #define FD_CLOEXEC	1	/* actually anything with low bit set goes */
 
diff --git a/sysdeps/unix/sysv/linux/bits/siginfo.h b/sysdeps/unix/sysv/linux/bits/siginfo.h
index 25cd78293e..66e6261999 100644
--- a/sysdeps/unix/sysv/linux/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/bits/siginfo.h
@@ -112,7 +112,9 @@ typedef struct siginfo
    signals.  */
 enum
 {
-  SI_ASYNCIO = -4,		/* Sent by AIO completion.  */
+  SI_SIGIO = -5,		/* Sent by queued SIGIO. */
+# define SI_SIGIO	SI_SIGIO
+  SI_ASYNCIO,			/* Sent by AIO completion.  */
 # define SI_ASYNCIO	SI_ASYNCIO
   SI_MESGQ,			/* Sent by real time mesq state change.  */
 # define SI_MESGQ	SI_MESGQ
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index 09d6fb6d4c..0a0d9c9d00 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux.
-   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1998 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
@@ -24,11 +24,6 @@
 #include <sys/types.h>
 
 
-/* In GNU, read and write are bits (unlike BSD).  */
-#ifdef __USE_GNU
-# define O_READ		O_RDONLY	/* Open for reading.  */
-# define O_WRITE	O_WRONLY	/* Open for writing.  */
-#endif
 /* open/fcntl - O_SYNC is only implemented on blocks devices and on files
    located on an ext2 file system */
 #define O_ACCMODE	0x0003
@@ -66,8 +61,13 @@
 #define F_SETLKW64	7	/* Set record locking info (blocking).  */
 
 #ifdef __USE_BSD
-# define F_SETOWN	5	/* Get owner of socket (receiver of SIGIO).  */
-# define F_GETOWN	6	/* Set owner of socket (receiver of SIGIO).  */
+# define F_SETOWN	24	/* Get owner of socket (receiver of SIGIO).  */
+# define F_GETOWN	23	/* Set owner of socket (receiver of SIGIO).  */
+#endif
+
+#ifdef __USE_GNU
+# define F_SETSIG	10	/* Set number of signal to be sent.  */
+# define F_GETSIG	11	/* Get number of signal to be sent.  */
 #endif
 
 /* for F_[GET|SET]FL */
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h b/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
index 9e8c589b9a..2fa0cd8b20 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux/SPARC.
-   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1998 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
@@ -22,12 +22,6 @@
 
 #include <sys/types.h>
 
-/* In GNU, read and write are bits (unlike BSD). */
-#ifdef __USE_GNU
-# define O_READ		O_RDONLY /* Open for reading. */
-# define O_WRITE	O_WRONLY /* Open for writing. */
-#endif
-
 /* open/fcntl - O_SYNC is only implemented on blocks devices and on files
    located on an ext2 file system */
 #define O_RDONLY	0x0000
@@ -61,6 +55,11 @@
 #define F_SETLK		8	/* Set record locking info (non-blocking).  */
 #define F_SETLKW	9	/* Set record locking info (blocking).  */
 
+#ifdef __USE_GNU
+# define F_SETSIG	10	/* Set number of signal to be sent.  */
+# define F_GETSIG	11	/* Get number of signal to be sent.  */
+#endif
+
 /* XXX missing */
 #define F_GETLK64	7	/* Get record locking info.  */
 #define F_SETLK64	8	/* Set record locking info (non-blocking).  */