diff options
author | Werner Koch <wk@gnupg.org> | 2011-09-30 09:45:21 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2011-09-30 09:45:21 +0200 |
commit | a2d081a20a27b1ae9bf201fc6b1b9bfa36aa7313 (patch) | |
tree | 22b2d7f548c2443af82ef6b1ec28464823956655 /common/dotlock.h | |
parent | Add dotlock_get_fd and dotlock_set_fd. (diff) | |
download | gnupg2-a2d081a20a27b1ae9bf201fc6b1b9bfa36aa7313.tar.xz gnupg2-a2d081a20a27b1ae9bf201fc6b1b9bfa36aa7313.zip |
Add prefix macro for dotlock functions.
Also fixed a type in the GLIB version.
Diffstat (limited to 'common/dotlock.h')
-rw-r--r-- | common/dotlock.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/common/dotlock.h b/common/dotlock.h index 6ae7836c5..905c1592e 100644 --- a/common/dotlock.h +++ b/common/dotlock.h @@ -22,6 +22,31 @@ /* See dotlock.c for a description. */ +#ifdef DOTLOCK_EXT_SYM_PREFIX +# ifndef _DOTLOCK_PREFIX +# define _DOTLOCK_PREFIX1(x,y) x ## y +# define _DOTLOCK_PREFIX2(x,y) _DOTLOCK_PREFIX1(x,y) +# define _DOTLOCK_PREFIX(x) _DOTLOCK_PREFIX2(DOTLOCK_EXT_SYM_PREFIX,x) +# endif /*_DOTLOCK_PREFIX*/ +# define dotlock_disable _DOTLOCK_PREFIX(dotlock_disable) +# define dotlock_create _DOTLOCK_PREFIX(dotlock_create) +# define dotlock_set_fd _DOTLOCK_PREFIX(dotlock_set_fd) +# define dotlock_get_fd _DOTLOCK_PREFIX(dotlock_get_fd) +# define dotlock_destroy _DOTLOCK_PREFIX(dotlock_destroy) +# define dotlock_take _DOTLOCK_PREFIX(dotlock_take) +# define dotlock_release _DOTLOCK_PREFIX(dotlock_release) +# define dotlock_remove_lockfiles _DOTLOCK_PREFIX(dotlock_remove_lockfiles) +#endif /*DOTLOCK_EXT_SYM_PREFIX*/ + +#ifdef __cplusplus +extern "C" +{ +#if 0 +} +#endif +#endif + + struct dotlock_handle; typedef struct dotlock_handle *dotlock_t; @@ -34,4 +59,7 @@ int dotlock_take (dotlock_t h, long timeout); int dotlock_release (dotlock_t h); void dotlock_remove_lockfiles (void); +#ifdef __cplusplus +} +#endif #endif /*LIBJNLIB_DOTLOCK_H*/ |