[syslinux:master] lib: Add missing bits to stddef.h, stdint.h; pointers are "long"
syslinux-bot for H. Peter Anvin
hpa at zytor.com
Mon Jun 20 21:21:09 PDT 2011
Commit-ID: 7bb33bdff6a80b526fad8e20fb7ee6f6643ed8da
Gitweb: http://syslinux.zytor.com/commit/7bb33bdff6a80b526fad8e20fb7ee6f6643ed8da
Author: H. Peter Anvin <hpa at zytor.com>
AuthorDate: Mon, 20 Jun 2011 21:17:23 -0700
Committer: H. Peter Anvin <hpa at zytor.com>
CommitDate: Mon, 20 Jun 2011 21:17:23 -0700
lib: Add missing bits to stddef.h, stdint.h; pointers are "long"
Add missing bits to stddef.h and stdint.h and correct the basic
pointer type to "long". We really should use the gcc macros for
this...
Signed-off-by: H. Peter Anvin <hpa at zytor.com>
---
com32/include/bitsize/stddef.h | 6 +-----
com32/include/stdint.h | 12 ++++++++++--
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/com32/include/bitsize/stddef.h b/com32/include/bitsize/stddef.h
index caa5e72..bba48cf 100644
--- a/com32/include/bitsize/stddef.h
+++ b/com32/include/bitsize/stddef.h
@@ -6,13 +6,9 @@
#define _BITSIZE_STDDEF_H
#define _SIZE_T
-#if defined(__s390__) || defined(__hppa__) || defined(__cris__)
typedef unsigned long size_t;
-#else
-typedef unsigned int size_t;
-#endif
#define _PTRDIFF_T
-typedef signed int ptrdiff_t;
+typedef signed long ptrdiff_t;
#endif /* _BITSIZE_STDDEF_H */
diff --git a/com32/include/stdint.h b/com32/include/stdint.h
index a8391bf..a0ebbce 100644
--- a/com32/include/stdint.h
+++ b/com32/include/stdint.h
@@ -43,14 +43,22 @@ typedef unsigned long long uint_fast64_t;
/* Pointer types */
-typedef int32_t intptr_t;
-typedef uint32_t uintptr_t;
+typedef signed long intptr_t;
+typedef unsigned long uintptr_t;
/* Maximal types */
typedef int64_t intmax_t;
typedef uint64_t uintmax_t;
+/* Rank definitions, used in inttypes.h */
+#define __PRIFAST_RANK ""
+#define __SCNFAST_RANK ""
+#define __PRIPTR_RANK "l"
+#define __SCNPTR_RANK "l"
+#define __PRI64_RANK "ll"
+#define __SCN64_RANK "ll"
+
/*
* To be strictly correct...
*/
More information about the Syslinux-commits
mailing list