From 29a7d6229a0c25707d78d3dac2334b2178df4217 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 18 May 1999 20:52:36 +0000 Subject: [PATCH] Wrap externs with parens to protect against inproper macro expansion. --- include/ac/alloca.h | 2 +- include/ac/errno.h | 4 ---- include/ac/setproctitle.h | 2 +- include/ac/socket.h | 3 +++ include/ac/string.h | 2 +- include/ac/unistd.h | 8 ++++---- 6 files changed, 10 insertions(+), 11 deletions(-) diff --git a/include/ac/alloca.h b/include/ac/alloca.h index e8bb452fe2..4c4fa6ae50 100644 --- a/include/ac/alloca.h +++ b/include/ac/alloca.h @@ -23,7 +23,7 @@ #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ -extern char *alloca (); +extern char *(alloca)(); # endif # endif # endif diff --git a/include/ac/errno.h b/include/ac/errno.h index a60ef0abfb..48fa87da62 100644 --- a/include/ac/errno.h +++ b/include/ac/errno.h @@ -28,10 +28,6 @@ extern char *sys_errlist[]; #endif #endif -#if !defined( EWOULDBLOCK ) && defined( WSAEWOULDBLOCK ) -#define EWOULDBLOCK WSAEWOULDBLOCK -#endif - /* use _POSIX_VERSION for POSIX.1 code */ #endif /* _AC_ERRNO_H */ diff --git a/include/ac/setproctitle.h b/include/ac/setproctitle.h index f97074e7c2..92be853b3b 100644 --- a/include/ac/setproctitle.h +++ b/include/ac/setproctitle.h @@ -18,7 +18,7 @@ # include #else /* use lutil version */ - extern void setproctitle LDAP_P((const char *fmt, ...)); + extern void (setproctitle) LDAP_P((const char *fmt, ...)); extern int Argc; extern char **Argv; #endif diff --git a/include/ac/socket.h b/include/ac/socket.h index c49226fcc1..8fd3dce772 100644 --- a/include/ac/socket.h +++ b/include/ac/socket.h @@ -67,6 +67,9 @@ # define tcp_close( s ) closesocket( s ); # define ioctl( s, c, a ) ioctlsocket( (s), (c), (a) ) # define ioctl_t u_long + +#define EWOULDBLOCK WSAEWOULDBLOCK + #elif MACOS # define tcp_close( s ) tcpclose( s ) #elif DOS diff --git a/include/ac/string.h b/include/ac/string.h index 576205c7cf..2e8472d37f 100644 --- a/include/ac/string.h +++ b/include/ac/string.h @@ -57,7 +57,7 @@ extern char *ldap_pvt_strdup( const char * s ); #else # ifdef DECL_STRDUP /* some systems fail to declare strdup */ - extern char *strdup(); + extern char *(strdup)(); # endif #endif diff --git a/include/ac/unistd.h b/include/ac/unistd.h index 61ad9172b1..db1e3cb7c9 100644 --- a/include/ac/unistd.h +++ b/include/ac/unistd.h @@ -24,11 +24,11 @@ #if HAVE_CRYPT_H # include #else - extern char *crypt(); + extern char *(crypt)(); #endif #ifndef HAVE_GETPASS -extern char* getpass LDAP_P((const char *getpass)); +extern char* (getpass) LDAP_P((const char *getpass)); #endif /* getopt() defines may be in separate include file */ @@ -46,10 +46,10 @@ extern char* getpass LDAP_P((const char *getpass)); #endif #ifndef HAVE_TEMPNAM - extern char *tempnam(const char *tmpdir, const char *prefix); + extern char *(tempnam)(const char *tmpdir, const char *prefix); #endif #ifndef HAVE_MKTEMP - extern char *mktemp(char *); + extern char *(mktemp)(char *); #endif /* use lutil file locking */ -- 2.39.5