m4-commit
[Top][All Lists]
Advanced

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

[SCM] GNU M4 source repository branch, master, updated. cvs-readonly-214


From: Eric Blake
Subject: [SCM] GNU M4 source repository branch, master, updated. cvs-readonly-214-g993cc5e
Date: Sun, 22 Mar 2009 00:01:01 +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 "GNU M4 source repository".

http://git.sv.gnu.org/gitweb/?p=m4.git;a=commitdiff;h=993cc5e94d2546ae7bfcb99cf749edb61a13efaf

The branch, master has been updated
       via  993cc5e94d2546ae7bfcb99cf749edb61a13efaf (commit)
      from  44a3615b7b82cbe0fd1c4743ff4d593f00796261 (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 -----------------------------------------------------------------
commit 993cc5e94d2546ae7bfcb99cf749edb61a13efaf
Author: Eric Blake <address@hidden>
Date:   Thu Mar 19 13:51:31 2009 -0600

    Use memcmp2 to simplify lexicographic comparisons.
    
    * m4/gnulib-cache.m4: Import memcmp2.
    * src/builtin.c (dumpdef_cmp): Use it.
    
    Signed-off-by: Eric Blake <address@hidden>
    (cherry picked from commit d7f708504fc66d0bcd35b60c1a5143c39197c8eb)

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

Summary of changes:
 ChangeLog               |    6 ++++++
 ltdl/m4/gnulib-cache.m4 |    3 ++-
 modules/m4.c            |    6 ++----
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 43819ac..f25fbe9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-03-21  Eric Blake  <address@hidden>
+
+       Use memcmp2 to simplify lexicographic comparisons.
+       * ltdl/m4/gnulib-cache.m4: Import memcmp2.
+       * modules/m4.c (dumpdef_cmp_CB): Use it.
+
 2009-03-19  Ralf Wildenhues  <address@hidden>
 
        Fix m4.1 build race, exposed by parallelism through GNUmakefile.
diff --git a/ltdl/m4/gnulib-cache.m4 b/ltdl/m4/gnulib-cache.m4
index 9e664da..45af306 100644
--- a/ltdl/m4/gnulib-cache.m4
+++ b/ltdl/m4/gnulib-cache.m4
@@ -15,7 +15,7 @@
 
 
 # Specification in the form of a command-line invocation:
-#   gnulib-tool --import --dir=. --local-dir=local --lib=libgnu 
--source-base=gnu --m4-base=ltdl/m4 --doc-base=doc --tests-base=tests/gnu 
--aux-dir=build-aux --with-tests --libtool --macro-prefix=M4 assert autobuild 
avltree-oset binary-io clean-temp cloexec close-stream closein config-h 
configmake dirname error execute exit fdl-1.3 fflush filenamecat flexmember 
fopen fopen-safer freadptr freadseek fseeko gendocs gettext git-version-gen 
gnumakefile gnupload gpl-3.0 intprops memchr2 memmem mkstemp obstack 
obstack-printf-posix pipe progname propername quote regex regexprops-generic 
sprintf-posix stdbool stdlib-safer strnlen strtod strtol tempname unlocked-io 
vasnprintf-posix verify verror wait-process xalloc xalloc-die xmemdup0 
xprintf-posix xstrndup xvasprintf-posix
+#   gnulib-tool --import --dir=. --local-dir=local --lib=libgnu 
--source-base=gnu --m4-base=ltdl/m4 --doc-base=doc --tests-base=tests/gnu 
--aux-dir=build-aux --with-tests --libtool --macro-prefix=M4 assert autobuild 
avltree-oset binary-io clean-temp cloexec close-stream closein config-h 
configmake dirname error execute exit fdl-1.3 fflush filenamecat flexmember 
fopen fopen-safer freadptr freadseek fseeko gendocs gettext git-version-gen 
gnumakefile gnupload gpl-3.0 intprops memchr2 memcmp2 memmem mkstemp obstack 
obstack-printf-posix pipe progname propername quote regex regexprops-generic 
sprintf-posix stdbool stdlib-safer strnlen strtod strtol tempname unlocked-io 
vasnprintf-posix verify verror wait-process xalloc xalloc-die xmemdup0 
xprintf-posix xstrndup xvasprintf-posix
 
 # Specification in the form of a few gnulib-tool.m4 macro invocations:
 gl_LOCAL_DIR([local])
@@ -51,6 +51,7 @@ gl_MODULES([
   gpl-3.0
   intprops
   memchr2
+  memcmp2
   memmem
   mkstemp
   obstack
diff --git a/modules/m4.c b/modules/m4.c
index 394abf3..f3cfc94 100644
--- a/modules/m4.c
+++ b/modules/m4.c
@@ -30,6 +30,7 @@
 
 #include "execute.h"
 #include "memchr2.h"
+#include "memcmp2.h"
 #include "quotearg.h"
 #include "stdlib--.h"
 #include "tempname.h"
@@ -256,10 +257,7 @@ dumpdef_cmp_CB (const void *s1, const void *s2)
 {
   const m4_string *a = (const m4_string *) s1;
   const m4_string *b = (const m4_string *) s2;
-  int result = memcmp (a->str, b->str, a->len < b->len ? a->len : b->len);
-  if (!result)
-    result = a->len < b->len ? -1 : b->len < a->len;
-  return result;
+  return memcmp2 (a->str, a->len, b->str, b->len);
 }
 
 /* The function m4_dump_symbols () is for use by "dumpdef".  It builds up a


hooks/post-receive
--
GNU M4 source repository




reply via email to

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