diff options
Diffstat (limited to 'Build/source/texk/seetexk')
-rw-r--r-- | Build/source/texk/seetexk/ChangeLog | 6 | ||||
-rw-r--r-- | Build/source/texk/seetexk/config.h.in | 26 | ||||
-rwxr-xr-x | Build/source/texk/seetexk/configure | 262 | ||||
-rw-r--r-- | Build/source/texk/seetexk/configure.ac | 9 | ||||
-rw-r--r-- | Build/source/texk/seetexk/error.c | 2 | ||||
-rw-r--r-- | Build/source/texk/seetexk/types.h | 14 |
6 files changed, 74 insertions, 245 deletions
diff --git a/Build/source/texk/seetexk/ChangeLog b/Build/source/texk/seetexk/ChangeLog index 6fe58a4f598..6c39a14c48b 100644 --- a/Build/source/texk/seetexk/ChangeLog +++ b/Build/source/texk/seetexk/ChangeLog @@ -1,3 +1,9 @@ +2015-02-27 Peter Breitenlohner <peb@mppmu.mpg.de> + + * configure.ac: Drop tests for strerror(), vprintf(), and + sizeof(int); add AC_TYPE_INT16_T etc. + * types.h: Drop unused HAVE_VPRINTF; use int16_t etc. + 2014-06-19 Peter Breitenlohner <peb@mppmu.mpg.de> * dvitodvi.c: Avboid undefined behaviour when char is signed. diff --git a/Build/source/texk/seetexk/config.h.in b/Build/source/texk/seetexk/config.h.in index 91fc4f4f1dd..e265e48f4ad 100644 --- a/Build/source/texk/seetexk/config.h.in +++ b/Build/source/texk/seetexk/config.h.in @@ -85,9 +85,6 @@ /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR -/* Define to 1 if you have the `strtod' function. */ -#undef HAVE_STRTOD - /* Define to 1 if you have the `strtol' function. */ #undef HAVE_STRTOL @@ -114,9 +111,6 @@ /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H -/* Define to 1 if you have the `vprintf' function. */ -#undef HAVE_VPRINTF - /* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR @@ -141,9 +135,6 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION -/* The size of `int', as computed by sizeof. */ -#undef SIZEOF_INT - /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS @@ -164,6 +155,11 @@ /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES +/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>, + <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the + #define below would cause a syntax error. */ +#undef _UINT32_T + /* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>, <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the #define below would cause a syntax error. */ @@ -178,6 +174,14 @@ #undef inline #endif +/* Define to the type of a signed integer type of width exactly 16 bits if + such a type exists and the standard includes do not define it. */ +#undef int16_t + +/* Define to the type of a signed integer type of width exactly 32 bits if + such a type exists and the standard includes do not define it. */ +#undef int32_t + /* Define to the type of a signed integer type of width exactly 64 bits if such a type exists and the standard includes do not define it. */ #undef int64_t @@ -185,6 +189,10 @@ /* Define to `unsigned int' if <sys/types.h> does not define. */ #undef size_t +/* Define to the type of an unsigned integer type of width exactly 32 bits if + such a type exists and the standard includes do not define it. */ +#undef uint32_t + /* 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 diff --git a/Build/source/texk/seetexk/configure b/Build/source/texk/seetexk/configure index 33931d57ee4..4d29389c20d 100755 --- a/Build/source/texk/seetexk/configure +++ b/Build/source/texk/seetexk/configure @@ -2127,189 +2127,6 @@ $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member - -# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES -# -------------------------------------------- -# Tries to find the compile-time value of EXPR in a program that includes -# INCLUDES, setting VAR accordingly. Returns whether the value could be -# computed -ac_fn_c_compute_int () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=0 ac_mid=0 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid; break -else - as_fn_arith $ac_mid + 1 && ac_lo=$as_val - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=-1 ac_mid=-1 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=$ac_mid; break -else - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - ac_lo= ac_hi= -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid -else - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in #(( -?*) eval "$3=\$ac_lo"; ac_retval=0 ;; -'') ac_retval=1 ;; -esac - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -static long int longval () { return $2; } -static unsigned long int ulongval () { return $2; } -#include <stdio.h> -#include <stdlib.h> -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (($2) < 0) - { - long int i = longval (); - if (i != ($2)) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ($2)) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - echo >>conftest.val; read $3 <conftest.val; ac_retval=0 -else - ac_retval=1 -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -rm -f conftest.val - - fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_compute_int cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. @@ -13595,46 +13412,12 @@ fi ac_config_headers="$ac_config_headers config.h" -# 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 int" >&5 -$as_echo_n "checking size of int... " >&6; } -if ${ac_cv_sizeof_int+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_int" = 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 (int) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_int=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 -$as_echo "$ac_cv_sizeof_int" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT $ac_cv_sizeof_int -_ACEOF - - -for ac_func in strerror strtod vprintf +for ac_func in strerror do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + 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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define HAVE_STRERROR 1 _ACEOF fi @@ -13653,6 +13436,43 @@ fi done +ac_fn_c_find_intX_t "$LINENO" "16" "ac_cv_c_int16_t" +case $ac_cv_c_int16_t in #( + no|yes) ;; #( + *) + +cat >>confdefs.h <<_ACEOF +#define int16_t $ac_cv_c_int16_t +_ACEOF +;; +esac + +ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t" +case $ac_cv_c_int32_t in #( + no|yes) ;; #( + *) + +cat >>confdefs.h <<_ACEOF +#define int32_t $ac_cv_c_int32_t +_ACEOF +;; +esac + +ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t" +case $ac_cv_c_uint32_t in #( + no|yes) ;; #( + *) + +$as_echo "#define _UINT32_T 1" >>confdefs.h + + +cat >>confdefs.h <<_ACEOF +#define uint32_t $ac_cv_c_uint32_t +_ACEOF +;; + esac + + kpse_save_CPPFLAGS=$CPPFLAGS kpse_save_LIBS=$LIBS diff --git a/Build/source/texk/seetexk/configure.ac b/Build/source/texk/seetexk/configure.ac index 08d05576363..2e4175f5179 100644 --- a/Build/source/texk/seetexk/configure.ac +++ b/Build/source/texk/seetexk/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. dnl -dnl Copyright (C) 2009, 2013 Peter Breitenlohner <tex-live@tug.org> +dnl Copyright (C) 2009-2015 Peter Breitenlohner <tex-live@tug.org> dnl dnl This file is free software; the copyright holder dnl gives unlimited permission to copy and/or distribute it, @@ -17,10 +17,13 @@ KPSE_COMMON([seetexk]) AC_CONFIG_HEADERS([config.h]) -AC_CHECK_SIZEOF([int]) -AC_CHECK_FUNCS([strerror strtod vprintf]) +AC_CHECK_FUNCS([strerror]) AC_CHECK_HEADERS([errno.h]) +AC_TYPE_INT16_T +AC_TYPE_INT32_T +AC_TYPE_UINT32_T + KPSE_KPATHSEA_FLAGS AC_CONFIG_FILES([Makefile]) diff --git a/Build/source/texk/seetexk/error.c b/Build/source/texk/seetexk/error.c index b17ace979b8..072c8573405 100644 --- a/Build/source/texk/seetexk/error.c +++ b/Build/source/texk/seetexk/error.c @@ -31,7 +31,7 @@ #include <stdio.h> -#include "types.h" /* for HAVE_VPRINTF */ +#include "types.h" #include "error.h" #include "tempfile.h" diff --git a/Build/source/texk/seetexk/types.h b/Build/source/texk/seetexk/types.h index 2bb631769d8..07105c6e0a5 100644 --- a/Build/source/texk/seetexk/types.h +++ b/Build/source/texk/seetexk/types.h @@ -67,14 +67,6 @@ */ /* #define void int */ -/* - * Define the following if and only if vfprintf is in your C library. - * If not, lib/error.c will make assumptions about the implementation - * of stdio. If neither works, you may have to come up with something - * yourself. - */ -#define HAVE_VPRINTF - #endif /* KPATHSEA */ /* @@ -87,10 +79,10 @@ * Define the following types and macros as required by your system. */ -typedef short i16; /* a 16 bit integer (signed) */ +typedef int16_t i16; /* a 16 bit integer (signed) */ -typedef long i32; /* a 32 bit integer (signed) */ -typedef unsigned long ui32; /* a 32 bit integer (unsigned) */ +typedef int32_t i32; /* a 32 bit integer (signed) */ +typedef uint32_t ui32; /* a 32 bit integer (unsigned) */ /* macros to sign extend quantities that are less than 32 bits long */ |