Skip to content
Snippets Groups Projects
Commit 8c5a6151 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

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.
parent c32792b4
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment