]> sourceware.org Git - newlib-cygwin.git/commitdiff
* libc/include/sys/features.h: Add appropriate defines for Cygwin pthread
authorChristopher Faylor <me@cgf.cx>
Thu, 12 Apr 2001 00:05:57 +0000 (00:05 +0000)
committerChristopher Faylor <me@cgf.cx>
Thu, 12 Apr 2001 00:05:57 +0000 (00:05 +0000)
support.
* libc/include/sys/signal.h: Remove unneeded __CYGWIN__ protection.
* libc/include/sys/types.h: Protect __CYGWIN__ from the rtems pthreads types.
Include <cygwin/types.h> for the cygwin specific typedefs.

newlib/ChangeLog
newlib/libc/include/sys/features.h
newlib/libc/include/sys/signal.h
newlib/libc/include/sys/types.h

index 46746a42f03adc9a46944088581c9e0c9d298e20..01c94e16920bc817773d9410c3d9d1677023a47f 100644 (file)
@@ -1,3 +1,11 @@
+2001-04-12  Robert Collins <rbtcollins@hotmail.com>
+
+       * libc/include/sys/features.h: Add appropriate defines for Cygwin
+       pthread support.
+       * libc/include/sys/signal.h: Remove unneeded __CYGWIN__ protection.
+       * libc/include/sys/types.h: Protect __CYGWIN__ from the rtems pthreads
+       types.  Include <cygwin/types.h> for the cygwin specific typedefs.
+
 2001-04-04  Richard Sandiford  <rsandifo@redhat.com>
 
        * libc/include/machine/ieeefp.h: Comment about new configuration
index f492556d1548b58b1374e17b1aa4a2c159642526..e86ce13448b12c379f6d147843e758f89599567e 100644 (file)
@@ -81,6 +81,11 @@ extern "C" {
 # define _POSIX_JOB_CONTROL    1
 # define _POSIX_SAVED_IDS      0
 # define _POSIX_VERSION                199009L
+# define _POSIX_THREADS                          1
+# define _POSIX_THREAD_PROCESS_SHARED            1
+# define _POSIX_THREAD_SAFE_FUNCTIONS            1
+# define _POSIX_THREAD_PRIORITY_SCHEDULING       1
+# define _POSIX_THREAD_ATTR_STACKSIZE            1
 #endif
 
 #ifdef __cplusplus
index 53987afc398636a8a9b12ab6f61ef5ddc53d447d..e590ae38c4d967e68c53924733e2b9d0afa6959c 100644 (file)
@@ -12,7 +12,7 @@ extern "C" {
 
 /* #ifndef __STRICT_ANSI__*/
 
-#if defined(_POSIX_THREADS) || defined(__CYGWIN__)
+#if defined(_POSIX_THREADS)
 #include <sys/types.h>   /* for pthread data types */
 #endif
 
index 7ec35ae317058e71cde1a83320fa42d6bfda23b4..e4fcef28a90afc280136b029d83cfccf310f31c8 100644 (file)
@@ -206,7 +206,7 @@ typedef     struct _types_fd_set {
    condition variables, and keys.  But since RTEMS is currently the only
    newlib user of these, the ifdef is just on RTEMS. */
 
-#if defined(__rtems__)
+#if defined(__rtems__) || defined(__CYGWIN__)
 
 #ifndef __clockid_t_defined
 typedef _CLOCKID_T_ clockid_t;
@@ -220,7 +220,15 @@ typedef _TIMER_T_ timer_t;
 
 #include <sys/features.h>
 
-#if defined(_POSIX_THREADS)
+
+/* Cygwin will probably never have full posix compliance due to little things
+ * like an inability to set the stackaddress. Cygwin is also using void *  
+ * pointers rather than structs to ensure maximum binary compatability with
+ * previous releases.
+ * This means that we don't use the types defined here, but rather in
+ * <cygwin/types.h>
+ */
+#if defined(_POSIX_THREADS) && !defined(__CYGWIN__)
 
 #include <sys/sched.h>
 
@@ -313,7 +321,10 @@ typedef struct {
   int   is_initialized;  /* is this structure initialized? */
   int   init_executed;   /* has the initialization routine been run? */
 } pthread_once_t;       /* dynamic package initialization */
-
+#else
+#if defined (__CYGWIN__)
+#include <cygwin/types.h>
+#endif
 #endif /* defined(_POSIX_THREADS) */
 
 #endif  /* defined(__rtems__) */
This page took 0.046722 seconds and 5 git commands to generate.