Introduce LDAP_V() and friends

This commit is contained in:
Kurt Zeilenga 2000-06-20 03:53:12 +00:00
parent bec9e6aa8a
commit 4e3c32d816
7 changed files with 33 additions and 15 deletions

View File

@ -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

View File

@ -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 */

View File

@ -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

View File

@ -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

View File

@ -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 */

View File

@ -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 */

View File

@ -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;