mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-25 17:19:43 -05:00
check software version
This commit is contained in:
parent
0b9988ab8d
commit
3b4b9cbc33
2 changed files with 22 additions and 10 deletions
|
|
@ -35,13 +35,22 @@ allop-URI <ldapURI>
|
|||
|
||||
#include "portable.h"
|
||||
|
||||
#ifdef SLAPD_OVER_ALLOP
|
||||
|
||||
#include <stdio.h>
|
||||
#include <ac/string.h>
|
||||
|
||||
#include "slap.h"
|
||||
|
||||
#define SLAP_OVER_VERSION_REQUIRE(major,minor,patch) \
|
||||
( \
|
||||
( LDAP_VENDOR_VERSION_MAJOR == X || LDAP_VENDOR_VERSION_MAJOR >= (major) ) \
|
||||
&& ( LDAP_VENDOR_VERSION_MINOR == X || LDAP_VENDOR_VERSION_MINOR >= (minor) ) \
|
||||
&& ( LDAP_VENDOR_VERSION_PATCH == X || LDAP_VENDOR_VERSION_PATCH >= (patch) ) \
|
||||
)
|
||||
|
||||
#if !SLAP_OVER_VERSION_REQUIRE(2,3,0)
|
||||
#error "version mismatch"
|
||||
#endif
|
||||
|
||||
typedef struct allop_t {
|
||||
struct berval ao_ndn;
|
||||
int ao_scope;
|
||||
|
|
@ -243,12 +252,9 @@ allop_init()
|
|||
return overlay_register( &allop );
|
||||
}
|
||||
|
||||
#if SLAPD_OVER_ALLOP == SLAPD_MOD_DYNAMIC
|
||||
int
|
||||
init_module( int argc, char *argv[] )
|
||||
{
|
||||
return allop_init();
|
||||
}
|
||||
#endif /* SLAPD_OVER_ALLOP == SLAPD_MOD_DYNAMIC */
|
||||
|
||||
#endif /* defined(SLAPD_OVER_ALLOP) */
|
||||
|
|
|
|||
|
|
@ -35,13 +35,22 @@ allop-URI <ldapURI>
|
|||
|
||||
#include "portable.h"
|
||||
|
||||
#ifdef SLAPD_OVER_ALLOP
|
||||
|
||||
#include <stdio.h>
|
||||
#include <ac/string.h>
|
||||
|
||||
#include "slap.h"
|
||||
|
||||
#define SLAP_OVER_VERSION_REQUIRE(major,minor,patch) \
|
||||
( \
|
||||
( LDAP_VENDOR_VERSION_MAJOR == X || LDAP_VENDOR_VERSION_MAJOR >= (major) ) \
|
||||
&& ( LDAP_VENDOR_VERSION_MINOR == X || LDAP_VENDOR_VERSION_MINOR >= (minor) ) \
|
||||
&& ( LDAP_VENDOR_VERSION_PATCH == X || LDAP_VENDOR_VERSION_PATCH >= (patch) ) \
|
||||
)
|
||||
|
||||
#if !SLAP_OVER_VERSION_REQUIRE(2,3,0)
|
||||
#error "version mismatch"
|
||||
#endif
|
||||
|
||||
typedef struct allop_t {
|
||||
struct berval ao_ndn;
|
||||
int ao_scope;
|
||||
|
|
@ -243,12 +252,9 @@ allop_init()
|
|||
return overlay_register( &allop );
|
||||
}
|
||||
|
||||
#if SLAPD_OVER_ALLOP == SLAPD_MOD_DYNAMIC
|
||||
int
|
||||
init_module( int argc, char *argv[] )
|
||||
{
|
||||
return allop_init();
|
||||
}
|
||||
#endif /* SLAPD_OVER_ALLOP == SLAPD_MOD_DYNAMIC */
|
||||
|
||||
#endif /* defined(SLAPD_OVER_ALLOP) */
|
||||
|
|
|
|||
Loading…
Reference in a new issue