mescc: Mes C Library: Avoid type/size_t conflicts.
authorJan Nieuwenhuizen <janneke@gnu.org>
Sat, 1 Jun 2019 06:44:18 +0000 (08:44 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sat, 1 Jun 2019 06:44:18 +0000 (08:44 +0200)
* include/alloca.h: Remove typedefs, include sys/types.h.
* include/stdint.h: Likewise.
* include/string.h: Likewise.

include/alloca.h
include/stdint.h
include/string.h

index 692f8fb079987f4aa3c5626c7ef0e7a08a5a221a..aceea860e27d7daad0f0909ec7722e385ea15498 100644 (file)
 
 #else // ! SYSTEM_LIBC
 
-#ifndef __MES_SIZE_T
-#define __MES_SIZE_T
-#undef size_t
-typedef unsigned long size_t;
-#endif
+#include <sys/types.h>
 
 #if _ALLOCA_UNSIGNED
 void *alloca (unsigned size);
index 68821dbef11e7399bdda811e54f3c41552870e76..8b8994e3793d6618a995dd92593156f3caf10b8f 100644 (file)
@@ -58,28 +58,10 @@ typedef int int32_t;
 typedef unsigned long long uint64_t;
 typedef long long int64_t;
 
-#ifndef __MES_SIZE_T
-#define __MES_SIZE_T
-#undef size_t
-typedef unsigned long size_t;
-#endif
-
-#ifndef __MES_INTPTR_T
-#define __MES_INTPTR_T
-#undef intptr_t
-typedef long intptr_t;
-#endif
-
-// FIXME
 typedef int intmax_t;
 typedef unsigned uintmax_t;
-typedef unsigned* uintptr_t;
 
-#ifndef __MES_PTRDIFF_T
-#define __MES_PTRDIFF_T
-#undef ptrdiff_t
-typedef long ptrdiff_t;
-#endif
+#include <sys/types.h>
 
 #define CHAR_BIT 8
 #define CHAR_MAX 255
index e8748dd6f81fa23a95044d7eb38bf876f1474abe..60b2887eb8c1e089b8965d5d5b7e8cba9036d910 100644 (file)
 
 #else // ! SYSTEM_LIBC
 
-#ifndef NULL
-#define NULL 0
-#endif
-
-#ifndef __MES_SIZE_T
-#define __MES_SIZE_T
-#undef size_t
-typedef unsigned long size_t;
-#endif
-
-#ifndef __MES_SSIZE_T
-#define __MES_SSIZE_T
-#undef ssize_t
-typedef long ssize_t;
-#endif
+#include <sys/types.h>
 
 void *memchr (void const *block, int c, size_t size);
 void *memcpy (void *dest, void const *src, size_t n);