about summary refs log tree commit diff
path: root/sysdeps/generic
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/generic')
-rw-r--r--sysdeps/generic/paths.h3
-rw-r--r--sysdeps/generic/sigset.h34
-rw-r--r--sysdeps/generic/utmpbits.h30
-rw-r--r--sysdeps/generic/waitstatus.h4
4 files changed, 31 insertions, 40 deletions
diff --git a/sysdeps/generic/paths.h b/sysdeps/generic/paths.h
index 12e12b3a99..a2ff426753 100644
--- a/sysdeps/generic/paths.h
+++ b/sysdeps/generic/paths.h
@@ -50,6 +50,7 @@
 #define	_PATH_DRUM	"/dev/drum"
 #define	_PATH_KMEM	"/dev/kmem"
 #define	_PATH_MAILDIR	"/var/mail"
+#define	_PATH_LASTLOG	"/var/log/lastlog"
 #define	_PATH_MAN	"/usr/man"
 #define	_PATH_MEM	"/dev/mem"
 #define	_PATH_MNTTAB    "/etc/fstab"
@@ -60,7 +61,9 @@
 #define	_PATH_SHELLS	"/etc/shells"
 #define	_PATH_TTY	"/dev/tty"
 #define	_PATH_UNIX	"/vmunix"
+#define	_PATH_UTMP	"/var/run/utmp"
 #define	_PATH_VI	"/usr/bin/vi"
+#define	_PATH_WTMP	"/var/log/wtmp"
 
 /* Provide trailing slash, since mostly used for building pathnames. */
 #define	_PATH_DEV	"/dev/"
diff --git a/sysdeps/generic/sigset.h b/sysdeps/generic/sigset.h
index 361d157bf5..a137d428c3 100644
--- a/sysdeps/generic/sigset.h
+++ b/sysdeps/generic/sigset.h
@@ -37,6 +37,10 @@ typedef unsigned long int __sigset_t;
 #if !defined (_SIGSET_H_fns) && defined (_SIGNAL_H)
 #define _SIGSET_H_fns 1
 
+#ifndef _EXTERN_INLINE
+#define _EXTERN_INLINE extern __inline
+#endif
+
 /* Return a mask that includes SIG only.  The cast to `sigset_t' avoids
    overflow if `sigset_t' is wider than `int'.  */
 #define	__sigmask(sig)	(((__sigset_t) 1) << ((sig) - 1))
@@ -44,38 +48,24 @@ typedef unsigned long int __sigset_t;
 #define	__sigemptyset(set)	((*(set) = (__sigset_t) 0), 0)
 #define	__sigfillset(set)	((*(set) = ~(__sigset_t) 0), 0)
 
-/* These functions must check for a bogus signal number.  We detect it by a
-   zero sigmask, since a number too low or too high will have shifted the 1
-   off the high end of the mask.  If we find an error, we punt to a random
-   call we know fails with EINVAL (kludge city!), so as to avoid referring
-   to `errno' in this file (sigh).  */
+/* These functions needn't check for a bogus signal number -- error
+   checking is done in the non __ versions.  */
 
 extern int __sigismember (__const __sigset_t *, int);
 extern int __sigaddset (__sigset_t *, int);
 extern int __sigdelset (__sigset_t *, int);
 
-#ifndef _EXTERN_INLINE
-#define _EXTERN_INLINE extern __inline
-#endif
 #define __SIGSETFN(NAME, BODY, CONST)					      \
   _EXTERN_INLINE int							      \
-  __##NAME (CONST __sigset_t *__set, int __sig)				      \
+  NAME (CONST __sigset_t *__set, int __sig)				      \
   {									      \
-    if (__sig < 1 || __sig > (int) sizeof (__sigset_t) * 8)		      \
-      {									      \
-	extern int raise (int);						      \
-	return raise (-1);						      \
-      }									      \
-    else								      \
-      {									      \
-	__sigset_t __mask = __sigmask (__sig);				      \
-	return BODY;							      \
-      }									      \
+    __sigset_t __mask = __sigmask (__sig);				      \
+    return BODY;							      \
   }
 
-__SIGSETFN (sigismember, (*__set & __mask) ? 1 : 0, __const)
-__SIGSETFN (sigaddset, ((*__set |= __mask), 0), )
-__SIGSETFN (sigdelset, ((*__set &= ~__mask), 0), )
+__SIGSETFN (__sigismember, (*__set & __mask) ? 1 : 0, __const)
+__SIGSETFN (__sigaddset, ((*__set |= __mask), 0), )
+__SIGSETFN (__sigdelset, ((*__set &= ~__mask), 0), )
 
 #undef __SIGSETFN
 
diff --git a/sysdeps/generic/utmpbits.h b/sysdeps/generic/utmpbits.h
index b3fb36ab4a..cbd3457bd4 100644
--- a/sysdeps/generic/utmpbits.h
+++ b/sysdeps/generic/utmpbits.h
@@ -1,31 +1,29 @@
 /* The `struct utmp' type, describing entries in the utmp file.  Generic/BSDish
-Copyright (C) 1993, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1993, 1996 Free Software Foundation, Inc.
 
-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 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.
+   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.  */
+   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 _UTMPBITS_H
 
 #define _UTMPBITS_H	1
 #include <features.h>
 
+#include <paths.h>
 #include <time.h>
 
-#define	_PATH_UTMP	"/var/run/utmp"
-#define	_PATH_WTMP	"/var/log/wtmp"
-#define	_PATH_LASTLOG	"/var/log/lastlog"
 
 #define	UT_NAMESIZE	8
 #define	UT_LINESIZE	8
diff --git a/sysdeps/generic/waitstatus.h b/sysdeps/generic/waitstatus.h
index 5cd8b318bb..4fbcbe87aa 100644
--- a/sysdeps/generic/waitstatus.h
+++ b/sysdeps/generic/waitstatus.h
@@ -37,8 +37,8 @@
 /* Nonzero if STATUS indicates termination by a signal.  */
 #ifdef	__GNUC__
 #define	__WIFSIGNALED(status)						      \
-  (__extension__ ({ int __stat = (status);				      \
-		    !__WIFSTOPPED(__stat) && !__WIFEXITED(__stat); }))
+  (__extension__ ({ int __status = (status);				      \
+		    !__WIFSTOPPED(__status) && !__WIFEXITED(__status); }))
 #else	/* Not GCC.  */
 #define	__WIFSIGNALED(status)	(!__WIFSTOPPED(status) && !__WIFEXITED(status))
 #endif	/* GCC.  */