mlibc: M4 support: robustify headers, add sys/signal.h.
* include/errno.h (ERANGE): New define. * include/stdarg.h (size_t): Undefine before typedef. * include/stdint.h: Likewise. * include/stdio.h: Likewise. * include/stdlib.h: Likewise. * include/sys/types.h: Likewise. * include/string.h: Likewise. (ssize_t): Undefine before typedef. * include/unistd.h: Likewise. (off_t): Undefine before typedef. * include/sys/stat.h (struct stat): New stub. * include/sys/signal.h: New file.
This commit is contained in:
parent
71906fb735
commit
49de95fe5d
|
@ -28,6 +28,7 @@
|
||||||
#include_next <errno.h>
|
#include_next <errno.h>
|
||||||
#else // ! (__GNUC__ && POSIX)
|
#else // ! (__GNUC__ && POSIX)
|
||||||
int errno;
|
int errno;
|
||||||
|
#define ERANGE 34 /* Math result not representable */
|
||||||
#endif // ! (__GNUC__ && POSIX)
|
#endif // ! (__GNUC__ && POSIX)
|
||||||
|
|
||||||
#endif // __MES_ERRNO_H
|
#endif // __MES_ERRNO_H
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
#ifndef __MES_SIZE_T
|
#ifndef __MES_SIZE_T
|
||||||
#define __MES_SIZE_T
|
#define __MES_SIZE_T
|
||||||
|
#undef size_t
|
||||||
typedef unsigned long size_t;
|
typedef unsigned long size_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,7 @@ typedef long long int64_t;
|
||||||
|
|
||||||
#ifndef __MES_SIZE_T
|
#ifndef __MES_SIZE_T
|
||||||
#define __MES_SIZE_T
|
#define __MES_SIZE_T
|
||||||
|
#undef size_t
|
||||||
typedef unsigned long size_t;
|
typedef unsigned long size_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -94,6 +94,7 @@ typedef int FILE;
|
||||||
|
|
||||||
#ifndef __MES_SIZE_T
|
#ifndef __MES_SIZE_T
|
||||||
#define __MES_SIZE_T
|
#define __MES_SIZE_T
|
||||||
|
#undef size_t
|
||||||
typedef unsigned long size_t;
|
typedef unsigned long size_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,8 @@
|
||||||
|
|
||||||
#ifndef __MES_SIZE_T
|
#ifndef __MES_SIZE_T
|
||||||
#define __MES_SIZE_T
|
#define __MES_SIZE_T
|
||||||
typedef long size_t;
|
#undef size_t
|
||||||
|
typedef unsigned long size_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int atoi (char const *s);
|
int atoi (char const *s);
|
||||||
|
|
|
@ -31,11 +31,13 @@
|
||||||
|
|
||||||
#ifndef __MES_SIZE_T
|
#ifndef __MES_SIZE_T
|
||||||
#define __MES_SIZE_T
|
#define __MES_SIZE_T
|
||||||
|
#undef size_t
|
||||||
typedef unsigned long size_t;
|
typedef unsigned long size_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __MES_SSIZE_T
|
#ifndef __MES_SSIZE_T
|
||||||
#define __MES_SSIZE_T
|
#define __MES_SSIZE_T
|
||||||
|
#undef ssize_t
|
||||||
typedef long ssize_t;
|
typedef long ssize_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -25,5 +25,21 @@
|
||||||
#include_next <sys/stat.h>
|
#include_next <sys/stat.h>
|
||||||
#endif // (__GNUC__ && POSIX)
|
#endif // (__GNUC__ && POSIX)
|
||||||
|
|
||||||
|
struct stat {
|
||||||
|
int st_dev;
|
||||||
|
int st_ino;
|
||||||
|
int st_mode;
|
||||||
|
int st_nlink;
|
||||||
|
int st_uid;
|
||||||
|
int st_gid;
|
||||||
|
int st_rdev;
|
||||||
|
int st_size;
|
||||||
|
int st_blksize;
|
||||||
|
int st_blocks;
|
||||||
|
int st_atime;
|
||||||
|
int st_mtime;
|
||||||
|
int st_ctime;
|
||||||
|
};
|
||||||
|
|
||||||
#endif // __MES_SYS_STAT_H
|
#endif // __MES_SYS_STAT_H
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,13 @@
|
||||||
#include_next <sys/types.h>
|
#include_next <sys/types.h>
|
||||||
#else // ! (__GNUC__ && POSIX)
|
#else // ! (__GNUC__ && POSIX)
|
||||||
#include <endian.h>
|
#include <endian.h>
|
||||||
|
|
||||||
|
#ifndef __MES_SIZE_T
|
||||||
|
#define __MES_SIZE_T
|
||||||
|
#undef size_t
|
||||||
|
typedef unsigned long size_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // ! (__GNUC__ && POSIX)
|
#endif // ! (__GNUC__ && POSIX)
|
||||||
|
|
||||||
#endif // __MES_SYS_TYPES_H
|
#endif // __MES_SYS_TYPES_H
|
||||||
|
|
|
@ -31,16 +31,19 @@
|
||||||
|
|
||||||
#ifndef __MES_OFF_T
|
#ifndef __MES_OFF_T
|
||||||
#define __MES_OFF_T
|
#define __MES_OFF_T
|
||||||
|
#undef off_t
|
||||||
typedef unsigned long off_t;
|
typedef unsigned long off_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __MES_SIZE_T
|
#ifndef __MES_SIZE_T
|
||||||
#define __MES_SIZE_T
|
#define __MES_SIZE_T
|
||||||
|
#undef size_t
|
||||||
typedef unsigned long size_t;
|
typedef unsigned long size_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __MES_SSIZE_T
|
#ifndef __MES_SSIZE_T
|
||||||
#define __MES_SSIZE_T
|
#define __MES_SSIZE_T
|
||||||
|
#undef ssize_t
|
||||||
typedef long ssize_t;
|
typedef long ssize_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue