Update.
authorUlrich Drepper <drepper@redhat.com>
Mon, 24 Jan 2000 12:09:14 +0000 (12:09 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 24 Jan 2000 12:09:14 +0000 (12:09 +0000)
2000-01-24  Jakub Jelinek  <jakub@redhat.com>

* sysdeps/unix/sysv/linux/arm/bits/resource.h: New file.
* sysdeps/unix/sysv/linux/arm/Makefile: Remove oldsetrlimit64.c.
* sysdeps/unix/sysv/linux/i386/Makefile: Likewise.
* sysdeps/unix/sysv/linux/i386/Dist: Likewise.
* sysdeps/unix/sysv/linux/arm/Versions: Remove
setrlimit64@GLIBC_2.1.3.
* sysdeps/unix/sysv/linux/i386/Versions: Likewise.
* sysdeps/unix/sysv/linux/arm/oldsetrlimit64.c: Remove.
* sysdeps/unix/sysv/linux/i386/oldsetrlimit64.c: Likewise.
* sysdeps/unix/sysv/linux/arm/setrlimit64.c: Likewise.
* sysdeps/unix/sysv/linux/i386/setrlimit64.c: Likewise.
* sysdeps/unix/sysv/linux/i386/oldgetrlimit64.c: Call __new_getrlimit,
so that setrlimit64@GLIBC_2.1 can report limits above 2G.
* sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list (getrlimit,
setrlimit): Remove syscall stubs, add normal syscalls.
* sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list (setrlimit):
Remove syscall stub.

21 files changed:
ChangeLog
localedata/ChangeLog
localedata/locales/POSIX
localedata/locales/th_TH
sysdeps/unix/sysv/linux/aio_sigqueue.c
sysdeps/unix/sysv/linux/arm/Makefile
sysdeps/unix/sysv/linux/arm/Versions
sysdeps/unix/sysv/linux/arm/bits/resource.h [new file with mode: 0644]
sysdeps/unix/sysv/linux/arm/oldsetrlimit64.c [deleted file]
sysdeps/unix/sysv/linux/arm/setrlimit64.c [deleted file]
sysdeps/unix/sysv/linux/bits/siginfo.h
sysdeps/unix/sysv/linux/i386/Dist
sysdeps/unix/sysv/linux/i386/Makefile
sysdeps/unix/sysv/linux/i386/Versions
sysdeps/unix/sysv/linux/i386/oldgetrlimit64.c
sysdeps/unix/sysv/linux/i386/oldsetrlimit64.c [deleted file]
sysdeps/unix/sysv/linux/i386/setrlimit64.c [deleted file]
sysdeps/unix/sysv/linux/sigqueue.c
sysdeps/unix/sysv/linux/sparc/bits/siginfo.h [new file with mode: 0644]
sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list
sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list

index 4c06a1e..b6ef42b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2000-01-24  Jakub Jelinek  <jakub@redhat.com>
+
+       * sysdeps/unix/sysv/linux/arm/bits/resource.h: New file.
+       * sysdeps/unix/sysv/linux/arm/Makefile: Remove oldsetrlimit64.c.
+       * sysdeps/unix/sysv/linux/i386/Makefile: Likewise.
+       * sysdeps/unix/sysv/linux/i386/Dist: Likewise.
+       * sysdeps/unix/sysv/linux/arm/Versions: Remove
+       setrlimit64@GLIBC_2.1.3.
+       * sysdeps/unix/sysv/linux/i386/Versions: Likewise.
+       * sysdeps/unix/sysv/linux/arm/oldsetrlimit64.c: Remove.
+       * sysdeps/unix/sysv/linux/i386/oldsetrlimit64.c: Likewise.
+       * sysdeps/unix/sysv/linux/arm/setrlimit64.c: Likewise.
+       * sysdeps/unix/sysv/linux/i386/setrlimit64.c: Likewise.
+       * sysdeps/unix/sysv/linux/i386/oldgetrlimit64.c: Call __new_getrlimit,
+       so that setrlimit64@GLIBC_2.1 can report limits above 2G.
+       * sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list (getrlimit,
+       setrlimit): Remove syscall stubs, add normal syscalls.
+       * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list (setrlimit):
+       Remove syscall stub.
+
 2000-01-22  Andreas Jaeger  <aj@suse.de>
 
        * localedata/tst-locale.sh: Enable test for de_DE.437.
index 2433c38..670d6c0 100644 (file)
@@ -1,3 +1,9 @@
+2000-01-24  Ulrich Drepper  <drepper@cygnus.com>
+
+       * locales/POSIX: Remove trailing semicolon.
+       * locales/th_TH: Likewise.
+       PR libc/1545.
+
 2000-01-18  Ulrich Drepper  <drepper@cygnus.com>
 
        * locales/ja_JP: Add double-width digits to digit class.
index 0eb1216..24e296b 100644 (file)
@@ -56,7 +56,7 @@ punct   <exclamation-mark>;<quotation-mark>;<number-sign>;\
         <greater-than-sign>;<question-mark>;<commercial-at>;\
         <left-square-bracket>;<backslash>;<right-square-bracket>;\
         <circumflex>;<underscore>;<grave-accent>;\
-        <left-curly-bracket>;<vertical-line>;<right-curly-bracket>;<tilde>;
+        <left-curly-bracket>;<vertical-line>;<right-curly-bracket>;<tilde>
 #
 xdigit  <zero>;<one>;<two>;<three>;<four>;<five>;<six>;<seven>;<eight>;\
         <nine>;<A>;<B>;<C>;<D>;<E>;<F>;<a>;<b>;<c>;<d>;<e>;<f>
index c8a1d71..98b50b3 100644 (file)
@@ -68,7 +68,7 @@ cntrl   <alert>;<backspace>;<tab>;<newline>;<vertical-tab>;/
         <form-feed>;<carriage-return>;/
         <NUL>;<SOH>;<STX>;<ETX>;<EOT>;<ENQ>;<ACK>;<SO>;<SI>;/
         <DLE>;<DC1>;<DC2>;<DC3>;<DC4>;<NAK>;<SYN>;<ETB>;<CAN>;/
-        <EM>;<SUB>;<ESC>;<IS4>;<IS3>;<IS2>;<IS1>;<DEL>;
+        <EM>;<SUB>;<ESC>;<IS4>;<IS3>;<IS2>;<IS1>;<DEL>
 
 %
 % punct = ASCII punct
index 94a8ce0..6e53f87 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2000 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
@@ -20,6 +20,7 @@
 #include <errno.h>
 #include <signal.h>
 #include <unistd.h>
+#include <string.h>
 
 #include <sysdep.h>
 #include <sys/syscall.h>
@@ -39,9 +40,11 @@ __aio_sigqueue (sig, val, caller_pid)
 {
   siginfo_t info;
 
+  /* First, clear the siginfo_t structure, so that we don't pass our
+     stack content to other tasks.  */
+  memset (&info, 0, sizeof (siginfo_t));
   /* We must pass the information about the data in a siginfo_t value.  */
   info.si_signo = sig;
-  info.si_errno = 0;
   info.si_code = SI_ASYNCIO;
   info.si_pid = caller_pid;
   info.si_uid = getuid ();
index b82a6ef..6040b20 100644 (file)
@@ -10,5 +10,5 @@ sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait       \
 endif
 
 ifeq ($(subdir),resource)
-sysdep_routines += oldgetrlimit64 oldsetrlimit64
+sysdep_routines += oldgetrlimit64
 endif
index 39f209f..531817f 100644 (file)
@@ -6,6 +6,6 @@ libc {
   }
   GLIBC_2.1.3 {
     # New rlimit interface
-    getrlimit; setrlimit; getrlimit64; setrlimit64;
+    getrlimit; setrlimit; getrlimit64;
   }
 }
diff --git a/sysdeps/unix/sysv/linux/arm/bits/resource.h b/sysdeps/unix/sysv/linux/arm/bits/resource.h
new file mode 100644 (file)
index 0000000..710f111
--- /dev/null
@@ -0,0 +1,205 @@
+/* Bit values & structures for resource limits.  Linux version.
+   Copyright (C) 1994, 1996, 1997, 1998, 1999 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_RESOURCE_H
+# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
+#endif
+
+#include <bits/types.h>
+
+/* Transmute defines to enumerations.  The macro re-definitions are
+   necessary because some programs want to test for operating system
+   features with #ifdef RUSAGE_SELF.  In ISO C the reflexive
+   definition is a no-op.  */
+
+/* Kinds of resource limit.  */
+enum __rlimit_resource
+{
+  /* Per-process CPU limit, in seconds.  */
+  RLIMIT_CPU = 0,
+#define RLIMIT_CPU RLIMIT_CPU
+
+  /* Largest file that can be created, in bytes.  */
+  RLIMIT_FSIZE = 1,
+#define        RLIMIT_FSIZE RLIMIT_FSIZE
+
+  /* Maximum size of data segment, in bytes.  */
+  RLIMIT_DATA = 2,
+#define        RLIMIT_DATA RLIMIT_DATA
+
+  /* Maximum size of stack segment, in bytes.  */
+  RLIMIT_STACK = 3,
+#define        RLIMIT_STACK RLIMIT_STACK
+
+  /* Largest core file that can be created, in bytes.  */
+  RLIMIT_CORE = 4,
+#define        RLIMIT_CORE RLIMIT_CORE
+
+  /* Largest resident set size, in bytes.
+     This affects swapping; processes that are exceeding their
+     resident set size will be more likely to have physical memory
+     taken from them.  */
+  RLIMIT_RSS = 5,
+#define        RLIMIT_RSS RLIMIT_RSS
+
+  /* Number of open files.  */
+  RLIMIT_NOFILE = 7,
+  RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same.  */
+#define RLIMIT_NOFILE RLIMIT_NOFILE
+#define RLIMIT_OFILE RLIMIT_OFILE
+
+  /* Address space limit.  */
+  RLIMIT_AS = 9,
+#define RLIMIT_AS RLIMIT_AS
+
+  /* Number of processes.  */
+  RLIMIT_NPROC = 6,
+#define RLIMIT_NPROC RLIMIT_NPROC
+
+  /* Locked-in-memory address space.  */
+  RLIMIT_MEMLOCK = 8,
+#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK
+
+  RLIMIT_NLIMITS = 10,
+  RLIM_NLIMITS = RLIMIT_NLIMITS
+#define RLIMIT_NLIMITS RLIMIT_NLIMITS
+#define RLIM_NLIMITS RLIM_NLIMITS
+};
+
+/* Value to indicate that there is no limit.  */
+#ifndef __USE_FILE_OFFSET64
+# define RLIM_INFINITY ((unsigned long int)(~0UL))
+#else
+# define RLIM_INFINITY 0xffffffffffffffffuLL
+#endif
+
+#ifdef __USE_LARGEFILE64
+# define RLIM64_INFINITY 0xffffffffffffffffuLL
+#endif
+
+/* We can represent all limits.  */
+#define RLIM_SAVED_MAX RLIM_INFINITY
+#define RLIM_SAVED_CUR RLIM_INFINITY
+
+
+/* Type for resource quantity measurement.  */
+#ifndef __USE_FILE_OFFSET64
+typedef __rlim_t rlim_t;
+#else
+typedef __rlim64_t rlim_t;
+#endif
+#ifdef __USE_LARGEFILE64
+typedef __rlim64_t rlim64_t;
+#endif
+
+struct rlimit
+  {
+    /* The current (soft) limit.  */
+    rlim_t rlim_cur;
+    /* The hard limit.  */
+    rlim_t rlim_max;
+  };
+
+#ifdef __USE_LARGEFILE64
+struct rlimit64
+  {
+    /* The current (soft) limit.  */
+    rlim64_t rlim_cur;
+    /* The hard limit.  */
+    rlim64_t rlim_max;
+ };
+#endif
+
+/* Whose usage statistics do you want?  */
+enum __rusage_who
+{
+  /* The calling process.  */
+  RUSAGE_SELF = 0,
+#define RUSAGE_SELF RUSAGE_SELF
+
+  /* All of its terminated child processes.  */
+  RUSAGE_CHILDREN = -1,
+#define RUSAGE_CHILDREN RUSAGE_CHILDREN
+
+  /* Both.  */
+  RUSAGE_BOTH = -2
+#define RUSAGE_BOTH RUSAGE_BOTH
+};
+
+#define __need_timeval
+#include <bits/time.h>         /* For `struct timeval'.  */
+
+/* Structure which says how much of each resource has been used.  */
+struct rusage
+  {
+    /* Total amount of user time used.  */
+    struct timeval ru_utime;
+    /* Total amount of system time used.  */
+    struct timeval ru_stime;
+    /* Maximum resident set size (in kilobytes).  */
+    long int ru_maxrss;
+    /* Amount of sharing of text segment memory
+       with other processes (kilobyte-seconds).  */
+    long int ru_ixrss;
+    /* Amount of data segment memory used (kilobyte-seconds).  */
+    long int ru_idrss;
+    /* Amount of stack memory used (kilobyte-seconds).  */
+    long int ru_isrss;
+    /* Number of soft page faults (i.e. those serviced by reclaiming
+       a page from the list of pages awaiting reallocation.  */
+    long int ru_minflt;
+    /* Number of hard page faults (i.e. those that required I/O).  */
+    long int ru_majflt;
+    /* Number of times a process was swapped out of physical memory.  */
+    long int ru_nswap;
+    /* Number of input operations via the file system.  Note: This
+       and `ru_oublock' do not include operations with the cache.  */
+    long int ru_inblock;
+    /* Number of output operations via the file system.  */
+    long int ru_oublock;
+    /* Number of IPC messages sent.  */
+    long int ru_msgsnd;
+    /* Number of IPC messages received.  */
+    long int ru_msgrcv;
+    /* Number of signals delivered.  */
+    long int ru_nsignals;
+    /* Number of voluntary context switches, i.e. because the process
+       gave up the process before it had to (usually to wait for some
+       resource to be available).  */
+    long int ru_nvcsw;
+    /* Number of involuntary context switches, i.e. a higher priority process
+       became runnable or the current process used up its time slice.  */
+    long int ru_nivcsw;
+  };
+
+/* Priority limits.  */
+#define PRIO_MIN       -20     /* Minimum priority a process can have.  */
+#define PRIO_MAX       20      /* Maximum priority a process can have.  */
+
+/* The type of the WHICH argument to `getpriority' and `setpriority',
+   indicating what flavor of entity the WHO argument specifies.  */
+enum __priority_which
+{
+  PRIO_PROCESS = 0,            /* WHO is a process ID.  */
+#define PRIO_PROCESS PRIO_PROCESS
+  PRIO_PGRP = 1,               /* WHO is a process group ID.  */
+#define PRIO_PGRP PRIO_PGRP
+  PRIO_USER = 2                        /* WHO is a user ID.  */
+#define PRIO_USER PRIO_USER
+};
diff --git a/sysdeps/unix/sysv/linux/arm/oldsetrlimit64.c b/sysdeps/unix/sysv/linux/arm/oldsetrlimit64.c
deleted file mode 100644 (file)
index 93bdc37..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/oldsetrlimit64.c>
diff --git a/sysdeps/unix/sysv/linux/arm/setrlimit64.c b/sysdeps/unix/sysv/linux/arm/setrlimit64.c
deleted file mode 100644 (file)
index ed64b87..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/setrlimit64.c>
index dcabddb..9426c13 100644 (file)
@@ -1,5 +1,5 @@
-/* siginfo_t, sigevent and constants.  Linux version.
-   Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+/* siginfo_t, sigevent and constants.  Linux/SPARC version.
+   Copyright (C) 1997, 1998, 1999, 2000 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
@@ -21,6 +21,8 @@
 # error "Never include this file directly.  Use <signal.h> instead"
 #endif
 
+#include <bits/wordsize.h>
+
 #if (!defined __have_siginfo_t \
      && (defined _SIGNAL_H || defined __need_siginfo_t))
 # define __have_siginfo_t      1
@@ -33,7 +35,11 @@ typedef union sigval
   } sigval_t;
 
 # define __SI_MAX_SIZE     128
-# define __SI_PAD_SIZE     ((__SI_MAX_SIZE / sizeof (int)) - 3)
+# if __WORDSIZE == 64
+#  define __SI_PAD_SIZE     ((__SI_MAX_SIZE / sizeof (int)) - 4)
+# else
+#  define __SI_PAD_SIZE     ((__SI_MAX_SIZE / sizeof (int)) - 3)
+# endif
 
 typedef struct siginfo
   {
@@ -245,7 +251,11 @@ enum
 
 /* Structure to transport application-defined values with signals.  */
 # define __SIGEV_MAX_SIZE      64
-# define __SIGEV_PAD_SIZE      ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
+# if __WORDSIZE == 64
+#  define __SIGEV_PAD_SIZE     ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
+# else
+#  define __SIGEV_PAD_SIZE     ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
+# endif
 
 typedef struct sigevent
   {
index d4b5035..babeff8 100644 (file)
@@ -1,6 +1,5 @@
 clone.S
 oldgetrlimit64.c
-oldsetrlimit64.c
 setresuid.c
 setresgid.c
 setfsuid.c
index c44c2b5..06325ab 100644 (file)
@@ -13,5 +13,5 @@ CFLAGS-initfini.s += -DWEAK_GMON_START
 endif
 
 ifeq ($(subdir),resource)
-sysdep_routines += oldgetrlimit64 oldsetrlimit64
+sysdep_routines += oldgetrlimit64
 endif
index e9b8605..68b0ee4 100644 (file)
@@ -9,6 +9,6 @@ libc {
   }
   GLIBC_2.1.3 {
     # New rlimit interface
-    getrlimit; setrlimit; getrlimit64; setrlimit64;
+    getrlimit; setrlimit; getrlimit64;
   }
 }
index 5fb0bec..e774864 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995-1999, 2000 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,7 +24,7 @@
 #include <sys/resource.h>
 #include <sys/types.h>
 
-extern int __old_getrlimit (enum __rlimit_resource, struct rlimit *);
+extern int __new_getrlimit (enum __rlimit_resource, struct rlimit *);
 
 /* Put the soft and hard limits for RESOURCE in *RLIMITS.
    Returns 0 if successful, -1 if not (and sets errno).  */
@@ -33,14 +33,14 @@ __old_getrlimit64 (enum __rlimit_resource resource, struct rlimit64 *rlimits)
 {
   struct rlimit rlimits32;
 
-  if (__old_getrlimit (resource, &rlimits32) < 0)
+  if (__new_getrlimit (resource, &rlimits32) < 0)
     return -1;
 
-  if (rlimits32.rlim_cur == RLIM_INFINITY >> 1)
+  if (rlimits32.rlim_cur == RLIM_INFINITY)
     rlimits->rlim_cur = RLIM64_INFINITY >> 1;
   else
     rlimits->rlim_cur = rlimits32.rlim_cur;
-  if (rlimits32.rlim_max == RLIM_INFINITY >> 1)
+  if (rlimits32.rlim_max == RLIM_INFINITY)
     rlimits->rlim_max = RLIM64_INFINITY >> 1;
   else
     rlimits->rlim_max = rlimits32.rlim_max;
diff --git a/sysdeps/unix/sysv/linux/i386/oldsetrlimit64.c b/sysdeps/unix/sysv/linux/i386/oldsetrlimit64.c
deleted file mode 100644 (file)
index c5448dc..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Copyright (C) 1991, 95, 96, 97, 98, 1999 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 is a compatibility file.  If we don't build the libc with
-   versioning don't compile this file.  */
-#if defined PIC && DO_VERSIONING
-
-#include <errno.h>
-#include <sys/resource.h>
-#include <sys/types.h>
-
-extern int __old_setrlimit (enum __rlimit_resource, const struct rlimit *);
-
-/* Set the soft and hard limits for RESOURCE to *RLIMITS.
-   Only the super-user can increase hard limits.
-   Return 0 if successful, -1 if not (and sets errno).  */
-int
-__old_setrlimit64 (enum __rlimit_resource resource,
-                  const struct rlimit64 *rlimits)
-{
-  struct rlimit rlimits32;
-
-  if (rlimits->rlim_cur >= RLIM_INFINITY >> 1)
-    rlimits32.rlim_cur = RLIM_INFINITY >> 1;
-  else
-    rlimits32.rlim_cur = rlimits->rlim_cur;
-  if (rlimits->rlim_max >= RLIM_INFINITY >> 1)
-    rlimits32.rlim_max = RLIM_INFINITY >> 1;
-  else
-    rlimits32.rlim_max = rlimits->rlim_max;
-
-  return __old_setrlimit (resource, &rlimits32);
-}
-
-symbol_version (__old_setrlimit64, setrlimit64, GLIBC_2.1);
-
-#endif /* PIC && DO_VERSIONING */
diff --git a/sysdeps/unix/sysv/linux/i386/setrlimit64.c b/sysdeps/unix/sysv/linux/i386/setrlimit64.c
deleted file mode 100644 (file)
index 3e7e5cc..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Copyright (C) 1999 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.  */
-
-#define setrlimit64 __new_setrlimit64
-
-#include <sysdeps/generic/setrlimit64.c>
-
-#undef setrlimit64
-#if defined PIC && defined DO_VERSIONING
-default_symbol_version (__new_setrlimit64, setrlimit64, GLIBC_2.1.3);
-#else
-weak_alias (__new_setrlimit64, setrlimit64);
-#endif
index c3e05e1..a37435c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000 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
@@ -19,6 +19,7 @@
 #include <errno.h>
 #include <signal.h>
 #include <unistd.h>
+#include <string.h>
 
 #include <sysdep.h>
 #include <sys/syscall.h>
@@ -35,9 +36,11 @@ __sigqueue (pid, sig, val)
 {
   siginfo_t info;
 
+  /* First, clear the siginfo_t structure, so that we don't pass our
+     stack content to other tasks.  */
+  memset (&info, 0, sizeof (siginfo_t));
   /* We must pass the information about the data in a siginfo_t value.  */
   info.si_signo = sig;
-  info.si_errno = 0;
   info.si_code = SI_QUEUE;
   info.si_pid = __getpid ();
   info.si_uid = __getuid ();
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/siginfo.h b/sysdeps/unix/sysv/linux/sparc/bits/siginfo.h
new file mode 100644 (file)
index 0000000..d06cff6
--- /dev/null
@@ -0,0 +1,302 @@
+/* siginfo_t, sigevent and constants.  Linux/SPARC version.
+   Copyright (C) 1997, 1998, 1999, 2000 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.  */
+
+#if !defined _SIGNAL_H && !defined __need_siginfo_t
+# error "Never include this file directly.  Use <signal.h> instead"
+#endif
+
+#include <bits/wordsize.h>
+
+#if (!defined __have_siginfo_t \
+     && (defined _SIGNAL_H || defined __need_siginfo_t))
+# define __have_siginfo_t      1
+
+/* Type for data associated with a signal.  */
+typedef union sigval
+  {
+    int sival_int;
+    void *sival_ptr;
+  } sigval_t;
+
+# define __SI_MAX_SIZE     128
+# if __WORDSIZE == 64
+#  define __SI_PAD_SIZE     ((__SI_MAX_SIZE / sizeof (int)) - 4)
+# else
+#  define __SI_PAD_SIZE     ((__SI_MAX_SIZE / sizeof (int)) - 3)
+# endif
+
+typedef struct siginfo
+  {
+    int si_signo;              /* Signal number.  */
+    int si_errno;              /* If non-zero, an errno value associated with
+                                  this signal, as defined in <errno.h>.  */
+    int si_code;               /* Signal code.  */
+
+    union
+      {
+       int _pad[__SI_PAD_SIZE];
+
+        /* kill().  */
+       struct
+         {
+           __pid_t si_pid;     /* Sending process ID.  */
+           __uid_t si_uid;     /* Real user ID of sending process.  */
+         } _kill;
+
+       /* POSIX.1b timers.  */
+       struct
+         {
+           unsigned int _timer1;
+           unsigned int _timer2;
+         } _timer;
+
+       /* POSIX.1b signals.  */
+       struct
+         {
+           __pid_t si_pid;     /* Sending process ID.  */
+           __uid_t si_uid;     /* Real user ID of sending process.  */
+           sigval_t si_sigval; /* Signal value.  */
+         } _rt;
+
+       /* SIGCHLD.  */
+       struct
+         {
+           __pid_t si_pid;     /* Which child.  */
+           __uid_t si_uid;     /* Real user ID of sending process.  */
+           int si_status;      /* Exit value or signal.  */
+           __clock_t si_utime;
+           __clock_t si_stime;
+         } _sigchld;
+
+       /* SIGILL, SIGFPE, SIGSEGV, SIGBUS.  */
+       struct
+         {
+           void *si_addr;      /* Faulting insn/memory ref.  */
+           int si_trapno;
+         } _sigfault;
+
+       /* SIGPOLL.  */
+       struct
+         {
+           int si_band;        /* Band event for SIGPOLL.  */
+           int si_fd;
+         } _sigpoll;
+      } _sifields;
+  } siginfo_t;
+
+
+/* X/Open requires some more fields with fixed names.  */
+# define si_pid                _sifields._kill.si_pid
+# define si_uid                _sifields._kill.si_uid
+# define si_timer1     _sifields._timer._timer1
+# define si_timer2     _sifields._timer._timer2
+# define si_status     _sifields._sigchld.si_status
+# define si_utime      _sifields._sigchld.si_utime
+# define si_stime      _sifields._sigchld.si_stime
+# define si_value      _sifields._rt.si_sigval
+# define si_int                _sifields._rt.si_sigval.sival_int
+# define si_ptr                _sifields._rt.si_sigval.sival_ptr
+# define si_addr       _sifields._sigfault.si_addr
+# define si_trapno     _sifields._sigfault.si_trapno
+# define si_band       _sifields._sigpoll.si_band
+# define si_fd         _sifields._sigpoll.si_fd
+
+
+/* Values for `si_code'.  Positive values are reserved for kernel-generated
+   signals.  */
+enum
+{
+  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
+  SI_TIMER,                    /* Sent by timer expiration.  */
+# define SI_TIMER      SI_TIMER
+  SI_QUEUE,                    /* Sent by sigqueue.  */
+# define SI_QUEUE      SI_QUEUE
+  SI_USER,                     /* Sent by kill, sigsend, raise.  */
+# define SI_USER       SI_USER
+  SI_KERNEL = 0x80             /* Send by kernel.  */
+#define SI_KERNEL      SI_KERNEL
+};
+
+
+/* `si_code' values for SIGILL signal.  */
+enum
+{
+  ILL_ILLOPC = 1,              /* Illegal opcode.  */
+# define ILL_ILLOPC    ILL_ILLOPC
+  ILL_ILLOPN,                  /* Illegal operand.  */
+# define ILL_ILLOPN    ILL_ILLOPN
+  ILL_ILLADR,                  /* Illegal addressing mode.  */
+# define ILL_ILLADR    ILL_ILLADR
+  ILL_ILLTRP,                  /* Illegal trap. */
+# define ILL_ILLTRP    ILL_ILLTRP
+  ILL_PRVOPC,                  /* Privileged opcode.  */
+# define ILL_PRVOPC    ILL_PRVOPC
+  ILL_PRVREG,                  /* Privileged register.  */
+# define ILL_PRVREG    ILL_PRVREG
+  ILL_COPROC,                  /* Coprocessor error.  */
+# define ILL_COPROC    ILL_COPROC
+  ILL_BADSTK                   /* Internal stack error.  */
+# define ILL_BADSTK    ILL_BADSTK
+};
+
+/* `si_code' values for SIGFPE signal.  */
+enum
+{
+  FPE_INTDIV = 1,              /* Integer divide by zero.  */
+# define FPE_INTDIV    FPE_INTDIV
+  FPE_INTOVF,                  /* Integer overflow.  */
+# define FPE_INTOVF    FPE_INTOVF
+  FPE_FLTDIV,                  /* Floating point divide by zero.  */
+# define FPE_FLTDIV    FPE_FLTDIV
+  FPE_FLTOVF,                  /* Floating point overflow.  */
+# define FPE_FLTOVF    FPE_FLTOVF
+  FPE_FLTUND,                  /* Floating point underflow.  */
+# define FPE_FLTUND    FPE_FLTUND
+  FPE_FLTRES,                  /* Floating point inexact result.  */
+# define FPE_FLTRES    FPE_FLTRES
+  FPE_FLTINV,                  /* Floating point invalid operation.  */
+# define FPE_FLTINV    FPE_FLTINV
+  FPE_FLTSUB                   /* Subscript out of range.  */
+# define FPE_FLTSUB    FPE_FLTSUB
+};
+
+/* `si_code' values for SIGSEGV signal.  */
+enum
+{
+  SEGV_MAPERR = 1,             /* Address not mapped to object.  */
+# define SEGV_MAPERR   SEGV_MAPERR
+  SEGV_ACCERR                  /* Invalid permissions for mapped object.  */
+# define SEGV_ACCERR   SEGV_ACCERR
+};
+
+/* `si_code' values for SIGBUS signal.  */
+enum
+{
+  BUS_ADRALN = 1,              /* Invalid address alignment.  */
+# define BUS_ADRALN    BUS_ADRALN
+  BUS_ADRERR,                  /* Non-existant physical address.  */
+# define BUS_ADRERR    BUS_ADRERR
+  BUS_OBJERR                   /* Object specific hardware error.  */
+# define BUS_OBJERR    BUS_OBJERR
+};
+
+/* `si_code' values for SIGTRAP signal.  */
+enum
+{
+  TRAP_BRKPT = 1,              /* Process breakpoint.  */
+# define TRAP_BRKPT    TRAP_BRKPT
+  TRAP_TRACE                   /* Process trace trap.  */
+# define TRAP_TRACE    TRAP_TRACE
+};
+
+/* `si_code' values for SIGCHLD signal.  */
+enum
+{
+  CLD_EXITED = 1,              /* Child has exited.  */
+# define CLD_EXITED    CLD_EXITED
+  CLD_KILLED,                  /* Child was killed.  */
+# define CLD_KILLED    CLD_KILLED
+  CLD_DUMPED,                  /* Child terminated abnormally.  */
+# define CLD_DUMPED    CLD_DUMPED
+  CLD_TRAPPED,                 /* Traced child has trapped.  */
+# define CLD_TRAPPED   CLD_TRAPPED
+  CLD_STOPPED,                 /* Child has stopped.  */
+# define CLD_STOPPED   CLD_STOPPED
+  CLD_CONTINUED                        /* Stopped child has continued.  */
+# define CLD_CONTINUED CLD_CONTINUED
+};
+
+/* `si_code' values for SIGPOLL signal.  */
+enum
+{
+  POLL_IN = 1,                 /* Data input available.  */
+# define POLL_IN       POLL_IN
+  POLL_OUT,                    /* Output buffers available.  */
+# define POLL_OUT      POLL_OUT
+  POLL_MSG,                    /* Input message available.   */
+# define POLL_MSG      POLL_MSG
+  POLL_ERR,                    /* I/O error.  */
+# define POLL_ERR      POLL_ERR
+  POLL_PRI,                    /* High priority input available.  */
+# define POLL_PRI      POLL_PRI
+  POLL_HUP                     /* Device disconnected.  */
+# define POLL_HUP      POLL_HUP
+};
+
+/* `si_code' values for SIGEMT signal.  */
+enum
+{
+  EMT_TAGOVF = 1               /* Tag overflow.  */
+# define EMT_TAGOVF    EMT_TAGOVF
+};
+
+# undef __need_siginfo_t
+#endif /* !have siginfo_t && (have _SIGNAL_H || need siginfo_t).  */
+
+
+#if defined _SIGNAL_H && !defined __have_sigevent_t
+# define __have_sigevent_t     1
+
+/* Structure to transport application-defined values with signals.  */
+# define __SIGEV_MAX_SIZE      64
+# if __WORDSIZE == 64
+#  define __SIGEV_PAD_SIZE     ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
+# else
+#  define __SIGEV_PAD_SIZE     ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
+# endif
+
+typedef struct sigevent
+  {
+    sigval_t sigev_value;
+    int sigev_signo;
+    int sigev_notify;
+
+    union
+      {
+       int _pad[__SIGEV_PAD_SIZE];
+
+       struct
+         {
+           void (*_function) (sigval_t);         /* Function to start.  */
+           void *_attribute;                     /* Really pthread_attr_t.  */
+         } _sigev_thread;
+      } _sigev_un;
+  } sigevent_t;
+
+/* POSIX names to access some of the members.  */
+# define sigev_notify_function   _sigev_un._sigev_thread._function
+# define sigev_notify_attributes _sigev_un._sigev_thread._attribute
+
+/* `sigev_notify' values.  */
+enum
+{
+  SIGEV_SIGNAL = 0,            /* Notify via signal.  */
+# define SIGEV_SIGNAL  SIGEV_SIGNAL
+  SIGEV_NONE,                  /* Other notification: meaningless.  */
+# define SIGEV_NONE    SIGEV_NONE
+  SIGEV_THREAD                 /* Deliver via thread creation.  */
+# define SIGEV_THREAD  SIGEV_THREAD
+};
+
+#endif /* have _SIGNAL_H.  */
index 5f472d5..d08c1a9 100644 (file)
@@ -9,7 +9,8 @@ s_setgid        setgid  setgid          1       __syscall_setgid
 s_setgroups    setgroups setgroups     2       __syscall_setgroups
 s_setregid     setregid setregid       2       __syscall_setregid
 s_setreuid     setreuid setreuid       2       __syscall_setreuid
-s_setrlimit    setrlimit setrlimit     3       __syscall_setrlimit
+setrlimit      -       setrlimit       3       setrlimit
+getrlimit      -       getrlimit       2       __getrlimit     getrlimit
 s_ipc          msgget  ipc             5       __syscall_ipc
 s_setuid       setuid  setuid          1       __syscall_setuid
 setresuid      EXTRA   setresuid32     3       __setresuid     setresuid
@@ -32,7 +33,6 @@ s_getdents    getdents getdents       3       __syscall_getdents
 s_getpriority  getpriority getpriority 2       __syscall_getpriority
 s_getresgid    getresgid getresgid     3       __syscall_getresgid
 s_getresuid    getresuid getresuid     3       __syscall_getresuid
-s_getrlimit    getrlimit getrlimit     2       __syscall_getrlimit
 s_lstat64      lxstat64 lstat64        2       __syscall_lstat64
 s_mmap2                mmap64  mmap2           6       __syscall_mmap2
 s_poll         poll    poll            3       __syscall_poll
index 8fc6c93..ad104f6 100644 (file)
@@ -51,7 +51,6 @@ s_ipc         msgget  ipc             5       __syscall_ipc
 s_poll         poll    poll            3       __syscall_poll
 s_ptrace       ptrace  ptrace          4       __syscall_ptrace
 s_reboot       reboot  reboot          3       __syscall_reboot
-s_setrlimit    setrlimit setrlimit     3       __syscall_setrlimit
 s_sigaction    sigaction sigaction     3       __syscall_sigaction
 s_sigpending   sigpending sigpending   1       __syscall_sigpending
 s_sigprocmask  sigprocmask sigprocmask 3       __syscall_sigprocmask