[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 01/13] stdint: check _INTPTR_T_DECLARED before defining intptr
From: |
KO Myung-Hun |
Subject: |
[PATCH v3 01/13] stdint: check _INTPTR_T_DECLARED before defining intptr_t and uintptr_t |
Date: |
Mon, 19 Jan 2015 13:47:07 +0900 |
OS/2 kLIBC's stdint.h defines _INTPTR_T_DECLARED and needs its own
definitions of intptr_t and uintptr_t (which use int and unsigned)
to avoid clashes with declarations of system functions like sbrk.
* lib/stdint.in.h (intptr_t, uintptr_t): Check
_INTPTR_T_DECLARED before defining them.
---
lib/stdint.in.h | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/lib/stdint.in.h b/lib/stdint.in.h
index f46bbf3..c946a0b 100644
--- a/lib/stdint.in.h
+++ b/lib/stdint.in.h
@@ -288,12 +288,17 @@ typedef gl_uint_fast32_t gl_uint_fast16_t;
/* 7.18.1.4. Integer types capable of holding object pointers */
-#undef intptr_t
-#undef uintptr_t
+/* kLIBC's stdint.h defines _INTPTR_T_DECLARED and needs its own
+ definitions of intptr_t and uintptr_t (which use int and unsigned)
+ to avoid clashes with declarations of system functions like sbrk. */
+#ifndef _INTPTR_T_DECLARED
+# undef intptr_t
+# undef uintptr_t
typedef long int gl_intptr_t;
typedef unsigned long int gl_uintptr_t;
-#define intptr_t gl_intptr_t
-#define uintptr_t gl_uintptr_t
+# define intptr_t gl_intptr_t
+# define uintptr_t gl_uintptr_t
+#endif
/* 7.18.1.5. Greatest-width integer types */
--
1.8.5.2
- [PATCH v3] OS/2 patches, KO Myung-Hun, 2015/01/18
- [PATCH v3 05/13] getdtablesize: do not use getrlimit() on OS/2 kLIBC, KO Myung-Hun, 2015/01/18
- [PATCH v3 06/13] wcwidth: fix 'conflicting types' error for `__wcwidth' on OS/2 kLIBC, KO Myung-Hun, 2015/01/18
- [PATCH v3 02/13] binary-io: don't put fd in binary mode if it is a console on EMX, KO Myung-Hun, 2015/01/18
- [PATCH v3 01/13] stdint: check _INTPTR_T_DECLARED before defining intptr_t and uintptr_t,
KO Myung-Hun <=
- [PATCH v3 03/13] pipe-filter-aux: undefine HAVE_SELECT on KLIBC, KO Myung-Hun, 2015/01/18
- [PATCH v3 04/13] w32spawn: clear SHELL_SPECIAL_CHARS and SHELL_SPACE_CHAR on OS/2 kLIBC, KO Myung-Hun, 2015/01/18
- [PATCH v3 08/13] pipe_filter_ii_execute: port to OS/2 kLIBC, KO Myung-Hun, 2015/01/18
- [PATCH v3 07/13] gnulib-tool: fall back into copy if symbolic link is not supported, KO Myung-Hun, 2015/01/18
- [PATCH v3 09/13] dup, dup2, fcntl: support a directory fd on OS/2 kLIBC, KO Myung-Hun, 2015/01/18
- [PATCH v3 11/13] configmake: prepend /@unixroot on OS/2 kLIBC, KO Myung-Hun, 2015/01/18
- [PATCH v3 13/13] openat_proc_name: port to OS/2 kLIBC, KO Myung-Hun, 2015/01/18
- [PATCH v3 12/13] utimes: detect utimes() correctly on OS/2 kLIBC, KO Myung-Hun, 2015/01/18
- [PATCH v3 10/13] opendir, closedir, dirfd, fdopendir: port to OS/2 kLIBC, KO Myung-Hun, 2015/01/18