aboutsummaryrefslogtreecommitdiffstats
path: root/src/visibility.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2014-08-22 17:08:08 +0000
committerWerner Koch <[email protected]>2014-08-25 14:37:46 +0000
commit216e7def2118a1774fa7ebeb45b8635b9fe6ba42 (patch)
treebcccb2ca1de195b79554f8d5fce6a77540829771 /src/visibility.c
parentFirst set of changes to include estream into the API. (diff)
downloadlibgpg-error-216e7def2118a1774fa7ebeb45b8635b9fe6ba42.tar.gz
libgpg-error-216e7def2118a1774fa7ebeb45b8635b9fe6ba42.zip
Implement symbol visibility.
* configure.ac: New option --enable-ld-version-script. (GPGRT_USE_VISIBILITY): New ac_define. (HAVE_LD_VERSION_SCRIPT): New am_conditional. * src/gpg-error.vers: New. * src/gpgrt-int.h: New. * src/visibility.c, src/visibility.h: New. Lot of changes to symbold names. -- This is only doe for the old API. The estream API needs to be added.
Diffstat (limited to 'src/visibility.c')
-rw-r--r--src/visibility.c104
1 files changed, 104 insertions, 0 deletions
diff --git a/src/visibility.c b/src/visibility.c
new file mode 100644
index 0000000..f7832ae
--- /dev/null
+++ b/src/visibility.c
@@ -0,0 +1,104 @@
+/* visibility.c - Wrapper for all public functions.
+ * Copyright (C) 2014 g10 Code GmbH
+ *
+ * This file is part of libgpg-error.
+ *
+ * libgpg-error is free software; you can redistribute it and/or
+ * 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 this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <config.h>
+#include <stdarg.h>
+
+#define _GPGRT_INCL_BY_VISIBILITY_C 1
+#include "gpgrt-int.h"
+
+const char *
+gpg_strerror (gpg_error_t err)
+{
+ return _gpg_strerror (err);
+}
+
+int
+gpg_strerror_r (gpg_error_t err, char *buf, size_t buflen)
+{
+ return _gpg_strerror_r (err, buf, buflen);
+}
+
+const char *
+gpg_strsource (gpg_error_t err)
+{
+ return _gpg_strsource (err);
+}
+
+gpg_err_code_t
+gpg_err_code_from_errno (int err)
+{
+ return _gpg_err_code_from_errno (err);
+}
+
+int
+gpg_err_code_to_errno (gpg_err_code_t code)
+{
+ return _gpg_err_code_to_errno (code);
+}
+
+gpg_err_code_t
+gpg_err_code_from_syserror (void)
+{
+ return _gpg_err_code_from_syserror ();
+}
+
+void
+gpg_err_set_errno (int err)
+{
+ _gpg_err_set_errno (err);
+}
+
+
+const char *
+gpg_error_check_version (const char *req_version)
+{
+ return _gpg_error_check_version (req_version);
+}
+
+
+gpg_err_code_t
+gpgrt_lock_init (gpgrt_lock_t *lockhd)
+{
+ return _gpgrt_lock_init (lockhd);
+}
+
+gpg_err_code_t
+gpgrt_lock_lock (gpgrt_lock_t *lockhd)
+{
+ return _gpgrt_lock_lock (lockhd);
+}
+
+gpg_err_code_t
+gpgrt_lock_unlock (gpgrt_lock_t *lockhd)
+{
+ return _gpgrt_lock_unlock (lockhd);
+}
+
+gpg_err_code_t
+gpgrt_lock_destroy (gpgrt_lock_t *lockhd)
+{
+ return _gpgrt_lock_destroy (lockhd);
+}
+
+gpg_err_code_t
+gpgrt_yield (void)
+{
+ return _gpgrt_yield ();
+}