Commit 669b8f40 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

ber_int_t, ber_tag_t, ber_socket_t, ber_len_t

added lber_types.h.nt, lber_types.h.in
removal of NULLxxx internal macros (in favor of NULL).
ch_free added to slapd,slurpd/ch_malloc.c
#define free ch_free (should be removed after s/free/ch_free/g) in proto-slap.h
ch_malloc and friends use ber_memalloc and friends
parent 7e4b3bc2
......@@ -242,6 +242,13 @@
LDAP_API_FEATURE_X_OPENLDAP_V2_DNS
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
*/
/* Leave that blank line there!! Autoheader needs it. */
......
......@@ -411,7 +411,7 @@ do_search( LDAP *ld, char *buf )
static int
entry2textwrite( void *fp, char *buf, int len )
entry2textwrite( void *fp, char *buf, ber_len_t len )
{
return( fwrite( buf, len, 1, (FILE *)fp ) == 0 ? -1 : len );
}
......
......@@ -569,7 +569,7 @@ do_search( LDAP *ld, FILE *fp, char *buf )
}
static int
entry2textwrite( void *fp, char *buf, int len )
entry2textwrite( void *fp, char *buf, ber_len_t len )
{
return( fwrite( buf, len, 1, (FILE *)fp ) == 0 ? -1 : len );
}
......
......@@ -75,7 +75,7 @@ static void do_list (LDAP *ld, FILE *fp, char *dn);
static int isoc ( char **ocl, char *oc );
static int make_scope ( LDAP *ld, char *dn );
static void do_search (LDAP *ld, FILE *fp, char *query);
static int entry2textwrite( void *fp, char *buf, int len );
static int entry2textwrite( void *fp, char *buf, ber_len_t len );
static void do_read (LDAP *ld, FILE *fp, char *dn);
static void do_help (FILE *op);
static void do_sizelimit(FILE *fp, char type);
......@@ -851,7 +851,7 @@ do_search( LDAP *ld, FILE *fp, char *query )
static int
entry2textwrite( void *fp, char *buf, int len )
entry2textwrite( void *fp, char *buf, ber_len_t len )
{
return( fwrite( buf, len, 1, (FILE *)fp ) == 0 ? -1 : len );
}
......
......@@ -30,7 +30,7 @@ static char *errpreface = "Your query failed: ";
static void close_ldap(LDAP *ld);
static void append_entry_list(char *rep, char *qu, LDAP *ld, LDAPMessage *msg);
static int append_text(void *reply, char *text, int len);
static int append_text(void *reply, char *text, ber_len_t len);
static int do_read (LDAP *ld, char *dn, char *rep, struct ldap_disptmpl *tmp);
static void report_ldap_err (LDAP *ldp, char *reply);
static void remove_trailing_space (char *s);
......@@ -290,7 +290,7 @@ append_entry_list( char *reply, char *query, LDAP *ldp, LDAPMessage *ldmsgp )
static int
append_text( void *reply, char *text, int len )
append_text( void *reply, char *text, ber_len_t len )
{
strcat( (char *) reply, text );
return( len );
......
......@@ -10859,16 +10859,30 @@ if test $cross_compiling = yes ; then
#define CROSS_COMPILING 1
EOF
cat >> confdefs.h <<\EOF
#define LBER_INT_T long
EOF
cat >> confdefs.h <<\EOF
#define LBER_TAG_T long
EOF
cat >> confdefs.h <<\EOF
#define LBER_SOCKET_T int
EOF
else
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
echo "configure:10865: checking whether byte ordering is bigendian" >&5
echo "configure:10879: checking whether byte ordering is bigendian" >&5
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF
#line 10872 "configure"
#line 10886 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
......@@ -10879,11 +10893,11 @@ int main() {
#endif
; return 0; }
EOF
if { (eval echo configure:10883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:10897: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
# It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <<EOF
#line 10887 "configure"
#line 10901 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
......@@ -10894,7 +10908,7 @@ int main() {
#endif
; return 0; }
EOF
if { (eval echo configure:10898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:10912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_bigendian=yes
else
......@@ -10914,7 +10928,7 @@ if test "$cross_compiling" = yes; then
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
#line 10918 "configure"
#line 10932 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
......@@ -10927,7 +10941,7 @@ main () {
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
if { (eval echo configure:10931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:10945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_bigendian=no
else
......@@ -10951,7 +10965,7 @@ EOF
fi
echo $ac_n "checking size of short""... $ac_c" 1>&6
echo "configure:10955: checking size of short" >&5
echo "configure:10969: checking size of short" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -10959,7 +10973,7 @@ else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
#line 10963 "configure"
#line 10977 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
......@@ -10970,7 +10984,7 @@ main()
exit(0);
}
EOF
if { (eval echo configure:10974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:10988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_short=`cat conftestval`
else
......@@ -10990,7 +11004,7 @@ EOF
echo $ac_n "checking size of int""... $ac_c" 1>&6
echo "configure:10994: checking size of int" >&5
echo "configure:11008: checking size of int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -10998,7 +11012,7 @@ else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
#line 11002 "configure"
#line 11016 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
......@@ -11009,7 +11023,7 @@ main()
exit(0);
}
EOF
if { (eval echo configure:11013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:11027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_int=`cat conftestval`
else
......@@ -11029,7 +11043,7 @@ EOF
echo $ac_n "checking size of long""... $ac_c" 1>&6
echo "configure:11033: checking size of long" >&5
echo "configure:11047: checking size of long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -11037,7 +11051,7 @@ else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
#line 11041 "configure"
#line 11055 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
......@@ -11048,7 +11062,7 @@ main()
exit(0);
}
EOF
if { (eval echo configure:11052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:11066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_long=`cat conftestval`
else
......@@ -11070,11 +11084,42 @@ EOF
if test "$ac_cv_sizeof_int" -lt 4 ; then
echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
cat >> confdefs.h <<\EOF
#define LBER_INT_T long
EOF
cat >> confdefs.h <<\EOF
#define LBER_TAG_T long
EOF
cat >> confdefs.h <<\EOF
#define LBER_SOCKET_T int
EOF
else
cat >> confdefs.h <<\EOF
#define LBER_INT_T int
EOF
cat >> confdefs.h <<\EOF
#define LBER_TAG_T long
EOF
cat >> confdefs.h <<\EOF
#define LBER_SOCKET_T int
EOF
fi
fi
cat >> confdefs.h <<\EOF
#define LBER_LEN_T long
EOF
echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
echo "configure:11078: checking for 8-bit clean memcmp" >&5
echo "configure:11123: checking for 8-bit clean memcmp" >&5
if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -11082,7 +11127,7 @@ else
ac_cv_func_memcmp_clean=no
else
cat > conftest.$ac_ext <<EOF
#line 11086 "configure"
#line 11131 "configure"
#include "confdefs.h"
main()
......@@ -11092,7 +11137,7 @@ main()
}
EOF
if { (eval echo configure:11096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:11141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_memcmp_clean=yes
else
......@@ -11110,12 +11155,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
echo $ac_n "checking for strftime""... $ac_c" 1>&6
echo "configure:11114: checking for strftime" >&5
echo "configure:11159: checking for strftime" >&5
if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 11119 "configure"
#line 11164 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char strftime(); below. */
......@@ -11138,7 +11183,7 @@ strftime();
; return 0; }
EOF
if { (eval echo configure:11142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:11187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_strftime=yes"
else
......@@ -11160,7 +11205,7 @@ else
echo "$ac_t""no" 1>&6
# strftime is in -lintl on SCO UNIX.
echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
echo "configure:11164: checking for strftime in -lintl" >&5
echo "configure:11209: checking for strftime in -lintl" >&5
ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -11168,7 +11213,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
#line 11172 "configure"
#line 11217 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
......@@ -11179,7 +11224,7 @@ int main() {
strftime()
; return 0; }
EOF
if { (eval echo configure:11183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:11228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -11207,12 +11252,12 @@ fi
echo $ac_n "checking for vprintf""... $ac_c" 1>&6
echo "configure:11211: checking for vprintf" >&5
echo "configure:11256: checking for vprintf" >&5
if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 11216 "configure"
#line 11261 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vprintf(); below. */
......@@ -11235,7 +11280,7 @@ vprintf();
; return 0; }
EOF
if { (eval echo configure:11239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:11284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_vprintf=yes"
else
......@@ -11259,12 +11304,12 @@ fi
if test "$ac_cv_func_vprintf" != yes; then
echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
echo "configure:11263: checking for _doprnt" >&5
echo "configure:11308: checking for _doprnt" >&5
if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 11268 "configure"
#line 11313 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _doprnt(); below. */
......@@ -11287,7 +11332,7 @@ _doprnt();
; return 0; }
EOF
if { (eval echo configure:11291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:11336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func__doprnt=yes"
else
......@@ -11316,12 +11361,12 @@ if test $ac_cv_func_vprintf = yes ; then
for ac_func in vsnprintf vsprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:11320: checking for $ac_func" >&5
echo "configure:11365: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 11325 "configure"
#line 11370 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
......@@ -11344,7 +11389,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:11348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:11393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
......@@ -11413,12 +11458,12 @@ for ac_func in \
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:11417: checking for $ac_func" >&5
echo "configure:11462: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 11422 "configure"
#line 11467 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
......@@ -11441,7 +11486,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:11445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:11490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
......@@ -11469,12 +11514,12 @@ done
for ac_func in getopt tempnam
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:11473: checking for $ac_func" >&5
echo "configure:11518: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 11478 "configure"
#line 11523 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
......@@ -11497,7 +11542,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:11501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:11546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
......@@ -11527,13 +11572,13 @@ done
# Check Configuration
echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
echo "configure:11531: checking declaration of sys_errlist" >&5
echo "configure:11576: checking declaration of sys_errlist" >&5
if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 11537 "configure"
#line 11582 "configure"
#include "confdefs.h"
#include <stdio.h>
......@@ -11543,7 +11588,7 @@ int main() {
char *c = (char *) *sys_errlist
; return 0; }
EOF
if { (eval echo configure:11547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:11592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ol_cv_dcl_sys_errlist=yes
else
......@@ -11563,20 +11608,20 @@ if test $ol_cv_dcl_sys_errlist = no ; then
EOF
echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
echo "configure:11567: checking existence of sys_errlist" >&5
echo "configure:11612: checking existence of sys_errlist" >&5
if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 11573 "configure"
#line 11618 "configure"
#include "confdefs.h"
#include <errno.h>
int main() {
char *c = (char *) *sys_errlist
; return 0; }
EOF
if { (eval echo configure:11580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:11625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_have_sys_errlist=yes
else
......@@ -11889,7 +11934,7 @@ tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
include/portable.h include/ldap_features.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
......@@ -12159,7 +12204,7 @@ ac_eD='%g'
if test "${CONFIG_HEADERS+set}" != set; then
EOF
cat >> $CONFIG_STATUS <<EOF
CONFIG_HEADERS="include/portable.h include/ldap_features.h"
CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
EOF
cat >> $CONFIG_STATUS <<\EOF
fi
......
......@@ -35,7 +35,7 @@ dnl We use autoconf features new to 2.13.
dnl aclocal.m4 should be built using aclocal from automake 1.4
AC_PREREQ(2.13)dnl Required Autoconf version
AC_CONFIG_HEADER(include/portable.h include/ldap_features.h)dnl
AC_CONFIG_HEADER(include/portable.h include/ldap_features.h include/lber_types.h)dnl
dnl
dnl Start Args
......@@ -1621,6 +1621,11 @@ OL_C_VOLATILE
if test $cross_compiling = yes ; then
AC_DEFINE(CROSS_COMPILING, 1, [define if cross compiling])
AC_DEFINE(LBER_INT_T,long)
AC_DEFINE(LBER_TAG_T,long)
AC_DEFINE(LBER_SOCKET_T,int)
else
AC_C_BIGENDIAN
AC_CHECK_SIZEOF(short)
......@@ -1629,9 +1634,19 @@ else
if test "$ac_cv_sizeof_int" -lt 4 ; then
AC_MSG_WARN([OpenLDAP requires 'int' to be 32 bits or greater.])
AC_DEFINE(LBER_INT_T,long)
AC_DEFINE(LBER_TAG_T,long)
AC_DEFINE(LBER_SOCKET_T,int)
else
AC_DEFINE(LBER_INT_T,int)
AC_DEFINE(LBER_TAG_T,long)
AC_DEFINE(LBER_SOCKET_T,int)
fi
fi
AC_DEFINE(LBER_LEN_T,long)
dnl ----------------------------------------------------------------
dnl Checks for library functions.
AC_FUNC_MEMCMP
......
......@@ -67,6 +67,7 @@
# define tcp_close( s ) closesocket( s );
# define ioctl( s, c, a ) ioctlsocket( (s), (c), (a) )
# define ioctl_t u_long
# define AC_SOCKET_INVALID ((unsigned int) ~0)
#define EWOULDBLOCK WSAEWOULDBLOCK
......@@ -92,12 +93,16 @@
# define ioctl_t int
#endif
#ifndef AC_SOCKET_INVALID
# define AC_SOCKET_INVALID (-1)
#endif
#if defined(__WIN32) && defined(_ALPHA)
/* NT on Alpha is hosed. */
#define AC_HTONL( l ) \
((((l)&0xff)<<24) + (((l)&0xff00)<<8) + \
(((l)&0xff0000)>>8) + (((l)&0xff000000)>>24))
#define AC_NTOHL(l) LBER_HTONL(l)
#define AC_NTOHL(l) AC_HTONL(l)
#elif defined(__alpha) && !defined(VMS)
/*
......@@ -116,5 +121,9 @@
#define AC_NTOHL( l ) ntohl( l )
#endif
/* htons()/ntohs() may be broken much like htonl()/ntohl() */
#define AC_HTONS( s ) htons( s )
#define AC_NTOHS( s ) ntohs( s )
#endif /* _AC_SOCKET_H_ */
......@@ -56,7 +56,7 @@ struct avlnode {
#endif /* AVL_INTERNALS */
typedef int (*AVL_APPLY) LDAP_P((void *, void*));
typedef int (*AVL_CMP) LDAP_P((void*, void*));
typedef int (*AVL_CMP) LDAP_P((const void*, const void*));
typedef int (*AVL_DUP) LDAP_P((void*, void*));
typedef void (*AVL_FREE) LDAP_P((void*));
......@@ -70,10 +70,10 @@ LDAP_F( void* )
avl_delete LDAP_P((Avlnode **, void*, AVL_CMP));
LDAP_F( void* )
avl_find LDAP_P((Avlnode *, void*, AVL_CMP));
avl_find LDAP_P((Avlnode *, const void*, AVL_CMP));
LDAP_F( void* )
avl_find_lin LDAP_P((Avlnode *, void*, AVL_CMP));
avl_find_lin LDAP_P((Avlnode *, const void*, AVL_CMP));
#ifdef AVL_NONREENTRANT
LDAP_F( void* )
......
......@@ -221,14 +221,15 @@ struct ldap_disptmpl {
#define LDAP_DTMPL_BUFSIZ 8192
typedef int (*ldap_writeptype) LDAP_P(( void *writeparm, char *p, int len ));
typedef int (*ldap_writeptype) LDAP_P((
void *writeparm, char *p, ber_len_t len ));
LDAP_F( int )
ldap_init_templates LDAP_P(( char *file, struct ldap_disptmpl **tmpllistp ));
LDAP_F( int )
ldap_init_templates_buf LDAP_P(( char *buf,
long buflen,
ber_len_t buflen,
struct ldap_disptmpl **tmpllistp ));