This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

sig_t typedef


BSD uses the name sig_t for the return type of signal()[1], and glibc
provides this typedef alongside its own sighandler_t[2].  Patch
attached.


Yaakov

[1] http://fuse4bsd.creo.hu/localcgi/man-cgi.cgi?signal+3
[2] http://www.kernel.org/doc/man-pages/online/pages/man2/signal.2.html

2011-01-11  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>

	* libc/include/linux/sys/signal.h (sig_t): Move from here...
	* libc/include/signal.h (sig_t): ...to here.

Index: libc/include/signal.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/include/signal.h,v
retrieving revision 1.5
diff -u -r1.5 signal.h
--- libc/include/signal.h	13 Jul 2010 11:18:55 -0000	1.5
+++ libc/include/signal.h	12 Jan 2011 00:34:57 -0000
@@ -8,6 +8,7 @@
 
 typedef int	sig_atomic_t;		/* Atomic entity type (ANSI) */
 #ifndef _POSIX_SOURCE
+typedef _sig_func_ptr sig_t;		/* BSD naming */
 typedef _sig_func_ptr sighandler_t;	/* glibc naming */
 #endif /* !_POSIX_SOURCE */
 
Index: libc/sys/linux/sys/signal.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/sys/linux/sys/signal.h,v
retrieving revision 1.7
diff -u -r1.7 signal.h
--- libc/sys/linux/sys/signal.h	24 Jul 2002 18:18:07 -0000	1.7
+++ libc/sys/linux/sys/signal.h	12 Jan 2011 00:34:58 -0000
@@ -50,7 +50,6 @@
 
 #ifndef _POSIX_SOURCE
 extern const char *const sys_siglist[];
-typedef __sighandler_t sig_t; /* BSDism */
 #endif
 
 #endif

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]