Mail Archives: cygwin/2009/03/27/03:36:13
--------------040408020409020706060906
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Yaakov (Cygwin/X) wrote:
> Actually, it looks like someone already thought about that, but never
> enabled it. There is a commented-out #ifndef __STRICT_ANSI__ which
> excludes about half of sys/signal.h. *UNTESTED* patch attached.
That doesn't work, because we need the _sig_func_ptr typedef regardless
of -ansi:
/usr/include/signal.h:17: error: expected ',' or ';' before '_signal_r'
/usr/include/signal.h:21: error: expected ',' or ';' before 'signal'
Take two attached.
Yaakov
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEAREIAAYFAknMj+cACgkQpiWmPGlmQSMdvgCfY2m10bjOBb8nr9lnzIjucxuS
+EoAoOuRLRe7/8OfhuK2Mz3zfQSn3hCe
=Ez8A
-----END PGP SIGNATURE-----
--------------040408020409020706060906
Content-Type: text/x-patch;
name="newlib-ansi-signal.h.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="newlib-ansi-signal.h.patch"
Index: libc/include/sys/signal.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/include/sys/signal.h,v
retrieving revision 1.18
diff -u -r1.18 signal.h
--- libc/include/sys/signal.h 18 Apr 2006 20:06:09 -0000 1.18
+++ libc/include/sys/signal.h 27 Mar 2009 08:22:15 -0000
@@ -9,7 +9,13 @@
#include "_ansi.h"
#include <sys/features.h>
-/* #ifndef __STRICT_ANSI__*/
+#if defined(__rtems__)
+typedef void (*_sig_func_ptr)();
+#else
+typedef void (*_sig_func_ptr)(int);
+#endif
+
+#ifndef __STRICT_ANSI__
#if defined(_POSIX_THREADS)
#include <sys/types.h> /* for pthread data types */
@@ -83,8 +89,6 @@
* application should not use both simultaneously.
*/
-typedef void (*_sig_func_ptr)();
-
struct sigaction {
int sa_flags; /* Special flags to affect behavior of signal */
sigset_t sa_mask; /* Additional set of signals to be blocked */
@@ -108,8 +112,6 @@
#else
#define SA_NOCLDSTOP 1 /* only value supported now for sa_flags */
-typedef void (*_sig_func_ptr)(int);
-
struct sigaction
{
_sig_func_ptr sa_handler;
@@ -187,7 +189,7 @@
#endif /* defined(__CYGWIN__) || defined(__rtems__) */
-/* #endif __STRICT_ANSI__ */
+#endif /* __STRICT_ANSI__ */
#if defined(___AM29K__)
/* These all need to be defined for ANSI C, but I don't think they are
--------------040408020409020706060906
Content-Type: text/x-patch;
name="cygwin-ansi-signal.h.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="cygwin-ansi-signal.h.patch"
Index: include/cygwin/signal.h
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/include/cygwin/signal.h,v
retrieving revision 1.17
diff -u -r1.17 signal.h
--- include/cygwin/signal.h 11 Sep 2008 06:22:31 -0000 1.17
+++ include/cygwin/signal.h 27 Mar 2009 08:34:48 -0000
@@ -190,8 +190,6 @@
perform notification */
};
-typedef void (*_sig_func_ptr)(int);
-
struct sigaction
{
__extension__ union
Index: include/sys/select.h
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/include/sys/select.h,v
retrieving revision 1.3
diff -u -r1.3 select.h
--- include/sys/select.h 19 Apr 2005 08:32:59 -0000 1.3
+++ include/sys/select.h 27 Mar 2009 08:34:48 -0000
@@ -12,7 +12,7 @@
#ifndef _SYS_SELECT_H
#define _SYS_SELECT_H
-#if !defined (_POSIX_SOURCE) && !defined (__INSIDE_CYGWIN_NET__)
+#if !defined (__STRICT_ANSI__) && !defined (_POSIX_SOURCE) && !defined (__INSIDE_CYGWIN_NET__)
#include <sys/cdefs.h>
--------------040408020409020706060906
Content-Type: text/plain; charset=us-ascii
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
--------------040408020409020706060906--
- Raw text -