Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowi@redhat.com>2016-03-15 05:20:02 +0300
committerYaakov Selkowitz <yselkowi@redhat.com>2016-03-18 05:09:21 +0300
commit396942b0b59da602797ab63a502fe315b14fed84 (patch)
tree0091d49f1769a2080e1d20ad17de1910219adb75 /newlib/libc
parentee97c4b22491b205fd3b7697e03c909e02b652d3 (diff)
Feature test macros overhaul: sys/types.h
The u_int/u_char/etc. BSD types are needed by Cygwin's netinet/*.h headers, so they always need to be available. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
Diffstat (limited to 'newlib/libc')
-rw-r--r--newlib/libc/include/sys/types.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index c9f0fc7f3..c09866b3e 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -84,13 +84,14 @@ typedef quad_t * qaddr_t;
#define _ST_INT32
#endif
-# if __BSD_VISIBLE
-
+#if __BSD_VISIBLE
#include <sys/select.h>
-
# define physadr physadr_t
# define quad quad_t
+#endif
+/* These types are required by netinet/*.h on Cygwin */
+#if __BSD_VISIBLE || defined(__CYGWIN__)
#ifndef _BSDTYPES_DEFINED
/* also defined in mingw/gmon.h and in w32api/winsock[2].h */
#ifndef __u_char_defined
@@ -111,11 +112,13 @@ typedef unsigned long u_long;
#endif
#define _BSDTYPES_DEFINED
#endif
+#endif /*__BSD_VISIBLE || __CYGWIN__ */
+#if __MISC_VISIBLE
typedef unsigned short ushort; /* System V compatibility */
typedef unsigned int uint; /* System V compatibility */
typedef unsigned long ulong; /* System V compatibility */
-# endif /*__BSD_VISIBLE */
+#endif
#ifndef __clock_t_defined
typedef _CLOCK_T_ clock_t;