diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2007-05-09 14:37:44 +0000 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2007-05-09 14:37:44 +0000 |
commit | c72478ce90d83e355ad7782991d20cbbd2664fd3 (patch) | |
tree | da172589b72c9d2c5b1d2311d50b7a60d55585b5 /src/rcctranslate.c | |
parent | 8ca43646a6c87d00d5b2cb74cebf65a8d0ea5e8e (diff) | |
download | librcc-c72478ce90d83e355ad7782991d20cbbd2664fd3.tar.gz librcc-c72478ce90d83e355ad7782991d20cbbd2664fd3.tar.bz2 librcc-c72478ce90d83e355ad7782991d20cbbd2664fd3.tar.xz librcc-c72478ce90d83e355ad7782991d20cbbd2664fd3.zip |
FreeBSD fixes
- Autoconf: try to locate libraries in /usr/local
- Autoconf: Help FreeBSD to locate BerkeleyDB
- Autoconf: Search for dlopen in libc library
- Autoconf: Support of --disable-bdb option is added to configure script
- Fixed compilation with missing dlopen functionality
- Suppress various warnings
Diffstat (limited to 'src/rcctranslate.c')
-rw-r--r-- | src/rcctranslate.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/rcctranslate.c b/src/rcctranslate.c index 98c0f1b..7c79d8b 100644 --- a/src/rcctranslate.c +++ b/src/rcctranslate.c @@ -87,16 +87,17 @@ int rccTranslateAllowOfflineMode(rcc_translate translate) { return rccExternalAllowOfflineMode(); } -#define RCC_UNLOCK_W 1 -#define RCC_UNLOCK_R 2 -#define RCC_UNLOCK_RW 3 -#define RCC_UNLOCK_WR 3 +#ifdef HAVE_LIBTRANSLATE +# define RCC_UNLOCK_W 1 +# define RCC_UNLOCK_R 2 +# define RCC_UNLOCK_RW 3 +# define RCC_UNLOCK_WR 3 static char *rccTranslateReturn(rcc_translate translate, char *ret, int unlock) { if (unlock&RCC_UNLOCK_R) rccMutexUnLock(translate->mutex); if (unlock&RCC_UNLOCK_W) rccMutexUnLock(translate->wmutex); return ret; } -#define rccTranslateReturnNULL(translate, unlock) rccTranslateReturn(translate, NULL, unlock) +# define rccTranslateReturnNULL(translate, unlock) rccTranslateReturn(translate, NULL, unlock) static int rccTranslateQueue(rcc_translate translate, const char *buf) { size_t len, err; @@ -109,6 +110,7 @@ static int rccTranslateQueue(rcc_translate translate, const char *buf) { if (!err) err = rccExternalWrite(translate->sock, buf, len + 1, 0); return err?1:0; } +#endif /* HAVE_LIBTRANSLATE */ char *rccTranslate(rcc_translate translate, const char *buf) { #ifdef HAVE_LIBTRANSLATE |