mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-23 16:19:35 -05:00
Add LDAP_CONST macro for use within EXTERNAL headers such as
<lber.h> and <ldap.h>. Note: This should not be used within the implementation itself as our "portable.h" mechanism provides Standard C vs. K&R "const" handling.
This commit is contained in:
parent
ae711594b7
commit
031b9ec092
1 changed files with 8 additions and 0 deletions
|
|
@ -31,6 +31,10 @@
|
|||
# define LDAP_STRING(x) #x /* stringify without expanding x */
|
||||
# define LDAP_XSTRING(x) LDAP_STRING(x) /* expand x, then stringify */
|
||||
|
||||
#ifndef LDAP_CONST
|
||||
# define LDAP_CONST const
|
||||
#endif
|
||||
|
||||
#else /* no prototypes */
|
||||
|
||||
/* traditional C */
|
||||
|
|
@ -38,6 +42,10 @@
|
|||
# define LDAP_CONCAT(x,y) x/**/y
|
||||
# define LDAP_STRING(x) "x"
|
||||
|
||||
#ifndef LDAP_CONST
|
||||
# define LDAP_CONST /* no const */
|
||||
#endif
|
||||
|
||||
#endif /* no prototypes */
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue