From 26e88603d40da56fa3b2e2dc2f6e9c0f8056030e Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Wed, 29 May 2019 16:15:12 +0200 Subject: [PATCH] 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. --- build-aux/config.sh | 2 +- include/alloca.h | 6 +++--- include/ar.h | 6 +++--- include/argz.h | 6 +++--- include/assert.h | 6 +++--- include/ctype.h | 6 +++--- include/dirent.h | 6 +++--- include/dirstream.h | 6 +++--- include/dlfcn.h | 6 +++--- include/endian.h | 6 +++--- include/errno.h | 6 +++--- include/fcntl.h | 6 +++--- include/features.h | 4 ++-- include/float.h | 6 +++--- include/getopt.h | 6 +++--- include/inttypes.h | 6 +++--- include/libgen.h | 6 +++--- include/limits.h | 6 +++--- include/linux/x86_64/syscall.h | 2 +- include/locale.h | 6 +++--- include/math.h | 9 ++++----- include/memory.h | 6 +++--- include/mes/lib-mini.h | 6 +++--- include/pwd.h | 6 +++--- include/setjmp.h | 6 +++--- include/signal.h | 6 +++--- include/stdarg.h | 6 +++--- include/stdbool.h | 6 +++--- include/stddef.h | 6 +++--- include/stdint.h | 6 +++--- include/stdio.h | 6 +++--- include/stdlib.h | 6 +++--- include/stdnoreturn.h | 6 +++--- include/string.h | 6 +++--- include/strings.h | 4 ++-- include/sys/cdefs.h | 4 ++-- include/sys/dir.h | 6 +++--- include/sys/file.h | 6 +++--- include/sys/ioctl.h | 6 +++--- include/sys/mman.h | 6 +++--- include/sys/param.h | 6 +++--- include/sys/resource.h | 6 +++--- include/sys/select.h | 6 +++--- include/sys/stat.h | 6 +++--- include/sys/time.h | 6 +++--- include/sys/timeb.h | 4 ++-- include/sys/times.h | 6 +++--- include/sys/types.h | 6 +++--- include/sys/ucontext.h | 4 ++-- include/sys/user.h | 6 +++--- include/sys/wait.h | 6 +++--- include/termio.h | 6 +++--- include/time.h | 6 +++--- include/unistd.h | 6 +++--- lib/libmes.c | 6 +++--- lib/tests/stdio/70-printf-hello.c | 2 +- lib/tests/stdio/70-printf-simple.c | 2 +- lib/tests/stdio/80-sscanf.c | 2 +- lib/tests/stdlib/50-malloc.c | 4 ++-- module/mescc/preprocess.scm | 2 +- scaffold/cons-mes.c | 4 ++-- scaffold/lib/stdlib/malloc.c | 4 ++-- scaffold/micro-mes.c | 4 ++-- scaffold/tests/61-array.c | 2 +- scaffold/tiny-mes.c | 4 ++-- simple.sh | 4 ++-- src/mes.c | 2 +- 67 files changed, 175 insertions(+), 176 deletions(-) diff --git a/build-aux/config.sh b/build-aux/config.sh index 382d1861..2ec06642 100644 --- a/build-aux/config.sh +++ b/build-aux/config.sh @@ -98,7 +98,7 @@ CPPFLAGS=${CPPFLAGS-" -I ${srcdest}include "} -[ "$with_glibc_p" ] && CPPFLAGS="$CPPFLAGS -D WITH_GLIBC=1" +[ "$with_glibc_p" ] && CPPFLAGS="$CPPFLAGS -D SYSTEM_LIBC=1" LDFLAGS=${LDFLAGS-" -v diff --git a/include/alloca.h b/include/alloca.h index 71c9b483..692f8fb0 100644 --- a/include/alloca.h +++ b/include/alloca.h @@ -20,14 +20,14 @@ #ifndef __MES_ALLOCA_H #define __MES_ALLOCA_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #undef __MES_ALLOCA_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC #ifndef __MES_SIZE_T #define __MES_SIZE_T @@ -43,6 +43,6 @@ char *alloca (int); void *alloca (size_t size); #endif -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_ALLOCA_H diff --git a/include/ar.h b/include/ar.h index ab01cb8f..230f5940 100644 --- a/include/ar.h +++ b/include/ar.h @@ -21,14 +21,14 @@ #ifndef __MES_AR_H #define __MES_AR_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #undef __MES_AR_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC // Taken from GNU C Library 2.2.5 @@ -51,6 +51,6 @@ struct ar_hdr char ar_fmag[2]; /* Always contains ARFMAG. */ }; -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_ARGZ_H diff --git a/include/argz.h b/include/argz.h index bc5bd6d9..685c7e10 100644 --- a/include/argz.h +++ b/include/argz.h @@ -20,14 +20,14 @@ #ifndef __MES_ARGZ_H #define __MES_ARGZ_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #undef __MES_ARGZ_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC #ifndef libc_hidden_def #define libc_hidden_def(x) @@ -37,6 +37,6 @@ size_t __argz_count (char const *argz, size_t len); void __argz_extract (char const *argz, size_t len, char **argv); -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_ARGZ_H diff --git a/include/assert.h b/include/assert.h index 11f63139..9fb3c6d8 100644 --- a/include/assert.h +++ b/include/assert.h @@ -20,15 +20,15 @@ #ifndef __MES_ASSERT_H #define __MES_ASSERT_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #undef __MES_ASSERT_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC #define assert(x) ((x) ? (void)0 : assert_fail (#x)) void assert_fail (char *s); -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_ASSERT_H diff --git a/include/ctype.h b/include/ctype.h index 8117cf13..29578874 100644 --- a/include/ctype.h +++ b/include/ctype.h @@ -20,14 +20,14 @@ #ifndef __MES_CTYPE_H #define __MES_CTYPE_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #undef __MES_CTYPE_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC #include int isalnum (int c); @@ -45,6 +45,6 @@ int isxdigit (int c); int tolower (int c); int toupper (int c); -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_CTYPE_H diff --git a/include/dirent.h b/include/dirent.h index fb45229a..7b4a0787 100644 --- a/include/dirent.h +++ b/include/dirent.h @@ -22,14 +22,14 @@ #ifndef __MES_DIRENT_H #define __MES_DIRENT_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #undef __MES_DIRENT_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC #include @@ -71,6 +71,6 @@ struct dirent *readdir (DIR * dirp); /* Rewind DIRP to the beginning of the directory. */ extern void rewinddir (DIR * dirp); -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_DIRENT_H diff --git a/include/dirstream.h b/include/dirstream.h index 31e369b1..e67df35d 100644 --- a/include/dirstream.h +++ b/include/dirstream.h @@ -22,14 +22,14 @@ #ifndef __MES_DIRSTREAM_H #define __MES_DIRSTREAM_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #undef __MES_DIRSTREAM_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC #include @@ -50,6 +50,6 @@ struct __dirstream typedef struct __dirstream DIR; -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_DIRSTREAM_H diff --git a/include/dlfcn.h b/include/dlfcn.h index 28ec8873..9dbea76b 100644 --- a/include/dlfcn.h +++ b/include/dlfcn.h @@ -20,11 +20,11 @@ #ifndef __MES_DLFCN_H #define __MES_DLFCN_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #undef __MES_DLFCN_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC #define RTLD_LAZY 0x00001 #define RTLD_NOW 0x00002 @@ -39,6 +39,6 @@ void *dlopen (char const *filename, int flags); int dlclose (void *handle); -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_DLFCN_H diff --git a/include/endian.h b/include/endian.h index a313134f..621f0757 100644 --- a/include/endian.h +++ b/include/endian.h @@ -20,17 +20,17 @@ #ifndef __MES_ENDIAN_H #define __MES_ENDIAN_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #undef __MES_ENDIAN_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC #define __LITTLE_ENDIAN 1234 #define __BIG_ENDIAN 4321 #define __BYTE_ORDER __LITTLE_ENDIAN -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_ENDIAN_H diff --git a/include/errno.h b/include/errno.h index 63257384..8b640e99 100644 --- a/include/errno.h +++ b/include/errno.h @@ -20,13 +20,13 @@ #ifndef __MES_ERRNO_H #define __MES_ERRNO_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #undef __MES_ERRNO_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC #ifndef __MES_ERRNO_T #define __MES_ERRNO_T 1 @@ -65,6 +65,6 @@ extern char *sys_errlist[]; extern int sys_nerr; #endif // !__MESC__ -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_ERRNO_H diff --git a/include/fcntl.h b/include/fcntl.h index 5d2e7bb4..148d5ea6 100644 --- a/include/fcntl.h +++ b/include/fcntl.h @@ -20,14 +20,14 @@ #ifndef __MES_FCNTL_H #define __MES_FCNTL_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #undef __MES_FCNTL_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC // *INDENT-OFF* #define O_RDONLY 0 @@ -53,6 +53,6 @@ int dup2 (int old, int new); int fcntl (int filedes, int command, ...); int open (char const *s, int flags, ...); -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_FCNTL_H diff --git a/include/features.h b/include/features.h index aa56b052..c1c161a6 100644 --- a/include/features.h +++ b/include/features.h @@ -20,9 +20,9 @@ #ifndef __MES_FEATURES_H #define __MES_FEATURES_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #undef __MES_FEATURES_H #include_next -#endif // (WITH_GLIBC) +#endif // (SYSTEM_LIBC) #endif // __MES_FEATURES_H diff --git a/include/float.h b/include/float.h index de0a1cfb..b5aeba3a 100644 --- a/include/float.h +++ b/include/float.h @@ -20,15 +20,15 @@ #ifndef __MES_FLOAT_H #define __MES_FLOAT_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #undef __MES_FLOAT_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC #define MIN_EXP -1021 #define DBL_MIN_EXP -1021 #define LDBL_MIN_EXP -1021 -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_FLOAT_H diff --git a/include/getopt.h b/include/getopt.h index b70cfad2..23d8693b 100644 --- a/include/getopt.h +++ b/include/getopt.h @@ -21,14 +21,14 @@ #ifndef __MES_GETOPT_H #define __MES_GETOPT_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #undef __MES_GETOPT_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC #include int isdigit (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, struct option const *long_options, int *opt_index); -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_GETOPT_H diff --git a/include/inttypes.h b/include/inttypes.h index 45640d90..5c56ad9b 100644 --- a/include/inttypes.h +++ b/include/inttypes.h @@ -20,15 +20,15 @@ #ifndef __MES_INTTYPES_H #define __MES_INTTYPES_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #undef __MES_INTTYPES_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC #include -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_INTTYPES_H diff --git a/include/libgen.h b/include/libgen.h index be76015c..3e5aa193 100644 --- a/include/libgen.h +++ b/include/libgen.h @@ -20,15 +20,15 @@ #ifndef __MES_LIBGEN_H #define __MES_LIBGEN_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #undef __MES_LIBGEN_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC char *dirname (char *); -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_LIBGEN_H diff --git a/include/limits.h b/include/limits.h index 6cc6e307..9cbbf97a 100644 --- a/include/limits.h +++ b/include/limits.h @@ -20,14 +20,14 @@ #ifndef __MES_LIMITS_H #define __MES_LIMITS_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #undef __MES_LIMITS_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC #include @@ -36,6 +36,6 @@ #define PATH_MAX 512 #define _POSIX_OPEN_MAX 16 -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_LIMITS_H diff --git a/include/linux/x86_64/syscall.h b/include/linux/x86_64/syscall.h index 5ad16fb8..5cd8477d 100644 --- a/include/linux/x86_64/syscall.h +++ b/include/linux/x86_64/syscall.h @@ -77,7 +77,7 @@ #define SYS_getegid 0x6c #define SYS_getppid 0x6e -// make+WITH_GLIBC +// make+SYSTEM_LIBC #define SYS_rt_sigprocmask 0x0e #endif // __MES_LINUX_X86_64_SYSCALL_H diff --git a/include/locale.h b/include/locale.h index 1cdacda6..44e58bdb 100644 --- a/include/locale.h +++ b/include/locale.h @@ -20,14 +20,14 @@ #ifndef __MES_LOCALE_H #define __MES_LOCALE_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #undef __MES_LOCALE_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC // *INDENT-OFF* #ifndef LC_ALL @@ -40,6 +40,6 @@ char *setlocale (int category, char const *locale); -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_LOCALE_H diff --git a/include/math.h b/include/math.h index 6ba64bcf..adf3ceb8 100644 --- a/include/math.h +++ b/include/math.h @@ -20,13 +20,12 @@ #ifndef __MES_MATH_H #define __MES_MATH_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #undef __MES_MATH_H #include_next -#else // ! WITH_GLIBC -double ldexp (double x, int exp); -#endif // ! WITH_GLIBC - +#else // ! SYSTEM_LIBC double fabs (double number); +double ldexp (double value, int exponent); +#endif // ! SYSTEM_LIBC #endif // __MES_MATH_H diff --git a/include/memory.h b/include/memory.h index ea6fc7c9..43e63358 100644 --- a/include/memory.h +++ b/include/memory.h @@ -20,17 +20,17 @@ #ifndef __MES_MEMORY_H #define __MES_MEMORY_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #undef __MES_MEMORY_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC #include -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_MEMORY_H diff --git a/include/mes/lib-mini.h b/include/mes/lib-mini.h index 7bc49534..f04f64e4 100644 --- a/include/mes/lib-mini.h +++ b/include/mes/lib-mini.h @@ -21,7 +21,7 @@ #ifndef __MES_LIB_MINI_H #define __MES_LIB_MINI_H -#if !WITH_GLIBC +#if !SYSTEM_LIBC #ifndef _SIZE_T #define _SIZE_T @@ -83,10 +83,10 @@ int eputs (char const *s); int puts (char const *s); int oputs (char const *s); -#if !WITH_GLIBC +#if !SYSTEM_LIBC size_t strlen (char const *s); ssize_t _write (); ssize_t write (int filedes, void const *buffer, size_t size); -#endif // !WITH_GLIBC +#endif // !SYSTEM_LIBC #endif //__MES_LIB_MINI_H diff --git a/include/pwd.h b/include/pwd.h index f519e8e5..90bef063 100644 --- a/include/pwd.h +++ b/include/pwd.h @@ -20,10 +20,10 @@ #ifndef __MES_PWD_H #define __MES_PWD_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #undef __MES_PWD_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC struct passwd { @@ -39,6 +39,6 @@ struct passwd struct passwd *getpwuid (); -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_PWD_H diff --git a/include/setjmp.h b/include/setjmp.h index f2dee025..512ea111 100644 --- a/include/setjmp.h +++ b/include/setjmp.h @@ -20,10 +20,10 @@ #ifndef __MES_SETJMP_H #define __MES_SETJMP_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #undef __MES_SETJMP_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC typedef struct { @@ -42,6 +42,6 @@ jmp_buf buf; void longjmp (jmp_buf env, int val); int setjmp (jmp_buf env); -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_SETJMP_H diff --git a/include/signal.h b/include/signal.h index b8ed5299..121d3027 100644 --- a/include/signal.h +++ b/include/signal.h @@ -20,10 +20,10 @@ #ifndef __MES_SIGNAL_H #define __MES_SIGNAL_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #undef __MES_SIGNAL_H #include_next -#else //! WITH_GLIBC +#else //! SYSTEM_LIBC typedef long sigset_t; @@ -236,6 +236,6 @@ int sigemptyset (sigset_t * set); #endif int sigprocmask (int how, sigset_t const *set, sigset_t * oldset); -#endif //! WITH_GLIBC +#endif //! SYSTEM_LIBC #endif // __MES_SIGNAL_H diff --git a/include/stdarg.h b/include/stdarg.h index 0c8c3f39..239d4443 100644 --- a/include/stdarg.h +++ b/include/stdarg.h @@ -20,10 +20,10 @@ #ifndef __MES_STDARG_H #define __MES_STDARG_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #undef __MES_STDARG_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC #include @@ -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 vsscanf (char const *s, char const *template, va_list ap); -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_STDARG_H diff --git a/include/stdbool.h b/include/stdbool.h index 5efed757..6ad84b67 100644 --- a/include/stdbool.h +++ b/include/stdbool.h @@ -20,17 +20,17 @@ #ifndef __MES_STDBOOL_H #define __MES_STDBOOL_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #undef __MES_STDBOOL_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC typedef int bool; #define false 0 #define true 1 -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_STDBOOL_H diff --git a/include/stddef.h b/include/stddef.h index 1d897a35..a597c9bb 100644 --- a/include/stddef.h +++ b/include/stddef.h @@ -20,10 +20,10 @@ #ifndef __MES_STDDEF_H #define __MES_STDDEF_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #undef __MES_STDDEF_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC #include #include @@ -37,6 +37,6 @@ #endif // !__MESC__ #endif // offsetof -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_STDDEF_H diff --git a/include/stdint.h b/include/stdint.h index e225c7e9..68821dbe 100644 --- a/include/stdint.h +++ b/include/stdint.h @@ -21,14 +21,14 @@ #ifndef __MES_STDINT_H #define __MES_STDINT_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #undef __MES_STDINT_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC #undef unsigned #undef uint8_t @@ -121,6 +121,6 @@ typedef long ptrdiff_t; #define SIZE_MAX UINT64_MAX #endif -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_STDINT_H diff --git a/include/stdio.h b/include/stdio.h index cd8d8bd8..ed46d6c5 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -22,14 +22,14 @@ #include -#if WITH_GLIBC +#if SYSTEM_LIBC #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #undef __MES_STDIO_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC #ifndef _IOFBF #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 fwrite (void const *ptr, size_t size, size_t count, FILE * stream); -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_STDIO_H diff --git a/include/stdlib.h b/include/stdlib.h index 7cc4e5c0..fbc06660 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -20,13 +20,13 @@ #ifndef __MES_STDLIB_H #define __MES_STDLIB_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #undef __MES_STDLIB_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC #include #include @@ -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); -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_STDLIB_H diff --git a/include/stdnoreturn.h b/include/stdnoreturn.h index 1b61db51..1bc2278c 100644 --- a/include/stdnoreturn.h +++ b/include/stdnoreturn.h @@ -20,15 +20,15 @@ #ifndef __MES_STDNORETURN_H #define __MES_STDNORETURN_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #undef __MES_STDNORETURN_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC // whut? -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_STDNORETURN_H diff --git a/include/string.h b/include/string.h index 7b3056eb..da981444 100644 --- a/include/string.h +++ b/include/string.h @@ -20,14 +20,14 @@ #ifndef __MES_STRING_H #define __MES_STRING_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #undef __MES_STRING_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC #ifndef NULL #define NULL 0 @@ -69,6 +69,6 @@ char *strupr (char *string); char *strerror (int errnum); void perror (char const *message); -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_STRING_H diff --git a/include/strings.h b/include/strings.h index 87041dc6..04f94d66 100644 --- a/include/strings.h +++ b/include/strings.h @@ -20,9 +20,9 @@ #ifndef __MES_STRINGS_H #define __MES_STRINGS_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #undef __MES_STRINGS_H #include_next -#endif // (WITH_GLIBC) +#endif // (SYSTEM_LIBC) #endif // __MES_STRINGS_H diff --git a/include/sys/cdefs.h b/include/sys/cdefs.h index 8efde99b..26d12396 100644 --- a/include/sys/cdefs.h +++ b/include/sys/cdefs.h @@ -20,9 +20,9 @@ #ifndef __MES_SYS_CDEFS_H #define __MES_SYS_CDEFS_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #undef __MES_SYS_CDEFS_H #include_next -#endif // (WITH_GLIBC) +#endif // (SYSTEM_LIBC) #endif // __MES_SYS_CDEFS_H diff --git a/include/sys/dir.h b/include/sys/dir.h index b7efb80a..8bb60420 100644 --- a/include/sys/dir.h +++ b/include/sys/dir.h @@ -20,13 +20,13 @@ #ifndef __MES_SYS_DIR_H #define __MES_SYS_DIR_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #undef __MES_SYS_DIR_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_SYS_DIR_H diff --git a/include/sys/file.h b/include/sys/file.h index 071110eb..4f122c40 100644 --- a/include/sys/file.h +++ b/include/sys/file.h @@ -20,13 +20,13 @@ #ifndef __MES_SYS_FILE_H #define __MES_SYS_FILE_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #undef __MES_SYS_FILE_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_SYS_FILE_H diff --git a/include/sys/ioctl.h b/include/sys/ioctl.h index dfe296a1..f26c9f8e 100644 --- a/include/sys/ioctl.h +++ b/include/sys/ioctl.h @@ -20,16 +20,16 @@ #ifndef __MES_SYS_IOCTL_H #define __MES_SYS_IOCTL_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #undef __MES_SYS_IOCTL_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC #define TCGETS 0x5401 #define TCGETA 0x5405 int ioctl (int fd, unsigned long request, ...); -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_SYS_IOCTL_H diff --git a/include/sys/mman.h b/include/sys/mman.h index 77b87d02..9f696b01 100644 --- a/include/sys/mman.h +++ b/include/sys/mman.h @@ -20,10 +20,10 @@ #ifndef __MES_SYS_MMAN_H #define __MES_SYS_MMAN_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #undef __MES_SYS_MMAN_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC #ifndef __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); -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_SYS_MMAN_H diff --git a/include/sys/param.h b/include/sys/param.h index 0f8f6708..6fe526f6 100644 --- a/include/sys/param.h +++ b/include/sys/param.h @@ -20,12 +20,12 @@ #ifndef __MES_SYS_PARAM_H #define __MES_SYS_PARAM_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #undef __MES_SYS_PARAM_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_SYS_PARAM_H diff --git a/include/sys/resource.h b/include/sys/resource.h index ebf5809a..dab45d17 100644 --- a/include/sys/resource.h +++ b/include/sys/resource.h @@ -20,11 +20,11 @@ #ifndef __MES_SYS_RESOURCE_H #define __MES_SYS_RESOURCE_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #undef __MES_SYS_RESOURCE_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC #include @@ -55,6 +55,6 @@ struct rusage int getrusage (int processes, struct rusage *rusage); -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_SYS_RESOURCE_H diff --git a/include/sys/select.h b/include/sys/select.h index 9dc160bd..420bd380 100644 --- a/include/sys/select.h +++ b/include/sys/select.h @@ -20,11 +20,11 @@ #ifndef __MES_SYS_SELECT_H #define __MES_SYS_SELECT_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #undef __MES_SYS_SELECT_H #include_next -#else //! WITH_GLIBC +#else //! SYSTEM_LIBC typedef int fd_set; -#endif //! WITH_GLIBC +#endif //! SYSTEM_LIBC #endif // __MES_SYS_SELECT_H diff --git a/include/sys/stat.h b/include/sys/stat.h index f25d5713..230d6d89 100644 --- a/include/sys/stat.h +++ b/include/sys/stat.h @@ -20,11 +20,11 @@ #ifndef __MES_SYS_STAT_H #define __MES_SYS_STAT_H 1lei -#if WITH_GLIBC +#if SYSTEM_LIBC #undef __MES_SYS_STAT_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC #include #include @@ -114,6 +114,6 @@ int stat (char const *file_name, struct stat *buf); #define S_IRWXG 00070 #define S_IRWXO 00007 -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_SYS_STAT_H diff --git a/include/sys/time.h b/include/sys/time.h index 49069499..3a4dc2e9 100644 --- a/include/sys/time.h +++ b/include/sys/time.h @@ -20,11 +20,11 @@ #ifndef __MES_SYS_TIME_H #define __MES_SYS_TIME_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #undef __MES_SYS_TIME_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC struct timeval { @@ -51,6 +51,6 @@ struct itimerval int gettimeofday (struct timeval *tv, struct timezone *tz); int setitimer (int which, struct itimerval const *new, struct itimerval *old); -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_SYS_TIME_H diff --git a/include/sys/timeb.h b/include/sys/timeb.h index 31e40ece..13ec953e 100644 --- a/include/sys/timeb.h +++ b/include/sys/timeb.h @@ -20,9 +20,9 @@ #ifndef __MES_SYS_TIMEB_H #define __MES_SYS_TIMEB_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #undef __MES_SYS_TIMEB_H #include_next -#endif // (WITH_GLIBC) +#endif // (SYSTEM_LIBC) #endif // __MES_SYS_TIMEB_H diff --git a/include/sys/times.h b/include/sys/times.h index 91f3e3bd..1b19d2f8 100644 --- a/include/sys/times.h +++ b/include/sys/times.h @@ -20,11 +20,11 @@ #ifndef __MES_SYS_TIMES_H #define __MES_SYS_TIMES_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #undef __MES_SYS_TIMES_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC #ifndef __MES_CLOCK_T #define __MES_CLOCK_T @@ -48,6 +48,6 @@ struct tms clock_t tms_cstime; }; -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_SYS_TIMES_H diff --git a/include/sys/types.h b/include/sys/types.h index 1efde1f4..6fc0aa3d 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -20,10 +20,10 @@ #ifndef __MES_SYS_TYPES_H #define __MES_SYS_TYPES_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #undef __MES_SYS_TYPES_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC #include @@ -135,6 +135,6 @@ typedef long ssize_t; typedef unsigned uid_t; #endif -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_SYS_TYPES_H diff --git a/include/sys/ucontext.h b/include/sys/ucontext.h index fa7df2bc..3cc761d3 100644 --- a/include/sys/ucontext.h +++ b/include/sys/ucontext.h @@ -20,9 +20,9 @@ #ifndef __MES_SYS_UCONTEXT_H #define __MES_SYS_UCONTEXT_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #undef __MES_SYS_UCONTEXT_H #include_next -#endif // (WITH_GLIBC) +#endif // (SYSTEM_LIBC) #endif // __MES_SYS_UCONTEXT_H diff --git a/include/sys/user.h b/include/sys/user.h index 5f90fd58..3e984344 100644 --- a/include/sys/user.h +++ b/include/sys/user.h @@ -20,11 +20,11 @@ #ifndef __MES_SYS_USER_H #define __MES_SYS_USER_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #undef __MES_SYS_USER_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC /* These are the 32-bit x86 structures. */ struct user_fpregs_struct @@ -106,6 +106,6 @@ struct user #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) // *INDENT-ON* -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_SYS_USER_H diff --git a/include/sys/wait.h b/include/sys/wait.h index 73f7035a..37d58a96 100644 --- a/include/sys/wait.h +++ b/include/sys/wait.h @@ -20,10 +20,10 @@ #ifndef __MES_SYS_WAIT_H #define __MES_SYS_WAIT_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #undef __MES_SYS_WAIT_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC #ifndef __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 wait (int *status_ptr); -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_SYS_WAIT_H diff --git a/include/termio.h b/include/termio.h index 8bd86e05..51cff8cc 100644 --- a/include/termio.h +++ b/include/termio.h @@ -20,14 +20,14 @@ #ifndef __MES_TERMIO_H #define __MES_TERMIO_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #undef __MES_TERMIO_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC #define TIOCGWINSZ 0x5413 #define TCGETA 0x5405 @@ -59,6 +59,6 @@ struct termio unsigned char c_cc[8]; }; -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_TERMIO_H diff --git a/include/time.h b/include/time.h index b022f11b..e28dcbba 100644 --- a/include/time.h +++ b/include/time.h @@ -20,10 +20,10 @@ #ifndef __MES_TIME_H #define __MES_TIME_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #undef __MES_TIME_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC #ifndef __MES_TIME_T #define __MES_TIME_T 1 @@ -62,6 +62,6 @@ struct tm *gmtime (time_t const *time); time_t time (time_t * tloc); -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_TIME_H diff --git a/include/unistd.h b/include/unistd.h index d0bb2ef8..b2b18c1c 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -20,14 +20,14 @@ #ifndef __MES_UNISTD_H #define __MES_UNISTD_H 1 -#if WITH_GLIBC +#if SYSTEM_LIBC #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #undef __MES_UNISTD_H #include_next -#else // ! WITH_GLIBC +#else // ! SYSTEM_LIBC #if defined (BOOTSTRAP_WITH_POSIX) #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); pid_t getpid (void); -#endif // ! WITH_GLIBC +#endif // ! SYSTEM_LIBC #endif // __MES_UNISTD_H diff --git a/lib/libmes.c b/lib/libmes.c index 528d1c45..7b76da28 100644 --- a/lib/libmes.c +++ b/lib/libmes.c @@ -41,7 +41,7 @@ #include #include -#if WITH_GLIBC +#if SYSTEM_LIBC #include #include // 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 #include -#else // !WITH_GLIBC +#else // !SYSTEM_LIBC int 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); } -#endif // !WITH_GLIBC +#endif // !SYSTEM_LIBC #include #include diff --git a/lib/tests/stdio/70-printf-hello.c b/lib/tests/stdio/70-printf-hello.c index 598ba355..cbe13bfe 100644 --- a/lib/tests/stdio/70-printf-hello.c +++ b/lib/tests/stdio/70-printf-hello.c @@ -27,7 +27,7 @@ int main () { -#if __GNUC__ && __x86_64__ && !WITH_GLIBC +#if __GNUC__ && __x86_64__ && !SYSTEM_LIBC return 0; #endif int i = 42; diff --git a/lib/tests/stdio/70-printf-simple.c b/lib/tests/stdio/70-printf-simple.c index b2e694b1..f0542766 100644 --- a/lib/tests/stdio/70-printf-simple.c +++ b/lib/tests/stdio/70-printf-simple.c @@ -27,7 +27,7 @@ int main () { -#if __GNUC__ && __x86_64__ && !WITH_GLIBC +#if __GNUC__ && __x86_64__ && !SYSTEM_LIBC return 0; #endif char *s = "mes"; diff --git a/lib/tests/stdio/80-sscanf.c b/lib/tests/stdio/80-sscanf.c index 7d8acaac..4c7c7ccc 100644 --- a/lib/tests/stdio/80-sscanf.c +++ b/lib/tests/stdio/80-sscanf.c @@ -26,7 +26,7 @@ int main () { -#if __GNUC__ && __x86_64__ && !WITH_GLIBC +#if __GNUC__ && __x86_64__ && !SYSTEM_LIBC return 0; #endif int i; diff --git a/lib/tests/stdlib/50-malloc.c b/lib/tests/stdlib/50-malloc.c index f0caf755..92455b83 100644 --- a/lib/tests/stdlib/50-malloc.c +++ b/lib/tests/stdlib/50-malloc.c @@ -18,8 +18,8 @@ * along with GNU Mes. If not, see . */ -#if WITH_GLIBC -#error "WITH_GLIBC not supported" +#if SYSTEM_LIBC +#error "SYSTEM_LIBC not supported" #endif #include diff --git a/module/mescc/preprocess.scm b/module/mescc/preprocess.scm index cb046013..59c6fd03 100644 --- a/module/mescc/preprocess.scm +++ b/module/mescc/preprocess.scm @@ -85,7 +85,7 @@ "NULL=0" "__linux__=1" "_POSIX_SOURCE=0" - "WITH_GLIBC=0" + "SYSTEM_LIBC=0" "__STDC__=1" "__MESC__=1" ,(if mes? "__MESC_MES__=1" "__MESC_MES__=0") diff --git a/scaffold/cons-mes.c b/scaffold/cons-mes.c index 4e8b3c8a..09028728 100644 --- a/scaffold/cons-mes.c +++ b/scaffold/cons-mes.c @@ -18,8 +18,8 @@ * along with GNU Mes. If not, see . */ -#if WITH_GLIBC -#error "WITH_GLIBC not supported" +#if SYSTEM_LIBC +#error "SYSTEM_LIBC not supported" #endif #include diff --git a/scaffold/lib/stdlib/malloc.c b/scaffold/lib/stdlib/malloc.c index b3fc3966..a5db204b 100644 --- a/scaffold/lib/stdlib/malloc.c +++ b/scaffold/lib/stdlib/malloc.c @@ -18,8 +18,8 @@ * along with GNU Mes. If not, see . */ -#if WITH_GLIBC -#error "WITH_GLIBC not supported" +#if SYSTEM_LIBC +#error "SYSTEM_LIBC not supported" #endif #include diff --git a/scaffold/micro-mes.c b/scaffold/micro-mes.c index f161eb36..ca31ba0b 100644 --- a/scaffold/micro-mes.c +++ b/scaffold/micro-mes.c @@ -18,8 +18,8 @@ * along with GNU Mes. If not, see . */ -#if WITH_GLIBC -#error "WITH_GLIBC not supported" +#if SYSTEM_LIBC +#error "SYSTEM_LIBC not supported" #endif #include diff --git a/scaffold/tests/61-array.c b/scaffold/tests/61-array.c index a3056101..49251625 100644 --- a/scaffold/tests/61-array.c +++ b/scaffold/tests/61-array.c @@ -26,7 +26,7 @@ char *env[] = { "foo", "bar", "baz", 0 }; -#if 0 //!WITH_GLIBC +#if 0 //!SYSTEM_LIBC #define getenv xgetenv char * diff --git a/scaffold/tiny-mes.c b/scaffold/tiny-mes.c index 0ab83381..fe83b612 100644 --- a/scaffold/tiny-mes.c +++ b/scaffold/tiny-mes.c @@ -18,8 +18,8 @@ * along with GNU Mes. If not, see . */ -#if WITH_GLIBC -#error "WITH_GLIBC not supported" +#if SYSTEM_LIBC +#error "SYSTEM_LIBC not supported" #endif #include diff --git a/simple.sh b/simple.sh index 55cf3a0f..bc3f6b9d 100755 --- a/simple.sh +++ b/simple.sh @@ -30,8 +30,8 @@ rm -f src/strings.h # GLIBC build rm -rf 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 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 -I include -I lib -o out-glibc/libmes.o lib/libmes.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 MES_PREFIX=mes out-glibc/mes --help diff --git a/src/mes.c b/src/mes.c index 6b0aafa5..aa3363f0 100644 --- a/src/mes.c +++ b/src/mes.c @@ -27,7 +27,7 @@ #include //#define MES_MINI 1 -#if WITH_GLIBC +#if SYSTEM_LIBC long ARENA_SIZE = 100000000; // 2.3GiB #else long ARENA_SIZE = 300000; // 32b: 3MiB, 64b: 6 MiB