From c08eff2883a952dd0f9325c51ad7968370452b02 Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Thu, 6 Nov 2014 13:40:17 +0000 Subject: MinGW64 build: Fix minor glitches, avoid compiler warnings git-svn-id: svn://tug.org/texlive/trunk@35527 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/ChangeLog | 5 + Build/source/texk/web2c/c-auto.in | 10 ++ Build/source/texk/web2c/configure | 70 ++++++++++++ Build/source/texk/web2c/configure.ac | 2 + Build/source/texk/web2c/lib/ChangeLog | 4 + Build/source/texk/web2c/lib/texmfmp.c | 17 ++- Build/source/texk/web2c/luatexdir/ChangeLog | 4 + Build/source/texk/web2c/luatexdir/luatex.c | 17 ++- Build/source/texk/web2c/pdftexdir/ChangeLog | 4 + Build/source/texk/web2c/pdftexdir/regex/regcomp.c | 8 ++ Build/source/texk/web2c/texmfmp.h | 21 +++- Build/source/texk/web2c/w2c/config.h | 9 ++ Build/source/texk/web2c/web2c/ChangeLog | 5 + Build/source/texk/web2c/web2c/c-auto.in | 13 +++ Build/source/texk/web2c/web2c/configure | 131 +++++++++++++++++++--- Build/source/texk/web2c/web2c/configure.ac | 7 +- 16 files changed, 285 insertions(+), 42 deletions(-) (limited to 'Build/source/texk/web2c') diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog index 84c49a5778b..ed9091b5af0 100644 --- a/Build/source/texk/web2c/ChangeLog +++ b/Build/source/texk/web2c/ChangeLog @@ -3,6 +3,11 @@ * mf.ch, tftopl.ch, vftovp.ch: Add stringcast to avoid printing strings as numbers. + * configure.ac: AC_CHECK_SIZEOF([void *]) and AC_TYPE_UINTPTR_T. + * w2c/config.h: If necessary define uintptr_t. + * texmfmp.h: Cast pointers to uintptr_t and use PRIdPTR, PRIxPTR + to print them. + 2014-10-30 Peter Breitenlohner * texmfmp.h: Define here whether or not to build tex*.dll. diff --git a/Build/source/texk/web2c/c-auto.in b/Build/source/texk/web2c/c-auto.in index 53d0046bc05..33beb7bf8b1 100644 --- a/Build/source/texk/web2c/c-auto.in +++ b/Build/source/texk/web2c/c-auto.in @@ -221,6 +221,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_TIME_H +/* Define to 1 if the system has the type `uintptr_t'. */ +#undef HAVE_UINTPTR_T + /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H @@ -282,6 +285,9 @@ /* The size of `off_t', as computed by sizeof. */ #undef SIZEOF_OFF_T +/* The size of `void *', as computed by sizeof. */ +#undef SIZEOF_VOID_P + /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS @@ -366,6 +372,10 @@ such a type exists and the standard includes do not define it. */ #undef uint64_t +/* Define to the type of an unsigned integer type wide enough to hold a + pointer, if such a type exists, and if the system does not define it. */ +#undef uintptr_t + /* Define as empty if not declared in . */ #undef z_const diff --git a/Build/source/texk/web2c/configure b/Build/source/texk/web2c/configure index 93641eeacc6..5e0ac3921ab 100755 --- a/Build/source/texk/web2c/configure +++ b/Build/source/texk/web2c/configure @@ -21092,6 +21092,76 @@ fi done +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 +$as_echo_n "checking size of void *... " >&6; } +if ${ac_cv_sizeof_void_p+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_void_p" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (void *) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_void_p=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 +$as_echo "$ac_cv_sizeof_void_p" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_VOID_P $ac_cv_sizeof_void_p +_ACEOF + + + + ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default" +if test "x$ac_cv_type_uintptr_t" = xyes; then : + +$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h + +else + for ac_type in 'unsigned int' 'unsigned long int' \ + 'unsigned long long int'; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +cat >>confdefs.h <<_ACEOF +#define uintptr_t $ac_type +_ACEOF + + ac_type= +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test -z "$ac_type" && break + done +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5 $as_echo_n "checking for long double... " >&6; } diff --git a/Build/source/texk/web2c/configure.ac b/Build/source/texk/web2c/configure.ac index 70db03fec7e..90e813aa169 100644 --- a/Build/source/texk/web2c/configure.ac +++ b/Build/source/texk/web2c/configure.ac @@ -252,6 +252,8 @@ AC_SEARCH_LIBS([pow], [m]) AC_CHECK_FUNCS([access atoi fmax ftime gettimeofday mkdtemp setlocale strerror strlcat strlcpy strndup]) AC_CHECK_DECLS([strndup]) AC_CHECK_HEADERS([errno.h langinfo.h locale.h sys/time.h sys/timeb.h sys/wait.h time.h]) +AC_CHECK_SIZEOF([void *]) +AC_TYPE_UINTPTR_T AC_TYPE_LONG_DOUBLE AC_HEADER_STDBOOL diff --git a/Build/source/texk/web2c/lib/ChangeLog b/Build/source/texk/web2c/lib/ChangeLog index 566d6d43aac..99eb4bb6b6b 100644 --- a/Build/source/texk/web2c/lib/ChangeLog +++ b/Build/source/texk/web2c/lib/ChangeLog @@ -1,3 +1,7 @@ +2014-11-06 Peter Breitenlohner + + * texmfmp.c: Avoid MinGW64 warnings (INVALID_SOCKET => -1). + 2014-11-03 Akira Kakuto * texmfmp.c: Indentation. diff --git a/Build/source/texk/web2c/lib/texmfmp.c b/Build/source/texk/web2c/lib/texmfmp.c index 7d224726e59..00e32e63283 100644 --- a/Build/source/texk/web2c/lib/texmfmp.c +++ b/Build/source/texk/web2c/lib/texmfmp.c @@ -1127,10 +1127,7 @@ ipc_make_name (void) return ipc_addr_len; } -#ifndef INVALID_SOCKET -# define INVALID_SOCKET (-1) -#endif -static int sock = INVALID_SOCKET; +static int sock = -1; #ifdef WIN32 # define CLOSE_SOCKET(s) closesocket (s); WSACleanup () @@ -1141,7 +1138,7 @@ static int sock = INVALID_SOCKET; static int ipc_is_open (void) { - return sock != INVALID_SOCKET; + return sock != -1; } static void @@ -1154,7 +1151,7 @@ ipc_open_out (void) { #ifdef IPC_DEBUG fputs ("tex: Opening socket for IPC output ...\n", stderr); #endif - if (sock != INVALID_SOCKET) { + if (sock != -1) { return; } @@ -1170,13 +1167,13 @@ ipc_open_out (void) { sock = socket (IPC_AF, SOCK_STREAM, 0); #ifdef IPC_DEBUG - if(sock != INVALID_SOCKET) + if(sock != -1) fprintf(stderr, "tex: Socket handle is %d\n", sock); else fprintf(stderr, "tex: Socket is invalid.\n"); #endif - if (sock != INVALID_SOCKET) { + if (sock != -1) { if (connect (sock, ipc_addr, ipc_addr_len) != 0 || #ifdef WIN32 ioctlsocket (sock, FIONBIO, &mode) < 0 @@ -1185,7 +1182,7 @@ ipc_open_out (void) { #endif ) { CLOSE_SOCKET (sock); - sock = INVALID_SOCKET; + sock = -1; #ifdef IPC_DEBUG fputs ("tex: IPC socket cannot be connected.\n", stderr); fputs ("tex: Socket is closed.\n", stderr); @@ -1206,7 +1203,7 @@ ipc_close_out (void) #endif if (ipc_is_open ()) { CLOSE_SOCKET (sock); - sock = INVALID_SOCKET; + sock = -1; } } diff --git a/Build/source/texk/web2c/luatexdir/ChangeLog b/Build/source/texk/web2c/luatexdir/ChangeLog index 480045cdb84..2d306f53c48 100644 --- a/Build/source/texk/web2c/luatexdir/ChangeLog +++ b/Build/source/texk/web2c/luatexdir/ChangeLog @@ -1,3 +1,7 @@ +2014-11-06 Peter Breitenlohner + + * luatex.c: Avoid MinGW64 warnings (INVALID_SOCKET => -1). + 2014-11-03 Akira Kakuto * luatex.c: Indentation. diff --git a/Build/source/texk/web2c/luatexdir/luatex.c b/Build/source/texk/web2c/luatexdir/luatex.c index db426fe0d92..c5b1ee034b1 100644 --- a/Build/source/texk/web2c/luatexdir/luatex.c +++ b/Build/source/texk/web2c/luatexdir/luatex.c @@ -648,10 +648,7 @@ ipc_make_name (void) return ipc_addr_len; } -#ifndef INVALID_SOCKET -# define INVALID_SOCKET (-1) -#endif -static int sock = INVALID_SOCKET; +static int sock = -1; #ifdef WIN32 # define CLOSE_SOCKET(s) closesocket (s); WSACleanup () @@ -662,7 +659,7 @@ static int sock = INVALID_SOCKET; static int ipc_is_open (void) { - return sock != INVALID_SOCKET; + return sock != -1; } static void @@ -675,7 +672,7 @@ ipc_open_out (void) { #ifdef IPC_DEBUG fputs ("tex: Opening socket for IPC output ...\n", stderr); #endif - if (sock != INVALID_SOCKET) { + if (sock != -1) { return; } @@ -691,13 +688,13 @@ ipc_open_out (void) { sock = socket (IPC_AF, SOCK_STREAM, 0); #ifdef IPC_DEBUG - if(sock != INVALID_SOCKET) + if(sock != -1) fprintf(stderr, "tex: Socket handle is %d\n", sock); else fprintf(stderr, "tex: Socket is invalid.\n"); #endif - if (sock != INVALID_SOCKET) { + if (sock != -1) { if (connect (sock, ipc_addr, ipc_addr_len) != 0 || #ifdef WIN32 ioctlsocket (sock, FIONBIO, &mode) < 0 @@ -706,7 +703,7 @@ ipc_open_out (void) { #endif ) { CLOSE_SOCKET (sock); - sock = INVALID_SOCKET; + sock = -1; #ifdef IPC_DEBUG fputs ("tex: IPC socket cannot be connected.\n", stderr); fputs ("tex: Socket is closed.\n", stderr); @@ -727,7 +724,7 @@ ipc_close_out (void) #endif if (ipc_is_open ()) { CLOSE_SOCKET (sock); - sock = INVALID_SOCKET; + sock = -1; } } diff --git a/Build/source/texk/web2c/pdftexdir/ChangeLog b/Build/source/texk/web2c/pdftexdir/ChangeLog index 6f048becfbe..c7bebe0b6f5 100644 --- a/Build/source/texk/web2c/pdftexdir/ChangeLog +++ b/Build/source/texk/web2c/pdftexdir/ChangeLog @@ -1,3 +1,7 @@ +2014-11-06 Peter Breitenlohner + + * regex/regcomp.c [WIN64]: Use __int64 (not long) as intptr_t. + 2014-08-19 Peter Breitenlohner * writepng.c: Avoid PNG warnings. diff --git a/Build/source/texk/web2c/pdftexdir/regex/regcomp.c b/Build/source/texk/web2c/pdftexdir/regex/regcomp.c index 7b50c10b0a6..9a6cd159baf 100644 --- a/Build/source/texk/web2c/pdftexdir/regex/regcomp.c +++ b/Build/source/texk/web2c/pdftexdir/regex/regcomp.c @@ -2499,7 +2499,11 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa, old_tree = NULL; if (elem->token.type == SUBEXP) +#ifdef _WIN64 + postorder (elem, mark_opt_subexp, (void *) (__int64) elem->token.opr.idx); +#else postorder (elem, mark_opt_subexp, (void *) (long) elem->token.opr.idx); +#endif tree = create_tree (dfa, elem, NULL, (end == -1 ? OP_DUP_ASTERISK : OP_ALT)); if (BE (tree == NULL, 0)) @@ -3711,7 +3715,11 @@ create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, static reg_errcode_t mark_opt_subexp (void *extra, bin_tree_t *node) { +#ifdef _WIN64 + int idx = (int) (__int64) extra; +#else int idx = (int) (long) extra; +#endif if (node->token.type == SUBEXP && node->token.opr.idx == idx) node->token.opt_subexp = 1; diff --git a/Build/source/texk/web2c/texmfmp.h b/Build/source/texk/web2c/texmfmp.h index f0a244549f0..a4cd5f28cc8 100644 --- a/Build/source/texk/web2c/texmfmp.h +++ b/Build/source/texk/web2c/texmfmp.h @@ -290,6 +290,13 @@ extern void paintrow (/*screenrow, pixelcolor, transspec, screencol*/); #define undumpthings(base, len) \ do_undump ((char *) &(base), sizeof (base), (int) (len), DUMP_FILE) +#ifndef PRIdPTR +#define PRIdPTR "ld" +#endif +#ifndef PRIxPTR +#define PRIxPTR "lx" +#endif + /* Like do_undump, but check each value against LOW and HIGH. The slowdown isn't significant, and this improves the chances of detecting incompatible format files. In fact, Knuth himself noted @@ -301,9 +308,10 @@ extern void paintrow (/*screenrow, pixelcolor, transspec, screencol*/); undumpthings (base, len); \ for (i = 0; i < (len); i++) { \ if ((&(base))[i] < (low) || (&(base))[i] > (high)) { \ - FATAL5 ("Item %u (=%ld) of .fmt array at %lx <%ld or >%ld", \ - i, (unsigned long) (&(base))[i], (unsigned long) &(base),\ - (unsigned long) low, (unsigned long) high); \ + FATAL5 ("Item %u (=%" PRIdPTR ") of .fmt array at %" PRIxPTR \ + " <%" PRIdPTR " or >%" PRIdPTR, \ + i, (uintptr_t) (&(base))[i], (uintptr_t) &(base), \ + (uintptr_t) low, (uintptr_t) high); \ } \ } \ } while (0) @@ -317,9 +325,10 @@ extern void paintrow (/*screenrow, pixelcolor, transspec, screencol*/); undumpthings (base, len); \ for (i = 0; i < (len); i++) { \ if ((&(base))[i] > (high)) { \ - FATAL4 ("Item %u (=%ld) of .fmt array at %lx >%ld", \ - i, (unsigned long) (&(base))[i], (unsigned long) &(base),\ - (unsigned long) high); \ + FATAL4 ("Item %u (=%" PRIdPTR ") of .fmt array at %" PRIxPTR \ + " >%" PRIdPTR, \ + i, (uintptr_t) (&(base))[i], (uintptr_t) &(base), \ + (uintptr_t) high); \ } \ } \ } while (0) diff --git a/Build/source/texk/web2c/w2c/config.h b/Build/source/texk/web2c/w2c/config.h index d3f15e8f09a..25ba9b7f559 100644 --- a/Build/source/texk/web2c/w2c/config.h +++ b/Build/source/texk/web2c/w2c/config.h @@ -99,6 +99,15 @@ typedef __int64 integer64; #else typedef int64_t integer64; #endif + +/* And we need uintptr_t. */ +#ifndef HAVE_UINTPTR_T +# if SIZEOF_VOID_P == SIZEOF_INT +typedef unsigned int uintptr_t; +# elif SIZEOF_VOID_P == SIZEOF_LONG +typedef unsigned long uintptr_t; +# endif +#endif /* I don't want to write a configure test for remove when all Unix machines have unlink. But, for the sake of non-Unix machines that diff --git a/Build/source/texk/web2c/web2c/ChangeLog b/Build/source/texk/web2c/web2c/ChangeLog index 36b4304c111..15c7b6ac10e 100644 --- a/Build/source/texk/web2c/web2c/ChangeLog +++ b/Build/source/texk/web2c/web2c/ChangeLog @@ -1,3 +1,8 @@ +2014-11-06 Peter Breitenlohner + + * configure.ac: Add AC_CHECK_SIZEOF([long]), + AC_CHECK_SIZEOF([void *]) and AC_TYPE_UINTPTR_T. + 2014-06-16 Peter Breitenlohner * Makefile.am: Drop the obsolete ACLOCAL_AMFLAGS. diff --git a/Build/source/texk/web2c/web2c/c-auto.in b/Build/source/texk/web2c/web2c/c-auto.in index 602848dec80..014d6241bf7 100644 --- a/Build/source/texk/web2c/web2c/c-auto.in +++ b/Build/source/texk/web2c/web2c/c-auto.in @@ -108,6 +108,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H +/* Define to 1 if the system has the type `uintptr_t'. */ +#undef HAVE_UINTPTR_T + /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H @@ -138,6 +141,12 @@ /* The size of `int', as computed by sizeof. */ #undef SIZEOF_INT +/* The size of `long', as computed by sizeof. */ +#undef SIZEOF_LONG + +/* The size of `void *', as computed by sizeof. */ +#undef SIZEOF_VOID_P + /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS @@ -186,3 +195,7 @@ /* Define to the type of an unsigned integer type of width exactly 64 bits if such a type exists and the standard includes do not define it. */ #undef uint64_t + +/* Define to the type of an unsigned integer type wide enough to hold a + pointer, if such a type exists, and if the system does not define it. */ +#undef uintptr_t diff --git a/Build/source/texk/web2c/web2c/configure b/Build/source/texk/web2c/web2c/configure index 59946bc516e..c53befab554 100755 --- a/Build/source/texk/web2c/web2c/configure +++ b/Build/source/texk/web2c/web2c/configure @@ -13477,6 +13477,29 @@ case $LEX in esac +for ac_func in strerror +do : + ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" +if test "x$ac_cv_func_strerror" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRERROR 1 +_ACEOF + +fi +done + +for ac_header in errno.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" +if test "x$ac_cv_header_errno_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ERRNO_H 1 +_ACEOF + +fi + +done + # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. @@ -13510,28 +13533,108 @@ cat >>confdefs.h <<_ACEOF _ACEOF -for ac_func in strerror -do : - ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" -if test "x$ac_cv_func_strerror" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRERROR 1 +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 +$as_echo_n "checking size of long... " >&6; } +if ${ac_cv_sizeof_long+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (long) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_long=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 +$as_echo "$ac_cv_sizeof_long" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 +$as_echo_n "checking size of void *... " >&6; } +if ${ac_cv_sizeof_void_p+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_void_p" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (void *) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_void_p=0 + fi fi -done -for ac_header in errno.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" -if test "x$ac_cv_header_errno_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ERRNO_H 1 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 +$as_echo "$ac_cv_sizeof_void_p" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_VOID_P $ac_cv_sizeof_void_p _ACEOF + + + ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default" +if test "x$ac_cv_type_uintptr_t" = xyes; then : + +$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h + +else + for ac_type in 'unsigned int' 'unsigned long int' \ + 'unsigned long long int'; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +cat >>confdefs.h <<_ACEOF +#define uintptr_t $ac_type +_ACEOF + + ac_type= +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test -z "$ac_type" && break + done fi -done ac_config_headers="$ac_config_headers kpathsea/c-auto.h:c-auto.in" diff --git a/Build/source/texk/web2c/web2c/configure.ac b/Build/source/texk/web2c/web2c/configure.ac index c70d78ec4e2..56dc0e6d515 100644 --- a/Build/source/texk/web2c/web2c/configure.ac +++ b/Build/source/texk/web2c/web2c/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with Autoconf to produce a configure script for Web2c. dnl -dnl Copyright (C) 2009-2013 Peter Breitenlohner +dnl Copyright (C) 2009-2014 Peter Breitenlohner dnl dnl This file is free software; the copyright holder dnl gives unlimited permission to copy and/or distribute it, @@ -28,9 +28,12 @@ KPSE_COMMON([web2c convert]) AC_PROG_YACC KPSE_PROG_LEX -AC_CHECK_SIZEOF([int]) AC_CHECK_FUNCS([strerror]) AC_CHECK_HEADERS([errno.h]) +AC_CHECK_SIZEOF([int]) +AC_CHECK_SIZEOF([long]) +AC_CHECK_SIZEOF([void *]) +AC_TYPE_UINTPTR_T dnl Write output here, instead of putting a zillion -D's on the command line. AC_CONFIG_HEADERS([kpathsea/c-auto.h:c-auto.in]) -- cgit v1.2.3