summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanny Smith <dannysmith@users.sourceforge.net>2007-06-13 07:43:58 +0000
committerDanny Smith <dannysmith@users.sourceforge.net>2007-06-13 07:43:58 +0000
commit5930885278e68944c63a7a26e5820f36482fff28 (patch)
treee174c79569e76f3f06e03b904c18fd38bbdcd84d
parentecd5f070c82505d6450937b4494c65d9fd4a0fc9 (diff)
downloadcygnal-5930885278e68944c63a7a26e5820f36482fff28.tar.gz
cygnal-5930885278e68944c63a7a26e5820f36482fff28.tar.bz2
cygnal-5930885278e68944c63a7a26e5820f36482fff28.zip
* include/stdlib.h: Don't include stdint.h. Conditionally define intptr_t.
* include/io.h: Likewise.
-rw-r--r--winsup/mingw/ChangeLog5
-rw-r--r--winsup/mingw/include/io.h10
-rw-r--r--winsup/mingw/include/stdlib.h10
3 files changed, 22 insertions, 3 deletions
diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog
index ae7d1ec67..09eb25c19 100644
--- a/winsup/mingw/ChangeLog
+++ b/winsup/mingw/ChangeLog
@@ -1,3 +1,8 @@
+2007-06-13 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * include/stdlib.h: Don't include stdint.h. Conditionally define intptr_t.
+ * include/io.h: Likewise.
+
2007-06-11 Danny Smith <dannysmith@users.sourceforge.net>
* crt1.c (__mingw_CRTStartup): Add explicit call to gcc's __main.
diff --git a/winsup/mingw/include/io.h b/winsup/mingw/include/io.h
index cfab09880..d980726b1 100644
--- a/winsup/mingw/include/io.h
+++ b/winsup/mingw/include/io.h
@@ -18,7 +18,6 @@
* an inclusion of sys/types.h */
#include <sys/types.h> /* To get time_t. */
-#include <stdint.h> /* For intptr_t. */
/*
* Attributes of files as returned by _findfirst et al.
@@ -34,6 +33,15 @@
#ifndef RC_INVOKED
+#ifndef _INTPTR_T_DEFINED
+#define _INTPTR_T_DEFINED
+#ifdef _WIN64
+ typedef __int64 intptr_t;
+#else
+ typedef int intptr_t;
+#endif
+#endif
+
#ifndef _FSIZE_T_DEFINED
typedef unsigned long _fsize_t;
#define _FSIZE_T_DEFINED
diff --git a/winsup/mingw/include/stdlib.h b/winsup/mingw/include/stdlib.h
index dd407b12f..c973af02a 100644
--- a/winsup/mingw/include/stdlib.h
+++ b/winsup/mingw/include/stdlib.h
@@ -21,8 +21,6 @@
#include <stddef.h>
#endif /* RC_INVOKED */
-#include <stdint.h> /* For uintptr_t */
-
/*
* RAND_MAX is the maximum value that may be returned by rand.
* The minimum is zero.
@@ -441,6 +439,14 @@ _CRTIMP int __cdecl _set_error_mode (int);
#define _REPORT_ERRMODE 3
#if __MSVCRT_VERSION__ >= 0x800
+#ifndef _INTPTR_T_DEFINED
+#define _INTPTR_T_DEFINED
+#ifdef _WIN64
+ typedef __int64 intptr_t;
+#else
+ typedef int intptr_t;
+#endif
+#endif
_CRTIMP unsigned int __cdecl _set_abort_behavior (unsigned int, unsigned int);
/* These masks work with msvcr80.dll version 8.0.50215.44 (a beta release). */
#define _WRITE_ABORT_MSG 1