mescc: Mes C Library: Support gcc-4.6.4. WIP

This commit is contained in:
Jan Nieuwenhuizen 2019-01-16 13:21:36 +01:00
parent bbc65faa84
commit 69a71425f1
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
2 changed files with 13 additions and 7 deletions

View File

@ -58,6 +58,9 @@ typedef int int32_t;
typedef unsigned long long uint64_t; typedef unsigned long long uint64_t;
typedef long long int64_t; typedef long long int64_t;
typedef int intmax_t;
typedef unsigned uintmax_t;
#ifndef __MES_SIZE_T #ifndef __MES_SIZE_T
#define __MES_SIZE_T #define __MES_SIZE_T
#undef size_t #undef size_t
@ -70,10 +73,12 @@ typedef unsigned long size_t;
typedef long intptr_t; typedef long intptr_t;
#endif #endif
// FIXME #ifndef __MES_UINTPTR_T
typedef int intmax_t; #define __MES_UINTPTR_T
typedef unsigned uintmax_t; #undef intptr_t
typedef unsigned* uintptr_t; typedef long uintptr_t;
#endif
#ifndef __MES_PTRDIFF_T #ifndef __MES_PTRDIFF_T
#define __MES_PTRDIFF_T #define __MES_PTRDIFF_T

View File

@ -19,14 +19,15 @@
*/ */
#include <libmes.h> #include <libmes.h>
#include <time.h>
int char *
ctime (int x) ctime (time_t const *TIME)
{ {
static int stub = 0; static int stub = 0;
if (__mes_debug () && !stub) if (__mes_debug () && !stub)
eputs ("ctime stub\n"); eputs ("ctime stub\n");
stub = 1; stub = 1;
errno = 0; errno = 0;
return 0; return "now";
} }