Merge branch 'STABLE-BRANCH-2-2' into master
authorWerner Koch <wk@gnupg.org>
Thu, 25 Jan 2018 15:48:07 +0000 (16:48 +0100)
committerWerner Koch <wk@gnupg.org>
Thu, 25 Jan 2018 15:58:29 +0000 (16:58 +0100)
Signed-off-by: Werner Koch <wk@gnupg.org>
1  2 
NEWS
common/logging.h
configure.ac
doc/gpg.texi
doc/wks.texi
g10/keygen.c
g10/mainproc.c
kbx/kbxutil.c
scd/app-openpgp.c
sm/gpgsm.c
tools/gpgconf-comp.c

diff --cc NEWS
--- 1/NEWS
--- 2/NEWS
+++ b/NEWS
@@@ -47,7 -51,11 +47,10 @@@ Noteworthy changes in version 2.3.0 (un
    * agent: Improve robustness of the shutdown pending
      state. [Git#7ffedfab89]
  
 -Noteworthy changes in version 2.2.2 (2017-11-07)
 -------------------------------------------------
+   See-also: gnupg-announce/2017q4/000417.html
 +  Changes also found in 2.2.2:
  
    * gpg: Avoid duplicate key imports by concurrently running gpg
      processes. [#3446]
  
    * Add configure option --enable-werror.  [#2423]
  
 -
 -Noteworthy changes in version 2.2.1 (2017-09-19)
 -------------------------------------------------
+   See-also: gnupg-announce/2017q4/000416.html
 +  Changes also found in 2.2.1:
  
    * gpg: Fix formatting of the user id in batch mode key generation
      if only "name-email" is given.
@@@ -145,9 -107,35 +145,36 @@@ void log_flush (void)
     raw dump, with TEXT being an empty string, print a trailing
     linefeed, otherwise print an entire debug line with TEXT followed
     by the hexdump and a final LF.  */
 -void log_printhex (const char *text, const void *buffer, size_t length);
 +void log_printhex (const void *buffer, size_t length, const char *text);
  
 -void log_clock (const char *string);
 +void log_clock (const char *fmt, ...) GPGRT_ATTR_PRINTF(1,2);
  
 +#endif /* Use gnupg internal logging functions.  */
+ /* Some handy assertion macros which don't abort.  */
+ #define return_if_fail(expr) do {                        \
+     if (!(expr)) {                                       \
+         log_debug ("%s:%d: assertion '%s' failed\n",     \
+                    __FILE__, __LINE__, #expr );          \
+         return;                                                \
+     } } while (0)
+ #define return_null_if_fail(expr) do {                   \
+     if (!(expr)) {                                       \
+         log_debug ("%s:%d: assertion '%s' failed\n",     \
+                    __FILE__, __LINE__, #expr );          \
+         return NULL;                                   \
+     } } while (0)
+ #define return_val_if_fail(expr,val) do {                \
+     if (!(expr)) {                                       \
+         log_debug ("%s:%d: assertion '%s' failed\n",     \
+                    __FILE__, __LINE__, #expr );          \
+         return (val);                                  \
+     } } while (0)
+ #define never_reached() do {                             \
+     log_debug ("%s:%d: oops - should never get here\n",  \
+                __FILE__, __LINE__ );                     \
+     } while (0)
  #endif /*GNUPG_COMMON_LOGGING_H*/
diff --cc configure.ac
Simple merge
diff --cc doc/gpg.texi
Simple merge
diff --cc doc/wks.texi
Simple merge
diff --cc g10/keygen.c
Simple merge
diff --cc g10/mainproc.c
Simple merge
diff --cc kbx/kbxutil.c
Simple merge
Simple merge
diff --cc sm/gpgsm.c
Simple merge
Simple merge