gawk-diffs
[Top][All Lists]
Advanced

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

[gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-3642-gb878ec


From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-3642-gb878ecd
Date: Mon, 4 Feb 2019 14:13:16 -0500 (EST)

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, master has been updated
       via  b878ecd5d8ff1587adb72187187a40945c87b233 (commit)
      from  fb0b9cacebb6dcbbd09bdc491156bf4bd0d2022e (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=b878ecd5d8ff1587adb72187187a40945c87b233

commit b878ecd5d8ff1587adb72187187a40945c87b233
Author: Arnold D. Robbins <address@hidden>
Date:   Mon Feb 4 21:12:51 2019 +0200

    Updates for DJGPP.

diff --git a/ChangeLog b/ChangeLog
index 1a2ffa1..94cdc0c 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
 
        * NEWS.1: Rotated in from NEWS.
        * NEWS: Shortened to start over again with 5.0 changes.
+       * ext.c (is_valid_identifier): Move outside of ifdefs so that
+       DJGPP (and other code) can find it.
 
 2019-02-03         Arnold D. Robbins     <address@hidden>
 
diff --git a/ext.c b/ext.c
index 8babd2c..c0ecd6b 100644
--- a/ext.c
+++ b/ext.c
@@ -77,25 +77,6 @@ load_ext(const char *lib_name)
                                lib_name, INIT_FUNC);
 }
 
-/* is_valid_identifier --- return true if name is a valid simple identifier */
-
-bool
-is_valid_identifier(const char *name)
-{
-       const char *sp = name;
-       int c;
-
-       if (! is_letter(*sp))
-               return false;
-
-       for (sp++; (c = *sp++) != '\0';) {
-               if (! is_identchar(c))
-                       return false;
-       }
-
-       return true;
-}
-
 /* make_builtin --- register name to be called as func with a builtin body */
 
 awk_bool_t
@@ -266,3 +247,22 @@ close_extensions()
                if (s->stype == SRC_EXTLIB && s->fini_func)
                                (*s->fini_func)();
 }
+
+/* is_valid_identifier --- return true if name is a valid simple identifier */
+
+bool
+is_valid_identifier(const char *name)
+{
+       const char *sp = name;
+       int c;
+
+       if (! is_letter(*sp))
+               return false;
+
+       for (sp++; (c = *sp++) != '\0';) {
+               if (! is_identchar(c))
+                       return false;
+       }
+
+       return true;
+}
diff --git a/pc/ChangeLog b/pc/ChangeLog
index 18bbbf1..10f0101 100644
--- a/pc/ChangeLog
+++ b/pc/ChangeLog
@@ -1,3 +1,11 @@
+2010-02-03  Juan Manuel Guerrero  <address@hidden>
+
+       * config.sed (_GNU_SOURCE) [__DJGPP__]: Define for DJGPP.
+       (HAVE_LANGINFO_CODESET) [__DJGPP__]: Define for DJGPP.
+       [__DJGPP__]: Prototype of is_valid_identifier.
+
+       * gawkmisc.pc (nl_langinfo) [__DJGPP__]: New function.
+
 2019-02-02  Eli Zaretskii  <address@hidden>
 
        * gawkmisc.pc (w32_execvp) [__MINGW32__]: Renamed from execvp, to
diff --git a/pc/config.sed b/pc/config.sed
index 840feab..45f0287 100644
--- a/pc/config.sed
+++ b/pc/config.sed
@@ -83,7 +83,7 @@ s/^#undef HAVE_FMOD *$/#define HAVE_FMOD 1/
 #define HAVE_ISWUPPER 1\
 #endif
 /^#undef HAVE_LANGINFO_CODESET *$/c\
-#ifdef __MINGW32__\
+#if defined(__DJGPP__) || defined(__MINGW32__)\
 #define HAVE_LANGINFO_CODESET 1\
 #endif
 s/^#undef HAVE_LIBM *$/#define HAVE_LIBM 1/
@@ -301,7 +301,7 @@ s/^#undef TIME_WITH_SYS_TIME *$/#define TIME_WITH_SYS_TIME 
1/
 
 /^\/\* Enable extensions on AIX 3, Interix.  \*\//i\
 /* This is required to compile Gnulib regex code.  */\
-#ifdef __MINGW32__\
+#if defined(__DJGPP__) || defined(__MINGW32__)\
 #define _GNU_SOURCE 1\
 #endif
 
@@ -318,6 +318,10 @@ $a\
 # else\
 #  define DEFPATH  ".;c:/lib/awk;c:/gnu/lib/awk"\
 # endif\
+\
+/* Function prototype.  */\
+#include <stdbool.h>\
+extern bool is_valid_identifier(const char *name);\
 #endif\
 \
 #ifndef __DJGPP__\
diff --git a/pc/gawkmisc.pc b/pc/gawkmisc.pc
index 2e58101..e0f3f3f 100644
--- a/pc/gawkmisc.pc
+++ b/pc/gawkmisc.pc
@@ -1108,6 +1108,21 @@ init_sockets(void)
 
 #ifdef __DJGPP__
 
+/* Replacement for the missing nl_langinfo.  DJGPP provides only C locale.  */
+#include <langinfo.h>
+
+char *
+nl_langinfo (int item)
+{
+  switch (item)
+    {
+      case CODESET:
+      default:
+        return (char *) "";
+    }
+}
+
+
 # if __DJGPP__ == 2 && __DJGPP_MINOR__ < 4 
 int
 unsetenv (const char *name)

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

Summary of changes:
 ChangeLog      |  2 ++
 ext.c          | 38 +++++++++++++++++++-------------------
 pc/ChangeLog   |  8 ++++++++
 pc/config.sed  |  8 ++++++--
 pc/gawkmisc.pc | 15 +++++++++++++++
 5 files changed, 50 insertions(+), 21 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

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