mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-21 07:09:34 -05:00
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.
This commit is contained in:
parent
c32792b489
commit
8c5a6151b1
1 changed files with 12 additions and 6 deletions
|
|
@ -7,24 +7,30 @@
|
||||||
# define LDAP_BEGIN_DECL extern "C" {
|
# define LDAP_BEGIN_DECL extern "C" {
|
||||||
# define LDAP_END_DECL }
|
# define LDAP_END_DECL }
|
||||||
#else
|
#else
|
||||||
# define LDAP_BEGIN_DECL
|
# define LDAP_BEGIN_DECL /* empty */
|
||||||
# define LDAP_END_DECL
|
# define LDAP_END_DECL /* empty */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__STDC__) || defined(__cplusplus) || \
|
#if !defined(__NO_PROTOTYPES) && ( \
|
||||||
(defined(_WIN32) && !defined(NOPROTOTYPES))
|
defined(__STDC__) || defined(__cplusplus) || \
|
||||||
|
defined(__NEED_PROTOTYPES) )
|
||||||
|
|
||||||
/* ANSI C or C++ */
|
/* ANSI C or C++ */
|
||||||
# define LDAP_P(protos) protos
|
# define LDAP_P(protos) protos
|
||||||
# define LDAP_CONCAT1(x,y) x ## y
|
# define LDAP_CONCAT1(x,y) x ## y
|
||||||
# define LDAP_CONCAT(x,y) LDAP_CONCAT1(x,y)
|
# define LDAP_CONCAT(x,y) LDAP_CONCAT1(x,y)
|
||||||
# define LDAP_STRING(x) #x /* stringify without expanding x */
|
# define LDAP_STRING(x) #x /* stringify without expanding x */
|
||||||
# define LDAP_XSTRING(x) LDAP_STRING(x) /* expand x, then stringify */
|
# define LDAP_XSTRING(x) LDAP_STRING(x) /* expand x, then stringify */
|
||||||
#else /* ! __STDC__ && ! __cplusplus */
|
|
||||||
|
#else /* no prototypes */
|
||||||
|
|
||||||
/* traditional C */
|
/* traditional C */
|
||||||
# define LDAP_P(protos) ()
|
# define LDAP_P(protos) ()
|
||||||
# define LDAP_CONCAT(x,y) x/**/y
|
# define LDAP_CONCAT(x,y) x/**/y
|
||||||
# define LDAP_STRING(x) "x"
|
# define LDAP_STRING(x) "x"
|
||||||
#endif /* __STDC__ || __cplusplus */
|
|
||||||
|
#endif /* no prototypes */
|
||||||
|
|
||||||
|
|
||||||
#ifndef LDAP_F
|
#ifndef LDAP_F
|
||||||
# ifdef _WIN32
|
# ifdef _WIN32
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue