mescc: Mes C Library: Avoid type/size_t conflicts.

* include/alloca.h: Remove typedefs, include sys/types.h.
* include/stdint.h: Likewise.
* include/string.h: Likewise.
This commit is contained in:
Jan Nieuwenhuizen 2019-06-01 08:44:18 +02:00
parent 0904a288c7
commit bf4af81664
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
3 changed files with 3 additions and 39 deletions

View File

@ -29,11 +29,7 @@
#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);

View 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

View File

@ -29,21 +29,7 @@
#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);