about summary refs log tree commit diff
path: root/bits
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2012-07-30 16:09:11 -0700
committerRoland McGrath <roland@hack.frob.com>2012-07-30 16:34:33 -0700
commitbea9b19322c77265033a068ac60c95a37e798a80 (patch)
treed3fad60d4780a5d86fe5dbedd994c3cd7625890b /bits
parentfc56c5bbc1a0d56b9b49171dd377c73c268ebcfd (diff)
downloadglibc-bea9b19322c77265033a068ac60c95a37e798a80.tar.gz
glibc-bea9b19322c77265033a068ac60c95a37e798a80.tar.xz
glibc-bea9b19322c77265033a068ac60c95a37e798a80.zip
Fix lots of bitrot for stub configurations.
Diffstat (limited to 'bits')
-rw-r--r--bits/libc-lock.h6
-rw-r--r--bits/signum.h69
-rw-r--r--bits/stat.h9
3 files changed, 51 insertions, 33 deletions
diff --git a/bits/libc-lock.h b/bits/libc-lock.h
index d7c49e7bb5..87948d5b50 100644
--- a/bits/libc-lock.h
+++ b/bits/libc-lock.h
@@ -129,12 +129,12 @@
 typedef int __libc_key_t;
 
 /* Create key for thread specific data.  */
-#define __libc_key_create(KEY,DEST) -1
+#define __libc_key_create(KEY,DEST)	((void) (KEY), (void) (DEST), -1)
 
 /* Set thread-specific data associated with KEY to VAL.  */
-#define __libc_setspecific(KEY,VAL) ((void)0)
+#define __libc_setspecific(KEY,VAL)	((void) (KEY), (void) (VAL))
 
 /* Get thread-specific data associated with KEY.  */
-#define __libc_getspecific(KEY) 0
+#define __libc_getspecific(KEY)		((void) (KEY), (void *) 0)
 
 #endif	/* bits/libc-lock.h */
diff --git a/bits/signum.h b/bits/signum.h
index 48bb7b8050..0a0acb23af 100644
--- a/bits/signum.h
+++ b/bits/signum.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991, 1993, 1996, 1998 Free Software Foundation, Inc.
+/* Signal number constants.  Generic version.
+   Copyright (C) 1991-2012 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
@@ -27,37 +28,49 @@
 # define SIG_HOLD ((__sighandler_t)  2)	/* Add signal to hold mask.  */
 #endif
 
-/* Signals in the 1-15 range are defined with their historical numbers.
-   Signals in the 20-25 range are relatively new and have no ingrained
-   numbers. */
+/* We define here all the signal names listed in POSIX (1003.1-2008).
+   Signals in the 1-15 range are defined with their historical numbers.
+   For other signals specified by POSIX, we use the BSD numbers.  */
 
-/* ANSI signals.  */
-#define	SIGINT	2	/* Interactive attention signal.  */
-#define	SIGILL	4	/* Illegal instruction.  */
-#define	SIGABRT	6	/* Abnormal termination.  */
-#define	SIGFPE	8	/* Erroneous arithmetic operation.  */
-#define	SIGSEGV	11	/* Invalid access to storage.  */
-#define	SIGTERM	15	/* Termination request.  */
+/* ISO C99 signals.  */
+#define	SIGINT		2	/* Interactive attention signal.  */
+#define	SIGILL		4	/* Illegal instruction.  */
+#define	SIGABRT		6	/* Abnormal termination.  */
+#define	SIGFPE		8	/* Erroneous arithmetic operation.  */
+#define	SIGSEGV		11	/* Invalid access to storage.  */
+#define	SIGTERM		15	/* Termination request.  */
 
 /* Historical signals specified by POSIX. */
-#define	SIGHUP	1	/* Hangup.  */
-#define	SIGQUIT	3	/* Quit.  */
-#define	SIGKILL	9	/* Kill (cannot be blocked, caught, or ignored).  */
-#define	SIGPIPE	13	/* Broken pipe.  */
-#define	SIGALRM	14	/* Alarm clock.  */
-
-/* New(er) POSIX signals. */
-#define	SIGSTOP	20	/* Stop (cannot be blocked, caught, or ignored).  */
-#define	SIGCONT	21	/* Continue.  */
-#define	SIGTSTP	22	/* Keyboard stop.  */
-#define	SIGTTIN	23	/* Background read from control terminal.  */
-#define	SIGTTOU	24	/* Background write to control terminal.  */
-#define	SIGCHLD	25	/* Child terminated or stopped.  */
-
-#define	_NSIG	26
+#define	SIGHUP		1	/* Hangup.  */
+#define	SIGQUIT		3	/* Quit.  */
+#define	SIGTRAP		5	/* Trace/breakpoint trap.  */
+#define	SIGKILL		9	/* Killed.  */
+#define SIGBUS		10	/* Bus error.  */
+#define	SIGSYS		12	/* Bad system call.  */
+#define	SIGPIPE		13	/* Broken pipe.  */
+#define	SIGALRM		14	/* Alarm clock.  */
+
+/* New(er) POSIX signals (1003.1-2008).  */
+#define	SIGURG		16 /* High bandwidth data is available at a socket.  */
+#define	SIGSTOP		17	/* Stopped (signal).  */
+#define	SIGTSTP		18	/* Stopped.  */
+#define	SIGCONT		19	/* Continued.  */
+#define	SIGCHLD		20	/* Child terminated or stopped.  */
+#define	SIGTTIN		21	/* Background read from control terminal.  */
+#define	SIGTTOU		22	/* Background write to control terminal.  */
+#define	SIGPOLL 	23	/* Pollable event occurred (System V).  */
+#define	SIGIO		SIGPOLL /* I/O now possible (4.2 BSD).  */
+#define	SIGXCPU		24	/* CPU time limit exceeded.  */
+#define	SIGXFSZ		25	/* File size limit exceeded.  */
+#define	SIGVTALRM	26	/* Virtual timer expired.  */
+#define	SIGPROF		27	/* Profiling timer expired.  */
+#define	SIGUSR1		30	/* User-defined signal 1.  */
+#define	SIGUSR2		31	/* User-defined signal 2.  */
+
+#define	_NSIG		32
 
 /* Archaic names for compatibility. */
-#define	SIGIOT  SIGABRT	/* IOT instruction, abort() on a PDP11 */
-#define	SIGCLD  SIGCHLD	/* Old System V name */
+#define	SIGIOT		SIGABRT	/* IOT instruction, abort() on a PDP11 */
+#define	SIGCLD		SIGCHLD	/* Old System V name */
 
 #endif	/* <signal.h> included.  */
diff --git a/bits/stat.h b/bits/stat.h
index 06b4816c81..b9495c52e2 100644
--- a/bits/stat.h
+++ b/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1996, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2012 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
@@ -15,10 +15,13 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef _SYS_STAT_H
+#if !defined _SYS_STAT_H && !defined _FCNTL_H
 # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
 #endif
 
+#ifndef _BITS_STAT_H
+#define _BITS_STAT_H	1
+
 /* This structure needs to be defined in accordance with the
    implementation of __stat, __fstat, and __lstat.  */
 
@@ -96,3 +99,5 @@ struct stat64
     __time_t st_ctime;		/* Time of last status change.  */
   };
 #endif
+
+#endif	/* bits/stat.h */