gawk-diffs
[Top][All Lists]
Advanced

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

[gawk-diffs] [SCM] gawk branch, porting, created. d8178f354fb1f81c0ed631


From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, porting, created. d8178f354fb1f81c0ed631a25e3ed31dcdadc10e
Date: Fri, 01 Mar 2013 11:45:32 +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 created
        at  d8178f354fb1f81c0ed631a25e3ed31dcdadc10e (commit)

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

commit d8178f354fb1f81c0ed631a25e3ed31dcdadc10e
Author: Arnold D. Robbins <address@hidden>
Date:   Fri Mar 1 13:44:20 2013 +0200

    Make charasbytes test pass on MirBSD.

diff --git a/ChangeLog b/ChangeLog
index 12b0182..3e47061 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,18 @@
 2013-03-01         Arnold D. Robbins     <address@hidden>
 
+       Don't build extensions if API isn't supported:
+
        * Makefile.am (SUBDIRS): Move extension directory to last in case
        building the extensions is not supported.
        * configure.ac: Add check for MirBSD and don't even try to run the
        checks for DYNAMIC if so.
 
+       Check for systems (MirBSD) where libc doesn't understand not
+       to use UTF-8 for LC_ALL=C.
+
+       * configure.ac (LIBC_IS_BORKED): AC_DEFINE if needed.
+       * regcomp.c (init_dfa): Change logic as needed if LIBC_IS_BORKED.
+
 2013-02-28         Arnold D. Robbins     <address@hidden>
 
        Cause profiling / pretty printing to include a list of
diff --git a/configh.in b/configh.in
index 350aac5..661b117 100644
--- a/configh.in
+++ b/configh.in
@@ -324,6 +324,9 @@
 /* Define to 1 if the system has the type `_Bool'. */
 #undef HAVE__BOOL
 
+/* libc is broken for regex handling */
+#undef LIBC_IS_BORKED
+
 /* disable lint checks */
 #undef NO_LINT
 
diff --git a/configure b/configure
index 271ac8a..689b01f 100755
--- a/configure
+++ b/configure
@@ -5875,6 +5875,14 @@ then
        CFLAGS="$CFLAGS -D_SYSV3"
 fi
 
+case `uname` in
+MirBSD | MirOS)
+
+$as_echo "#define LIBC_IS_BORKED 1" >>confdefs.h
+
+       ;;
+esac
+
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
diff --git a/configure.ac b/configure.ac
index 2f42f4e..b308768 100644
--- a/configure.ac
+++ b/configure.ac
@@ -118,6 +118,13 @@ dnl        need -D_SYSV3 for ISC
        CFLAGS="$CFLAGS -D_SYSV3"
 fi
 
+dnl check for systems where libc is borked for regex handling
+case `uname` in
+MirBSD | MirOS)
+       AC_DEFINE([LIBC_IS_BORKED], 1, [libc is broken for regex handling])
+       ;;
+esac
+
 dnl Set the programming language for checks. Fortunately,
 dnl this only needs to be set once, since everything is in C.
 AC_LANG([C])
diff --git a/regcomp.c b/regcomp.c
index 70a0d38..fd490d0 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -856,6 +856,10 @@ init_dfa (re_dfa_t *dfa, size_t pat_len)
 #ifndef _LIBC
   char *codeset_name;
 #endif
+#if defined(GAWK) && defined(LIBC_IS_BORKED)
+  /* Needed for brain damaged systems */
+  extern int gawk_mb_cur_max;
+#endif
 
   memset (dfa, '\0', sizeof (re_dfa_t));
 
@@ -877,7 +881,11 @@ init_dfa (re_dfa_t *dfa, size_t pat_len)
   dfa->state_table = calloc (sizeof (struct re_state_table_entry), table_size);
   dfa->state_hash_mask = table_size - 1;
 
+#if defined(GAWK) && defined(LIBC_IS_BORKED)
+  dfa->mb_cur_max = gawk_mb_cur_max;
+#else
   dfa->mb_cur_max = MB_CUR_MAX;
+#endif
 #ifdef _LIBC
   if (dfa->mb_cur_max == 6
       && strcmp (_NL_CURRENT (LC_CTYPE, _NL_CTYPE_CODESET_NAME), "UTF-8") == 0)
@@ -912,6 +920,10 @@ init_dfa (re_dfa_t *dfa, size_t pat_len)
           ? codeset_name[4] == '8' && codeset_name[5] == '\0'
           : codeset_name[3] == '8' && codeset_name[4] == '\0'))
     dfa->is_utf8 = 1;
+#if defined(GAWK) && defined(LIBC_IS_BORKED)
+  if (gawk_mb_cur_max == 1)
+    dfa->is_utf8 = 0;
+#endif /* defined(GAWK) && defined(LIBC_IS_BORKED) */
 #endif
 
   /* We check exhaustively in the loop below if this charset is a

http://git.sv.gnu.org/cgit/gawk.git/commit/?id=c39c22ef05a188119bbf6da7b80e900ff3fcab31

commit c39c22ef05a188119bbf6da7b80e900ff3fcab31
Author: Arnold D. Robbins <address@hidden>
Date:   Fri Mar 1 13:35:19 2013 +0200

    Don't build the extensions if no API support.

diff --git a/ChangeLog b/ChangeLog
index 256c52f..12b0182 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2013-03-01         Arnold D. Robbins     <address@hidden>
+
+       * Makefile.am (SUBDIRS): Move extension directory to last in case
+       building the extensions is not supported.
+       * configure.ac: Add check for MirBSD and don't even try to run the
+       checks for DYNAMIC if so.
+
 2013-02-28         Arnold D. Robbins     <address@hidden>
 
        Cause profiling / pretty printing to include a list of
diff --git a/Makefile.am b/Makefile.am
index 1f1929a..844fa2c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -67,13 +67,15 @@ distcleancheck_listfiles = \
 # The order to do things in.
 # Build explicitly in "." in order to build gawk first, so
 # that `make check' without a prior `make' works.
+#
+# Put 'extension' last, in case building the extensions is not supported.
 SUBDIRS = \
        . \
        awklib \
        doc \
        po \
-       extension \
-       test
+       test \
+       extension
 
 # what to make and install
 bin_PROGRAMS = gawk
diff --git a/Makefile.in b/Makefile.in
index 3b9963d..0e6723c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -398,13 +398,15 @@ distcleancheck_listfiles = \
 # The order to do things in.
 # Build explicitly in "." in order to build gawk first, so
 # that `make check' without a prior `make' works.
+#
+# Put 'extension' last, in case building the extensions is not supported.
 SUBDIRS = \
        . \
        awklib \
        doc \
        po \
-       extension \
-       test
+       test \
+       extension
 
 include_HEADERS = gawkapi.h
 
diff --git a/configure b/configure
index c4c8913..271ac8a 100755
--- a/configure
+++ b/configure
@@ -10026,6 +10026,10 @@ $as_echo "#define HAVE_MBRTOWC 1" >>confdefs.h
   fi
 
 
+case `uname` in
+MirBSD | MirOS)
+       : ;;
+*)
 ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" 
"$ac_includes_default"
 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
 
@@ -10108,6 +10112,8 @@ $as_echo "#define DYNAMIC 1" >>confdefs.h
 fi
 
 
+       ;;
+esac
 
 case `(uname) 2> /dev/null` in
 *VMS*|*BeOS*|*OS/2*|*MS-DOS*)
diff --git a/configure.ac b/configure.ac
index 5b2507e..2f42f4e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -287,6 +287,11 @@ AC_FUNC_MBRTOWC
 
 dnl check for dynamic linking
 dnl This is known to be very primitive
+dnl On MirBSD (and probably other systems), don't even try.
+case `uname` in
+MirBSD | MirOS)
+       : ;;
+*)
 AC_CHECK_HEADER(dlfcn.h,
        [
        # Check this separately. Some systems have dlopen
@@ -306,6 +311,8 @@ AC_CHECK_HEADER(dlfcn.h,
                fi
        fi
 ])
+       ;;
+esac
 
 dnl check for how to use getpgrp
 dnl have to hardwire it for VMS POSIX. Sigh.
diff --git a/extension/ChangeLog b/extension/ChangeLog
index 291b564..5eff978 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,10 @@
+2013-02-26         Arnold D. Robbins     <address@hidden>
+
+       * Makefile.am (check-recursive, all-recursive): Make dependant upon
+       check-for-shared-lib-support.
+       (check-for-shared-lib-support): New target. If gawk doesn't have the
+       API built-in, don't try to build.
+
 2013-02-11         Arnold D. Robbins     <address@hidden>
 
        * fnmatch.c: Pull in versions of C routine from missing_d
diff --git a/extension/Makefile.am b/extension/Makefile.am
index 48d315a..61e2697 100644
--- a/extension/Makefile.am
+++ b/extension/Makefile.am
@@ -111,3 +111,15 @@ dist_man_MANS = \
 
 # gettext requires this
 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.
+check-recursive all-recursive: check-for-shared-lib-support
+
+check-for-shared-lib-support:
+       @if ../gawk$(EXEEXT) --version | sed 1q | grep API > /dev/null; \
+       then    : do nothing ; \
+       else    echo Building the extensions is not supported on this platform 
; \
+               exit 1; \
+       fi
diff --git a/extension/Makefile.in b/extension/Makefile.in
index 20a5240..9aa75ce 100644
--- a/extension/Makefile.in
+++ b/extension/Makefile.in
@@ -1183,6 +1183,18 @@ uninstall-man: uninstall-man3
        uninstall-pkgextensionLTLIBRARIES
 
 
+# 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.
+check-recursive all-recursive: check-for-shared-lib-support
+
+check-for-shared-lib-support:
+       @if ../gawk$(EXEEXT) --version | sed 1q | grep API > /dev/null; \
+       then    : do nothing ; \
+       else    echo Building the extensions is not supported on this platform 
; \
+               exit 1; \
+       fi
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:

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


hooks/post-receive
-- 
gawk



reply via email to

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