From 8c5a6151b19ceee4b257966b3a9cd842f13d3866 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 12 Nov 1998 20:30:42 +0000 Subject: [PATCH] Rework prototype ifdef to use __NO_PROTOTYPES and __NEED_PROTOTYPES to force no prototypes or require them. Remove _WIN32 clause. Will update portable.h.nt to define __NEED_PROTOTYPES. --- include/ldap_cdefs.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/include/ldap_cdefs.h b/include/ldap_cdefs.h index 000df8830d..96579288df 100644 --- a/include/ldap_cdefs.h +++ b/include/ldap_cdefs.h @@ -7,24 +7,30 @@ # define LDAP_BEGIN_DECL extern "C" { # define LDAP_END_DECL } #else -# define LDAP_BEGIN_DECL -# define LDAP_END_DECL +# define LDAP_BEGIN_DECL /* empty */ +# define LDAP_END_DECL /* empty */ #endif -#if defined(__STDC__) || defined(__cplusplus) || \ - (defined(_WIN32) && !defined(NOPROTOTYPES)) +#if !defined(__NO_PROTOTYPES) && ( \ + defined(__STDC__) || defined(__cplusplus) || \ + defined(__NEED_PROTOTYPES) ) + /* ANSI C or C++ */ # define LDAP_P(protos) protos # define LDAP_CONCAT1(x,y) x ## y # define LDAP_CONCAT(x,y) LDAP_CONCAT1(x,y) # define LDAP_STRING(x) #x /* stringify without expanding x */ # define LDAP_XSTRING(x) LDAP_STRING(x) /* expand x, then stringify */ -#else /* ! __STDC__ && ! __cplusplus */ + +#else /* no prototypes */ + /* traditional C */ # define LDAP_P(protos) () # define LDAP_CONCAT(x,y) x/**/y # define LDAP_STRING(x) "x" -#endif /* __STDC__ || __cplusplus */ + +#endif /* no prototypes */ + #ifndef LDAP_F # ifdef _WIN32 -- 2.39.5