diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2012-07-06 10:41:21 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2012-07-06 10:41:21 +0000 |
commit | 0246baaea2ac689996fadde8f7f337a90be2c1b5 (patch) | |
tree | e032bcbb9dbfcedc6e50df9cae998f8dfa68dbb9 /newlib/libc/include | |
parent | 0390476c474927f99829fe1813938a47815ed49e (diff) | |
download | newlib-0246baaea2ac689996fadde8f7f337a90be2c1b5.zip newlib-0246baaea2ac689996fadde8f7f337a90be2c1b5.tar.gz newlib-0246baaea2ac689996fadde8f7f337a90be2c1b5.tar.bz2 |
Allow building of Cygwin using Mingw64 SDK headers:
* libc/include/sys/time.h: Drop _WINSOCK_H guard. Just use
_TIMEVAL_DEFINED instead.
* libc/include/sys/types.h: Check for _WINSOCKAPI_ along with
_WINSOCK_H.
* libc/include/sys/unistd.h: Ditto.
Diffstat (limited to 'newlib/libc/include')
-rw-r--r-- | newlib/libc/include/sys/time.h | 4 | ||||
-rw-r--r-- | newlib/libc/include/sys/types.h | 4 | ||||
-rw-r--r-- | newlib/libc/include/sys/unistd.h | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/newlib/libc/include/sys/time.h b/newlib/libc/include/sys/time.h index d48839f..3c9bf77 100644 --- a/newlib/libc/include/sys/time.h +++ b/newlib/libc/include/sys/time.h @@ -12,7 +12,7 @@ extern "C" { #endif -#ifndef _WINSOCK_H +#ifndef _TIMEVAL_DEFINED #define _TIMEVAL_DEFINED struct timeval { time_t tv_sec; @@ -28,7 +28,7 @@ struct timezone { #include <cygwin/sys_time.h> #endif /* __CYGWIN__ */ -#endif /* _WINSOCK_H */ +#endif /* !_TIMEVAL_DEFINED */ #define ITIMER_REAL 0 #define ITIMER_VIRTUAL 1 diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h index 73e4ed8..ba24929 100644 --- a/newlib/libc/include/sys/types.h +++ b/newlib/libc/include/sys/types.h @@ -210,7 +210,7 @@ typedef unsigned short nlink_t; includes the W32api winsock[2].h header must know what it is doing; it must not call the cygwin32 select function. */ -# if !(defined (_POSIX_SOURCE) || defined (_WINSOCK_H) || defined (__USE_W32_SOCKETS)) +# if !(defined (_POSIX_SOURCE) || defined (_WINSOCK_H) || defined (_WINSOCKAPI_) || defined (__USE_W32_SOCKETS)) # define _SYS_TYPES_FD_SET # define NBBY 8 /* number of bits in a byte */ /* @@ -247,7 +247,7 @@ typedef struct _types_fd_set { *__tmp++ = 0; \ })) -# endif /* !(defined (_POSIX_SOURCE) || defined (_WINSOCK_H) || defined (__USE_W32_SOCKETS)) */ +# endif /* !(defined (_POSIX_SOURCE) || defined (_WINSOCK_H) || defined (_WINSOCKAPI_) || defined (__USE_W32_SOCKETS)) */ #undef __MS_types__ #undef _ST_INT32 diff --git a/newlib/libc/include/sys/unistd.h b/newlib/libc/include/sys/unistd.h index 6bae774..a5f66c0 100644 --- a/newlib/libc/include/sys/unistd.h +++ b/newlib/libc/include/sys/unistd.h @@ -233,7 +233,7 @@ int _EXFUN(truncate, (const char *, off_t __length)); int _EXFUN(getdtablesize, (void)); int _EXFUN(setdtablesize, (int)); useconds_t _EXFUN(ualarm, (useconds_t __useconds, useconds_t __interval)); -#if !(defined (_WINSOCK_H) || defined (__USE_W32_SOCKETS)) +#if !(defined (_WINSOCK_H) || defined (_WINSOCKAPI_) || defined (__USE_W32_SOCKETS)) /* winsock[2].h defines as __stdcall, and with int as 2nd arg */ int _EXFUN(gethostname, (char *__name, size_t __len)); #endif |