aboutsummaryrefslogtreecommitdiffstats
path: root/src/assuan-handler.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2006-10-10 10:47:04 +0000
committerWerner Koch <[email protected]>2006-10-10 10:47:04 +0000
commit51eedb216b8191094bb625017bb9f0c357a1d171 (patch)
tree149263e7a4188a3c59110a943b0c7a2a343f462f /src/assuan-handler.c
parentSplitted up into a standad lib and an pth enabled one. (diff)
downloadlibassuan-0.9.3.tar.gz
libassuan-0.9.3.zip
portability fixeslibassuan-0.9.3
Diffstat (limited to 'src/assuan-handler.c')
-rw-r--r--src/assuan-handler.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/assuan-handler.c b/src/assuan-handler.c
index bf00d1a..19dab71 100644
--- a/src/assuan-handler.c
+++ b/src/assuan-handler.c
@@ -506,14 +506,20 @@ process_request (assuan_context_t ctx)
problem if they are not available. We need to make sure
that we are using ELF because only this guarantees that
weak symbol support is available in case GNU ld is not
- used. */
+ used. It seems that old gcc versions don't implement the
+ weak attribute properly but it works with the weak
+ pragma. */
+
unsigned int source, code;
int gpg_strerror_r (unsigned int err, char *buf, size_t buflen)
__attribute__ ((weak));
-
const char *gpg_strsource (unsigned int err)
__attribute__ ((weak));
+#if !defined(HAVE_W32_SYSTEM) && __GNUC__ < 3
+#pragma weak gpg_strerror_r
+#pragma weak gpg_strsource
+#endif
source = ((rc >> 24) & 0xff);
code = (rc & 0x00ffffff);