From 13accb8b2858ffd49f9e5da28674815c2014734f Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 12 Aug 2005 06:17:24 +0000 Subject: [PATCH] Not sure why autoheader isn't doing its job... --- acconfig.h | 124 ----------------- configure | 93 ++++++------- configure.in | 125 +++++++++++++++++- include/{lber_types.h.in => lber_types.hin} | 0 include/{ldap_config.h.in => ldap_config.hin} | 0 include/ldap_features.h.in | 63 --------- include/{portable.h.in => portable.hin} | 0 servers/slapd/back-ldbm/dbcache.c | 4 +- servers/slapd/back-ldbm/ldbm.c | 6 +- 9 files changed, 166 insertions(+), 249 deletions(-) delete mode 100644 acconfig.h rename include/{lber_types.h.in => lber_types.hin} (100%) rename include/{ldap_config.h.in => ldap_config.hin} (100%) delete mode 100644 include/ldap_features.h.in rename include/{portable.h.in => portable.hin} (100%) diff --git a/acconfig.h b/acconfig.h deleted file mode 100644 index 865c099294..0000000000 --- a/acconfig.h +++ /dev/null @@ -1,124 +0,0 @@ -/* This work is part of OpenLDAP Software . - * - * Copyright 1998-2005 The OpenLDAP Foundation - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted only as authorized by the OpenLDAP - * Public License. - * - * A copy of this license is available in the file LICENSE in the - * top-level directory of the distribution or, alternatively, at - * . - */ - -#ifndef _LDAP_PORTABLE_H -#define _LDAP_PORTABLE_H - -/* end of preamble */ - -@TOP@ - -/* define this if needed to get reentrant functions */ -#ifndef REENTRANT -#undef REENTRANT -#endif -#ifndef _REENTRANT -#undef _REENTRANT -#endif - -/* define this if needed to get threadsafe functions */ -#ifndef THREADSAFE -#undef THREADSAFE -#endif -#ifndef _THREADSAFE -#undef _THREADSAFE -#endif -#ifndef THREAD_SAFE -#undef THREAD_SAFE -#endif -#ifndef _THREAD_SAFE -#undef _THREAD_SAFE -#endif - -#ifndef _SGI_MP_SOURCE -#undef _SGI_MP_SOURCE -#endif - -/* define this if TIOCGWINSZ is defined in sys/ioctl.h */ -#undef GWINSZ_IN_SYS_IOCTL - -/* These are defined in ldap_features.h */ -/* - LDAP_API_FEATURE_X_OPENLDAP_REENTRANT - LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE - LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND - LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS -*/ - -/* These are defined in lber_types.h */ -/* - LBER_INT_T - LBER_LEN_T - LBER_SOCKET_T - LBER_TAG_T -*/ - -/* define to character address type */ -#undef caddr_t - -/* define to signed size type */ -#undef ssize_t - - -/* Leave that blank line there!! Autoheader needs it. */ - -@BOTTOM@ - -/* begin of postamble */ - -#ifdef _WIN32 - /* don't suck in all of the win32 api */ -# define WIN32_LEAN_AND_MEAN 1 -#endif - -#ifndef LDAP_NEEDS_PROTOTYPES -/* force LDAP_P to always include prototypes */ -#define LDAP_NEEDS_PROTOTYPES 1 -#endif - -#ifndef LDAP_REL_ENG -#if (LDAP_VENDOR_VERSION == 000000) && !defined(LDAP_DEVEL) -#define LDAP_DEVEL -#endif -#if defined(LDAP_DEVEL) && !defined(LDAP_TEST) -#define LDAP_TEST -#endif -#endif - -#ifdef HAVE_STDDEF_H -# include -#endif - -#ifdef HAVE_EBCDIC -/* ASCII/EBCDIC converting replacements for stdio funcs - * vsnprintf and snprintf are used too, but they are already - * checked by the configure script - */ -#define fputs ber_pvt_fputs -#define fgets ber_pvt_fgets -#define printf ber_pvt_printf -#define fprintf ber_pvt_fprintf -#define vfprintf ber_pvt_vfprintf -#define vsprintf ber_pvt_vsprintf -#endif - -#include "ac/fdset.h" - -#include "ldap_cdefs.h" -#include "ldap_features.h" - -#include "ac/assert.h" -#include "ac/localize.h" - -#endif /* _LDAP_PORTABLE_H */ diff --git a/configure b/configure index 9b7e716b27..5beb3e59b0 100755 --- a/configure +++ b/configure @@ -2137,7 +2137,17 @@ OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE" - ac_config_headers="$ac_config_headers include/portable.h include/ldap_features.h include/lber_types.h" + + + + + + ac_config_headers="$ac_config_headers include/portable.h:include/portable.hin" + + ac_config_headers="$ac_config_headers include/ldap_features.h:include/ldap_features.hin" + + ac_config_headers="$ac_config_headers include/lber_types.h:include/lber_types.hin" + echo "$as_me:$LINENO: checking configure arguments" >&5 echo $ECHO_N "checking configure arguments... $ECHO_C" >&6 @@ -5553,7 +5563,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 5556 "configure"' > conftest.$ac_ext + echo '#line 5566 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7374,7 +7384,7 @@ fi # Provide some information about the compiler. -echo "$as_me:7377:" \ +echo "$as_me:7387:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -8472,11 +8482,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8475: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8485: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8479: \$? = $ac_status" >&5 + echo "$as_me:8489: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8734,11 +8744,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8737: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8747: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8741: \$? = $ac_status" >&5 + echo "$as_me:8751: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8796,11 +8806,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8799: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8809: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8803: \$? = $ac_status" >&5 + echo "$as_me:8813: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11036,7 +11046,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:13395: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13389: \$? = $ac_status" >&5 + echo "$as_me:13399: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -13444,11 +13454,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13447: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13457: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13451: \$? = $ac_status" >&5 + echo "$as_me:13461: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -14813,7 +14823,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:15809: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15803: \$? = $ac_status" >&5 + echo "$as_me:15813: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -15858,11 +15868,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15861: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15871: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15865: \$? = $ac_status" >&5 + echo "$as_me:15875: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17980,11 +17990,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17983: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17993: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:17987: \$? = $ac_status" >&5 + echo "$as_me:17997: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -18242,11 +18252,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:18245: $lt_compile\"" >&5) + (eval echo "\"\$as_me:18255: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:18249: \$? = $ac_status" >&5 + echo "$as_me:18259: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -18304,11 +18314,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:18307: $lt_compile\"" >&5) + (eval echo "\"\$as_me:18317: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:18311: \$? = $ac_status" >&5 + echo "$as_me:18321: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -20544,7 +20554,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <>confdefs.h <<_ACEOF @@ -47564,7 +47561,6 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6 if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then @@ -47673,13 +47669,8 @@ cat >>confdefs.h <<_ACEOF _ACEOF -cat >>confdefs.h <<\_ACEOF -#define HAVE_ST_BLKSIZE 1 -_ACEOF - fi - echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 if test "${ac_cv_header_time+set}" = set; then @@ -51741,9 +51732,9 @@ do "tests/progs/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; - "include/portable.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/portable.h" ;; - "include/ldap_features.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ldap_features.h" ;; - "include/lber_types.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/lber_types.h" ;; + "include/portable.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/portable.h:include/portable.hin" ;; + "include/ldap_features.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ldap_features.h:include/ldap_features.hin" ;; + "include/lber_types.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/lber_types.h:include/lber_types.hin" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; diff --git a/configure.in b/configure.in index 05c0fcf4fd..179ee6944f 100644 --- a/configure.in +++ b/configure.in @@ -113,7 +113,123 @@ dnl aclocal.m4 should be built using aclocal from automake 1.5 dnl libtool 1.5 should be installed. AC_PREREQ(2.59)dnl Required Autoconf version -AC_CONFIG_HEADER(include/portable.h include/ldap_features.h include/lber_types.h)dnl +AH_TOP([ +/* begin of portable.h.pre */ +/* This work is part of OpenLDAP Software . + * + * Copyright 1998-2005 The OpenLDAP Foundation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted only as authorized by the OpenLDAP + * Public License. + * + * A copy of this license is available in the file LICENSE in the + * top-level directory of the distribution or, alternatively, at + * . + */ + +#ifndef _LDAP_PORTABLE_H +#define _LDAP_PORTABLE_H + +/* define this if needed to get reentrant functions */ +#ifndef REENTRANT +#undef REENTRANT +#endif +#ifndef _REENTRANT +#undef _REENTRANT +#endif + +/* define this if needed to get threadsafe functions */ +#ifndef THREADSAFE +#undef THREADSAFE +#endif +#ifndef _THREADSAFE +#undef _THREADSAFE +#endif +#ifndef THREAD_SAFE +#undef THREAD_SAFE +#endif +#ifndef _THREAD_SAFE +#undef _THREAD_SAFE +#endif + +#ifndef _SGI_MP_SOURCE +#undef _SGI_MP_SOURCE +#endif + +/* These are defined in ldap_features.h */ +/* + LDAP_API_FEATURE_X_OPENLDAP_REENTRANT + LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE + LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND + LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS +*/ + +/* These are defined in lber_types.h */ +/* + LBER_INT_T + LBER_LEN_T + LBER_SOCKET_T + LBER_TAG_T +*/ + +/* end of portable.h.pre */ +]) +AH_BOTTOM([ +/* begin of portable.h.post */ + +#ifdef _WIN32 + /* don't suck in all of the win32 api */ +# define WIN32_LEAN_AND_MEAN 1 +#endif + +#ifndef LDAP_NEEDS_PROTOTYPES +/* force LDAP_P to always include prototypes */ +#define LDAP_NEEDS_PROTOTYPES 1 +#endif + +#ifndef LDAP_REL_ENG +#if (LDAP_VENDOR_VERSION == 000000) && !defined(LDAP_DEVEL) +#define LDAP_DEVEL +#endif +#if defined(LDAP_DEVEL) && !defined(LDAP_TEST) +#define LDAP_TEST +#endif +#endif + +#ifdef HAVE_STDDEF_H +# include +#endif + +#ifdef HAVE_EBCDIC +/* ASCII/EBCDIC converting replacements for stdio funcs + * vsnprintf and snprintf are used too, but they are already + * checked by the configure script + */ +#define fputs ber_pvt_fputs +#define fgets ber_pvt_fgets +#define printf ber_pvt_printf +#define fprintf ber_pvt_fprintf +#define vfprintf ber_pvt_vfprintf +#define vsprintf ber_pvt_vsprintf +#endif + +#include "ac/fdset.h" + +#include "ldap_cdefs.h" +#include "ldap_features.h" + +#include "ac/assert.h" +#include "ac/localize.h" + +#endif /* _LDAP_PORTABLE_H */ +/* end of portable.h.post */ +]) + +AC_CONFIG_HEADERS([include/portable.h:include/portable.hin]) +AC_CONFIG_HEADERS([include/ldap_features.h:include/ldap_features.hin]) +AC_CONFIG_HEADERS([include/lber_types.h:include/lber_types.hin]) dnl ================================================================ dnl Start Args @@ -661,12 +777,9 @@ dnl AC_ISC_POSIX dnl AC_MINIX dnl ---------------------------------------------------------------- -dnl Checks for system services -AC_CYGWIN -AC_MINGW32 +dnl Checks for file extensions AC_EXEEXT AC_OBJEXT - AC_DEFINE_UNQUOTED(EXEEXT, "${EXEEXT}", [defined to be the EXE extension]) dnl ---------------------------------------------------------------- @@ -2358,7 +2471,7 @@ AC_CHECK_TYPE(ssize_t, [signed int]) AC_CHECK_TYPE(caddr_t, [char *]) OL_TYPE_SOCKLEN_T -AC_STRUCT_ST_BLKSIZE +AC_CHECK_MEMBERS([struct stat.st_blksize]) AC_HEADER_TIME AC_STRUCT_TM AC_TYPE_UID_T diff --git a/include/lber_types.h.in b/include/lber_types.hin similarity index 100% rename from include/lber_types.h.in rename to include/lber_types.hin diff --git a/include/ldap_config.h.in b/include/ldap_config.hin similarity index 100% rename from include/ldap_config.h.in rename to include/ldap_config.hin diff --git a/include/ldap_features.h.in b/include/ldap_features.h.in deleted file mode 100644 index fc3e3fc361..0000000000 --- a/include/ldap_features.h.in +++ /dev/null @@ -1,63 +0,0 @@ -/* $OpenLDAP$ */ -/* This work is part of OpenLDAP Software . - * - * Copyright 1998-2005 The OpenLDAP Foundation. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted only as authorized by the OpenLDAP - * Public License. - * - * A copy of this license is available in file LICENSE in the - * top-level directory of the distribution or, alternatively, at - * . - */ - -/* - * LDAP Features - */ - -#ifndef _LDAP_FEATURES_H -#define _LDAP_FEATURES_H 1 - -/* OpenLDAP API version macros */ -#undef LDAP_VENDOR_VERSION -#undef LDAP_VENDOR_VERSION_MAJOR -#undef LDAP_VENDOR_VERSION_MINOR -#undef LDAP_VENDOR_VERSION_PATCH - -/* -** WORK IN PROGRESS! -** -** OpenLDAP reentrancy/thread-safeness should be dynamically -** checked using ldap_get_option(). -** -** The -lldap implementation is not thread-safe. -** -** The -lldap_r implementation is: -** LDAP_API_FEATURE_THREAD_SAFE (basic thread safety) -** but also be: -** LDAP_API_FEATURE_SESSION_THREAD_SAFE -** LDAP_API_FEATURE_OPERATION_THREAD_SAFE -** -** The preprocessor flag LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE -** can be used to determine if -lldap_r is available at compile -** time. You must define LDAP_THREAD_SAFE if and only if you -** link with -lldap_r. -** -** If you fail to define LDAP_THREAD_SAFE when linking with -** -lldap_r or define LDAP_THREAD_SAFE when linking with -lldap, -** provided header definations and declarations may be incorrect. -** -*/ - -/* is -lldap_r available or not */ -#undef LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE - -/* LDAP v2 Kerberos Bind */ -#undef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND - -/* LDAP v2 Referrals */ -#undef LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS - -#endif /* LDAP_FEATURES */ diff --git a/include/portable.h.in b/include/portable.hin similarity index 100% rename from include/portable.h.in rename to include/portable.hin diff --git a/servers/slapd/back-ldbm/dbcache.c b/servers/slapd/back-ldbm/dbcache.c index cbc28d0a18..8776c4bc1a 100644 --- a/servers/slapd/back-ldbm/dbcache.c +++ b/servers/slapd/back-ldbm/dbcache.c @@ -41,7 +41,7 @@ ldbm_cache_open( int i, lru, empty; time_t oldtime; char buf[MAXPATHLEN]; -#ifdef HAVE_ST_BLKSIZE +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE struct stat st; #endif @@ -162,7 +162,7 @@ ldbm_cache_open( li->li_dbcache[i].dbc_lastref = slap_get_time(); li->li_dbcache[i].dbc_flags = flags; li->li_dbcache[i].dbc_dirty = 0; -#ifdef HAVE_ST_BLKSIZE +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE if ( stat( buf, &st ) == 0 ) { li->li_dbcache[i].dbc_blksize = st.st_blksize; } else diff --git a/servers/slapd/back-ldbm/ldbm.c b/servers/slapd/back-ldbm/ldbm.c index 66745ee6db..95b4d0f268 100644 --- a/servers/slapd/back-ldbm/ldbm.c +++ b/servers/slapd/back-ldbm/ldbm.c @@ -644,7 +644,7 @@ ldbm_errno( LDBM ldbm ) #elif defined( HAVE_GDBM ) -#ifdef HAVE_ST_BLKSIZE +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE #include #endif @@ -658,7 +658,7 @@ LDBM ldbm_open( DB_ENV *env, char *name, int rw, int mode, int dbcachesize ) { LDBM db; -#ifdef HAVE_ST_BLKSIZE +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE struct stat st; #endif #ifdef HAVE_EBCDIC @@ -677,7 +677,7 @@ ldbm_open( DB_ENV *env, char *name, int rw, int mode, int dbcachesize ) return( NULL ); } -#ifdef HAVE_ST_BLKSIZE +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE if ( dbcachesize > 0 && stat( name, &st ) == 0 ) { dbcachesize /= st.st_blksize; if( dbcachesize == 0 ) dbcachesize = 1; -- 2.39.5