gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gawk-diffs] [SCM] gawk branch, porting, updated. 13b8d9034b58c51e06c05c


From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, porting, updated. 13b8d9034b58c51e06c05c70fe89a34ad1c7dcd9
Date: Wed, 20 Mar 2013 17:07:50 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, porting has been updated
       via  13b8d9034b58c51e06c05c70fe89a34ad1c7dcd9 (commit)
      from  15c90ed3319a297680282dba3a24cbdeaca7e8bb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=13b8d9034b58c51e06c05c70fe89a34ad1c7dcd9

commit 13b8d9034b58c51e06c05c70fe89a34ad1c7dcd9
Author: Arnold D. Robbins <address@hidden>
Date:   Wed Mar 20 19:06:08 2013 +0200

    Additional fixes for MirBSD. Now passes make check.

diff --git a/ChangeLog b/ChangeLog
index 88047c4..d7a0abd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2013-03-20         Arnold D. Robbins     <address@hidden>
+
+       For systems where libc is borked (MirBSD, maybe others).
+
+       * dfa.c: Force use of gawk_mb_cur_max instead of MB_CUR_MAX and make
+       mbrtowc a macro that always fails.
+       (using_utf8): Force utf8 to be 0 if libc borked and gawk_mb_cur_max
+       is one.
+       * main.c (main): If libc is borked and LC_ALL or LANG exist in the
+       environment and are set to "C" or "c", force gawk_mb_cur_max to one.
+
 2013-03-11         Arnold D. Robbins     <address@hidden>
 
        * re.c (check_bracket_exp): Make handling of embedded ] in
diff --git a/dfa.c b/dfa.c
index 88d34d5..df0dc4a 100644
--- a/dfa.c
+++ b/dfa.c
@@ -92,6 +92,14 @@ is_blank (int c)
 }
 #endif /* GAWK */
 
+#ifdef LIBC_IS_BORKED
+extern int gawk_mb_cur_max;
+#undef MB_CUR_MAX
+#define MB_CUR_MAX gawk_mb_cur_max
+#undef mbrtowc
+#define mbrtowc(a, b, c, d) (-1)
+#endif
+
 /* HPUX, define those as macros in sys/param.h */
 #ifdef setbit
 # undef setbit
@@ -794,6 +802,10 @@ using_utf8 (void)
 #else
       utf8 = 0;
 #endif
+#ifdef LIBC_IS_BORKED
+      if (gawk_mb_cur_max == 1)
+       utf8 = 0;
+#endif
     }
 
   return utf8;
diff --git a/extension/ChangeLog b/extension/ChangeLog
index 62638fc..1d85469 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,10 @@
+2013-03-20         Arnold D. Robbins     <address@hidden>
+
+       * configure.ac: Add AC_OUTPUT_COMMANDS that drops in a do-nothing
+       Makefile for MirBSD, since the extensions can't be built on MirBSD.
+       * configure: Regenerated.
+       * Makefile.am (check-for-shared-lib-support): Update comment some.
+
 2013-03-04         Arnold D. Robbins     <address@hidden>
 
        * filefuncs.c (fill_stat_array): Adjust computation for block
diff --git a/extension/Makefile.am b/extension/Makefile.am
index 61e2697..d048497 100644
--- a/extension/Makefile.am
+++ b/extension/Makefile.am
@@ -115,6 +115,9 @@ SUBDIRS =
 # This is an ugly hack, initially for MirBSD but probably needed for other
 # systems. If gawk doesn't have the API built in, don't try to build the
 # extensions.
+#
+# Given the workaround in configure, this isn't strictly necessary, but
+# we're leaving it in, in case of some other system needing it.
 check-recursive all-recursive: check-for-shared-lib-support
 
 check-for-shared-lib-support:
diff --git a/extension/Makefile.in b/extension/Makefile.in
index 9aa75ce..87529d9 100644
--- a/extension/Makefile.in
+++ b/extension/Makefile.in
@@ -1186,6 +1186,9 @@ uninstall-man: uninstall-man3
 # This is an ugly hack, initially for MirBSD but probably needed for other
 # systems. If gawk doesn't have the API built in, don't try to build the
 # extensions.
+#
+# Given the workaround in configure, this isn't strictly necessary, but
+# we're leaving it in, in case of some other system needing it.
 check-recursive all-recursive: check-for-shared-lib-support
 
 check-for-shared-lib-support:
diff --git a/extension/configure b/extension/configure
index 797cf60..1f6b937 100755
--- a/extension/configure
+++ b/extension/configure
@@ -14031,6 +14031,7 @@ ac_config_headers="$ac_config_headers 
config.h:configh.in"
 
 ac_config_files="$ac_config_files Makefile"
 
+ac_config_commands="$ac_config_commands default-1"
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
@@ -15034,6 +15035,7 @@ fi
 
 
 
+
 _ACEOF
 
 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
@@ -15047,6 +15049,7 @@ do
     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:configh.in" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
 
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
@@ -16478,6 +16481,17 @@ fi
   chmod +x "$ofile"
 
  ;;
+    "default-1":C)
+case `uname` in
+MirBSD | MirOS)
+       cat << \EOF > Makefile
+all dist check clean distclean install uninstall distcheck:
+       @exit 0
+EOF
+       ;;
+*)
+esac
+ ;;
 
   esac
 done # for ac_tag
diff --git a/extension/configure.ac b/extension/configure.ac
index b1d00e5..a1f42db 100644
--- a/extension/configure.ac
+++ b/extension/configure.ac
@@ -78,4 +78,15 @@ AC_C_INLINE
 AC_CONFIG_HEADERS([config.h:configh.in])
 
 AC_CONFIG_FILES(Makefile)
+AC_OUTPUT_COMMANDS([
+case `uname` in
+MirBSD | MirOS)
+       cat << \EOF > Makefile
+all dist check clean distclean install uninstall distcheck:
+       @exit 0
+EOF
+       ;;
+*)
+esac
+])dnl
 AC_OUTPUT
diff --git a/main.c b/main.c
index 785935e..e2aff0c 100644
--- a/main.c
+++ b/main.c
@@ -210,6 +210,7 @@ main(int argc, char **argv)
        char *extra_stack;
        int have_srcfile = 0;
        SRCFILE *s;
+       const char *env_lc;
 
        /* do these checks early */
        if (getenv("TIDYMEM") != NULL)
@@ -261,6 +262,13 @@ main(int argc, char **argv)
         */
        gawk_mb_cur_max = MB_CUR_MAX;
        /* Without MBS_SUPPORT, gawk_mb_cur_max is 1. */
+#ifdef LIBC_IS_BORKED
+       env_lc = getenv("LC_ALL");
+       if (env_lc == NULL)
+               env_lc = getenv("LANG");
+       if (env_lc != NULL && env_lc[1] == '\0' && tolower(env_lc[0]) == 'c')
+               gawk_mb_cur_max = 1;
+#endif
 
        /* init the cache for checking bytes if they're characters */
        init_btowc_cache();

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog              |   11 +++++++++++
 dfa.c                  |   12 ++++++++++++
 extension/ChangeLog    |    7 +++++++
 extension/Makefile.am  |    3 +++
 extension/Makefile.in  |    3 +++
 extension/configure    |   14 ++++++++++++++
 extension/configure.ac |   11 +++++++++++
 main.c                 |    8 ++++++++
 8 files changed, 69 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]