From 7a50dba812d2cb47a7ea80a0ba01ed043cbb1b89 Mon Sep 17 00:00:00 2001 From: ahgamut <41098605+ahgamut@users.noreply.github.com> Date: Tue, 26 Oct 2021 23:45:32 +0530 Subject: [PATCH] changes made to enable compilation --- third_party/make/lib/fcntl.c | 17 +- third_party/make/lib/stdbool.in.h | 4 +- third_party/make/src/arscan.c | 2 +- third_party/make/src/config.h | 1133 +++++++++++++++++++++++++++++ third_party/make/src/dir.c | 9 + third_party/make/src/getopt.h | 8 + third_party/make/src/job.c | 14 +- third_party/make/src/makeint.h | 3 +- third_party/make/src/misc.c | 5 +- third_party/make/src/read.c | 9 +- 10 files changed, 1171 insertions(+), 33 deletions(-) create mode 100644 third_party/make/src/config.h diff --git a/third_party/make/lib/fcntl.c b/third_party/make/lib/fcntl.c index 6b9927ec4..291b9a915 100644 --- a/third_party/make/lib/fcntl.c +++ b/third_party/make/lib/fcntl.c @@ -208,24 +208,20 @@ fcntl (int fd, int action, /* arg */...) va_list arg; int result = -1; va_start (arg, action); - switch (action) - { - case F_DUPFD: + if(action == F_DUPFD) { int target = va_arg (arg, int); result = rpl_fcntl_DUPFD (fd, target); - break; } - case F_DUPFD_CLOEXEC: + else if(action == F_DUPFD_CLOEXEC) { int target = va_arg (arg, int); result = rpl_fcntl_DUPFD_CLOEXEC (fd, target); - break; } #if !HAVE_FCNTL - case F_GETFD: + else if(action == F_GETFD) { # if defined _WIN32 && ! defined __CYGWIN__ HANDLE handle = (HANDLE) _get_osfhandle (fd); @@ -241,7 +237,6 @@ fcntl (int fd, int action, /* arg */...) if (0 <= dup2 (fd, fd)) result = 0; # endif /* !W32 */ - break; } /* F_GETFD */ #endif /* !HAVE_FCNTL */ @@ -253,9 +248,9 @@ fcntl (int fd, int action, /* arg */...) using dup2 to move the duplicate onto the original, but that is not supported for now. */ - default: + else { -#if HAVE_FCNTL +#if 0 switch (action) { #ifdef F_BARRIERFSYNC /* macOS */ @@ -436,9 +431,7 @@ fcntl (int fd, int action, /* arg */...) #else errno = EINVAL; #endif - break; } - } va_end (arg); return result; } diff --git a/third_party/make/lib/stdbool.in.h b/third_party/make/lib/stdbool.in.h index baacf98a3..795d251c9 100644 --- a/third_party/make/lib/stdbool.in.h +++ b/third_party/make/lib/stdbool.in.h @@ -74,7 +74,7 @@ /* A compiler known to have 'bool'. */ /* If the compiler already has both 'bool' and '_Bool', we can assume they are the same types. */ -# if !@HAVE__BOOL@ +# if 0 typedef bool _Bool; # endif # else @@ -115,7 +115,7 @@ typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool; # endif # endif # endif -# define bool _Bool +// # define bool _Bool #endif /* The other macros must be usable in preprocessor directives. */ diff --git a/third_party/make/src/arscan.c b/third_party/make/src/arscan.c index 3ce21db8d..3b6cfa2e5 100644 --- a/third_party/make/src/arscan.c +++ b/third_party/make/src/arscan.c @@ -331,7 +331,7 @@ ar_scan (const char *archive, ar_member_func_t function, const void *varg) #endif #ifndef WINDOWS32 -# if !defined (__ANDROID__) && !defined (__BEOS__) +# if 0 && !defined (__ANDROID__) && !defined (__BEOS__) # include # else /* These platforms don't have but have archives in the same format diff --git a/third_party/make/src/config.h b/third_party/make/src/config.h new file mode 100644 index 000000000..bbb1d3a3e --- /dev/null +++ b/third_party/make/src/config.h @@ -0,0 +1,1133 @@ +/* src/config.h. Generated from config.h.in by configure. */ +/* src/config.h.in. Generated from configure.ac by autoheader. */ + +/* CPU and C ABI indicator */ +#ifndef __i386__ +/* #undef __i386__ */ +#endif +#ifndef __x86_64_x32__ +/* #undef __x86_64_x32__ */ +#endif +#ifndef __x86_64__ +#define __x86_64__ 1 +#endif +#ifndef __alpha__ +/* #undef __alpha__ */ +#endif +#ifndef __arm__ +/* #undef __arm__ */ +#endif +#ifndef __armhf__ +/* #undef __armhf__ */ +#endif +#ifndef __arm64_ilp32__ +/* #undef __arm64_ilp32__ */ +#endif +#ifndef __arm64__ +/* #undef __arm64__ */ +#endif +#ifndef __hppa__ +/* #undef __hppa__ */ +#endif +#ifndef __hppa64__ +/* #undef __hppa64__ */ +#endif +#ifndef __ia64_ilp32__ +/* #undef __ia64_ilp32__ */ +#endif +#ifndef __ia64__ +/* #undef __ia64__ */ +#endif +#ifndef __m68k__ +/* #undef __m68k__ */ +#endif +#ifndef __mips__ +/* #undef __mips__ */ +#endif +#ifndef __mipsn32__ +/* #undef __mipsn32__ */ +#endif +#ifndef __mips64__ +/* #undef __mips64__ */ +#endif +#ifndef __powerpc__ +/* #undef __powerpc__ */ +#endif +#ifndef __powerpc64__ +/* #undef __powerpc64__ */ +#endif +#ifndef __powerpc64_elfv2__ +/* #undef __powerpc64_elfv2__ */ +#endif +#ifndef __riscv32__ +/* #undef __riscv32__ */ +#endif +#ifndef __riscv64__ +/* #undef __riscv64__ */ +#endif +#ifndef __riscv32_ilp32__ +/* #undef __riscv32_ilp32__ */ +#endif +#ifndef __riscv32_ilp32f__ +/* #undef __riscv32_ilp32f__ */ +#endif +#ifndef __riscv32_ilp32d__ +/* #undef __riscv32_ilp32d__ */ +#endif +#ifndef __riscv64_ilp32__ +/* #undef __riscv64_ilp32__ */ +#endif +#ifndef __riscv64_ilp32f__ +/* #undef __riscv64_ilp32f__ */ +#endif +#ifndef __riscv64_ilp32d__ +/* #undef __riscv64_ilp32d__ */ +#endif +#ifndef __riscv64_lp64__ +/* #undef __riscv64_lp64__ */ +#endif +#ifndef __riscv64_lp64f__ +/* #undef __riscv64_lp64f__ */ +#endif +#ifndef __riscv64_lp64d__ +/* #undef __riscv64_lp64d__ */ +#endif +#ifndef __s390__ +/* #undef __s390__ */ +#endif +#ifndef __s390x__ +/* #undef __s390x__ */ +#endif +#ifndef __sh__ +/* #undef __sh__ */ +#endif +#ifndef __sparc__ +/* #undef __sparc__ */ +#endif +#ifndef __sparc64__ +/* #undef __sparc64__ */ +#endif + + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Define to the number of bits in type 'ptrdiff_t'. */ +#define BITSIZEOF_PTRDIFF_T 64 + +/* Define to the number of bits in type 'sig_atomic_t'. */ +#define BITSIZEOF_SIG_ATOMIC_T 32 + +/* Define to the number of bits in type 'size_t'. */ +#define BITSIZEOF_SIZE_T 64 + +/* Define to the number of bits in type 'wchar_t'. */ +#define BITSIZEOF_WCHAR_T 32 + +/* Define to the number of bits in type 'wint_t'. */ +#define BITSIZEOF_WINT_T 32 + +/* Define to 1 if the `closedir' function returns void instead of `int'. */ +/* #undef CLOSEDIR_VOID */ + +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +/* #undef CRAY_STACKSEG_END */ + +/* Define to 1 if using `alloca.c'. */ +/* #undef C_ALLOCA */ + +/* Define to 1 for DGUX with . */ +/* #undef DGUX */ + +/* Define to 1 if // is a file system root distinct from /. */ +/* #undef DOUBLE_SLASH_IS_DISTINCT_ROOT */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* Define this to 1 if F_DUPFD behavior does not match POSIX */ +/* #undef FCNTL_DUPFD_BUGGY */ + +/* Use high resolution file timestamps if nonzero. */ +#define FILE_TIMESTAMP_HI_RES 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module fscanf shall be considered present. */ +#define GNULIB_FSCANF 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module msvc-nothrow shall be considered present. */ +#define GNULIB_MSVC_NOTHROW 1 + +/* Define to 1 if printf and friends should be labeled with attribute + "__gnu_printf__" instead of "__printf__" */ +/* #undef GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU */ + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module scanf shall be considered present. */ +#define GNULIB_SCANF 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module strerror shall be considered present. */ +#define GNULIB_STRERROR 1 + +/* Define to 1 when the gnulib module access should be tested. */ +#define GNULIB_TEST_ACCESS 1 + +/* Define to 1 when the gnulib module close should be tested. */ +#define GNULIB_TEST_CLOSE 1 + +/* Define to 1 when the gnulib module dup2 should be tested. */ +#define GNULIB_TEST_DUP2 1 + +/* Define to 1 when the gnulib module fcntl should be tested. */ +#define GNULIB_TEST_FCNTL 1 + +/* Define to 1 when the gnulib module getdtablesize should be tested. */ +#define GNULIB_TEST_GETDTABLESIZE 1 + +/* Define to 1 when the gnulib module getloadavg should be tested. */ +#define GNULIB_TEST_GETLOADAVG 1 + +/* Define to 1 when the gnulib module malloc-posix should be tested. */ +#define GNULIB_TEST_MALLOC_POSIX 1 + +/* Define to 1 when the gnulib module stpcpy should be tested. */ +#define GNULIB_TEST_STPCPY 1 + +/* Define to 1 when the gnulib module strerror should be tested. */ +#define GNULIB_TEST_STRERROR 1 + +/* Define to 1 if you have 'alloca' after including , a header that + may be supplied by this distribution. */ +#define HAVE_ALLOCA 1 + +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +#define HAVE_ALLOCA_H 1 + +/* Define to 1 if you have the `atexit' function. */ +#define HAVE_ATEXIT 1 + +/* Use case insensitive file names */ +/* #undef HAVE_CASE_INSENSITIVE_FS */ + +/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYCURRENT */ + +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + +/* Define to 1 if you have the clock_gettime function. */ +/* #undef HAVE_CLOCK_GETTIME */ + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +/* #undef HAVE_DCGETTEXT */ + +/* Define to 1 if you have the declaration of `bsd_signal', and to 0 if you + don't. */ +#define HAVE_DECL_BSD_SIGNAL 0 + +/* Define to 1 if you have the declaration of `dlerror', and to 0 if you + don't. */ +#define HAVE_DECL_DLERROR 1 + +/* Define to 1 if you have the declaration of `dlopen', and to 0 if you don't. + */ +#define HAVE_DECL_DLOPEN 1 + +/* Define to 1 if you have the declaration of `dlsym', and to 0 if you don't. + */ +#define HAVE_DECL_DLSYM 1 + +/* Define to 1 if you have the declaration of `getdtablesize', and to 0 if you + don't. */ +#define HAVE_DECL_GETDTABLESIZE 1 + +/* Define to 1 if you have the declaration of `program_invocation_name', and + to 0 if you don't. */ +#define HAVE_DECL_PROGRAM_INVOCATION_NAME 1 + +/* Define to 1 if you have the declaration of `program_invocation_short_name', + and to 0 if you don't. */ +#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 1 + +/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you + don't. */ +#define HAVE_DECL_STRERROR_R 1 + +/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you + don't. */ +#define HAVE_DECL_SYS_SIGLIST 0 + +/* Define to 1 if you have the declaration of `_sys_siglist', and to 0 if you + don't. */ +#define HAVE_DECL__SYS_SIGLIST 0 + +/* Define to 1 if you have the declaration of `__argv', and to 0 if you don't. + */ +#define HAVE_DECL___ARGV 1 + +/* Define to 1 if you have the declaration of `__sys_siglist', and to 0 if you + don't. */ +#define HAVE_DECL___SYS_SIGLIST 0 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#define HAVE_DIRENT_H 1 + +/* Use platform specific coding */ +/* #undef HAVE_DOS_PATHS */ + +/* Define to 1 if you have the `dup' function. */ +#define HAVE_DUP 1 + +/* Define to 1 if you have the `dup2' function. */ +#define HAVE_DUP2 1 + +/* Define to 1 if you have the `fcntl' function. */ +#define HAVE_FCNTL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `fdopen' function. */ +#define HAVE_FDOPEN 1 + +/* Define to 1 if you have the `fork' function. */ +#define HAVE_FORK 1 + +/* Define to 1 if you have the `getcwd' function. */ +#define HAVE_GETCWD 1 + +/* Define to 1 if you have the `getdtablesize' function. */ +#define HAVE_GETDTABLESIZE 1 + +/* Define to 1 if you have the `getexecname' function. */ +/* #undef HAVE_GETEXECNAME */ + +/* Define to 1 if you have the `getgroups' function. */ +#define HAVE_GETGROUPS 1 + +/* Define to 1 if you have the `gethostbyname' function. */ +/* #undef HAVE_GETHOSTBYNAME */ + +/* Define to 1 if you have the `gethostname' function. */ +/* #undef HAVE_GETHOSTNAME */ + +/* Define to 1 if you have the `getprogname' function. */ +/* #undef HAVE_GETPROGNAME */ + +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + +/* Define if the GNU gettext() function is already present or preinstalled. */ +/* #undef HAVE_GETTEXT */ + +/* Define to 1 if you have a standard gettimeofday function */ +#define HAVE_GETTIMEOFDAY 1 + +/* Embed GNU Guile support */ +/* #undef HAVE_GUILE */ + +/* Define if you have the iconv() function and it works. */ +/* #undef HAVE_ICONV */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `isatty' function. */ +#define HAVE_ISATTY 1 + +/* Define to 1 if you have the `dgc' library (-ldgc). */ +/* #undef HAVE_LIBDGC */ + +/* Define to 1 if you have the `kstat' library (-lkstat). */ +/* #undef HAVE_LIBKSTAT */ + +/* Define to 1 if you have the `perfstat' library (-lperfstat). */ +/* #undef HAVE_LIBPERFSTAT */ + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LOCALE_H 1 + +/* Define to 1 if the system has the type 'long long int'. */ +#define HAVE_LONG_LONG_INT 1 + +/* Define to 1 if you have the `lstat' function. */ +#define HAVE_LSTAT 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MACH_MACH_H */ + +/* Define if the 'malloc' function is POSIX compliant. */ +#define HAVE_MALLOC_POSIX 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `memrchr' function. */ +#define HAVE_MEMRCHR 1 + +/* Define to 1 if you have the `mkstemp' function. */ +#define HAVE_MKSTEMP 1 + +/* Define to 1 if you have the `mktemp' function. */ +#define HAVE_MKTEMP 1 + +/* Define to 1 on MSVC platforms that have the "invalid parameter handler" + concept. */ +/* #undef HAVE_MSVC_INVALID_PARAMETER_HANDLER */ + +/* Define to 1 if you have the header file, and it defines `DIR'. */ +/* #undef HAVE_NDIR_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NLIST_H */ + +/* Define to 1 if you have the `pipe' function. */ +#define HAVE_PIPE 1 + +/* Define to 1 if you have the `posix_spawn' function. */ +#define HAVE_POSIX_SPAWN 1 + +/* Define to 1 if you have the `posix_spawnattr_setsigmask' function. */ +#define HAVE_POSIX_SPAWNATTR_SETSIGMASK 1 + +/* Define to 1 if you have the `pselect' function. */ +/* #undef HAVE_PSELECT */ + +/* Define to 1 if you have the `pstat_getdynamic' function. */ +/* #undef HAVE_PSTAT_GETDYNAMIC */ + +/* Define to 1 if you have the `readlink' function. */ +#define HAVE_READLINK 1 + +/* Define to 1 if you have the `realpath' function. */ +#define HAVE_REALPATH 1 + +/* Define to 1 if defines the SA_RESTART constant. */ +#define HAVE_SA_RESTART 1 + +/* Define to 1 if you have the `setdtablesize' function. */ +/* #undef HAVE_SETDTABLESIZE */ + +/* Define to 1 if you have the `setegid' function. */ +#define HAVE_SETEGID 1 + +/* Define to 1 if you have the `seteuid' function. */ +#define HAVE_SETEUID 1 + +/* Define to 1 if you have the `setlinebuf' function. */ +/* #undef HAVE_SETLINEBUF */ + +/* Define to 1 if you have the `setregid' function. */ +#define HAVE_SETREGID 1 + +/* Define to 1 if you have the `setreuid' function. */ +#define HAVE_SETREUID 1 + +/* Define to 1 if you have the `setrlimit' function. */ +#define HAVE_SETRLIMIT 1 + +/* Define to 1 if you have the `setvbuf' function. */ +#define HAVE_SETVBUF 1 + +/* Define to 1 if you have the `sigaction' function. */ +#define HAVE_SIGACTION 1 + +/* Define to 1 if 'sig_atomic_t' is a signed integer type. */ +#define HAVE_SIGNED_SIG_ATOMIC_T 1 + +/* Define to 1 if 'wchar_t' is a signed integer type. */ +#define HAVE_SIGNED_WCHAR_T 1 + +/* Define to 1 if 'wint_t' is a signed integer type. */ +/* #undef HAVE_SIGNED_WINT_T */ + +/* Define to 1 if you have the `sigsetmask' function. */ +/* #undef HAVE_SIGSETMASK */ + +/* Define to 1 if you have the `socket' function. */ +/* #undef HAVE_SOCKET */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SPAWN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `stpcpy' function. */ +#define HAVE_STPCPY 1 + +/* Define to 1 if you have the `strcasecmp' function. */ +#define HAVE_STRCASECMP 1 + +/* Define to 1 if you have the `strcmpi' function. */ +/* #undef HAVE_STRCMPI */ + +/* Define to 1 if you have the `strcoll' function and it is properly defined. + */ +#define HAVE_STRCOLL 1 + +/* Define to 1 if you have the `strdup' function. */ +#define HAVE_STRDUP 1 + +/* Define to 1 if you have the `strerror_r' function. */ +#define HAVE_STRERROR_R 1 + +/* Define to 1 if you have the `stricmp' function. */ +/* #undef HAVE_STRICMP */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strncasecmp' function. */ +#define HAVE_STRNCASECMP 1 + +/* Define to 1 if you have the `strncmpi' function. */ +/* #undef HAVE_STRNCMPI */ + +/* Define to 1 if you have the `strndup' function. */ +#define HAVE_STRNDUP 1 + +/* Define to 1 if you have the `strnicmp' function. */ +/* #undef HAVE_STRNICMP */ + +/* Define to 1 if you have the `strsignal' function. */ +#define HAVE_STRSIGNAL 1 + +/* Define to 1 if `d_type' is a member of `struct dirent'. */ +#define HAVE_STRUCT_DIRENT_D_TYPE 1 + +/* Define to 1 if `n_un.n_name' is a member of `struct nlist'. */ +/* #undef HAVE_STRUCT_NLIST_N_UN_N_NAME */ + +/* Define to 1 if you have the `symlink' function. */ +#define HAVE_SYMLINK 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_BITYPES_H */ + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_DIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_FILE_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_INTTYPES_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_LOADAVG_H */ + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SELECT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_TIMEB_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_WAIT_H 1 + +/* Define to 1 if you have the `ttyname' function. */ +#define HAVE_TTYNAME 1 + +/* Define to 1 if the system has the type `uintmax_t'. */ +#define HAVE_UINTMAX_T 1 + +/* Define to 1 if you have the `umask' function. */ +#define HAVE_UMASK 1 + +/* Define to 1 if you have the 'union wait' type in . */ +/* #undef HAVE_UNION_WAIT */ + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if the system has the type 'unsigned long long int'. */ +#define HAVE_UNSIGNED_LONG_LONG_INT 1 + +/* Define if you have a global __progname variable */ +/* #undef HAVE_VAR___PROGNAME */ + +/* Define to 1 if you have the `vfork' function. */ +#define HAVE_VFORK 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_VFORK_H */ + +/* Define to 1 if you have the `wait3' function. */ +#define HAVE_WAIT3 1 + +/* Define to 1 if you have the `waitpid' function. */ +#define HAVE_WAITPID 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define if you have the 'wchar_t' type. */ +#define HAVE_WCHAR_T 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINSOCK2_H */ + +/* Define if you have the 'wint_t' type. */ +#define HAVE_WINT_T 1 + +/* Define to 1 if `fork' works. */ +#define HAVE_WORKING_FORK 1 + +/* Define to 1 if O_NOATIME works. */ +#define HAVE_WORKING_O_NOATIME 0 + +/* Define to 1 if O_NOFOLLOW works. */ +#define HAVE_WORKING_O_NOFOLLOW 0 + +/* Define to 1 if `vfork' works. */ +#define HAVE_WORKING_VFORK 1 + +/* Define to 1 if the system has the type `_Bool'. */ +#define HAVE__BOOL 1 + +/* Define to 1 if you have the `_set_invalid_parameter_handler' function. */ +/* #undef HAVE__SET_INVALID_PARAMETER_HANDLER */ + +/* Build host information. */ +#define MAKE_HOST "x86_64-pc-linux-gnu" + +/* Define to 1 to enable job server support in GNU make. */ +#define MAKE_JOBSERVER 1 + +/* Define to 1 to enable 'load' support in GNU make. */ +#define MAKE_LOAD 1 + +/* Define to 1 to enable symbolic link timestamp checking. */ +#define MAKE_SYMLINKS 1 + +/* Use GNU style printf and scanf. */ +#ifndef __USE_MINGW_ANSI_STDIO +# define __USE_MINGW_ANSI_STDIO 1 +#endif + + +/* Define to 1 if the nlist n_name member is a pointer */ +/* #undef N_NAME_POINTER */ + +/* Name of package */ +#define PACKAGE "make" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "bug-make@gnu.org" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "GNU make" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "GNU make 4.3" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "make" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "http://www.gnu.org/software/make/" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "4.3" + +/* Define to the character that separates directories in PATH. */ +#define PATH_SEPARATOR_CHAR ':' + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'ptrdiff_t'. */ +#define PTRDIFF_T_SUFFIX l + +/* Define to 1 if strerror(0) does not return a message implying success. */ +/* #undef REPLACE_STRERROR_0 */ + +/* Define as the return type of signal handlers (`int' or `void'). */ +#define RETSIGTYPE void + +/* Define to the name of the SCCS 'get' command. */ +#define SCCS_GET "get" + +/* Define to 1 if the SCCS 'get' command understands the '-G' option. */ +/* #undef SCCS_GET_MINUS_G */ + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'sig_atomic_t'. */ +#define SIG_ATOMIC_T_SUFFIX + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'size_t'. */ +#define SIZE_T_SUFFIX ul + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at runtime. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +/* #undef STACK_DIRECTION */ + +/* Define to 1 if the `S_IS*' macros in do not work properly. */ +/* #undef STAT_MACROS_BROKEN */ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to 1 if strerror_r returns char *. */ +/* #undef STRERROR_R_CHAR_P */ + +/* Define if struct stat contains a nanoseconds field */ +#define ST_MTIM_NSEC st_mtim.tv_nsec + +/* Define to 1 on System V Release 4. */ +/* #undef SVR4 */ + +/* Define to 1 if you can safely include both and . */ +#define TIME_WITH_SYS_TIME 1 + +/* Define to 1 for Encore UMAX. */ +/* #undef UMAX */ + +/* Define to 1 for Encore UMAX 4.3 that has instead of + . */ +/* #undef UMAX4_3 */ + +/* Define to 1 to use posix_spawn(). */ +/* #undef USE_POSIX_SPAWN */ + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable general extensions on macOS. */ +#ifndef _DARWIN_C_SOURCE +# define _DARWIN_C_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable NetBSD extensions on NetBSD. */ +#ifndef _NETBSD_SOURCE +# define _NETBSD_SOURCE 1 +#endif +/* Enable OpenBSD extensions on NetBSD. */ +#ifndef _OPENBSD_SOURCE +# define _OPENBSD_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ +#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ +#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ +# define __STDC_WANT_IEC_60559_BFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ +#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ +# define __STDC_WANT_IEC_60559_DFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ +#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ +# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ +#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ +# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ +#ifndef __STDC_WANT_LIB_EXT2__ +# define __STDC_WANT_LIB_EXT2__ 1 +#endif +/* Enable extensions specified by ISO/IEC 24747:2009. */ +#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ +# define __STDC_WANT_MATH_SPEC_FUNCS__ 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable X/Open extensions if necessary. HP-UX 11.11 defines + mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of + whether compiling with -Ae or -D_HPUX_SOURCE=1. */ +#ifndef _XOPEN_SOURCE +/* # undef _XOPEN_SOURCE */ +#endif +/* Enable X/Open compliant socket functions that do not require linking + with -lxnet on HP-UX 11.11. */ +#ifndef _HPUX_ALT_XOPEN_SOCKET_API +# define _HPUX_ALT_XOPEN_SOCKET_API 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "4.3" + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'wchar_t'. */ +#define WCHAR_T_SUFFIX + +/* Use platform specific coding */ +/* #undef WINDOWS32 */ + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'wint_t'. */ +#define WINT_T_SUFFIX u + +/* Define if using the dmalloc debugging malloc package */ +/* #undef WITH_DMALLOC */ + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */ +#define _NETBSD_SOURCE 1 + +/* The _Noreturn keyword of C11. */ +#ifndef _Noreturn +# if (defined __cplusplus \ + && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \ + || (defined _MSC_VER && 1900 <= _MSC_VER)) \ + && 0) + /* [[noreturn]] is not practically usable, because with it the syntax + extern _Noreturn void func (...); + would not be valid; such a declaration would only be valid with 'extern' + and '_Noreturn' swapped, or without the 'extern' keyword. However, some + AIX system header files and several gnulib header files use precisely + this syntax with 'extern'. */ +# define _Noreturn [[noreturn]] +# elif ((!defined __cplusplus || defined __clang__) \ + && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ + || 4 < __GNUC__ + (7 <= __GNUC_MINOR__))) + /* _Noreturn works as-is. */ +# elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C +# define _Noreturn __attribute__ ((__noreturn__)) +# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn +# endif +#endif + + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for 'stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* For standard stat data types on VMS. */ +#define _USE_STD_STAT 1 + +/* Define to 1 if the system predates C++11. */ +/* #undef __STDC_CONSTANT_MACROS */ + +/* Define to 1 if the system predates C++11. */ +/* #undef __STDC_LIMIT_MACROS */ + +/* The _GL_ASYNC_SAFE marker should be attached to functions that are + signal handlers (for signals other than SIGABRT, SIGPIPE) or can be + invoked from such signal handlers. Such functions have some restrictions: + * All functions that it calls should be marked _GL_ASYNC_SAFE as well, + or should be listed as async-signal-safe in POSIX + + section 2.4.3. Note that malloc(), sprintf(), and fwrite(), in + particular, are NOT async-signal-safe. + * All memory locations (variables and struct fields) that these functions + access must be marked 'volatile'. This holds for both read and write + accesses. Otherwise the compiler might optimize away stores to and + reads from such locations that occur in the program, depending on its + data flow analysis. For example, when the program contains a loop + that is intended to inspect a variable set from within a signal handler + while (!signal_occurred) + ; + the compiler is allowed to transform this into an endless loop if the + variable 'signal_occurred' is not declared 'volatile'. + Additionally, recall that: + * A signal handler should not modify errno (except if it is a handler + for a fatal signal and ends by raising the same signal again, thus + provoking the termination of the process). If it invokes a function + that may clobber errno, it needs to save and restore the value of + errno. */ +#define _GL_ASYNC_SAFE + + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define as 'access' if you don't have the eaccess() function. */ +#define eaccess access + +/* Please see the Gnulib manual for how to use these macros. + + Suppress extern inline with HP-UX cc, as it appears to be broken; see + . + + Suppress extern inline with Sun C in standards-conformance mode, as it + mishandles inline functions that call each other. E.g., for 'inline void f + (void) { } inline void g (void) { f (); }', c99 incorrectly complains + 'reference to static identifier "f" in extern inline function'. + This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. + + Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) + on configurations that mistakenly use 'static inline' to implement + functions or macros in standard C headers like . For example, + if isdigit is mistakenly implemented via a static inline function, + a program containing an extern inline function that calls isdigit + may not work since the C standard prohibits extern inline functions + from calling static functions (ISO C 99 section 6.7.4.(3). + This bug is known to occur on: + + OS X 10.8 and earlier; see: + https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html + + DragonFly; see + http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log + + FreeBSD; see: + https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html + + OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and + for clang but remains for g++; see . + Assume DragonFly and FreeBSD will be similar. + + GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 + inline semantics, unless -fgnu89-inline is used. It defines a macro + __GNUC_STDC_INLINE__ to indicate this situation or a macro + __GNUC_GNU_INLINE__ to indicate the opposite situation. + GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline + semantics but warns, unless -fgnu89-inline is used: + warning: C99 inline functions are not supported; using GNU89 + warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute + It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. + */ +#if (((defined __APPLE__ && defined __MACH__) \ + || defined __DragonFly__ || defined __FreeBSD__) \ + && (defined __header_inline \ + ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ + && ! defined __clang__) \ + : ((! defined _DONT_USE_CTYPE_INLINE_ \ + && (defined __GNUC__ || defined __cplusplus)) \ + || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ + && defined __GNUC__ && ! defined __cplusplus)))) +# define _GL_EXTERN_INLINE_STDHEADER_BUG +#endif +#if ((__GNUC__ \ + ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ + : (199901L <= __STDC_VERSION__ \ + && !defined __HP_cc \ + && !defined __PGI \ + && !(defined __SUNPRO_C && __STDC__))) \ + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) +# define _GL_INLINE inline +# define _GL_EXTERN_INLINE extern inline +# define _GL_EXTERN_INLINE_IN_USE +#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) +# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ + /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ +# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) +# else +# define _GL_INLINE extern inline +# endif +# define _GL_EXTERN_INLINE extern +# define _GL_EXTERN_INLINE_IN_USE +#else +# define _GL_INLINE static _GL_UNUSED +# define _GL_EXTERN_INLINE static _GL_UNUSED +#endif + +/* In GCC 4.6 (inclusive) to 5.1 (exclusive), + suppress bogus "no previous prototype for 'FOO'" + and "no previous declaration for 'FOO'" diagnostics, + when FOO is an inline function in the header; see + and + . */ +#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ +# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ +# define _GL_INLINE_HEADER_CONST_PRAGMA +# else +# define _GL_INLINE_HEADER_CONST_PRAGMA \ + _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") +# endif +# define _GL_INLINE_HEADER_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ + _GL_INLINE_HEADER_CONST_PRAGMA +# define _GL_INLINE_HEADER_END \ + _Pragma ("GCC diagnostic pop") +#else +# define _GL_INLINE_HEADER_BEGIN +# define _GL_INLINE_HEADER_END +#endif + +/* Define to `int' if doesn't define. */ +/* #undef gid_t */ + +/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports + the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of + earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. + __APPLE__ && __MACH__ test for Mac OS X. + __APPLE_CC__ tests for the Apple compiler and its version. + __STDC_VERSION__ tests for the C99 mode. */ +#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ +# define __GNUC_STDC_INLINE__ 1 +#endif + +/* Define to `int' if does not define. */ +/* #undef mode_t */ + +/* Define to `long int' if does not define. */ +/* #undef off_t */ + +/* Define to `int' if does not define. */ +/* #undef pid_t */ + +/* Define to the equivalent of the C99 'restrict' keyword, or to + nothing if this is not supported. Do not define if restrict is + supported directly. */ +#define restrict __restrict +/* Work around a bug in older versions of Sun C++, which did not + #define __restrict__ or support _Restrict or __restrict__ + even though the corresponding Sun C compiler ended up with + "#define restrict _Restrict" or "#define restrict __restrict__" + in the previous line. This workaround can be removed once + we assume Oracle Developer Studio 12.5 (2016) or later. */ +#if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__ +# define _Restrict +# define __restrict__ +#endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ + +/* Define to `int' if does not define. */ +/* #undef ssize_t */ + +/* Define to `int' if doesn't define. */ +/* #undef uid_t */ + +/* Define to the widest unsigned integer type if and + do not define. */ +/* #undef uintmax_t */ + +/* Define as a marker that can be attached to declarations that might not + be used. This helps to reduce warnings, such as from + GCC -Wunused-parameter. */ +#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +# define _GL_UNUSED __attribute__ ((__unused__)) +#else +# define _GL_UNUSED +#endif +/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name + is a misnomer outside of parameter lists. */ +#define _UNUSED_PARAMETER_ _GL_UNUSED + +/* gcc supports the "unused" attribute on possibly unused labels, and + g++ has since version 4.5. Note to support C++ as well as C, + _GL_UNUSED_LABEL should be used with a trailing ; */ +#if !defined __cplusplus || __GNUC__ > 4 \ + || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) +# define _GL_UNUSED_LABEL _GL_UNUSED +#else +# define _GL_UNUSED_LABEL +#endif + +/* The __pure__ attribute was added in gcc 2.96. */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +#else +# define _GL_ATTRIBUTE_PURE /* empty */ +#endif + +/* The __const__ attribute was added in gcc 2.95. */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) +# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) +#else +# define _GL_ATTRIBUTE_CONST /* empty */ +#endif + +/* The __malloc__ attribute was added in gcc 3. */ +#if 3 <= __GNUC__ +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +#else +# define _GL_ATTRIBUTE_MALLOC /* empty */ +#endif + + +/* Define as `fork' if `vfork' does not work. */ +/* #undef vfork */ diff --git a/third_party/make/src/dir.c b/third_party/make/src/dir.c index 862a18ead..4a45ad360 100644 --- a/third_party/make/src/dir.c +++ b/third_party/make/src/dir.c @@ -19,6 +19,15 @@ this program. If not, see . */ #include "filedef.h" #include "dep.h" +#ifndef __ptr_t +#define __ptr_t void* +#endif +#define gl_readdir __dummy2[1] +#define gl_opendir __dummy2[2] +#define gl_closedir __dummy2[0] +#define gl_lstat __dummy2[3] +#define gl_stat __dummy2[4] + #ifdef HAVE_DIRENT_H # include # define NAMLEN(dirent) strlen((dirent)->d_name) diff --git a/third_party/make/src/getopt.h b/third_party/make/src/getopt.h index abfc31e70..cd033ea94 100644 --- a/third_party/make/src/getopt.h +++ b/third_party/make/src/getopt.h @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef _GETOPT_H +#if 0 && !defined(_GETOPT_H) #define _GETOPT_H 1 #ifdef __cplusplus @@ -127,4 +128,11 @@ extern int _getopt_internal (); } #endif +#else +extern int _getopt_internal (int argc, char *const *argv, + const char *shortopts, + const struct option *longopts, int *longind, + int long_only); +#endif + #endif /* getopt.h */ diff --git a/third_party/make/src/job.c b/third_party/make/src/job.c index ae1f18b9b..9f9074f22 100644 --- a/third_party/make/src/job.c +++ b/third_party/make/src/job.c @@ -2552,12 +2552,10 @@ exec_command (char **argv, char **envp) # endif /* !__EMX__ */ - switch (errno) { - case ENOENT: + if(errno == ENOENT) OSS (error, NILF, "%s: %s", argv[0], strerror (errno)); - break; - case ENOEXEC: + else if(errno == ENOEXEC) { /* The file was not a program. Try it as a shell script. */ const char *shell; @@ -2614,19 +2612,15 @@ exec_command (char **argv, char **envp) execvp (shell, new_argv); # endif OSS (error, NILF, "%s: %s", new_argv[0], strerror (errno)); - break; } # ifdef __EMX__ - case EINVAL: + else if (errno == EINVAL) /* this nasty error was driving me nuts :-( */ O (error, NILF, _("spawnvpe: environment space might be exhausted")); /* FALLTHROUGH */ # endif - - default: OSS (error, NILF, "%s: %s", argv[0], strerror (errno)); - break; } # ifdef __EMX__ @@ -2916,7 +2910,7 @@ construct_command_argv_internal (char *line, char **restp, const char *shell, instring = word_has_equals = seen_nonequals = last_argument_was_empty = 0; for (p = line; *p != '\0'; ++p) { - assert (ap <= end); + // assert (ap <= end); if (instring) { diff --git a/third_party/make/src/makeint.h b/third_party/make/src/makeint.h index c428a362a..f84e4deba 100644 --- a/third_party/make/src/makeint.h +++ b/third_party/make/src/makeint.h @@ -517,7 +517,8 @@ void pfatal_with_name (const char *) NORETURN; void perror_with_name (const char *, const char *); #define xstrlen(_s) ((_s)==NULL ? 0 : strlen (_s)) void *xmalloc (size_t); -void *xcalloc (size_t); +// void *xcalloc (size_t); +#define xcalloc(size) ((xcalloc)(1, (size))) void *xrealloc (void *, size_t); char *xstrdup (const char *); char *xstrndup (const char *, size_t); diff --git a/third_party/make/src/misc.c b/third_party/make/src/misc.c index de19e3754..1973025eb 100644 --- a/third_party/make/src/misc.c +++ b/third_party/make/src/misc.c @@ -176,7 +176,7 @@ concat (unsigned int num, ...) /* Like malloc but get fatal error if memory is exhausted. */ /* Don't bother if we're using dmalloc; it provides these for us. */ -#ifndef HAVE_DMALLOC_H +#if 0 && !defined(HAVE_DMALLOC_H) #undef xmalloc #undef xcalloc @@ -197,14 +197,13 @@ xmalloc (size_t size) void * xcalloc (size_t size) { - /* Make sure we don't allocate 0, for pre-ISO implementations. */ + /* Make sure we don't allocate 0, for pre-ISO implementations. */ void *result = calloc (size ? size : 1, 1); if (result == 0) out_of_memory (); return result; } - void * xrealloc (void *ptr, size_t size) { diff --git a/third_party/make/src/read.c b/third_party/make/src/read.c index fa197fb80..6d54fb606 100644 --- a/third_party/make/src/read.c +++ b/third_party/make/src/read.c @@ -27,6 +27,7 @@ this program. If not, see . */ #include "rule.h" #include "debug.h" #include "hash.h" +# define GLOB_ALTDIRFUNC (1 << 9)/* Use gl_opendir et al functions. */ #ifdef WINDOWS32 @@ -361,15 +362,15 @@ eval_makefile (const char *filename, unsigned short flags) deps->error = errno; /* Check for unrecoverable errors: out of mem or FILE slots. */ - switch (deps->error) { + if (0 || #ifdef EMFILE - case EMFILE: + deps->error == EMFILE || #endif #ifdef ENFILE - case ENFILE: + deps->error == ENFILE || #endif - case ENOMEM: + deps->error == ENOMEM) { const char *err = strerror (deps->error); OS (fatal, reading_file, "%s", err);