From: Kurt Zeilenga Date: Tue, 20 Jun 2000 03:53:12 +0000 (+0000) Subject: Introduce LDAP_V() and friends X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~2560 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4e3c32d8165df51e0bb081c209f2072efadeb74f;p=openldap Introduce LDAP_V() and friends --- diff --git a/include/ac/errno.h b/include/ac/errno.h index 676f2a14d6..7e6abae9c0 100644 --- a/include/ac/errno.h +++ b/include/ac/errno.h @@ -25,8 +25,8 @@ # define sys_errlist ((char **)0) #elif DECL_SYS_ERRLIST /* have sys_errlist but need declaration */ - LDAP_LIBC_F (int) sys_nerr; - LDAP_LIBC_F (char) *sys_errlist[]; + LDAP_LIBC_V (int) sys_nerr; + LDAP_LIBC_V (char) *sys_errlist[]; #endif #ifdef HAVE_STRERROR diff --git a/include/ac/setproctitle.h b/include/ac/setproctitle.h index a68c2fbba6..4f928ac756 100644 --- a/include/ac/setproctitle.h +++ b/include/ac/setproctitle.h @@ -20,9 +20,9 @@ #else /* use lutil version */ LDAP_LUTIL_F (void) (setproctitle) LDAP_P((const char *fmt, ...)) \ - LDAP_GCCATTR((format(printf, 1, 2))); - LDAP_LUTIL_F (int) Argc; - LDAP_LUTIL_F (char) **Argv; + LDAP_GCCATTR((format(printf, 1, 2))); + LDAP_LUTIL_V (int) Argc; + LDAP_LUTIL_V (char) **Argv; #endif #endif /* LDAP_PROCTITLE */ diff --git a/include/ac/unistd.h b/include/ac/unistd.h index 2d601a317d..3593bb7024 100644 --- a/include/ac/unistd.h +++ b/include/ac/unistd.h @@ -50,8 +50,8 @@ LDAP_LUTIL_F(char*)(lutil_getpass) LDAP_P((const char *getpass)); #else /* assume we need to declare these externs */ - LDAP_LIBC_F (char *) optarg; - LDAP_LIBC_F (int) optind, opterr, optopt; + LDAP_LIBC_V (char *) optarg; + LDAP_LIBC_V (int) optind, opterr, optopt; #endif #ifndef HAVE_TEMPNAM diff --git a/include/getopt-compat.h b/include/getopt-compat.h index 85d8400f2a..e26c43e0ca 100644 --- a/include/getopt-compat.h +++ b/include/getopt-compat.h @@ -25,8 +25,8 @@ LDAP_BEGIN_DECL #define optopt lutil_optopt #define getopt lutil_getopt -LDAP_LUTIL_F (char *) optarg; -LDAP_LUTIL_F (int) optind, opterr, optopt; +LDAP_LUTIL_V (char *) optarg; +LDAP_LUTIL_V (int) optind, opterr, optopt; LDAP_LUTIL_F (int) getopt LDAP_P(( int, char * const [], const char *)); LDAP_END_DECL diff --git a/include/ldap_cdefs.h b/include/ldap_cdefs.h index 37c88b8cd0..5de6308569 100644 --- a/include/ldap_cdefs.h +++ b/include/ldap_cdefs.h @@ -60,15 +60,19 @@ /* LBER library */ #if defined(LBER_DECL) && defined(_WIN32) # define LBER_F(type) extern __declspec(LBER_DECL) type +# define LBER_V(type) extern __declspec(LBER_DECL) type #else -# define LBER_F(type) type +# define LBER_F(type) extern type +# define LBER_V(type) extern type #endif /* LDAP library */ #if defined(LDAP_DECL) && defined(_WIN32) -# define LDAP_F(type) extern __declspec(LDAP_DECL) type +# define LDAP_F(type) extern __declspec(LDAP_DECL) type +# define LDAP_V(type) extern __declspec(LDAP_DECL) type #else -# define LDAP_F(type) extern type +# define LDAP_F(type) extern type +# define LDAP_V(type) extern type #endif /* @@ -79,50 +83,64 @@ #if (defined(__MINGW32__) && !defined(CSTATIC) || \ defined(_WIN32) && defined(_DLL)) # define LDAP_LIBC_F(type) extern __declspec(dllimport) type +# define LDAP_LIBC_V(type) extern __declspec(dllimport) type #else # define LDAP_LIBC_F(type) extern type +# define LDAP_LIBC_V(type) extern type #endif /* AVL library */ #if defined(LDAP_AVL_DECL) && defined(_WIN32) # define LDAP_AVL_F(type) extern __declspec(LDAP_AVL_DECL) type +# define LDAP_AVL_V(type) extern __declspec(LDAP_AVL_DECL) type #else # define LDAP_AVL_F(type) extern type +# define LDAP_AVL_V(type) extern type #endif /* LDBM library */ #if defined(LDAP_LDBM_DECL) && defined(_WIN32) # define LDAP_LDBM_F(type) extern __declspec(LDAP_LDBM_DECL) type +# define LDAP_LDBM_V(type) extern __declspec(LDAP_LDBM_DECL) type #else # define LDAP_LDBM_F(type) extern type +# define LDAP_LDBM_V(type) extern type #endif /* LDIF library */ #if defined(LDAP_LDIF_DECL) && defined(_WIN32) # define LDAP_LDIF_F(type) extern __declspec(LDAP_LDIF_DECL) type +# define LDAP_LDIF_V(type) extern __declspec(LDAP_LDIF_DECL) type #else # define LDAP_LDIF_F(type) extern type +# define LDAP_LDIF_V(type) extern type #endif /* LUNICODE library */ #if defined(LDAP_LUNICODE_DECL) && defined(_WIN32) # define LDAP_LUNICODE_F(type) extern __declspec(LDAP_LUNICODE_DECL) type +# define LDAP_LUNICODE_V(type) extern __declspec(LDAP_LUNICODE_DECL) type #else # define LDAP_LUNICODE_F(type) extern type +# define LDAP_LUNICODE_V(type) extern type #endif /* LUTIL library */ #if defined(LDAP_LUTIL_DECL) && defined(_WIN32) # define LDAP_LUTIL_F(type) extern __declspec(LDAP_LUTIL_DECL) type +# define LDAP_LUTIL_V(type) extern __declspec(LDAP_LUTIL_DECL) type #else # define LDAP_LUTIL_F(type) extern type +# define LDAP_LUTIL_V(type) extern type #endif /* SLAPD (as a module exporting symbols) */ #if defined(LDAP_SLAPD_DECL) && defined(_WIN32) # define LDAP_SLAPD_F(type) extern __declspec(LDAP_SLAPD_DECL) type +# define LDAP_SLAPD_V(type) extern __declspec(LDAP_SLAPD_DECL) type #else # define LDAP_SLAPD_F(type) extern type +# define LDAP_SLAPD_V(type) extern type #endif #endif /* _LDAP_CDEFS_H */ diff --git a/include/ldif.h b/include/ldif.h index 5ac11aee49..4e67f71eb8 100644 --- a/include/ldif.h +++ b/include/ldif.h @@ -28,7 +28,7 @@ LDAP_BEGIN_DECL /* This is NOT a bogus extern declaration (unlike ldap_debug) */ -LDAP_LDIF_F (int) ldif_debug; +LDAP_LDIF_V (int) ldif_debug; #define LDIF_LINE_WIDTH 76 /* maximum length of LDIF lines */ diff --git a/servers/slapd/main.c b/servers/slapd/main.c index 93bd6fa92b..c4f610bbb2 100644 --- a/servers/slapd/main.c +++ b/servers/slapd/main.c @@ -28,8 +28,8 @@ static RETSIGTYPE wait4child( int sig ); struct sockaddr_in bind_addr; /* in nt_main.c */ -LDAP_LUTIL_F(SERVICE_STATUS) SLAPDServiceStatus; -LDAP_LUTIL_F(SERVICE_STATUS_HANDLE) hSLAPDServiceStatus; +LDAP_LUTIL_V(SERVICE_STATUS) SLAPDServiceStatus; +LDAP_LUTIL_V(SERVICE_STATUS_HANDLE) hSLAPDServiceStatus; extern ldap_pvt_thread_cond_t started_event, stopped_event; extern int is_NT_Service;