about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/i386/i486/bits/string.h12
-rw-r--r--sysdeps/unix/sysv/linux/ia64/bits/sigaction.h2
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/bits/sigaction.h2
-rw-r--r--sysdeps/unix/sysv/linux/sh/Makefile1
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/sigaction.h2
-rw-r--r--sysdeps/unix/sysv/linux/ulimit.c14
6 files changed, 23 insertions, 10 deletions
diff --git a/sysdeps/i386/i486/bits/string.h b/sysdeps/i386/i486/bits/string.h
index 07757ec389..d1c8d8a71d 100644
--- a/sysdeps/i386/i486/bits/string.h
+++ b/sysdeps/i386/i486/bits/string.h
@@ -545,13 +545,13 @@ __strlen_g (__const char *__str)
 #define strcpy(dest, src) \
   (__extension__ (__builtin_constant_p (src)				      \
 		  ? (sizeof ((src)[0]) == 1 && strlen (src) + 1 <= 8	      \
-		     ? __strcpy_small (dest, src, strlen (src) + 1)	      \
+		     ? __strcpy_a_small (dest, src, strlen (src) + 1)	      \
 		     : (char *) memcpy ((char *) dest,			      \
 					(__const char *) src,		      \
 					strlen (src) + 1))		      \
 		  : __strcpy_g (dest, src)))
 
-#define __strcpy_small(dest, src, srclen) \
+#define __strcpy_a_small(dest, src, srclen) \
   (__extension__ ({ char *__dest = (dest);				      \
 		    union {						      \
 		      unsigned int __ui;				      \
@@ -629,7 +629,7 @@ __strcpy_g (char *__dest, __const char *__src)
 # define __stpcpy(dest, src) \
   (__extension__ (__builtin_constant_p (src)				      \
 		  ? (strlen (src) + 1 <= 8				      \
-		     ? __stpcpy_small (dest, src, strlen (src) + 1)	      \
+		     ? __stpcpy_a_small (dest, src, strlen (src) + 1)	      \
 		     : __stpcpy_c (dest, src, strlen (src) + 1))	      \
 		  : __stpcpy_g (dest, src)))
 # define __stpcpy_c(dest, src, srclen) \
@@ -642,7 +642,7 @@ __strcpy_g (char *__dest, __const char *__src)
 /* In glibc itself we use this symbol for namespace reasons.  */
 # define stpcpy(dest, src) __stpcpy (dest, src)
 
-# define __stpcpy_small(dest, src, srclen) \
+# define __stpcpy_a_small(dest, src, srclen) \
   (__extension__ ({ union {						      \
 		      unsigned int __ui;				      \
 		      unsigned short int __usi;				      \
@@ -1441,6 +1441,7 @@ __strrchr_g (__const char *__s, int __c)
 
 __STRING_INLINE size_t __strcspn_c1 (__const char *__s, int __reject);
 
+#ifndef _FORCE_INLINES
 __STRING_INLINE size_t
 __strcspn_c1 (__const char *__s, int __reject)
 {
@@ -1460,6 +1461,7 @@ __strcspn_c1 (__const char *__s, int __reject)
      : "cc");
   return (__res - 1) - __s;
 }
+#endif
 
 __STRING_INLINE size_t __strcspn_cg (__const char *__s, __const char __reject[],
 				    size_t __reject_len);
@@ -1556,6 +1558,7 @@ __strcspn_g (__const char *__s, __const char *__reject)
 			: __strspn_cg (s, accept, strlen (accept))))	      \
 		  : __strspn_g (s, accept)))
 
+#ifndef _FORCE_INLINES
 __STRING_INLINE size_t __strspn_c1 (__const char *__s, int __accept);
 
 __STRING_INLINE size_t
@@ -1575,6 +1578,7 @@ __strspn_c1 (__const char *__s, int __accept)
      : "cc");
   return (__res - 1) - __s;
 }
+#endif
 
 __STRING_INLINE size_t __strspn_cg (__const char *__s, __const char __accept[],
 				    size_t __accept_len);
diff --git a/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h b/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h
index 9b1aafb02d..c34fcc4037 100644
--- a/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h
@@ -50,7 +50,7 @@ struct sigaction
 /* Bits in `sa_flags'.  */
 #define SA_NOCLDSTOP  0x00000001 /* Don't send SIGCHLD when children stop.  */
 #define SA_SIGINFO    0x00000004
-#ifdef __USE_MISC
+#if defined __USE_UNIX98 || defined __USE_MISC
 # define SA_ONSTACK   0x08000000 /* Use signal stack by using `sa_restorer'. */
 # define SA_RESTART   0x10000000 /* Restart syscall on signal return.  */
 # define SA_NODEFER   0x40000000 /* Don't automatically block the signal
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/bits/sigaction.h b/sysdeps/unix/sysv/linux/s390/s390-64/bits/sigaction.h
index 43738b2654..38af8d8654 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/bits/sigaction.h
@@ -53,7 +53,7 @@ struct sigaction
 /* Bits in `sa_flags'.	*/
 #define SA_NOCLDSTOP  0x00000001 /* Don't send SIGCHLD when children stop.  */
 #define SA_SIGINFO    0x00000004
-#ifdef __USE_MISC
+#if defined __USE_UNIX98 || defined __USE_MISC
 # define SA_ONSTACK   0x08000000 /* Use signal stack by using `sa_restorer'. */
 # define SA_RESTART   0x10000000 /* Restart syscall on signal return.  */
 # define SA_NODEFER   0x40000000 /* Don't automatically block the signal
diff --git a/sysdeps/unix/sysv/linux/sh/Makefile b/sysdeps/unix/sysv/linux/sh/Makefile
index 57cd3d9e94..0929c7c324 100644
--- a/sysdeps/unix/sysv/linux/sh/Makefile
+++ b/sysdeps/unix/sysv/linux/sh/Makefile
@@ -4,6 +4,7 @@ endif
 
 ifeq ($(subdir),misc)
 sysdep_routines += setfsgid setfsuid setresgid setresuid
+sysdep_headers += sys/io.h
 endif
 
 ifeq ($(subdir),signal)
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/sigaction.h b/sysdeps/unix/sysv/linux/sparc/bits/sigaction.h
index e5cf753c70..ee4196764d 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/sigaction.h
@@ -56,7 +56,7 @@ struct sigaction
 #define SA_NOCLDWAIT 0x00000100  /* Don't create zombie on child death.  */
 #define SA_SIGINFO   0x00000200  /* Invoke signal-catching function with
 				    three arguments instead of one.  */
-#ifdef __USE_MISC
+#if defined __USE_UNIX98 || defined __USE_MISC
 # define SA_ONSTACK   0x00000001 /* Use signal stack by using `sa_restorer'. */
 # define SA_RESTART   0x00000002 /* Restart syscall on signal return.  */
 # define SA_INTERRUPT 0x00000010 /* Historical no-op.  */
diff --git a/sysdeps/unix/sysv/linux/ulimit.c b/sysdeps/unix/sysv/linux/ulimit.c
index c2481f5c8a..9c309c371d 100644
--- a/sysdeps/unix/sysv/linux/ulimit.c
+++ b/sysdeps/unix/sysv/linux/ulimit.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,94,95,96,97,98,2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,1994-1998,2000,2001 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
@@ -55,8 +55,16 @@ __ulimit (int cmd, ...)
       {
 	long int newlimit = va_arg (va, long int);
 
-	limit.rlim_cur = newlimit * 512;
-	limit.rlim_max = newlimit * 512;
+	if ((rlim_t) newlimit > RLIM_INFINITY / 512)
+	  {
+	    limit.rlim_cur = RLIM_INFINITY;
+	    limit.rlim_max = RLIM_INFINITY;
+	  }
+	else
+	  {
+	    limit.rlim_cur = newlimit * 512;
+	    limit.rlim_max = newlimit * 512;
+	  }
 
 	result = __setrlimit (RLIMIT_FSIZE, &limit);
       }