mescc: Mes C Library: Use SYSTEM_LIBC [WAS: WITH_GLIBC].
Run: sed -i 's,WITH_GLIBC,SYSTEM_LIBC,g' $(git grep -l WITH_GLIBC) * build-aux/config.sh: Update. * include/alloca.h: Likewise. * include/ar.h: Likewise. * include/argz.h: Likewise. * include/assert.h: Likewise. * include/ctype.h: Likewise. * include/dirent.h: Likewise. * include/dirstream.h: Likewise. * include/dlfcn.h: Likewise. * include/endian.h: Likewise. * include/errno.h: Likewise. * include/fcntl.h: Likewise. * include/features.h: Likewise. * include/float.h: Likewise. * include/getopt.h: Likewise. * include/inttypes.h: Likewise. * include/libgen.h: Likewise. * include/limits.h: Likewise. * include/linux/x86_64/syscall.h: Likewise. * include/locale.h: Likewise. * include/math.h: Likewise. * include/memory.h: Likewise. * include/mes/lib-mini.h: Likewise. * include/pwd.h: Likewise. * include/setjmp.h: Likewise. * include/signal.h: Likewise. * include/stdarg.h: Likewise. * include/stdbool.h: Likewise. * include/stddef.h: Likewise. * include/stdint.h: Likewise. * include/stdio.h: Likewise. * include/stdlib.h: Likewise. * include/stdnoreturn.h: Likewise. * include/string.h: Likewise. * include/strings.h: Likewise. * include/sys/cdefs.h: Likewise. * include/sys/dir.h: Likewise. * include/sys/file.h: Likewise. * include/sys/ioctl.h: Likewise. * include/sys/mman.h: Likewise. * include/sys/param.h: Likewise. * include/sys/resource.h: Likewise. * include/sys/select.h: Likewise. * include/sys/stat.h: Likewise. * include/sys/time.h: Likewise. * include/sys/timeb.h: Likewise. * include/sys/times.h: Likewise. * include/sys/types.h: Likewise. * include/sys/ucontext.h: Likewise. * include/sys/user.h: Likewise. * include/sys/wait.h: Likewise. * include/termio.h: Likewise. * include/time.h: Likewise. * include/unistd.h: Likewise. * lib/libmes.c: Likewise. * lib/tests/stdio/70-printf-hello.c: Likewise. * lib/tests/stdio/70-printf-simple.c: Likewise. * lib/tests/stdio/80-sscanf.c: Likewise. * lib/tests/stdlib/50-malloc.c: Likewise. * module/mescc/preprocess.scm: Likewise. * scaffold/cons-mes.c: Likewise. * scaffold/lib/stdlib/malloc.c: Likewise. * scaffold/micro-mes.c: Likewise. * scaffold/tests/61-array.c: Likewise. * scaffold/tiny-mes.c: Likewise. * simple.sh: Likewise. * src/mes.c: Likewise.
This commit is contained in:
parent
77e75c3142
commit
26e88603d4
|
@ -98,7 +98,7 @@ CPPFLAGS=${CPPFLAGS-"
|
||||||
-I ${srcdest}include
|
-I ${srcdest}include
|
||||||
"}
|
"}
|
||||||
|
|
||||||
[ "$with_glibc_p" ] && CPPFLAGS="$CPPFLAGS -D WITH_GLIBC=1"
|
[ "$with_glibc_p" ] && CPPFLAGS="$CPPFLAGS -D SYSTEM_LIBC=1"
|
||||||
|
|
||||||
LDFLAGS=${LDFLAGS-"
|
LDFLAGS=${LDFLAGS-"
|
||||||
-v
|
-v
|
||||||
|
|
|
@ -20,14 +20,14 @@
|
||||||
#ifndef __MES_ALLOCA_H
|
#ifndef __MES_ALLOCA_H
|
||||||
#define __MES_ALLOCA_H 1
|
#define __MES_ALLOCA_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#ifndef _GNU_SOURCE
|
#ifndef _GNU_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#endif
|
#endif
|
||||||
#undef __MES_ALLOCA_H
|
#undef __MES_ALLOCA_H
|
||||||
#include_next <alloca.h>
|
#include_next <alloca.h>
|
||||||
|
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#ifndef __MES_SIZE_T
|
#ifndef __MES_SIZE_T
|
||||||
#define __MES_SIZE_T
|
#define __MES_SIZE_T
|
||||||
|
@ -43,6 +43,6 @@ char *alloca (int);
|
||||||
void *alloca (size_t size);
|
void *alloca (size_t size);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_ALLOCA_H
|
#endif // __MES_ALLOCA_H
|
||||||
|
|
|
@ -21,14 +21,14 @@
|
||||||
#ifndef __MES_AR_H
|
#ifndef __MES_AR_H
|
||||||
#define __MES_AR_H 1
|
#define __MES_AR_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#ifndef _GNU_SOURCE
|
#ifndef _GNU_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#endif
|
#endif
|
||||||
#undef __MES_AR_H
|
#undef __MES_AR_H
|
||||||
#include_next <ar.h>
|
#include_next <ar.h>
|
||||||
|
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
// Taken from GNU C Library 2.2.5
|
// Taken from GNU C Library 2.2.5
|
||||||
|
|
||||||
|
@ -51,6 +51,6 @@ struct ar_hdr
|
||||||
char ar_fmag[2]; /* Always contains ARFMAG. */
|
char ar_fmag[2]; /* Always contains ARFMAG. */
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_ARGZ_H
|
#endif // __MES_ARGZ_H
|
||||||
|
|
|
@ -20,14 +20,14 @@
|
||||||
#ifndef __MES_ARGZ_H
|
#ifndef __MES_ARGZ_H
|
||||||
#define __MES_ARGZ_H 1
|
#define __MES_ARGZ_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#ifndef _GNU_SOURCE
|
#ifndef _GNU_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#endif
|
#endif
|
||||||
#undef __MES_ARGZ_H
|
#undef __MES_ARGZ_H
|
||||||
#include_next <argz.h>
|
#include_next <argz.h>
|
||||||
|
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#ifndef libc_hidden_def
|
#ifndef libc_hidden_def
|
||||||
#define libc_hidden_def(x)
|
#define libc_hidden_def(x)
|
||||||
|
@ -37,6 +37,6 @@
|
||||||
size_t __argz_count (char const *argz, size_t len);
|
size_t __argz_count (char const *argz, size_t len);
|
||||||
void __argz_extract (char const *argz, size_t len, char **argv);
|
void __argz_extract (char const *argz, size_t len, char **argv);
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_ARGZ_H
|
#endif // __MES_ARGZ_H
|
||||||
|
|
|
@ -20,15 +20,15 @@
|
||||||
#ifndef __MES_ASSERT_H
|
#ifndef __MES_ASSERT_H
|
||||||
#define __MES_ASSERT_H 1
|
#define __MES_ASSERT_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#ifndef _GNU_SOURCE
|
#ifndef _GNU_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#endif
|
#endif
|
||||||
#undef __MES_ASSERT_H
|
#undef __MES_ASSERT_H
|
||||||
#include_next <assert.h>
|
#include_next <assert.h>
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
#define assert(x) ((x) ? (void)0 : assert_fail (#x))
|
#define assert(x) ((x) ? (void)0 : assert_fail (#x))
|
||||||
void assert_fail (char *s);
|
void assert_fail (char *s);
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_ASSERT_H
|
#endif // __MES_ASSERT_H
|
||||||
|
|
|
@ -20,14 +20,14 @@
|
||||||
#ifndef __MES_CTYPE_H
|
#ifndef __MES_CTYPE_H
|
||||||
#define __MES_CTYPE_H 1
|
#define __MES_CTYPE_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#ifndef _GNU_SOURCE
|
#ifndef _GNU_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#endif
|
#endif
|
||||||
#undef __MES_CTYPE_H
|
#undef __MES_CTYPE_H
|
||||||
#include_next <ctype.h>
|
#include_next <ctype.h>
|
||||||
|
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
#include <endian.h>
|
#include <endian.h>
|
||||||
|
|
||||||
int isalnum (int c);
|
int isalnum (int c);
|
||||||
|
@ -45,6 +45,6 @@ int isxdigit (int c);
|
||||||
int tolower (int c);
|
int tolower (int c);
|
||||||
int toupper (int c);
|
int toupper (int c);
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_CTYPE_H
|
#endif // __MES_CTYPE_H
|
||||||
|
|
|
@ -22,14 +22,14 @@
|
||||||
#ifndef __MES_DIRENT_H
|
#ifndef __MES_DIRENT_H
|
||||||
#define __MES_DIRENT_H 1
|
#define __MES_DIRENT_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#ifndef _GNU_SOURCE
|
#ifndef _GNU_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#endif
|
#endif
|
||||||
#undef __MES_DIRENT_H
|
#undef __MES_DIRENT_H
|
||||||
#include_next <dirent.h>
|
#include_next <dirent.h>
|
||||||
|
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#include <dirstream.h>
|
#include <dirstream.h>
|
||||||
|
|
||||||
|
@ -71,6 +71,6 @@ struct dirent *readdir (DIR * dirp);
|
||||||
/* Rewind DIRP to the beginning of the directory. */
|
/* Rewind DIRP to the beginning of the directory. */
|
||||||
extern void rewinddir (DIR * dirp);
|
extern void rewinddir (DIR * dirp);
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_DIRENT_H
|
#endif // __MES_DIRENT_H
|
||||||
|
|
|
@ -22,14 +22,14 @@
|
||||||
#ifndef __MES_DIRSTREAM_H
|
#ifndef __MES_DIRSTREAM_H
|
||||||
#define __MES_DIRSTREAM_H 1
|
#define __MES_DIRSTREAM_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#ifndef _GNU_SOURCE
|
#ifndef _GNU_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#endif
|
#endif
|
||||||
#undef __MES_DIRSTREAM_H
|
#undef __MES_DIRSTREAM_H
|
||||||
#include_next <dirstream.h>
|
#include_next <dirstream.h>
|
||||||
|
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
@ -50,6 +50,6 @@ struct __dirstream
|
||||||
|
|
||||||
typedef struct __dirstream DIR;
|
typedef struct __dirstream DIR;
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_DIRSTREAM_H
|
#endif // __MES_DIRSTREAM_H
|
||||||
|
|
|
@ -20,11 +20,11 @@
|
||||||
#ifndef __MES_DLFCN_H
|
#ifndef __MES_DLFCN_H
|
||||||
#define __MES_DLFCN_H 1
|
#define __MES_DLFCN_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#undef __MES_DLFCN_H
|
#undef __MES_DLFCN_H
|
||||||
#include_next <dlfcn.h>
|
#include_next <dlfcn.h>
|
||||||
|
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#define RTLD_LAZY 0x00001
|
#define RTLD_LAZY 0x00001
|
||||||
#define RTLD_NOW 0x00002
|
#define RTLD_NOW 0x00002
|
||||||
|
@ -39,6 +39,6 @@
|
||||||
void *dlopen (char const *filename, int flags);
|
void *dlopen (char const *filename, int flags);
|
||||||
int dlclose (void *handle);
|
int dlclose (void *handle);
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_DLFCN_H
|
#endif // __MES_DLFCN_H
|
||||||
|
|
|
@ -20,17 +20,17 @@
|
||||||
#ifndef __MES_ENDIAN_H
|
#ifndef __MES_ENDIAN_H
|
||||||
#define __MES_ENDIAN_H 1
|
#define __MES_ENDIAN_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#ifndef _GNU_SOURCE
|
#ifndef _GNU_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#endif
|
#endif
|
||||||
#undef __MES_ENDIAN_H
|
#undef __MES_ENDIAN_H
|
||||||
#include_next <endian.h>
|
#include_next <endian.h>
|
||||||
|
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
#define __LITTLE_ENDIAN 1234
|
#define __LITTLE_ENDIAN 1234
|
||||||
#define __BIG_ENDIAN 4321
|
#define __BIG_ENDIAN 4321
|
||||||
#define __BYTE_ORDER __LITTLE_ENDIAN
|
#define __BYTE_ORDER __LITTLE_ENDIAN
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_ENDIAN_H
|
#endif // __MES_ENDIAN_H
|
||||||
|
|
|
@ -20,13 +20,13 @@
|
||||||
#ifndef __MES_ERRNO_H
|
#ifndef __MES_ERRNO_H
|
||||||
#define __MES_ERRNO_H 1
|
#define __MES_ERRNO_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#ifndef _GNU_SOURCE
|
#ifndef _GNU_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#endif
|
#endif
|
||||||
#undef __MES_ERRNO_H
|
#undef __MES_ERRNO_H
|
||||||
#include_next <errno.h>
|
#include_next <errno.h>
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#ifndef __MES_ERRNO_T
|
#ifndef __MES_ERRNO_T
|
||||||
#define __MES_ERRNO_T 1
|
#define __MES_ERRNO_T 1
|
||||||
|
@ -65,6 +65,6 @@ extern char *sys_errlist[];
|
||||||
extern int sys_nerr;
|
extern int sys_nerr;
|
||||||
#endif // !__MESC__
|
#endif // !__MESC__
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_ERRNO_H
|
#endif // __MES_ERRNO_H
|
||||||
|
|
|
@ -20,14 +20,14 @@
|
||||||
#ifndef __MES_FCNTL_H
|
#ifndef __MES_FCNTL_H
|
||||||
#define __MES_FCNTL_H 1
|
#define __MES_FCNTL_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#ifndef _GNU_SOURCE
|
#ifndef _GNU_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#endif
|
#endif
|
||||||
#undef __MES_FCNTL_H
|
#undef __MES_FCNTL_H
|
||||||
#include_next <fcntl.h>
|
#include_next <fcntl.h>
|
||||||
|
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
// *INDENT-OFF*
|
// *INDENT-OFF*
|
||||||
#define O_RDONLY 0
|
#define O_RDONLY 0
|
||||||
|
@ -53,6 +53,6 @@ int dup2 (int old, int new);
|
||||||
int fcntl (int filedes, int command, ...);
|
int fcntl (int filedes, int command, ...);
|
||||||
int open (char const *s, int flags, ...);
|
int open (char const *s, int flags, ...);
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_FCNTL_H
|
#endif // __MES_FCNTL_H
|
||||||
|
|
|
@ -20,9 +20,9 @@
|
||||||
#ifndef __MES_FEATURES_H
|
#ifndef __MES_FEATURES_H
|
||||||
#define __MES_FEATURES_H 1
|
#define __MES_FEATURES_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#undef __MES_FEATURES_H
|
#undef __MES_FEATURES_H
|
||||||
#include_next <features.h>
|
#include_next <features.h>
|
||||||
#endif // (WITH_GLIBC)
|
#endif // (SYSTEM_LIBC)
|
||||||
|
|
||||||
#endif // __MES_FEATURES_H
|
#endif // __MES_FEATURES_H
|
||||||
|
|
|
@ -20,15 +20,15 @@
|
||||||
#ifndef __MES_FLOAT_H
|
#ifndef __MES_FLOAT_H
|
||||||
#define __MES_FLOAT_H 1
|
#define __MES_FLOAT_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#undef __MES_FLOAT_H
|
#undef __MES_FLOAT_H
|
||||||
#include_next <float.h>
|
#include_next <float.h>
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#define MIN_EXP -1021
|
#define MIN_EXP -1021
|
||||||
#define DBL_MIN_EXP -1021
|
#define DBL_MIN_EXP -1021
|
||||||
#define LDBL_MIN_EXP -1021
|
#define LDBL_MIN_EXP -1021
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_FLOAT_H
|
#endif // __MES_FLOAT_H
|
||||||
|
|
|
@ -21,14 +21,14 @@
|
||||||
#ifndef __MES_GETOPT_H
|
#ifndef __MES_GETOPT_H
|
||||||
#define __MES_GETOPT_H 1
|
#define __MES_GETOPT_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#ifndef _GNU_SOURCE
|
#ifndef _GNU_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#endif
|
#endif
|
||||||
#undef __MES_GETOPT_H
|
#undef __MES_GETOPT_H
|
||||||
#include_next <getopt.h>
|
#include_next <getopt.h>
|
||||||
|
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
#include <endian.h>
|
#include <endian.h>
|
||||||
int isdigit (int);
|
int isdigit (int);
|
||||||
int isxdigit (int);
|
int isxdigit (int);
|
||||||
|
@ -57,6 +57,6 @@ int getopt_long (int argc, char *const *argv, char const *options,
|
||||||
int getopt_long_only (int argc, char *const *argv, char const *options,
|
int getopt_long_only (int argc, char *const *argv, char const *options,
|
||||||
struct option const *long_options, int *opt_index);
|
struct option const *long_options, int *opt_index);
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_GETOPT_H
|
#endif // __MES_GETOPT_H
|
||||||
|
|
|
@ -20,15 +20,15 @@
|
||||||
#ifndef __MES_INTTYPES_H
|
#ifndef __MES_INTTYPES_H
|
||||||
#define __MES_INTTYPES_H 1
|
#define __MES_INTTYPES_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#ifndef _GNU_SOURCE
|
#ifndef _GNU_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#endif
|
#endif
|
||||||
#undef __MES_INTTYPES_H
|
#undef __MES_INTTYPES_H
|
||||||
#include_next <inttypes.h>
|
#include_next <inttypes.h>
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_INTTYPES_H
|
#endif // __MES_INTTYPES_H
|
||||||
|
|
|
@ -20,15 +20,15 @@
|
||||||
#ifndef __MES_LIBGEN_H
|
#ifndef __MES_LIBGEN_H
|
||||||
#define __MES_LIBGEN_H 1
|
#define __MES_LIBGEN_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#ifndef _GNU_SOURCE
|
#ifndef _GNU_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#endif
|
#endif
|
||||||
#undef __MES_LIBGEN_H
|
#undef __MES_LIBGEN_H
|
||||||
#include_next <libgen.h>
|
#include_next <libgen.h>
|
||||||
|
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
char *dirname (char *);
|
char *dirname (char *);
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_LIBGEN_H
|
#endif // __MES_LIBGEN_H
|
||||||
|
|
|
@ -20,14 +20,14 @@
|
||||||
#ifndef __MES_LIMITS_H
|
#ifndef __MES_LIMITS_H
|
||||||
#define __MES_LIMITS_H 1
|
#define __MES_LIMITS_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#ifndef _GNU_SOURCE
|
#ifndef _GNU_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#endif
|
#endif
|
||||||
#undef __MES_LIMITS_H
|
#undef __MES_LIMITS_H
|
||||||
#include_next <limits.h>
|
#include_next <limits.h>
|
||||||
|
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
@ -36,6 +36,6 @@
|
||||||
#define PATH_MAX 512
|
#define PATH_MAX 512
|
||||||
#define _POSIX_OPEN_MAX 16
|
#define _POSIX_OPEN_MAX 16
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_LIMITS_H
|
#endif // __MES_LIMITS_H
|
||||||
|
|
|
@ -77,7 +77,7 @@
|
||||||
#define SYS_getegid 0x6c
|
#define SYS_getegid 0x6c
|
||||||
#define SYS_getppid 0x6e
|
#define SYS_getppid 0x6e
|
||||||
|
|
||||||
// make+WITH_GLIBC
|
// make+SYSTEM_LIBC
|
||||||
#define SYS_rt_sigprocmask 0x0e
|
#define SYS_rt_sigprocmask 0x0e
|
||||||
|
|
||||||
#endif // __MES_LINUX_X86_64_SYSCALL_H
|
#endif // __MES_LINUX_X86_64_SYSCALL_H
|
||||||
|
|
|
@ -20,14 +20,14 @@
|
||||||
#ifndef __MES_LOCALE_H
|
#ifndef __MES_LOCALE_H
|
||||||
#define __MES_LOCALE_H 1
|
#define __MES_LOCALE_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#ifndef _GNU_SOURCE
|
#ifndef _GNU_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#endif
|
#endif
|
||||||
#undef __MES_LOCALE_H
|
#undef __MES_LOCALE_H
|
||||||
#include_next <locale.h>
|
#include_next <locale.h>
|
||||||
|
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
// *INDENT-OFF*
|
// *INDENT-OFF*
|
||||||
#ifndef LC_ALL
|
#ifndef LC_ALL
|
||||||
|
@ -40,6 +40,6 @@
|
||||||
|
|
||||||
char *setlocale (int category, char const *locale);
|
char *setlocale (int category, char const *locale);
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_LOCALE_H
|
#endif // __MES_LOCALE_H
|
||||||
|
|
|
@ -20,13 +20,12 @@
|
||||||
#ifndef __MES_MATH_H
|
#ifndef __MES_MATH_H
|
||||||
#define __MES_MATH_H 1
|
#define __MES_MATH_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#undef __MES_MATH_H
|
#undef __MES_MATH_H
|
||||||
#include_next <math.h>
|
#include_next <math.h>
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
double ldexp (double x, int exp);
|
|
||||||
#endif // ! WITH_GLIBC
|
|
||||||
|
|
||||||
double fabs (double number);
|
double fabs (double number);
|
||||||
|
double ldexp (double value, int exponent);
|
||||||
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_MATH_H
|
#endif // __MES_MATH_H
|
||||||
|
|
|
@ -20,17 +20,17 @@
|
||||||
#ifndef __MES_MEMORY_H
|
#ifndef __MES_MEMORY_H
|
||||||
#define __MES_MEMORY_H 1
|
#define __MES_MEMORY_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#ifndef _GNU_SOURCE
|
#ifndef _GNU_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#endif
|
#endif
|
||||||
#undef __MES_MEMORY_H
|
#undef __MES_MEMORY_H
|
||||||
#include_next <memory.h>
|
#include_next <memory.h>
|
||||||
|
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_MEMORY_H
|
#endif // __MES_MEMORY_H
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#ifndef __MES_LIB_MINI_H
|
#ifndef __MES_LIB_MINI_H
|
||||||
#define __MES_LIB_MINI_H
|
#define __MES_LIB_MINI_H
|
||||||
|
|
||||||
#if !WITH_GLIBC
|
#if !SYSTEM_LIBC
|
||||||
|
|
||||||
#ifndef _SIZE_T
|
#ifndef _SIZE_T
|
||||||
#define _SIZE_T
|
#define _SIZE_T
|
||||||
|
@ -83,10 +83,10 @@ int eputs (char const *s);
|
||||||
int puts (char const *s);
|
int puts (char const *s);
|
||||||
int oputs (char const *s);
|
int oputs (char const *s);
|
||||||
|
|
||||||
#if !WITH_GLIBC
|
#if !SYSTEM_LIBC
|
||||||
size_t strlen (char const *s);
|
size_t strlen (char const *s);
|
||||||
ssize_t _write ();
|
ssize_t _write ();
|
||||||
ssize_t write (int filedes, void const *buffer, size_t size);
|
ssize_t write (int filedes, void const *buffer, size_t size);
|
||||||
#endif // !WITH_GLIBC
|
#endif // !SYSTEM_LIBC
|
||||||
|
|
||||||
#endif //__MES_LIB_MINI_H
|
#endif //__MES_LIB_MINI_H
|
||||||
|
|
|
@ -20,10 +20,10 @@
|
||||||
#ifndef __MES_PWD_H
|
#ifndef __MES_PWD_H
|
||||||
#define __MES_PWD_H 1
|
#define __MES_PWD_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#undef __MES_PWD_H
|
#undef __MES_PWD_H
|
||||||
#include_next <pwd.h>
|
#include_next <pwd.h>
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
struct passwd
|
struct passwd
|
||||||
{
|
{
|
||||||
|
@ -39,6 +39,6 @@ struct passwd
|
||||||
struct passwd *getpwuid ();
|
struct passwd *getpwuid ();
|
||||||
|
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_PWD_H
|
#endif // __MES_PWD_H
|
||||||
|
|
|
@ -20,10 +20,10 @@
|
||||||
#ifndef __MES_SETJMP_H
|
#ifndef __MES_SETJMP_H
|
||||||
#define __MES_SETJMP_H 1
|
#define __MES_SETJMP_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#undef __MES_SETJMP_H
|
#undef __MES_SETJMP_H
|
||||||
#include_next <setjmp.h>
|
#include_next <setjmp.h>
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
@ -42,6 +42,6 @@ jmp_buf buf;
|
||||||
void longjmp (jmp_buf env, int val);
|
void longjmp (jmp_buf env, int val);
|
||||||
int setjmp (jmp_buf env);
|
int setjmp (jmp_buf env);
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_SETJMP_H
|
#endif // __MES_SETJMP_H
|
||||||
|
|
|
@ -20,10 +20,10 @@
|
||||||
#ifndef __MES_SIGNAL_H
|
#ifndef __MES_SIGNAL_H
|
||||||
#define __MES_SIGNAL_H 1
|
#define __MES_SIGNAL_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#undef __MES_SIGNAL_H
|
#undef __MES_SIGNAL_H
|
||||||
#include_next <signal.h>
|
#include_next <signal.h>
|
||||||
#else //! WITH_GLIBC
|
#else //! SYSTEM_LIBC
|
||||||
|
|
||||||
|
|
||||||
typedef long sigset_t;
|
typedef long sigset_t;
|
||||||
|
@ -236,6 +236,6 @@ int sigemptyset (sigset_t * set);
|
||||||
#endif
|
#endif
|
||||||
int sigprocmask (int how, sigset_t const *set, sigset_t * oldset);
|
int sigprocmask (int how, sigset_t const *set, sigset_t * oldset);
|
||||||
|
|
||||||
#endif //! WITH_GLIBC
|
#endif //! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_SIGNAL_H
|
#endif // __MES_SIGNAL_H
|
||||||
|
|
|
@ -20,10 +20,10 @@
|
||||||
#ifndef __MES_STDARG_H
|
#ifndef __MES_STDARG_H
|
||||||
#define __MES_STDARG_H 1
|
#define __MES_STDARG_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#undef __MES_STDARG_H
|
#undef __MES_STDARG_H
|
||||||
#include_next <stdarg.h>
|
#include_next <stdarg.h>
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
@ -43,6 +43,6 @@ int vsprintf (char *str, char const *format, va_list ap);
|
||||||
int vsnprintf (char *str, size_t size, char const *format, va_list ap);
|
int vsnprintf (char *str, size_t size, char const *format, va_list ap);
|
||||||
int vsscanf (char const *s, char const *template, va_list ap);
|
int vsscanf (char const *s, char const *template, va_list ap);
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_STDARG_H
|
#endif // __MES_STDARG_H
|
||||||
|
|
|
@ -20,17 +20,17 @@
|
||||||
#ifndef __MES_STDBOOL_H
|
#ifndef __MES_STDBOOL_H
|
||||||
#define __MES_STDBOOL_H 1
|
#define __MES_STDBOOL_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#ifndef _GNU_SOURCE
|
#ifndef _GNU_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#endif
|
#endif
|
||||||
#undef __MES_STDBOOL_H
|
#undef __MES_STDBOOL_H
|
||||||
#include_next <stdbool.h>
|
#include_next <stdbool.h>
|
||||||
|
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
typedef int bool;
|
typedef int bool;
|
||||||
#define false 0
|
#define false 0
|
||||||
#define true 1
|
#define true 1
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_STDBOOL_H
|
#endif // __MES_STDBOOL_H
|
||||||
|
|
|
@ -20,10 +20,10 @@
|
||||||
#ifndef __MES_STDDEF_H
|
#ifndef __MES_STDDEF_H
|
||||||
#define __MES_STDDEF_H 1
|
#define __MES_STDDEF_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#undef __MES_STDDEF_H
|
#undef __MES_STDDEF_H
|
||||||
#include_next <stddef.h>
|
#include_next <stddef.h>
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
@ -37,6 +37,6 @@
|
||||||
#endif // !__MESC__
|
#endif // !__MESC__
|
||||||
#endif // offsetof
|
#endif // offsetof
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_STDDEF_H
|
#endif // __MES_STDDEF_H
|
||||||
|
|
|
@ -21,14 +21,14 @@
|
||||||
#ifndef __MES_STDINT_H
|
#ifndef __MES_STDINT_H
|
||||||
#define __MES_STDINT_H 1
|
#define __MES_STDINT_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#ifndef _GNU_SOURCE
|
#ifndef _GNU_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#endif
|
#endif
|
||||||
#undef __MES_STDINT_H
|
#undef __MES_STDINT_H
|
||||||
#include_next <stdint.h>
|
#include_next <stdint.h>
|
||||||
|
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#undef unsigned
|
#undef unsigned
|
||||||
#undef uint8_t
|
#undef uint8_t
|
||||||
|
@ -121,6 +121,6 @@ typedef long ptrdiff_t;
|
||||||
#define SIZE_MAX UINT64_MAX
|
#define SIZE_MAX UINT64_MAX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_STDINT_H
|
#endif // __MES_STDINT_H
|
||||||
|
|
|
@ -22,14 +22,14 @@
|
||||||
|
|
||||||
#include <mes/lib.h>
|
#include <mes/lib.h>
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#ifndef _GNU_SOURCE
|
#ifndef _GNU_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#endif
|
#endif
|
||||||
#undef __MES_STDIO_H
|
#undef __MES_STDIO_H
|
||||||
#include_next <stdio.h>
|
#include_next <stdio.h>
|
||||||
|
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#ifndef _IOFBF
|
#ifndef _IOFBF
|
||||||
#define _IOFBF 0 /* Fully buffered. */
|
#define _IOFBF 0 /* Fully buffered. */
|
||||||
|
@ -88,6 +88,6 @@ size_t fread (void *ptr, size_t size, size_t count, FILE * stream);
|
||||||
size_t freadahead (FILE * fp);
|
size_t freadahead (FILE * fp);
|
||||||
size_t fwrite (void const *ptr, size_t size, size_t count, FILE * stream);
|
size_t fwrite (void const *ptr, size_t size, size_t count, FILE * stream);
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_STDIO_H
|
#endif // __MES_STDIO_H
|
||||||
|
|
|
@ -20,13 +20,13 @@
|
||||||
#ifndef __MES_STDLIB_H
|
#ifndef __MES_STDLIB_H
|
||||||
#define __MES_STDLIB_H 1
|
#define __MES_STDLIB_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#ifndef _GNU_SOURCE
|
#ifndef _GNU_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#endif
|
#endif
|
||||||
#undef __MES_STDLIB_H
|
#undef __MES_STDLIB_H
|
||||||
#include_next <stdlib.h>
|
#include_next <stdlib.h>
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <alloca.h>
|
#include <alloca.h>
|
||||||
|
@ -63,6 +63,6 @@ typedef int (*comparison_fn_t) (void const *, void const *);
|
||||||
|
|
||||||
void *bsearch (void const *key, void const *array, size_t count, size_t size, comparison_fn_t compare);
|
void *bsearch (void const *key, void const *array, size_t count, size_t size, comparison_fn_t compare);
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_STDLIB_H
|
#endif // __MES_STDLIB_H
|
||||||
|
|
|
@ -20,15 +20,15 @@
|
||||||
#ifndef __MES_STDNORETURN_H
|
#ifndef __MES_STDNORETURN_H
|
||||||
#define __MES_STDNORETURN_H 1
|
#define __MES_STDNORETURN_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#ifndef _GNU_SOURCE
|
#ifndef _GNU_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#endif
|
#endif
|
||||||
#undef __MES_STDNORETURN_H
|
#undef __MES_STDNORETURN_H
|
||||||
#include_next <stdnoreturn.h>
|
#include_next <stdnoreturn.h>
|
||||||
|
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
// whut?
|
// whut?
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_STDNORETURN_H
|
#endif // __MES_STDNORETURN_H
|
||||||
|
|
|
@ -20,14 +20,14 @@
|
||||||
#ifndef __MES_STRING_H
|
#ifndef __MES_STRING_H
|
||||||
#define __MES_STRING_H 1
|
#define __MES_STRING_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#ifndef _GNU_SOURCE
|
#ifndef _GNU_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#endif
|
#endif
|
||||||
#undef __MES_STRING_H
|
#undef __MES_STRING_H
|
||||||
#include_next <string.h>
|
#include_next <string.h>
|
||||||
|
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#ifndef NULL
|
#ifndef NULL
|
||||||
#define NULL 0
|
#define NULL 0
|
||||||
|
@ -69,6 +69,6 @@ char *strupr (char *string);
|
||||||
char *strerror (int errnum);
|
char *strerror (int errnum);
|
||||||
void perror (char const *message);
|
void perror (char const *message);
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_STRING_H
|
#endif // __MES_STRING_H
|
||||||
|
|
|
@ -20,9 +20,9 @@
|
||||||
#ifndef __MES_STRINGS_H
|
#ifndef __MES_STRINGS_H
|
||||||
#define __MES_STRINGS_H 1
|
#define __MES_STRINGS_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#undef __MES_STRINGS_H
|
#undef __MES_STRINGS_H
|
||||||
#include_next <strings.h>
|
#include_next <strings.h>
|
||||||
#endif // (WITH_GLIBC)
|
#endif // (SYSTEM_LIBC)
|
||||||
|
|
||||||
#endif // __MES_STRINGS_H
|
#endif // __MES_STRINGS_H
|
||||||
|
|
|
@ -20,9 +20,9 @@
|
||||||
#ifndef __MES_SYS_CDEFS_H
|
#ifndef __MES_SYS_CDEFS_H
|
||||||
#define __MES_SYS_CDEFS_H 1
|
#define __MES_SYS_CDEFS_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#undef __MES_SYS_CDEFS_H
|
#undef __MES_SYS_CDEFS_H
|
||||||
#include_next <sys/cdefs.h>
|
#include_next <sys/cdefs.h>
|
||||||
#endif // (WITH_GLIBC)
|
#endif // (SYSTEM_LIBC)
|
||||||
|
|
||||||
#endif // __MES_SYS_CDEFS_H
|
#endif // __MES_SYS_CDEFS_H
|
||||||
|
|
|
@ -20,13 +20,13 @@
|
||||||
#ifndef __MES_SYS_DIR_H
|
#ifndef __MES_SYS_DIR_H
|
||||||
#define __MES_SYS_DIR_H 1
|
#define __MES_SYS_DIR_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#undef __MES_SYS_DIR_H
|
#undef __MES_SYS_DIR_H
|
||||||
#include_next <sys/dir.h>
|
#include_next <sys/dir.h>
|
||||||
|
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_SYS_DIR_H
|
#endif // __MES_SYS_DIR_H
|
||||||
|
|
|
@ -20,13 +20,13 @@
|
||||||
#ifndef __MES_SYS_FILE_H
|
#ifndef __MES_SYS_FILE_H
|
||||||
#define __MES_SYS_FILE_H 1
|
#define __MES_SYS_FILE_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#undef __MES_SYS_FILE_H
|
#undef __MES_SYS_FILE_H
|
||||||
#include_next <sys/file.h>
|
#include_next <sys/file.h>
|
||||||
|
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_SYS_FILE_H
|
#endif // __MES_SYS_FILE_H
|
||||||
|
|
|
@ -20,16 +20,16 @@
|
||||||
#ifndef __MES_SYS_IOCTL_H
|
#ifndef __MES_SYS_IOCTL_H
|
||||||
#define __MES_SYS_IOCTL_H 1
|
#define __MES_SYS_IOCTL_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#undef __MES_SYS_IOCTL_H
|
#undef __MES_SYS_IOCTL_H
|
||||||
#include_next <sys/ioctl.h>
|
#include_next <sys/ioctl.h>
|
||||||
|
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#define TCGETS 0x5401
|
#define TCGETS 0x5401
|
||||||
#define TCGETA 0x5405
|
#define TCGETA 0x5405
|
||||||
int ioctl (int fd, unsigned long request, ...);
|
int ioctl (int fd, unsigned long request, ...);
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_SYS_IOCTL_H
|
#endif // __MES_SYS_IOCTL_H
|
||||||
|
|
|
@ -20,10 +20,10 @@
|
||||||
#ifndef __MES_SYS_MMAN_H
|
#ifndef __MES_SYS_MMAN_H
|
||||||
#define __MES_SYS_MMAN_H 1
|
#define __MES_SYS_MMAN_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#undef __MES_SYS_MMAN_H
|
#undef __MES_SYS_MMAN_H
|
||||||
#include_next <sys/mman.h>
|
#include_next <sys/mman.h>
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#ifndef __MES_SIZE_T
|
#ifndef __MES_SIZE_T
|
||||||
#define __MES_SIZE_T
|
#define __MES_SIZE_T
|
||||||
|
@ -37,7 +37,7 @@ typedef unsigned long size_t;
|
||||||
|
|
||||||
int mprotect (void *addr, size_t len, int prot);
|
int mprotect (void *addr, size_t len, int prot);
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_SYS_MMAN_H
|
#endif // __MES_SYS_MMAN_H
|
||||||
|
|
||||||
|
|
|
@ -20,12 +20,12 @@
|
||||||
#ifndef __MES_SYS_PARAM_H
|
#ifndef __MES_SYS_PARAM_H
|
||||||
#define __MES_SYS_PARAM_H 1
|
#define __MES_SYS_PARAM_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#undef __MES_SYS_PARAM_H
|
#undef __MES_SYS_PARAM_H
|
||||||
#include_next <sys/param.h>
|
#include_next <sys/param.h>
|
||||||
|
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_SYS_PARAM_H
|
#endif // __MES_SYS_PARAM_H
|
||||||
|
|
|
@ -20,11 +20,11 @@
|
||||||
#ifndef __MES_SYS_RESOURCE_H
|
#ifndef __MES_SYS_RESOURCE_H
|
||||||
#define __MES_SYS_RESOURCE_H 1
|
#define __MES_SYS_RESOURCE_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#undef __MES_SYS_RESOURCE_H
|
#undef __MES_SYS_RESOURCE_H
|
||||||
#include_next <sys/resource.h>
|
#include_next <sys/resource.h>
|
||||||
|
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
|
@ -55,6 +55,6 @@ struct rusage
|
||||||
|
|
||||||
int getrusage (int processes, struct rusage *rusage);
|
int getrusage (int processes, struct rusage *rusage);
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_SYS_RESOURCE_H
|
#endif // __MES_SYS_RESOURCE_H
|
||||||
|
|
|
@ -20,11 +20,11 @@
|
||||||
#ifndef __MES_SYS_SELECT_H
|
#ifndef __MES_SYS_SELECT_H
|
||||||
#define __MES_SYS_SELECT_H 1
|
#define __MES_SYS_SELECT_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#undef __MES_SYS_SELECT_H
|
#undef __MES_SYS_SELECT_H
|
||||||
#include_next <sys/select.h>
|
#include_next <sys/select.h>
|
||||||
#else //! WITH_GLIBC
|
#else //! SYSTEM_LIBC
|
||||||
typedef int fd_set;
|
typedef int fd_set;
|
||||||
#endif //! WITH_GLIBC
|
#endif //! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_SYS_SELECT_H
|
#endif // __MES_SYS_SELECT_H
|
||||||
|
|
|
@ -20,11 +20,11 @@
|
||||||
#ifndef __MES_SYS_STAT_H
|
#ifndef __MES_SYS_STAT_H
|
||||||
#define __MES_SYS_STAT_H 1lei
|
#define __MES_SYS_STAT_H 1lei
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#undef __MES_SYS_STAT_H
|
#undef __MES_SYS_STAT_H
|
||||||
#include_next <sys/stat.h>
|
#include_next <sys/stat.h>
|
||||||
|
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
@ -114,6 +114,6 @@ int stat (char const *file_name, struct stat *buf);
|
||||||
#define S_IRWXG 00070
|
#define S_IRWXG 00070
|
||||||
#define S_IRWXO 00007
|
#define S_IRWXO 00007
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_SYS_STAT_H
|
#endif // __MES_SYS_STAT_H
|
||||||
|
|
|
@ -20,11 +20,11 @@
|
||||||
#ifndef __MES_SYS_TIME_H
|
#ifndef __MES_SYS_TIME_H
|
||||||
#define __MES_SYS_TIME_H 1
|
#define __MES_SYS_TIME_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#undef __MES_SYS_TIME_H
|
#undef __MES_SYS_TIME_H
|
||||||
#include_next <sys/time.h>
|
#include_next <sys/time.h>
|
||||||
|
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
struct timeval
|
struct timeval
|
||||||
{
|
{
|
||||||
|
@ -51,6 +51,6 @@ struct itimerval
|
||||||
int gettimeofday (struct timeval *tv, struct timezone *tz);
|
int gettimeofday (struct timeval *tv, struct timezone *tz);
|
||||||
int setitimer (int which, struct itimerval const *new, struct itimerval *old);
|
int setitimer (int which, struct itimerval const *new, struct itimerval *old);
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_SYS_TIME_H
|
#endif // __MES_SYS_TIME_H
|
||||||
|
|
|
@ -20,9 +20,9 @@
|
||||||
#ifndef __MES_SYS_TIMEB_H
|
#ifndef __MES_SYS_TIMEB_H
|
||||||
#define __MES_SYS_TIMEB_H 1
|
#define __MES_SYS_TIMEB_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#undef __MES_SYS_TIMEB_H
|
#undef __MES_SYS_TIMEB_H
|
||||||
#include_next <sys/timeb.h>
|
#include_next <sys/timeb.h>
|
||||||
#endif // (WITH_GLIBC)
|
#endif // (SYSTEM_LIBC)
|
||||||
|
|
||||||
#endif // __MES_SYS_TIMEB_H
|
#endif // __MES_SYS_TIMEB_H
|
||||||
|
|
|
@ -20,11 +20,11 @@
|
||||||
#ifndef __MES_SYS_TIMES_H
|
#ifndef __MES_SYS_TIMES_H
|
||||||
#define __MES_SYS_TIMES_H 1
|
#define __MES_SYS_TIMES_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#undef __MES_SYS_TIMES_H
|
#undef __MES_SYS_TIMES_H
|
||||||
#include_next <sys/times.h>
|
#include_next <sys/times.h>
|
||||||
|
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#ifndef __MES_CLOCK_T
|
#ifndef __MES_CLOCK_T
|
||||||
#define __MES_CLOCK_T
|
#define __MES_CLOCK_T
|
||||||
|
@ -48,6 +48,6 @@ struct tms
|
||||||
clock_t tms_cstime;
|
clock_t tms_cstime;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_SYS_TIMES_H
|
#endif // __MES_SYS_TIMES_H
|
||||||
|
|
|
@ -20,10 +20,10 @@
|
||||||
#ifndef __MES_SYS_TYPES_H
|
#ifndef __MES_SYS_TYPES_H
|
||||||
#define __MES_SYS_TYPES_H 1
|
#define __MES_SYS_TYPES_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#undef __MES_SYS_TYPES_H
|
#undef __MES_SYS_TYPES_H
|
||||||
#include_next <sys/types.h>
|
#include_next <sys/types.h>
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#include <endian.h>
|
#include <endian.h>
|
||||||
|
|
||||||
|
@ -135,6 +135,6 @@ typedef long ssize_t;
|
||||||
typedef unsigned uid_t;
|
typedef unsigned uid_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_SYS_TYPES_H
|
#endif // __MES_SYS_TYPES_H
|
||||||
|
|
|
@ -20,9 +20,9 @@
|
||||||
#ifndef __MES_SYS_UCONTEXT_H
|
#ifndef __MES_SYS_UCONTEXT_H
|
||||||
#define __MES_SYS_UCONTEXT_H 1
|
#define __MES_SYS_UCONTEXT_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#undef __MES_SYS_UCONTEXT_H
|
#undef __MES_SYS_UCONTEXT_H
|
||||||
#include_next <sys/ucontext.h>
|
#include_next <sys/ucontext.h>
|
||||||
#endif // (WITH_GLIBC)
|
#endif // (SYSTEM_LIBC)
|
||||||
|
|
||||||
#endif // __MES_SYS_UCONTEXT_H
|
#endif // __MES_SYS_UCONTEXT_H
|
||||||
|
|
|
@ -20,11 +20,11 @@
|
||||||
#ifndef __MES_SYS_USER_H
|
#ifndef __MES_SYS_USER_H
|
||||||
#define __MES_SYS_USER_H 1
|
#define __MES_SYS_USER_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#undef __MES_SYS_USER_H
|
#undef __MES_SYS_USER_H
|
||||||
#include_next <sys/user.h>
|
#include_next <sys/user.h>
|
||||||
|
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
/* These are the 32-bit x86 structures. */
|
/* These are the 32-bit x86 structures. */
|
||||||
struct user_fpregs_struct
|
struct user_fpregs_struct
|
||||||
|
@ -106,6 +106,6 @@ struct user
|
||||||
#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
|
#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
|
||||||
// *INDENT-ON*
|
// *INDENT-ON*
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_SYS_USER_H
|
#endif // __MES_SYS_USER_H
|
||||||
|
|
|
@ -20,10 +20,10 @@
|
||||||
#ifndef __MES_SYS_WAIT_H
|
#ifndef __MES_SYS_WAIT_H
|
||||||
#define __MES_SYS_WAIT_H 1
|
#define __MES_SYS_WAIT_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#undef __MES_SYS_WAIT_H
|
#undef __MES_SYS_WAIT_H
|
||||||
#include_next <sys/wait.h>
|
#include_next <sys/wait.h>
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#ifndef __MES_PID_T
|
#ifndef __MES_PID_T
|
||||||
#define __MES_PID_T
|
#define __MES_PID_T
|
||||||
|
@ -35,6 +35,6 @@ typedef int pid_t;
|
||||||
pid_t waitpid (pid_t pid, int *status_ptr, int options);
|
pid_t waitpid (pid_t pid, int *status_ptr, int options);
|
||||||
pid_t wait (int *status_ptr);
|
pid_t wait (int *status_ptr);
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_SYS_WAIT_H
|
#endif // __MES_SYS_WAIT_H
|
||||||
|
|
|
@ -20,14 +20,14 @@
|
||||||
#ifndef __MES_TERMIO_H
|
#ifndef __MES_TERMIO_H
|
||||||
#define __MES_TERMIO_H 1
|
#define __MES_TERMIO_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#ifndef _GNU_SOURCE
|
#ifndef _GNU_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#endif
|
#endif
|
||||||
#undef __MES_TERMIO_H
|
#undef __MES_TERMIO_H
|
||||||
#include_next <termio.h>
|
#include_next <termio.h>
|
||||||
|
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#define TIOCGWINSZ 0x5413
|
#define TIOCGWINSZ 0x5413
|
||||||
#define TCGETA 0x5405
|
#define TCGETA 0x5405
|
||||||
|
@ -59,6 +59,6 @@ struct termio
|
||||||
unsigned char c_cc[8];
|
unsigned char c_cc[8];
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_TERMIO_H
|
#endif // __MES_TERMIO_H
|
||||||
|
|
|
@ -20,10 +20,10 @@
|
||||||
#ifndef __MES_TIME_H
|
#ifndef __MES_TIME_H
|
||||||
#define __MES_TIME_H 1
|
#define __MES_TIME_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#undef __MES_TIME_H
|
#undef __MES_TIME_H
|
||||||
#include_next <time.h>
|
#include_next <time.h>
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#ifndef __MES_TIME_T
|
#ifndef __MES_TIME_T
|
||||||
#define __MES_TIME_T 1
|
#define __MES_TIME_T 1
|
||||||
|
@ -62,6 +62,6 @@ struct tm *gmtime (time_t const *time);
|
||||||
|
|
||||||
time_t time (time_t * tloc);
|
time_t time (time_t * tloc);
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_TIME_H
|
#endif // __MES_TIME_H
|
||||||
|
|
|
@ -20,14 +20,14 @@
|
||||||
#ifndef __MES_UNISTD_H
|
#ifndef __MES_UNISTD_H
|
||||||
#define __MES_UNISTD_H 1
|
#define __MES_UNISTD_H 1
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#ifndef _GNU_SOURCE
|
#ifndef _GNU_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#endif
|
#endif
|
||||||
#undef __MES_UNISTD_H
|
#undef __MES_UNISTD_H
|
||||||
#include_next <unistd.h>
|
#include_next <unistd.h>
|
||||||
|
|
||||||
#else // ! WITH_GLIBC
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#if defined (BOOTSTRAP_WITH_POSIX)
|
#if defined (BOOTSTRAP_WITH_POSIX)
|
||||||
#define _POSIX_VERSION 199009L
|
#define _POSIX_VERSION 199009L
|
||||||
|
@ -86,6 +86,6 @@ int unlink (char const *file_name);
|
||||||
ssize_t write (int filedes, void const *buffer, size_t size);
|
ssize_t write (int filedes, void const *buffer, size_t size);
|
||||||
pid_t getpid (void);
|
pid_t getpid (void);
|
||||||
|
|
||||||
#endif // ! WITH_GLIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_UNISTD_H
|
#endif // __MES_UNISTD_H
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
#include <mes/fdputs.c>
|
#include <mes/fdputs.c>
|
||||||
#include <mes/fdungetc.c>
|
#include <mes/fdungetc.c>
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
// The Mes C Library defines and initializes these in crt1
|
// The Mes C Library defines and initializes these in crt1
|
||||||
|
@ -62,7 +62,7 @@ mes_open (char const *file_name, int flags, int mask)
|
||||||
#include <mes/eputs.c>
|
#include <mes/eputs.c>
|
||||||
#include <mes/oputs.c>
|
#include <mes/oputs.c>
|
||||||
|
|
||||||
#else // !WITH_GLIBC
|
#else // !SYSTEM_LIBC
|
||||||
|
|
||||||
int
|
int
|
||||||
mes_open (char const *file_name, int flags, int mask)
|
mes_open (char const *file_name, int flags, int mask)
|
||||||
|
@ -70,7 +70,7 @@ mes_open (char const *file_name, int flags, int mask)
|
||||||
return _open3 (file_name, flags, mask);
|
return _open3 (file_name, flags, mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // !WITH_GLIBC
|
#endif // !SYSTEM_LIBC
|
||||||
|
|
||||||
#include <mes/eputc.c>
|
#include <mes/eputc.c>
|
||||||
#include <mes/oputc.c>
|
#include <mes/oputc.c>
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
int
|
int
|
||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
#if __GNUC__ && __x86_64__ && !WITH_GLIBC
|
#if __GNUC__ && __x86_64__ && !SYSTEM_LIBC
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
int i = 42;
|
int i = 42;
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
int
|
int
|
||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
#if __GNUC__ && __x86_64__ && !WITH_GLIBC
|
#if __GNUC__ && __x86_64__ && !SYSTEM_LIBC
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
char *s = "mes";
|
char *s = "mes";
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
int
|
int
|
||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
#if __GNUC__ && __x86_64__ && !WITH_GLIBC
|
#if __GNUC__ && __x86_64__ && !SYSTEM_LIBC
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#error "WITH_GLIBC not supported"
|
#error "SYSTEM_LIBC not supported"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <mes/lib.h>
|
#include <mes/lib.h>
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
"NULL=0"
|
"NULL=0"
|
||||||
"__linux__=1"
|
"__linux__=1"
|
||||||
"_POSIX_SOURCE=0"
|
"_POSIX_SOURCE=0"
|
||||||
"WITH_GLIBC=0"
|
"SYSTEM_LIBC=0"
|
||||||
"__STDC__=1"
|
"__STDC__=1"
|
||||||
"__MESC__=1"
|
"__MESC__=1"
|
||||||
,(if mes? "__MESC_MES__=1" "__MESC_MES__=0")
|
,(if mes? "__MESC_MES__=1" "__MESC_MES__=0")
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#error "WITH_GLIBC not supported"
|
#error "SYSTEM_LIBC not supported"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#error "WITH_GLIBC not supported"
|
#error "SYSTEM_LIBC not supported"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <mes/lib.h>
|
#include <mes/lib.h>
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#error "WITH_GLIBC not supported"
|
#error "SYSTEM_LIBC not supported"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
char *env[] = { "foo", "bar", "baz", 0 };
|
char *env[] = { "foo", "bar", "baz", 0 };
|
||||||
|
|
||||||
#if 0 //!WITH_GLIBC
|
#if 0 //!SYSTEM_LIBC
|
||||||
#define getenv xgetenv
|
#define getenv xgetenv
|
||||||
|
|
||||||
char *
|
char *
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
#error "WITH_GLIBC not supported"
|
#error "SYSTEM_LIBC not supported"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <mes/lib.h>
|
#include <mes/lib.h>
|
||||||
|
|
|
@ -30,8 +30,8 @@ rm -f src/strings.h
|
||||||
# GLIBC build
|
# GLIBC build
|
||||||
rm -rf out-glibc
|
rm -rf out-glibc
|
||||||
mkdir out-glibc
|
mkdir out-glibc
|
||||||
gcc -c -D WITH_GLIBC=1 -I include -I lib -o out-glibc/libmes.o lib/libmes.c
|
gcc -c -D SYSTEM_LIBC=1 -I include -I lib -o out-glibc/libmes.o lib/libmes.c
|
||||||
gcc -c -D WITH_GLIBC=1 -D VERSION=\"0.19\" -D MODULEDIR=\"module\" -D PREFIX=\"/usr/local\" -I include -o out-glibc/mes.o src/mes.c
|
gcc -c -D SYSTEM_LIBC=1 -D VERSION=\"0.19\" -D MODULEDIR=\"module\" -D PREFIX=\"/usr/local\" -I include -o out-glibc/mes.o src/mes.c
|
||||||
gcc out-glibc/mes.o out-glibc/libmes.o -o out-glibc/mes
|
gcc out-glibc/mes.o out-glibc/libmes.o -o out-glibc/mes
|
||||||
|
|
||||||
MES_PREFIX=mes out-glibc/mes --help
|
MES_PREFIX=mes out-glibc/mes --help
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include <mes/lib.h>
|
#include <mes/lib.h>
|
||||||
|
|
||||||
//#define MES_MINI 1
|
//#define MES_MINI 1
|
||||||
#if WITH_GLIBC
|
#if SYSTEM_LIBC
|
||||||
long ARENA_SIZE = 100000000; // 2.3GiB
|
long ARENA_SIZE = 100000000; // 2.3GiB
|
||||||
#else
|
#else
|
||||||
long ARENA_SIZE = 300000; // 32b: 3MiB, 64b: 6 MiB
|
long ARENA_SIZE = 300000; // 32b: 3MiB, 64b: 6 MiB
|
||||||
|
|
Loading…
Reference in a new issue