Created
July 22, 2019 08:09
-
-
Save ggouaillardet/11e15a9349dc2100d98d59a5ccc3c74e to your computer and use it in GitHub Desktop.
autoconf patch for Homebrew
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff -ruN orig/autoconf-2.69/lib/autoconf/c.m4 autoconf-2.69/lib/autoconf/c.m4 | |
| --- orig/autoconf-2.69/lib/autoconf/c.m4 2012-01-21 22:46:39.000000000 +0900 | |
| +++ autoconf-2.69/lib/autoconf/c.m4 2019-07-22 17:01:36.000000000 +0900 | |
| @@ -1204,11 +1204,11 @@ | |
| # variable length arrays. | |
| AC_DEFUN([_AC_PROG_CC_C99], | |
| [_AC_C_STD_TRY([c99], | |
| -[[#include <stdarg.h> | |
| +[[#include <stdio.h> | |
| +#include <stdarg.h> | |
| #include <stdbool.h> | |
| #include <stdlib.h> | |
| #include <wchar.h> | |
| -#include <stdio.h> | |
| // Check varargs macros. These examples are taken from C99 6.10.3.5. | |
| #define debug(...) fprintf (stderr, __VA_ARGS__) | |
| @@ -1849,8 +1849,8 @@ | |
| ac_cv_c_flexmember, | |
| [AC_COMPILE_IFELSE( | |
| [AC_LANG_PROGRAM( | |
| - [[#include <stdlib.h> | |
| - #include <stdio.h> | |
| + [[#include <stdio.h> | |
| + #include <stdlib.h> | |
| #include <stddef.h> | |
| struct s { int n; double d[]; };]], | |
| [[int m = getchar (); | |
| diff -ruN orig/autoconf-2.69/lib/autoconf/functions.m4 autoconf-2.69/lib/autoconf/functions.m4 | |
| --- orig/autoconf-2.69/lib/autoconf/functions.m4 2012-01-21 22:46:39.000000000 +0900 | |
| +++ autoconf-2.69/lib/autoconf/functions.m4 2019-07-22 17:03:44.000000000 +0900 | |
| @@ -890,7 +890,8 @@ | |
| AC_CACHE_CHECK([for GNU libc compatible malloc], ac_cv_func_malloc_0_nonnull, | |
| [AC_RUN_IFELSE( | |
| [AC_LANG_PROGRAM( | |
| -[[#if defined STDC_HEADERS || defined HAVE_STDLIB_H | |
| +[[#include <stdio.h> | |
| +#if defined STDC_HEADERS || defined HAVE_STDLIB_H | |
| # include <stdlib.h> | |
| #else | |
| char *malloc (); | |
| @@ -1003,6 +1004,7 @@ | |
| #endif | |
| #include <limits.h> | |
| +#include <stdio.h> | |
| #include <stdlib.h> | |
| #ifdef HAVE_UNISTD_H | |
| @@ -1395,7 +1397,8 @@ | |
| AC_CACHE_CHECK([for GNU libc compatible realloc], ac_cv_func_realloc_0_nonnull, | |
| [AC_RUN_IFELSE( | |
| [AC_LANG_PROGRAM( | |
| -[[#if defined STDC_HEADERS || defined HAVE_STDLIB_H | |
| +[[#include <stdio.h> | |
| +#if defined STDC_HEADERS || defined HAVE_STDLIB_H | |
| # include <stdlib.h> | |
| #else | |
| char *realloc (); | |
| @@ -1595,6 +1598,7 @@ | |
| [[/* On HP-UX before 11.23, strtold returns a struct instead of | |
| long double. Reject implementations like that, by requiring | |
| compatibility with the C99 prototype. */ | |
| +# include <stdio.h> | |
| # include <stdlib.h> | |
| static long double (*p) (char const *, char **) = strtold; | |
| static long double | |
| diff -ruN orig/autoconf-2.69/lib/autoconf/headers.m4 autoconf-2.69/lib/autoconf/headers.m4 | |
| --- orig/autoconf-2.69/lib/autoconf/headers.m4 2012-04-25 11:37:26.000000000 +0900 | |
| +++ autoconf-2.69/lib/autoconf/headers.m4 2019-07-22 17:02:16.000000000 +0900 | |
| @@ -676,7 +676,8 @@ | |
| # -------------- | |
| AC_DEFUN([AC_HEADER_STDC], | |
| [AC_CACHE_CHECK(for ANSI C header files, ac_cv_header_stdc, | |
| -[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h> | |
| +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> | |
| +#include <stdlib.h> | |
| #include <stdarg.h> | |
| #include <string.h> | |
| #include <float.h> | |
| @@ -697,7 +698,8 @@ | |
| if test $ac_cv_header_stdc = yes; then | |
| # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
| AC_RUN_IFELSE([AC_LANG_SOURCE( | |
| -[[#include <ctype.h> | |
| +[[#include <stdio.h> | |
| +#include <ctype.h> | |
| #include <stdlib.h> | |
| #if ((' ' & 0x0FF) == 0x020) | |
| # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment