summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2015-04-17 07:56:24 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2015-04-17 07:56:24 +0000
commit965b84f24f1e0a0a7f19408269afb6f270ed2b4d (patch)
treeab86466b7a6466b0a5fd46ad00b585b44b388763 /Build
parentf49d393d23cd0ec870e76a42b3feecb4534fd428 (diff)
texk/kpathsea: Fix definition of isascii()
git-svn-id: svn://tug.org/texlive/trunk@36887 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/kpathsea/ChangeLog5
-rw-r--r--Build/source/texk/kpathsea/c-auto.in6
-rw-r--r--Build/source/texk/kpathsea/c-ctype.h8
-rwxr-xr-xBuild/source/texk/kpathsea/configure13
-rw-r--r--Build/source/texk/kpathsea/configure.ac5
5 files changed, 31 insertions, 6 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog
index d1e18d87892..b5ec656aedc 100644
--- a/Build/source/texk/kpathsea/ChangeLog
+++ b/Build/source/texk/kpathsea/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-17 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * configure.ac: Test if isascii is declared.
+ * c-ctype.h: Correctly define isascii, if not declared.
+
2015-04-14 Norbert Preining <norbert@preining.info>
* mktexlsr (treefile): switch back to hard-coded path, as
diff --git a/Build/source/texk/kpathsea/c-auto.in b/Build/source/texk/kpathsea/c-auto.in
index 2aea003de62..aa8a1d58e5a 100644
--- a/Build/source/texk/kpathsea/c-auto.in
+++ b/Build/source/texk/kpathsea/c-auto.in
@@ -2,7 +2,7 @@
/* c-auto.h: defines for kpathsea, as determined by configure.
- Copyright 1994-97, 2008, 2009, 2010 Karl Berry.
+ Copyright 1994-97, 2008-2015 Karl Berry.
Copyright 1997-99, 2002, 2005 Olaf Weber.
This library is free software; you can redistribute it and/or
@@ -35,6 +35,10 @@
/* Define to 1 if you have the <assert.h> header file. */
#undef HAVE_ASSERT_H
+/* Define to 1 if you have the declaration of `isascii', and to 0 if you
+ don't. */
+#undef HAVE_DECL_ISASCII
+
/* Define to 1 if you have the declaration of `putenv', and to 0 if you don't.
*/
#undef HAVE_DECL_PUTENV
diff --git a/Build/source/texk/kpathsea/c-ctype.h b/Build/source/texk/kpathsea/c-ctype.h
index 72fbf370a8f..5e453e08fbb 100644
--- a/Build/source/texk/kpathsea/c-ctype.h
+++ b/Build/source/texk/kpathsea/c-ctype.h
@@ -1,6 +1,6 @@
/* c-ctype.h: ASCII-safe versions of the <ctype.h> macros.
- Copyright 1992, 1994, 2008, 2010, 2011 Karl Berry.
+ Copyright 1992, 1994, 2008, 2010, 2011, 2015 Karl Berry.
Copyright 1998, 2000, 2005 Olaf Weber.
This library is free software; you can redistribute it and/or
@@ -21,10 +21,10 @@
#include <ctype.h>
-/* Be sure we have `isascii', even if wrong. */
+/* Be sure we have `isascii'. */
#ifndef WIN32
-#ifndef isascii
-#define isascii(c) 1
+#if !(defined(HAVE_DECL_ISASCII) && HAVE_DECL_ISASCII)
+#define isascii(c) (((c) & ~0x7f) == 0)
#endif
#endif
diff --git a/Build/source/texk/kpathsea/configure b/Build/source/texk/kpathsea/configure
index f10ea87cace..da88554efa0 100755
--- a/Build/source/texk/kpathsea/configure
+++ b/Build/source/texk/kpathsea/configure
@@ -13873,6 +13873,19 @@ _ACEOF
+ac_fn_c_check_decl "$LINENO" "isascii" "ac_cv_have_decl_isascii" "#include <ctype.h>
+"
+if test "x$ac_cv_have_decl_isascii" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ISASCII $ac_have_decl
+_ACEOF
+
+
ac_fn_c_check_decl "$LINENO" "putenv" "ac_cv_have_decl_putenv" "$ac_includes_default"
if test "x$ac_cv_have_decl_putenv" = xyes; then :
ac_have_decl=1
diff --git a/Build/source/texk/kpathsea/configure.ac b/Build/source/texk/kpathsea/configure.ac
index d2e08afa404..97ebdc23d90 100644
--- a/Build/source/texk/kpathsea/configure.ac
+++ b/Build/source/texk/kpathsea/configure.ac
@@ -35,6 +35,9 @@ AC_PROG_AWK
AC_CHECK_SIZEOF([long])
+dnl Check if <ctype.h> declares isascii.
+AC_CHECK_DECLS([isascii], [], [], [[#include <ctype.h>]])
+
dnl Replacement functions that may be required on ancient broken system.
AC_CHECK_DECLS([putenv])
AC_REPLACE_FUNCS([putenv])
@@ -117,7 +120,7 @@ AC_CONFIG_HEADERS([c-auto.h:c-auto.in],
AH_TOP([/* c-auto.h: defines for kpathsea, as determined by configure.
- Copyright 1994-97, 2008, 2009, 2010 Karl Berry.
+ Copyright 1994-97, 2008-2015 Karl Berry.
Copyright 1997-99, 2002, 2005 Olaf Weber.
This library is free software; you can redistribute it and/or