diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-06-24 13:05:47 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-06-24 13:05:47 (GMT) |
commit | 034bd13a3cd5781c916ced37c764a6634e458499 (patch) | |
tree | aae8ed14ac5481ebad3c2a315f10c3b3f6c04378 /unix | |
parent | ea3e48843d5f42ebaa1c962a705cc4b1ac8a6c80 (diff) | |
download | tcl-034bd13a3cd5781c916ced37c764a6634e458499.zip tcl-034bd13a3cd5781c916ced37c764a6634e458499.tar.gz tcl-034bd13a3cd5781c916ced37c764a6634e458499.tar.bz2 |
Fix [9080d6a871]: Build fix for tcl on macOS on Apple Silicon
Diffstat (limited to 'unix')
-rwxr-xr-x | unix/configure | 3 | ||||
-rw-r--r-- | unix/configure.in | 2 | ||||
-rw-r--r-- | unix/tcl.m4 | 6 | ||||
-rw-r--r-- | unix/tclConfig.h.in | 40 |
4 files changed, 19 insertions, 32 deletions
diff --git a/unix/configure b/unix/configure index b02525b..a900a70 100755 --- a/unix/configure +++ b/unix/configure @@ -15050,6 +15050,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main() { + #include <stdlib.h> extern double strtod(); char *term, *string = " +69"; exit(strtod(string,&term) != 69 || term != string+4); @@ -15220,6 +15221,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + #include <stdlib.h> extern double strtod(); int main() { char *infString="Inf", *nanString="NaN", *spaceString=" "; @@ -16607,6 +16609,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <stdlib.h> + #include <string.h> #define OURVAR "havecopy=yes" int main (int argc, char *argv[]) { diff --git a/unix/configure.in b/unix/configure.in index c110c21..a4ec925 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -298,6 +298,7 @@ SC_TCL_CHECK_BROKEN_FUNC(strtoul, [ #-------------------------------------------------------------------- SC_TCL_CHECK_BROKEN_FUNC(strtod, [ + #include <stdlib.h> extern double strtod(); char *term, *string = " +69"; exit(strtod(string,&term) != 69 || term != string+4); @@ -453,6 +454,7 @@ fi AC_CACHE_CHECK([for a putenv() that copies the buffer], tcl_cv_putenv_copy, [ AC_TRY_RUN([ #include <stdlib.h> + #include <string.h> #define OURVAR "havecopy=yes" int main (int argc, char *argv[]) { diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 0dd4d77..4c96316 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -2596,6 +2596,7 @@ AC_DEFUN([SC_BUGGY_STRTOD], [ if test "$tcl_strtod" = 1; then AC_CACHE_CHECK([for Solaris2.4/Tru64 strtod bugs], tcl_cv_strtod_buggy,[ AC_TRY_RUN([ + #include <stdlib.h> extern double strtod(); int main() { char *infString="Inf", *nanString="NaN", *spaceString=" "; @@ -2882,7 +2883,10 @@ AC_DEFUN([SC_TCL_CHECK_BROKEN_FUNC],[ AC_CHECK_FUNC($1, tcl_ok=1, tcl_ok=0) if test ["$tcl_ok"] = 1; then AC_CACHE_CHECK([proper ]$1[ implementation], [tcl_cv_]$1[_unbroken], - AC_TRY_RUN([[int main() {]$2[}]],[tcl_cv_]$1[_unbroken]=ok, + AC_TRY_RUN([[ +#include <stdlib.h> +#include <string.h> +int main() {]$2[}]],[tcl_cv_]$1[_unbroken]=ok, [tcl_cv_]$1[_unbroken]=broken,[tcl_cv_]$1[_unbroken]=unknown)) if test ["$tcl_cv_]$1[_unbroken"] = "ok"; then tcl_ok=1 diff --git a/unix/tclConfig.h.in b/unix/tclConfig.h.in index c02adc5..0879c7a 100644 --- a/unix/tclConfig.h.in +++ b/unix/tclConfig.h.in @@ -4,9 +4,6 @@ #ifndef _TCLCONFIG #define _TCLCONFIG -/* Define if building universal (internal helper macro) */ -#undef AC_APPLE_UNIVERSAL_BUILD - /* Is pthread_attr_get_np() declared in <pthread.h>? */ #undef ATTRGETNP_NOT_DECLARED @@ -40,17 +37,6 @@ /* Is the cpuid instruction usable? */ #undef HAVE_CPUID -/* Define to 1 if you have the declaration of `gethostbyaddr_r', and to 0 if - you don't. */ -#undef HAVE_DECL_GETHOSTBYADDR_R - -/* Define to 1 if you have the declaration of `gethostbyname_r', and to 0 if - you don't. */ -#undef HAVE_DECL_GETHOSTBYNAME_R - -/* Is 'DIR64' in <sys/types.h>? */ -#undef HAVE_DIR64 - /* Do we have fts functions? */ #undef HAVE_FTS @@ -207,13 +193,16 @@ /* Is 'struct dirent64' in <sys/types.h>? */ #undef HAVE_STRUCT_DIRENT64 +/* Is 'DIR64' in <sys/types.h>? */ +#undef HAVE_DIR64 + /* Is 'struct stat64' in <sys/stat.h>? */ #undef HAVE_STRUCT_STAT64 -/* Define to 1 if `st_blksize' is a member of `struct stat'. */ +/* Define to 1 if `st_blksize' is member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BLKSIZE -/* Define to 1 if `st_blocks' is a member of `struct stat'. */ +/* Define to 1 if `st_blocks' is member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BLOCKS /* Define to 1 if you have the <sys/filio.h> header file. */ @@ -348,9 +337,6 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME -/* Define to the home page for this package. */ -#undef PACKAGE_URL - /* Define to the version of this package. */ #undef PACKAGE_VERSION @@ -444,17 +430,9 @@ /* Should we use vfork() instead of fork()? */ #undef USE_VFORK -/* 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 +/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ +#undef WORDS_BIGENDIAN /* Are Darwin SUSv3 extensions available? */ #undef _DARWIN_C_SOURCE @@ -509,7 +487,7 @@ /* Define to `int' if <sys/types.h> does not define. */ #undef pid_t -/* Define to `unsigned int' if <sys/types.h> does not define. */ +/* Define to `unsigned' if <sys/types.h> does not define. */ #undef size_t /* Define as int if socklen_t is not available */ |