summaryrefslogtreecommitdiff
path: root/src/visibility.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2017-11-28 12:34:12 +0100
committerWerner Koch <wk@gnupg.org>2017-11-28 13:10:30 +0100
commitb67daca506991507cea9d383df7faf95117e58a6 (patch)
tree651968189278b3b7143e54d6bf6813c1bfece78e /src/visibility.h
parent97b0881216af24f2a46c11650e23691cff9cb12a (diff)
downloadlibgpg-error-b67daca506991507cea9d383df7faf95117e58a6.tar.gz
core: New API functions gpgrt_getenv and gpgrt_setenv.
* src/gpg-error.h.in (gpgrt_getenv, gpgrt_setenv): New. (gpgrt_unsetenv): New macro. * src/gpg-error.vers, src/gpg-error.def.in: Add them. * src/visibility.c (gpgrt_getenv, gpgrt_setenv): New. * src/visibility.h: Add them. * src/sysutils.c: Include string.h and on Windows windows.h. (_gpgrt_getenv): New. (_gpgrt_setenv): New. -- These functions are wrappers to cope with Windows problems. The code is similar to what we have in GnuPG but not identical. Requires better testing. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'src/visibility.h')
-rw-r--r--src/visibility.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/visibility.h b/src/visibility.h
index 416f266..3c2d6be 100644
--- a/src/visibility.h
+++ b/src/visibility.h
@@ -124,6 +124,8 @@ MARK_VISIBLE (gpgrt_calloc)
MARK_VISIBLE (gpgrt_strdup)
MARK_VISIBLE (gpgrt_strconcat)
MARK_VISIBLE (gpgrt_free)
+MARK_VISIBLE (gpgrt_getenv)
+MARK_VISIBLE (gpgrt_setenv)
MARK_VISIBLE (gpgrt_fprintf)
MARK_VISIBLE (gpgrt_fprintf_unlocked)
MARK_VISIBLE (gpgrt_printf)
@@ -268,6 +270,8 @@ MARK_VISIBLE (_gpgrt_log_assert)
#define gpgrt_strdup _gpgrt_USE_UNDERSCORED_FUNCTION
#define gpgrt_strconcat _gpgrt_USE_UNDERSCORED_FUNCTION
#define gpgrt_free _gpgrt_USE_UNDERSCORED_FUNCTION
+#define gpgrt_getenv _gpgrt_USE_UNDERSCORED_FUNCTION
+#define gpgrt_setenv _gpgrt_USE_UNDERSCORED_FUNCTION
#define gpgrt_fprintf _gpgrt_USE_UNDERSCORED_FUNCTION
#define gpgrt_fprintf_unlocked _gpgrt_USE_UNDERSCORED_FUNCTION
#define gpgrt_printf _gpgrt_USE_UNDERSCORED_FUNCTION