[git] GPG-ERROR - branch, master, updated. gpgrt-1.33-5-g12349de

by Werner Koch cvs at cvs.gnupg.org
Wed Dec 12 09:15:14 CET 2018


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 "Error codes used by GnuPG et al.".

The branch, master has been updated
       via  12349de46d241cfbadbdf99773d6cabfcbc97578 (commit)
      from  27ded21fea2a6f1fc161a91744014cce711ad1b3 (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 12349de46d241cfbadbdf99773d6cabfcbc97578
Author: Werner Koch <wk at gnupg.org>
Date:   Wed Dec 12 09:07:04 2018 +0100

    estream: Use correct POSIX name THOUSEP.
    
    * src/estream-printf.c: Replace HAVE_LANGINFO_THOUSANDS_SEP by
    HAVE_LANGINFO_THOUSEP.
    (pr_integer): Use THOUSEP.
    --
    
    GnuPG-bug-id: 4286
    Reported-by: miod
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/m4/estream.m4 b/m4/estream.m4
index 402ef74..548fe08 100644
--- a/m4/estream.m4
+++ b/m4/estream.m4
@@ -24,16 +24,16 @@ AC_DEFUN([estream_PRINTF_INIT],
   AC_CHECK_TYPES([ptrdiff_t])
   AC_CHECK_SIZEOF([unsigned long])
   AC_CHECK_SIZEOF([void *])
-  AC_CACHE_CHECK([for nl_langinfo and THOUSANDS_SEP],
-                  estream_cv_langinfo_thousands_sep,
+  AC_CACHE_CHECK([for nl_langinfo and THOUSEP],
+                  estream_cv_langinfo_thousep,
       [AC_TRY_LINK([#include <langinfo.h>],
-        [char* cs = nl_langinfo(THOUSANDS_SEP); return !cs;],
-        estream_cv_langinfo_thousands_sep=yes,
-        estream_cv_langinfo_thousands_sep=no)
+        [char* cs = nl_langinfo(THOUSEP); return !cs;],
+        estream_cv_langinfo_thousep=yes,
+        estream_cv_langinfo_thousep=no)
       ])
-  if test $estream_cv_langinfo_thousands_sep = yes; then
-    AC_DEFINE(HAVE_LANGINFO_THOUSANDS_SEP, 1,
-      [Define if you have <langinfo.h> and nl_langinfo(THOUSANDS_SEP).])
+  if test $estream_cv_langinfo_thousep = yes; then
+    AC_DEFINE(HAVE_LANGINFO_THOUSEP, 1,
+      [Define if you have <langinfo.h> and nl_langinfo(THOUSEP).])
   fi
 ])
 
diff --git a/src/estream-printf.c b/src/estream-printf.c
index b9775a6..2171409 100644
--- a/src/estream-printf.c
+++ b/src/estream-printf.c
@@ -60,14 +60,14 @@
     AC_CHECK_TYPES([ptrdiff_t])      defines HAVE_PTRDIFF_T
     AC_CHECK_SIZEOF([unsigned long]) defines SIZEOF_UNSIGNED_LONG
     AC_CHECK_SIZEOF([void *])        defines SIZEOF_VOID_P
-                                             HAVE_LANGINFO_THOUSANDS_SEP
+                                             HAVE_LANGINFO_THOUSEP
 
     Note that the file estream.m4 provides the autoconf macro
     ESTREAM_PRINTF_INIT which runs all required checks.
     See estream-printf.h for ways to tune this code.
 
   Missing stuff:  wchar and wint_t
-                  thousands_sep in pr_float.
+                  thousep in pr_float.
 
 */
 
@@ -95,7 +95,7 @@
 #  include <stdint.h>
 # endif
 #endif
-#ifdef HAVE_LANGINFO_THOUSANDS_SEP
+#ifdef HAVE_LANGINFO_THOUSEP
 #include <langinfo.h>
 #endif
 #ifdef HAVE_W32CE_SYSTEM
@@ -936,8 +936,8 @@ pr_integer (estream_printf_out_t outfnc, void *outfncarg,
     {
       int grouping = -1;
       const char * grouping_string =
-#ifdef HAVE_LANGINFO_THOUSANDS_SEP
-        nl_langinfo(THOUSANDS_SEP);
+#ifdef HAVE_LANGINFO_THOUSEP
+        nl_langinfo(THOUSEP);
 #else
         "'";
 #endif
diff --git a/tests/t-printf.c b/tests/t-printf.c
index 1e4d393..c261838 100644
--- a/tests/t-printf.c
+++ b/tests/t-printf.c
@@ -201,6 +201,9 @@ run_tests (void)
   one_test_2 ("%d %% %d", 17, 768114563);
   one_test_2 ("%d %% %d", 17, -768114563);
 
+  /* Checking thousands is not easy because it depends on the locale.  */
+  /* one_test_1 ("%'d", 768114563); */
+
   one_test_1 ("%d", 17);
   one_test_1 ("%4d", 17);
   one_test_1 ("%40d", 17);

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

Summary of changes:
 m4/estream.m4        | 16 ++++++++--------
 src/estream-printf.c | 10 +++++-----
 tests/t-printf.c     |  3 +++
 3 files changed, 16 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
Error codes used by GnuPG et al.
http://git.gnupg.org




More information about the Gnupg-commits mailing list