[git] GPG-ERROR - branch, master, updated. libgpg-error-1.13-24-g7fdca61

by Werner Koch cvs at cvs.gnupg.org
Tue Aug 26 18:11:17 CEST 2014


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  7fdca61bcf60e730177889fbbd2f935ba33ae0c3 (commit)
       via  d9d5b61a9f70556e8fc0775f1501380f65ce9502 (commit)
      from  320f1b864553f105217ad6b0c70598f9a48c6aaa (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 7fdca61bcf60e730177889fbbd2f935ba33ae0c3
Author: Werner Koch <wk at gnupg.org>
Date:   Tue Aug 26 17:56:44 2014 +0200

    Add gpgrt_set_alloc_func.
    
    * src/visibility.c (gpgrt_set_alloc_func): New.
    * configure.ac (_ESTREAM_PRINTF_REALLOC): Define.
    (_ESTREAM_PRINTF_EXTRA_INCLUDE): Define.
    * src/estream.c (mem_alloc, mem_realloc, mem_free): Simplify.
    (_gpgrt_free): Remove.
    * src/init.c (custom_realloc): New var.
    (_gpgrt_set_alloc_func): New.
    (_gpgrt_realloc, _gpgrt_malloc, _gpgrt_free): New.
    
    * src/visibility.h (gpg_err_deinit): Mark as visible.

diff --git a/NEWS b/NEWS
index 35532e5..6099d5b 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,7 @@ Noteworthy changes in version 1.14 (unreleased)
  gpgrt_check_version          NEW.
  gpgrt_lock_trylock           NEW.
  gpgrt_set_syscall_clamp      NEW.
+ gpgrt_set_alloc_func         NEW.
  gpgrt_stream_t               NEW.
  gpgrt_cookie_io_functions_t  NEW.
  gpgrt_syshd_t                NEW.
diff --git a/configure.ac b/configure.ac
index cf0d37c..b155437 100644
--- a/configure.ac
+++ b/configure.ac
@@ -136,6 +136,11 @@ AH_BOTTOM([
 #if defined(HAVE_W32_SYSTEM) && !defined(ENABLE_NLS)
 #define ENABLE_NLS 1
 #endif
+
+/* Connect the generic estream-printf.c to our framework.  */
+#define _ESTREAM_PRINTF_REALLOC _gpgrt_realloc
+#define _ESTREAM_PRINTF_EXTRA_INCLUDE "gpgrt-int.h"
+
 /* For building we need to define these macro.  */
 #define GPG_ERR_ENABLE_GETTEXT_MACROS 1
 #define GPG_ERR_ENABLE_ERRNO_MACROS 1
diff --git a/src/estream-printf.c b/src/estream-printf.c
index b1eb828..39a813f 100644
--- a/src/estream-printf.c
+++ b/src/estream-printf.c
@@ -446,7 +446,7 @@ compute_type (argspec_t arg)
    at the address ARGSPECS_ADDR.  The caller has provided enough space
    to store up to MAX_ARGSPECS in that buffer.  The function may
    however ignore the provided buffer and malloc a larger one.  On
-   success the addrrss of that larger buffer will be stored at
+   success the address of that larger buffer will be stored at
    ARGSPECS_ADDR.  The actual number of specifications will be
    returned at R_ARGSPECS_COUNT. */
 static int
diff --git a/src/estream.c b/src/estream.c
index cf3067b..7a5646e 100644
--- a/src/estream.c
+++ b/src/estream.c
@@ -242,28 +242,23 @@ static void fname_set_internal (estream_t stream, const char *fname, int quote);
 
 
 

-/* Malloc wrappers to overcome problems on some older OSes.  */
 static void *
 mem_alloc (size_t n)
 {
-  if (!n)
-    n++;
-  return malloc (n);
+  return _gpgrt_malloc (n);
 }
 
 static void *
 mem_realloc (void *p, size_t n)
 {
-  if (!p)
-    return mem_alloc (n);
-  return realloc (p, n);
+  return _gpgrt_realloc (p, n);
 }
 
 static void
 mem_free (void *p)
 {
   if (p)
-    free (p);
+    _gpgrt_free (p);
 }
 
 #ifdef HAVE_W32_SYSTEM
@@ -518,7 +513,7 @@ _gpgrt_es_init (void)
    should be used before any I/O happens.  The function is commonly
    used with the nPth library:
 
-     gpgrt_set_syscall_clamp (npth_protect, npth_unprotect);
+     gpgrt_set_syscall_clamp (npth_unprotect, npth_protect);
 
    These functions may not modify ERRNO.
 */
@@ -3210,7 +3205,7 @@ _gpgrt_fclose (estream_t stream)
    the buffer.  On error NULL is stored at R_BUFFER.  Note that if no
    write operation has happened, NULL may also be stored at BUFFER on
    success.  The caller needs to release the returned memory using
-   es_free.  */
+   gpgrt_free.  */
 int
 _gpgrt_fclose_snatch (estream_t stream, void **r_buffer, size_t *r_buflen)
 {
@@ -3835,7 +3830,7 @@ _gpgrt_getline (char *_GPGRT__RESTRICT *_GPGRT__RESTRICT lineptr,
 
    Note: The returned buffer is allocated with enough extra space to
    allow the caller to append a CR,LF,Nul.  The buffer should be
-   released using es_free.
+   released using gpgrt_free.
  */
 ssize_t
 _gpgrt_read_line (estream_t stream,
@@ -3922,14 +3917,16 @@ _gpgrt_read_line (estream_t stream,
   return nbytes;
 }
 
-/* Wrapper around free() to match the memory allocation system used
-   by estream.  Should be used for all buffers returned to the caller
-   by libestream. */
-void
-_gpgrt_free (void *a)
-{
-  mem_free (a);
-}
+/* Wrapper around free() to match the memory allocation system used by
+   estream.  Should be used for all buffers returned to the caller by
+   libestream.  If a custom allocation handler has been set with
+   gpgrt_set_alloc_func that register function may be used
+   instead.  This function has been moved to init.c.  */
+/* void */
+/* _gpgrt_free (void *a) */
+/* { */
+/*   mem_free (a); */
+/* } */
 
 
 int
diff --git a/src/gpg-error.def.in b/src/gpg-error.def.in
index b318d61..ac20a69 100644
--- a/src/gpg-error.def.in
+++ b/src/gpg-error.def.in
@@ -135,6 +135,6 @@ EXPORTS
  gpgrt_check_version          @100
  gpg_err_init                 @101
  gpg_err_deinit               @102
-
+ gpgrt_set_alloc_func         @103
 
 ;; end of file with public symbols for Windows.
diff --git a/src/gpg-error.h.in b/src/gpg-error.h.in
index 8c008ac..4b1c0a0 100644
--- a/src/gpg-error.h.in
+++ b/src/gpg-error.h.in
@@ -181,13 +181,17 @@ gpg_error_t gpg_err_init (void) _GPG_ERR_CONSTRUCTOR;
 # define gpgrt_init() do { ; } while (0)
 #endif
 
-/* Register blocking system I/O clamping functions.  */
-void gpgrt_set_syscall_clamp (void (*pre)(void), void (*post)(void));
-
 /* See the source on how to use the deinit function; it is usually not
    required.  */
 void gpg_err_deinit (int mode);
 
+/* Register blocking system I/O clamping functions.  */
+void gpgrt_set_syscall_clamp (void (*pre)(void), void (*post)(void));
+
+/* Register a custom malloc/realloc/free function.  */
+void gpgrt_set_alloc_func  (void *(*f)(void *a, size_t n));
+
+
 

 /* Constructor and accessor functions.  */
 
diff --git a/src/gpg-error.vers b/src/gpg-error.vers
index 0847cfe..43becea 100644
--- a/src/gpg-error.vers
+++ b/src/gpg-error.vers
@@ -118,6 +118,7 @@ GPG_ERROR_1.0 {
     gpgrt_check_version;
     gpg_err_init;
     gpg_err_deinit;
+    gpgrt_set_alloc_func;
 
   local:
     *;
diff --git a/src/gpgrt-int.h b/src/gpgrt-int.h
index a029ac0..df7c606 100644
--- a/src/gpgrt-int.h
+++ b/src/gpgrt-int.h
@@ -34,6 +34,12 @@ void _gpg_err_set_errno (int err);
 
 gpg_error_t _gpg_err_init (void);
 void _gpg_err_deinit (int mode);
+void _gpgrt_set_alloc_func (void *(*f)(void *a, size_t n));
+
+void *_gpgrt_realloc (void *a, size_t n);
+void *_gpgrt_malloc (size_t n);
+void _gpgrt_free (void *a);
+
 const char *_gpg_error_check_version (const char *req_version);
 
 gpg_err_code_t _gpgrt_lock_init (gpgrt_lock_t *lockhd);
@@ -162,7 +168,6 @@ ssize_t _gpgrt_getline (char *_GPGRT__RESTRICT *_GPGRT__RESTRICT lineptr,
 ssize_t _gpgrt_read_line (gpgrt_stream_t stream,
                           char **addr_of_buffer, size_t *length_of_buffer,
                           size_t *max_length);
-void _gpgrt_free (void *a);
 
 int _gpgrt_fprintf (gpgrt_stream_t _GPGRT__RESTRICT stream,
                     const char *_GPGRT__RESTRICT format, ...)
diff --git a/src/init.c b/src/init.c
index 16cdfed..6305fe3 100644
--- a/src/init.c
+++ b/src/init.c
@@ -60,6 +60,11 @@ static void drop_locale_dir (char *locale_dir);
 
 #endif /*!HAVE_W32_SYSTEM*/
 
+
+/* The realloc function as set by gpgrt_set_alloc_func.  */
+static void *(*custom_realloc)(void *a, size_t n);
+
+
 

 static void
 real_init (void)
@@ -146,6 +151,58 @@ _gpg_err_deinit (int mode)
 }
 
 
+
+
+/* Register F as allocation function.  This function is used for all
+   APIs which return an allocated buffer.  F needs to have standard
+   realloc semantics.  It should be called as early as possible and
+   not changed later. */
+void
+_gpgrt_set_alloc_func (void *(*f)(void *a, size_t n))
+{
+  custom_realloc = f;
+}
+
+
+/* The realloc to be used for data returned by the public API.  */
+void *
+_gpgrt_realloc (void *a, size_t n)
+{
+  if (custom_realloc)
+    return custom_realloc (a, n);
+
+  if (!a)
+    return malloc (n);
+
+  if (!n)
+    {
+      free (a);
+      return NULL;
+    }
+
+  return realloc (a, n);
+}
+
+
+/* The malloc to be used for data returned by the public API.  */
+void *
+_gpgrt_malloc (size_t n)
+{
+  if (!n)
+    n++;
+  return _gpgrt_realloc (NULL, n);
+}
+
+
+/* The free to be used for data returned by the public API.  */
+void
+_gpgrt_free (void *a)
+{
+  _gpgrt_realloc (a, 0);
+}
+
+
+
 

 #ifdef HAVE_W32_SYSTEM
 
diff --git a/src/visibility.c b/src/visibility.c
index 829c720..f1bbca6 100644
--- a/src/visibility.c
+++ b/src/visibility.c
@@ -96,6 +96,12 @@ gpgrt_set_syscall_clamp (void (*pre)(void), void (*post)(void))
   _gpgrt_set_syscall_clamp (pre, post);
 }
 
+void
+gpgrt_set_alloc_func (void *(*f)(void *a, size_t n))
+{
+  _gpgrt_set_alloc_func (f);
+}
+
 

 gpg_err_code_t
 gpgrt_lock_init (gpgrt_lock_t *lockhd)
diff --git a/src/visibility.h b/src/visibility.h
index d0ef0bf..feeb8d1 100644
--- a/src/visibility.h
+++ b/src/visibility.h
@@ -52,6 +52,7 @@ MARK_VISIBLE (gpg_err_code_from_syserror)
 MARK_VISIBLE (gpg_err_set_errno)
 
 MARK_VISIBLE (gpg_err_init)
+MARK_VISIBLE (gpg_err_deinit)
 MARK_VISIBLE (gpg_error_check_version)
 MARK_VISIBLE (gpgrt_check_version)
 
@@ -136,6 +137,7 @@ MARK_VISIBLE (gpgrt_vbsprintf)
 MARK_VISIBLE (gpgrt_snprintf)
 MARK_VISIBLE (gpgrt_vsnprintf)
 MARK_VISIBLE (gpgrt_set_syscall_clamp)
+MARK_VISIBLE (gpgrt_set_alloc_func)
 
 #undef MARK_VISIBLE
 
@@ -153,9 +155,9 @@ MARK_VISIBLE (gpgrt_set_syscall_clamp)
 #define gpg_err_set_errno           _gpgrt_USE_UNDERSCORED_FUNCTION
 
 #define gpg_err_init                _gpgrt_USE_UNDERSCORED_FUNCTION
+#define gpg_err_deinit              _gpgrt_USE_UNDERSCORED_FUNCTION
 #define gpg_error_check_version     _gpgrt_USE_UNDERSCORED_FUNCTION
 #define gpgrt_check_version         _gpgrt_USE_OTHER_FUNCTION
-#define gpgrt_set_syscall_clamp     _gpgrt_USE_UNDERSCORED_FUNCTION
 
 #define gpgrt_lock_init             _gpgrt_USE_UNDERSCORED_FUNCTION
 #define gpgrt_lock_lock             _gpgrt_USE_UNDERSCORED_FUNCTION
@@ -238,6 +240,10 @@ MARK_VISIBLE (gpgrt_set_syscall_clamp)
 #define gpgrt_snprintf              _gpgrt_USE_UNDERSCORED_FUNCTION
 #define gpgrt_vsnprintf             _gpgrt_USE_UNDERSCORED_FUNCTION
 
+#define gpgrt_set_syscall_clamp     _gpgrt_USE_UNDERSCORED_FUNCTION
+#define gpgrt_set_alloc_func        _gpgrt_USE_UNDERSCORED_FUNCTION
+
+
 #endif /*!_GPGRT_INCL_BY_VISIBILITY_C*/
 
 #endif /*_GPGRT_VISIBILITY_H*/

commit d9d5b61a9f70556e8fc0775f1501380f65ce9502
Author: Werner Koch <wk at gnupg.org>
Date:   Tue Aug 26 13:30:55 2014 +0200

    Export missing init functions.
    
    * src/gpg-error.h.in (gpgrt_init): New macro.
    (gpgrt_check_version): New prototype.
    * src/init.c (_gpg_err_init): Rename from gpg_err_init.
    (_gpg_err_deinit): Rename from gpg_err_deinit.
    * src/visibility.c (gpg_err_init): New.
    (gpg_err_deinit): New.
    (gpgrt_check_version): New.
    * src/gpg-error.vers (gpg_err_init, gpg_err_deinit): Add missing
    symbols.
    (gpgrt_check_version): New.
    * src/gpg-error.def.in (gpg_err_init, gpg_err_deinit): Add missing
    symbols.
    (gpgrt_check_version): New.
    * src/gpg-error.c (main): Use gpgrt_init macro.

diff --git a/NEWS b/NEWS
index a6043a2..35532e5 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,8 @@ Noteworthy changes in version 1.14 (unreleased)
  * Interface changes relative to the 1.13 release:
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  GPG_ERR_KEY_DISABLED         NEW.
+ gpgrt_init                   NEW macro.
+ gpgrt_check_version          NEW.
  gpgrt_lock_trylock           NEW.
  gpgrt_set_syscall_clamp      NEW.
  gpgrt_stream_t               NEW.
diff --git a/src/gpg-error.c b/src/gpg-error.c
index fa868ae..3de8478 100644
--- a/src/gpg-error.c
+++ b/src/gpg-error.c
@@ -7,12 +7,12 @@
    modify it under the terms of the GNU Lesser General Public License
    as published by the Free Software Foundation; either version 2.1 of
    the License, or (at your option) any later version.
- 
+
    libgpg-error is distributed in the hope that it will be useful, but
    WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.
- 
+
    You should have received a copy of the GNU Lesser General Public
    License along with libgpg-error; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
@@ -30,7 +30,7 @@
 #include <stdio.h>
 
 #ifdef HAVE_LOCALE_H
-# include <locale.h>	
+# include <locale.h>
 #endif
 #ifdef ENABLE_NLS
 #ifdef HAVE_W32_SYSTEM
@@ -66,7 +66,7 @@ i18n_init (void)
 {
 #ifdef ENABLE_NLS
   char *locale_dir;
-  
+
 #ifdef HAVE_LC_MESSAGES
   setlocale (LC_TIME, "");
   setlocale (LC_MESSAGES, "");
@@ -75,7 +75,7 @@ i18n_init (void)
   setlocale (LC_ALL, "" );
 # endif
 #endif
-  
+
   /* Note that for this program we would only need the textdomain call
      because libgpg-error already initializes itself to its locale dir
      (via gpg_err_init or a constructor).  However this is only done
@@ -115,7 +115,7 @@ get_locale_dir (void)
       nbytes = WideCharToMultiByte (CP_UTF8, 0, moddir, -1, NULL, 0, NULL, NULL);
       if (nbytes < 0)
         return NULL;
-      
+
       result = malloc (nbytes + strlen (SLDIR) + 1);
       if (result)
         {
@@ -149,8 +149,8 @@ get_locale_dir (void)
           strcpy (result, "c:\\gnupg");
           strcat (result, SLDIR);
         }
-    }  
-#undef SLDIR  
+    }
+#undef SLDIR
   return result;
 }
 
@@ -314,7 +314,7 @@ get_err_from_str_one (char *str, gpg_error_t *err,
 	{
 	  if (*have_code)
 	    return 0;
-	  
+
 	  *have_code = 1;
 	  *err |= code;
 	  return 1;
@@ -380,16 +380,12 @@ main (int argc, char *argv[])
   const char *error_sym;
   gpg_error_t err;
 
-#ifndef GPG_ERR_INITIALIZED
-  gpg_err_init ();
-#endif
-
+  gpgrt_init ();
   i18n_init ();
 
-
   if (argc == 1)
     {
-      fprintf (stderr, _("Usage: %s GPG-ERROR [...]\n"), 
+      fprintf (stderr, _("Usage: %s GPG-ERROR [...]\n"),
                strrchr (argv[0],'/')? (strrchr (argv[0], '/')+1): argv[0]);
       exit (1);
     }
@@ -438,7 +434,7 @@ main (int argc, char *argv[])
 	{
 	  source_sym = gpg_strsource_sym (err);
 	  error_sym = gpg_strerror_sym (err);
-	  
+
 	  printf ("%u = (%u, %u) = (%s, %s) = (%s, %s)\n",
 		  err, gpg_err_source (err), gpg_err_code (err),
 		  source_sym ? source_sym : "-", error_sym ? error_sym : "-",
diff --git a/src/gpg-error.def.in b/src/gpg-error.def.in
index 2b50962..b318d61 100644
--- a/src/gpg-error.def.in
+++ b/src/gpg-error.def.in
@@ -30,7 +30,7 @@ EXPORTS
  gpg_strsource                @3
  gpg_err_code_from_errno      @4
  gpg_err_code_to_errno        @5
- /* Not anymore used.  */
+ /* @6 - Not anymore used.  */
  gpg_err_code_from_syserror   @7
  gpg_err_set_errno            @8
 #ifdef HAVE_W32CE_SYSTEM
@@ -46,7 +46,7 @@ EXPORTS
    _gpg_w32_gettext_localename @16
    _gpg_w32_gettext_use_utf8   @17
 #endif
- /* Not anymore used. */
+ /* @18 - Not anymore used. */
  gpg_error_check_version      @19
 
  gpgrt_lock_init              @20
@@ -132,5 +132,9 @@ EXPORTS
  gpgrt_snprintf               @98
  gpgrt_vsnprintf              @99
 
+ gpgrt_check_version          @100
+ gpg_err_init                 @101
+ gpg_err_deinit               @102
+
 
 ;; end of file with public symbols for Windows.
diff --git a/src/gpg-error.h.in b/src/gpg-error.h.in
index a0bbf17..8c008ac 100644
--- a/src/gpg-error.h.in
+++ b/src/gpg-error.h.in
@@ -175,7 +175,10 @@ gpg_error_t gpg_err_init (void) _GPG_ERR_CONSTRUCTOR;
    constructor and does not need to be initialized explicitely.  */
 #undef GPG_ERR_INITIALIZED
 #ifdef _GPG_ERR_HAVE_CONSTRUCTOR
-#define GPG_ERR_INITIALIZED	1
+# define GPG_ERR_INITIALIZED	1
+# define gpgrt_init() do { gpg_err_init (); } while (0)
+#else
+# define gpgrt_init() do { ; } while (0)
 #endif
 
 /* Register blocking system I/O clamping functions.  */
@@ -272,7 +275,8 @@ gpg_err_code_t gpg_err_code_from_syserror (void);
    ERRNO due to peculiarities on WindowsCE.  */
 void gpg_err_set_errno (int err);
 
-/* Return or check the version.  */
+/* Return or check the version.  Both functions are identical.  */
+const char *gpgrt_check_version (const char *req_version);
 const char *gpg_error_check_version (const char *req_version);
 
 /* The version string of this header. */
diff --git a/src/gpg-error.vers b/src/gpg-error.vers
index d07372e..0847cfe 100644
--- a/src/gpg-error.vers
+++ b/src/gpg-error.vers
@@ -115,6 +115,10 @@ GPG_ERROR_1.0 {
     gpgrt_snprintf;
     gpgrt_vsnprintf;
 
+    gpgrt_check_version;
+    gpg_err_init;
+    gpg_err_deinit;
+
   local:
     *;
 };
diff --git a/src/gpgrt-int.h b/src/gpgrt-int.h
index 025d781..a029ac0 100644
--- a/src/gpgrt-int.h
+++ b/src/gpgrt-int.h
@@ -32,6 +32,8 @@ int _gpg_err_code_to_errno (gpg_err_code_t code);
 gpg_err_code_t _gpg_err_code_from_syserror (void);
 void _gpg_err_set_errno (int err);
 
+gpg_error_t _gpg_err_init (void);
+void _gpg_err_deinit (int mode);
 const char *_gpg_error_check_version (const char *req_version);
 
 gpg_err_code_t _gpgrt_lock_init (gpgrt_lock_t *lockhd);
diff --git a/src/init.c b/src/init.c
index c10285c..16cdfed 100644
--- a/src/init.c
+++ b/src/init.c
@@ -80,7 +80,7 @@ real_init (void)
 
 /* Initialize the library.  This function should be run early.  */
 gpg_error_t
-gpg_err_init (void)
+_gpg_err_init (void)
 {
 #ifdef HAVE_W32_SYSTEM
 # ifdef DLL_EXPORT
@@ -123,7 +123,7 @@ gpg_err_init (void)
    this function may be called from the DllMain function of a DLL
    which statically links to libgpg-error.  */
 void
-gpg_err_deinit (int mode)
+_gpg_err_deinit (int mode)
 {
 #if defined (HAVE_W32_SYSTEM) && !defined(DLL_EXPORT)
   struct tls_space_s *tls;
diff --git a/src/visibility.c b/src/visibility.c
index 67c5bfd..829c720 100644
--- a/src/visibility.c
+++ b/src/visibility.c
@@ -66,12 +66,29 @@ gpg_err_set_errno (int err)
 }
 
 

+gpg_error_t
+gpg_err_init (void)
+{
+  return _gpg_err_init ();
+}
+
+void
+gpg_err_deinit (int mode)
+{
+  _gpg_err_deinit (mode);
+}
+
 const char *
 gpg_error_check_version (const char *req_version)
 {
   return _gpg_error_check_version (req_version);
 }
 
+const char *
+gpgrt_check_version (const char *req_version)
+{
+  return _gpg_error_check_version (req_version);
+}
 
 void
 gpgrt_set_syscall_clamp (void (*pre)(void), void (*post)(void))
diff --git a/src/visibility.h b/src/visibility.h
index 64a01a0..d0ef0bf 100644
--- a/src/visibility.h
+++ b/src/visibility.h
@@ -51,7 +51,9 @@ MARK_VISIBLE (gpg_err_code_to_errno)
 MARK_VISIBLE (gpg_err_code_from_syserror)
 MARK_VISIBLE (gpg_err_set_errno)
 
+MARK_VISIBLE (gpg_err_init)
 MARK_VISIBLE (gpg_error_check_version)
+MARK_VISIBLE (gpgrt_check_version)
 
 MARK_VISIBLE (gpgrt_lock_init)
 MARK_VISIBLE (gpgrt_lock_lock)
@@ -150,7 +152,9 @@ MARK_VISIBLE (gpgrt_set_syscall_clamp)
 #define gpg_err_code_from_syserror  _gpgrt_USE_UNDERSCORED_FUNCTION
 #define gpg_err_set_errno           _gpgrt_USE_UNDERSCORED_FUNCTION
 
+#define gpg_err_init                _gpgrt_USE_UNDERSCORED_FUNCTION
 #define gpg_error_check_version     _gpgrt_USE_UNDERSCORED_FUNCTION
+#define gpgrt_check_version         _gpgrt_USE_OTHER_FUNCTION
 #define gpgrt_set_syscall_clamp     _gpgrt_USE_UNDERSCORED_FUNCTION
 
 #define gpgrt_lock_init             _gpgrt_USE_UNDERSCORED_FUNCTION

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

Summary of changes:
 NEWS                 |    3 +++
 configure.ac         |    5 +++++
 src/estream-printf.c |    2 +-
 src/estream.c        |   35 +++++++++++++----------------
 src/gpg-error.c      |   28 ++++++++++-------------
 src/gpg-error.def.in |    8 +++++--
 src/gpg-error.h.in   |   18 ++++++++++-----
 src/gpg-error.vers   |    5 +++++
 src/gpgrt-int.h      |    9 +++++++-
 src/init.c           |   61 ++++++++++++++++++++++++++++++++++++++++++++++++--
 src/visibility.c     |   23 +++++++++++++++++++
 src/visibility.h     |   12 +++++++++-
 12 files changed, 162 insertions(+), 47 deletions(-)


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




More information about the Gnupg-commits mailing list