diff options
Diffstat (limited to 'win32/include')
-rw-r--r-- | win32/include/Makefile.am | 16 | ||||
-rw-r--r-- | win32/include/msvc/config.h | 2 | ||||
-rw-r--r-- | win32/include/msvc/inttypes.h | 51 | ||||
-rw-r--r-- | win32/include/msvc/stdint.h | 60 | ||||
-rw-r--r-- | win32/include/unistd.h | 4 |
5 files changed, 57 insertions, 76 deletions
diff --git a/win32/include/Makefile.am b/win32/include/Makefile.am index 1b13e092b..d53081b6c 100644 --- a/win32/include/Makefile.am +++ b/win32/include/Makefile.am @@ -1,24 +1,14 @@ include $(top_srcdir)/misc/Makefile.common -msvc_headers = \ +EXTRA_DIST = \ + msvc/sys/time.h \ + msvc/config.h \ msvc/inttypes.h \ msvc/stdint.h \ - msvc/sys/time.h - -if WIN32 - install_h = $(msvc_headers) -else - dist_h = $(msvc_headers) -endif - -EXTRA_DIST = $(dist_h) \ sys/socket.h \ - msvc/config.h \ netinet/in.h \ sys/socket.h \ dlfcn.h \ netdb.h \ pwd.h \ unistd.h - -nobase_include_HEADERS = $(install_h) diff --git a/win32/include/msvc/config.h b/win32/include/msvc/config.h index 2b44ff85c..a0d35a972 100644 --- a/win32/include/msvc/config.h +++ b/win32/include/msvc/config.h @@ -609,3 +609,5 @@ /* define ssize_t to __int64 if it's missing in default includes */ #define ssize_t __int64 + +#include "os_internal.h" diff --git a/win32/include/msvc/inttypes.h b/win32/include/msvc/inttypes.h index b7e13daf3..2934bf43a 100644 --- a/win32/include/msvc/inttypes.h +++ b/win32/include/msvc/inttypes.h @@ -29,34 +29,20 @@ #include <stdint.h> -#define int8_t signed char -#define int16_t signed short -#define int32_t signed long -#define int64_t signed hyper - -#define uint8_t unsigned char -#define uint16_t unsigned short -#define uint32_t unsigned long -#define uint64_t unsigned hyper - -#define intptr_t signed int -#define uintptr_t unsigned int - -#define __int8_t int8_t -#define __int16_t int16_t -#define __int32_t int32_t -#define __int64_t int64_t - -#define __uint8_t uint8_t -#define __uint16_t uint16_t -#define __uint32_t uint32_t -#define __uint64_t uint64_t - -#define __intptr_t intptr_t -#define __uintptr_t uintptr_t - -typedef __int64 ulonglong; -typedef __int64 longlong; +typedef __int8 int8_t; +typedef unsigned __int8 uint8_t; +typedef __int16 int16_t; +typedef unsigned __int16 uint16_t; +typedef __int32 int32_t; +typedef unsigned __int32 uint32_t; +typedef __int64 int64_t; +typedef unsigned __int64 uint64_t; +typedef int intptr_t; +typedef unsigned int uintptr_t; +typedef __int64 intmax_t; +typedef unsigned __int64 uintmax_t; +typedef signed __int64 intmax_t; +typedef unsigned __int64 uintmax_t; #define __WORDSIZE 32 @@ -188,6 +174,15 @@ typedef __int64 longlong; # define PRIxPTR __PRIPTR_PREFIX "x" # define PRIXPTR __PRIPTR_PREFIX "X" + +/* Macros for scanning `intmax_t' and `uintmax_t'. */ +#define SCNdMAX __PRI64_PREFIX "d" +#define SCNiMAX __PRI64_PREFIX "i" +#define SCNoMAX __PRI64_PREFIX "o" +#define SCNuMAX __PRI64_PREFIX "u" +#define SCNxMAX __PRI64_PREFIX "x" +#define SCNXMAX __PRI64_PREFIX "X" + #endif /* !defined __cplusplus || defined __STDC_FORMAT_MACROS */ diff --git a/win32/include/msvc/stdint.h b/win32/include/msvc/stdint.h index fe934b846..7b9d4a090 100644 --- a/win32/include/msvc/stdint.h +++ b/win32/include/msvc/stdint.h @@ -27,7 +27,7 @@ details. */ * along with self program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: stdint.h,v 1.1 2004/04/06 19:20:21 valtri Exp $ + * $Id: stdint.h,v 1.2 2004/09/20 19:30:08 valtri Exp $ */ /* Modified original CygWin version for using by MSVC port. */ @@ -35,60 +35,73 @@ details. */ #ifndef _STDINT_H #define _STDINT_H -/* Exact-width integer types */ +/* Macros for minimum-width integer constant expressions */ + +#define INT8_C(x) x +#define INT16_C(x) x +#define INT32_C(x) x ## L +#define INT64_C(x) x ## I64 + +#define UINT8_C(x) x ## U +#define UINT16_C(x) x ## U +#define UINT32_C(x) x ## UL +#define UINT64_C(x) x ## UI64 -#include <inttypes.h> +/* Macros for greatest-width integer constant expressions */ + +#define INTMAX_C(x) x ## I64 +#define UINTMAX_C(x) x ## UI64 /* Limits of exact-width integer types */ #define INT8_MIN (-128) #define INT16_MIN (-32768) #define INT32_MIN (-2147483647 - 1) -#define INT64_MIN (-9223372036854775807LL - 1LL) +#define INT64_MIN (-INT64_C(9223372036854775807) - 1) #define INT8_MAX (127) #define INT16_MAX (32767) #define INT32_MAX (2147483647) -#define INT64_MAX (9223372036854775807LL) +#define INT64_MAX (INT64_C(9223372036854775807)) #define UINT8_MAX (255) #define UINT16_MAX (65535) #define UINT32_MAX (4294967295UL) -#define UINT64_MAX (18446744073709551615ULL) +#define UINT64_MAX (UINT64_C(18446744073709551615)) /* Limits of minimum-width integer types */ #define INT_LEAST8_MIN (-128) #define INT_LEAST16_MIN (-32768) #define INT_LEAST32_MIN (-2147483647 - 1) -#define INT_LEAST64_MIN (-9223372036854775807LL - 1LL) +#define INT_LEAST64_MIN (-INT64_C(9223372036854775807) - 1) #define INT_LEAST8_MAX (127) #define INT_LEAST16_MAX (32767) #define INT_LEAST32_MAX (2147483647) -#define INT_LEAST64_MAX (9223372036854775807LL) +#define INT_LEAST64_MAX (INT64_C(9223372036854775807)) #define UINT_LEAST8_MAX (255) #define UINT_LEAST16_MAX (65535) #define UINT_LEAST32_MAX (4294967295UL) -#define UINT_LEAST64_MAX (18446744073709551615ULL) +#define UINT_LEAST64_MAX (UINT64_C(18446744073709551615)) /* Limits of fastest minimum-width integer types */ #define INT_FAST8_MIN (-128) #define INT_FAST16_MIN (-2147483647 - 1) #define INT_FAST32_MIN (-2147483647 - 1) -#define INT_FAST64_MIN (-9223372036854775807LL - 1LL) +#define INT_FAST64_MIN (-INT64_C(9223372036854775807) - 1) #define INT_FAST8_MAX (127) #define INT_FAST16_MAX (2147483647) #define INT_FAST32_MAX (2147483647) -#define INT_FAST64_MAX (9223372036854775807LL) +#define INT_FAST64_MAX (INT64_C(9223372036854775807)) #define UINT_FAST8_MAX (255) #define UINT_FAST16_MAX (4294967295UL) #define UINT_FAST32_MAX (4294967295UL) -#define UINT_FAST64_MAX (18446744073709551615ULL) +#define UINT_FAST64_MAX (UINT64_C(18446744073709551615)) /* Limits of integer types capable of holding object pointers */ @@ -98,9 +111,9 @@ details. */ /* Limits of greatest-width integer types */ -#define INTMAX_MIN (-9223372036854775807LL - 1LL) -#define INTMAX_MAX (9223372036854775807LL) -#define UINTMAX_MAX (18446744073709551615ULL) +#define INTMAX_MIN (-INT64_C(9223372036854775807) - 1) +#define INTMAX_MAX (INT64_C(9223372036854775807)) +#define UINTMAX_MAX (UINT64_C(18446744073709551615)) /* Limits of other integer types */ @@ -135,21 +148,4 @@ details. */ #define WINT_MAX (2147483647) #endif -/* Macros for minimum-width integer constant expressions */ - -#define INT8_C(x) x -#define INT16_C(x) x -#define INT32_C(x) x ## L -#define INT64_C(x) x ## LL - -#define UINT8_C(x) x ## U -#define UINT16_C(x) x ## U -#define UINT32_C(x) x ## UL -#define UINT64_C(x) x ## ULL - -/* Macros for greatest-width integer constant expressions */ - -#define INTMAX_C(x) x ## L -#define UINTMAX_C(x) x ## UL - #endif /* _STDINT_H */ diff --git a/win32/include/unistd.h b/win32/include/unistd.h index b08706535..daba335c9 100644 --- a/win32/include/unistd.h +++ b/win32/include/unistd.h @@ -30,9 +30,7 @@ #include <errno.h> #include <direct.h> -#include <timer.h> - -#include <config.h> +#include "config.h" #ifndef _SYS_UNISTD_H_ #define _SYS_UNISTD_H_ |