aboutsummaryrefslogtreecommitdiff
path: root/lib/Headers/stdint.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-04-24 20:32:12 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-04-24 20:32:12 +0000
commit564618f782b9f6d373f789d8cf24943fd345904d (patch)
tree75e02c0e933aaf59160729896b3e8d027b50b80d /lib/Headers/stdint.h
parentd3651cc24fbcffd8f187c82e6a91e6e3de7fe26e (diff)
Headers: Hide intptr_t and uintptr_t definitions behind _INTPTR_T and _UINTPTR_T
defines, for increased compatibility with Darwin gcc. - This is a bit of a hack, since platform compatibility issues don't belong here, but I don't think this hurts anyone either. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102264 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Headers/stdint.h')
-rw-r--r--lib/Headers/stdint.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Headers/stdint.h b/lib/Headers/stdint.h
index 15b6eaa627..1785f315df 100644
--- a/lib/Headers/stdint.h
+++ b/lib/Headers/stdint.h
@@ -218,11 +218,18 @@ typedef __uint_least8_t uint_fast8_t;
#define __intn_t(n) __stdint_join3( int, n, _t)
#define __uintn_t(n) __stdint_join3(uint, n, _t)
+#ifndef _INTPTR_T
#ifndef __intptr_t_defined
typedef __intn_t(__INTPTR_WIDTH__) intptr_t;
#define __intptr_t_defined
+#define _INTPTR_T
#endif
+#endif
+
+#ifndef _UINTPTR_T
typedef __uintn_t(__INTPTR_WIDTH__) uintptr_t;
+#define _UINTPTR_T
+#endif
/* C99 7.18.1.5 Greatest-width integer types.
*/