From 3e20891263f4d1dc36eb7172ec8ded5abea498ac Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 16 Sep 1998 02:47:02 +0000 Subject: [PATCH 001/148] Merge in platform updates from main. --- Make-common.gmake | 343 +++++++++++++++++++++ Makefile | 65 +++- build/platforms/freebsd2-gcc/Make-platform | 61 ++++ build/platforms/freebsd3-gcc/Make-platform | 49 +++ build/platforms/linux-gcc/Make-platform | 20 +- include/lthread.h | 53 +++- libraries/liblthread/thread.c | 178 ++++++++++- 7 files changed, 742 insertions(+), 27 deletions(-) create mode 100644 Make-common.gmake create mode 100644 build/platforms/freebsd2-gcc/Make-platform create mode 100644 build/platforms/freebsd3-gcc/Make-platform diff --git a/Make-common.gmake b/Make-common.gmake new file mode 100644 index 0000000000..fcbbd5fa1c --- /dev/null +++ b/Make-common.gmake @@ -0,0 +1,343 @@ +#----------------------------------------------------------------------------- +# Copyright 1998 The OpenLDAP Foundation, Redwood City, California, USA +# All rights reserved. +# +# Redistribution and use in source and binary forms are permitted only +# as authorized by the OpenLDAP Public License. A copy of this +# license is available at http://www.OpenLDAP.org/license.html or +# in file LICENSE in the top-level directory of the distribution. +# +# This work is derived from the University of Michigan LDAP v3.3 +# distribution. Information concerning is available at +# http://www.umich.edu/~dirsvcs/ldap/ldap.html. +# +# This work also contains materials derived from public sources. +#----------------------------------------------------------------------------- +# Copyright (c) 1994 Regents of the University of Michigan. +# All rights reserved. +# +# Redistribution and use in source and binary forms are permitted +# provided that this notice is preserved and that due credit is given +# to the University of Michigan at Ann Arbor. The name of the University +# may not be used to endorse or promote products derived from this +# software without specific prior written permission. This software +# is provided ``as is'' without express or implied warranty. +#----------------------------------------------------------------------------- +# LDAP common Make defines (included in all but top-level Makefile) + +############################################################################# +## Edit the following variables to have appropriate values for your system ## +############################################################################# + +# +# This template should be used by systems with Gnu Make. +# +# If Gnu make is not installed as make, you must uncomment out +# this line. +#MAKE=gmake + +############################################################################# +## LDAP install paths ## +############################################################################# +# by default, everything is installed below INSTROOT +# config files, etc. are put in ETCDIR +# include files get put in INCLUDEDIR +# libraries are put in LIBDIR +# man pages are put under MANDIR +# programs end-users will run are put in BINDIR +# programs sysadmins will run are put in SBINDIR +# servers are put in LIBEXECDIR +# pid/args files are put in RUNDIR +# +# Per platform defaults override these. +# +ifndef LDAP_PREFIX +LDAP_PREFIX= /usr/local +endif +ifndef LDAP_INSTROOT +LDAP_INSTROOT= $(LDAP_PREFIX) +endif +ifndef LDAP_ETCDIR +LDAP_ETCDIR= $(LDAP_INSTROOT)/etc/ldap +endif +ifndef LDAP_INCDIR +LDAP_INCDIR= $(LDAP_INSTROOT)/include +endif +ifndef LDAP_LIBDIR +LDAP_LIBDIR= $(LDAP_INSTROOT)/lib +endif +ifndef LDAP_MANDIR +LDAP_MANDIR= $(LDAP_INSTROOT)/man +endif +ifndef LDAP_BINDIR +LDAP_BINDIR= $(LDAP_INSTROOT)/bin +endif +ifndef LDAP_SBINDIR +LDAP_SBINDIR=$(LDAP_INSTROOT)/sbin +endif +ifndef LDAP_LIBEXECDIR +LDAP_LIBEXECDIR= $(LDAP_INSTROOT)/libexec +endif +ifndef LDAP_RUNDIR +LDAP_RUNDIR= $(LDAP_ETCDIR) +endif + +############################################################################# +## General compiler options ## +############################################################################# +# Passed to every compile (cc or gcc). This is where you put -O or -g, etc. +#EXTRACFLAGS=-O -g +#EXTRACFLAGS=-O +ifndef EXTRACFLAGS +EXTRACFLAGS?=-g +endif +# Passed to every link (ld). Include -g here if you did in EXTRACFLAGS. +ifndef EXTRALDFLAGS +EXTRALDFLAGS=-g +endif + +############################################################################# +## If you are NOT using Kerberos authentication, you can skip this section.## +############################################################################# +# +# Otherwise, to enable kerberos authentication, uncomment KERBEROS (and +# AFSKERBEROS if you are running the AFS version of kerberos). Also +# uncomment and change the various KRB* lines to point to where the +# kerberos libraries and include files are installed at your site. +# +# *** NOTE *** +# If you have an MIT Kerberos V distribution and you compiled it with -krb4 +# flag which enables Kerberos IV compatibility, uncomment KERBEROS_V - +# this will make sure all your includes can be found where they actually are - +# in this case /usr/local/kerberos/include/kerberosIV - simple change of +# KRBINCLUDEFLAG will _not_ work. Also uncomment the correct KRBLIBS define. +# +# For Kerberos V with Kerberos IV compatibility uncomment the following line +#KERBEROS=-DKERBEROS -DKERBEROS_V +# For Kerberos IV uncomment the following line +#KERBEROS=-DKERBEROS +# +#AFSKERBEROS=-DAFSKERBEROS +#KRBINCLUDEFLAG = -I/usr/local/kerberos/include +#KRBLIBFLAG = -L/usr/local/kerberos/lib +# For Kerberos V with Kerberos IV compatibility uncomment the following line +#KRBLIBS = -lkrb4 -lkrb5 -ldes425 +# For Kerberos IV uncomment the following line +#KRBLIBS = -lkrb -ldes + +############################################################################# +## ISODE is required ONLY to build the ldap <-> X.500 server (ldapd) ## +## If you don't want to build it, you can skip this section. ## +############################################################################# +# +# To build the ldap server, uncomment the HAVEISODE line, +# and the section describing build settings for your version of isode. +# +#HAVEISODE = yes +# If you compiled ISODE with TURBO_DISK defined, uncomment this +#ISODETURBOLIBS = -lgdbm +# uncomment these to have ldapd "pretty print" protocol elements w/debugging +#PEPSY_DUMP=-DPEPSY_DUMP +#PEPSY=/usr/local/ic/bin/pepsy +# uncommment this line to have ldapd load PP syntax handlers +# you'll also need to add -lpp to ISODEBASELIBS below +#LDAP_USE_PP=-DLDAP_USE_PP +# uncomment NO_SETPROCTITLE to have ldapd NOT change its title +#NO_SETPROCTITLE=-DNOSETPROCTITLE +# +# ISODE Consortium release build settings +# You should change the next line so that ICRELEASE matches the (integer) +# version number of whatever IC release you have, e.g. 1, 2, or 3 and +# also uncomment the next 5 lines. +#ICRELEASE=-DICRELEASE=1 +#ISODEPACKAGE=-DISODEPACKAGE=IC +#ISODEINCLUDEFLAG= -I/usr/local/ic/include/isode -I/usr/local/ic/include +#ISODELIBFLAG = -L/usr/local/ic/lib +#ISODEBASELIBS = -lisode +# +# Freely available ISODE 8.0 release build settings (uncomment the next 4 lines) +#ISODEPACKAGE=-DISODEPACKAGE +#ISODEINCLUDEFLAG= -I/usr/local/isode/include +#ISODELIBFLAG = -L/usr/local/isode/lib +#ISODEBASELIBS = -ldsap -lisode +# +# NEXOR ISODE release build settings (uncomment the next 4 lines) +#ISODEPACKAGE=-DISODEPACKAGE=XT +#ISODEINCLUDEFLAG= -I/usr/include/isode +#ISODELIBFLAG = -L/usr/local/lib -L/usr/sunlink/osi/lib +#ISODEBASELIBS = -lxtpp -lresolv -lxtdsap -lxtisode -losi + +############################################################################# +## If you don't want to run slapd, skip this section. ## +############################################################################# +# +# To build slapd (the stand-alone ldap daemon), uncomment the MAKESLAPD +# line and select the SLAPD_BACKENDS you want to use. If you enable the +# LDBM backend, also select one of the LDBM backends. +MAKESLAPD= yes +# +# remove the defines for backends you don't want to enable +SLAPD_BACKENDS= -DLDAP_LDBM -DLDAP_SHELL -DLDAP_PASSWD +# +# If you have included -DLDAP_LDBM in the SLAPD_BACKENDS line, +# which low-level database package to use must be specified. You +# may want to overide the platform settings by disabling the lines +# below and hardcoding the desired settings. +# +# The four choices: Berkeley db b-tree, Berkeley db hash, GNU dbm, or ndbm. +# You will also need to edit the include and lib strings appropriately. +# standard unix ndbm + +# Fallback settings, defaults are set in build/*/Make-platform +# The NDBM interface may not work on some (any) platforms. +# You may be happier with Berkeley DB B-trees. +ifndef LDBMBACKEND +LDBMBACKEND=-DLDBM_USE_NDBM +endif +ifndef LDBMINCLUDE +LDBMINCLUDE= +endif +ifndef LDBMLIB +LDBMLIB= +endif + +# LDBM Hardcode Setting Examples (may require editing) +# berkeley db btree package +#LDBMLIB=-ldb +#LDBMBACKEND=-DLDBM_USE_DBBTREE +#LDBMINCLUDE=-I/usr/local/db/include +#LDBMLIB?=-ldb +# berkeley db hash package +#LDBMBACKEND=-DLDBM_USE_DBHASH +#LDBMINCLUDE=-I/usr/local/db/include +#LDBMLIB=-ldb +# gnu dbm (gdbm) +#LDBMBACKEND=-DLDBM_USE_GDBM +#LDBMINCLUDE=-I/usr/local/gdbm/include +#LDBMLIB=-lgdbm + +#undef these if you have SleepyCat DB2 installed the updated DBI +#LDBMBACKEND=-DLDBM_USE_DBBTREE -DLDBM_USE_DB2 +#LDBMINCLUDE=-I/usr/local/include +#LDBMLIB=-L/usr/local/lib -ldb + +#undef these if you have SleepyCat DB2 installed (with compat185) +#LDBMBACKEND=-DLDBM_USE_DBBTREE -DLDBM_USE_DB2_COMPAT185 +#LDBMINCLUDE=-I/usr/local/include +#LDBMLIB=-L/usr/local/lib -ldb + +# if you want to use a non-default threads package change the defines below +# to one of: +# -DPOSIX_THREADS (draft 10 or standard) +# -DTHREAD_MIT_PTHREADS (draft 4) +# -DTHREAD_NEXT_CTHREADS +# -DTHREAD_DCE_PTHREADS +# -DTHREAD_SUNOS4_LWP +# -DTHREAD_SUNOS5_LWP +# and select the appropriate library. + +ifndef THREADS +THREADS=-DNO_THREADS +endif +ifndef THREADSLIB +THREADSLIB= +endif + +# Locations of auxilary programs +# (excepts to below are generally defined in Make-platform) +ifndef LDAP_SENDMAIL +LDAP_SENDMAIL=/usr/lib/sendmail +endif +ifndef LDAP_EDITOR +LDAP_EDITOR=/usr/ucb/vi +endif +ifndef LDAP_FINGER +LDAP_FINGER=/usr/ucb/finger +endif + +# For generation of compressed man pages +# (excepts to below are generally defined in Make-platform) +ifndef MANCOMPRESS +MANCOMPRESS=cat +endif +ifndef MANCOMPRESSSUFFIX +MANCOMPRESSSUFFIX= +endif + +############################################################################# +## The following options are used by the xax500 client. If you haven't ## +## retrieved the xax500 source and dropped it into the "clients" ## +## directory, you can skip this section. ## +############################################################################# +# +# location of your X include files +#XINCLUDES= -I/usr/X11/include +# +# location of your X libraries +#XLIBDIRS=-L/usr/X11/lib +# +# include any extra X libraries you need here +# the following works with sunos 4 and X11R5 +#XLIBS = $(XLIBDIRS) -lXm -lXt -lX11 +# the following has been known to work with Solaris 2.4 and X11R6 +#XLIBS = $(XLIBDIRS) -lXm -lXext -lSM -lICE -lXpm -lXt -lX11 + +############################################################################# +## If you don't want to do auto-translation of character sets, skip this ## +############################################################################# +# +# Otherwise, uncomment this line and set the following options. +#STR_TRANSLATION=-DSTR_TRANSLATION +# +# remove the defines for LDAP client library T.61 character translation +# you do not need. If you use LDAP_CHARSET_8859, replace the '1' in "88591" +# with the number of the particular character set you use. E.g., use "88594" +# if you use the ISO 8859-4 chracter set. +#LIBLDAP_CHARSETS=-DLDAP_CHARSET_8859="88591" +# +# uncomment one these lines to enable automatic T.61 translation by default +#LIBLDAP_DEF_CHARSET=-DLDAP_DEFAULT_CHARSET=LDAP_CHARSET_8859 + +############################################################################# +## General options ## +############################################################################# +# uncomment this line to enable debugging code (a good idea) +LDAP_DEBUG=-DLDAP_DEBUG + +# uncomment this line to turn on a few U of Michigan specific things +#UOFM=-DUOFM + +# uncomment this line to delete a few printfs in the lber and ldap libraries. +#NO_USERINTERFACE=-DNO_USERINTERFACE + +# uncomment this line to include Connectionless LDAP support +#CLDAP=-DCLDAP + +# uncomment this line to eliminate local caching support in the libldap +#NO_CACHE=-DNO_CACHE + +# uncomment this line to do reverse lookups (useful for doing ACLs +# by host/domain names) +LDAP_REVERSE_LOOKUP=-DREVERSE_LOOKUP + +# uncomment this line to enable support for LDAP referrals in libldap +LDAP_REFERRALS=-DLDAP_REFERRALS + +# uncomment this line to enable ACL by groups +# LDAP_ACLGROUP=-DACLGROUP + +# uncomment these lines to enable support for CRYPT, SHA1, and/or MD5 passwords +# in LDBM. Crypt uses platform provided crypt(3). +# LDAP_CRYPT=-DLDAP_CRYPT -DLDAP_SHA1 -DLDAP_MD5 +# LDAP_CRYPT_LIB= +# and comment this line out +LDAP_CRYPT_LIB= + +# uncomment these lines to enable support fro tcp_wrappers in servers. +# Requires tcp_wrappers. +# LDAP_TCP_WRAPPERS=-DTCP_WRAPPERS -I/usr/local/include +# LDAP_TCP_WRAPPERS_LIB=-L/usr/local/lib -lwrap + +# uncomment this line to use soundex for approximate matches in slapd. +# the default is to use the metaphone algorithm. +#PHONETIC=-DSOUNDEX diff --git a/Makefile b/Makefile index a8103f2270..59df0cdc46 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,19 @@ -# # You will usually NOT need to edit this file at all: instead, edit the # Make-common file. See the LDAP INSTALL file for more information. -# +#----------------------------------------------------------------------------- +# Copyright 1998 The OpenLDAP Foundation, Redwood City, California, USA +# All rights reserved. +# +# Redistribution and use in source and binary forms are permitted only +# as authorized by the OpenLDAP Public License. A copy of this +# license is available at http://www.OpenLDAP.org/license.html or +# in file LICENSE in the top-level directory of the distribution. +# +# This work is derived from the University of Michigan LDAP v3.3 +# distribution. Information concerning is available at +# http://www.umich.edu/~dirsvcs/ldap/ldap.html. +# +# This work also contains materials derived from public sources. #----------------------------------------------------------------------------- # Copyright (c) 1994 Regents of the University of Michigan. # All rights reserved. @@ -12,10 +24,8 @@ # may not be used to endorse or promote products derived from this # software without specific prior written permission. This software # is provided ``as is'' without express or implied warranty. -# -# LDAP lightweight X.500 Directory access top level makefile -# #----------------------------------------------------------------------------- +# LDAP lightweight X.500 Directory access top level makefile # ############################################################################ # # @@ -161,8 +171,8 @@ depend: makeconfig for i in $(SRCDIRS); do \ echo; echo "cd $$i; $(MAKE) $(MFLAGS) depend"; \ ( cd $$i; $(MAKE) $(MFLAGS) depend ); \ - done; \ - $(MAKE) $(MFLAGS) makefiles + done; + @echo " "; echo Remember to \"make depend\" after each \"make makefiles\" # # rules to check out and in Make-template files @@ -202,16 +212,17 @@ checkin: FORCE done tar: veryclean +# $(RM) ./Make-common; \ +# $(CP) ./Make-common.dist ./Make-common; \ +# $(CHMOD) 644 ./Make-common; \ +# $(RM) ./include/ldapconfig.h.edit; \ +# $(CP) ./include/ldapconfig.h.dist ./include/ldapconfig.h.edit; \ +# $(CHMOD) 644 ./include/ldapconfig.h.edit; @PWD=`pwd`; \ - $(RM) ./Make-common; \ - $(CP) ./Make-common.dist ./Make-common; \ - $(CHMOD) 644 ./Make-common; \ - $(RM) ./include/ldapconfig.h.edit; \ - $(CP) ./include/ldapconfig.h.dist ./include/ldapconfig.h.edit; \ - $(CHMOD) 644 ./include/ldapconfig.h.edit; \ BASE=`$(BASENAME) $$PWD`; XFILE=/tmp/ldap-x.$$$$; \ ( cd .. ; $(CAT) $$BASE/exclude >$$XFILE; \ $(FIND) $$BASE -name RCS -print >> $$XFILE ; \ + $(FIND) $$BASE -name CVS -print >> $$XFILE ; \ $(FIND) $$BASE -name obj-\* -print >> $$XFILE ; \ $(FIND) $$BASE -name tags -print >> $$XFILE ; \ $(TAR) cvfX ./$$BASE.tar $$XFILE $$BASE; \ @@ -256,7 +267,12 @@ makeconfig: .makefiles buildtools echo "SunOS release $$OSRELEASE unknown..."; exit 1; \ fi; \ if [ $$OSRELEASE -ge "5" ]; then \ - PLATFORM="sunos5"; \ + MINORVER=`echo $$OSRELEASE|sed 's/^.*\.//'` ; \ + if [ $$MINORVER -ge "6" ]; then \ + PLATFORM="sunos56" ; \ + else \ + PLATFORM="sunos5"; \ + fi; \ else \ PLATFORM="sunos4"; \ fi; \ @@ -279,8 +295,16 @@ makeconfig: .makefiles buildtools NetBSD) \ PLATFORM="netbsd" \ ;; \ + OpenBSD) \ + PLATFORM="openbsd" \ + ;; \ FreeBSD) \ - PLATFORM="freebsd" \ + MAJRELEASE=`echo $$OSRELEASE | sed 's/\..*//'` ; \ + if [ $$MAJRELEASE -lt 3 ]; then \ + PLATFORM="freebsd2" ; \ + else \ + PLATFORM="freebsd3" ; \ + fi; \ ;; \ NeXTSTEP) \ PLATFORM="nextstep" \ @@ -312,6 +336,15 @@ makeconfig: .makefiles buildtools echo "** Set platform to $$PLATFORM with compiler $$CC..."; \ echo "" +Make-common: Make-common.dist + @if [ -f Make-common ]; then \ + echo "Make-common.dist newer than Make-common, check for new options" ;\ + echo "or touch Make-common to ignore."; \ + exit 1; \ + fi; \ + echo "Copy Make-common.dist or Make-common.gmake to Make-common"; \ + echo " Edit as needed before making!" ; \ + exit 1 # # rule to build Makefiles by concatenating Make-template file in each # subdirectory with global Make-common, .make-platform, and @@ -334,7 +367,6 @@ makeconfig: .makefiles buildtools echo " creating $$i/Makefile"; \ $(RM) $$i/Makefile; \ $(CAT) $$HDRFILE $$i/Make-template $$DEFSFILE > $$i/Makefile; \ - $(CHMOD) 444 $$i/Makefile; \ fi; \ done; \ $(RM) .makefiles; \ @@ -347,6 +379,7 @@ makeconfig: .makefiles buildtools makefiles: FORCE $(RM) .makefiles $(MAKE) $(MFLAGS) .makefiles + @echo "Please \"make depend\" before building." # # rule to create any tools we need to build everything else diff --git a/build/platforms/freebsd2-gcc/Make-platform b/build/platforms/freebsd2-gcc/Make-platform new file mode 100644 index 0000000000..037ab3fec0 --- /dev/null +++ b/build/platforms/freebsd2-gcc/Make-platform @@ -0,0 +1,61 @@ +# +# LDAP FreeBSD GNU C Make-platform file +# + + +# +# add any platform-specific overrides below here +# +EXTRACFLAGS=-O -g +LDBMBACKEND=-DLDBM_USE_DBBTREE +LDBMINCLUDE=-I/usr/include + +EDITOR=/usr/bin/vi +FINGER=/usr/bin/finger +SENDMAIL=/usr/sbin/sendmail + +LDAP_RUNDIR=/var/run + +MANCOMPRESS=gzip +MANCOMPRESSSUFFIX=.gz + +# On most (if not all) 2.X versions of FreeBSD, Pthread(3) is not +# installed by default. As such, -DNO_THREADS is used by default +# on FreeBSD 2.X. +# +# FreeBSD 2.2.5 comes with a Chris Provenzano Pthreads +# package, # but it must be manually built. See pthread(3) for details. +# OpenLDAP is compatible with this version, uncomment the following +# options: +# +#THREADS= -DPOSIX_THREADS -D_THREAD_SAFE \ +# -DPTHREAD_PREEMPTIVE -DSCHED_YIELD_MISSING +#THREADSLIB= -lc_r +# +# Some versions of FreeBSD support the gcc option "-pthread" to +# link with -lc_r. On those systems, uncomment the following: +#THREADSLIB= -pthread +# +# +# If the only thread package available is only Draft 4 compliant, +# you can try the following: +#THREADS= -DTHREAD_MIT_PTHREADS -D_THREAD_SAFE -DPTHREAD_PREEMPTIVE +# +# Note: +# LDAP has a problem with the idea of implicit vs. explicit yields +# in call conversion threading packages, like the MIT pthreads +# package. Rather than resolve this globally, I (Terry Lambert) have +# marked the threading as "preeemptive", even though it is +# technically not. +# This means that the implicit-yield threading is topologically +# equivalent to preemptive threading. + +# crypt(3) is in a separate library +LDAP_CRYPT_LIB= -lcrypt + +# +# ------------------------------------------------------------------------- +# you will probably not need to edit anything below this point +# ------------------------------------------------------------------------- +CC = gcc +PLATFORMCFLAGS= -Dfreebsd diff --git a/build/platforms/freebsd3-gcc/Make-platform b/build/platforms/freebsd3-gcc/Make-platform new file mode 100644 index 0000000000..23d0b69e6b --- /dev/null +++ b/build/platforms/freebsd3-gcc/Make-platform @@ -0,0 +1,49 @@ +# +# LDAP FreeBSD GNU C Make-platform file +# + +# +# add any platform-specific overrides below here +# + +LDBMBACKEND=-DLDBM_USE_DBBTREE +LDBMINCLUDE=-I/usr/include + +EDITOR=/usr/bin/vi +FINGER=/usr/bin/finger +SENDMAIL=/usr/sbin/sendmail + +LDAP_RUNDIR=/var/run + +MANCOMPRESS=gzip +MANCOMPRESSSUFFIX=.gz + +# +# LDAP has a problem with the idea of implicit vs. explicit yields +# in call conversion threading packages, like the MIT pthreads +# package. Rather than resolve this globally, I have marked the +# threading as "preeemptive", even though it is technically not. +# +# This means that the implicit-yield threading is topologically +# equivalent to preemptive threading. +# +THREADS= -DPOSIX_THREADS -D_THREAD_SAFE -DPTHREAD_PREEMPTIVE + +# use special gcc flag to include libc_r.a +THREADSLIB= -pthread +#THREADSLIB= -lc_r + +# if you built/installed with -DNOLIBC_R, you'll need uncomment +# out the following +#THREADS= -DNO_THREADS -DPTHREAD_PREEMPTIVE +#THREADSLIB= + +# crypt(3) is in a separate library +LDAP_CRYPT_LIB= -lcrypt + +# +# ------------------------------------------------------------------------- +# you will probably not need to edit anything below this point +# ------------------------------------------------------------------------- +CC = gcc +PLATFORMCFLAGS= -Dfreebsd diff --git a/build/platforms/linux-gcc/Make-platform b/build/platforms/linux-gcc/Make-platform index 45f3823921..17798f5486 100644 --- a/build/platforms/linux-gcc/Make-platform +++ b/build/platforms/linux-gcc/Make-platform @@ -6,12 +6,22 @@ # add any platform-specific overrides below here # - -# -# ------------------------------------------------------------------------- -# you will probably not need to edit anything below this point -# ------------------------------------------------------------------------- +EXTRACFLAGS=-O -g CC = gcc RANLIB = "ranlib" +LDBMBACKEND=-DLDBM_USE_GDBM +LDBMLIB=-lgdbm + PLATFORMCFLAGS= -Dlinux + +# not all versions of Linux support POSIX Threads +#THREADS=-DPOSIX_THREADS -DREENTRANT +#THREADSLIB=-lpthread + +# crypt(3) is in -lcrypt on some versions of Linux +#LDAP_CRYPT_LIB= -lcrypt + +LDAP_SENDMAIL=/usr/sbin/sendmail +LDAP_EDITOR=/bin/vi +LDAP_FINGER=/usr/bin/finger diff --git a/include/lthread.h b/include/lthread.h index d1b34d8ecf..d3fd3d0ec6 100644 --- a/include/lthread.h +++ b/include/lthread.h @@ -3,7 +3,40 @@ #ifndef _LTHREAD_H #define _LTHREAD_H -#if defined( THREAD_SUNOS4_LWP ) +#if defined ( THREAD_NEXT_CTHREADS ) + +#define _THREAD + +#include + +typedef cthread_fn_t VFP; +typedef int pthread_attr_t; +typedef cthread_t pthread_t; + +/* default attr states */ +#define pthread_mutexattr_default NULL +#define pthread_condattr_default NULL + +/* thread state - joinable or not */ +#define PTHREAD_CREATE_JOINABLE 0 +#define PTHREAD_CREATE_DETACHED 1 +/* thread scope - who is in scheduling pool */ +#define PTHREAD_SCOPE_PROCESS 0 +#define PTHREAD_SCOPE_SYSTEM 1 + +/* mutex attributes and mutex type */ +typedef int pthread_mutexattr_t; +typedef struct mutex pthread_mutex_t; + +/* mutex and condition variable scope - process or system */ +#define PTHREAD_SHARE_PRIVATE 0 +#define PTHREAD_SHARE_PROCESS 1 + +/* condition variable attributes and condition variable type */ +typedef int pthread_condattr_t; +typedef struct condition pthread_cond_t; + +#elif defined( THREAD_SUNOS4_LWP ) /*********************************** * * * thread definitions for sunos4 * @@ -66,9 +99,11 @@ typedef void *(*VFP)(); /* sunos5 threads are preemptive */ #define PTHREAD_PREEMPTIVE 1 +#if !defined(__SunOS_5_6) /* thread attributes and thread type */ typedef int pthread_attr_t; typedef thread_t pthread_t; +#endif /* ! sunos56 */ /* default attr states */ #define pthread_mutexattr_default NULL @@ -81,17 +116,21 @@ typedef thread_t pthread_t; #define PTHREAD_SCOPE_PROCESS 0 #define PTHREAD_SCOPE_SYSTEM THR_BOUND +#if !defined(__SunOS_5_6) /* mutex attributes and mutex type */ typedef int pthread_mutexattr_t; typedef mutex_t pthread_mutex_t; +#endif /* ! sunos56 */ /* mutex and condition variable scope - process or system */ #define PTHREAD_SHARE_PRIVATE USYNC_THREAD #define PTHREAD_SHARE_PROCESS USYNC_PROCESS +#if !defined(__SunOS_5_6) /* condition variable attributes and condition variable type */ typedef int pthread_condattr_t; typedef cond_t pthread_cond_t; +#endif /* ! sunos56 */ #else /* end sunos5 */ @@ -127,6 +166,18 @@ typedef cond_t pthread_cond_t; #define pthread_attr_setdetachstate( a, b ) \ pthread_attr_setdetach_np( a, b ) +#else /* end dce pthreads */ + +#if defined( POSIX_THREADS ) + +#define _THREAD + +#include + +#define pthread_mutexattr_default NULL +#define pthread_condattr_default NULL + +#endif /* posix threads */ #endif /* dce pthreads */ #endif /* mit pthreads */ #endif /* sunos5 */ diff --git a/libraries/liblthread/thread.c b/libraries/liblthread/thread.c index 89a85c70b4..12574d0606 100644 --- a/libraries/liblthread/thread.c +++ b/libraries/liblthread/thread.c @@ -2,7 +2,157 @@ #include #include "lthread.h" -#if defined( THREAD_SUNOS4_LWP ) +#if defined( THREAD_NEXT_CTHREADS ) + +/*********************************************************************** + * * + * under NEXTSTEP or OPENSTEP use CThreads * + * lukeh@xedoc.com.au * + * * + ***********************************************************************/ + +int +pthread_attr_init( pthread_attr_t *attr ) +{ + *attr = 0; + return( 0 ); +} + +int +pthread_attr_destroy( pthread_attr_t *attr ) +{ + return( 0 ); +} + +int +pthread_attr_getdetachstate( pthread_attr_t *attr, int *detachstate ) +{ + *detachstate = *attr; + return( 0 ); +} + +int +pthread_attr_setdetachstate( pthread_attr_t *attr, int detachstate ) +{ + *attr = detachstate; + return( 0 ); +} + +/* ARGSUSED */ +int +pthread_create( + pthread_t *tid, + pthread_attr_t *attr, + VFP func, + void *arg +) +{ + *tid = cthread_fork(func, arg); + return ( *tid == NULL ? -1 : 0 ); +} + +void +pthread_yield() +{ + cthread_yield(); +} + +void +pthread_exit( any_t a ) +{ + cthread_exit( a ); +} + +void +pthread_join( pthread_t tid, int *pStatus ) +{ + int status; + status = (int) cthread_join ( tid ); + if (pStatus != NULL) + { + *pStatus = status; + } +} + +/* ARGSUSED */ +void +pthread_kill( pthread_t tid, int sig ) +{ + return; +} + +/* ARGSUSED */ +int +pthread_mutex_init( pthread_mutex_t *mp, pthread_mutexattr_t *attr ) +{ + mutex_init( mp ); + mp->name = NULL; + return ( 0 ); +} + +int +pthread_mutex_destroy( pthread_mutex_t *mp ) +{ + mutex_clear( mp ); + return ( 0 ); +} + +int +pthread_mutex_lock( pthread_mutex_t *mp ) +{ + mutex_lock( mp ); + return ( 0 ); +} + +int +pthread_mutex_unlock( pthread_mutex_t *mp ) +{ + mutex_unlock( mp ); + return ( 0 ); +} + +int +pthread_mutex_trylock( pthread_mutex_t *mp ) +{ + return mutex_try_lock( mp ); +} + +int +pthread_cond_init( pthread_cond_t *cv, pthread_condattr_t *attr ) +{ + condition_init( cv ); + return( 0 ); +} + +int +pthread_cond_destroy( pthread_cond_t *cv ) +{ + condition_clear( cv ); + return( 0 ); +} + +int +pthread_cond_wait( pthread_cond_t *cv, pthread_mutex_t *mp ) +{ + condition_wait( cv, mp ); + return( 0 ); +} + +int +pthread_cond_signal( pthread_cond_t *cv ) +{ + condition_signal( cv ); + return( 0 ); +} + +int +pthread_cond_broadcast( pthread_cond_t *cv ) +{ + condition_broadcast( cv ); + return( 0 ); +} + +#elif defined( THREAD_SUNOS4_LWP ) /*********************************************************************** * * @@ -44,7 +194,7 @@ pthread_attr_setdetachstate( pthread_attr_t *attr, int detachstate ) int pthread_create( pthread_t *tid, - pthread_attr_t attr, + pthread_attr_t *attr, VFP func, void *arg ) @@ -178,6 +328,7 @@ pthread_cond_broadcast( pthread_cond_t *cv ) * * ***********************************************************************/ +#if !defined(__SunOS_5_6) int pthread_attr_init( pthread_attr_t *attr ) { @@ -210,13 +361,14 @@ pthread_attr_setdetachstate( pthread_attr_t *attr, int detachstate ) int pthread_create( pthread_t *tid, - pthread_attr_t attr, + pthread_attr_t *attr, VFP func, void *arg ) { - return( thr_create( NULL, 0, func, arg, attr, tid ) ); + return( thr_create( NULL, 0, func, arg, *attr, tid ) ); } +#endif /* ! sunos56 */ void pthread_yield() @@ -224,6 +376,7 @@ pthread_yield() thr_yield(); } +#if !defined(__SunOS_5_6) void pthread_exit() { @@ -302,6 +455,7 @@ pthread_cond_broadcast( pthread_cond_t *cv ) { return( cond_broadcast( cv ) ); } +#endif /* ! sunos56 */ #else /* end sunos5 threads */ @@ -333,6 +487,20 @@ pthread_kill( pthread_t tid, int sig ) kill( getpid(), sig ); } +#else + +#if defined ( POSIX_THREADS ) + +#ifndef SCHED_YIELD_MISSING +#include + +void pthread_yield( void ) +{ + sched_yield(); +} +#endif + +#endif /* posix threads */ #endif /* dce pthreads */ #endif /* mit pthreads */ #endif /* sunos5 lwp */ @@ -379,7 +547,7 @@ pthread_attr_setdetachstate( pthread_attr_t *attr, int detachstate ) int pthread_create( pthread_t *tid, - pthread_attr_t attr, + pthread_attr_t *attr, VFP func, void *arg ) From 0b36640136e703d963310875c420a9012d512dc7 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 16 Sep 1998 03:01:24 +0000 Subject: [PATCH 002/148] From BOOLEAN_LDAP --- configure.in | 323 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 323 insertions(+) create mode 100644 configure.in diff --git a/configure.in b/configure.in new file mode 100644 index 0000000000..1e84b4974e --- /dev/null +++ b/configure.in @@ -0,0 +1,323 @@ +dnl +dnl Configure.in +dnl +AC_INIT(include/ldap.h) +dnl +dnl +AC_PREREQ(2.10)dnl Required Autoconf version +dnl Do not use AutoConf 2.12; it produces a configuration script +dnl that causes an "internal 2K buffer" error on HPUX when run +dnl with /bin/sh. Autoconf 2.10 seems to be okay. +AC_CONFIG_AUX_DIR(etc) +AC_CONFIG_HEADER(include/portable.h)dnl +dnl +dnl Start Args +AC_MSG_CHECKING(arguments) +AC_PREFIX_DEFAULT(/usr/local) + +dnl general options +CF_ARG_OPTION(debug,[ --enable-debug enable debugging (yes)],[ + LDAP_DEBUG=no],[LDAP_DEBUG=yes],yes)dnl +CF_ARG_OPTION(cache,[ --enable-cache enable caching (yes)],[ + LDAP_CACHE=no],[LDAP_CACHE=yes],yes)dnl +CF_ARG_OPTION(referrals,[ --enable-referrals enable referrals (yes)],[ + LDAP_REFERRALS=no],[LDAP_REFERRALS=yes],yes)dnl + +CF_ARG_OPTION(cldap,[ --enable-clapd enable connectionless ldap (no)],[ + LDAP_CLDAP=yes],[LDAP_CLDAP=no],no)dnl +CF_ARG_OPTION(phonetic,[ --enable-phonetic enable phonetic/soundex (no)],[ + LDAP_PHONETIC=yes],[LDAP_PHONETIC=no],no)dnl + +dnl server options +CF_ARG_OPTION(ldapd,[ --enable-ldapd enable building ldapd (no)],[ + BUILD_LDAPD=yes],[BUILD_LDAPD=no],no)dnl +CF_ARG_OPTION(slapd,[ --enable-slapd enable building slapd (yes)],[ + BUILD_SLAPD=no],[BUILD_SLAPD=yes],yes)dnl +CF_ARG_OPTION(slurpd,[ --enable-slurpd enable building slurpd (yes)],[ + BUILD_SLURPD=no],[BUILD_SLURPD=yes],yes)dnl + +dnl Backend options +CF_ARG_OPTION(ldbm,[ --enable-ldbm enable ldbm backend (yes)],[ + BUILD_LDBM=no],[BUILD_LDBM=yes],yes)dnl +CF_ARG_OPTION(passwd,[ --enable-passwd enable passwd backend (yes)],[ + BUILD_PASSWD=no],[BUILD_PASSWD=yes],yes)dnl +CF_ARG_OPTION(shell,[ --enable-shell enable shell backend (yes)],[ + BUILD_SHELL=no],[BUILD_SHELL=yes],yes)dnl + +AC_ARG_WITH(ndbm,[ --with-ndbm use NDB for LDBM backend (any)],[ + opt_ndbm=yes],[opt_ndbm=no]) +AC_ARG_WITH(gdbm,[ --with-gdbm use GDBM for LDBM backend (any)],[ + opt_gdbm=yes],[opt_gdbm=no]) +AC_ARG_WITH(dbhash,[ --with-dbhash use Berkeley DB Hash for LDBM backend (any)],[ + opt_dbhash=yes],[opt_dbhash=no]) +AC_ARG_WITH(dbbtree,[ --with-dbbtree use Berkeley DB Btrees for LDBM backend (any)],[ + opt_dbbtree=yes],[opt_dbbtree=no]) + +AC_ARG_WITH(kerberos,[ --with-kerberos use Kerberos (no)],[ + opt_kerberos=yes],[opt_kerberos=no]) +AC_ARG_WITH(kerberos-afs,[ --with-kerberos-afs use AFS Kerberos (no)],[ + opt_kerberos_afs=yes],[opt_kerberos_afs=no]) +AC_ARG_WITH(threads,[ --with-threads use threads (yes)],[ + opt_threads=yes],[opt_threads=no]) + +AC_MSG_RESULT(done) + +AC_MSG_CHECKING(LDBM preferences) +ldbm_prefer=any + +if test "$opt_ndbm" = yes ; then + ldbm_prefer=ndbm +fi +if test "$opt_gdbm" = yes ; then + ldbm_prefer=gdbm +fi +if test "$opt_dbhash" = yes ; then + ldbm_prefer=dbhash +fi +if test "$opt_dbbtree" = yes ; then + ldbm_prefer=dbbtree +fi +AC_MSG_RESULT($ldbm_prefer) + +if test "$BUILD_SLAPD" != "yes" ; then + BUILD_SLURPD="no" + BUILD_LDBM="no" + BUILD_PASSWD="no" + BUILD_SHELL="no" + ldbm_prefer="none" +fi + +AC_SUBST(BUILD_LDAPD) +AC_SUBST(BUILD_SLAPD) +AC_SUBST(BUILD_SLURPD) + +AC_SUBST(BUILD_LDBM) +AC_SUBST(BUILD_PASSWD) +AC_SUBST(BUILD_SHELL) + +LDAP_DEFS= + +if test "$LDAP_DEBUG" = "yes" ; then + LDAP_DEFS="$LDAP_DEFS -DLDAP_DEBUG" +fi +if test "$LDAP_REFERRALS" = "yes" ; then + AC_DEFINE(LDAP_REFERRALS) +dnl LDAP_DEFS="$LDAP_DEFS -DLDAP_REFERRALS" +fi +if test "$LDAP_CACHE" = "no" ; then + AC_DEFINE(LDAP_NOCACHE,1) + LDAP_DEFS="$LDAP_DEFS -DNO_CACHE" +fi +if test "$LDAP_CLDAP" = "yes" ; then + AC_DEFINE(LDAP_CONN_LESS,1) + LDAP_DEFS="$LDAP_DEFS -DCLDAP" +fi +if test "$LDAP_PHONETIC" = "yes" ; then + AC_DEFINE(LDAP_PHONETIC,1) + LDAP_DEFS="$LDAP_DEFS -DSOUNDEX" +fi + +if test "$BUILD_LDBM" = "yes" ; then + AC_DEFINE(LDAP_LDBM,1) +dnl LDAP_DEFS="$LDAP_DEFS -DLDAP_LDBM" +fi +if test "$BUILD_PASSWD" = "yes" ; then + AC_DEFINE(LDAP_PASSWD,1) +dnl LDAP_DEFS="$LDAP_DEFS -DLDAP_PASSWD" +fi +if test "$BUILD_SHELL" = "yes" ; then + AC_DEFINE(LDAP_SHELL,1) +dnl LDAP_DEFS="$LDAP_DEFS -DLDAP_SHELL" +fi + +dnl End Args + +dnl Checks for programs. +AC_PROG_CC +AC_PROG_GCC_TRADITIONAL + +AC_PROG_LN_S +AC_PROG_INSTALL +AC_PROG_RANLIB +AC_PROG_MAKE_SET + +AC_PATH_PROG(SENDMAIL, sendmail, /usr/lib/sendmail, + $PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:etc) +AC_PATH_PROG(EDITOR, vi, /usr/ucb/vi, + $PATH:/usr/ucb) +AC_PATH_PROG(FINGER, finger, /usr/ucb/finger, + $PATH:/usr/ucb) + +ldbm_use="none" +LIBDB="" + +if test "$BUILD_LDBM" = "yes" ; then + if test $ldbm_prefer = any -o $ldbm_prefer = dbbtree \ + -o $ldbm_prefer = dbhash ; then + AC_CHECK_FUNC(dbopen,[ + ldbm_use=$ldbm_prefer + ldbm_prefer=found],[ + AC_CHECK_LIB(db,dbopen,[ + ldbm_use=$ldbm_prefer + ldbm_prefer=found + LIBDB="-ldb" + ]) + ]) + + if test $ldbm_prefer = found ; then + if test $ldbm_use = dbhash ; then + AC_DEFINE(LDBM_USE_DBHASH,1) +dnl LDAP_DEFS="$LDAP_DEFS -DLDBM_USE_DBHASH" + else + AC_DEFINE(LDBM_USE_DBBTREE,1) +dnl LDAP_DEFS="$LDAP_DEFS -DLDBM_USE_DBBTREE" + fi + fi + fi + if test $ldbm_prefer = any -o $ldbm_prefer = gdbm ; then + AC_CHECK_LIB(gdbm, gdbm_open,[ + ldbm_use=$ldbm_prefer + ldbm_prefer=found + LIBDB="-lgdbm" + AC_DEFINE(LDBM_USE_GDBM,1) +dnl LDAP_DEFS="$LDAP_DEFS -DLDBM_USE_GDBM" + ]) + fi + if test $ldbm_prefer = any -o $ldbm_prefer = ndbm ; then + AC_CHECK_LIB(dbm,dbm_open,[ + ldbm_use=ndbm + ldbm_prefer=found + LIBDB="-ldbm" + AC_DEFINE(LDBM_USE_NDBM,1) +dnl LDAP_DEFS="$LDAP_DEFS -DLDBM_USE_NDBM" + ]) + fi + + if test $ldbm_prefer != found ; then + AC_MSG_ERROR(could not find suitable db for $ldbm_prefer backend) + fi + + if test $ldbm_use = ndbm ; then + AC_MSG_WARN(LDBM using NDBM, functionality will be limited) + fi +fi + +AC_SUBST(LDAP_DEFS) +AC_SUBST(LIBDB) + +# ud needs termcap (should insert check here) +LIBTERMCAP="-ltermcap" +AC_SUBST(LIBTERMCAP) + +# FreeBSD has obsoleted re_comp(3) from -lc, needs -lcompat +AC_CHECK_LIB(compat, re_comp) + +# FreeBSD (and others) have crypt(3) in -lcrypt +LIBCRYPT= +AC_CHECK_FUNC(crypt, AC_DEFINE(HAVE_CRYPT), [ + AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt" + AC_DEFINE(HAVE_CRYPT)]) +]) +AC_SUBST(LIBCRYPT) + +dnl Checks for header files. +AC_HEADER_DIRENT +AC_HEADER_STDC +AC_HEADER_SYS_WAIT +AC_CHECK_HEADERS( \ + stddef.h \ + fcntl.h \ + limits.h \ + malloc.h \ + sgtty.h \ + sys/file.h \ + sys/ioctl.h \ + sys/time.h \ + syslog.h \ + termio.h \ + unistd.h \ +) + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_TYPE_GETGROUPS +AC_TYPE_MODE_T +AC_TYPE_OFF_T +AC_TYPE_PID_T +AC_TYPE_SIGNAL +AC_TYPE_SIZE_T +AC_TYPE_UID_T +AC_STRUCT_ST_BLKSIZE +AC_HEADER_TIME +AC_STRUCT_TM + +dnl AC_C_BIGENDIAN +AC_C_CONST + +dnl Checks for library functions. +AC_FUNC_MEMCMP +AC_TYPE_SIGNAL +AC_FUNC_STRFTIME +AC_FUNC_VPRINTF +AC_FUNC_WAIT3 + +AC_CHECK_FUNCS( \ + gethostname \ + gettimeofday \ + mktime \ + select \ + socket \ + strdup \ + strerror \ + strstr \ + strrchr \ + strtod \ + strtol \ + strtoul \ + memcpy \ +) + +AC_REPLACE_FUNCS(strdup) + +# Check Configuration +CF_SYS_ERRLIST + +dnl need do this early +test "x$prefix" = xNONE && prefix=$ac_default_prefix +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +SYSCONFDIR=`eval echo $sysconfdir` +AC_SUBST(SYSCONFDIR) + +AC_OUTPUT( \ +include/ldapconfig.h \ +include/Makefile:etc/top.mk:include/Makefile.in \ +clients/Makefile:etc/top.mk:clients/Makefile.in:etc/dir.mk \ +clients/tools/Makefile:etc/top.mk:clients/tools/Makefile.in:etc/rules.mk \ +clients/ud/Makefile:etc/top.mk:clients/ud/Makefile.in:etc/rules.mk \ +clients/fax500/Makefile:etc/top.mk:clients/fax500/Makefile.in:etc/rules.mk \ +clients/finger/Makefile:etc/top.mk:clients/finger/Makefile.in:etc/rules.mk \ +clients/gopher/Makefile:etc/top.mk:clients/gopher/Makefile.in:etc/rules.mk \ +clients/mail500/Makefile:etc/top.mk:clients/mail500/Makefile.in:etc/rules.mk \ +clients/rcpt500/Makefile:etc/top.mk:clients/rcpt500/Makefile.in:etc/rules.mk \ +contrib/Makefile:etc/top.mk:contrib/Makefile.in:etc/dir.mk \ +contrib/saucer/Makefile:etc/top.mk:contrib/saucer/Makefile.in:etc/rules.mk \ +contrib/whois++/Makefile:etc/top.mk:contrib/whois++/Makefile.in:etc/rules.mk \ +libraries/Makefile:etc/top.mk:libraries/Makefile.in:etc/dir.mk \ +libraries/libavl/Makefile:etc/top.mk:libraries/libavl/Makefile.in:etc/lib.mk \ +libraries/liblber/Makefile:etc/top.mk:libraries/liblber/Makefile.in:etc/lib.mk \ +libraries/libldap/Makefile:etc/top.mk:libraries/libldap/Makefile.in:etc/lib.mk \ +libraries/libldbm/Makefile:etc/top.mk:libraries/libldbm/Makefile.in:etc/lib.mk \ +libraries/libldif/Makefile:etc/top.mk:libraries/libldif/Makefile.in:etc/lib.mk \ +libraries/liblthread/Makefile:etc/top.mk:libraries/liblthread/Makefile.in:etc/lib.mk \ +servers/Makefile:etc/top.mk:servers/Makefile.in:etc/dir.mk \ +servers/ldapd/Makefile:etc/top.mk:servers/ldapd/Makefile.in:etc/srv.mk \ +servers/slapd/Makefile:etc/top.mk:servers/slapd/Makefile.in:etc/srv.mk \ +servers/slapd/back-ldbm/Makefile:etc/top.mk:servers/slapd/back-ldbm/Makefile.in:etc/srv.mk \ +servers/slapd/back-passwd/Makefile:etc/top.mk:servers/slapd/back-passwd/Makefile.in:etc/srv.mk \ +servers/slapd/back-shell/Makefile:etc/top.mk:servers/slapd/back-shell/Makefile.in:etc/srv.mk \ +servers/slapd/tools/Makefile:etc/top.mk:servers/slapd/tools/Makefile.in \ +servers/slapd/shell-backends/Makefile:etc/top.mk:servers/slapd/shell-backends/Makefile.in:etc/srv.mk \ +servers/slurpd/Makefile:etc/top.mk:servers/slurpd/Makefile.in:etc/srv.mk \ +tests/Makefile:etc/top.mk:tests/Makefile.in \ +Makefile:etc/top.mk:Makefile.in:etc/dir.mk, \ + [date > stamp-h]) From e56aa6af2cbfed66154a1124eb30ec5334b10e52 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 16 Sep 1998 03:14:16 +0000 Subject: [PATCH 003/148] Don't output anything. --- configure.in | 71 +++++++++++++++++++++++++++------------------------- 1 file changed, 37 insertions(+), 34 deletions(-) diff --git a/configure.in b/configure.in index 1e84b4974e..b391fa205e 100644 --- a/configure.in +++ b/configure.in @@ -8,7 +8,7 @@ AC_PREREQ(2.10)dnl Required Autoconf version dnl Do not use AutoConf 2.12; it produces a configuration script dnl that causes an "internal 2K buffer" error on HPUX when run dnl with /bin/sh. Autoconf 2.10 seems to be okay. -AC_CONFIG_AUX_DIR(etc) +AC_CONFIG_AUX_DIR(build) AC_CONFIG_HEADER(include/portable.h)dnl dnl dnl Start Args @@ -142,7 +142,7 @@ AC_PROG_RANLIB AC_PROG_MAKE_SET AC_PATH_PROG(SENDMAIL, sendmail, /usr/lib/sendmail, - $PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:etc) + $PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc) AC_PATH_PROG(EDITOR, vi, /usr/ucb/vi, $PATH:/usr/ucb) AC_PATH_PROG(FINGER, finger, /usr/ucb/finger, @@ -288,36 +288,39 @@ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' SYSCONFDIR=`eval echo $sysconfdir` AC_SUBST(SYSCONFDIR) +dnl AC_OUTPUT( \ +dnl include/ldapconfig.h \ +dnl include/Makefile:build/top.mk:include/Makefile.in \ +dnl clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \ +dnl clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \ +dnl clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \ +dnl clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \ +dnl clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \ +dnl clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \ +dnl clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \ +dnl clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \ +dnl contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \ +dnl contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \ +dnl contrib/whois++/Makefile:build/top.mk:contrib/whois++/Makefile.in:build/rules.mk \ +dnl libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk \ +dnl libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk \ +dnl libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk \ +dnl libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk \ +dnl libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk \ +dnl libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk \ +dnl libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk \ +dnl servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \ +dnl servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \ +dnl servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \ +dnl servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \ +dnl servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \ +dnl servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \ +dnl servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \ +dnl servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \ +dnl servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \ +dnl tests/Makefile:build/top.mk:tests/Makefile.in \ +dnl Makefile:build/top.mk:Makefile.in:build/dir.mk, \ +dnl [date > stamp-h]) + AC_OUTPUT( \ -include/ldapconfig.h \ -include/Makefile:etc/top.mk:include/Makefile.in \ -clients/Makefile:etc/top.mk:clients/Makefile.in:etc/dir.mk \ -clients/tools/Makefile:etc/top.mk:clients/tools/Makefile.in:etc/rules.mk \ -clients/ud/Makefile:etc/top.mk:clients/ud/Makefile.in:etc/rules.mk \ -clients/fax500/Makefile:etc/top.mk:clients/fax500/Makefile.in:etc/rules.mk \ -clients/finger/Makefile:etc/top.mk:clients/finger/Makefile.in:etc/rules.mk \ -clients/gopher/Makefile:etc/top.mk:clients/gopher/Makefile.in:etc/rules.mk \ -clients/mail500/Makefile:etc/top.mk:clients/mail500/Makefile.in:etc/rules.mk \ -clients/rcpt500/Makefile:etc/top.mk:clients/rcpt500/Makefile.in:etc/rules.mk \ -contrib/Makefile:etc/top.mk:contrib/Makefile.in:etc/dir.mk \ -contrib/saucer/Makefile:etc/top.mk:contrib/saucer/Makefile.in:etc/rules.mk \ -contrib/whois++/Makefile:etc/top.mk:contrib/whois++/Makefile.in:etc/rules.mk \ -libraries/Makefile:etc/top.mk:libraries/Makefile.in:etc/dir.mk \ -libraries/libavl/Makefile:etc/top.mk:libraries/libavl/Makefile.in:etc/lib.mk \ -libraries/liblber/Makefile:etc/top.mk:libraries/liblber/Makefile.in:etc/lib.mk \ -libraries/libldap/Makefile:etc/top.mk:libraries/libldap/Makefile.in:etc/lib.mk \ -libraries/libldbm/Makefile:etc/top.mk:libraries/libldbm/Makefile.in:etc/lib.mk \ -libraries/libldif/Makefile:etc/top.mk:libraries/libldif/Makefile.in:etc/lib.mk \ -libraries/liblthread/Makefile:etc/top.mk:libraries/liblthread/Makefile.in:etc/lib.mk \ -servers/Makefile:etc/top.mk:servers/Makefile.in:etc/dir.mk \ -servers/ldapd/Makefile:etc/top.mk:servers/ldapd/Makefile.in:etc/srv.mk \ -servers/slapd/Makefile:etc/top.mk:servers/slapd/Makefile.in:etc/srv.mk \ -servers/slapd/back-ldbm/Makefile:etc/top.mk:servers/slapd/back-ldbm/Makefile.in:etc/srv.mk \ -servers/slapd/back-passwd/Makefile:etc/top.mk:servers/slapd/back-passwd/Makefile.in:etc/srv.mk \ -servers/slapd/back-shell/Makefile:etc/top.mk:servers/slapd/back-shell/Makefile.in:etc/srv.mk \ -servers/slapd/tools/Makefile:etc/top.mk:servers/slapd/tools/Makefile.in \ -servers/slapd/shell-backends/Makefile:etc/top.mk:servers/slapd/shell-backends/Makefile.in:etc/srv.mk \ -servers/slurpd/Makefile:etc/top.mk:servers/slurpd/Makefile.in:etc/srv.mk \ -tests/Makefile:etc/top.mk:tests/Makefile.in \ -Makefile:etc/top.mk:Makefile.in:etc/dir.mk, \ - [date > stamp-h]) + [date > stamp-h] ) From 6220d443e0c75d71fcb99dc453f10213673da7ce Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 16 Sep 1998 03:15:41 +0000 Subject: [PATCH 004/148] Import files from BOOLEAN_LDAP. Remove include/portable.h as it will now be built by configure. --- acconfig.h | 60 +++++++++ aclocal.m4 | 50 ++++++++ include/ldapconfig.h.in | 274 ++++++++++++++++++++++++++++++++++++++++ include/portable.h | 215 ------------------------------- include/portable.h.bot | 6 + include/portable.h.in | 203 +++++++++++++++++++++++++++++ include/portable.h.top | 15 +++ 7 files changed, 608 insertions(+), 215 deletions(-) create mode 100644 acconfig.h create mode 100644 aclocal.m4 create mode 100644 include/ldapconfig.h.in delete mode 100644 include/portable.h create mode 100644 include/portable.h.bot create mode 100644 include/portable.h.in create mode 100644 include/portable.h.top diff --git a/acconfig.h b/acconfig.h new file mode 100644 index 0000000000..48c2f9d0bd --- /dev/null +++ b/acconfig.h @@ -0,0 +1,60 @@ +/* acconfig.h + This file is in the public domain. + + Descriptive text for the C preprocessor macros that + the distributed Autoconf macros can define. + No software package will use all of them; autoheader copies the ones + your configure.in uses into your configuration header file templates. + + The entries are in sort -df order: alphabetical, case insensitive, + ignoring punctuation (such as underscores). Although this order + can split up related entries, it makes it easier to check whether + a given entry is in the file. + + Leave the following blank line there!! Autoheader needs it. */ + + +/* define this if sys_errlist is not defined in stdio.h or errno.h */ +#undef DECL_SYS_ERRLIST + +/* define this you have crypt */ +#undef HAVE_CRYPT + +/* define this for connectionless LDAP support */ +#undef LDAP_CONN_LESS + +/* define this to remove -lldap cache support */ +#undef LDAP_NOCACHE + +/* define this for phonetic support */ +#undef LDAP_PHONETIC + +/* define this for LDAP referrals support */ +#undef LDAP_REFERRALS + +/* define this to use SLAPD shell backend */ +#undef LDAP_SHELL + +/* define this to use SLAPD passwd backend */ +#undef LDAP_PASSWD + +/* define this to use SLAPD LDBM backend */ +#undef LDAP_LDBM + +/* define this to use DBBTREE w/ LDBM backend */ +#undef LDBM_USE_DBBTREE + +/* define this to use DBHASH w/ LDBM backend */ +#undef LDBM_USE_DBHASH + +/* define this to use GDBM w/ LDBM backend */ +#undef LDBM_USE_GDBM + +/* define this to use NDBM w/ LDBM backend */ +#undef LDBM_USE_NDBM + + +/* Leave that blank line there!! Autoheader needs it. + If you're adding to this file, keep in mind: + The entries are in sort -df order: alphabetical, case insensitive, + ignoring punctuation (such as underscores). */ diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 0000000000..bc90b35598 --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,50 @@ +dnl -------------------------------------------------------------------- +dnl Restricted form of AC_ARG_ENABLE that ensures user doesn't give bogus +dnl values. +dnl +dnl Parameters: +dnl $1 = option name +dnl $2 = help-string +dnl $3 = action to perform if option is not default +dnl $4 = action if perform if option is default +dnl $5 = default option value (either 'yes' or 'no') +AC_DEFUN([CF_ARG_OPTION], +[AC_ARG_ENABLE($1,[$2],[test "$enableval" != ifelse($5,no,yes,no) && enableval=ifelse($5,no,no,yes) + if test "$enableval" != "$5" ; then +ifelse($3,,[ :]dnl +,[ $3]) ifelse($4,,,[ + else + $4]) + fi],[enableval=$5 ifelse($4,,,[ + $4 +])dnl + ])])dnl +dnl -------------------------------------------------------------------- +dnl Check for declaration of sys_errlist in one of stdio.h and errno.h. +dnl Declaration of sys_errlist on BSD4.4 interferes with our declaration. +dnl Reported by Keith Bostic. +AC_DEFUN([CF_SYS_ERRLIST], +[ +AC_MSG_CHECKING([declaration of sys_errlist]) +AC_CACHE_VAL(cf_cv_dcl_sys_errlist,[ + AC_TRY_COMPILE([ +#include +#include +#include ], + [char *c = (char *) *sys_errlist], + [cf_cv_dcl_sys_errlist=yes], + [cf_cv_dcl_sys_errlist=no])]) +AC_MSG_RESULT($cf_cv_dcl_sys_errlist) + +# It's possible (for near-UNIX clones) that sys_errlist doesn't exist +if test $cf_cv_dcl_sys_errlist = no ; then + AC_DEFINE(DECL_SYS_ERRLIST) + AC_MSG_CHECKING([existence of sys_errlist]) + AC_CACHE_VAL(cf_cv_have_sys_errlist,[ + AC_TRY_LINK([#include ], + [char *c = (char *) *sys_errlist], + [cf_cv_have_sys_errlist=yes], + [cf_cv_have_sys_errlist=no])]) + AC_MSG_RESULT($cf_cv_have_sys_errlist) +fi +])dnl diff --git a/include/ldapconfig.h.in b/include/ldapconfig.h.in new file mode 100644 index 0000000000..5cc74cfe9c --- /dev/null +++ b/include/ldapconfig.h.in @@ -0,0 +1,274 @@ +/* + * Copyright (c) 1994 Regents of the University of Michigan. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that this notice is preserved and that due credit is given + * to the University of Michigan at Ann Arbor. The name of the University + * may not be used to endorse or promote products derived from this + * software without specific prior written permission. This software + * is provided ``as is'' without express or implied warranty. + */ + +#ifndef _LDAPCLIENT_H +#define _LDAPCLIENT_H + +/* + * config.h for LDAP -- edit this file to customize LDAP client behavior. + * NO platform-specific definitions should be placed in this file. + * Note that this is NOT used by the LDAP or LBER libraries. + */ + +/* + * SHARED DEFINITIONS - things you should change + */ + /* default ldap host */ +#define LDAPHOST "localhost" + /* default place to start searching */ +#define DEFAULT_BASE "o=Your Organization Name, c=US" + +#define EDITOR "@EDITOR@" + +#define DEFAULT_SCONFDIR "@SCONFDIR@/ldap" +#define DEFAULT_SBINDIR "@SBINDIR@" +#define DEFAULT_LIBEXECDIR "@LIBEXECDIR@" + +/********************************************************************* + * * + * You probably do not need to edit anything below this point * + * * + *********************************************************************/ + +/* + * SHARED DEFINITIONS - other things you can change + */ + /* default attribute to use when sorting entries, NULL => sort by DN */ +#define SORT_ATTR NULL + /* default count of DN components to show in entry displays */ +#define DEFAULT_RDNCOUNT 2 + /* default config file locations */ +#define FILTERFILE "@SYSCONFDIR@/ldap/ldapfilter.conf" +#define TEMPLATEFILE "@SYSCONFDIR@/ldap/ldaptemplates.conf" +#define SEARCHFILE "@SYSCONFDIR@/ldap/ldapsearchprefs.conf" +#define FRIENDLYFILE "@SYSCONFDIR@/ldap/ldapfriendly" + +/* + * FINGER DEFINITIONS + */ + /* who to bind as */ +#define FINGER_BINDDN NULL + /* where to search */ +#define FINGER_BASE DEFAULT_BASE + /* banner to print */ +#define FINGER_BANNER "X.500 Finger Service...\r\n" + /* who to report errors to */ +#define FINGER_ERRORS "your local system administrator" + /* what to say if no matches are found */ +#define FINGER_NOMATCH "Search failed to find anything.\r\n" + /* what to say if the service may be unavailable */ +#define FINGER_UNAVAILABLE \ +"The X.500 service may be temporarily unavailable.\r\n\ +Please try again later.\r\n" + /* printed if a match has no email address - for disptmp default */ +#define FINGER_NOEMAIL1 "None registered in this service." +#define FINGER_NOEMAIL2 NULL +#define FINGER_NOEMAIL { FINGER_NOEMAIL1, FINGER_NOEMAIL2, NULL } + /* maximum number of matches returned */ +#define FINGER_SIZELIMIT 50 + /* max number of hits displayed in full before a list is presented */ +#define FINGER_LISTLIMIT 1 + /* what to exec for "finger @host" */ +#define FINGER_CMD "@FINGER@" + /* how to treat aliases when searching */ +#define FINGER_DEREF LDAP_DEREF_FINDING + /* attribute to use when sorting results */ +#define FINGER_SORT_ATTR SORT_ATTR + /* enable ufn support */ +#define FINGER_UFN + /* timeout for searches */ +#define FINGER_TIMEOUT 60 + /* number of DN components to show in entry displays */ +#define FINGER_RDNCOUNT DEFAULT_RDNCOUNT + +/* + * GO500 GOPHER GATEWAY DEFINITIONS + */ + /* who to bind as */ +#define GO500_BINDDN NULL + /* where to search */ +#define GO500_BASE DEFAULT_BASE + /* port on which to listen */ +#define GO500_PORT 5555 + /* how to handle aliases */ +#define GO500_DEREF LDAP_DEREF_FINDING + /* attribute to use when sorting results */ +#define GO500_SORT_ATTR SORT_ATTR + /* timeout for searches */ +#define GO500_TIMEOUT 180 + /* enable ufn support */ +#define GO500_UFN + /* + * only set and uncomment this if your hostname() does not return + * a fully qualified hostname + */ +/* #define GO500_HOSTNAME "fully.qualified.hostname.here" */ + /* number of DN components to show in entry displays */ +#define GO500_RDNCOUNT DEFAULT_RDNCOUNT + +/* + * GO500GW GOPHER GATEWAY DEFINITIONS + */ + /* who to bind as */ +#define GO500GW_BINDDN NULL + /* where the helpfile lives */ +#define GO500GW_HELPFILE "@SYSCONFDIR@/ldap/go500gw.help" + /* port on which to listen */ +#define GO500GW_PORT 7777 + /* timeout on all searches */ +#define GO500GW_TIMEOUT 180 + /* enable ufn support */ +#define GO500GW_UFN + /* attribute to use when sorting results */ +#define GO500GW_SORT_ATTR SORT_ATTR + /* + * only set and uncomment this if your hostname() does not return + * a fully qualified hostname + */ +/* #define GO500GW_HOSTNAME "fully.qualified.hostname.here" */ + /* number of DN components to show in entry displays */ +#define GO500GW_RDNCOUNT DEFAULT_RDNCOUNT + +/* + * RCPT500 MAIL RESPONDER GATEWAY DEFINITIONS + */ + /* who to bind as */ +#define RCPT500_BINDDN NULL + /* where the helpfile lives */ +#define RCPT500_HELPFILE "@SYSCONFDIR@/ldap/rcpt500.help" + /* maximum number of matches returned */ +#define RCPT500_SIZELIMIT 50 + /* address replies will appear to come from */ +#define RCPT500_FROM "\"X.500 Query Program\" " + /* command that will accept an RFC822 message text on standard + input, and send it. sendmail -t does this nicely. */ +#define RCPT500_PIPEMAILCMD "@SENDMAIL@ -t" + /* where to search */ +#define RCPT500_BASE DEFAULT_BASE + /* attribute to use when sorting results */ +#define RCPT500_SORT_ATTR SORT_ATTR + /* max number of hits displayed in full before a list is presented */ +#define RCPT500_LISTLIMIT 1 + /* enable ufn support */ +#define RCPT500_UFN + /* number of DN components to show in entry displays */ +#define RCPT500_RDNCOUNT DEFAULT_RDNCOUNT + +/* + * LDAPSEARCH TOOL + */ + /* who to bind as */ +#define LDAPSEARCH_BINDDN NULL + /* search base */ +#define LDAPSEARCH_BASE DEFAULT_BASE + +/* + * LDAPMODIFY TOOL + */ + /* who to bind as */ +#define LDAPMODIFY_BINDDN NULL + /* search base */ +#define LDAPMODIFY_BASE DEFAULT_BASE + +/* + * LDAPDELETE TOOL + */ + /* who to bind as */ +#define LDAPDELETE_BINDDN NULL + /* search base */ +#define LDAPDELETE_BASE DEFAULT_BASE + +/* + * LDAPMODRDN TOOL + */ + /* who to bind as */ +#define LDAPMODRDN_BINDDN NULL + /* search base */ +#define LDAPMODRDN_BASE DEFAULT_BASE + +/* + * MAIL500 MAILER DEFINITIONS + */ + /* who to bind as */ +#define MAIL500_BINDDN NULL + /* max number of ambiguous matches reported */ +#define MAIL500_MAXAMBIGUOUS 10 + /* max subscribers allowed (size limit when searching for them ) */ +#define MAIL500_MAXGROUPMEMBERS LDAP_NO_LIMIT + /* timeout for all searches */ +#define MAIL500_TIMEOUT 180 + /* sendmail location - mail500 needs to exec this */ +#define MAIL500_SENDMAIL "@SENDMAIL@" + +/* + * UD DEFINITIONS + */ + /* ud configuration file */ +#define UD_CONFIG_FILE "@SYSCONFDIR@/ldap/ud.conf" + /* default editor */ +#define UD_DEFAULT_EDITOR "@EDITOR@" + /* default bbasename of user config file */ +#define UD_USER_CONFIG_FILE ".udrc" + /* default user to bind as */ +#define UD_BINDDN NULL + /* default password to bind with */ +#define UD_PASSWD NULL + /* default search base */ +#define UD_BASE DEFAULT_BASE + /* default base where groups are created */ +#define UD_WHERE_GROUPS_ARE_CREATED "" + /* default base below which all groups live */ +#define UD_WHERE_ALL_GROUPS_LIVE "" + +/* + * FAX500 DEFINITIONS + */ + /* what to bind as */ +#define FAX_BINDDN NULL + /* how long to wait for searches */ +#define FAX_TIMEOUT 180 + /* maximum number of ambiguous matches reported */ +#define FAX_MAXAMBIGUOUS 10 + /* maximum number of members allowed */ +#define FAX_MAXMEMBERS LDAP_NO_LIMIT + /* program to send mail */ +#define FAX_SENDMAIL "@SENDMAIL@" + +/* + * RP500 DEFINITIONS + */ + /* what to bind as */ +#define RP_BINDDN NULL + /* prefix to add to non-fully-qualified numbers */ +#define RP_PHONEPREFIX "" + +/* + * SLAPD DEFINITIONS + */ + /* location of the default slapd config file */ +#define SLAPD_DEFAULT_CONFIGFILE "@SYSCONFDIR@/ldap/slapd.conf" + /* default sizelimit on number of entries from a search */ +#define SLAPD_DEFAULT_SIZELIMIT 500 + /* default timelimit to spend on a search */ +#define SLAPD_DEFAULT_TIMELIMIT 3600 + /* location of the slapd pid file */ +#define SLAPD_PIDFILE "@SYSCONFDIR@/ldap/slapd.pid" + /* location of the slapd args file */ +#define SLAPD_ARGSFILE "@SYSCONFDIR@/ldap/slapd.args" + /* dn of the special "monitor" entry */ +#define SLAPD_MONITOR_DN "cn=monitor" + /* dn of the special "config" entry */ +#define SLAPD_CONFIG_DN "cn=config" + /* minimum max ids that a single index entry can map to in ldbm */ +#define SLAPD_LDBM_MIN_MAXIDS 4000 + +#endif /* _LDAPCLIENT_H */ diff --git a/include/portable.h b/include/portable.h deleted file mode 100644 index a91b27a5d5..0000000000 --- a/include/portable.h +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Copyright (c) 1994 Regents of the University of Michigan. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that this notice is preserved and that due credit is given - * to the University of Michigan at Ann Arbor. The name of the University - * may not be used to endorse or promote products derived from this - * software without specific prior written permission. This software - * is provided ``as is'' without express or implied warranty. - */ - -#ifndef _PORTABLE_H -#define _PORTABLE_H - -/* - * portable.h for LDAP -- this is where we define common stuff to make - * life easier on various Unix systems. - * - * Unless you are porting LDAP to a new platform, you should not need to - * edit this file. - */ - - -#ifndef SYSV -#if defined( hpux ) || defined( sunos5 ) || defined ( sgi ) || defined( SVR4 ) -#define SYSV -#endif -#endif - - -/* - * under System V, use sysconf() instead of getdtablesize - */ -#if !defined( USE_SYSCONF ) && defined( SYSV ) -#define USE_SYSCONF -#endif - - -/* - * under System V, daemons should use setsid() instead of detaching from their - * tty themselves - */ -#if !defined( USE_SETSID ) && defined( SYSV ) -#define USE_SETSID -#endif - - -/* - * System V has socket options in filio.h - */ -#if !defined( NEED_FILIO ) && defined( SYSV ) && !defined( hpux ) -#define NEED_FILIO -#endif - -/* - * use lockf() under System V - */ -#if !defined( USE_LOCKF ) && ( defined( SYSV ) || defined( aix )) -#define USE_LOCKF -#endif - -/* - * on many systems, we should use waitpid() instead of waitN() - */ -#if !defined( USE_WAITPID ) && ( defined( SYSV ) || defined( sunos4 ) || defined( ultrix ) || defined( aix )) -#define USE_WAITPID -#endif - - -/* - * define the wait status argument type - */ -#if ( defined( SunOS ) && SunOS < 40 ) || defined( nextstep ) -#define WAITSTATUSTYPE union wait -#else -#define WAITSTATUSTYPE int -#endif - -/* - * define the flags for wait - */ -#ifdef sunos5 -#define WAIT_FLAGS ( WNOHANG | WUNTRACED | WCONTINUED ) -#else -#define WAIT_FLAGS ( WNOHANG | WUNTRACED ) -#endif - - -/* - * defined the options for openlog (syslog) - */ -#ifdef ultrix -#define OPENLOG_OPTIONS LOG_PID -#else -#define OPENLOG_OPTIONS ( LOG_PID | LOG_NOWAIT ) -#endif - - -/* - * some systems don't have the BSD re_comp and re_exec routines - */ -#ifndef NEED_BSDREGEX -#if defined( SYSV ) || defined( VMS ) || defined( netbsd ) || defined( freebsd ) || defined( linux ) -#define NEED_BSDREGEX -#endif -#endif - -/* - * many systems do not have the setpwfile() library routine... we just - * enable use for those systems we know have it. - */ -#ifndef HAVE_SETPWFILE -#if defined( sunos4 ) || defined( ultrix ) || defined( __osf__ ) -#define HAVE_SETPWFILE -#endif -#endif - -/* - * Are sys_errlist and sys_nerr declared in stdio.h? - */ -#ifndef SYSERRLIST_IN_STDIO -#if defined( freebsd ) -#define SYSERRLIST_IN_STDIO -#endif -#endif - -/* - * for select() - */ -#if !defined(FD_SET) && !defined(WINSOCK) -#define NFDBITS 32 -#define FD_SETSIZE 32 -#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS))) -#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS))) -#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS))) -#define FD_ZERO(p) bzero((char *)(p), sizeof(*(p))) -#endif /* FD_SET */ - -#if defined( hpux ) && defined( __STDC__ ) -/* - * Under HP/UX, select seems to want (int *) instead of fd_set. Non-ANSI - * compilers don't like recursive macros, so ignore the problem if __STDC__ - * is not defined. - */ -#define select(a,b,c,d,e) select(a, (int *)b, (int *)c, (int *)d, e) -#endif /* hpux && __STDC__ */ - - -/* - * for signal() -- what do signal handling functions return? - */ -#ifndef SIG_FN -#ifdef sunos5 -# define SIG_FN void /* signal-catching functions return void */ -#else /* sunos5 */ -# ifdef BSD -# if (BSD >= 199006) || defined(NeXT) || defined(__osf__) || defined(sun) || defined(ultrix) || defined(apollo) || defined(POSIX_SIGNALS) -# define SIG_FN void /* signal-catching functions return void */ -# else -# define SIG_FN int /* signal-catching functions return int */ -# endif -# else /* BSD */ -# define SIG_FN void /* signal-catching functions return void */ -# endif /* BSD */ -#endif /* sunos5 */ -#endif /* SIG_FN */ - -/* - * call signal or sigset (signal does not block the signal while - * in the handler on sys v and sigset does not exist on bsd) - */ -#ifdef SYSV -#define SIGNAL sigset -#else -#define SIGNAL signal -#endif - -/* - * toupper and tolower macros are different under bsd and sys v - */ -#if defined( SYSV ) && !defined( hpux ) -#define TOUPPER(c) (isascii(c) && islower(c) ? _toupper(c) : c) -#define TOLOWER(c) (isascii(c) && isupper(c) ? _tolower(c) : c) -#else -#define TOUPPER(c) (isascii(c) && islower(c) ? toupper(c) : c) -#define TOLOWER(c) (isascii(c) && isupper(c) ? tolower(c) : c) -#endif - -/* - * put a cover on the tty-related ioctl calls we need to use - */ -#if defined( NeXT ) || (defined(SunOS) && SunOS < 40) -#define TERMIO_TYPE struct sgttyb -#define TERMFLAG_TYPE int -#define GETATTR( fd, tiop ) ioctl((fd), TIOCGETP, (caddr_t)(tiop)) -#define SETATTR( fd, tiop ) ioctl((fd), TIOCSETP, (caddr_t)(tiop)) -#define GETFLAGS( tio ) (tio).sg_flags -#define SETFLAGS( tio, flags ) (tio).sg_flags = (flags) -#else -#define USE_TERMIOS -#define TERMIO_TYPE struct termios -#define TERMFLAG_TYPE tcflag_t -#define GETATTR( fd, tiop ) tcgetattr((fd), (tiop)) -#define SETATTR( fd, tiop ) tcsetattr((fd), TCSANOW /* 0 */, (tiop)) -#define GETFLAGS( tio ) (tio).c_lflag -#define SETFLAGS( tio, flags ) (tio).c_lflag = (flags) -#endif - - -#if defined( ultrix ) || defined( nextstep ) -extern char *strdup(); -#endif /* ultrix || nextstep */ - -#endif /* _PORTABLE_H */ diff --git a/include/portable.h.bot b/include/portable.h.bot new file mode 100644 index 0000000000..762c289cc6 --- /dev/null +++ b/include/portable.h.bot @@ -0,0 +1,6 @@ + +#ifdef HAVE_STDDEF_H +# include +#endif + +#endif /* _LDAP_PORTABLE_H */ diff --git a/include/portable.h.in b/include/portable.h.in new file mode 100644 index 0000000000..6a0fa84867 --- /dev/null +++ b/include/portable.h.in @@ -0,0 +1,203 @@ +/* include/portable.h.in. Generated automatically from configure.in by autoheader. */ +/* + * Copyright (c) 1994 Regents of the University of Michigan. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that this notice is preserved and that due credit is given + * to the University of Michigan at Ann Arbor. The name of the University + * may not be used to endorse or promote products derived from this + * software without specific prior written permission. This software + * is provided ``as is'' without express or implied warranty. + */ + +#ifndef _LDAP_PORTABLE_H +#define _LDAP_PORTABLE_H + + +/* Define to empty if the keyword does not work. */ +#undef const + +/* Define to the type of elements in the array set by `getgroups'. + Usually this is either `int' or `gid_t'. */ +#undef GETGROUPS_T + +/* Define to `int' if doesn't define. */ +#undef gid_t + +/* Define if you don't have vprintf but do have _doprnt. */ +#undef HAVE_DOPRNT + +/* Define if your struct stat has st_blksize. */ +#undef HAVE_ST_BLKSIZE + +/* Define if you have the strftime function. */ +#undef HAVE_STRFTIME + +/* Define if you have that is POSIX.1 compatible. */ +#undef HAVE_SYS_WAIT_H + +/* Define if you have the vprintf function. */ +#undef HAVE_VPRINTF + +/* Define if you have the wait3 system call. */ +#undef HAVE_WAIT3 + +/* Define to `int' if doesn't define. */ +#undef mode_t + +/* Define to `long' if doesn't define. */ +#undef off_t + +/* Define to `int' if doesn't define. */ +#undef pid_t + +/* Define as the return type of signal handlers (int or void). */ +#undef RETSIGTYPE + +/* Define to `unsigned' if doesn't define. */ +#undef size_t + +/* Define if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define if you can safely include both and . */ +#undef TIME_WITH_SYS_TIME + +/* Define if your declares struct tm. */ +#undef TM_IN_SYS_TIME + +/* Define to `int' if doesn't define. */ +#undef uid_t + +/* define this if sys_errlist is not defined in stdio.h or errno.h */ +#undef DECL_SYS_ERRLIST + +/* define this you have crypt */ +#undef HAVE_CRYPT + +/* define this for connectionless LDAP support */ +#undef LDAP_CONN_LESS + +/* define this to remove -lldap cache support */ +#undef LDAP_NOCACHE + +/* define this for phonetic support */ +#undef LDAP_PHONETIC + +/* define this for LDAP referrals support */ +#undef LDAP_REFERRALS + +/* define this to use SLAPD shell backend */ +#undef LDAP_SHELL + +/* define this to use SLAPD passwd backend */ +#undef LDAP_PASSWD + +/* define this to use SLAPD LDBM backend */ +#undef LDAP_LDBM + +/* define this to use DBBTREE w/ LDBM backend */ +#undef LDBM_USE_DBBTREE + +/* define this to use DBHASH w/ LDBM backend */ +#undef LDBM_USE_DBHASH + +/* define this to use GDBM w/ LDBM backend */ +#undef LDBM_USE_GDBM + +/* define this to use NDBM w/ LDBM backend */ +#undef LDBM_USE_NDBM + +/* Define if you have the gethostname function. */ +#undef HAVE_GETHOSTNAME + +/* Define if you have the gettimeofday function. */ +#undef HAVE_GETTIMEOFDAY + +/* Define if you have the memcpy function. */ +#undef HAVE_MEMCPY + +/* Define if you have the mktime function. */ +#undef HAVE_MKTIME + +/* Define if you have the select function. */ +#undef HAVE_SELECT + +/* Define if you have the socket function. */ +#undef HAVE_SOCKET + +/* Define if you have the strdup function. */ +#undef HAVE_STRDUP + +/* Define if you have the strerror function. */ +#undef HAVE_STRERROR + +/* Define if you have the strrchr function. */ +#undef HAVE_STRRCHR + +/* Define if you have the strstr function. */ +#undef HAVE_STRSTR + +/* Define if you have the strtod function. */ +#undef HAVE_STRTOD + +/* Define if you have the strtol function. */ +#undef HAVE_STRTOL + +/* Define if you have the strtoul function. */ +#undef HAVE_STRTOUL + +/* Define if you have the header file. */ +#undef HAVE_DIRENT_H + +/* Define if you have the header file. */ +#undef HAVE_FCNTL_H + +/* Define if you have the header file. */ +#undef HAVE_LIMITS_H + +/* Define if you have the header file. */ +#undef HAVE_MALLOC_H + +/* Define if you have the header file. */ +#undef HAVE_NDIR_H + +/* Define if you have the header file. */ +#undef HAVE_SGTTY_H + +/* Define if you have the header file. */ +#undef HAVE_STDDEF_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_DIR_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_FILE_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_IOCTL_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_NDIR_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_TIME_H + +/* Define if you have the header file. */ +#undef HAVE_SYSLOG_H + +/* Define if you have the header file. */ +#undef HAVE_TERMIO_H + +/* Define if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define if you have the compat library (-lcompat). */ +#undef HAVE_LIBCOMPAT + +#ifdef HAVE_STDDEF_H +# include +#endif + +#endif /* _LDAP_PORTABLE_H */ diff --git a/include/portable.h.top b/include/portable.h.top new file mode 100644 index 0000000000..f6de59afb0 --- /dev/null +++ b/include/portable.h.top @@ -0,0 +1,15 @@ +/* + * Copyright (c) 1994 Regents of the University of Michigan. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that this notice is preserved and that due credit is given + * to the University of Michigan at Ann Arbor. The name of the University + * may not be used to endorse or promote products derived from this + * software without specific prior written permission. This software + * is provided ``as is'' without express or implied warranty. + */ + +#ifndef _LDAP_PORTABLE_H +#define _LDAP_PORTABLE_H + From 699dd3185dc493bbafa936e98007fdb33ed87516 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 16 Sep 1998 03:21:18 +0000 Subject: [PATCH 005/148] A do very little configure.in. --- configure.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index b391fa205e..a08f486402 100644 --- a/configure.in +++ b/configure.in @@ -322,5 +322,5 @@ dnl tests/Makefile:build/top.mk:tests/Makefile.in \ dnl Makefile:build/top.mk:Makefile.in:build/dir.mk, \ dnl [date > stamp-h]) -AC_OUTPUT( \ - [date > stamp-h] ) +AC_OUTPUT( + ,[date > stamp-h]) From 319aa913162c0e16592b8b41d26adf4ba4a98176 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 16 Sep 1998 03:26:06 +0000 Subject: [PATCH 006/148] From BOOLEAN_LDAP etc/. Added manually. --- build/dir.mk | 48 +++++++++++++++++++++++++++ build/info.mk | 5 +++ build/lib.mk | 35 ++++++++++++++++++++ build/rules.mk | 21 ++++++++++++ build/srv.mk | 49 +++++++++++++++++++++++++++ build/top.mk | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 247 insertions(+) create mode 100644 build/dir.mk create mode 100644 build/info.mk create mode 100644 build/lib.mk create mode 100644 build/rules.mk create mode 100644 build/srv.mk create mode 100644 build/top.mk diff --git a/build/dir.mk b/build/dir.mk new file mode 100644 index 0000000000..e78f0be086 --- /dev/null +++ b/build/dir.mk @@ -0,0 +1,48 @@ +## +## Makes subdirectories +## + +all: allsubs +allsubs: FORCE + @echo "Making all in `$(PWD)`" + @for i in $(SUBDIRS); do \ + echo " Entering subdirectory $$i"; \ + ( cd $$i; $(MAKE) $(MFLAGS) all ); \ + echo " "; \ + done + +install: installsubs +installsubs: FORCE + @echo "Making install in `$(PWD)`" + @for i in $(SUBDIRS); do \ + echo " Entering subdirectory $$i"; \ + ( cd $$i; $(MAKE) $(MFLAGS) install ); \ + echo " "; \ + done + +clean: cleansubs +cleansubs: FORCE + @echo "Making clean in `$(PWD)`" + @for i in $(SUBDIRS); do \ + echo " Entering subdirectory $$i"; \ + ( cd $$i; $(MAKE) $(MFLAGS) clean ); \ + echo " "; \ + done + +veryclean: verysubs +verysubs: FORCE + @echo "Making veryclean in `$(PWD)`" + @for i in $(SUBDIRS); do \ + echo " Entering subdirectory $$i"; \ + ( cd $$i; $(MAKE) $(MFLAGS) veryclean ); \ + echo " "; \ + done + +depend: dependsubs +dependsubs: FORCE + @echo "Making depend in `$(PWD)`" + @for i in $(SUBDIRS); do \ + echo " Entering subdirectory $$i"; \ + ( cd $$i; $(MAKE) $(MFLAGS) depend ); \ + echo " "; \ + done diff --git a/build/info.mk b/build/info.mk new file mode 100644 index 0000000000..5ea8e7520b --- /dev/null +++ b/build/info.mk @@ -0,0 +1,5 @@ +## +## Makefile Template for Non-Source Directories +## + + diff --git a/build/lib.mk b/build/lib.mk new file mode 100644 index 0000000000..21d2117d5d --- /dev/null +++ b/build/lib.mk @@ -0,0 +1,35 @@ +## +## Makefile Template for Libraries +## + +all: $(LIBRARY) $(PROGRAMS) + +$(LIBRARY): version.o + $(AR) ru $@ $(OBJS) version.o + @$(RANLIB) $@; \ + $(RM) ../$@; \ + (d=`$(PWD)` ; $(LN_S) `$(BASENAME) $$d`/$@ ../$@) + +version.c: $(OBJS) + $(RM) $@ + (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` \ + h=`$(HOSTNAME)` t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ + -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ + -e "s|%VERSION%|$${v}|" \ + < Version.c > $@) + +install: all + +lint: FORCE + $(LINT) $(DEFS) $(DEFINES) $(SRCS) + +lint5: FORCE + $(5LINT) $(DEFS) $(DEFINES) $(SRCS) + +clean: FORCE + $(RM) $(LIBRARY) ../$(LIBRARY) $(PROGRAMS) $(XPROGRAMS) $(XSRCS) \ + *.o a.out core version.c + +depend: FORCE + $(MKDEP) $(DEFS) $(DEFINES) $(SRCS) + diff --git a/build/rules.mk b/build/rules.mk new file mode 100644 index 0000000000..00e63c3f90 --- /dev/null +++ b/build/rules.mk @@ -0,0 +1,21 @@ +## +## Makefile Template for Programs +## + +all: $(PROGRAMS) + +install: all + +lint: FORCE + $(LINT) $(DEFS) $(DEFINES) $(SRCS) + +lint5: FORCE + $(5LINT) $(DEFS) $(DEFINES) $(SRCS) + +clean: FORCE + $(RM) $(PROGRAMS) $(XPROGRAMS) $(XSRCS) \ + *.o a.out core + +depend: FORCE + $(MKDEP) $(DEFS) $(DEFINES) $(SRCS) + diff --git a/build/srv.mk b/build/srv.mk new file mode 100644 index 0000000000..461549bd73 --- /dev/null +++ b/build/srv.mk @@ -0,0 +1,49 @@ +## +## Makefile Template for Servers +## + +all: FORCE + @if [ "$(BUILD_SRV)" = "yes" ]; then \ + $(MAKE) $(MFLAGS) all-srv; \ + else \ + echo "run configure with $(BUILD_OPT) to build $(PROGRAMS)"; \ + fi + +clean: clean-srv FORCE +lint: FORCE + @if [ "$(BUILD_SRV)" = "yes" ]; then \ + $(MAKE) $(MFLAGS) lint-srv; \ + else \ + echo "run configure with $(BUILD_OPT) to lint $(PROGRAMS)"; \ + fi + +5lint: FORCE + @if [ "$(BUILD_SRV)" = "yes" ]; then \ + $(MAKE) $(MFLAGS) 5lint-srv; \ + else \ + echo "run configure with $(BUILD_OPT) to 5lint $(PROGRAMS)"; \ + fi + +depend: FORCE + @if [ "$(BUILD_SRV)" = "yes" ]; then \ + $(MAKE) $(MFLAGS) depend-srv; \ + else \ + echo "run configure with $(BUILD_OPT) to mkdepend $(PROGRAMS)"; \ + fi + +all-srv: FORCE + +install-srv: all-srv FORCE + +lint-srv: FORCE + $(LINT) $(DEFS) $(DEFINES) $(SRCS) + +5lint-srv: FORCE + $(5LINT) $(DEFS) $(DEFINES) $(SRCS) + +clean-srv: FORCE + $(RM) $(PROGRAMS) $(XPROGRAMS) $(XSRCS) \ + *.o a.out core + +depend-srv: FORCE + $(MKDEP) $(DEFS) $(DEFINES) $(SRCS) diff --git a/build/top.mk b/build/top.mk new file mode 100644 index 0000000000..78ac505a4b --- /dev/null +++ b/build/top.mk @@ -0,0 +1,89 @@ +## +## Copyright 1998 Net Boolean Incorporated +## +@SET_MAKE@ + +SHELL = /bin/sh + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@/ldap +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ + +LN = ln +LN_S = @LN_S@ +RM = rm -f +MAKEINFO = @MAKEINFO@ +RANLIB = @RANLIB@ +AR = ar + +LINT = lint +5LINT = 5lint +MKDEP = mkdep + +# Misc UNIX commands used in makefiles +SED = sed +DATE = date +HOSTNAME = uname -n +BASENAME = basename +PWD = pwd +CAT = cat +MKDIR = mkdir + +VERSIONFILE = $(top_srcdir)/build/version + +INCLUDEDIR = -I$(top_srcdir)/include $(XINCLUDEDIR) + +LDAP_LIBDIR = $(top_srcdir)/libraries +LDAP_LIBS = -lldap -llber -lldif +LDAP_LIBDEPEND = $(LDAP_LIBDIR)/libldap.a + +# AutoConfig generated +AC_CC = @CC@ +AC_DEFS = @DEFS@ @LDAP_DEFS@ +AC_LIBS = @LIBS@ +AC_CFLAGS = @CFLAGS@ +AC_LDFLAGS = @LDFLAGS@ + +LIBCRYPT = @LIBCRYPT@ +LIBTERMCAP = @LIBTERMCAP@ +LIBDB = @LIBDB@ + +# Our Defaults +CC = $(AC_CC) +DEFS = $(AC_DEFS) $(INCLUDEDIR) $(LDAP_DEFS) +LIBS = -L$(LDAP_LIBDIR) $(LDAP_LIBS) $(XLIBS) $(AC_LIBS) + +CFLAGS = $(AC_CFLAGS) $(DEFS) $(DEFINES) +LDFLAGS = $(AC_LDFLAGS) + +default: all + +Makefile: Makefile.in ${top_srcdir}/config.status + @if [ $(top_srcdir) = $(srcdir) ]; then ; \ + ./config.status ; \ + else ; \ + echo "Makefile out of date, run config.status from $top_srcdir" ; \ + exit 1 ; \ + fi + +# empty rule for forcing rules +FORCE: From d6b8428c60ebc0aea21e3f9c516461e3ca490bdd Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 16 Sep 1998 04:02:05 +0000 Subject: [PATCH 007/148] Added additonal enable/with options. Still missing a few and haven't completed handling of options yet. --- configure.in | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index a08f486402..7cac3b8129 100644 --- a/configure.in +++ b/configure.in @@ -18,16 +18,32 @@ AC_PREFIX_DEFAULT(/usr/local) dnl general options CF_ARG_OPTION(debug,[ --enable-debug enable debugging (yes)],[ LDAP_DEBUG=no],[LDAP_DEBUG=yes],yes)dnl +CF_ARG_OPTION(libui,[ --enable-libui enable library user interface (yes)],[ + LDAP_LIBUI=no],[LDAP_LIBUI=yes],yes)dnl CF_ARG_OPTION(cache,[ --enable-cache enable caching (yes)],[ LDAP_CACHE=no],[LDAP_CACHE=yes],yes)dnl +CF_ARG_OPTION(rlookups,[ --enable-rlookups enable reverse lookups (yes)],[ + LDAP_RLOOKUP=no],[LDAP_RLOOKUP=yes],yes)dnl CF_ARG_OPTION(referrals,[ --enable-referrals enable referrals (yes)],[ LDAP_REFERRALS=no],[LDAP_REFERRALS=yes],yes)dnl +CF_ARG_OPTION(aclgroup,[ --enable-aclgroup enable ACL group support (yes)],[ + LDAP_ACLGROUP=no],[LDAP_ALCGROUP=yes],yes)dnl CF_ARG_OPTION(cldap,[ --enable-clapd enable connectionless ldap (no)],[ LDAP_CLDAP=yes],[LDAP_CLDAP=no],no)dnl CF_ARG_OPTION(phonetic,[ --enable-phonetic enable phonetic/soundex (no)],[ LDAP_PHONETIC=yes],[LDAP_PHONETIC=no],no)dnl +CF_ARG_OPTION(crypt,[ --enable-crypt enable crypt(3) passwords (yes)],[ + LDAP_CRYPT=no],[LDAP_CRYPT=yes],yes)dnl +CF_ARG_OPTION(md5,[ --enable-md5 enable MD5 passwords (yes)],[ + LDAP_MD5=no],[LDAP_MD5=yes],yes)dnl +CF_ARG_OPTION(sha1,[ --enable-sha1 enable SHA1 passwords (yes)],[ + LDAP_SHA1=no],[LDAP_SHA1=yes],yes)dnl + +CF_ARG_OPTION(tcpwrappers,[ --enable-tcpwrappers enable tcp wrapper support (no)],[ + LDAP_TCP_WRAPPERS=yes],[LDAP_TCP_WRAPPERS=no],no)dnl + dnl server options CF_ARG_OPTION(ldapd,[ --enable-ldapd enable building ldapd (no)],[ BUILD_LDAPD=yes],[BUILD_LDAPD=no],no)dnl @@ -322,5 +338,6 @@ dnl tests/Makefile:build/top.mk:tests/Makefile.in \ dnl Makefile:build/top.mk:Makefile.in:build/dir.mk, \ dnl [date > stamp-h]) -AC_OUTPUT( - ,[date > stamp-h]) +AC_OUTPUT( \ +Makefile:build/top.mk:Makefile.in:build/dir.mk \ +,[date > stamp-h]) From 645268c4612174bb9a5893daacf1e8b8199e0735 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 16 Sep 1998 04:03:34 +0000 Subject: [PATCH 008/148] Add temporary bridge support to old portable.h (in bridge.h). --- Makefile | 425 ----------------------------------------- Makefile.in | 25 +++ include/bridge.h | 217 +++++++++++++++++++++ include/portable.h.bot | 2 + include/portable.h.in | 2 + 5 files changed, 246 insertions(+), 425 deletions(-) delete mode 100644 Makefile create mode 100644 Makefile.in create mode 100644 include/bridge.h diff --git a/Makefile b/Makefile deleted file mode 100644 index 59df0cdc46..0000000000 --- a/Makefile +++ /dev/null @@ -1,425 +0,0 @@ -# You will usually NOT need to edit this file at all: instead, edit the -# Make-common file. See the LDAP INSTALL file for more information. -#----------------------------------------------------------------------------- -# Copyright 1998 The OpenLDAP Foundation, Redwood City, California, USA -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted only -# as authorized by the OpenLDAP Public License. A copy of this -# license is available at http://www.OpenLDAP.org/license.html or -# in file LICENSE in the top-level directory of the distribution. -# -# This work is derived from the University of Michigan LDAP v3.3 -# distribution. Information concerning is available at -# http://www.umich.edu/~dirsvcs/ldap/ldap.html. -# -# This work also contains materials derived from public sources. -#----------------------------------------------------------------------------- -# Copyright (c) 1994 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -#----------------------------------------------------------------------------- -# LDAP lightweight X.500 Directory access top level makefile -# -############################################################################ -# # -# Usually you will not need to edit anything in this file # -# # -############################################################################ -# -# Note that these definitions of standard Unix utilities are only used -# in this Makefile. The Make-common (and .make-platform) files have a -# similar set of definitions that are used in all the other LDAP Makefiles. -# -RM=rm -f -MV=mv -f -CP=cp -CAT=cat -PWD=pwd -TAIL=tail -CHMOD=chmod -FIND=find -SED=sed -LN=ln -s -MKDIR=mkdir -GREP=grep -DIRNAME=dirname -BASENAME=basename -TAR=tar -COMPRESS=compress -CO=co -CI=ci - - -SRCDIRS= include libraries clients servers doc -TESTDIR= tests - -# -# LDAPSRC is used by the links rule -# -LDAPSRC= .. - - -# -# rules to make the software -# - -all: makeconfig - @echo "making all" - @for i in $(SRCDIRS); do \ - echo; echo " cd $$i; $(MAKE) $(MFLAGS) all"; \ - ( cd $$i; $(MAKE) $(MFLAGS) all ); \ - done - -lib-only: makeconfig - @echo "making libraries only" - @echo " cd include; $(MAKE) $(MFLAGS) all"; \ - cd include; $(MAKE) $(MFLAGS) all - @echo " cd libraries; $(MAKE) $(MFLAGS) all"; \ - cd libraries; $(MAKE) $(MFLAGS) all - - -# -# rules to install the software -# - -install: makeconfig - @for i in $(SRCDIRS); do \ - echo; echo "cd $$i; $(MAKE) $(MFLAGS) install"; \ - ( cd $$i; $(MAKE) $(MFLAGS) install ); \ - done - -inst-lib: makeconfig - @echo "cd libraries; $(MAKE) $(MFLAGS) install" - @( cd libraries; $(MAKE) $(MFLAGS) install ) - - -# -# rules to test the LDAP software -# -test: all - @echo " cd $(TESTDIR); $(MAKE) $(MFLAGS) all"; \ - ( cd $(TESTDIR); $(MAKE) $(MFLAGS) all ); - -# -# rules to make clean -# - -clean: FORCE - @if [ -f .makefiles ]; then \ - for i in $(SRCDIRS) $(TESTDIR); do \ - echo; echo "cd $$i; $(MAKE) $(MFLAGS) clean"; \ - ( cd $$i; $(MAKE) $(MFLAGS) clean ); \ - done; \ - fi; \ - ( for d in ./obj-*; do \ - if [ $$d != "./obj-*" ]; then \ - ( echo "making clean in $$d..."; \ - cd $$d; $(MAKE) $(MFLAGS) clean; ) \ - else \ - exit 0; \ - fi; \ - done ) - -veryclean: FORCE - @echo; echo "cd build; $(MAKE) $(MFLAGS) -f Make-template veryclean"; \ - ( cd build; $(MAKE) $(MFLAGS) -f Make-template veryclean ); \ - if [ -f .makefiles ]; then \ - for i in $(SRCDIRS) $(TESTDIR); do \ - echo; echo "cd $$i; $(MAKE) $(MFLAGS) veryclean"; \ - ( cd $$i; $(MAKE) $(MFLAGS) veryclean ); \ - done; \ - echo "finding and removing Makefiles..."; \ - for i in `$(FIND) . -type d -print`; do \ - if [ -f $$i/Make-template ]; then \ - echo "removing file $$i/Makefile"; \ - $(RM) $$i/Makefile; \ - fi; \ - done; \ - echo "removing file .makefiles"; \ - $(RM) .makefiles; \ - fi; \ - ( for d in ./obj-*; do \ - if [ $$d != "./obj-*" ]; then \ - echo "removing $$d..."; $(RM) -r $$d; \ - else \ - exit 0; \ - fi; \ - done ); \ - if [ -f .make-platform ]; then \ - echo "removing link .make-platform"; \ - $(RM) .make-platform; \ - else \ - exit 0; \ - fi - - -# -# rules to make depend -# -# -depend: makeconfig - @echo "making depend everywhere"; \ - echo " cd include; $(MAKE) $(MFLAGS) all"; \ - ( cd include; $(MAKE) $(MFLAGS) all ); \ - for i in $(SRCDIRS); do \ - echo; echo "cd $$i; $(MAKE) $(MFLAGS) depend"; \ - ( cd $$i; $(MAKE) $(MFLAGS) depend ); \ - done; - @echo " "; echo Remember to \"make depend\" after each \"make makefiles\" - -# -# rules to check out and in Make-template files -# -co-mktmpls: FORCE - @echo "checking out Make-template files..."; \ - for mkfile in `$(FIND) . -name Make-template -type f -print`; do \ - $(CO) -l $$mkfile; \ - done - -ci-mktmpls: FORCE - @echo "enter a one-word log message:"; \ - read logmsg; \ - echo "checking in Make-template files..."; \ - for mkfile in `$(FIND) . -name Make-template -type f -print`; do \ - $(CI) -m$$logmsg -u $$mkfile; \ - done - - -lib-depend: makeconfig - @echo "cd libraries; $(MAKE) $(MFLAGS) depend" - @( cd libraries; $(MAKE) $(MFLAGS) depend )" - -# -# rules to cut a new ldap distribution -# -distribution: makeconfig checkin tar - -checkin: FORCE - @-VERSION=V`cat ./build/version | $(SED) -e 's/\.//'` ; \ - echo "Checking in version $$VERSION"; \ - for i in `$(FIND) . -name \*,v -print | \ - $(SED) -e 's%RCS/%%' -e 's%,v%%'`; \ - do ( \ - ci -m"pre-version $$VERSION check-in" -u $$i; \ - rcs -N$$VERSION: $$i ) \ - done - -tar: veryclean -# $(RM) ./Make-common; \ -# $(CP) ./Make-common.dist ./Make-common; \ -# $(CHMOD) 644 ./Make-common; \ -# $(RM) ./include/ldapconfig.h.edit; \ -# $(CP) ./include/ldapconfig.h.dist ./include/ldapconfig.h.edit; \ -# $(CHMOD) 644 ./include/ldapconfig.h.edit; - @PWD=`pwd`; \ - BASE=`$(BASENAME) $$PWD`; XFILE=/tmp/ldap-x.$$$$; \ - ( cd .. ; $(CAT) $$BASE/exclude >$$XFILE; \ - $(FIND) $$BASE -name RCS -print >> $$XFILE ; \ - $(FIND) $$BASE -name CVS -print >> $$XFILE ; \ - $(FIND) $$BASE -name obj-\* -print >> $$XFILE ; \ - $(FIND) $$BASE -name tags -print >> $$XFILE ; \ - $(TAR) cvfX ./$$BASE.tar $$XFILE $$BASE; \ - ); \ - $(RM) $$XFILE; \ - echo "compressing ../$$BASE.tar..."; \ - $(COMPRESS) ../$$BASE.tar - -# -# rule to force check for change of platform -# -platform: FORCE - @if [ -f .make-platform ]; then \ - echo "removing old link .make-platform"; \ - $(RM) .make-platform; \ - fi; \ - $(MAKE) $(MFLAGS) .make-platform - - -makeconfig: .makefiles buildtools - -.make-platform: - @if [ -f /usr/bin/swconfig ]; then \ - UNAME=./build/uname.sh; \ - elif [ -f /bin/uname ]; then \ - UNAME=/bin/uname; \ - elif [ -f /usr/bin/uname ]; then \ - UNAME=/usr/bin/uname; \ - else \ - UNAME=./build/uname.sh; \ - fi; \ - if [ -z "$$UNAME" ]; then \ - echo "unknown platform (no $$UNAME or /usr/bin/uname)"; \ - echo "see the file build/PORTS for more information."; \ - exit 1; \ - else \ - OS=`$$UNAME -s` ; OSRELEASE=`$$UNAME -r` ; \ - OSVERSION=`$$UNAME -v` ; \ - case $$OS in \ - SunOS) \ - if [ $$OSRELEASE -gt "5" -o $$OSRELEASE -lt "4" ]; then \ - echo "SunOS release $$OSRELEASE unknown..."; exit 1; \ - fi; \ - if [ $$OSRELEASE -ge "5" ]; then \ - MINORVER=`echo $$OSRELEASE|sed 's/^.*\.//'` ; \ - if [ $$MINORVER -ge "6" ]; then \ - PLATFORM="sunos56" ; \ - else \ - PLATFORM="sunos5"; \ - fi; \ - else \ - PLATFORM="sunos4"; \ - fi; \ - ;; \ - ULTRIX) \ - PLATFORM="ultrix" \ - ;; \ - OSF1) \ - PLATFORM="osf1" \ - ;; \ - AIX) \ - PLATFORM="aix" \ - ;; \ - HP-UX) \ - PLATFORM="hpux" \ - ;; \ - Linux) \ - PLATFORM="linux" \ - ;; \ - NetBSD) \ - PLATFORM="netbsd" \ - ;; \ - OpenBSD) \ - PLATFORM="openbsd" \ - ;; \ - FreeBSD) \ - MAJRELEASE=`echo $$OSRELEASE | sed 's/\..*//'` ; \ - if [ $$MAJRELEASE -lt 3 ]; then \ - PLATFORM="freebsd2" ; \ - else \ - PLATFORM="freebsd3" ; \ - fi; \ - ;; \ - NeXTSTEP) \ - PLATFORM="nextstep" \ - ;; \ - SCO) \ - PLATFORM="sco" \ - ;; \ - IRIX|IRIX64) \ - PLATFORM="irix" \ - ;; \ - *) echo "unknown platform ($$OS $$OSVERSION $$OSRELEASE)..."; \ - echo "see the file build/PORTS for more information."; \ - exit 1; \ - ;; \ - esac; \ - fi; \ - CC=$(CC); \ - OLDIFS="$$IFS"; \ - IFS=":"; \ - for dir in $$PATH; do \ - if [ -f $$dir/gcc ]; then \ - CC=gcc; \ - break; \ - fi; \ - done; \ - IFS="$$OLDIFS"; \ - $(LN) ./build/platforms/$$PLATFORM-$$CC/Make-platform .make-platform; \ - echo ""; \ - echo "** Set platform to $$PLATFORM with compiler $$CC..."; \ - echo "" - -Make-common: Make-common.dist - @if [ -f Make-common ]; then \ - echo "Make-common.dist newer than Make-common, check for new options" ;\ - echo "or touch Make-common to ignore."; \ - exit 1; \ - fi; \ - echo "Copy Make-common.dist or Make-common.gmake to Make-common"; \ - echo " Edit as needed before making!" ; \ - exit 1 -# -# rule to build Makefiles by concatenating Make-template file in each -# subdirectory with global Make-common, .make-platform, and -# build/Make-append files -# -.makefiles: Make-common .make-platform build/Make-append - @echo "making Makefiles..."; \ - HDRFILE=/tmp/Makehdr.$$$$; \ - DEFSFILE=/tmp/Makedefs.$$$$; \ - $(CAT) build/Make-append ./.make-platform ./Make-common > $$DEFSFILE; \ - echo "# --------------------------------------------------------" > $$HDRFILE; \ - echo "# This file was automatically generated. Do not edit it." >> $$HDRFILE; \ - echo "# Instead, edit the Make-common file (located in the root" >> $$HDRFILE; \ - echo "# (of the LDAP distribution). See the LDAP INSTALL file" >> $$HDRFILE; \ - echo "# for more information." >> $$HDRFILE; \ - echo "# --------------------------------------------------------" >> $$HDRFILE; \ - echo "#" >> $$HDRFILE; \ - for i in `$(FIND) . -type d -print`; do \ - if [ -f $$i/Make-template ]; then \ - echo " creating $$i/Makefile"; \ - $(RM) $$i/Makefile; \ - $(CAT) $$HDRFILE $$i/Make-template $$DEFSFILE > $$i/Makefile; \ - fi; \ - done; \ - $(RM) .makefiles; \ - touch .makefiles; \ - $(RM) $$HDRFILE $$DEFSFILE - -# -# rule to always build makefiles -# -makefiles: FORCE - $(RM) .makefiles - $(MAKE) $(MFLAGS) .makefiles - @echo "Please \"make depend\" before building." - -# -# rule to create any tools we need to build everything else -# -buildtools: FORCE - @echo "making buildtools" - @echo " cd build; $(MAKE) $(MFLAGS)" - @( cd build; $(MAKE) $(MFLAGS) ) - -# -# rule to make a shadow (linked) build area -# -links: FORCE - @if [ -f /usr/bin/swconfig ]; then \ - UNAME=./build/uname.sh; \ - elif [ -f /bin/uname ]; then \ - UNAME=/bin/uname; \ - elif [ -f /usr/bin/uname ]; then \ - UNAME=/usr/bin/uname; \ - else \ - UNAME=./build/uname.sh; \ - fi; \ - if [ ! -z "$(DEST)" ]; then \ - DEST="$(DEST)"; \ - else \ - DEST=./obj-`$$UNAME -s`-`$$UNAME -r` ; \ - fi; \ - echo "making links in $$DEST..."; \ - LINKLIST=/tmp/ldaplinklist.$$$$; \ - $(RM) $$LINKLIST; \ - $(MKDIR) $$DEST; \ - cd $$DEST; $(LN) $(LDAPSRC) .src; \ - $(LN) .src/Makefile . ; \ - $(CP) .src/Make-common . ; $(CHMOD) 644 ./Make-common; \ - for d in build $(SRCDIRS) $(TESTDIR); do \ - ( $(MKDIR) $$d; cd $$d; $(LN) ../.src/$$d .src; \ - $(LN) .src/Make-template . ; \ - $(MAKE) $(MFLAGS) MKDIR="$(MKDIR)" LN="$(LN)" \ - -f Make-template links ) ; \ - done; \ - echo ""; echo "Now type:"; echo " cd $$DEST"; echo "and make there" - -FORCE: diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 0000000000..7ce76e371d --- /dev/null +++ b/Makefile.in @@ -0,0 +1,25 @@ +# Master Makefile for OpenLDAP +# Copyright 1998 The OpenLDAP Foundation, All Rights Reserved. +# COPYING RESTRICTIONS APPLY, See COPYRIGHT file + +SUBDIRS= include libraries clients servers # contrib + +makefiles: FORCE + ./config.status + +configure: configure.in aclocal.m4 + autoconf + +# autoheader might not change config.h.in, so touch a stamp file +${srcdir}/include/portable.h.in: stamp-h.in +${srcdir}/stamp-h.in: configure.in aclocal.m4 acconfig.h + cd ${srcdir} && autoheader + @echo timestamp > ${srcdir}/stamp-h.in + +config.h: stamp-h +stamp-h: config.h.in config.status + ./config.status + +config.status: configure + ./config.status --recheck + diff --git a/include/bridge.h b/include/bridge.h new file mode 100644 index 0000000000..c7c4a29a42 --- /dev/null +++ b/include/bridge.h @@ -0,0 +1,217 @@ +/* + * Copyright (c) 1994 Regents of the University of Michigan. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that this notice is preserved and that due credit is given + * to the University of Michigan at Ann Arbor. The name of the University + * may not be used to endorse or promote products derived from this + * software without specific prior written permission. This software + * is provided ``as is'' without express or implied warranty. + */ + +/* This file SHOULD go away !!! */ + +#ifndef _LDAP_BRIDGE_H +#define _LDAP_BRIDGE_H + +/* + * portable.h for LDAP -- this is where we define common stuff to make + * life easier on various Unix systems. + * + * Unless you are porting LDAP to a new platform, you should not need to + * edit this file. + */ + + +#ifndef SYSV +#if defined( hpux ) || defined( sunos5 ) || defined ( sgi ) || defined( SVR4 ) +#define SYSV +#endif +#endif + + +/* + * under System V, use sysconf() instead of getdtablesize + */ +#if !defined( USE_SYSCONF ) && defined( SYSV ) +#define USE_SYSCONF +#endif + + +/* + * under System V, daemons should use setsid() instead of detaching from their + * tty themselves + */ +#if !defined( USE_SETSID ) && defined( SYSV ) +#define USE_SETSID +#endif + + +/* + * System V has socket options in filio.h + */ +#if !defined( NEED_FILIO ) && defined( SYSV ) && !defined( hpux ) +#define NEED_FILIO +#endif + +/* + * use lockf() under System V + */ +#if !defined( USE_LOCKF ) && ( defined( SYSV ) || defined( aix )) +#define USE_LOCKF +#endif + +/* + * on most systems, we should use waitpid() instead of waitN() + */ +#if !defined( USE_WAITPID ) && !defined( nextstep ) +#define USE_WAITPID +#endif + + +/* + * define the wait status argument type + */ +#if ( defined( SunOS ) && SunOS < 40 ) || defined( nextstep ) +#define WAITSTATUSTYPE union wait +#else +#define WAITSTATUSTYPE int +#endif + +/* + * define the flags for wait + */ +#ifdef sunos5 +#define WAIT_FLAGS ( WNOHANG | WUNTRACED | WCONTINUED ) +#else +#define WAIT_FLAGS ( WNOHANG | WUNTRACED ) +#endif + + +/* + * defined the options for openlog (syslog) + */ +#ifdef ultrix +#define OPENLOG_OPTIONS LOG_PID +#else +#define OPENLOG_OPTIONS ( LOG_PID | LOG_NOWAIT ) +#endif + + +/* + * some systems don't have the BSD re_comp and re_exec routines + */ +#ifndef NEED_BSDREGEX +#if defined( SYSV ) || defined( VMS ) || defined( netbsd ) || defined( freebsd ) || defined( linux ) +#define NEED_BSDREGEX +#endif +#endif + +/* + * many systems do not have the setpwfile() library routine... we just + * enable use for those systems we know have it. + */ +#ifndef HAVE_SETPWFILE +#if defined( sunos4 ) || defined( ultrix ) || defined( __osf__ ) +#define HAVE_SETPWFILE +#endif +#endif + +/* + * Are sys_errlist and sys_nerr declared in stdio.h? + */ +#ifndef SYSERRLIST_IN_STDIO +#if !defined( DECL_SYS_ERRLIST ) +#define SYSERRLIST_IN_STDIO +#endif +#endif + +/* + * for select() + */ +#if !defined(FD_SET) && !defined(WINSOCK) +#define NFDBITS 32 +#define FD_SETSIZE 32 +#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS))) +#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS))) +#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS))) +#define FD_ZERO(p) bzero((char *)(p), sizeof(*(p))) +#endif /* FD_SET */ + +#if defined( hpux ) && defined( __STDC__ ) +/* + * Under HP/UX, select seems to want (int *) instead of fd_set. Non-ANSI + * compilers don't like recursive macros, so ignore the problem if __STDC__ + * is not defined. + */ +#define select(a,b,c,d,e) select(a, (int *)b, (int *)c, (int *)d, e) +#endif /* hpux && __STDC__ */ + + +/* + * for signal() -- what do signal handling functions return? + */ +#ifndef SIG_FN +#ifdef sunos5 +# define SIG_FN void /* signal-catching functions return void */ +#else /* sunos5 */ +# ifdef BSD +# if (BSD >= 199006) || defined(NeXT) || defined(__osf__) || defined(sun) || defined(ultrix) || defined(apollo) || defined(POSIX_SIGNALS) +# define SIG_FN void /* signal-catching functions return void */ +# else +# define SIG_FN int /* signal-catching functions return int */ +# endif +# else /* BSD */ +# define SIG_FN void /* signal-catching functions return void */ +# endif /* BSD */ +#endif /* sunos5 */ +#endif /* SIG_FN */ + +/* + * call signal or sigset (signal does not block the signal while + * in the handler on sys v and sigset does not exist on bsd) + */ +#if defined(SYSV) && !defined(linux) +#define SIGNAL sigset +#else +#define SIGNAL signal +#endif + +/* + * toupper and tolower macros are different under bsd and sys v + */ +#if defined( SYSV ) && !defined( hpux ) +#define TOUPPER(c) (isascii(c) && islower(c) ? _toupper(c) : c) +#define TOLOWER(c) (isascii(c) && isupper(c) ? _tolower(c) : c) +#else +#define TOUPPER(c) (isascii(c) && islower(c) ? toupper(c) : c) +#define TOLOWER(c) (isascii(c) && isupper(c) ? tolower(c) : c) +#endif + +/* + * put a cover on the tty-related ioctl calls we need to use + */ +#if defined( NeXT ) || (defined(SunOS) && SunOS < 40) +#define TERMIO_TYPE struct sgttyb +#define TERMFLAG_TYPE int +#define GETATTR( fd, tiop ) ioctl((fd), TIOCGETP, (caddr_t)(tiop)) +#define SETATTR( fd, tiop ) ioctl((fd), TIOCSETP, (caddr_t)(tiop)) +#define GETFLAGS( tio ) (tio).sg_flags +#define SETFLAGS( tio, flags ) (tio).sg_flags = (flags) +#else +#define USE_TERMIOS +#define TERMIO_TYPE struct termios +#define TERMFLAG_TYPE tcflag_t +#define GETATTR( fd, tiop ) tcgetattr((fd), (tiop)) +#define SETATTR( fd, tiop ) tcsetattr((fd), TCSANOW /* 0 */, (tiop)) +#define GETFLAGS( tio ) (tio).c_lflag +#define SETFLAGS( tio, flags ) (tio).c_lflag = (flags) +#endif + + +#if defined( ultrix ) || defined( nextstep ) +extern char *strdup(); +#endif /* ultrix || nextstep */ + +#endif /* _LDAP_BRIDGE_H */ diff --git a/include/portable.h.bot b/include/portable.h.bot index 762c289cc6..5e8cb58859 100644 --- a/include/portable.h.bot +++ b/include/portable.h.bot @@ -3,4 +3,6 @@ # include #endif +#include "bridge.h" + #endif /* _LDAP_PORTABLE_H */ diff --git a/include/portable.h.in b/include/portable.h.in index 6a0fa84867..1a54a2017d 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -200,4 +200,6 @@ # include #endif +#include "bridge.h" + #endif /* _LDAP_PORTABLE_H */ From 7d0dd689a7368e6ee77e05318d65cfa8d2b05782 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 16 Sep 1998 22:10:42 +0000 Subject: [PATCH 009/148] Added additional arguments. Still needs much more work. --- configure.in | 133 +++++++++++++++++++++++++++++---------------------- 1 file changed, 75 insertions(+), 58 deletions(-) diff --git a/configure.in b/configure.in index 7cac3b8129..b8f3d67ece 100644 --- a/configure.in +++ b/configure.in @@ -15,60 +15,22 @@ dnl Start Args AC_MSG_CHECKING(arguments) AC_PREFIX_DEFAULT(/usr/local) -dnl general options +dnl General "enable" options CF_ARG_OPTION(debug,[ --enable-debug enable debugging (yes)],[ LDAP_DEBUG=no],[LDAP_DEBUG=yes],yes)dnl CF_ARG_OPTION(libui,[ --enable-libui enable library user interface (yes)],[ LDAP_LIBUI=no],[LDAP_LIBUI=yes],yes)dnl CF_ARG_OPTION(cache,[ --enable-cache enable caching (yes)],[ LDAP_CACHE=no],[LDAP_CACHE=yes],yes)dnl -CF_ARG_OPTION(rlookups,[ --enable-rlookups enable reverse lookups (yes)],[ - LDAP_RLOOKUP=no],[LDAP_RLOOKUP=yes],yes)dnl CF_ARG_OPTION(referrals,[ --enable-referrals enable referrals (yes)],[ LDAP_REFERRALS=no],[LDAP_REFERRALS=yes],yes)dnl -CF_ARG_OPTION(aclgroup,[ --enable-aclgroup enable ACL group support (yes)],[ - LDAP_ACLGROUP=no],[LDAP_ALCGROUP=yes],yes)dnl CF_ARG_OPTION(cldap,[ --enable-clapd enable connectionless ldap (no)],[ LDAP_CLDAP=yes],[LDAP_CLDAP=no],no)dnl CF_ARG_OPTION(phonetic,[ --enable-phonetic enable phonetic/soundex (no)],[ LDAP_PHONETIC=yes],[LDAP_PHONETIC=no],no)dnl -CF_ARG_OPTION(crypt,[ --enable-crypt enable crypt(3) passwords (yes)],[ - LDAP_CRYPT=no],[LDAP_CRYPT=yes],yes)dnl -CF_ARG_OPTION(md5,[ --enable-md5 enable MD5 passwords (yes)],[ - LDAP_MD5=no],[LDAP_MD5=yes],yes)dnl -CF_ARG_OPTION(sha1,[ --enable-sha1 enable SHA1 passwords (yes)],[ - LDAP_SHA1=no],[LDAP_SHA1=yes],yes)dnl - -CF_ARG_OPTION(tcpwrappers,[ --enable-tcpwrappers enable tcp wrapper support (no)],[ - LDAP_TCP_WRAPPERS=yes],[LDAP_TCP_WRAPPERS=no],no)dnl - -dnl server options -CF_ARG_OPTION(ldapd,[ --enable-ldapd enable building ldapd (no)],[ - BUILD_LDAPD=yes],[BUILD_LDAPD=no],no)dnl -CF_ARG_OPTION(slapd,[ --enable-slapd enable building slapd (yes)],[ - BUILD_SLAPD=no],[BUILD_SLAPD=yes],yes)dnl -CF_ARG_OPTION(slurpd,[ --enable-slurpd enable building slurpd (yes)],[ - BUILD_SLURPD=no],[BUILD_SLURPD=yes],yes)dnl - -dnl Backend options -CF_ARG_OPTION(ldbm,[ --enable-ldbm enable ldbm backend (yes)],[ - BUILD_LDBM=no],[BUILD_LDBM=yes],yes)dnl -CF_ARG_OPTION(passwd,[ --enable-passwd enable passwd backend (yes)],[ - BUILD_PASSWD=no],[BUILD_PASSWD=yes],yes)dnl -CF_ARG_OPTION(shell,[ --enable-shell enable shell backend (yes)],[ - BUILD_SHELL=no],[BUILD_SHELL=yes],yes)dnl - -AC_ARG_WITH(ndbm,[ --with-ndbm use NDB for LDBM backend (any)],[ - opt_ndbm=yes],[opt_ndbm=no]) -AC_ARG_WITH(gdbm,[ --with-gdbm use GDBM for LDBM backend (any)],[ - opt_gdbm=yes],[opt_gdbm=no]) -AC_ARG_WITH(dbhash,[ --with-dbhash use Berkeley DB Hash for LDBM backend (any)],[ - opt_dbhash=yes],[opt_dbhash=no]) -AC_ARG_WITH(dbbtree,[ --with-dbbtree use Berkeley DB Btrees for LDBM backend (any)],[ - opt_dbbtree=yes],[opt_dbbtree=no]) - +dnl General "with" options AC_ARG_WITH(kerberos,[ --with-kerberos use Kerberos (no)],[ opt_kerberos=yes],[opt_kerberos=no]) AC_ARG_WITH(kerberos-afs,[ --with-kerberos-afs use AFS Kerberos (no)],[ @@ -76,6 +38,51 @@ AC_ARG_WITH(kerberos-afs,[ --with-kerberos-afs use AFS Kerberos (no)],[ AC_ARG_WITH(threads,[ --with-threads use threads (yes)],[ opt_threads=yes],[opt_threads=no]) +dnl Server options + +dnl LDAPD OPTIONS +CF_ARG_OPTION(ldapd,[ --enable-ldapd enable building ldapd (no)],[ + BUILD_LDAPD=yes],[BUILD_LDAPD=no],no)dnl + +dnl SLAPD OPTIONS +CF_ARG_OPTION(slapd,[ --enable-slapd enable building slapd (yes)],[ + BUILD_SLAPD=no],[BUILD_SLAPD=yes],yes)dnl +CF_ARG_OPTION(aclgroup,[ --enable-aclgroup enable ACL group support (yes)],[ + SLAPD_ACLGROUP=no],[SLAPD_ALCGROUP=yes],yes)dnl +CF_ARG_OPTION(crypt,[ --enable-crypt enable crypt(3) passwords (yes)],[ + SLAPD_CRYPT=no],[SLAPD_CRYPT=yes],yes)dnl +CF_ARG_OPTION(md5,[ --enable-md5 enable MD5 passwords (yes)],[ + SLAPD_MD5=no],[SLAPD_MD5=yes],yes)dnl +CF_ARG_OPTION(sha1,[ --enable-sha1 enable SHA1 passwords (yes)],[ + SLAPD_SHA1=no],[SLAPD_SHA1=yes],yes)dnl +CF_ARG_OPTION(wrappers,[ --enable-wrappers enable tcp wrapper support (no)],[ + SLAPD_TCP_WRAPPERS=yes],[LDAP_TCP_WRAPPERS=no],no)dnl +CF_ARG_OPTION(rlookups,[ --enable-rlookups enable reverse lookups (yes)],[ + LDAP_RLOOKUP=no],[LDAP_RLOOKUP=yes],yes)dnl + +dnl SLAPD Backend options +CF_ARG_OPTION(ldbm,[ --enable-ldbm enable ldbm backend (yes)],[ + SLAPD_LDBM=no],[SLAPD_LDBM=yes],yes)dnl +CF_ARG_OPTION(passwd,[ --enable-passwd enable passwd backend (yes)],[ + SLAPD_PASSWD=no],[SLAPD_PASSWD=yes],yes)dnl +CF_ARG_OPTION(shell,[ --enable-shell enable shell backend (yes)],[ + SLAPD_SHELL=no],[SLAPD_SHELL=yes],yes)dnl + +AC_ARG_WITH(ndbm,[ --with-ndbm use NDB for LDBM backend (any)],[ + opt_ndbm=yes],[opt_ndbm=no]) +AC_ARG_WITH(gdbm,[ --with-gdbm use GDBM for LDBM backend (any)],[ + opt_gdbm=yes],[opt_gdbm=no]) +AC_ARG_WITH(dbhash,[ --with-dbhash use Berkeley DB Hash for LDBM backend (any)],[ + opt_dbhash=yes],[opt_dbhash=no]) +AC_ARG_WITH(dbbtree,[ --with-dbbtree use Berkeley DB Btrees for LDBM backend (any)],[ + opt_dbbtree=yes],[opt_dbbtree=no]) +AC_ARG_WITH(db2,[ --with-db2 use Berkeley DB2 API (any)],[ + opt_db2=yes],[opt_db2=no]) + +dnl SLURPD OPTIONS +CF_ARG_OPTION(slurpd,[ --enable-slurpd enable building slurpd (yes)],[ + BUILD_SLURPD=no],[BUILD_SLURPD=yes],yes)dnl + AC_MSG_RESULT(done) AC_MSG_CHECKING(LDBM preferences) @@ -97,9 +104,9 @@ AC_MSG_RESULT($ldbm_prefer) if test "$BUILD_SLAPD" != "yes" ; then BUILD_SLURPD="no" - BUILD_LDBM="no" - BUILD_PASSWD="no" - BUILD_SHELL="no" + SLAPD_LDBM="no" + SLAPD_PASSWD="no" + SLAPD_SHELL="no" ldbm_prefer="none" fi @@ -107,25 +114,26 @@ AC_SUBST(BUILD_LDAPD) AC_SUBST(BUILD_SLAPD) AC_SUBST(BUILD_SLURPD) -AC_SUBST(BUILD_LDBM) -AC_SUBST(BUILD_PASSWD) -AC_SUBST(BUILD_SHELL) +AC_SUBST(SLAPD_LDBM) +AC_SUBST(SLAPD_PASSWD) +AC_SUBST(SLAPD_SHELL) +dnl general LDAP arguments LDAP_DEFS= if test "$LDAP_DEBUG" = "yes" ; then LDAP_DEFS="$LDAP_DEFS -DLDAP_DEBUG" fi if test "$LDAP_REFERRALS" = "yes" ; then - AC_DEFINE(LDAP_REFERRALS) -dnl LDAP_DEFS="$LDAP_DEFS -DLDAP_REFERRALS" +dnl AC_DEFINE(LDAP_REFERRALS,1) + LDAP_DEFS="$LDAP_DEFS -DLDAP_REFERRALS" fi if test "$LDAP_CACHE" = "no" ; then AC_DEFINE(LDAP_NOCACHE,1) LDAP_DEFS="$LDAP_DEFS -DNO_CACHE" fi if test "$LDAP_CLDAP" = "yes" ; then - AC_DEFINE(LDAP_CONN_LESS,1) + AC_DEFINE(LDAP_CONNECTIONLESS,1) LDAP_DEFS="$LDAP_DEFS -DCLDAP" fi if test "$LDAP_PHONETIC" = "yes" ; then @@ -133,19 +141,28 @@ if test "$LDAP_PHONETIC" = "yes" ; then LDAP_DEFS="$LDAP_DEFS -DSOUNDEX" fi -if test "$BUILD_LDBM" = "yes" ; then - AC_DEFINE(LDAP_LDBM,1) -dnl LDAP_DEFS="$LDAP_DEFS -DLDAP_LDBM" +dnl ldapd arguments +LDAPD_DEFS= + +dnl slapd arguments +SLAPD_DEFS= + +if test "$SLAPD_LDBM" = "yes" ; then + AC_DEFINE(SLAPD_LDBM,1) +dnl SLAPD_DEFS="$SLAPD_DEFS -DSLAPD_LDBM" fi -if test "$BUILD_PASSWD" = "yes" ; then - AC_DEFINE(LDAP_PASSWD,1) -dnl LDAP_DEFS="$LDAP_DEFS -DLDAP_PASSWD" +if test "$SLAPD_PASSWD" = "yes" ; then + AC_DEFINE(SLAPD_PASSWD,1) +dnl SLAPD_DEFS="$SLAPD_DEFS -DSLAPD_PASSWD" fi -if test "$BUILD_SHELL" = "yes" ; then - AC_DEFINE(LDAP_SHELL,1) -dnl LDAP_DEFS="$LDAP_DEFS -DLDAP_SHELL" +if test "$SLAPD_SHELL" = "yes" ; then + AC_DEFINE(SLAPD_SHELL,1) +dnl SLAPD_DEFS="$SLAPD_DEFS -DSLAPD_SHELL" fi +dnl slurpd arguments +SLURPD_DEFS= + dnl End Args dnl Checks for programs. From bfeeea9e427d53c5eec5e571891800c0d58ecfad Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 17 Sep 1998 02:20:58 +0000 Subject: [PATCH 010/148] Fix up portable.h.in to match new configure.in --- include/portable.h.in | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/include/portable.h.in b/include/portable.h.in index 1a54a2017d..b7382dd804 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -77,7 +77,7 @@ #undef HAVE_CRYPT /* define this for connectionless LDAP support */ -#undef LDAP_CONN_LESS +#undef LDAP_CONNECTIONLESS /* define this to remove -lldap cache support */ #undef LDAP_NOCACHE @@ -85,17 +85,14 @@ /* define this for phonetic support */ #undef LDAP_PHONETIC -/* define this for LDAP referrals support */ -#undef LDAP_REFERRALS - /* define this to use SLAPD shell backend */ -#undef LDAP_SHELL +#undef SLAPD_SHELL /* define this to use SLAPD passwd backend */ -#undef LDAP_PASSWD +#undef SLAPD_PASSWD /* define this to use SLAPD LDBM backend */ -#undef LDAP_LDBM +#undef SLAPD_LDBM /* define this to use DBBTREE w/ LDBM backend */ #undef LDBM_USE_DBBTREE From c9474fc766788a6dca4ac360c5b6b233b5b1eeb6 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 17 Sep 1998 02:21:28 +0000 Subject: [PATCH 011/148] Update ldapconfig.h.in based upon current (-devel) ldapconfig.h.edit --- include/ldapconfig.h.in | 101 ++++++++++++++++++++++++++-------------- 1 file changed, 66 insertions(+), 35 deletions(-) diff --git a/include/ldapconfig.h.in b/include/ldapconfig.h.in index 5cc74cfe9c..265016a2e8 100644 --- a/include/ldapconfig.h.in +++ b/include/ldapconfig.h.in @@ -1,5 +1,8 @@ /* - * Copyright (c) 1994 Regents of the University of Michigan. + * Copyright 1998 The OpenLDAP Foundation. + * Copying restrictions apply. See COPYRIGHT file for details. + * + * Portions Copyright (c) 1994 Regents of the University of Michigan. * All rights reserved. * * Redistribution and use in source and binary forms are permitted @@ -10,8 +13,8 @@ * is provided ``as is'' without express or implied warranty. */ -#ifndef _LDAPCLIENT_H -#define _LDAPCLIENT_H +#ifndef _LDAP_CONFIG_H +#define _LDAP_CONFIG_H /* * config.h for LDAP -- edit this file to customize LDAP client behavior. @@ -22,16 +25,28 @@ /* * SHARED DEFINITIONS - things you should change */ - /* default ldap host */ +#define DEFAULT_BINDIR "@BINDIR@" +#define DEFAULT_SBINDIR "@SBINDIR@" +#define DEFAULT_ETCDIR "@ETCDIR@" +#define DEFAULT_LIBEXECDIR "@LIBEXECDIR@" + +/* default ldap host */ #define LDAPHOST "localhost" - /* default place to start searching */ + +#define DEFAULT_LDAPHOST_FILE "@ETCDIR@/ldaphost" +/* default place to start searching */ #define DEFAULT_BASE "o=Your Organization Name, c=US" +#define DEFAULT_BASE_FILE "@ETCDIR@/ldapbase" -#define EDITOR "@EDITOR@" +/* + * default binddn and creditials + * use files, make sure they are not generally readable + */ +#define DEFAULT_BINDDN NULL +#define DEFAULT_BINDDN_FILE "@ETCDIR@/ldapbinddn" -#define DEFAULT_SCONFDIR "@SCONFDIR@/ldap" -#define DEFAULT_SBINDIR "@SBINDIR@" -#define DEFAULT_LIBEXECDIR "@LIBEXECDIR@" +#define DEFAULT_BIND_CRED NULL +#define DEFAULT_BIND_CRED_FILE "@ETCDIR@/ldapbindcred" /********************************************************************* * * @@ -47,27 +62,28 @@ /* default count of DN components to show in entry displays */ #define DEFAULT_RDNCOUNT 2 /* default config file locations */ -#define FILTERFILE "@SYSCONFDIR@/ldap/ldapfilter.conf" -#define TEMPLATEFILE "@SYSCONFDIR@/ldap/ldaptemplates.conf" -#define SEARCHFILE "@SYSCONFDIR@/ldap/ldapsearchprefs.conf" -#define FRIENDLYFILE "@SYSCONFDIR@/ldap/ldapfriendly" +#define FILTERFILE "@ETCDIR@/ldapfilter.conf" +#define TEMPLATEFILE "@ETCDIR@/ldaptemplates.conf" +#define SEARCHFILE "@ETCDIR@/ldapsearchprefs.conf" +#define FRIENDLYFILE "@ETCDIR@/ldapfriendly" /* * FINGER DEFINITIONS */ /* who to bind as */ -#define FINGER_BINDDN NULL +#define FINGER_BINDDN NULL +#define FINGER_BIND_CRED NULL /* where to search */ -#define FINGER_BASE DEFAULT_BASE +#define FINGER_BASE DEFAULT_BASE /* banner to print */ #define FINGER_BANNER "X.500 Finger Service...\r\n" /* who to report errors to */ -#define FINGER_ERRORS "your local system administrator" +#define FINGER_ERRORS "System Administrator" /* what to say if no matches are found */ #define FINGER_NOMATCH "Search failed to find anything.\r\n" /* what to say if the service may be unavailable */ #define FINGER_UNAVAILABLE \ -"The X.500 service may be temporarily unavailable.\r\n\ +"The directory service may be temporarily unavailable.\r\n\ Please try again later.\r\n" /* printed if a match has no email address - for disptmp default */ #define FINGER_NOEMAIL1 "None registered in this service." @@ -95,6 +111,7 @@ Please try again later.\r\n" */ /* who to bind as */ #define GO500_BINDDN NULL +#define GO500_BIND_CRED NULL /* where to search */ #define GO500_BASE DEFAULT_BASE /* port on which to listen */ @@ -119,9 +136,10 @@ Please try again later.\r\n" * GO500GW GOPHER GATEWAY DEFINITIONS */ /* who to bind as */ -#define GO500GW_BINDDN NULL +#define GO500GW_BINDDN NULL +#define GO500GW_BIND_CRED NULL /* where the helpfile lives */ -#define GO500GW_HELPFILE "@SYSCONFDIR@/ldap/go500gw.help" +#define GO500GW_HELPFILE "@ETCDIR@/go500gw.help" /* port on which to listen */ #define GO500GW_PORT 7777 /* timeout on all searches */ @@ -143,12 +161,13 @@ Please try again later.\r\n" */ /* who to bind as */ #define RCPT500_BINDDN NULL +#define RCPT500_BIND_CRED NULL /* where the helpfile lives */ -#define RCPT500_HELPFILE "@SYSCONFDIR@/ldap/rcpt500.help" +#define RCPT500_HELPFILE "@ETCDIR@/rcpt500.help" /* maximum number of matches returned */ #define RCPT500_SIZELIMIT 50 /* address replies will appear to come from */ -#define RCPT500_FROM "\"X.500 Query Program\" " +#define RCPT500_FROM "\"Directory Query Program\" " /* command that will accept an RFC822 message text on standard input, and send it. sendmail -t does this nicely. */ #define RCPT500_PIPEMAILCMD "@SENDMAIL@ -t" @@ -167,7 +186,8 @@ Please try again later.\r\n" * LDAPSEARCH TOOL */ /* who to bind as */ -#define LDAPSEARCH_BINDDN NULL +#define LDAPSEARCH_BINDDN NULL +#define LDAPSEARCH_BIND_CRED NULL /* search base */ #define LDAPSEARCH_BASE DEFAULT_BASE @@ -175,7 +195,8 @@ Please try again later.\r\n" * LDAPMODIFY TOOL */ /* who to bind as */ -#define LDAPMODIFY_BINDDN NULL +#define LDAPMODIFY_BINDDN NULL +#define LDAPMODIFY_BIND_CRED NULL /* search base */ #define LDAPMODIFY_BASE DEFAULT_BASE @@ -183,7 +204,8 @@ Please try again later.\r\n" * LDAPDELETE TOOL */ /* who to bind as */ -#define LDAPDELETE_BINDDN NULL +#define LDAPDELETE_BINDDN NULL +#define LDAPDELETE_BIND_CRED NULL /* search base */ #define LDAPDELETE_BASE DEFAULT_BASE @@ -191,7 +213,8 @@ Please try again later.\r\n" * LDAPMODRDN TOOL */ /* who to bind as */ -#define LDAPMODRDN_BINDDN NULL +#define LDAPMODRDN_BINDDN NULL +#define LDAPMODRDN_BIND_CRED NULL /* search base */ #define LDAPMODRDN_BASE DEFAULT_BASE @@ -199,7 +222,8 @@ Please try again later.\r\n" * MAIL500 MAILER DEFINITIONS */ /* who to bind as */ -#define MAIL500_BINDDN NULL +#define MAIL500_BINDDN NULL +#define MAIL500_BIND_CRED NULL /* max number of ambiguous matches reported */ #define MAIL500_MAXAMBIGUOUS 10 /* max subscribers allowed (size limit when searching for them ) */ @@ -213,7 +237,7 @@ Please try again later.\r\n" * UD DEFINITIONS */ /* ud configuration file */ -#define UD_CONFIG_FILE "@SYSCONFDIR@/ldap/ud.conf" +#define UD_CONFIG_FILE "@ETCDIR@/ud.conf" /* default editor */ #define UD_DEFAULT_EDITOR "@EDITOR@" /* default bbasename of user config file */ @@ -221,9 +245,9 @@ Please try again later.\r\n" /* default user to bind as */ #define UD_BINDDN NULL /* default password to bind with */ -#define UD_PASSWD NULL +#define UD_BIND_CRED NULL /* default search base */ -#define UD_BASE DEFAULT_BASE +#define UD_BASE DEFAULT_BASE /* default base where groups are created */ #define UD_WHERE_GROUPS_ARE_CREATED "" /* default base below which all groups live */ @@ -233,7 +257,10 @@ Please try again later.\r\n" * FAX500 DEFINITIONS */ /* what to bind as */ -#define FAX_BINDDN NULL +#define FAX_BINDDN NULL +#define FAX_BIND_CRED NULL + /* default search base */ +#define FAX_BASE DEFAULT_BASE /* how long to wait for searches */ #define FAX_TIMEOUT 180 /* maximum number of ambiguous matches reported */ @@ -247,7 +274,11 @@ Please try again later.\r\n" * RP500 DEFINITIONS */ /* what to bind as */ -#define RP_BINDDN NULL +#define RP_BINDDN NULL +#define RP_BIND_CRED NULL + /* default search base */ +#define RP_BASE DEFAULT_BASE + /* prefix to add to non-fully-qualified numbers */ #define RP_PHONEPREFIX "" @@ -255,15 +286,15 @@ Please try again later.\r\n" * SLAPD DEFINITIONS */ /* location of the default slapd config file */ -#define SLAPD_DEFAULT_CONFIGFILE "@SYSCONFDIR@/ldap/slapd.conf" +#define SLAPD_DEFAULT_CONFIGFILE "@ETCDIR@/slapd.conf" /* default sizelimit on number of entries from a search */ #define SLAPD_DEFAULT_SIZELIMIT 500 /* default timelimit to spend on a search */ #define SLAPD_DEFAULT_TIMELIMIT 3600 /* location of the slapd pid file */ -#define SLAPD_PIDFILE "@SYSCONFDIR@/ldap/slapd.pid" +#define SLAPD_PIDFILE "@RUNDIR@/slapd.pid" /* location of the slapd args file */ -#define SLAPD_ARGSFILE "@SYSCONFDIR@/ldap/slapd.args" +#define SLAPD_ARGSFILE "@RUNDIR@/slapd.args" /* dn of the special "monitor" entry */ #define SLAPD_MONITOR_DN "cn=monitor" /* dn of the special "config" entry */ @@ -271,4 +302,4 @@ Please try again later.\r\n" /* minimum max ids that a single index entry can map to in ldbm */ #define SLAPD_LDBM_MIN_MAXIDS 4000 -#endif /* _LDAPCLIENT_H */ +#endif /* _LDAP_CONFIG_H */ From 337540b41c3041db70eb982019569abb5abc61b9 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 17 Sep 1998 02:22:11 +0000 Subject: [PATCH 012/148] Replaced with ldapconfig.h.in --- include/ldapconfig.h.edit | 268 -------------------------------------- 1 file changed, 268 deletions(-) delete mode 100644 include/ldapconfig.h.edit diff --git a/include/ldapconfig.h.edit b/include/ldapconfig.h.edit deleted file mode 100644 index 723bde2472..0000000000 --- a/include/ldapconfig.h.edit +++ /dev/null @@ -1,268 +0,0 @@ -/* - * Copyright (c) 1994 Regents of the University of Michigan. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that this notice is preserved and that due credit is given - * to the University of Michigan at Ann Arbor. The name of the University - * may not be used to endorse or promote products derived from this - * software without specific prior written permission. This software - * is provided ``as is'' without express or implied warranty. - */ - -#ifndef _CONFIG_H -#define _CONFIG_H - -/* - * config.h for LDAP -- edit this file to customize LDAP client behavior. - * NO platform-specific definitions should be placed in this file. - * Note that this is NOT used by the LDAP or LBER libraries. - */ - -/* - * SHARED DEFINITIONS - things you should change - */ - /* default ldap host */ -#define LDAPHOST "localhost" - /* default place to start searching */ -#define DEFAULT_BASE "o=Your Organization Name, c=US" - -/********************************************************************* - * * - * You probably do not need to edit anything below this point * - * * - *********************************************************************/ - -/* - * SHARED DEFINITIONS - other things you can change - */ - /* default attribute to use when sorting entries, NULL => sort by DN */ -#define SORT_ATTR NULL - /* default count of DN components to show in entry displays */ -#define DEFAULT_RDNCOUNT 2 - /* default config file locations */ -#define FILTERFILE "%ETCDIR%/ldapfilter.conf" -#define TEMPLATEFILE "%ETCDIR%/ldaptemplates.conf" -#define SEARCHFILE "%ETCDIR%/ldapsearchprefs.conf" -#define FRIENDLYFILE "%ETCDIR%/ldapfriendly" - -/* - * FINGER DEFINITIONS - */ - /* who to bind as */ -#define FINGER_BINDDN NULL - /* where to search */ -#define FINGER_BASE DEFAULT_BASE - /* banner to print */ -#define FINGER_BANNER "X.500 Finger Service...\r\n" - /* who to report errors to */ -#define FINGER_ERRORS "your local system administrator" - /* what to say if no matches are found */ -#define FINGER_NOMATCH "Search failed to find anything.\r\n" - /* what to say if the service may be unavailable */ -#define FINGER_UNAVAILABLE \ -"The X.500 service may be temporarily unavailable.\r\n\ -Please try again later.\r\n" - /* printed if a match has no email address - for disptmp default */ -#define FINGER_NOEMAIL1 "None registered in this service." -#define FINGER_NOEMAIL2 NULL -#define FINGER_NOEMAIL { FINGER_NOEMAIL1, FINGER_NOEMAIL2, NULL } - /* maximum number of matches returned */ -#define FINGER_SIZELIMIT 50 - /* max number of hits displayed in full before a list is presented */ -#define FINGER_LISTLIMIT 1 - /* what to exec for "finger @host" */ -#define FINGER_CMD "/usr/ucb/finger" - /* how to treat aliases when searching */ -#define FINGER_DEREF LDAP_DEREF_FINDING - /* attribute to use when sorting results */ -#define FINGER_SORT_ATTR SORT_ATTR - /* enable ufn support */ -#define FINGER_UFN - /* timeout for searches */ -#define FINGER_TIMEOUT 60 - /* number of DN components to show in entry displays */ -#define FINGER_RDNCOUNT DEFAULT_RDNCOUNT - -/* - * GO500 GOPHER GATEWAY DEFINITIONS - */ - /* who to bind as */ -#define GO500_BINDDN NULL - /* where to search */ -#define GO500_BASE DEFAULT_BASE - /* port on which to listen */ -#define GO500_PORT 5555 - /* how to handle aliases */ -#define GO500_DEREF LDAP_DEREF_FINDING - /* attribute to use when sorting results */ -#define GO500_SORT_ATTR SORT_ATTR - /* timeout for searches */ -#define GO500_TIMEOUT 180 - /* enable ufn support */ -#define GO500_UFN - /* - * only set and uncomment this if your hostname() does not return - * a fully qualified hostname - */ -/* #define GO500_HOSTNAME "fully.qualified.hostname.here" */ - /* number of DN components to show in entry displays */ -#define GO500_RDNCOUNT DEFAULT_RDNCOUNT - -/* - * GO500GW GOPHER GATEWAY DEFINITIONS - */ - /* who to bind as */ -#define GO500GW_BINDDN NULL - /* where the helpfile lives */ -#define GO500GW_HELPFILE "%ETCDIR%/go500gw.help" - /* port on which to listen */ -#define GO500GW_PORT 7777 - /* timeout on all searches */ -#define GO500GW_TIMEOUT 180 - /* enable ufn support */ -#define GO500GW_UFN - /* attribute to use when sorting results */ -#define GO500GW_SORT_ATTR SORT_ATTR - /* - * only set and uncomment this if your hostname() does not return - * a fully qualified hostname - */ -/* #define GO500GW_HOSTNAME "fully.qualified.hostname.here" */ - /* number of DN components to show in entry displays */ -#define GO500GW_RDNCOUNT DEFAULT_RDNCOUNT - -/* - * RCPT500 MAIL RESPONDER GATEWAY DEFINITIONS - */ - /* who to bind as */ -#define RCPT500_BINDDN NULL - /* where the helpfile lives */ -#define RCPT500_HELPFILE "%ETCDIR%/rcpt500.help" - /* maximum number of matches returned */ -#define RCPT500_SIZELIMIT 50 - /* address replies will appear to come from */ -#define RCPT500_FROM "\"X.500 Query Program\" " - /* command that will accept an RFC822 message text on standard - input, and send it. sendmail -t does this nicely. */ -#define RCPT500_PIPEMAILCMD "/usr/lib/sendmail -t" - /* where to search */ -#define RCPT500_BASE DEFAULT_BASE - /* attribute to use when sorting results */ -#define RCPT500_SORT_ATTR SORT_ATTR - /* max number of hits displayed in full before a list is presented */ -#define RCPT500_LISTLIMIT 1 - /* enable ufn support */ -#define RCPT500_UFN - /* number of DN components to show in entry displays */ -#define RCPT500_RDNCOUNT DEFAULT_RDNCOUNT - -/* - * LDAPSEARCH TOOL - */ - /* who to bind as */ -#define LDAPSEARCH_BINDDN NULL - /* search base */ -#define LDAPSEARCH_BASE DEFAULT_BASE - -/* - * LDAPMODIFY TOOL - */ - /* who to bind as */ -#define LDAPMODIFY_BINDDN NULL - /* search base */ -#define LDAPMODIFY_BASE DEFAULT_BASE - -/* - * LDAPDELETE TOOL - */ - /* who to bind as */ -#define LDAPDELETE_BINDDN NULL - /* search base */ -#define LDAPDELETE_BASE DEFAULT_BASE - -/* - * LDAPMODRDN TOOL - */ - /* who to bind as */ -#define LDAPMODRDN_BINDDN NULL - /* search base */ -#define LDAPMODRDN_BASE DEFAULT_BASE - -/* - * MAIL500 MAILER DEFINITIONS - */ - /* who to bind as */ -#define MAIL500_BINDDN NULL - /* max number of ambiguous matches reported */ -#define MAIL500_MAXAMBIGUOUS 10 - /* max subscribers allowed (size limit when searching for them ) */ -#define MAIL500_MAXGROUPMEMBERS LDAP_NO_LIMIT - /* timeout for all searches */ -#define MAIL500_TIMEOUT 180 - /* sendmail location - mail500 needs to exec this */ -#define MAIL500_SENDMAIL "/usr/lib/sendmail" - -/* - * UD DEFINITIONS - */ - /* ud configuration file */ -#define UD_CONFIG_FILE "%ETCDIR%/ud.conf" - /* default editor */ -#define UD_DEFAULT_EDITOR "/usr/ucb/vi" - /* default bbasename of user config file */ -#define UD_USER_CONFIG_FILE ".udrc" - /* default user to bind as */ -#define UD_BINDDN NULL - /* default password to bind with */ -#define UD_PASSWD NULL - /* default search base */ -#define UD_BASE DEFAULT_BASE - /* default base where groups are created */ -#define UD_WHERE_GROUPS_ARE_CREATED "" - /* default base below which all groups live */ -#define UD_WHERE_ALL_GROUPS_LIVE "" - -/* - * FAX500 DEFINITIONS - */ - /* what to bind as */ -#define FAX_BINDDN NULL - /* how long to wait for searches */ -#define FAX_TIMEOUT 180 - /* maximum number of ambiguous matches reported */ -#define FAX_MAXAMBIGUOUS 10 - /* maximum number of members allowed */ -#define FAX_MAXMEMBERS LDAP_NO_LIMIT - /* program to send mail */ -#define FAX_SENDMAIL "/usr/lib/sendmail" - -/* - * RP500 DEFINITIONS - */ - /* what to bind as */ -#define RP_BINDDN NULL - /* prefix to add to non-fully-qualified numbers */ -#define RP_PHONEPREFIX "" - -/* - * SLAPD DEFINITIONS - */ - /* location of the default slapd config file */ -#define SLAPD_DEFAULT_CONFIGFILE "%ETCDIR%/slapd.conf" - /* default sizelimit on number of entries from a search */ -#define SLAPD_DEFAULT_SIZELIMIT 500 - /* default timelimit to spend on a search */ -#define SLAPD_DEFAULT_TIMELIMIT 3600 - /* location of the slapd pid file */ -#define SLAPD_PIDFILE "%ETCDIR%/slapd.pid" - /* location of the slapd args file */ -#define SLAPD_ARGSFILE "%ETCDIR%/slapd.args" - /* dn of the special "monitor" entry */ -#define SLAPD_MONITOR_DN "cn=monitor" - /* dn of the special "config" entry */ -#define SLAPD_CONFIG_DN "cn=config" - /* minimum max ids that a single index entry can map to in ldbm */ -#define SLAPD_LDBM_MIN_MAXIDS 4000 - -#endif /* _CONFIG_H */ From c00311bc051df8be0eb181f1200d4dda6003eba1 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 17 Sep 1998 03:40:30 +0000 Subject: [PATCH 013/148] Use ldapconfig.h instead of hardcoded paths. Merged from -devel. --- servers/slapd/tools/Make-template | 120 ++++++++----------------- servers/slapd/tools/ldif2id2children.c | 9 +- servers/slapd/tools/ldif2id2entry.c | 7 +- servers/slapd/tools/ldif2index.c | 9 +- 4 files changed, 51 insertions(+), 94 deletions(-) diff --git a/servers/slapd/tools/Make-template b/servers/slapd/tools/Make-template index 112c4abbd8..57cc719419 100644 --- a/servers/slapd/tools/Make-template +++ b/servers/slapd/tools/Make-template @@ -24,22 +24,22 @@ OBJS2 = ../config.o ../ch_malloc.o ../backend.o ../charray.o \ ../aclparse.o ../schema.o ../result.o ../filterentry.o \ ../acl.o ../phonetic.o ../attr.o ../value.o ../entry.o \ ../dn.o ../filter.o ../str2filter.o ../ava.o ../init.o \ - ../schemaparse.o ../regex.o ../strdup.o + ../schemaparse.o ../strdup.o INCLUDES= -I. -I$(HDIR) $(EXINCLUDES) -DEFINES = $(DEFS) $(SERVERDEFS) $(THREADS) +DEFINES = $(DEFS) $(LDAP_CRYPT) $(SERVERDEFS) $(THREADS) CFLAGS = $(INCLUDES) $(DEFINES) $(ACFLAGS) LDFLAGS = -L$(LDIR) $(EXLDFLAGS) -LIBS = -lldif -lldap -llber -lldbm -lavl $(LDBMLIB) $(EXLIBS) $(ALIBS) -LIBS2 = -lldif -lldbm -lavl $(LDBMLIB) -llber $(KRBLIBFLAG) $(KRBLIBS) \ - -llthread $(THREADSLIB) $(ALIBS) +LIBS = -lldif -lldap -llber -lldbm -llutil -lavl $(LDBMLIB) $(EXLIBS) $(ALIBS) +LIBS2 = -lldif -lldbm -llutil -lavl $(LDBMLIB) -llber $(KRBLIBFLAG) $(KRBLIBS) \ + -llthread $(THREADSLIB) $(ALIBS) $(LDAP_CRYPT_LIB) all: build-edb2ldif ldif2index ldif2ldbm ldbmcat ldif2id2entry \ ldif2id2children centipede ldbmtest ldif build-edb2ldif: FORCE @if [ "$(HAVEISODE)" = "yes" ]; then \ - $(MAKE) $(MFLAGS) CC=$(CC) EXINCLUDES="$(ISODEINCLUDEFLAG)" \ + $(MAKE) $(MFLAGS) CC="$(CC)" EXINCLUDES="$(ISODEINCLUDEFLAG)" \ EXLDFLAGS="$(ISODELIBFLAG)" EXLIBS="$(ISODELIBS)" edb2ldif; \ else \ echo "uncomment the HAVEISODE=yes line in the Make-common file to build edb2ldif"; \ @@ -59,7 +59,7 @@ edb2-vers.c: $(EDB2LDIFOBJS) build-chlog2replog: FORCE @if [ "$(HAVEISODE)" = "yes" ]; then \ - $(MAKE) $(MFLAGS) CC=$(CC) EXINCLUDES="$(ISODEINCLUDEFLAG)" \ + $(MAKE) $(MFLAGS) CC="$(CC)" EXINCLUDES="$(ISODEINCLUDEFLAG)" \ EXLDFLAGS="$(ISODELIBFLAG)" EXLIBS="$(ISODELIBS)" chlog2replog; \ else \ echo "uncomment the HAVEISODE=yes line in the Make-common file to build chlog2replog"; \ @@ -73,13 +73,10 @@ ldif2index: ldif2index.o ../libbackends.a $(OBJS2) $(CC) $(ALDFLAGS) -o $@ ldif2index.o $(OBJS2) \ ../libbackends.a $(LDFLAGS) $(LIBS2) -ldif2ldbm: ldif2ldbm.sed.o ../libbackends.a $(OBJS2) - $(CC) $(ALDFLAGS) -o $@ ldif2ldbm.sed.o $(OBJS2) \ +ldif2ldbm: ldif2ldbm.o ../libbackends.a $(OBJS2) + $(CC) $(ALDFLAGS) -o $@ ldif2ldbm.o $(OBJS2) \ ../libbackends.a $(LDFLAGS) $(LIBS2) -ldif2ldbm.sed.c: ldif2ldbm.c - $(SED) -e 's;%ETCDIR%;$(RUNTIMEETCDIR);' ldif2ldbm.c > ldif2ldbm.sed.c - ldif2id2entry: ldif2id2entry.o ../libbackends.a $(OBJS2) $(CC) $(ALDFLAGS) -o $@ ldif2id2entry.o $(OBJS2) \ ../libbackends.a $(LDFLAGS) $(LIBS2) @@ -106,49 +103,49 @@ ldbmtest: ldbmtest.o ../libbackends.a $(OBJS2) $(CC) $(ALDFLAGS) -o ldbmtest ldbmtest.o $(OBJS2) \ ../libbackends.a $(LDFLAGS) $(LIBS2) -install: $(ETCDIR) $(ETCDIR)/edb2ldif $(ETCDIR)/ldif2ldbm \ - $(ETCDIR)/ldif2index $(ETCDIR)/ldif2id2entry \ - $(ETCDIR)/ldif2id2children $(ETCDIR)/ldbmcat \ - $(ETCDIR)/centipede $(ETCDIR)/ldbmtest \ - $(ETCDIR)/ldif +install: $(LDAP_SBINDIR) $(LDAP_SBINDIR)/edb2ldif $(LDAP_SBINDIR)/ldif2ldbm \ + $(LDAP_SBINDIR)/ldif2index $(LDAP_SBINDIR)/ldif2id2entry \ + $(LDAP_SBINDIR)/ldif2id2children $(LDAP_SBINDIR)/ldbmcat \ + $(LDAP_SBINDIR)/centipede $(LDAP_SBINDIR)/ldbmtest \ + $(LDAP_SBINDIR)/ldif -$(ETCDIR)/edb2ldif: build-edb2ldif +$(LDAP_SBINDIR)/edb2ldif: build-edb2ldif @if [ "$(HAVEISODE)" = "yes" ]; then \ - $(INSTALL) $(INSTALLFLAGS) -m 755 edb2ldif $(ETCDIR); \ + $(INSTALL) $(INSTALLFLAGS) -m 755 edb2ldif $(LDAP_SBINDIR); \ else \ exit 0; \ fi -$(ETCDIR)/chlog2replog: build-chlog2replog +$(LDAP_SBINDIR)/chlog2replog: build-chlog2replog @if [ "$(HAVEISODE)" = "yes" ]; then \ - $(INSTALL) $(INSTALLFLAGS) -m 755 chlog2replog $(ETCDIR); \ + $(INSTALL) $(INSTALLFLAGS) -m 755 chlog2replog $(LDAP_SBINDIR); \ else \ exit 0; \ fi -$(ETCDIR)/ldif2ldbm: ldif2ldbm - $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2ldbm $(ETCDIR) +$(LDAP_SBINDIR)/ldif2ldbm: ldif2ldbm + $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2ldbm $(LDAP_SBINDIR) -$(ETCDIR)/ldif2index: ldif2index - $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2index $(ETCDIR) +$(LDAP_SBINDIR)/ldif2index: ldif2index + $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2index $(LDAP_SBINDIR) -$(ETCDIR)/ldif2id2entry: ldif2id2entry - $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2id2entry $(ETCDIR) +$(LDAP_SBINDIR)/ldif2id2entry: ldif2id2entry + $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2id2entry $(LDAP_SBINDIR) -$(ETCDIR)/ldif2id2children: ldif2id2children - $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2id2children $(ETCDIR) +$(LDAP_SBINDIR)/ldif2id2children: ldif2id2children + $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2id2children $(LDAP_SBINDIR) -$(ETCDIR)/ldbmcat: ldbmcat - $(INSTALL) $(INSTALLFLAGS) -m 755 ldbmcat $(ETCDIR) +$(LDAP_SBINDIR)/ldbmcat: ldbmcat + $(INSTALL) $(INSTALLFLAGS) -m 755 ldbmcat $(LDAP_SBINDIR) -$(ETCDIR)/ldif: ldif - $(INSTALL) $(INSTALLFLAGS) -m 755 ldif $(ETCDIR) +$(LDAP_SBINDIR)/ldif: ldif + $(INSTALL) $(INSTALLFLAGS) -m 755 ldif $(LDAP_SBINDIR) -$(ETCDIR)/centipede: centipede - $(INSTALL) $(INSTALLFLAGS) -m 755 centipede $(ETCDIR) +$(LDAP_SBINDIR)/centipede: centipede + $(INSTALL) $(INSTALLFLAGS) -m 755 centipede $(LDAP_SBINDIR) -$(ETCDIR)/ldbmtest: ldbmtest - $(INSTALL) $(INSTALLFLAGS) -m 755 ldbmtest $(ETCDIR) +$(LDAP_SBINDIR)/ldbmtest: ldbmtest + $(INSTALL) $(INSTALLFLAGS) -m 755 ldbmtest $(LDAP_SBINDIR) lint: FORCE $(LINT) $(INCLUDES) $(DEFINES) $(SRCS) @@ -160,60 +157,17 @@ clean: FORCE @echo "making clean in `$(PWD)`" $(RM) edb2ldif ldif2index *.o core a.out edb2-vers.c \ ldif2ldbm ldif2id2entry ldif2id2children ldbmcat ldif \ - centipede chlog2replog sizecount ldif2ldbm.sed.c ldbmtest + centipede chlog2replog sizecount ldbmtest -depend: ldif2ldbm.sed.c FORCE +depend: FORCE @if [ ! -z "$(HAVEISODE)" ]; then \ DEPENDEXTRAS="$(ISODEINCLUDEFLAG) chlog2replog.c $(EDB2LDIFSRCS)"; \ fi; \ $(MKDEP) $(INCLUDES) $(DEFINES) $$DEPENDEXTRAS ldif2index.c \ ldif2ldbm.c ldif2id2entry.c ldif2id2children.c ldbmcat.c \ - centipede.c sizecount.c ldif2ldbm.sed.c ldbmtest.c ldif.c + centipede.c sizecount.c ldbmtest.c ldif.c links: @echo "making links in `$(PWD)`" @$(LN) .src/*.[ch] . - -# DO NOT DELETE THIS LINE -- mkdep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -chlog2replog.o: chlog2replog.c ../../../include/ldif.h -edb2ldif.o: edb2ldif.c -ldapsyntax.o: ldapsyntax.c ../../../include/lber.h ../../../include/ldap.h -ldapsyntax.o: ../../../include/ldif.h ldapsyntax.h -ldif2index.o: ldif2index.c ../slap.h ../../../include/avl.h -ldif2index.o: ../../../include/lber.h ../../../include/ldap.h -ldif2index.o: ../../../include/lthread.h ../../../include/ldif.h -ldif2ldbm.o: ldif2ldbm.c ../slap.h ../../../include/avl.h -ldif2ldbm.o: ../../../include/lber.h ../../../include/ldap.h -ldif2ldbm.o: ../../../include/lthread.h ../../../include/ldif.h -ldif2ldbm.o: ../back-ldbm/back-ldbm.h ../../../include/ldbm.h -ldif2id2entry.o: ldif2id2entry.c ../slap.h ../../../include/avl.h -ldif2id2entry.o: ../../../include/lber.h ../../../include/ldap.h -ldif2id2entry.o: ../../../include/lthread.h ../../../include/ldif.h -ldif2id2entry.o: ../back-ldbm/back-ldbm.h ../../../include/ldbm.h -ldif2id2children.o: ldif2id2children.c ../slap.h ../../../include/avl.h -ldif2id2children.o: ../../../include/lber.h ../../../include/ldap.h -ldif2id2children.o: ../../../include/lthread.h ../../../include/ldif.h -ldif2id2children.o: ../back-ldbm/back-ldbm.h ../../../include/ldbm.h -ldbmcat.o: ldbmcat.c ../../../include/ldbm.h ../slap.h ../../../include/avl.h -ldbmcat.o: ../../../include/lber.h ../../../include/ldap.h -ldbmcat.o: ../../../include/lthread.h ../../../include/ldif.h -centipede.o: centipede.c ../../../include/lber.h ../../../include/ldap.h -centipede.o: ../../../include/ldapconfig.h ../../../include/ldbm.h -sizecount.o: sizecount.c ../../../include/ldbm.h ../../../include/lber.h -sizecount.o: ../../../include/ldap.h ../../../include/portable.h -ldif2ldbm.sed.o: ldif2ldbm.sed.c ../slap.h ../../../include/avl.h -ldif2ldbm.sed.o: ../../../include/lber.h ../../../include/ldap.h -ldif2ldbm.sed.o: ../../../include/lthread.h ../../../include/ldif.h -ldif2ldbm.sed.o: ../back-ldbm/back-ldbm.h ../../../include/ldbm.h -ldbmtest.o: ldbmtest.c ../../../include/portable.h -ldbmtest.o: ../../../include/ldapconfig.h ../slap.h ../../../include/avl.h -ldbmtest.o: ../../../include/lber.h ../../../include/ldap.h -ldbmtest.o: ../../../include/lthread.h ../../../include/ldif.h -ldbmtest.o: ../back-ldbm/back-ldbm.h ../../../include/ldbm.h -ldif.o: ldif.c ../../../include/lber.h ../../../include/ldap.h -ldif.o: ../../../include/ldif.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/servers/slapd/tools/ldif2id2children.c b/servers/slapd/tools/ldif2id2children.c index 2fb2aaf603..0bb8e5ec6d 100644 --- a/servers/slapd/tools/ldif2id2children.c +++ b/servers/slapd/tools/ldif2id2children.c @@ -5,7 +5,8 @@ #include "../slap.h" #include "../back-ldbm/back-ldbm.h" -#define DEFAULT_CONFIGFILE "/usr/local/etc/slapd.conf" +#include "ldapconfig.h" + #define MAXARGS 100 extern struct dbcache *ldbm_cache_open(); @@ -63,13 +64,13 @@ main( int argc, char **argv ) int dbnum; ID id; struct dbcache *db, *db2; - Backend *be; + Backend *be = NULL; struct berval bv; struct berval *vals[2]; Avlnode *avltypes = NULL; extern char *optarg; - tailorfile = DEFAULT_CONFIGFILE; + tailorfile = SLAPD_DEFAULT_CONFIGFILE; dbnum = -1; while ( (i = getopt( argc, argv, "d:f:i:n:" )) != EOF ) { switch ( i ) { @@ -121,7 +122,7 @@ main( int argc, char **argv ) fprintf( stderr, "No ldbm database found in config file\n" ); exit( 1 ); } - } else if ( dbnum < 1 || dbnum > nbackends ) { + } else if ( dbnum < 0 || dbnum > (nbackends-1) ) { fprintf( stderr, "Database number selected via -n is out of range\n" ); fprintf( stderr, "Must be in the range 1 to %d (number of databases in the config file)\n", nbackends ); exit( 1 ); diff --git a/servers/slapd/tools/ldif2id2entry.c b/servers/slapd/tools/ldif2id2entry.c index 5c8874c513..ec2bf27279 100644 --- a/servers/slapd/tools/ldif2id2entry.c +++ b/servers/slapd/tools/ldif2id2entry.c @@ -5,7 +5,8 @@ #include "../slap.h" #include "../back-ldbm/back-ldbm.h" -#define DEFAULT_CONFIGFILE "/usr/local/etc/slapd.conf" +#include "ldapconfig.h" + #define MAXARGS 100 extern struct dbcache *ldbm_cache_open(); @@ -65,7 +66,7 @@ main( int argc, char **argv ) FILE *fp; extern char *optarg; - tailorfile = DEFAULT_CONFIGFILE; + tailorfile = SLAPD_DEFAULT_CONFIGFILE; dbnum = -1; while ( (i = getopt( argc, argv, "d:f:i:n:" )) != EOF ) { switch ( i ) { @@ -117,7 +118,7 @@ main( int argc, char **argv ) fprintf( stderr, "No ldbm database found in config file\n" ); exit( 1 ); } - } else if ( dbnum < 1 || dbnum > nbackends ) { + } else if ( dbnum < 0 || dbnum > (nbackends-1) ) { fprintf( stderr, "Database number selected via -n is out of range\n" ); fprintf( stderr, "Must be in the range 1 to %d (number of databases in the config file)\n", nbackends ); exit( 1 ); diff --git a/servers/slapd/tools/ldif2index.c b/servers/slapd/tools/ldif2index.c index af377f6751..dd03f3dc78 100644 --- a/servers/slapd/tools/ldif2index.c +++ b/servers/slapd/tools/ldif2index.c @@ -4,7 +4,8 @@ #include #include "../slap.h" -#define DEFAULT_CONFIGFILE "/usr/local/etc/slapd.conf" +#include "ldapconfig.h" + #define MAXARGS 100 extern void attr_index_config(); @@ -53,13 +54,13 @@ main( int argc, char **argv ) int lmax, lcur, indexmask, syntaxmask; int dbnum; unsigned long id; - Backend *be; + Backend *be = NULL; struct berval bv; struct berval *vals[2]; extern char *optarg; inputfile = NULL; - tailorfile = DEFAULT_CONFIGFILE; + tailorfile = SLAPD_DEFAULT_CONFIGFILE; dbnum = -1; while ( (i = getopt( argc, argv, "d:f:i:n:" )) != EOF ) { switch ( i ) { @@ -108,7 +109,7 @@ main( int argc, char **argv ) fprintf( stderr, "No ldbm database found in config file\n" ); exit( 1 ); } - } else if ( dbnum < 1 || dbnum > nbackends ) { + } else if ( dbnum < 0 || dbnum > (nbackends-1) ) { fprintf( stderr, "Database number selected via -n is out of range\n" ); fprintf( stderr, "Must be in the range 1 to %d (number of databases in the config file)\n", nbackends ); exit( 1 ); From 3efd6599e8948675416b92bacb3c95f51b797ce5 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 17 Sep 1998 03:57:35 +0000 Subject: [PATCH 014/148] include directory getting closer... still not sure how best to handle ldapconfig.h.in. --- acconfig.h | 22 +++++----------------- build/top.mk | 6 ++++-- configure.in | 38 ++++++++++++++++++++++++-------------- include/Makefile.in | 18 ++++++++++++++++++ include/ldapconfig.h.in | 27 ++++++++++++++------------- 5 files changed, 65 insertions(+), 46 deletions(-) create mode 100644 include/Makefile.in diff --git a/acconfig.h b/acconfig.h index 48c2f9d0bd..e204299f8a 100644 --- a/acconfig.h +++ b/acconfig.h @@ -1,15 +1,6 @@ /* acconfig.h - This file is in the public domain. - Descriptive text for the C preprocessor macros that the distributed Autoconf macros can define. - No software package will use all of them; autoheader copies the ones - your configure.in uses into your configuration header file templates. - - The entries are in sort -df order: alphabetical, case insensitive, - ignoring punctuation (such as underscores). Although this order - can split up related entries, it makes it easier to check whether - a given entry is in the file. Leave the following blank line there!! Autoheader needs it. */ @@ -21,7 +12,7 @@ #undef HAVE_CRYPT /* define this for connectionless LDAP support */ -#undef LDAP_CONN_LESS +#undef LDAP_CONNECTIONLESS /* define this to remove -lldap cache support */ #undef LDAP_NOCACHE @@ -33,13 +24,13 @@ #undef LDAP_REFERRALS /* define this to use SLAPD shell backend */ -#undef LDAP_SHELL +#undef SLAPD_SHELL /* define this to use SLAPD passwd backend */ -#undef LDAP_PASSWD +#undef SLAPD_PASSWD /* define this to use SLAPD LDBM backend */ -#undef LDAP_LDBM +#undef SLAPD_LDBM /* define this to use DBBTREE w/ LDBM backend */ #undef LDBM_USE_DBBTREE @@ -54,7 +45,4 @@ #undef LDBM_USE_NDBM -/* Leave that blank line there!! Autoheader needs it. - If you're adding to this file, keep in mind: - The entries are in sort -df order: alphabetical, case insensitive, - ignoring punctuation (such as underscores). */ +/* Leave that blank line there!! Autoheader needs it. */ diff --git a/build/top.mk b/build/top.mk index 78ac505a4b..19bbb20ce1 100644 --- a/build/top.mk +++ b/build/top.mk @@ -1,5 +1,7 @@ ## -## Copyright 1998 Net Boolean Incorporated +## Copyright 1998 The OpenLDAP Foundation +## COPYING RESTRICTIONS APPLY. See COPYRIGHT File in top level directory +## of this package for details. ## @SET_MAKE@ @@ -15,7 +17,7 @@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ -sysconfdir = @sysconfdir@/ldap +sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ diff --git a/configure.in b/configure.in index b8f3d67ece..6ca9263392 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,11 @@ +dnl Copyright 1998 The OpenLDAP Foundation. All Rights Reserved. dnl -dnl Configure.in +dnl Redistribution and use in source and binary forms are permitted only +dnl as authorized by the OpenLDAP Public License. A copy of this +dnl license is available at http://www.OpenLDAP.org/license.html or +dnl in file LICENSE in the top-level directory of the distribution. +dnl ---- +dnl Configure.in for OpenLDAP dnl AC_INIT(include/ldap.h) dnl @@ -27,8 +33,6 @@ CF_ARG_OPTION(referrals,[ --enable-referrals enable referrals (yes)],[ CF_ARG_OPTION(cldap,[ --enable-clapd enable connectionless ldap (no)],[ LDAP_CLDAP=yes],[LDAP_CLDAP=no],no)dnl -CF_ARG_OPTION(phonetic,[ --enable-phonetic enable phonetic/soundex (no)],[ - LDAP_PHONETIC=yes],[LDAP_PHONETIC=no],no)dnl dnl General "with" options AC_ARG_WITH(kerberos,[ --with-kerberos use Kerberos (no)],[ @@ -57,8 +61,10 @@ CF_ARG_OPTION(sha1,[ --enable-sha1 enable SHA1 passwords (yes)],[ SLAPD_SHA1=no],[SLAPD_SHA1=yes],yes)dnl CF_ARG_OPTION(wrappers,[ --enable-wrappers enable tcp wrapper support (no)],[ SLAPD_TCP_WRAPPERS=yes],[LDAP_TCP_WRAPPERS=no],no)dnl +CF_ARG_OPTION(phonetic,[ --enable-phonetic enable phonetic/soundex (no)],[ + SLAPD_PHONETIC=yes],[SLAPD_PHONETIC=no],no)dnl CF_ARG_OPTION(rlookups,[ --enable-rlookups enable reverse lookups (yes)],[ - LDAP_RLOOKUP=no],[LDAP_RLOOKUP=yes],yes)dnl + SLAPD_RLOOKUP=no],[SLAPD_RLOOKUP=yes],yes)dnl dnl SLAPD Backend options CF_ARG_OPTION(ldbm,[ --enable-ldbm enable ldbm backend (yes)],[ @@ -111,12 +117,14 @@ if test "$BUILD_SLAPD" != "yes" ; then fi AC_SUBST(BUILD_LDAPD) + AC_SUBST(BUILD_SLAPD) + AC_SUBST(SLAPD_LDBM) + AC_SUBST(SLAPD_PASSWD) + AC_SUBST(SLAPD_SHELL) + AC_SUBST(BUILD_SLURPD) -AC_SUBST(SLAPD_LDBM) -AC_SUBST(SLAPD_PASSWD) -AC_SUBST(SLAPD_SHELL) dnl general LDAP arguments LDAP_DEFS= @@ -125,7 +133,7 @@ if test "$LDAP_DEBUG" = "yes" ; then LDAP_DEFS="$LDAP_DEFS -DLDAP_DEBUG" fi if test "$LDAP_REFERRALS" = "yes" ; then -dnl AC_DEFINE(LDAP_REFERRALS,1) + AC_DEFINE(LDAP_REFERRALS,1) LDAP_DEFS="$LDAP_DEFS -DLDAP_REFERRALS" fi if test "$LDAP_CACHE" = "no" ; then @@ -136,16 +144,16 @@ if test "$LDAP_CLDAP" = "yes" ; then AC_DEFINE(LDAP_CONNECTIONLESS,1) LDAP_DEFS="$LDAP_DEFS -DCLDAP" fi -if test "$LDAP_PHONETIC" = "yes" ; then - AC_DEFINE(LDAP_PHONETIC,1) - LDAP_DEFS="$LDAP_DEFS -DSOUNDEX" -fi dnl ldapd arguments LDAPD_DEFS= dnl slapd arguments SLAPD_DEFS= +if test "$SLAPD_PHONETIC" = "yes" ; then + AC_DEFINE(SLAPD_PHONETIC,1) + SLAPD_DEFS="$SLAPD_DEFS -DSOUNDEX" +fi if test "$SLAPD_LDBM" = "yes" ; then AC_DEFINE(SLAPD_LDBM,1) @@ -318,12 +326,12 @@ dnl need do this early test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' +dnl append /ldap to $sysconfdir, probably should make this a settable option. +sysconfdir="$sysconfdir/ldap" SYSCONFDIR=`eval echo $sysconfdir` AC_SUBST(SYSCONFDIR) dnl AC_OUTPUT( \ -dnl include/ldapconfig.h \ -dnl include/Makefile:build/top.mk:include/Makefile.in \ dnl clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \ dnl clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \ dnl clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \ @@ -356,5 +364,7 @@ dnl Makefile:build/top.mk:Makefile.in:build/dir.mk, \ dnl [date > stamp-h]) AC_OUTPUT( \ +include/ldapconfig.h \ +include/Makefile:build/top.mk:include/Makefile.in \ Makefile:build/top.mk:Makefile.in:build/dir.mk \ ,[date > stamp-h]) diff --git a/include/Makefile.in b/include/Makefile.in new file mode 100644 index 0000000000..c23de8a47f --- /dev/null +++ b/include/Makefile.in @@ -0,0 +1,18 @@ +# +# Makefile.in for OpenLDAP include directory +# + +install: all FORCE + -$(MKDIR) -p $(includedir) + $(INSTALL) $(INSTALLFLAGS) -m 644 ldap.h $(includedir) + $(INSTALL) $(INSTALLFLAGS) -m 644 lber.h $(includedir) + $(INSTALL) $(INSTALLFLAGS) -m 644 proto-lber.h $(includedir) + $(INSTALL) $(INSTALLFLAGS) -m 644 proto-ldap.h $(includedir) + $(INSTALL) $(INSTALLFLAGS) -m 644 disptmpl.h $(includedir) + $(INSTALL) $(INSTALLFLAGS) -m 644 srchpref.h $(includedir) + +all: FORCE +clean: FORCE +veryclean: FORCE +depend: FORCE + diff --git a/include/ldapconfig.h.in b/include/ldapconfig.h.in index 265016a2e8..5ec6126656 100644 --- a/include/ldapconfig.h.in +++ b/include/ldapconfig.h.in @@ -26,27 +26,28 @@ * SHARED DEFINITIONS - things you should change */ #define DEFAULT_BINDIR "@BINDIR@" -#define DEFAULT_SBINDIR "@SBINDIR@" #define DEFAULT_ETCDIR "@ETCDIR@" #define DEFAULT_LIBEXECDIR "@LIBEXECDIR@" +#define DEFAULT_SBINDIR "@SBINDIR@" +#define DEFAULT_SYSCONFDIR "@SYSCONFDIR@" /* default ldap host */ #define LDAPHOST "localhost" -#define DEFAULT_LDAPHOST_FILE "@ETCDIR@/ldaphost" +#define DEFAULT_LDAPHOST_FILE "@SYSCONFDIR@/ldaphost" /* default place to start searching */ #define DEFAULT_BASE "o=Your Organization Name, c=US" -#define DEFAULT_BASE_FILE "@ETCDIR@/ldapbase" +#define DEFAULT_BASE_FILE "@SYSCONFDIR@/ldapbase" /* * default binddn and creditials * use files, make sure they are not generally readable */ #define DEFAULT_BINDDN NULL -#define DEFAULT_BINDDN_FILE "@ETCDIR@/ldapbinddn" +#define DEFAULT_BINDDN_FILE "@SYSCONFDIR@/ldapbinddn" #define DEFAULT_BIND_CRED NULL -#define DEFAULT_BIND_CRED_FILE "@ETCDIR@/ldapbindcred" +#define DEFAULT_BIND_CRED_FILE "@SYSCONFDIR@/ldapbindcred" /********************************************************************* * * @@ -62,10 +63,10 @@ /* default count of DN components to show in entry displays */ #define DEFAULT_RDNCOUNT 2 /* default config file locations */ -#define FILTERFILE "@ETCDIR@/ldapfilter.conf" -#define TEMPLATEFILE "@ETCDIR@/ldaptemplates.conf" -#define SEARCHFILE "@ETCDIR@/ldapsearchprefs.conf" -#define FRIENDLYFILE "@ETCDIR@/ldapfriendly" +#define FILTERFILE "@SYSCONFDIR@/ldapfilter.conf" +#define TEMPLATEFILE "@SYSCONFDIR@/ldaptemplates.conf" +#define SEARCHFILE "@SYSCONFDIR@/ldapsearchprefs.conf" +#define FRIENDLYFILE "@SYSCONFDIR@/ldapfriendly" /* * FINGER DEFINITIONS @@ -139,7 +140,7 @@ Please try again later.\r\n" #define GO500GW_BINDDN NULL #define GO500GW_BIND_CRED NULL /* where the helpfile lives */ -#define GO500GW_HELPFILE "@ETCDIR@/go500gw.help" +#define GO500GW_HELPFILE "@SYSCONFDIR@/go500gw.help" /* port on which to listen */ #define GO500GW_PORT 7777 /* timeout on all searches */ @@ -163,7 +164,7 @@ Please try again later.\r\n" #define RCPT500_BINDDN NULL #define RCPT500_BIND_CRED NULL /* where the helpfile lives */ -#define RCPT500_HELPFILE "@ETCDIR@/rcpt500.help" +#define RCPT500_HELPFILE "@SYSCONFDIR@/rcpt500.help" /* maximum number of matches returned */ #define RCPT500_SIZELIMIT 50 /* address replies will appear to come from */ @@ -237,7 +238,7 @@ Please try again later.\r\n" * UD DEFINITIONS */ /* ud configuration file */ -#define UD_CONFIG_FILE "@ETCDIR@/ud.conf" +#define UD_CONFIG_FILE "@SYSCONFDIR@/ud.conf" /* default editor */ #define UD_DEFAULT_EDITOR "@EDITOR@" /* default bbasename of user config file */ @@ -286,7 +287,7 @@ Please try again later.\r\n" * SLAPD DEFINITIONS */ /* location of the default slapd config file */ -#define SLAPD_DEFAULT_CONFIGFILE "@ETCDIR@/slapd.conf" +#define SLAPD_DEFAULT_CONFIGFILE "@SYSCONFDIR@/slapd.conf" /* default sizelimit on number of entries from a search */ #define SLAPD_DEFAULT_SIZELIMIT 500 /* default timelimit to spend on a search */ From 629761f3c6bcef0360bc0e790e0e79c3d99414d2 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 17 Sep 1998 04:23:20 +0000 Subject: [PATCH 015/148] Under delete. --- include/ldapconfig.h.in | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/include/ldapconfig.h.in b/include/ldapconfig.h.in index 5ec6126656..b9b139d3c3 100644 --- a/include/ldapconfig.h.in +++ b/include/ldapconfig.h.in @@ -23,13 +23,20 @@ */ /* - * SHARED DEFINITIONS - things you should change + * SHARED DEFINITIONS */ -#define DEFAULT_BINDIR "@BINDIR@" -#define DEFAULT_ETCDIR "@ETCDIR@" -#define DEFAULT_LIBEXECDIR "@LIBEXECDIR@" -#define DEFAULT_SBINDIR "@SBINDIR@" -#define DEFAULT_SYSCONFDIR "@SYSCONFDIR@" +#define DEFAULT_BINDIR "@BINDIR@" +#define DEFAULT_SBINDIR "@SBINDIR@" +#define DEFAULT_LIBEXECDIR "@LIBEXECDIR@" +#define DEFAULT_DATADIR "@DATADIR@" +#define DEFAULT_SYSCONFDIR "@SYSCONFDIR@" +#define DEFAULT_SHAREDSTATEDIR "@SHAREDSTATEDIR@" +#define DEFAULT_LOCALSTATEDIR "@LOCALSTATEDIR@" +#define DEFAULT_LIBDIR "@LIBDIR@" +#define DEFAULT_INCLUDEDIR "@INCLUDEDIR@" +#define DEFAULT_OLDINCLUDEDIR "@OLDINCLUDEDIR@" +#define DEFAULT_INFODIR "@INFODIR@" +#define DEFAULT_MANDIR "@MANDIR@" /* default ldap host */ #define LDAPHOST "localhost" From 36f9d6124bd58655dcb73924866ea79b02420e8b Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 17 Sep 1998 04:25:07 +0000 Subject: [PATCH 016/148] Undo delete. This file should be hand merged. --- include/ldapconfig.h.edit | 302 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 302 insertions(+) create mode 100644 include/ldapconfig.h.edit diff --git a/include/ldapconfig.h.edit b/include/ldapconfig.h.edit new file mode 100644 index 0000000000..9bf23812d4 --- /dev/null +++ b/include/ldapconfig.h.edit @@ -0,0 +1,302 @@ +/* + * Copyright (c) 1994 Regents of the University of Michigan. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that this notice is preserved and that due credit is given + * to the University of Michigan at Ann Arbor. The name of the University + * may not be used to endorse or promote products derived from this + * software without specific prior written permission. This software + * is provided ``as is'' without express or implied warranty. + */ + +#ifndef _LDAP_CONFIG_H +#define _LDAP_CONFIG_H + +/* + * config.h for LDAP -- edit this file to customize LDAP client behavior. + * NO platform-specific definitions should be placed in this file. + * Note that this is NOT used by the LDAP or LBER libraries. + */ + +/* + * SHARED DEFINITIONS - things you should change + */ +#define DEFAULT_BINDIR "%BINDIR%" +#define DEFAULT_SBINDIR "%SBINDIR%" +#define DEFAULT_ETCDIR "%ETCDIR%" +#define DEFAULT_LIBEXECDIR "%LIBEXECDIR%" + +/* default ldap host */ +#define LDAPHOST "localhost" + +#define DEFAULT_LDAPHOST_FILE "%ETCDIR%/ldaphost" +/* default place to start searching */ +#define DEFAULT_BASE "o=Your Organization Name, c=US" +#define DEFAULT_BASE_FILE "%ETCDIR%/ldapbase" + +/* + * default binddn and creditials + * use files, make sure they are not generally readable + */ +#define DEFAULT_BINDDN NULL +#define DEFAULT_BINDDN_FILE "%ETCDIR%/ldapbinddn" + +#define DEFAULT_BIND_CRED NULL +#define DEFAULT_BIND_CRED_FILE "%ETCDIR%/ldapbindcred" + +/********************************************************************* + * * + * You probably do not need to edit anything below this point * + * * + *********************************************************************/ + +/* + * SHARED DEFINITIONS - other things you can change + */ + /* default attribute to use when sorting entries, NULL => sort by DN */ +#define SORT_ATTR NULL + /* default count of DN components to show in entry displays */ +#define DEFAULT_RDNCOUNT 2 + /* default config file locations */ +#define FILTERFILE "%ETCDIR%/ldapfilter.conf" +#define TEMPLATEFILE "%ETCDIR%/ldaptemplates.conf" +#define SEARCHFILE "%ETCDIR%/ldapsearchprefs.conf" +#define FRIENDLYFILE "%ETCDIR%/ldapfriendly" + +/* + * FINGER DEFINITIONS + */ + /* who to bind as */ +#define FINGER_BINDDN NULL +#define FINGER_BIND_CRED NULL + /* where to search */ +#define FINGER_BASE DEFAULT_BASE + /* banner to print */ +#define FINGER_BANNER "X.500 Finger Service...\r\n" + /* who to report errors to */ +#define FINGER_ERRORS "System Administrator" + /* what to say if no matches are found */ +#define FINGER_NOMATCH "Search failed to find anything.\r\n" + /* what to say if the service may be unavailable */ +#define FINGER_UNAVAILABLE \ +"The directory service may be temporarily unavailable.\r\n\ +Please try again later.\r\n" + /* printed if a match has no email address - for disptmp default */ +#define FINGER_NOEMAIL1 "None registered in this service." +#define FINGER_NOEMAIL2 NULL +#define FINGER_NOEMAIL { FINGER_NOEMAIL1, FINGER_NOEMAIL2, NULL } + /* maximum number of matches returned */ +#define FINGER_SIZELIMIT 50 + /* max number of hits displayed in full before a list is presented */ +#define FINGER_LISTLIMIT 1 + /* what to exec for "finger @host" */ +#define FINGER_CMD "%FINGER%" + /* how to treat aliases when searching */ +#define FINGER_DEREF LDAP_DEREF_FINDING + /* attribute to use when sorting results */ +#define FINGER_SORT_ATTR SORT_ATTR + /* enable ufn support */ +#define FINGER_UFN + /* timeout for searches */ +#define FINGER_TIMEOUT 60 + /* number of DN components to show in entry displays */ +#define FINGER_RDNCOUNT DEFAULT_RDNCOUNT + +/* + * GO500 GOPHER GATEWAY DEFINITIONS + */ + /* who to bind as */ +#define GO500_BINDDN NULL +#define GO500_BIND_CRED NULL + /* where to search */ +#define GO500_BASE DEFAULT_BASE + /* port on which to listen */ +#define GO500_PORT 5555 + /* how to handle aliases */ +#define GO500_DEREF LDAP_DEREF_FINDING + /* attribute to use when sorting results */ +#define GO500_SORT_ATTR SORT_ATTR + /* timeout for searches */ +#define GO500_TIMEOUT 180 + /* enable ufn support */ +#define GO500_UFN + /* + * only set and uncomment this if your hostname() does not return + * a fully qualified hostname + */ +/* #define GO500_HOSTNAME "fully.qualified.hostname.here" */ + /* number of DN components to show in entry displays */ +#define GO500_RDNCOUNT DEFAULT_RDNCOUNT + +/* + * GO500GW GOPHER GATEWAY DEFINITIONS + */ + /* who to bind as */ +#define GO500GW_BINDDN NULL +#define GO500GW_BIND_CRED NULL + /* where the helpfile lives */ +#define GO500GW_HELPFILE "%ETCDIR%/go500gw.help" + /* port on which to listen */ +#define GO500GW_PORT 7777 + /* timeout on all searches */ +#define GO500GW_TIMEOUT 180 + /* enable ufn support */ +#define GO500GW_UFN + /* attribute to use when sorting results */ +#define GO500GW_SORT_ATTR SORT_ATTR + /* + * only set and uncomment this if your hostname() does not return + * a fully qualified hostname + */ +/* #define GO500GW_HOSTNAME "fully.qualified.hostname.here" */ + /* number of DN components to show in entry displays */ +#define GO500GW_RDNCOUNT DEFAULT_RDNCOUNT + +/* + * RCPT500 MAIL RESPONDER GATEWAY DEFINITIONS + */ + /* who to bind as */ +#define RCPT500_BINDDN NULL +#define RCPT500_BIND_CRED NULL + /* where the helpfile lives */ +#define RCPT500_HELPFILE "%ETCDIR%/rcpt500.help" + /* maximum number of matches returned */ +#define RCPT500_SIZELIMIT 50 + /* address replies will appear to come from */ +#define RCPT500_FROM "\"Directory Query Program\" " + /* command that will accept an RFC822 message text on standard + input, and send it. sendmail -t does this nicely. */ +#define RCPT500_PIPEMAILCMD "%SENDMAIL% -t" + /* where to search */ +#define RCPT500_BASE DEFAULT_BASE + /* attribute to use when sorting results */ +#define RCPT500_SORT_ATTR SORT_ATTR + /* max number of hits displayed in full before a list is presented */ +#define RCPT500_LISTLIMIT 1 + /* enable ufn support */ +#define RCPT500_UFN + /* number of DN components to show in entry displays */ +#define RCPT500_RDNCOUNT DEFAULT_RDNCOUNT + +/* + * LDAPSEARCH TOOL + */ + /* who to bind as */ +#define LDAPSEARCH_BINDDN NULL +#define LDAPSEARCH_BIND_CRED NULL + /* search base */ +#define LDAPSEARCH_BASE DEFAULT_BASE + +/* + * LDAPMODIFY TOOL + */ + /* who to bind as */ +#define LDAPMODIFY_BINDDN NULL +#define LDAPMODIFY_BIND_CRED NULL + /* search base */ +#define LDAPMODIFY_BASE DEFAULT_BASE + +/* + * LDAPDELETE TOOL + */ + /* who to bind as */ +#define LDAPDELETE_BINDDN NULL +#define LDAPDELETE_BIND_CRED NULL + /* search base */ +#define LDAPDELETE_BASE DEFAULT_BASE + +/* + * LDAPMODRDN TOOL + */ + /* who to bind as */ +#define LDAPMODRDN_BINDDN NULL +#define LDAPMODRDN_BIND_CRED NULL + /* search base */ +#define LDAPMODRDN_BASE DEFAULT_BASE + +/* + * MAIL500 MAILER DEFINITIONS + */ + /* who to bind as */ +#define MAIL500_BINDDN NULL +#define MAIL500_BIND_CRED NULL + /* max number of ambiguous matches reported */ +#define MAIL500_MAXAMBIGUOUS 10 + /* max subscribers allowed (size limit when searching for them ) */ +#define MAIL500_MAXGROUPMEMBERS LDAP_NO_LIMIT + /* timeout for all searches */ +#define MAIL500_TIMEOUT 180 + /* sendmail location - mail500 needs to exec this */ +#define MAIL500_SENDMAIL "%SENDMAIL%" + +/* + * UD DEFINITIONS + */ + /* ud configuration file */ +#define UD_CONFIG_FILE "%ETCDIR%/ud.conf" + /* default editor */ +#define UD_DEFAULT_EDITOR "%EDITOR%" + /* default bbasename of user config file */ +#define UD_USER_CONFIG_FILE ".udrc" + /* default user to bind as */ +#define UD_BINDDN NULL + /* default password to bind with */ +#define UD_BIND_CRED NULL + /* default search base */ +#define UD_BASE DEFAULT_BASE + /* default base where groups are created */ +#define UD_WHERE_GROUPS_ARE_CREATED "" + /* default base below which all groups live */ +#define UD_WHERE_ALL_GROUPS_LIVE "" + +/* + * FAX500 DEFINITIONS + */ + /* what to bind as */ +#define FAX_BINDDN NULL +#define FAX_BIND_CRED NULL + /* default search base */ +#define FAX_BASE DEFAULT_BASE + /* how long to wait for searches */ +#define FAX_TIMEOUT 180 + /* maximum number of ambiguous matches reported */ +#define FAX_MAXAMBIGUOUS 10 + /* maximum number of members allowed */ +#define FAX_MAXMEMBERS LDAP_NO_LIMIT + /* program to send mail */ +#define FAX_SENDMAIL "%SENDMAIL%" + +/* + * RP500 DEFINITIONS + */ + /* what to bind as */ +#define RP_BINDDN NULL +#define RP_BIND_CRED NULL + /* default search base */ +#define RP_BASE DEFAULT_BASE + + /* prefix to add to non-fully-qualified numbers */ +#define RP_PHONEPREFIX "" + +/* + * SLAPD DEFINITIONS + */ + /* location of the default slapd config file */ +#define SLAPD_DEFAULT_CONFIGFILE "%ETCDIR%/slapd.conf" + /* default sizelimit on number of entries from a search */ +#define SLAPD_DEFAULT_SIZELIMIT 500 + /* default timelimit to spend on a search */ +#define SLAPD_DEFAULT_TIMELIMIT 3600 + /* location of the slapd pid file */ +#define SLAPD_PIDFILE "%RUNDIR%/slapd.pid" + /* location of the slapd args file */ +#define SLAPD_ARGSFILE "%RUNDIR%/slapd.args" + /* dn of the special "monitor" entry */ +#define SLAPD_MONITOR_DN "cn=monitor" + /* dn of the special "config" entry */ +#define SLAPD_CONFIG_DN "cn=config" + /* minimum max ids that a single index entry can map to in ldbm */ +#define SLAPD_LDBM_MIN_MAXIDS 4000 + +#endif /* _LDAP_CONFIG_H */ From 45df0e2c9a4d85bdbe87b70b96eb260f7bb37ad4 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 17 Sep 1998 04:43:43 +0000 Subject: [PATCH 017/148] Added misc commands. --- build/info.mk | 1 - build/top.mk | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/build/info.mk b/build/info.mk index 5ea8e7520b..22f60cc444 100644 --- a/build/info.mk +++ b/build/info.mk @@ -2,4 +2,3 @@ ## Makefile Template for Non-Source Directories ## - diff --git a/build/top.mk b/build/top.mk index 19bbb20ce1..690cc2f579 100644 --- a/build/top.mk +++ b/build/top.mk @@ -49,7 +49,14 @@ BASENAME = basename PWD = pwd CAT = cat MKDIR = mkdir +CHMOD = chmod +# Misc UNIX commands used in programs +EDITOR = @EDITOR@ +FINGER = @FINGER@ +SENDMAIL = @SENDMAIL@ + +# Version VERSIONFILE = $(top_srcdir)/build/version INCLUDEDIR = -I$(top_srcdir)/include $(XINCLUDEDIR) From 4d552de346afc7884760d3353738f106fb980ddb Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 17 Sep 1998 04:46:19 +0000 Subject: [PATCH 018/148] From BOOLEAN_LDAP --- libraries/Makefile.in | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 libraries/Makefile.in diff --git a/libraries/Makefile.in b/libraries/Makefile.in new file mode 100644 index 0000000000..0fc2130a8a --- /dev/null +++ b/libraries/Makefile.in @@ -0,0 +1,6 @@ +# Master Makefile for Net Boolean LDAP +# Copyright 1998 Net Boolean Incorporated +# COPYING RESTRICTIONS APPLY, See COPYING file + +SUBDIRS= libavl liblber libldap libldif libldbm liblthread + From 30bdcf4035c92b610badcda05b1f3fcf9b04be2d Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 17 Sep 1998 04:47:36 +0000 Subject: [PATCH 019/148] Reassign copyright and add liblutil directory --- libraries/Makefile.in | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libraries/Makefile.in b/libraries/Makefile.in index 0fc2130a8a..0c8f56e616 100644 --- a/libraries/Makefile.in +++ b/libraries/Makefile.in @@ -1,6 +1,7 @@ -# Master Makefile for Net Boolean LDAP -# Copyright 1998 Net Boolean Incorporated -# COPYING RESTRICTIONS APPLY, See COPYING file +## Copyright 1998 The OpenLDAP Foundation +## COPYING RESTRICTIONS APPLY, See COPYING file +## +## Libraries Makefile for OpenLDAP -SUBDIRS= libavl liblber libldap libldif libldbm liblthread +SUBDIRS= libavl liblber libldap libldif libldbm liblthread liblutil From 0d3bce858d8311c2da300402b8ff49961e14e18b Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 17 Sep 1998 04:49:44 +0000 Subject: [PATCH 020/148] Working include directory! --- configure.in | 12 +----------- include/Makefile.in | 23 ++++++++++++++++++++++- include/ldapconfig.h.edit | 26 +++++++++++++------------- 3 files changed, 36 insertions(+), 25 deletions(-) diff --git a/configure.in b/configure.in index 6ca9263392..23b4423220 100644 --- a/configure.in +++ b/configure.in @@ -322,15 +322,6 @@ AC_REPLACE_FUNCS(strdup) # Check Configuration CF_SYS_ERRLIST -dnl need do this early -test "x$prefix" = xNONE && prefix=$ac_default_prefix -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -dnl append /ldap to $sysconfdir, probably should make this a settable option. -sysconfdir="$sysconfdir/ldap" -SYSCONFDIR=`eval echo $sysconfdir` -AC_SUBST(SYSCONFDIR) - dnl AC_OUTPUT( \ dnl clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \ dnl clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \ @@ -343,7 +334,6 @@ dnl clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rule dnl contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \ dnl contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \ dnl contrib/whois++/Makefile:build/top.mk:contrib/whois++/Makefile.in:build/rules.mk \ -dnl libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk \ dnl libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk \ dnl libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk \ dnl libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk \ @@ -364,7 +354,7 @@ dnl Makefile:build/top.mk:Makefile.in:build/dir.mk, \ dnl [date > stamp-h]) AC_OUTPUT( \ -include/ldapconfig.h \ include/Makefile:build/top.mk:include/Makefile.in \ +libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk \ Makefile:build/top.mk:Makefile.in:build/dir.mk \ ,[date > stamp-h]) diff --git a/include/Makefile.in b/include/Makefile.in index c23de8a47f..ade4708f30 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -11,8 +11,29 @@ install: all FORCE $(INSTALL) $(INSTALLFLAGS) -m 644 disptmpl.h $(includedir) $(INSTALL) $(INSTALLFLAGS) -m 644 srchpref.h $(includedir) -all: FORCE +all: ldapconfig.h FORCE + clean: FORCE veryclean: FORCE depend: FORCE +ldapconfig.h: ldapconfig.h.edit Makefile + @$(RM) $@ + @echo "/*" > $@; \ + echo " * This file was automatically generated. Do not edit it." >> $@; \ + echo " * Instead, edit the file ldapconfig.h.edit. See the LDAP" >> $@; \ + echo " * INSTALL file for more information." >> $@; \ + echo " */ " >> $@; \ + echo "" >> $@; \ + $(SED) \ + -e 's;%SYSCONFDIR%;$(sysconfdir);' \ + -e 's;%BINDIR%;$(bindir);' \ + -e 's;%SBINDIR%;$(sbindir);' \ + -e 's;%LIBEXECDIR%;$(libexecdir);' \ + -e 's;%RUNDIR%;$(localstatedir);' \ + -e 's;%EDITOR%;$(EDITOR);' \ + -e 's;%FINGER%;$(FINGER);' \ + -e 's;%SENDMAIL%;$(SENDMAIL);' \ + ldapconfig.h.edit >> $@; \ + $(CHMOD) 444 $@ + diff --git a/include/ldapconfig.h.edit b/include/ldapconfig.h.edit index 9bf23812d4..bb63e69e5c 100644 --- a/include/ldapconfig.h.edit +++ b/include/ldapconfig.h.edit @@ -24,26 +24,26 @@ */ #define DEFAULT_BINDIR "%BINDIR%" #define DEFAULT_SBINDIR "%SBINDIR%" -#define DEFAULT_ETCDIR "%ETCDIR%" +#define DEFAULT_SYSCONFDIR "%SYSCONFDIR%" #define DEFAULT_LIBEXECDIR "%LIBEXECDIR%" /* default ldap host */ #define LDAPHOST "localhost" -#define DEFAULT_LDAPHOST_FILE "%ETCDIR%/ldaphost" +#define DEFAULT_LDAPHOST_FILE "%SYSCONFDIR%/ldaphost" /* default place to start searching */ #define DEFAULT_BASE "o=Your Organization Name, c=US" -#define DEFAULT_BASE_FILE "%ETCDIR%/ldapbase" +#define DEFAULT_BASE_FILE "%SYSCONFDIR%/ldapbase" /* * default binddn and creditials * use files, make sure they are not generally readable */ #define DEFAULT_BINDDN NULL -#define DEFAULT_BINDDN_FILE "%ETCDIR%/ldapbinddn" +#define DEFAULT_BINDDN_FILE "%SYSCONFDIR%/ldapbinddn" #define DEFAULT_BIND_CRED NULL -#define DEFAULT_BIND_CRED_FILE "%ETCDIR%/ldapbindcred" +#define DEFAULT_BIND_CRED_FILE "%SYSCONFDIR%/ldapbindcred" /********************************************************************* * * @@ -59,10 +59,10 @@ /* default count of DN components to show in entry displays */ #define DEFAULT_RDNCOUNT 2 /* default config file locations */ -#define FILTERFILE "%ETCDIR%/ldapfilter.conf" -#define TEMPLATEFILE "%ETCDIR%/ldaptemplates.conf" -#define SEARCHFILE "%ETCDIR%/ldapsearchprefs.conf" -#define FRIENDLYFILE "%ETCDIR%/ldapfriendly" +#define FILTERFILE "%SYSCONFDIR%/ldapfilter.conf" +#define TEMPLATEFILE "%SYSCONFDIR%/ldaptemplates.conf" +#define SEARCHFILE "%SYSCONFDIR%/ldapsearchprefs.conf" +#define FRIENDLYFILE "%SYSCONFDIR%/ldapfriendly" /* * FINGER DEFINITIONS @@ -136,7 +136,7 @@ Please try again later.\r\n" #define GO500GW_BINDDN NULL #define GO500GW_BIND_CRED NULL /* where the helpfile lives */ -#define GO500GW_HELPFILE "%ETCDIR%/go500gw.help" +#define GO500GW_HELPFILE "%SYSCONFDIR%/go500gw.help" /* port on which to listen */ #define GO500GW_PORT 7777 /* timeout on all searches */ @@ -160,7 +160,7 @@ Please try again later.\r\n" #define RCPT500_BINDDN NULL #define RCPT500_BIND_CRED NULL /* where the helpfile lives */ -#define RCPT500_HELPFILE "%ETCDIR%/rcpt500.help" +#define RCPT500_HELPFILE "%SYSCONFDIR%/rcpt500.help" /* maximum number of matches returned */ #define RCPT500_SIZELIMIT 50 /* address replies will appear to come from */ @@ -234,7 +234,7 @@ Please try again later.\r\n" * UD DEFINITIONS */ /* ud configuration file */ -#define UD_CONFIG_FILE "%ETCDIR%/ud.conf" +#define UD_CONFIG_FILE "%SYSCONFDIR%/ud.conf" /* default editor */ #define UD_DEFAULT_EDITOR "%EDITOR%" /* default bbasename of user config file */ @@ -283,7 +283,7 @@ Please try again later.\r\n" * SLAPD DEFINITIONS */ /* location of the default slapd config file */ -#define SLAPD_DEFAULT_CONFIGFILE "%ETCDIR%/slapd.conf" +#define SLAPD_DEFAULT_CONFIGFILE "%SYSCONFDIR%/slapd.conf" /* default sizelimit on number of entries from a search */ #define SLAPD_DEFAULT_SIZELIMIT 500 /* default timelimit to spend on a search */ From 2f7d0a230a00a710569090e8e9f33a35a34edf90 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 17 Sep 1998 07:54:14 +0000 Subject: [PATCH 021/148] Add clients/servers Makefile.in to the mix. --- clients/Makefile.in | 6 ++++++ configure.in | 4 ++-- include/Makefile.in | 7 ++++--- servers/Makefile.in | 7 +++++++ 4 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 clients/Makefile.in create mode 100644 servers/Makefile.in diff --git a/clients/Makefile.in b/clients/Makefile.in new file mode 100644 index 0000000000..c72069d6f2 --- /dev/null +++ b/clients/Makefile.in @@ -0,0 +1,6 @@ +## Copyright 1998 Net Boolean Incorporated +## COPYING RESTRICTIONS APPLY, See COPYING file +## +## Clients Makefile.in for OpenLDAP + +SUBDIRS= tools ud finger gopher mail500 fax500 rcpt500 diff --git a/configure.in b/configure.in index 23b4423220..ef40994914 100644 --- a/configure.in +++ b/configure.in @@ -323,7 +323,6 @@ AC_REPLACE_FUNCS(strdup) CF_SYS_ERRLIST dnl AC_OUTPUT( \ -dnl clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \ dnl clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \ dnl clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \ dnl clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \ @@ -340,7 +339,6 @@ dnl libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/ dnl libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk \ dnl libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk \ dnl libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk \ -dnl servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \ dnl servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \ dnl servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \ dnl servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \ @@ -354,7 +352,9 @@ dnl Makefile:build/top.mk:Makefile.in:build/dir.mk, \ dnl [date > stamp-h]) AC_OUTPUT( \ +clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \ include/Makefile:build/top.mk:include/Makefile.in \ libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk \ +servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \ Makefile:build/top.mk:Makefile.in:build/dir.mk \ ,[date > stamp-h]) diff --git a/include/Makefile.in b/include/Makefile.in index ade4708f30..c6a4e7c505 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -1,6 +1,7 @@ -# -# Makefile.in for OpenLDAP include directory -# +## Copyright 1998 Net Boolean Incorporated +## COPYING RESTRICTIONS APPLY, See COPYING file +## +## include Makefile.in for OpenLDAP install: all FORCE -$(MKDIR) -p $(includedir) diff --git a/servers/Makefile.in b/servers/Makefile.in new file mode 100644 index 0000000000..a7d2d9978f --- /dev/null +++ b/servers/Makefile.in @@ -0,0 +1,7 @@ +## Copyright 1998 Net Boolean Incorporated +## COPYING RESTRICTIONS APPLY, See COPYING file +## +## servers Makefile.in for OpenLDAP + +SUBDIRS= ldapd slapd slurpd + From 0d680845afcd65a18428f83b0274b70daa640bcd Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 17 Sep 1998 08:14:20 +0000 Subject: [PATCH 022/148] Second level directory templates now appear to working correctly. --- clients/Makefile.in | 4 ++-- configure.in | 2 +- include/Makefile.in | 8 +++++--- libraries/Makefile.in | 4 ++-- servers/Makefile.in | 4 ++-- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/clients/Makefile.in b/clients/Makefile.in index c72069d6f2..f4856e8713 100644 --- a/clients/Makefile.in +++ b/clients/Makefile.in @@ -1,5 +1,5 @@ -## Copyright 1998 Net Boolean Incorporated -## COPYING RESTRICTIONS APPLY, See COPYING file +## Copyright 1998 The OpenLDAP Foundation, All Rights Reserved. +## COPYING RESTRICTIONS APPLY, See COPYRIGHT file ## ## Clients Makefile.in for OpenLDAP diff --git a/configure.in b/configure.in index ef40994914..4d5678ba23 100644 --- a/configure.in +++ b/configure.in @@ -347,7 +347,6 @@ dnl servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Make dnl servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \ dnl servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \ dnl servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \ -dnl tests/Makefile:build/top.mk:tests/Makefile.in \ dnl Makefile:build/top.mk:Makefile.in:build/dir.mk, \ dnl [date > stamp-h]) @@ -356,5 +355,6 @@ clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \ include/Makefile:build/top.mk:include/Makefile.in \ libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk \ servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \ +tests/Makefile:build/top.mk:tests/Makefile.in \ Makefile:build/top.mk:Makefile.in:build/dir.mk \ ,[date > stamp-h]) diff --git a/include/Makefile.in b/include/Makefile.in index c6a4e7c505..68cac9710b 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -1,5 +1,5 @@ -## Copyright 1998 Net Boolean Incorporated -## COPYING RESTRICTIONS APPLY, See COPYING file +## Copyright 1998 The OpenLDAP Foundation, All Rights Reserved. +## COPYING RESTRICTIONS APPLY, See COPYRIGHT file ## ## include Makefile.in for OpenLDAP @@ -15,7 +15,9 @@ install: all FORCE all: ldapconfig.h FORCE clean: FORCE -veryclean: FORCE + $(RM) ldapconfig.h + +veryclean: clean FORCE depend: FORCE ldapconfig.h: ldapconfig.h.edit Makefile diff --git a/libraries/Makefile.in b/libraries/Makefile.in index 0c8f56e616..49f47807d0 100644 --- a/libraries/Makefile.in +++ b/libraries/Makefile.in @@ -1,5 +1,5 @@ -## Copyright 1998 The OpenLDAP Foundation -## COPYING RESTRICTIONS APPLY, See COPYING file +## Copyright 1998 The OpenLDAP Foundation, All Rights Reserved. +## COPYING RESTRICTIONS APPLY, see COPYRIGHT file ## ## Libraries Makefile for OpenLDAP diff --git a/servers/Makefile.in b/servers/Makefile.in index a7d2d9978f..6829e7bbb3 100644 --- a/servers/Makefile.in +++ b/servers/Makefile.in @@ -1,5 +1,5 @@ -## Copyright 1998 Net Boolean Incorporated -## COPYING RESTRICTIONS APPLY, See COPYING file +## Copyright 1998 The OpenLDAP Foundation, All Rights Reserved. +## COPYING RESTRICTIONS APPLY, see COPYRIGHT file ## ## servers Makefile.in for OpenLDAP From cddd8504a55a748d5652406c09e6ba777c5d463a Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 17 Sep 1998 09:40:33 +0000 Subject: [PATCH 023/148] Add Makefile template for testsuite --- tests/Makefile.in | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/Makefile.in diff --git a/tests/Makefile.in b/tests/Makefile.in new file mode 100644 index 0000000000..517feeea03 --- /dev/null +++ b/tests/Makefile.in @@ -0,0 +1,20 @@ +## Copyright 1998 The OpenLDAP Foundation, All Rights Reserved. +## COPYING RESTRICTIONS APPLY, see COPYRIGHT file +## +## tests Makefile.in for OpenLDAP + + +SCRIPTSDIR=./scripts + +all: FORCE + @echo "Initiating LDAP tests..."; \ + test -d test-db || $(MKDIR) test-db ; \ + test -d test-repl || $(MKDIR) test-repl ; \ + $(SCRIPTSDIR)/all $(SCRIPTSDIR) + +install: FORCE +depend: FORCE +veryclean: clean + +clean: FORCE + $(RM) test-db/[!C]* test-repl/[!C]* *core From b60b0fe58a017c5b547e52588108edf1a761d54b Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 17 Sep 1998 09:46:56 +0000 Subject: [PATCH 024/148] Add Makefile templates for libraries. --- libraries/libavl/Makefile.in | 12 ++++++++++ libraries/liblber/Makefile.in | 15 +++++++++++++ libraries/libldap/Makefile.in | 38 ++++++++++++++++++++++++++++++++ libraries/libldbm/Makefile.in | 11 +++++++++ libraries/libldif/Makefile.in | 6 +++++ libraries/liblthread/Makefile.in | 7 ++++++ libraries/liblutil/Makefile.in | 6 +++++ 7 files changed, 95 insertions(+) create mode 100644 libraries/libavl/Makefile.in create mode 100644 libraries/liblber/Makefile.in create mode 100644 libraries/libldap/Makefile.in create mode 100644 libraries/libldbm/Makefile.in create mode 100644 libraries/libldif/Makefile.in create mode 100644 libraries/liblthread/Makefile.in create mode 100644 libraries/liblutil/Makefile.in diff --git a/libraries/libavl/Makefile.in b/libraries/libavl/Makefile.in new file mode 100644 index 0000000000..367a17887e --- /dev/null +++ b/libraries/libavl/Makefile.in @@ -0,0 +1,12 @@ +## +## LIBAVL +## + +SRCS = avl.c testavl.c +XSRCS = version.c +OBJS = avl.o + +LIBRARY = libavl.a +XPROGRAMS = testavl + +testavl: $(LIBRARY) testavl.o diff --git a/libraries/liblber/Makefile.in b/libraries/liblber/Makefile.in new file mode 100644 index 0000000000..fe4f007d8a --- /dev/null +++ b/libraries/liblber/Makefile.in @@ -0,0 +1,15 @@ +## +## LIBLBER +## + +SRCS = decode.c encode.c io.c bprint.c +OBJS = decode.o encode.o io.o bprint.o +XSRCS = version.c + +LIBRARY = liblber.a + +install: $(LIBRARY) FORCE + -$(MKDIR) -p $(libdir) + $(INSTALL) $(INSTALLFLAGS) -m 644 $(LIBRARY) $(libdir) + @(cd /tmp; $(RANLIB) $(libdir)/$(LIBRARY)) + diff --git a/libraries/libldap/Makefile.in b/libraries/libldap/Makefile.in new file mode 100644 index 0000000000..7804052c97 --- /dev/null +++ b/libraries/libldap/Makefile.in @@ -0,0 +1,38 @@ +## +## Makefile.in for LDAP -lldap +## +LIBRARY = libldap.a +PROGRAMS = ltest ttest + +SRCS = bind.c open.c result.c error.c compare.c search.c \ + modify.c add.c modrdn.c delete.c abandon.c ufn.c cache.c \ + getfilter.c sbind.c kbind.c unbind.c friendly.c cldap.c \ + free.c disptmpl.c srchpref.c dsparse.c tmplout.c sort.c \ + getdn.c getentry.c getattr.c getvalues.c addentry.c \ + request.c getdxbyname.c os-ip.c url.c charset.c +OBJS = bind.o open.o result.o error.o compare.o search.o \ + modify.o add.o modrdn.o delete.o abandon.o ufn.o cache.o \ + getfilter.o sbind.o kbind.o unbind.o friendly.o cldap.o \ + free.o disptmpl.o srchpref.o dsparse.o tmplout.o sort.o \ + getdn.o getentry.o getattr.o getvalues.o addentry.o \ + request.o getdxbyname.o os-ip.o url.o charset.o + +LIBS = -L. -L../liblber -lldap -llber $(AC_LIBS) +LIBLBER = ../liblber/liblber.a + +ltest: $(LIBRARY) test.o $(LIBLBER) + $(CC) $(LDFLAGS) -o $@ test.o $(LIBS) +ttest: $(LIBRARY) tmpltest.o $(LIBLBER) + $(CC) $(LDFLAGS) -o $@ test.o $(LIBS) + +CFFILES= ldapfilter.conf ldapfriendly ldaptemplates.conf ldapsearchprefs.conf +install: $(LIBRARY) $(CFFILES) FORCE + -$(MKDIR) -p $(libdir) + $(INSTALL) $(INSTALLFLAGS) -m 644 $(LIBRARY) $(libdir) + @(cd /tmp; $(RANLIB) $(libdir)/$(LIBRARY)) + -$(MKDIR) -p $(sysconfdir) + @for i in $(CFFILES); do \ + echo "installing $$i in $(sysconfdir)"; \ + $(MV) $(sysconfdir)/$$i $(sysconfdir)/$$i- ; \ + $(INSTALL) $(INSTALLFLAGS) -m 644 $$i $(sysconfdir) ; \ + done diff --git a/libraries/libldbm/Makefile.in b/libraries/libldbm/Makefile.in new file mode 100644 index 0000000000..ffc9d96928 --- /dev/null +++ b/libraries/libldbm/Makefile.in @@ -0,0 +1,11 @@ +## +## Makefile for -lldbm +## +LIBRARY = libldbm.a +XPROGRAMS = testldbm +SRCS = ldbm.c +OBJS = ldbm.o + +LIBS = -L$(LDAP_LIBDIR) -lavl $(AC_LIBS) +testldbm: libldbm.a testldbm.o + $(CC) $(LDFLAGS) -o $@ testldbm.o $(LIBS) diff --git a/libraries/libldif/Makefile.in b/libraries/libldif/Makefile.in new file mode 100644 index 0000000000..8478ad20ec --- /dev/null +++ b/libraries/libldif/Makefile.in @@ -0,0 +1,6 @@ +## +## Makefile for -lldif +## +LIBRARY = libldif.a +SRCS = line64.c +OBJS = line64.o diff --git a/libraries/liblthread/Makefile.in b/libraries/liblthread/Makefile.in new file mode 100644 index 0000000000..762b6ba800 --- /dev/null +++ b/libraries/liblthread/Makefile.in @@ -0,0 +1,7 @@ +## +## Makefile for -llthread +## +LIBRARY = liblthread.a +XSRCS = version.c +SRCS = thread.c stack.c +OBJS = thread.o stack.o diff --git a/libraries/liblutil/Makefile.in b/libraries/liblutil/Makefile.in new file mode 100644 index 0000000000..125db2a926 --- /dev/null +++ b/libraries/liblutil/Makefile.in @@ -0,0 +1,6 @@ +## +## Makefile for -lutil +## +LIBRARY = liblutil.a +SRCS = base64.c md5.c sha1.c +OBJS = base64.o md5.o sha1.o From 15f4632ec6497df4c5290dc69ea8e1e81b704167 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 17 Sep 1998 09:47:38 +0000 Subject: [PATCH 025/148] Add Makefile templates for libraries --- configure.in | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/configure.in b/configure.in index 4d5678ba23..4ce3673408 100644 --- a/configure.in +++ b/configure.in @@ -333,12 +333,6 @@ dnl clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rule dnl contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \ dnl contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \ dnl contrib/whois++/Makefile:build/top.mk:contrib/whois++/Makefile.in:build/rules.mk \ -dnl libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk \ -dnl libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk \ -dnl libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk \ -dnl libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk \ -dnl libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk \ -dnl libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk \ dnl servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \ dnl servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \ dnl servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \ @@ -354,6 +348,13 @@ AC_OUTPUT( \ clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \ include/Makefile:build/top.mk:include/Makefile.in \ libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk \ +libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk \ +libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk \ +libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk \ +libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk \ +libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk \ +libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk \ +libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk \ servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \ tests/Makefile:build/top.mk:tests/Makefile.in \ Makefile:build/top.mk:Makefile.in:build/dir.mk \ From adf3d5a200cbbb84d25bae2fa200f6d10420f430 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 17 Sep 1998 10:13:13 +0000 Subject: [PATCH 026/148] Libraries actually compiles using current templates... however much is still needed (included db2 and thread detection) --- acconfig.h | 20 ++++++++--------- build/top.mk | 2 +- configure.in | 42 ++++++++++++++++++++++------------- include/portable.h.in | 23 ++++++------------- libraries/libldbm/Makefile.in | 4 ++++ 5 files changed, 48 insertions(+), 43 deletions(-) diff --git a/acconfig.h b/acconfig.h index e204299f8a..24eadb2950 100644 --- a/acconfig.h +++ b/acconfig.h @@ -17,32 +17,32 @@ /* define this to remove -lldap cache support */ #undef LDAP_NOCACHE -/* define this for phonetic support */ -#undef LDAP_PHONETIC - /* define this for LDAP referrals support */ #undef LDAP_REFERRALS +/* define this for phonetic support */ +#undef SLAPD_PHONETIC + /* define this to use SLAPD shell backend */ -#undef SLAPD_SHELL +/* #undef SLAPD_SHELL */ /* define this to use SLAPD passwd backend */ -#undef SLAPD_PASSWD +/* #undef SLAPD_PASSWD */ /* define this to use SLAPD LDBM backend */ -#undef SLAPD_LDBM +/* #undef SLAPD_LDBM */ /* define this to use DBBTREE w/ LDBM backend */ -#undef LDBM_USE_DBBTREE +/* #undef LDBM_USE_DBBTREE */ /* define this to use DBHASH w/ LDBM backend */ -#undef LDBM_USE_DBHASH +/* #undef LDBM_USE_DBHASH */ /* define this to use GDBM w/ LDBM backend */ -#undef LDBM_USE_GDBM +/* #undef LDBM_USE_GDBM */ /* define this to use NDBM w/ LDBM backend */ -#undef LDBM_USE_NDBM +/* #undef LDBM_USE_NDBM */ /* Leave that blank line there!! Autoheader needs it. */ diff --git a/build/top.mk b/build/top.mk index 690cc2f579..30b1c515ad 100644 --- a/build/top.mk +++ b/build/top.mk @@ -78,7 +78,7 @@ LIBDB = @LIBDB@ # Our Defaults CC = $(AC_CC) -DEFS = $(AC_DEFS) $(INCLUDEDIR) $(LDAP_DEFS) +DEFS = $(AC_DEFS) $(INCLUDEDIR) $(LDAP_DEFS) $(XDEFS) LIBS = -L$(LDAP_LIBDIR) $(LDAP_LIBS) $(XLIBS) $(AC_LIBS) CFLAGS = $(AC_CFLAGS) $(DEFS) $(DEFINES) diff --git a/configure.in b/configure.in index 4ce3673408..1d0f858b82 100644 --- a/configure.in +++ b/configure.in @@ -190,9 +190,10 @@ AC_PATH_PROG(FINGER, finger, /usr/ucb/finger, $PATH:/usr/ucb) ldbm_use="none" -LIBDB="" +LDBM_LIB="" +LDBM_DEFS="" -if test "$BUILD_LDBM" = "yes" ; then +if test "$SLAPD_LDBM" = "yes" ; then if test $ldbm_prefer = any -o $ldbm_prefer = dbbtree \ -o $ldbm_prefer = dbhash ; then AC_CHECK_FUNC(dbopen,[ @@ -201,36 +202,37 @@ if test "$BUILD_LDBM" = "yes" ; then AC_CHECK_LIB(db,dbopen,[ ldbm_use=$ldbm_prefer ldbm_prefer=found - LIBDB="-ldb" + LDBM_LIB="-ldb" ]) ]) if test $ldbm_prefer = found ; then if test $ldbm_use = dbhash ; then - AC_DEFINE(LDBM_USE_DBHASH,1) -dnl LDAP_DEFS="$LDAP_DEFS -DLDBM_USE_DBHASH" +dnl AC_DEFINE(LDBM_USE_DBHASH,1) + LDBM_DEFS="$LDAP_DEFS -DLDBM_USE_DBHASH" else - AC_DEFINE(LDBM_USE_DBBTREE,1) -dnl LDAP_DEFS="$LDAP_DEFS -DLDBM_USE_DBBTREE" +dnl AC_DEFINE(LDBM_USE_DBBTREE,1) + LDBM_DEFS="$LDAP_DEFS -DLDBM_USE_DBBTREE" fi fi fi + if test $ldbm_prefer = any -o $ldbm_prefer = gdbm ; then AC_CHECK_LIB(gdbm, gdbm_open,[ ldbm_use=$ldbm_prefer ldbm_prefer=found - LIBDB="-lgdbm" - AC_DEFINE(LDBM_USE_GDBM,1) -dnl LDAP_DEFS="$LDAP_DEFS -DLDBM_USE_GDBM" + LDBM_LIB="-lgdbm" +dnl AC_DEFINE(LDBM_USE_GDBM,1) + LDBM_DEFS="$LDAP_DEFS -DLDBM_USE_GDBM" ]) fi if test $ldbm_prefer = any -o $ldbm_prefer = ndbm ; then AC_CHECK_LIB(dbm,dbm_open,[ ldbm_use=ndbm ldbm_prefer=found - LIBDB="-ldbm" - AC_DEFINE(LDBM_USE_NDBM,1) -dnl LDAP_DEFS="$LDAP_DEFS -DLDBM_USE_NDBM" + LDBM_LIB="-ldbm" +dnl AC_DEFINE(LDBM_USE_NDBM,1) + LDBM_DEFS="$LDAP_DEFS -DLDBM_USE_NDBM" ]) fi @@ -243,9 +245,6 @@ dnl LDAP_DEFS="$LDAP_DEFS -DLDBM_USE_NDBM" fi fi -AC_SUBST(LDAP_DEFS) -AC_SUBST(LIBDB) - # ud needs termcap (should insert check here) LIBTERMCAP="-ltermcap" AC_SUBST(LIBTERMCAP) @@ -322,6 +321,17 @@ AC_REPLACE_FUNCS(strdup) # Check Configuration CF_SYS_ERRLIST +AC_SUBST(LDAP_DEFS) +AC_SUBST(LDAP_LIBS) +AC_SUBST(LDAPD_DEFS) +AC_SUBST(LDAPD_LIBS) +AC_SUBST(SLAPD_DEFS) +AC_SUBST(SLAPD_LIBS) +AC_SUBST(SLUPPD_DEFS) +AC_SUBST(SLUPPD_LIBS) +AC_SUBST(LDBM_DEFS) +AC_SUBST(LDBM_LIBS) + dnl AC_OUTPUT( \ dnl clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \ dnl clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \ diff --git a/include/portable.h.in b/include/portable.h.in index b7382dd804..0216c4a40e 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -82,29 +82,20 @@ /* define this to remove -lldap cache support */ #undef LDAP_NOCACHE +/* define this for LDAP referrals support */ +#undef LDAP_REFERRALS + /* define this for phonetic support */ -#undef LDAP_PHONETIC +#undef SLAPD_PHONETIC /* define this to use SLAPD shell backend */ -#undef SLAPD_SHELL +/* #undef SLAPD_SHELL */ /* define this to use SLAPD passwd backend */ -#undef SLAPD_PASSWD +/* #undef SLAPD_PASSWD */ /* define this to use SLAPD LDBM backend */ -#undef SLAPD_LDBM - -/* define this to use DBBTREE w/ LDBM backend */ -#undef LDBM_USE_DBBTREE - -/* define this to use DBHASH w/ LDBM backend */ -#undef LDBM_USE_DBHASH - -/* define this to use GDBM w/ LDBM backend */ -#undef LDBM_USE_GDBM - -/* define this to use NDBM w/ LDBM backend */ -#undef LDBM_USE_NDBM +/* #undef SLAPD_LDBM */ /* Define if you have the gethostname function. */ #undef HAVE_GETHOSTNAME diff --git a/libraries/libldbm/Makefile.in b/libraries/libldbm/Makefile.in index ffc9d96928..8d66c7d7f7 100644 --- a/libraries/libldbm/Makefile.in +++ b/libraries/libldbm/Makefile.in @@ -6,6 +6,10 @@ XPROGRAMS = testldbm SRCS = ldbm.c OBJS = ldbm.o +XDEFS = @LDBM_DEFS@ +XLIBS = @LDBM_LIBS@ + LIBS = -L$(LDAP_LIBDIR) -lavl $(AC_LIBS) + testldbm: libldbm.a testldbm.o $(CC) $(LDFLAGS) -o $@ testldbm.o $(LIBS) From a8ac4ef53d4fce64eb6755bd53b39370e76e634b Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 17 Sep 1998 18:36:00 +0000 Subject: [PATCH 027/148] Add Makefile templates for clients --- clients/fax500/Makefile.in | 36 ++++++++++++++++++++ clients/fax500/xrpcomp | 4 +-- clients/finger/Makefile.in | 19 +++++++++++ clients/gopher/Makefile.in | 38 +++++++++++++++++++++ clients/mail500/Makefile.in | 20 +++++++++++ clients/rcpt500/Makefile.in | 21 ++++++++++++ clients/tools/Makefile.in | 67 +++++++++++++++++++++++++++++++++++++ clients/ud/Makefile.in | 25 ++++++++++++++ configure.in | 14 ++++---- 9 files changed, 235 insertions(+), 9 deletions(-) create mode 100644 clients/fax500/Makefile.in create mode 100644 clients/finger/Makefile.in create mode 100644 clients/gopher/Makefile.in create mode 100644 clients/mail500/Makefile.in create mode 100644 clients/rcpt500/Makefile.in create mode 100644 clients/tools/Makefile.in create mode 100644 clients/ud/Makefile.in diff --git a/clients/fax500/Makefile.in b/clients/fax500/Makefile.in new file mode 100644 index 0000000000..08d85bee73 --- /dev/null +++ b/clients/fax500/Makefile.in @@ -0,0 +1,36 @@ +SRCS= main.c faxtotpc.c rp500.c +XSRCS=fax5version.c rpversion.c +FAX5OBJS = main.o faxtotpc.o +RPOBJS = rp500.o faxtotpc.o +PROGRAMS= rp500 fax500 + + +rp500 : rpversion.o + $(CC) $(LDFLAGS) -o $@ $(RPOBJS) rpversion.o $(LIBS) + +fax500 : fax5version.o + $(CC) $(LDFLAGS) -o $@ $(RPOBJS) fax5version.o $(LIBS) + +rpversion.c: ${RPOBJS} $(LDAP_LIBDEPEND) + $(RM) $@ + (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ + t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ + -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ + -e "s|%VERSION%|$${v}|" \ + < Versionrp.c > $@) + +fax5version.c: ${FAX5OBJS} $(LDAP_LIBDEPEND) + $(RM) $@ + (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ + t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ + -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ + -e "s|%VERSION%|$${v}|" \ + < Version.c > $@) + +install: $(PROGRAMS) xrpcomp FORCE + -$(MKDIR) -p $(libexecdir) + $(INSTALL) $(INSTALLFLAGS) -m 755 rp500 $(libexecdir) + $(INSTALL) $(INSTALLFLAGS) -m 755 fax500 $(libexecdir) + $(SED) -e 's%LIBEXECDIR%$(libexecdir)%' xrpcomp > /tmp/xrpcomp.tmp + $(INSTALL) $(INSTALLFLAGS) -m 755 /tmp/xrpcomp.tmp $(libexecdir)/xrpcomp + $(RM) /tmp/xrpcomp.tmp diff --git a/clients/fax500/xrpcomp b/clients/fax500/xrpcomp index 3a914eac78..4a8d809d8c 100644 --- a/clients/fax500/xrpcomp +++ b/clients/fax500/xrpcomp @@ -1,6 +1,6 @@ -: run this script through /bin/sh +#! /bin/sh -RP500=ETCDIR/rp500 +RP500=%LIBEXECDIR%/rp500 NAME="$1" if [ -z "$NAME" ]; then diff --git a/clients/finger/Makefile.in b/clients/finger/Makefile.in new file mode 100644 index 0000000000..7d342634d4 --- /dev/null +++ b/clients/finger/Makefile.in @@ -0,0 +1,19 @@ +SRCS= main.c +XSRVS= version.c +OBJS= main.o +PROGRAMS= in.xfingerd + +in.xfingerd : version.o + $(CC) $(LDFLAGS) -o $@ version.o $(OBJS) $(LIBS) + +version.c: ${OBJS} $(LDAP_LIBDEPEND) + $(RM) $@ + (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ + t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ + -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ + -e "s|%VERSION%|$${v}|" \ + < Version.c > $@) + +install: $(PROGRAMS) FORCE + -$(MKDIR) -p $(libexecdir) + $(INSTALL) $(INSTALLFLAGS) -m 755 in.xfingerd $(libexecdir) diff --git a/clients/gopher/Makefile.in b/clients/gopher/Makefile.in new file mode 100644 index 0000000000..45ac3eb36f --- /dev/null +++ b/clients/gopher/Makefile.in @@ -0,0 +1,38 @@ +## +## Makefile for gopher clients +## +PROGRAMS= go500gw go500 + +SRCS= detach.c go500.c go500gw.c setproctitle.c +XSRCS= gwversion.o goversion.o +GOOBJS = go500.o detach.o setproctitle.o +GWOBJS = go500gw.o detach.o setproctitle.o + +go500 : goversion.o + $(CC) $(LDFLAGS) -o $@ $(GOOBJS) goversion.o $(LIBS) + +go500gw : gwversion.o + $(CC) $(LDFLAGS) -o $@ $(GWOBJS) gwversion.o $(LIBS) + +goversion.c: ${GOOBJS} $(LDAP_LIBDEPEND) + $(RM) $@ + (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ + t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ + -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ + -e "s|%VERSION%|$${v}|" \ + < Version.c > $@) + +gwversion.c: ${GWOBJS} $(LDAP_LIBDEPEND) + $(RM) $@ + (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ + t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ + -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ + -e "s|%VERSION%|$${v}|" \ + < Versiongw.c > $@) + +install: $(PROGRAMS) go500gw.help FORCE + -$(MKDIR) -p $(libexecdir) $(sysconfdir) + $(INSTALL) $(INSTALLFLAGS) -m 755 go500 $(libexecdir) + $(INSTALL) $(INSTALLFLAGS) -m 755 go500gw $(libexecdir) + -$(MV) $(sysconfdir)/go500gw.help $(sysconfdir)/go500gw.help- + $(INSTALL) $(INSTALLFLAGS) -m 644 go500gw.help $(sysconfdir) diff --git a/clients/mail500/Makefile.in b/clients/mail500/Makefile.in new file mode 100644 index 0000000000..f96f5731d6 --- /dev/null +++ b/clients/mail500/Makefile.in @@ -0,0 +1,20 @@ +PROGRAMS= mail500 + +SRCS= main.c +XSRCS= version.c +OBJS= main.o + +mail500 : version.o + $(CC) $(LDFLAGS) -o $@ version.o $(OBJS) $(LIBS) + +version.c: ${OBJS} $(LDAP_LIBDEPEND) + $(RM) $@ + (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ + t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ + -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ + -e "s|%VERSION%|$${v}|" \ + < Version.c > $@) + +install: $(PROGRAMS) FORCE + -$(MKDIR) -p $(libexecdir) + $(INSTALL) $(INSTALLFLAGS) -m 755 mail500 $(libexecdir) diff --git a/clients/rcpt500/Makefile.in b/clients/rcpt500/Makefile.in new file mode 100644 index 0000000000..4582b24aec --- /dev/null +++ b/clients/rcpt500/Makefile.in @@ -0,0 +1,21 @@ +PROGRAMS= rcpt500 +SRCS= main.c cmds.c help.c query.c +XSRCS= version.c +OBJS= main.o cmds.o help.o query.o +HDRS= rcpt500.h + +rcpt500 : version.o + $(CC) $(LDFLAGS) -o $@ version.o $(OBJS) $(LIBS) + +version.c: ${OBJS} $(LDAP_LIBDEPEND) + $(RM) $@ + (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ + t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ + -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ + -e "s|%VERSION%|$${v}|" \ + < Version.c > $@) + +install: $(PROGRAMS) rcpt500.help FORCE + -$(MKDIR) -p $(libexecdir) $(sysconfdir) + $(INSTALL) $(INSTALLFLAGS) -m 755 rcpt500 $(libexecdir) + $(INSTALL) $(INSTALLFLAGS) -m 644 rcpt500.help $(sysconfdir) diff --git a/clients/tools/Makefile.in b/clients/tools/Makefile.in new file mode 100644 index 0000000000..a65ae1df05 --- /dev/null +++ b/clients/tools/Makefile.in @@ -0,0 +1,67 @@ +## +## Makefile for LDAP tools +## +SRCS = ldapsearch.c ldapmodify.c ldapdelete.c ldapmodrdn.c +OBJS = ldapsearch.o ldapmodify.o ldapdelete.o ldapmodrdn.o +XLIBS = -llber -lldap + +XSRCS = ldsversion.c ldmversion.c lddversion.c ldrversion.c + +PROGRAMS = ldapsearch ldapmodify ldapdelete ldapmodrdn ldapadd + +ldapsearch: ldsversion.o + $(CC) $(LDFLAGS) -o $@ ldapsearch.o ldsversion.o $(LIBS) + +ldapmodify: ldmversion.o + $(CC) $(LDFLAGS) -o $@ ldapmodify.o ldmversion.o $(LIBS) + +ldapdelete: lddversion.o + $(CC) $(LDFLAGS) -o $@ ldapdelete.o lddversion.o $(LIBS) + +ldapmodrdn: ldrversion.o + $(CC) $(LDFLAGS) -o $@ ldapmodrdn.o ldrversion.o $(LIBS) + +ldapadd: ldapmodify + $(RM) $@ + $(LN) ldapmodify ldapadd + +ldsversion.c: ldapsearch.o $(LDAP_LIBDEPEND) + $(RM) $@ + (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ + t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ + -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ + -e "s|%VERSION%|$${v}|" \ + < Versionlds.c > $@) + +ldmversion.c: ldapmodify.o $(LDAP_LIBDEPEND) + $(RM) $@ + (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ + t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ + -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ + -e "s|%VERSION%|$${v}|" \ + < Versionldm.c > $@) + +lddversion.c: ldapdelete.o $(LDAP_LIBDEPEND) + $(RM) $@ + (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ + t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ + -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ + -e "s|%VERSION%|$${v}|" \ + < Versionldd.c > $@) + +ldrversion.c: ldapmodrdn.o $(LDAP_LIBDEPEND) + $(RM) $@ + (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ + t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ + -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ + -e "s|%VERSION%|$${v}|" \ + < Versionldr.c > $@) + +installlocal: ldapsearch ldapmodify ldapdelete ldapmodrdn ldapadd FORCE + -$(MKDIR) -p $(bindir) + $(INSTALL) $(INSTALLFLAGS) -m 755 ldapsearch $(bindir) + $(INSTALL) $(INSTALLFLAGS) -m 755 ldapmodify $(bindir) + $(INSTALL) $(INSTALLFLAGS) -m 755 ldapdelete $(bindir) + $(INSTALL) $(INSTALLFLAGS) -m 755 ldapmodrdn $(bindir) + $(RM) $(BINDIR)/ldapadd + $(LN) $(BINDIR)/ldapmodify $(bindir)/ldapadd diff --git a/clients/ud/Makefile.in b/clients/ud/Makefile.in new file mode 100644 index 0000000000..faf2ab6c6e --- /dev/null +++ b/clients/ud/Makefile.in @@ -0,0 +1,25 @@ +SRCS= main.c find.c mod.c print.c auth.c util.c help.c \ + string_to_key.c group.c edit.c globals.c +XSRCS= version.c +OBJS= main.o find.o mod.o print.o auth.o util.o help.o \ + string_to_key.o group.o globals.o edit.o +HDRS= ud.h +PROGRAMS= ud + +XLIBS = $(LIBTERMCAP) + +ud : version.o + $(CC) $(LDFLAGS) -o $@ version.o $(OBJS) $(LIBS) + +version.c: ${OBJS} $(LDAP_LIBDEPEND) + $(RM) $@ + (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ + t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ + -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ + -e "s|%VERSION%|$${v}|" \ + < Version.c > $@) + +install: $(PROGRAMS) FORCE + -$(MKDIR) -p $(bindir) + -mv -f $(bindir)/ud $(bindir)/ud- + $(INSTALL) $(INSTALLFLAGS) -m 775 ud $(bindir) diff --git a/configure.in b/configure.in index 1d0f858b82..b913882d9a 100644 --- a/configure.in +++ b/configure.in @@ -333,13 +333,6 @@ AC_SUBST(LDBM_DEFS) AC_SUBST(LDBM_LIBS) dnl AC_OUTPUT( \ -dnl clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \ -dnl clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \ -dnl clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \ -dnl clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \ -dnl clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \ -dnl clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \ -dnl clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \ dnl contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \ dnl contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \ dnl contrib/whois++/Makefile:build/top.mk:contrib/whois++/Makefile.in:build/rules.mk \ @@ -356,6 +349,13 @@ dnl [date > stamp-h]) AC_OUTPUT( \ clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \ +clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \ +clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \ +clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \ +clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \ +clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \ +clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \ +clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \ include/Makefile:build/top.mk:include/Makefile.in \ libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk \ libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk \ From 310163f6119b2db93084f4f8f4bc65e3070dbd9f Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 17 Sep 1998 18:58:48 +0000 Subject: [PATCH 028/148] Add DEFS/LIBS support. --- libraries/liblthread/Makefile.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/liblthread/Makefile.in b/libraries/liblthread/Makefile.in index 762b6ba800..0284949c01 100644 --- a/libraries/liblthread/Makefile.in +++ b/libraries/liblthread/Makefile.in @@ -5,3 +5,6 @@ LIBRARY = liblthread.a XSRCS = version.c SRCS = thread.c stack.c OBJS = thread.o stack.o + +XDEFS = @LTHREAD_DEFS@ +XLIBS = @LTHREAD_LIBS@ From 1f7e1d057f4caae657d15a58c8bd1ff6468e5d32 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 17 Sep 1998 19:15:20 +0000 Subject: [PATCH 029/148] Added Makefile template for slurpd. Added NO_THREAD support to configure.in. (Still need thread lib detection) --- configure.in | 17 ++++++++++++++--- servers/slurpd/Makefile.in | 36 ++++++++++++++++++++++++++++++++++++ tests/Makefile.in | 3 +-- 3 files changed, 51 insertions(+), 5 deletions(-) create mode 100644 servers/slurpd/Makefile.in diff --git a/configure.in b/configure.in index b913882d9a..c1095c1939 100644 --- a/configure.in +++ b/configure.in @@ -128,6 +128,7 @@ AC_SUBST(BUILD_SLURPD) dnl general LDAP arguments LDAP_DEFS= +LDAP_LIBS= if test "$LDAP_DEBUG" = "yes" ; then LDAP_DEFS="$LDAP_DEFS -DLDAP_DEBUG" @@ -145,8 +146,16 @@ if test "$LDAP_CLDAP" = "yes" ; then LDAP_DEFS="$LDAP_DEFS -DCLDAP" fi +LTHREAD_LIBS= +if test "$opt_thread" = "no" ; then + LTHREAD_DEFS="-DNO_THREADS" +else + LTHREAD_DEFS="-DNO_THREADS" +fi + dnl ldapd arguments LDAPD_DEFS= +LDAPD_LIBS= dnl slapd arguments SLAPD_DEFS= @@ -327,10 +336,12 @@ AC_SUBST(LDAPD_DEFS) AC_SUBST(LDAPD_LIBS) AC_SUBST(SLAPD_DEFS) AC_SUBST(SLAPD_LIBS) -AC_SUBST(SLUPPD_DEFS) -AC_SUBST(SLUPPD_LIBS) +AC_SUBST(SLURPD_DEFS) +AC_SUBST(SLURPD_LIBS) AC_SUBST(LDBM_DEFS) AC_SUBST(LDBM_LIBS) +AC_SUBST(LTHREAD_DEFS) +AC_SUBST(LTHREAD_LIBS) dnl AC_OUTPUT( \ dnl contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \ @@ -343,7 +354,6 @@ dnl servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Ma dnl servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \ dnl servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \ dnl servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \ -dnl servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \ dnl Makefile:build/top.mk:Makefile.in:build/dir.mk, \ dnl [date > stamp-h]) @@ -366,6 +376,7 @@ libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib. libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk \ libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk \ servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \ +servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \ tests/Makefile:build/top.mk:tests/Makefile.in \ Makefile:build/top.mk:Makefile.in:build/dir.mk \ ,[date > stamp-h]) diff --git a/servers/slurpd/Makefile.in b/servers/slurpd/Makefile.in new file mode 100644 index 0000000000..b3c7a9da07 --- /dev/null +++ b/servers/slurpd/Makefile.in @@ -0,0 +1,36 @@ +## +## Makefile.in for slurpd +## + +PROGRAMS = slurpd +SRCS = admin.c args.c ch_malloc.c config.c detach.c \ + fm.c globals.c ldap_op.c lock.c main.c re.c \ + reject.c replica.c replog.c ri.c rq.c sanity.c st.c \ + tsleep.c +OBJS = admin.o args.o ch_malloc.o config.o detach.o \ + fm.o globals.o ldap_op.o lock.o main.o re.o \ + reject.o replica.o replog.o ri.o rq.o sanity.o st.o \ + tsleep.o + +BUILD_OPT = "--enable-slurpd" +BUILD_SRV = @BUILD_SLURPD@ + +all-srv: slurpd + +XDEFS = @SLURPD_DEFS@ @LTHREAD_DEFS@ +XLIBS = @SLURPD_LIBS@ -llthread @LTHREAD_LIBS@ + +slurpd: version.o + $(CC) $(LDFLAGS) -o $@ $(OBJS) version.o $(LIBS) + +version.c: $(OBJS) $(LDAP_LIBDIR)/liblber.a $(LDAP_LIBDIR)/libldap.a + $(RM) $@ + (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ + t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ + -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ + -e "s|%VERSION%|$${v}|" \ + < Version.c > $@) + +install: install-srv FORCE + @-$(MKDIR) -p $(libexecdir) + $(INSTALL) $(INSTALLFLAGS) -m 755 slurpd $(libexecdir) diff --git a/tests/Makefile.in b/tests/Makefile.in index 517feeea03..00c45b62d5 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -8,8 +8,7 @@ SCRIPTSDIR=./scripts all: FORCE @echo "Initiating LDAP tests..."; \ - test -d test-db || $(MKDIR) test-db ; \ - test -d test-repl || $(MKDIR) test-repl ; \ + $(MKDIR) -p test-db test-repl ; \ $(SCRIPTSDIR)/all $(SCRIPTSDIR) install: FORCE From 954b17fbfce95741ec93a7beab6d5cf214aaa796 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 17 Sep 1998 19:38:07 +0000 Subject: [PATCH 030/148] Start of slapd. --- build/top.mk | 2 +- configure.in | 2 +- servers/slapd/Makefile.in | 109 ++++++++++++++++++++++++++++++++++++++ servers/slapd/repl.c | 2 +- 4 files changed, 112 insertions(+), 3 deletions(-) create mode 100644 servers/slapd/Makefile.in diff --git a/build/top.mk b/build/top.mk index 30b1c515ad..2a3845af5a 100644 --- a/build/top.mk +++ b/build/top.mk @@ -17,7 +17,7 @@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ -sysconfdir = @sysconfdir@ +sysconfdir = @sysconfdir@/ldap sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ diff --git a/configure.in b/configure.in index c1095c1939..e17188132e 100644 --- a/configure.in +++ b/configure.in @@ -348,7 +348,6 @@ dnl contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \ dnl contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \ dnl contrib/whois++/Makefile:build/top.mk:contrib/whois++/Makefile.in:build/rules.mk \ dnl servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \ -dnl servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \ dnl servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \ dnl servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \ dnl servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \ @@ -376,6 +375,7 @@ libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib. libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk \ libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk \ servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \ +servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \ servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \ tests/Makefile:build/top.mk:tests/Makefile.in \ Makefile:build/top.mk:Makefile.in:build/dir.mk \ diff --git a/servers/slapd/Makefile.in b/servers/slapd/Makefile.in new file mode 100644 index 0000000000..b28817378a --- /dev/null +++ b/servers/slapd/Makefile.in @@ -0,0 +1,109 @@ +## +## Makefile.in for slapd +## +PROGRAMS=slapd +XPROGRAMS=libbackends.a .backend +SRCS = main.c daemon.c connection.c search.c filter.c add.c charray.c \ + attr.c entry.c config.c backend.c result.c operation.c \ + dn.c compare.c modify.c delete.c modrdn.c ch_malloc.c \ + value.c ava.c bind.c unbind.c abandon.c filterentry.c \ + phonetic.c acl.c str2filter.c aclparse.c init.c \ + detach.c strdup.c tempnam.c repl.c lock.c \ + schema.c schemaparse.c monitor.c configinfo.c +OBJS = main.o daemon.o connection.o search.o filter.o add.o charray.o \ + attr.o entry.o config.o backend.o result.o operation.o \ + dn.o compare.o modify.o delete.o modrdn.o ch_malloc.o \ + value.o ava.o bind.o unbind.o abandon.o filterentry.o \ + phonetic.o acl.o str2filter.o aclparse.o init.o \ + detach.o strdup.o tempnam.o repl.o lock.o \ + schema.o schemaparse.o monitor.o configinfo.o + +BUILD_OPT = "--enable-slapd" +BUILD_SRV = @BUILD_SLAPD@ + +all-srv: FORCE + $(MAKE) $(MFLAGS) backendslib + $(MAKE) $(MFLAGS) slapd + (cd tools; $(MAKE) $(MFLAGS) all) + +XDEFS = @SLURPD_DEFS@ @LTHREAD_DEFS@ +XLIBS = @SLURPD_LIBS@ -lavl -llutil -llthread @LTHREAD_LIBS@ + +slapd: version.o + $(CC) $(LDFLGS) -o $@ $(OBJS) version.o $(LIBS) + +backendslib: FORCE + @for i in back-*; do \ + if [ -d $$i ]; then \ + echo " "; echo " cd $$i; $(MAKE) $(MFLAGS) all"; \ + ( cd $$i; $(MAKE) $(MFLAGS) all ); \ + fi; \ + done; \ + echo " "; \ + $(MAKE) $(MFLAGS) libbackends.a + +libbackends.a: .backend + @$(RM) -r tmp + @$(MKDIR) tmp + @-for i in back-*/*.a; do \ + ( \ + cd tmp; \ + $(AR) x ../$$i; \ + pre=`echo $$i | sed -e 's/\/.*$$//' -e 's/back-//'`; \ + for j in *.o; do \ + mv $$j $${pre}$$j; \ + done; \ + $(AR) ruv libbackends.a *.o 2>&1 | grep -v truncated; \ + $(RM) *.o __.SYMDEF; \ + echo "added backend library $$i"; \ + ); \ + done + @mv -f tmp/libbackends.a ./libbackends.a + @$(RM) -r tmp + @if [ ! -z "$(RANLIB)" ]; then \ + $(RANLIB) libbackends.a; \ + fi + @ls -l libbackends.a + +version.c: libbackends.a $(OBJS) \ + $(LDAP_LIBDIR)/liblber.a \ + $(LDAP_LIBDIR)/liblldbm.a \ + $(LDAP_LIBDIR)/liblavl.a \ + $(LDAP_LIBDIR)/liblldif.a \ + $(LDAP_LIBDIR)/liblthread.a + $(RM) $@ + (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ + t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ + -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ + -e "s|%VERSION%|$${v}|" \ + < Version.c > $@) + +clean: FORCE + @for i in back-* tools; do \ + if [ -d $$i ] ; then \ + echo; echo " cd $$i; $(MAKE) $(MFLAGS) clean"; \ + ( cd $$i; $(MAKE) $(MFLAGS) clean ); \ + fi; \ + done + +install: install-slapd install-conf install-tools + +install-slapd: FORCE + @-$(MKDIR) $(libexecdir) + $(INSTALL) $(INSTALLFLAGS) -m 755 slapd $(libexecdir) + +install-conf: FORCE + @-$(MKDIR) -p $(sysconfdir) + $(SED) -e 's;%ETCDIR%;$(sysconfdir);' slapd.conf > /tmp/slapd.$$ + -$(MV) $(sysconfdir)/slapd.conf $(sysconfdir)/slapd.conf- + $(INSTALL) $(INSTALLFLAGS) -m 644 /tmp/slapd.$$ $(sysconfdir)/slapd.conf + $(RM) -f /tmp/slapd.$$ + -$(MV) $(sysconfdir)/slapd.at.conf $(sysconfdir)/slapd.at.conf- + $(INSTALL) $(INSTALLFLAGS) -m 644 slapd.at.conf $(sysconfdir) + -$(MV) $(sysconfdir)/slapd.oc.conf $(sysconfdir)/slapd.oc.conf- + $(INSTALL) $(INSTALLFLAGS) -m 644 slapd.oc.conf $(sysconfdir) + +install-tools: FORCE + @-$(MKDIR) $(sbindir) + (cd tools; $(MAKE) $(MFLAGS) install) + diff --git a/servers/slapd/repl.c b/servers/slapd/repl.c index 028b191962..0a3d7c4631 100644 --- a/servers/slapd/repl.c +++ b/servers/slapd/repl.c @@ -5,7 +5,7 @@ #include #include #include -#include +#include "slap.h" extern pthread_mutex_t replog_mutex; extern pthread_mutex_t entry2str_mutex; From 1bee2718594b422848ed98d5848ec7349a3dc949 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 18 Sep 1998 02:13:14 +0000 Subject: [PATCH 031/148] Added slapd templates. --- build/top.mk | 2 +- configure.in | 43 ++++--- include/Makefile.in | 2 +- include/portable.h.in | 9 -- servers/slapd/Makefile.in | 7 +- servers/slapd/back-ldbm/Makefile.in | 34 +++++ servers/slapd/back-passwd/Makefile.in | 25 ++++ servers/slapd/back-shell/Makefile.in | 27 ++++ servers/slapd/shell-backends/Makefile.in | 16 +++ servers/slapd/slapd.conf | 4 +- servers/slapd/tools/Makefile.in | 155 +++++++++++++++++++++++ 11 files changed, 287 insertions(+), 37 deletions(-) create mode 100644 servers/slapd/back-ldbm/Makefile.in create mode 100644 servers/slapd/back-passwd/Makefile.in create mode 100644 servers/slapd/back-shell/Makefile.in create mode 100644 servers/slapd/shell-backends/Makefile.in create mode 100644 servers/slapd/tools/Makefile.in diff --git a/build/top.mk b/build/top.mk index 2a3845af5a..fb65a1868b 100644 --- a/build/top.mk +++ b/build/top.mk @@ -62,7 +62,7 @@ VERSIONFILE = $(top_srcdir)/build/version INCLUDEDIR = -I$(top_srcdir)/include $(XINCLUDEDIR) LDAP_LIBDIR = $(top_srcdir)/libraries -LDAP_LIBS = -lldap -llber -lldif +LDAP_LIBS = -lldif -lldap -llber LDAP_LIBDEPEND = $(LDAP_LIBDIR)/libldap.a # AutoConfig generated diff --git a/configure.in b/configure.in index e17188132e..0e7b616e5b 100644 --- a/configure.in +++ b/configure.in @@ -116,16 +116,6 @@ if test "$BUILD_SLAPD" != "yes" ; then ldbm_prefer="none" fi -AC_SUBST(BUILD_LDAPD) - -AC_SUBST(BUILD_SLAPD) - AC_SUBST(SLAPD_LDBM) - AC_SUBST(SLAPD_PASSWD) - AC_SUBST(SLAPD_SHELL) - -AC_SUBST(BUILD_SLURPD) - - dnl general LDAP arguments LDAP_DEFS= LDAP_LIBS= @@ -149,6 +139,7 @@ fi LTHREAD_LIBS= if test "$opt_thread" = "no" ; then LTHREAD_DEFS="-DNO_THREADS" + BUILD_SLURPD=no else LTHREAD_DEFS="-DNO_THREADS" fi @@ -165,16 +156,16 @@ if test "$SLAPD_PHONETIC" = "yes" ; then fi if test "$SLAPD_LDBM" = "yes" ; then - AC_DEFINE(SLAPD_LDBM,1) -dnl SLAPD_DEFS="$SLAPD_DEFS -DSLAPD_LDBM" +dnl AC_DEFINE(SLAPD_LDBM,1) + SLAPD_DEFS="$SLAPD_DEFS -DLDAP_LDBM" fi if test "$SLAPD_PASSWD" = "yes" ; then - AC_DEFINE(SLAPD_PASSWD,1) -dnl SLAPD_DEFS="$SLAPD_DEFS -DSLAPD_PASSWD" +dnl AC_DEFINE(SLAPD_PASSWD,1) + SLAPD_DEFS="$SLAPD_DEFS -DLDAP_PASSWD" fi if test "$SLAPD_SHELL" = "yes" ; then - AC_DEFINE(SLAPD_SHELL,1) -dnl SLAPD_DEFS="$SLAPD_DEFS -DSLAPD_SHELL" +dnl AC_DEFINE(SLAPD_SHELL,1) + SLAPD_DEFS="$SLAPD_DEFS -DLDAP_SHELL" fi dnl slurpd arguments @@ -330,6 +321,16 @@ AC_REPLACE_FUNCS(strdup) # Check Configuration CF_SYS_ERRLIST + +AC_SUBST(BUILD_LDAPD) + +AC_SUBST(BUILD_SLAPD) + AC_SUBST(SLAPD_LDBM) + AC_SUBST(SLAPD_PASSWD) + AC_SUBST(SLAPD_SHELL) + +AC_SUBST(BUILD_SLURPD) + AC_SUBST(LDAP_DEFS) AC_SUBST(LDAP_LIBS) AC_SUBST(LDAPD_DEFS) @@ -348,11 +349,6 @@ dnl contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \ dnl contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \ dnl contrib/whois++/Makefile:build/top.mk:contrib/whois++/Makefile.in:build/rules.mk \ dnl servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \ -dnl servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \ -dnl servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \ -dnl servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \ -dnl servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \ -dnl servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \ dnl Makefile:build/top.mk:Makefile.in:build/dir.mk, \ dnl [date > stamp-h]) @@ -376,6 +372,11 @@ libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:buil libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk \ servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \ servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \ +servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \ +servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \ +servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \ +servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \ +servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \ servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \ tests/Makefile:build/top.mk:tests/Makefile.in \ Makefile:build/top.mk:Makefile.in:build/dir.mk \ diff --git a/include/Makefile.in b/include/Makefile.in index 68cac9710b..ee55bb6956 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -18,7 +18,7 @@ clean: FORCE $(RM) ldapconfig.h veryclean: clean FORCE -depend: FORCE +depend: ldapconfig.h FORCE ldapconfig.h: ldapconfig.h.edit Makefile @$(RM) $@ diff --git a/include/portable.h.in b/include/portable.h.in index 0216c4a40e..5d862fde03 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -88,15 +88,6 @@ /* define this for phonetic support */ #undef SLAPD_PHONETIC -/* define this to use SLAPD shell backend */ -/* #undef SLAPD_SHELL */ - -/* define this to use SLAPD passwd backend */ -/* #undef SLAPD_PASSWD */ - -/* define this to use SLAPD LDBM backend */ -/* #undef SLAPD_LDBM */ - /* Define if you have the gethostname function. */ #undef HAVE_GETHOSTNAME diff --git a/servers/slapd/Makefile.in b/servers/slapd/Makefile.in index b28817378a..6def4530b9 100644 --- a/servers/slapd/Makefile.in +++ b/servers/slapd/Makefile.in @@ -26,8 +26,9 @@ all-srv: FORCE $(MAKE) $(MFLAGS) slapd (cd tools; $(MAKE) $(MFLAGS) all) -XDEFS = @SLURPD_DEFS@ @LTHREAD_DEFS@ -XLIBS = @SLURPD_LIBS@ -lavl -llutil -llthread @LTHREAD_LIBS@ +XDEFS = @SLAPD_DEFS@ @LDBM_DEFS@ @LTHREAD_DEFS@ +XLIBS = @SLAPD_LIBS@ libbackends.a \ + -lavl -llutil -lldbm @LDBM_LIBS@ -llthread @LTHREAD_LIBS@ slapd: version.o $(CC) $(LDFLGS) -o $@ $(OBJS) version.o $(LIBS) @@ -94,7 +95,7 @@ install-slapd: FORCE install-conf: FORCE @-$(MKDIR) -p $(sysconfdir) - $(SED) -e 's;%ETCDIR%;$(sysconfdir);' slapd.conf > /tmp/slapd.$$ + $(SED) -e 's;%SYSCONFDIR%;$(sysconfdir);' slapd.conf > /tmp/slapd.$$ -$(MV) $(sysconfdir)/slapd.conf $(sysconfdir)/slapd.conf- $(INSTALL) $(INSTALLFLAGS) -m 644 /tmp/slapd.$$ $(sysconfdir)/slapd.conf $(RM) -f /tmp/slapd.$$ diff --git a/servers/slapd/back-ldbm/Makefile.in b/servers/slapd/back-ldbm/Makefile.in new file mode 100644 index 0000000000..7990b594d0 --- /dev/null +++ b/servers/slapd/back-ldbm/Makefile.in @@ -0,0 +1,34 @@ +SRCS = idl.c add.c search.c cache.c dbcache.c dn2id.c id2entry.c \ + index.c id2children.c nextid.c abandon.c compare.c \ + modify.c modrdn.c delete.c init.c config.c bind.c attr.c \ + filterindex.c unbind.c kerberos.c close.c +OBJS = idl.o add.o search.o cache.o dbcache.o dn2id.o id2entry.o \ + index.o id2children.o nextid.o abandon.o compare.o \ + modify.o modrdn.o delete.o init.o config.o bind.o attr.o \ + filterindex.o unbind.o kerberos.o close.o + +BUILD_OPT = "--enable-ldbm" +BUILD_SRV = @SLAPD_LDBM@ + +XINCLUDEDIR = -I.. +XDEFS = @LDBM_DEFS@ @LTHREAD_DEFS@ + +PROGRAMS = libback-ldbm.a + +all-srv: FORCE + $(MAKE) $(MFLAGS) libback-ldbm.a + +libback-ldbm.a: version.o + $(AR) ruv $@ $(OBJS) version.o + @$(RANLIB) $@ + @touch ../.backend + +version.c: $(OBJS) + $(RM) $@ + (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` \ + h=`$(HOSTNAME)` t=`$(DATE)`; \ + $(SED) -e "s|%WHEN%|$${t}|" \ + -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ + -e "s|%VERSION%|$${v}|" \ + < Version.c > $@) + diff --git a/servers/slapd/back-passwd/Makefile.in b/servers/slapd/back-passwd/Makefile.in new file mode 100644 index 0000000000..51a7ee3b68 --- /dev/null +++ b/servers/slapd/back-passwd/Makefile.in @@ -0,0 +1,25 @@ +SRCS = search.c config.c +OBJS = search.o config.o + +BUILD_OPT = "--enable-passwd" +BUILD_SRV = @SLAPD_PASSWD@ + +PROGRAMS= libback-passwd.a +XINCLUDEDIR= -I.. +XDEFS = @LTHREAD_DEFS@ + +all-srv: FORCE + $(MAKE) $(MFLAGS) libback-passwd.a + +libback-passwd.a: version.o + $(AR) ruv $@ $(OBJS) version.o + @$(RANLIB) $@ + @touch ../.backend + +version.c: $(OBJS) + $(RM) $@ + (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ + t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ + -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ + -e "s|%VERSION%|$${v}|" \ + < Version.c > $@) diff --git a/servers/slapd/back-shell/Makefile.in b/servers/slapd/back-shell/Makefile.in new file mode 100644 index 0000000000..f025422c21 --- /dev/null +++ b/servers/slapd/back-shell/Makefile.in @@ -0,0 +1,27 @@ +SRCS = init.c config.c fork.c search.c bind.c unbind.c add.c delete.c \ + modify.c modrdn.c compare.c abandon.c result.c +OBJS = init.o config.o fork.o search.o bind.o unbind.o add.o delete.o \ + modify.o modrdn.o compare.o abandon.o result.o + +BUILD_OPT = "--enable-shell" +BUILD_SRV = @SLAPD_SHELL@ + +PROGRAMS = libback-shell.a +XINCLUDEDIR = -I.. +XDEFS = @LTHREAD_DEFS@ + +all-srv: FORCE + $(MAKE) $(MFLAGS) libback-shell.a + +libback-shell.a: version.o + $(AR) ruv $@ $(OBJS) version.o + @$(RANLIB) $@ + @touch ../.backend + +version.c: $(OBJS) + $(RM) $@ + (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ + t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ + -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ + -e "s|%VERSION%|$${v}|" \ + < Version.c > $@) diff --git a/servers/slapd/shell-backends/Makefile.in b/servers/slapd/shell-backends/Makefile.in new file mode 100644 index 0000000000..eb45c9c63f --- /dev/null +++ b/servers/slapd/shell-backends/Makefile.in @@ -0,0 +1,16 @@ +PROGRAMS = passwd-shell + +SRCS = passwd-shell.c shellutil.c +XSRCS = pwd-version.c +OBJS = passwd-shell.o shellutil.o + +passwd-shell: pwd-version.o + $(CC) $(LDFLAGS) -o $@ $(OBJS) pwd-version.o $(LIBS) + +pwd-version.c: $(OBJS) + $(RM) $@ + (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ + t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ + -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ + -e "s|%VERSION%|$${v}|" \ + < pwd-Version.c > $@) diff --git a/servers/slapd/slapd.conf b/servers/slapd/slapd.conf index c609a793d0..e151fc8981 100644 --- a/servers/slapd/slapd.conf +++ b/servers/slapd/slapd.conf @@ -1,5 +1,5 @@ -include %ETCDIR%/slapd.at.conf -include %ETCDIR%/slapd.oc.conf +include %SYSCONFDIR%/slapd.at.conf +include %SYSCONFDIR%/slapd.oc.conf schemacheck off referral ldap://ldap.itd.umich.edu diff --git a/servers/slapd/tools/Makefile.in b/servers/slapd/tools/Makefile.in new file mode 100644 index 0000000000..20b239d1e2 --- /dev/null +++ b/servers/slapd/tools/Makefile.in @@ -0,0 +1,155 @@ +#----------------------------------------------------------------------------- +# Copyright (c) 1995 Regents of the University of Michigan. +# All rights reserved. +# +# Redistribution and use in source and binary forms are permitted +# provided that this notice is preserved and that due credit is given +# to the University of Michigan at Ann Arbor. The name of the University +# may not be used to endorse or promote products derived from this +# software without specific prior written permission. This software +# is provided ``as is'' without express or implied warranty. +# +# Stand alone LDAP server tools makefile +# +#----------------------------------------------------------------------------- +HAVE_ISODE = @HAVE_ISODE@ +BUILD_LDBM = @BUILD_LDBM@ + +EDB2LDIFSRCS = edb2ldif.c ldapsyntax.c +EDB2LDIFOBJS = edb2ldif.o ldapsyntax.o ../strdup.o + +OBJS2 = ../config.o ../ch_malloc.o ../backend.o ../charray.o \ + ../aclparse.o ../schema.o ../result.o ../filterentry.o \ + ../acl.o ../phonetic.o ../attr.o ../value.o ../entry.o \ + ../dn.o ../filter.o ../str2filter.o ../ava.o ../init.o \ + ../schemaparse.o ../strdup.o + +all: build-edb2ldif ldif2index ldif2ldbm ldbmcat ldif2id2entry \ + ldif2id2children centipede ldbmtest ldif + +XDEFS = @SLAPD_DEFS@ @LDBM_DEFS@ @LTHREAD_DEFS@ +XLIBS = @SLAPD_LIBS@ -lavl -lldbm @LDBM_LIBS@ -llthread @LTHREAD_LIBS@ + +build-edb2ldif: FORCE + @if [ "$(HAVE_ISODE)" = "yes" ]; then \ + $(MAKE) $(MFLAGS) edb2ldif; \ + else \ + echo "run configure with --with-isode to build edb2ldif"; \ + fi + +edb2ldif: edb2-vers.o + $(CC) $(LDFLAGS) -o $@ $(EDB2LDIFOBJS) edb2-vers.o $(LIBS) + +edb2-vers.c: $(EDB2LDIFOBJS) + $(RM) $@ + (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ + t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ + -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ + -e "s|%VERSION%|$${v}|" \ + < Vers-edb2.c > $@) + +build-chlog2replog: FORCE + @if [ "$(HAVE_ISODE)" = "yes" ]; then \ + $(MAKE) $(MFLAGS) chlog2replog; \ + else \ + echo "run configure with --with-isode to build chlog2replog"; \ + fi + +chlog2replog: chlog2replog.o ../lock.o ../ch_malloc.o + $(CC) $(LDFLAGS) -o $@ chlog2replog.o ../lock.o ../ch_malloc.o $(LIBS) + +ldif2index: ldif2index.o ../libbackends.a $(OBJS2) + $(CC) $(LDFLAGS) -o $@ ldif2index.o $(OBJS2) ../libbackends.a $(LIBS) + +ldif2ldbm: ldif2ldbm.o ../libbackends.a $(OBJS2) + $(CC) $(LDFLAGS) -o $@ ldif2ldbm.o $(OBJS2) ../libbackends.a $(LIBS) + +ldif2id2entry: ldif2id2entry.o ../libbackends.a $(OBJS2) + $(CC) $(LDFLAGS) -o $@ ldif2id2entry.o $(OBJS2) ../libbackends.a $(LIBS) + +ldif2id2children: ldif2id2children.o ../libbackends.a $(OBJS2) + $(CC) $(LDFLAGS) -o $@ ldif2id2children.o $(OBJS2) ../libbackends.a $(LIBS) + +ldbmcat: ldbmcat.o + $(CC) $(LDFLAGS) -o $@ ldbmcat.o $(LIBS) + +ldif: ldif.o + $(CC) $(LDFLAGS) -o $@ ldif.o $(LIBS) $(LIBS2) + +centipede: centipede.o + $(CC) -o $@ centipede.o $(LIBS) $(KRBLIBFLAG) $(KRBLIBS) + +sizecount: sizecount.o ../phonetic.o ../ch_malloc.o + $(CC) $(LDFLAGS) -o $@ sizecount.o ../phonetic.o ../ch_malloc.o \ + $(LIBS) $(KRBLIBFLAG) $(KRBLIBS) + +ldbmtest: ldbmtest.o ../libbackends.a $(OBJS2) + $(CC) $(LDFLAGS) -o ldbmtest ldbmtest.o $(OBJS2) ../libbackends.a $(LIBS) + +install: $(sbindir) $(sbindir)/edb2ldif $(sbindir)/ldif2ldbm \ + $(sbindir)/ldif2index $(sbindir)/ldif2id2entry \ + $(sbindir)/ldif2id2children $(sbindir)/ldbmcat \ + $(sbindir)/centipede $(sbindir)/ldbmtest \ + $(sbindir)/ldif + +$(sbindir)/edb2ldif: build-edb2ldif + @if [ "$(HAVE_ISODE)" = "yes" ]; then \ + $(INSTALL) $(INSTALLFLAGS) -m 755 edb2ldif $(sbindir); \ + else \ + exit 0; \ + fi + +$(sbindir)/chlog2replog: build-chlog2replog + @if [ "$(HAVE_ISODE)" = "yes" ]; then \ + $(INSTALL) $(INSTALLFLAGS) -m 755 chlog2replog $(sbindir); \ + else \ + exit 0; \ + fi + +$(sbindir)/ldif2ldbm: ldif2ldbm + $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2ldbm $(sbindir) + +$(sbindir)/ldif2index: ldif2index + $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2index $(sbindir) + +$(sbindir)/ldif2id2entry: ldif2id2entry + $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2id2entry $(sbindir) + +$(sbindir)/ldif2id2children: ldif2id2children + $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2id2children $(sbindir) + +$(sbindir)/ldbmcat: ldbmcat + $(INSTALL) $(INSTALLFLAGS) -m 755 ldbmcat $(sbindir) + +$(sbindir)/ldif: ldif + $(INSTALL) $(INSTALLFLAGS) -m 755 ldif $(sbindir) + +$(sbindir)/centipede: centipede + $(INSTALL) $(INSTALLFLAGS) -m 755 centipede $(sbindir) + +$(sbindir)/ldbmtest: ldbmtest + $(INSTALL) $(INSTALLFLAGS) -m 755 ldbmtest $(sbindir) + +lint: FORCE + $(LINT) $(INCLUDES) $(DEFINES) $(SRCS) + +5lint: FORCE + $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS) + +clean: FORCE + @echo "making clean in `$(PWD)`" + $(RM) edb2ldif ldif2index *.o core a.out edb2-vers.c \ + ldif2ldbm ldif2id2entry ldif2id2children ldbmcat ldif \ + centipede chlog2replog sizecount ldif2ldbm.sed.c ldbmtest + +depend: ldif2ldbm.sed.c FORCE + @if [ ! -z "$(HAVE_ISODE)" ]; then \ + DEPENDEXTRAS="$(ISODEINCLUDEFLAG) chlog2replog.c $(EDB2LDIFSRCS)"; \ + fi; \ + $(MKDEP) $(INCLUDES) $(DEFINES) $$DEPENDEXTRAS ldif2index.c \ + ldif2ldbm.c ldif2id2entry.c ldif2id2children.c ldbmcat.c \ + centipede.c sizecount.c ldif2ldbm.sed.c ldbmtest.c ldif.c + +links: + @echo "making links in `$(PWD)`" + @$(LN) .src/*.[ch] . From 2e769ccf43ee14a213045adabf06b00c6f12d5bd Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 18 Sep 1998 06:03:19 +0000 Subject: [PATCH 032/148] Make all, clean, veryclean, depend, install all appear to work! Now to sort out configure enable/with options. --- build/dir.mk | 17 ++-- build/info.mk | 1 + build/lib.mk | 17 ++-- build/rules.mk | 27 ++++--- build/srv.mk | 50 ++++++++---- build/top.mk | 17 +++- configure.in | 2 +- include/Makefile.in | 29 ++++--- libraries/liblber/Makefile.in | 2 +- libraries/libldap/Makefile.in | 3 +- libraries/libldbm/Makefile.in | 1 + libraries/libldif/Makefile.in | 1 + libraries/liblthread/Makefile.in | 1 + libraries/liblutil/Makefile.in | 1 + servers/ldapd/Makefile.in | 49 ++++++++++++ servers/slapd/Makefile.in | 6 +- servers/slapd/back-ldbm/Makefile.in | 2 +- servers/slapd/back-passwd/Makefile.in | 2 +- servers/slapd/back-shell/Makefile.in | 2 +- servers/slapd/tools/Makefile.in | 110 ++++++++++---------------- servers/slurpd/Makefile.in | 4 +- tests/Makefile.in | 20 +++-- 22 files changed, 225 insertions(+), 139 deletions(-) create mode 100644 servers/ldapd/Makefile.in diff --git a/build/dir.mk b/build/dir.mk index e78f0be086..f86d3552b1 100644 --- a/build/dir.mk +++ b/build/dir.mk @@ -1,9 +1,10 @@ +##--------------------------------------------------------------------------- ## ## Makes subdirectories ## -all: allsubs -allsubs: FORCE + +all-common: all-local FORCE @echo "Making all in `$(PWD)`" @for i in $(SUBDIRS); do \ echo " Entering subdirectory $$i"; \ @@ -11,8 +12,7 @@ allsubs: FORCE echo " "; \ done -install: installsubs -installsubs: FORCE +install-common: install-local FORCE @echo "Making install in `$(PWD)`" @for i in $(SUBDIRS); do \ echo " Entering subdirectory $$i"; \ @@ -20,8 +20,7 @@ installsubs: FORCE echo " "; \ done -clean: cleansubs -cleansubs: FORCE +clean-common: clean-local FORCE @echo "Making clean in `$(PWD)`" @for i in $(SUBDIRS); do \ echo " Entering subdirectory $$i"; \ @@ -29,8 +28,7 @@ cleansubs: FORCE echo " "; \ done -veryclean: verysubs -verysubs: FORCE +veryclean-common: veryclean-local FORCE @echo "Making veryclean in `$(PWD)`" @for i in $(SUBDIRS); do \ echo " Entering subdirectory $$i"; \ @@ -38,8 +36,7 @@ verysubs: FORCE echo " "; \ done -depend: dependsubs -dependsubs: FORCE +depend-common: depend-local FORCE @echo "Making depend in `$(PWD)`" @for i in $(SUBDIRS); do \ echo " Entering subdirectory $$i"; \ diff --git a/build/info.mk b/build/info.mk index 22f60cc444..10e85e765f 100644 --- a/build/info.mk +++ b/build/info.mk @@ -1,3 +1,4 @@ +##--------------------------------------------------------------------------- ## ## Makefile Template for Non-Source Directories ## diff --git a/build/lib.mk b/build/lib.mk index 21d2117d5d..9b1e52a5c8 100644 --- a/build/lib.mk +++ b/build/lib.mk @@ -1,8 +1,9 @@ +##--------------------------------------------------------------------------- ## ## Makefile Template for Libraries ## -all: $(LIBRARY) $(PROGRAMS) +all-common: $(LIBRARY) $(PROGRAMS) $(LIBRARY): version.o $(AR) ru $@ $(OBJS) version.o @@ -18,18 +19,22 @@ version.c: $(OBJS) -e "s|%VERSION%|$${v}|" \ < Version.c > $@) -install: all +install-common: install-local -lint: FORCE +lint: lint-local FORCE $(LINT) $(DEFS) $(DEFINES) $(SRCS) -lint5: FORCE +lint5: lint5-local FORCE $(5LINT) $(DEFS) $(DEFINES) $(SRCS) -clean: FORCE +clean-common: clean-local $(RM) $(LIBRARY) ../$(LIBRARY) $(PROGRAMS) $(XPROGRAMS) $(XSRCS) \ *.o a.out core version.c -depend: FORCE +depend-common: depend-local $(MKDEP) $(DEFS) $(DEFINES) $(SRCS) +veryclean-common: veryclean-local clean-common + +lint-local: FORCE +lint5-local: FORCE diff --git a/build/rules.mk b/build/rules.mk index 00e63c3f90..c9f7bf5d87 100644 --- a/build/rules.mk +++ b/build/rules.mk @@ -1,21 +1,26 @@ +##--------------------------------------------------------------------------- ## ## Makefile Template for Programs ## -all: $(PROGRAMS) +all-common: all-local $(PROGRAMS) -install: all +install-common: all install-local -lint: FORCE - $(LINT) $(DEFS) $(DEFINES) $(SRCS) +clean-common: clean-local + $(RM) $(PROGRAMS) $(XPROGRAMS) $(XSRCS) *.o a.out core -lint5: FORCE - $(5LINT) $(DEFS) $(DEFINES) $(SRCS) +veryclean-common: veryclean-local clean-local -clean: FORCE - $(RM) $(PROGRAMS) $(XPROGRAMS) $(XSRCS) \ - *.o a.out core - -depend: FORCE +depend-common: depend-local $(MKDEP) $(DEFS) $(DEFINES) $(SRCS) +lint: lint-local + $(LINT) $(DEFS) $(DEFINES) $(SRCS) + +lint5: lint5-local + $(5LINT) $(DEFS) $(DEFINES) $(SRCS) + +# these could be empty +lint-local: FORCE +lint5-local: FORCE diff --git a/build/srv.mk b/build/srv.mk index 461549bd73..f93539b719 100644 --- a/build/srv.mk +++ b/build/srv.mk @@ -1,49 +1,71 @@ +##--------------------------------------------------------------------------- ## ## Makefile Template for Servers ## -all: FORCE +all-common: FORCE @if [ "$(BUILD_SRV)" = "yes" ]; then \ $(MAKE) $(MFLAGS) all-srv; \ else \ echo "run configure with $(BUILD_OPT) to build $(PROGRAMS)"; \ fi -clean: clean-srv FORCE -lint: FORCE +clean-common: FORCE + @if [ "$(BUILD_SRV)" = "yes" ]; then \ + $(MAKE) $(MFLAGS) clean-srv; \ + else \ + echo "run configure with $(BUILD_OPT) to clean $(PROGRAMS)"; \ + fi + +veryclean-common: FORCE + @if [ "$(BUILD_SRV)" = "yes" ]; then \ + $(MAKE) $(MFLAGS) veryclean-srv; \ + else \ + echo "run configure with $(BUILD_OPT) to very clean $(PROGRAMS)"; \ + fi + +lint-common: FORCE @if [ "$(BUILD_SRV)" = "yes" ]; then \ $(MAKE) $(MFLAGS) lint-srv; \ else \ echo "run configure with $(BUILD_OPT) to lint $(PROGRAMS)"; \ fi -5lint: FORCE +5lint-common: FORCE @if [ "$(BUILD_SRV)" = "yes" ]; then \ $(MAKE) $(MFLAGS) 5lint-srv; \ else \ echo "run configure with $(BUILD_OPT) to 5lint $(PROGRAMS)"; \ fi -depend: FORCE +depend-common: FORCE @if [ "$(BUILD_SRV)" = "yes" ]; then \ $(MAKE) $(MFLAGS) depend-srv; \ else \ - echo "run configure with $(BUILD_OPT) to mkdepend $(PROGRAMS)"; \ + echo "run configure with $(BUILD_OPT) to depend $(PROGRAMS)"; \ fi -all-srv: FORCE +install-common: FORCE + @if [ "$(BUILD_SRV)" = "yes" ]; then \ + $(MAKE) $(MFLAGS) install-srv; \ + else \ + echo "run configure with $(BUILD_OPT) to install $(PROGRAMS)"; \ + fi -install-srv: all-srv FORCE +all-srv: all-local -lint-srv: FORCE +install-srv: all-srv install-local + +lint-srv: lint-local $(LINT) $(DEFS) $(DEFINES) $(SRCS) -5lint-srv: FORCE +5lint-srv: lint5-local $(5LINT) $(DEFS) $(DEFINES) $(SRCS) -clean-srv: FORCE - $(RM) $(PROGRAMS) $(XPROGRAMS) $(XSRCS) \ - *.o a.out core +clean-srv: clean-local + $(RM) $(PROGRAMS) $(XPROGRAMS) $(XSRCS) *.o a.out core -depend-srv: FORCE +depend-srv: depend-local $(MKDEP) $(DEFS) $(DEFINES) $(SRCS) + +veryclean-srv: clean-srv veryclean-local diff --git a/build/top.mk b/build/top.mk index fb65a1868b..8ef5437410 100644 --- a/build/top.mk +++ b/build/top.mk @@ -84,7 +84,20 @@ LIBS = -L$(LDAP_LIBDIR) $(LDAP_LIBS) $(XLIBS) $(AC_LIBS) CFLAGS = $(AC_CFLAGS) $(DEFS) $(DEFINES) LDFLAGS = $(AC_LDFLAGS) -default: all +all: all-common FORCE +install: install-common FORCE +clean: clean-common FORCE +veryclean: veryclean-common FORCE +depend: depend-common FORCE + +# empty local rules +all-local: +install-local: +clean-local: +veryclean-local: +depend-local: +lint-local: +lint5-local: Makefile: Makefile.in ${top_srcdir}/config.status @if [ $(top_srcdir) = $(srcdir) ]; then ; \ @@ -96,3 +109,5 @@ Makefile: Makefile.in ${top_srcdir}/config.status # empty rule for forcing rules FORCE: + +##--------------------------------------------------------------------------- diff --git a/configure.in b/configure.in index 0e7b616e5b..e6a53194cc 100644 --- a/configure.in +++ b/configure.in @@ -348,7 +348,6 @@ dnl AC_OUTPUT( \ dnl contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \ dnl contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \ dnl contrib/whois++/Makefile:build/top.mk:contrib/whois++/Makefile.in:build/rules.mk \ -dnl servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \ dnl Makefile:build/top.mk:Makefile.in:build/dir.mk, \ dnl [date > stamp-h]) @@ -371,6 +370,7 @@ libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib. libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk \ libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk \ servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \ +servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \ servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \ servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \ servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \ diff --git a/include/Makefile.in b/include/Makefile.in index ee55bb6956..b969697e60 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -3,7 +3,9 @@ ## ## include Makefile.in for OpenLDAP -install: all FORCE +all-local: ldapconfig.h FORCE + +install-local: FORCE -$(MKDIR) -p $(includedir) $(INSTALL) $(INSTALLFLAGS) -m 644 ldap.h $(includedir) $(INSTALL) $(INSTALLFLAGS) -m 644 lber.h $(includedir) @@ -12,22 +14,22 @@ install: all FORCE $(INSTALL) $(INSTALLFLAGS) -m 644 disptmpl.h $(includedir) $(INSTALL) $(INSTALLFLAGS) -m 644 srchpref.h $(includedir) -all: ldapconfig.h FORCE - -clean: FORCE +clean-local: FORCE $(RM) ldapconfig.h -veryclean: clean FORCE -depend: ldapconfig.h FORCE +veryclean-local: clean-local FORCE + +depend-local: ldapconfig.h FORCE ldapconfig.h: ldapconfig.h.edit Makefile @$(RM) $@ + @echo "Making ldapconfig.h" @echo "/*" > $@; \ - echo " * This file was automatically generated. Do not edit it." >> $@; \ - echo " * Instead, edit the file ldapconfig.h.edit. See the LDAP" >> $@; \ - echo " * INSTALL file for more information." >> $@; \ - echo " */ " >> $@; \ - echo "" >> $@; \ + echo " * This file was automatically generated. Do not edit it." >> $@; \ + echo " * Instead, edit the file ldapconfig.h.edit. See the LDAP" >> $@; \ + echo " * INSTALL file for more information." >> $@; \ + echo " */ " >> $@; \ + echo "" >> $@; \ $(SED) \ -e 's;%SYSCONFDIR%;$(sysconfdir);' \ -e 's;%BINDIR%;$(bindir);' \ @@ -40,3 +42,8 @@ ldapconfig.h: ldapconfig.h.edit Makefile ldapconfig.h.edit >> $@; \ $(CHMOD) 444 $@ +all-common: all-local +install-common: install-local +clean-common: clean-local +veryclean-common: veryclean-local +depend-common: depend-local diff --git a/libraries/liblber/Makefile.in b/libraries/liblber/Makefile.in index fe4f007d8a..bfcfce1093 100644 --- a/libraries/liblber/Makefile.in +++ b/libraries/liblber/Makefile.in @@ -8,7 +8,7 @@ XSRCS = version.c LIBRARY = liblber.a -install: $(LIBRARY) FORCE +install-local: $(LIBRARY) FORCE -$(MKDIR) -p $(libdir) $(INSTALL) $(INSTALLFLAGS) -m 644 $(LIBRARY) $(libdir) @(cd /tmp; $(RANLIB) $(libdir)/$(LIBRARY)) diff --git a/libraries/libldap/Makefile.in b/libraries/libldap/Makefile.in index 7804052c97..a2e2d11762 100644 --- a/libraries/libldap/Makefile.in +++ b/libraries/libldap/Makefile.in @@ -26,7 +26,8 @@ ttest: $(LIBRARY) tmpltest.o $(LIBLBER) $(CC) $(LDFLAGS) -o $@ test.o $(LIBS) CFFILES= ldapfilter.conf ldapfriendly ldaptemplates.conf ldapsearchprefs.conf -install: $(LIBRARY) $(CFFILES) FORCE + +install-local: $(LIBRARY) $(CFFILES) FORCE -$(MKDIR) -p $(libdir) $(INSTALL) $(INSTALLFLAGS) -m 644 $(LIBRARY) $(libdir) @(cd /tmp; $(RANLIB) $(libdir)/$(LIBRARY)) diff --git a/libraries/libldbm/Makefile.in b/libraries/libldbm/Makefile.in index 8d66c7d7f7..4ef12dd410 100644 --- a/libraries/libldbm/Makefile.in +++ b/libraries/libldbm/Makefile.in @@ -1,6 +1,7 @@ ## ## Makefile for -lldbm ## + LIBRARY = libldbm.a XPROGRAMS = testldbm SRCS = ldbm.c diff --git a/libraries/libldif/Makefile.in b/libraries/libldif/Makefile.in index 8478ad20ec..6881b0707c 100644 --- a/libraries/libldif/Makefile.in +++ b/libraries/libldif/Makefile.in @@ -1,6 +1,7 @@ ## ## Makefile for -lldif ## + LIBRARY = libldif.a SRCS = line64.c OBJS = line64.o diff --git a/libraries/liblthread/Makefile.in b/libraries/liblthread/Makefile.in index 0284949c01..9b12990e6e 100644 --- a/libraries/liblthread/Makefile.in +++ b/libraries/liblthread/Makefile.in @@ -1,6 +1,7 @@ ## ## Makefile for -llthread ## + LIBRARY = liblthread.a XSRCS = version.c SRCS = thread.c stack.c diff --git a/libraries/liblutil/Makefile.in b/libraries/liblutil/Makefile.in index 125db2a926..67e499385a 100644 --- a/libraries/liblutil/Makefile.in +++ b/libraries/liblutil/Makefile.in @@ -1,6 +1,7 @@ ## ## Makefile for -lutil ## + LIBRARY = liblutil.a SRCS = base64.c md5.c sha1.c OBJS = base64.o md5.o sha1.o diff --git a/servers/ldapd/Makefile.in b/servers/ldapd/Makefile.in new file mode 100644 index 0000000000..8a7d913485 --- /dev/null +++ b/servers/ldapd/Makefile.in @@ -0,0 +1,49 @@ +## +## Makefile.in for ldapd +## +PROGRAMS=ldapd +XPROGRAMS=sldapd +SRCS = main.c detach.c setproctitle.c request.c bind.c result.c error.c \ + search.c util.c compare.c message.c add.c delete.c modrdn.c modify.c \ + abandon.c syntax.c association.c kerberos.c certificate.c +OBJS = main.o detach.o setproctitle.o request.o bind.o result.o error.o \ + search.o util.o compare.o message.o add.o delete.o modrdn.o modify.o \ + abandon.o syntax.o association.o kerberos.o LDAP_tables.o \ + certificate.o + +BUILD_OPT = "--enable-ldapd" +BUILD_SRV = @BUILD_LDAPD@ + +XDEFS= @LDAPD_DEFS@ +XLIBS= @LDAPD_LIBS@ + +all-local: $(PROGRAMS) + +ldapd: version.o + $(CC) $(LDFLAGS) -o $@ $(OBJS) version.o $(LIBS) + +sldapd: version.o + $(CC) $(LDFLAGS) -static -o $@ $(OBJS) version.o $(LDFLAGS) $(LIBS) -lresolv + +version.c: $(OBJS) $(LDIR)/liblber/liblber.a + $(RM) $@ + (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ + t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ + -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ + -e "s|%VERSION%|$${v}|" \ + < Version.c > $@) + +request.o: LDAP-types.h + +LDAP_tables.c: ldap.py + @if [ ! -z "$(PEPSY)" ]; then \ + $(PEPSY) -A ldap.py; \ + else \ + touch LDAP_tables.c LDAP-types.h; \ + fi + +LDAP-types.h: LDAP_tables.c + +install-local: FORCE + @$(MKDIR) -p $(libexecdir) + $(INSTALL) $(INSTALLFLAGS) -m 755 ldapd $(LDAP_LIBEXECDIR) diff --git a/servers/slapd/Makefile.in b/servers/slapd/Makefile.in index 6def4530b9..b057e0136e 100644 --- a/servers/slapd/Makefile.in +++ b/servers/slapd/Makefile.in @@ -21,7 +21,7 @@ OBJS = main.o daemon.o connection.o search.o filter.o add.o charray.o \ BUILD_OPT = "--enable-slapd" BUILD_SRV = @BUILD_SLAPD@ -all-srv: FORCE +all-local: FORCE $(MAKE) $(MFLAGS) backendslib $(MAKE) $(MFLAGS) slapd (cd tools; $(MAKE) $(MFLAGS) all) @@ -79,7 +79,7 @@ version.c: libbackends.a $(OBJS) \ -e "s|%VERSION%|$${v}|" \ < Version.c > $@) -clean: FORCE +clean-local: FORCE @for i in back-* tools; do \ if [ -d $$i ] ; then \ echo; echo " cd $$i; $(MAKE) $(MFLAGS) clean"; \ @@ -87,7 +87,7 @@ clean: FORCE fi; \ done -install: install-slapd install-conf install-tools +install-local: install-slapd install-conf install-tools install-slapd: FORCE @-$(MKDIR) $(libexecdir) diff --git a/servers/slapd/back-ldbm/Makefile.in b/servers/slapd/back-ldbm/Makefile.in index 7990b594d0..4098c22e09 100644 --- a/servers/slapd/back-ldbm/Makefile.in +++ b/servers/slapd/back-ldbm/Makefile.in @@ -15,7 +15,7 @@ XDEFS = @LDBM_DEFS@ @LTHREAD_DEFS@ PROGRAMS = libback-ldbm.a -all-srv: FORCE +all-local: FORCE $(MAKE) $(MFLAGS) libback-ldbm.a libback-ldbm.a: version.o diff --git a/servers/slapd/back-passwd/Makefile.in b/servers/slapd/back-passwd/Makefile.in index 51a7ee3b68..2552ead44c 100644 --- a/servers/slapd/back-passwd/Makefile.in +++ b/servers/slapd/back-passwd/Makefile.in @@ -8,7 +8,7 @@ PROGRAMS= libback-passwd.a XINCLUDEDIR= -I.. XDEFS = @LTHREAD_DEFS@ -all-srv: FORCE +all-local: FORCE $(MAKE) $(MFLAGS) libback-passwd.a libback-passwd.a: version.o diff --git a/servers/slapd/back-shell/Makefile.in b/servers/slapd/back-shell/Makefile.in index f025422c21..34a57e9b67 100644 --- a/servers/slapd/back-shell/Makefile.in +++ b/servers/slapd/back-shell/Makefile.in @@ -10,7 +10,7 @@ PROGRAMS = libback-shell.a XINCLUDEDIR = -I.. XDEFS = @LTHREAD_DEFS@ -all-srv: FORCE +all-local: FORCE $(MAKE) $(MFLAGS) libback-shell.a libback-shell.a: version.o diff --git a/servers/slapd/tools/Makefile.in b/servers/slapd/tools/Makefile.in index 20b239d1e2..912aa07a51 100644 --- a/servers/slapd/tools/Makefile.in +++ b/servers/slapd/tools/Makefile.in @@ -15,6 +15,12 @@ HAVE_ISODE = @HAVE_ISODE@ BUILD_LDBM = @BUILD_LDBM@ +PROGRAMS=ldif2index ldif2ldbm ldbmcat ldif2id2entry \ + ldif2id2children centipede ldbmtest ldif + +SRCS = centipede.c ldbmcat.c ldbmtest.c sizecount.c \ + ldif.c ldif2id2children.c ldif2id2entry.c ldif2index.c ldif2ldbm.c + EDB2LDIFSRCS = edb2ldif.c ldapsyntax.c EDB2LDIFOBJS = edb2ldif.o ldapsyntax.o ../strdup.o @@ -24,18 +30,17 @@ OBJS2 = ../config.o ../ch_malloc.o ../backend.o ../charray.o \ ../dn.o ../filter.o ../str2filter.o ../ava.o ../init.o \ ../schemaparse.o ../strdup.o -all: build-edb2ldif ldif2index ldif2ldbm ldbmcat ldif2id2entry \ - ldif2id2children centipede ldbmtest ldif +all-local: build-edb2ldif build-chlog2replog $(PROGRAMS) XDEFS = @SLAPD_DEFS@ @LDBM_DEFS@ @LTHREAD_DEFS@ XLIBS = @SLAPD_LIBS@ -lavl -lldbm @LDBM_LIBS@ -llthread @LTHREAD_LIBS@ build-edb2ldif: FORCE @if [ "$(HAVE_ISODE)" = "yes" ]; then \ - $(MAKE) $(MFLAGS) edb2ldif; \ - else \ - echo "run configure with --with-isode to build edb2ldif"; \ - fi + $(MAKE) $(MFLAGS) edb2ldif; \ + else \ + echo "run configure with --with-isode to build edb2ldif"; \ + fi edb2ldif: edb2-vers.o $(CC) $(LDFLAGS) -o $@ $(EDB2LDIFOBJS) edb2-vers.o $(LIBS) @@ -50,10 +55,10 @@ edb2-vers.c: $(EDB2LDIFOBJS) build-chlog2replog: FORCE @if [ "$(HAVE_ISODE)" = "yes" ]; then \ - $(MAKE) $(MFLAGS) chlog2replog; \ - else \ - echo "run configure with --with-isode to build chlog2replog"; \ - fi + $(MAKE) $(MFLAGS) chlog2replog; \ + else \ + echo "run configure with --with-isode to build chlog2replog"; \ + fi chlog2replog: chlog2replog.o ../lock.o ../ch_malloc.o $(CC) $(LDFLAGS) -o $@ chlog2replog.o ../lock.o ../ch_malloc.o $(LIBS) @@ -86,70 +91,37 @@ sizecount: sizecount.o ../phonetic.o ../ch_malloc.o ldbmtest: ldbmtest.o ../libbackends.a $(OBJS2) $(CC) $(LDFLAGS) -o ldbmtest ldbmtest.o $(OBJS2) ../libbackends.a $(LIBS) -install: $(sbindir) $(sbindir)/edb2ldif $(sbindir)/ldif2ldbm \ - $(sbindir)/ldif2index $(sbindir)/ldif2id2entry \ - $(sbindir)/ldif2id2children $(sbindir)/ldbmcat \ - $(sbindir)/centipede $(sbindir)/ldbmtest \ - $(sbindir)/ldif +clean-local: FORCE + $(RM) $(PROGRAMS) $(XPROGRAMS) $(XSRCS) edb2-vers.c *.o a.out core -$(sbindir)/edb2ldif: build-edb2ldif +depend-local: FORCE + @if [ "$(HAVE_ISODE)" = "yes" ]; then \ + DEPENDEXTRAS="$(ISODEINCLUDEFLAG) chlog2replog.c $(EDB2LDIFSRCS)"; \ + fi; \ + $(MKDEP) $(DEFS) $(DEFINES) $$DEPENDEXTRAS $(SRCS) + +install-local: install-isode FORCE + @-$(MKDIR) -p $(sbindir) + $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2ldbm $(sbindir) + $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2index $(sbindir) + $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2id2entry $(sbindir) + $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2id2children $(sbindir) + $(INSTALL) $(INSTALLFLAGS) -m 755 ldbmcat $(sbindir) + $(INSTALL) $(INSTALLFLAGS) -m 755 ldif $(sbindir) + $(INSTALL) $(INSTALLFLAGS) -m 755 centipede $(sbindir) + $(INSTALL) $(INSTALLFLAGS) -m 755 ldbmtest $(sbindir) + +install-isode: FORCE + @-$(MKDIR) -p $(sbindir) @if [ "$(HAVE_ISODE)" = "yes" ]; then \ $(INSTALL) $(INSTALLFLAGS) -m 755 edb2ldif $(sbindir); \ - else \ - exit 0; \ - fi - -$(sbindir)/chlog2replog: build-chlog2replog - @if [ "$(HAVE_ISODE)" = "yes" ]; then \ $(INSTALL) $(INSTALLFLAGS) -m 755 chlog2replog $(sbindir); \ else \ exit 0; \ fi -$(sbindir)/ldif2ldbm: ldif2ldbm - $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2ldbm $(sbindir) - -$(sbindir)/ldif2index: ldif2index - $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2index $(sbindir) - -$(sbindir)/ldif2id2entry: ldif2id2entry - $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2id2entry $(sbindir) - -$(sbindir)/ldif2id2children: ldif2id2children - $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2id2children $(sbindir) - -$(sbindir)/ldbmcat: ldbmcat - $(INSTALL) $(INSTALLFLAGS) -m 755 ldbmcat $(sbindir) - -$(sbindir)/ldif: ldif - $(INSTALL) $(INSTALLFLAGS) -m 755 ldif $(sbindir) - -$(sbindir)/centipede: centipede - $(INSTALL) $(INSTALLFLAGS) -m 755 centipede $(sbindir) - -$(sbindir)/ldbmtest: ldbmtest - $(INSTALL) $(INSTALLFLAGS) -m 755 ldbmtest $(sbindir) - -lint: FORCE - $(LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -5lint: FORCE - $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -clean: FORCE - @echo "making clean in `$(PWD)`" - $(RM) edb2ldif ldif2index *.o core a.out edb2-vers.c \ - ldif2ldbm ldif2id2entry ldif2id2children ldbmcat ldif \ - centipede chlog2replog sizecount ldif2ldbm.sed.c ldbmtest - -depend: ldif2ldbm.sed.c FORCE - @if [ ! -z "$(HAVE_ISODE)" ]; then \ - DEPENDEXTRAS="$(ISODEINCLUDEFLAG) chlog2replog.c $(EDB2LDIFSRCS)"; \ - fi; \ - $(MKDEP) $(INCLUDES) $(DEFINES) $$DEPENDEXTRAS ldif2index.c \ - ldif2ldbm.c ldif2id2entry.c ldif2id2children.c ldbmcat.c \ - centipede.c sizecount.c ldif2ldbm.sed.c ldbmtest.c ldif.c - -links: - @echo "making links in `$(PWD)`" - @$(LN) .src/*.[ch] . +all-common: all-local FORCE +install-common: all-common install-local FORCE +depend-common: depend-local FORCE +clean-common: clean-local FORCE +veryclean-common: clean-common veryclean-local FORCE diff --git a/servers/slurpd/Makefile.in b/servers/slurpd/Makefile.in index b3c7a9da07..4c1c4233f4 100644 --- a/servers/slurpd/Makefile.in +++ b/servers/slurpd/Makefile.in @@ -15,7 +15,7 @@ OBJS = admin.o args.o ch_malloc.o config.o detach.o \ BUILD_OPT = "--enable-slurpd" BUILD_SRV = @BUILD_SLURPD@ -all-srv: slurpd +all-local: slurpd XDEFS = @SLURPD_DEFS@ @LTHREAD_DEFS@ XLIBS = @SLURPD_LIBS@ -llthread @LTHREAD_LIBS@ @@ -31,6 +31,6 @@ version.c: $(OBJS) $(LDAP_LIBDIR)/liblber.a $(LDAP_LIBDIR)/libldap.a -e "s|%VERSION%|$${v}|" \ < Version.c > $@) -install: install-srv FORCE +install-local: FORCE @-$(MKDIR) -p $(libexecdir) $(INSTALL) $(INSTALLFLAGS) -m 755 slurpd $(libexecdir) diff --git a/tests/Makefile.in b/tests/Makefile.in index 00c45b62d5..5965bd6d15 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -6,14 +6,22 @@ SCRIPTSDIR=./scripts -all: FORCE +all-local: FORCE @echo "Initiating LDAP tests..."; \ $(MKDIR) -p test-db test-repl ; \ $(SCRIPTSDIR)/all $(SCRIPTSDIR) -install: FORCE -depend: FORCE -veryclean: clean - -clean: FORCE +clean-local: FORCE $(RM) test-db/[!C]* test-repl/[!C]* *core + +veryclean-local: clean + +depend-local: FORCE + +install-local: FORCE + +all-common: all-local +install-common: install-local +clean-common: clean-local +veryclean-common: veryclean-local +depend-common: depend-local From ac1406ad7a171d977b6c565a66f0fbacd91ff907 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 18 Sep 1998 17:35:44 +0000 Subject: [PATCH 033/148] misc cleanup --- configure.in | 4 ---- 1 file changed, 4 deletions(-) diff --git a/configure.in b/configure.in index e6a53194cc..4b200f5b33 100644 --- a/configure.in +++ b/configure.in @@ -249,9 +249,6 @@ fi LIBTERMCAP="-ltermcap" AC_SUBST(LIBTERMCAP) -# FreeBSD has obsoleted re_comp(3) from -lc, needs -lcompat -AC_CHECK_LIB(compat, re_comp) - # FreeBSD (and others) have crypt(3) in -lcrypt LIBCRYPT= AC_CHECK_FUNC(crypt, AC_DEFINE(HAVE_CRYPT), [ @@ -321,7 +318,6 @@ AC_REPLACE_FUNCS(strdup) # Check Configuration CF_SYS_ERRLIST - AC_SUBST(BUILD_LDAPD) AC_SUBST(BUILD_SLAPD) From 09b44ff1018bc6437a0f1de527d2018d46076fe3 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 18 Sep 1998 18:11:02 +0000 Subject: [PATCH 034/148] Fixed make clean/install for everything but man pages. --- Makefile.in | 2 ++ build/dir.mk | 10 +++++----- build/lib.mk | 2 +- configure.in | 5 +++-- include/Makefile.in | 2 +- libraries/libldap/Makefile.in | 4 +++- 6 files changed, 15 insertions(+), 10 deletions(-) diff --git a/Makefile.in b/Makefile.in index 7ce76e371d..8f4109902b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -3,6 +3,8 @@ # COPYING RESTRICTIONS APPLY, See COPYRIGHT file SUBDIRS= include libraries clients servers # contrib +CLEANDIRS= tests +INSTALLDIRS= doc makefiles: FORCE ./config.status diff --git a/build/dir.mk b/build/dir.mk index f86d3552b1..3a0dde4d9f 100644 --- a/build/dir.mk +++ b/build/dir.mk @@ -6,7 +6,7 @@ all-common: all-local FORCE @echo "Making all in `$(PWD)`" - @for i in $(SUBDIRS); do \ + @for i in $(SUBDIRS) $(ALLDIRS); do \ echo " Entering subdirectory $$i"; \ ( cd $$i; $(MAKE) $(MFLAGS) all ); \ echo " "; \ @@ -14,7 +14,7 @@ all-common: all-local FORCE install-common: install-local FORCE @echo "Making install in `$(PWD)`" - @for i in $(SUBDIRS); do \ + @for i in $(SUBDIRS) $(INSTALLDIRS); do \ echo " Entering subdirectory $$i"; \ ( cd $$i; $(MAKE) $(MFLAGS) install ); \ echo " "; \ @@ -22,7 +22,7 @@ install-common: install-local FORCE clean-common: clean-local FORCE @echo "Making clean in `$(PWD)`" - @for i in $(SUBDIRS); do \ + @for i in $(SUBDIRS) $(CLEANDIRS); do \ echo " Entering subdirectory $$i"; \ ( cd $$i; $(MAKE) $(MFLAGS) clean ); \ echo " "; \ @@ -30,7 +30,7 @@ clean-common: clean-local FORCE veryclean-common: veryclean-local FORCE @echo "Making veryclean in `$(PWD)`" - @for i in $(SUBDIRS); do \ + @for i in $(SUBDIRS) $(CLEANDIRS); do \ echo " Entering subdirectory $$i"; \ ( cd $$i; $(MAKE) $(MFLAGS) veryclean ); \ echo " "; \ @@ -38,7 +38,7 @@ veryclean-common: veryclean-local FORCE depend-common: depend-local FORCE @echo "Making depend in `$(PWD)`" - @for i in $(SUBDIRS); do \ + @for i in $(SUBDIRS) $(DEPENDDIRS); do \ echo " Entering subdirectory $$i"; \ ( cd $$i; $(MAKE) $(MFLAGS) depend ); \ echo " "; \ diff --git a/build/lib.mk b/build/lib.mk index 9b1e52a5c8..8ae91785ad 100644 --- a/build/lib.mk +++ b/build/lib.mk @@ -19,7 +19,7 @@ version.c: $(OBJS) -e "s|%VERSION%|$${v}|" \ < Version.c > $@) -install-common: install-local +install-common: all-common install-local lint: lint-local FORCE $(LINT) $(DEFS) $(DEFINES) $(SRCS) diff --git a/configure.in b/configure.in index 4b200f5b33..194a263b38 100644 --- a/configure.in +++ b/configure.in @@ -344,10 +344,12 @@ dnl AC_OUTPUT( \ dnl contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \ dnl contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \ dnl contrib/whois++/Makefile:build/top.mk:contrib/whois++/Makefile.in:build/rules.mk \ -dnl Makefile:build/top.mk:Makefile.in:build/dir.mk, \ dnl [date > stamp-h]) AC_OUTPUT( \ +Makefile:build/top.mk:Makefile.in:build/dir.mk \ +doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \ +doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \ clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \ clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \ clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \ @@ -375,5 +377,4 @@ servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/ servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \ servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \ tests/Makefile:build/top.mk:tests/Makefile.in \ -Makefile:build/top.mk:Makefile.in:build/dir.mk \ ,[date > stamp-h]) diff --git a/include/Makefile.in b/include/Makefile.in index b969697e60..e9c029af63 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -43,7 +43,7 @@ ldapconfig.h: ldapconfig.h.edit Makefile $(CHMOD) 444 $@ all-common: all-local -install-common: install-local +install-common: all-common install-local clean-common: clean-local veryclean-common: veryclean-local depend-common: depend-local diff --git a/libraries/libldap/Makefile.in b/libraries/libldap/Makefile.in index a2e2d11762..fce02b633d 100644 --- a/libraries/libldap/Makefile.in +++ b/libraries/libldap/Makefile.in @@ -34,6 +34,8 @@ install-local: $(LIBRARY) $(CFFILES) FORCE -$(MKDIR) -p $(sysconfdir) @for i in $(CFFILES); do \ echo "installing $$i in $(sysconfdir)"; \ - $(MV) $(sysconfdir)/$$i $(sysconfdir)/$$i- ; \ + if test -f $(sysconfdir)$$i; then \ + $(MV) $(sysconfdir)/$$i $(sysconfdir)/$$i- ; \ + fi ; \ $(INSTALL) $(INSTALLFLAGS) -m 644 $$i $(sysconfdir) ; \ done From b048b22ed9558735c84eabd5e1bfd1c62c4aef39 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 18 Sep 1998 18:47:14 +0000 Subject: [PATCH 035/148] Manual support! --- build/man.mk | 43 ++++++++++++++++++++++++++++++++++++++++ build/rules.mk | 2 +- configure.in | 4 ++++ doc/Makefile.in | 6 ++++++ doc/man/Makefile.in | 6 ++++++ doc/man/man1/Makefile.in | 6 ++++++ doc/man/man3/Makefile.in | 6 ++++++ doc/man/man5/Makefile.in | 6 ++++++ doc/man/man8/Makefile.in | 6 ++++++ 9 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 build/man.mk create mode 100644 doc/Makefile.in create mode 100644 doc/man/Makefile.in create mode 100644 doc/man/man1/Makefile.in create mode 100644 doc/man/man3/Makefile.in create mode 100644 doc/man/man5/Makefile.in create mode 100644 doc/man/man8/Makefile.in diff --git a/build/man.mk b/build/man.mk new file mode 100644 index 0000000000..2b616b4c2d --- /dev/null +++ b/build/man.mk @@ -0,0 +1,43 @@ +##--------------------------------------------------------------------------- +## +## Makefile Template for Manual Pages +## + +MANDIR=$(mandir)/man$(MANSECT) + +install-common: all-common install-local + -$(MKDIR) -p $(MANDIR) + @TMPMAN=/tmp/ldapman.$$$$$(MANCOMPRESSSUFFIX); \ + VERSION=`$(CAT) $(VERSIONFILE)`; \ + for page in *.$(MANSECT); do \ + $(SED) -e "s%LDVERSION%$$VERSION%" \ + -e 's%ETCDIR%$(sysconfdir)%' \ + -e 's%SYSCONFDIR%$(sysconfdir)%' \ + -e 's%SBINDIR%$(sbindir)%' \ + -e 's%BINDIR%$(bindir)%' \ + -e 's%LIBDIR%$(libdir)%' \ + -e 's%LIBEXECDIR%$(libexecdir)%' \ + $$page | $(MANCOMPRESS) > $$TMPMAN; \ + echo "installing $(MANDIR)/$$page"; \ + $(RM) $(MANDIR)/$$page $(MANDIR)/$$page$(MANCOMPRESSSUFFIX); \ + $(INSTALL) $(INSTALLFLAGS) -m 644 $$TMPMAN $(MANDIR)/$$page$(MANCOMPRESSSUFFIX); \ + if [ -f "$$page.links" ]; then \ + for link in `$(CAT) $$page.links`; do \ + echo "installing $(MANDIR)/$$link as link to $$page"; \ + $(RM) $(INSTDIR)/$$link $(MANDIR)/$$link$(MANCOMPRESSSUFFIX); \ + ln -sf $$page$(MANCOMPRESSSUFFIX) $(MANDIR)/$$link$(MANCOMPRESSSUFFIX); \ + done; \ + fi; \ + done; \ + $(RM) $$TMPMAN + +all-common: all-local +clean-common: clean-local +veryclean-common: veryclean-local clean-local +depend-common: depend-local +lint: lint-local +lint5: lint5-local + +# these could be empty +lint-local: FORCE +lint5-local: FORCE diff --git a/build/rules.mk b/build/rules.mk index c9f7bf5d87..0137b28999 100644 --- a/build/rules.mk +++ b/build/rules.mk @@ -5,7 +5,7 @@ all-common: all-local $(PROGRAMS) -install-common: all install-local +install-common: all-common install-local clean-common: clean-local $(RM) $(PROGRAMS) $(XPROGRAMS) $(XSRCS) *.o a.out core diff --git a/configure.in b/configure.in index 194a263b38..afac7bed29 100644 --- a/configure.in +++ b/configure.in @@ -350,6 +350,10 @@ AC_OUTPUT( \ Makefile:build/top.mk:Makefile.in:build/dir.mk \ doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \ doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \ +doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \ +doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \ +doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \ +doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \ clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \ clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \ clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \ diff --git a/doc/Makefile.in b/doc/Makefile.in new file mode 100644 index 0000000000..c349a064e4 --- /dev/null +++ b/doc/Makefile.in @@ -0,0 +1,6 @@ +## Copyright 1998 The OpenLDAP Foundation, All Rights Reserved. +## COPYING RESTRICTIONS APPLY, See COPYRIGHT file +## +## doc Makefile.in for OpenLDAP + +SUBDIRS= man diff --git a/doc/man/Makefile.in b/doc/man/Makefile.in new file mode 100644 index 0000000000..662e4a4c88 --- /dev/null +++ b/doc/man/Makefile.in @@ -0,0 +1,6 @@ +## Copyright 1998 The OpenLDAP Foundation, All Rights Reserved. +## COPYING RESTRICTIONS APPLY, See COPYRIGHT file +## +## man Makefile.in for OpenLDAP + +SUBDIRS= man1 man3 man5 man8 diff --git a/doc/man/man1/Makefile.in b/doc/man/man1/Makefile.in new file mode 100644 index 0000000000..a257cd6dda --- /dev/null +++ b/doc/man/man1/Makefile.in @@ -0,0 +1,6 @@ +## Copyright 1998 The OpenLDAP Foundation, All Rights Reserved. +## COPYING RESTRICTIONS APPLY, See COPYRIGHT file +## +## man1 Makefile.in for OpenLDAP + +MANSECT=1 diff --git a/doc/man/man3/Makefile.in b/doc/man/man3/Makefile.in new file mode 100644 index 0000000000..a257cd6dda --- /dev/null +++ b/doc/man/man3/Makefile.in @@ -0,0 +1,6 @@ +## Copyright 1998 The OpenLDAP Foundation, All Rights Reserved. +## COPYING RESTRICTIONS APPLY, See COPYRIGHT file +## +## man1 Makefile.in for OpenLDAP + +MANSECT=1 diff --git a/doc/man/man5/Makefile.in b/doc/man/man5/Makefile.in new file mode 100644 index 0000000000..a257cd6dda --- /dev/null +++ b/doc/man/man5/Makefile.in @@ -0,0 +1,6 @@ +## Copyright 1998 The OpenLDAP Foundation, All Rights Reserved. +## COPYING RESTRICTIONS APPLY, See COPYRIGHT file +## +## man1 Makefile.in for OpenLDAP + +MANSECT=1 diff --git a/doc/man/man8/Makefile.in b/doc/man/man8/Makefile.in new file mode 100644 index 0000000000..a257cd6dda --- /dev/null +++ b/doc/man/man8/Makefile.in @@ -0,0 +1,6 @@ +## Copyright 1998 The OpenLDAP Foundation, All Rights Reserved. +## COPYING RESTRICTIONS APPLY, See COPYRIGHT file +## +## man1 Makefile.in for OpenLDAP + +MANSECT=1 From 2244105d4f3c28257b787ccd7055bfc44f31a893 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 18 Sep 1998 18:48:27 +0000 Subject: [PATCH 036/148] Forgot to set the appropriate man section. --- doc/man/man3/Makefile.in | 4 ++-- doc/man/man5/Makefile.in | 4 ++-- doc/man/man8/Makefile.in | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/man/man3/Makefile.in b/doc/man/man3/Makefile.in index a257cd6dda..23c961b3c3 100644 --- a/doc/man/man3/Makefile.in +++ b/doc/man/man3/Makefile.in @@ -1,6 +1,6 @@ ## Copyright 1998 The OpenLDAP Foundation, All Rights Reserved. ## COPYING RESTRICTIONS APPLY, See COPYRIGHT file ## -## man1 Makefile.in for OpenLDAP +## man3 Makefile.in for OpenLDAP -MANSECT=1 +MANSECT=3 diff --git a/doc/man/man5/Makefile.in b/doc/man/man5/Makefile.in index a257cd6dda..71b08fd6a9 100644 --- a/doc/man/man5/Makefile.in +++ b/doc/man/man5/Makefile.in @@ -1,6 +1,6 @@ ## Copyright 1998 The OpenLDAP Foundation, All Rights Reserved. ## COPYING RESTRICTIONS APPLY, See COPYRIGHT file ## -## man1 Makefile.in for OpenLDAP +## man5 Makefile.in for OpenLDAP -MANSECT=1 +MANSECT=5 diff --git a/doc/man/man8/Makefile.in b/doc/man/man8/Makefile.in index a257cd6dda..35a93b83a6 100644 --- a/doc/man/man8/Makefile.in +++ b/doc/man/man8/Makefile.in @@ -1,6 +1,6 @@ ## Copyright 1998 The OpenLDAP Foundation, All Rights Reserved. ## COPYING RESTRICTIONS APPLY, See COPYRIGHT file ## -## man1 Makefile.in for OpenLDAP +## man8 Makefile.in for OpenLDAP -MANSECT=1 +MANSECT=8 From 86aaa17f2d23e3d6154d5e36e1cc4ce405be3f93 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 18 Sep 1998 19:00:28 +0000 Subject: [PATCH 037/148] Remove old build system. --- Make-common.gmake | 343 ------------------ build/Make-append | 78 ---- build/Make-template | 38 -- build/platforms/Make-setup | 68 ---- build/platforms/Makefile | 46 --- build/platforms/aix-cc/Make-platform | 18 - build/platforms/aix-gcc/Make-platform | 19 - build/platforms/freebsd2-gcc/Make-platform | 61 ---- build/platforms/freebsd3-gcc/Make-platform | 49 --- build/platforms/hpux-c89/Make-platform | 27 -- build/platforms/hpux-cc/Make-platform | 33 -- build/platforms/hpux-gcc/Make-platform | 28 -- build/platforms/irix-cc/Make-platform | 29 -- build/platforms/irix-gcc/Make-platform | 29 -- build/platforms/linux-gcc/Make-platform | 27 -- build/platforms/ncr-mp-ras-2-cc/Make-platform | 34 -- build/platforms/netbsd-cc/Make-platform | 17 - build/platforms/netbsd-gcc/Make-platform | 16 - build/platforms/nextstep-cc/Make-platform | 15 - build/platforms/osf1-cc/Make-platform | 24 -- build/platforms/sco-cc/Make-platform | 23 -- build/platforms/sco-gcc/Make-platform | 22 -- build/platforms/sunos4-cc/Make-platform | 25 -- build/platforms/sunos4-gcc/Make-platform | 19 - build/platforms/sunos5-cc/Make-platform | 29 -- build/platforms/sunos5-gcc/Make-platform | 28 -- build/platforms/ultrix-cc/Make-platform | 16 - build/platforms/ultrix-gcc/Make-platform | 16 - build/platforms/vms/Makefile | 31 -- clients/Make-template | 84 ----- clients/fax500/Make-template | 87 ----- clients/finger/Make-template | 70 ---- clients/gopher/Make-template | 91 ----- clients/mail500/Make-template | 68 ---- clients/rcpt500/Make-template | 71 ---- clients/tools/Make-template | 118 ------ clients/ud/Make-template | 100 ----- contrib/saucer/Make-template | 54 --- doc/Make-template | 95 ----- doc/guides/Make-template | 29 -- doc/man/Make-template | 84 ----- doc/man/man1/Make-template | 52 --- doc/man/man3/Make-template | 52 --- doc/man/man5/Make-template | 52 --- doc/man/man8/Make-template | 52 --- doc/rfc/Make-template | 29 -- include/Make-template | 63 ---- include/ldapconfig.h.edit | 302 --------------- libraries/Make-template | 86 ----- libraries/libavl/Make-template | 71 ---- libraries/liblber/Make-template | 85 ----- libraries/libldap/Make-template | 143 -------- libraries/libldbm/Make-template | 71 ---- libraries/libldif/Make-template | 69 ---- libraries/liblthread/Make-template | 69 ---- libraries/macintosh/Make-template | 48 --- libraries/msdos/Make-template | 48 --- libraries/vms/Make-template | 48 --- servers/Make-template | 88 ----- servers/ldapd/Make-template | 122 ------- servers/slapd/Make-template | 266 -------------- servers/slapd/back-ldbm/Make-template | 148 -------- servers/slapd/back-passwd/Make-template | 78 ---- servers/slapd/back-shell/Make-template | 113 ------ servers/slapd/shell-backends/Make-template | 66 ---- servers/slapd/tools/Make-template | 173 --------- servers/slurpd/Make-template | 147 -------- tests/Make-template | 35 -- 68 files changed, 4735 deletions(-) delete mode 100644 Make-common.gmake delete mode 100644 build/Make-append delete mode 100644 build/Make-template delete mode 100644 build/platforms/Make-setup delete mode 100644 build/platforms/Makefile delete mode 100644 build/platforms/aix-cc/Make-platform delete mode 100644 build/platforms/aix-gcc/Make-platform delete mode 100644 build/platforms/freebsd2-gcc/Make-platform delete mode 100644 build/platforms/freebsd3-gcc/Make-platform delete mode 100644 build/platforms/hpux-c89/Make-platform delete mode 100644 build/platforms/hpux-cc/Make-platform delete mode 100644 build/platforms/hpux-gcc/Make-platform delete mode 100644 build/platforms/irix-cc/Make-platform delete mode 100644 build/platforms/irix-gcc/Make-platform delete mode 100644 build/platforms/linux-gcc/Make-platform delete mode 100644 build/platforms/ncr-mp-ras-2-cc/Make-platform delete mode 100644 build/platforms/netbsd-cc/Make-platform delete mode 100644 build/platforms/netbsd-gcc/Make-platform delete mode 100644 build/platforms/nextstep-cc/Make-platform delete mode 100644 build/platforms/osf1-cc/Make-platform delete mode 100644 build/platforms/sco-cc/Make-platform delete mode 100644 build/platforms/sco-gcc/Make-platform delete mode 100644 build/platforms/sunos4-cc/Make-platform delete mode 100644 build/platforms/sunos4-gcc/Make-platform delete mode 100644 build/platforms/sunos5-cc/Make-platform delete mode 100644 build/platforms/sunos5-gcc/Make-platform delete mode 100644 build/platforms/ultrix-cc/Make-platform delete mode 100644 build/platforms/ultrix-gcc/Make-platform delete mode 100644 build/platforms/vms/Makefile delete mode 100644 clients/Make-template delete mode 100644 clients/fax500/Make-template delete mode 100644 clients/finger/Make-template delete mode 100644 clients/gopher/Make-template delete mode 100644 clients/mail500/Make-template delete mode 100644 clients/rcpt500/Make-template delete mode 100644 clients/tools/Make-template delete mode 100644 clients/ud/Make-template delete mode 100644 contrib/saucer/Make-template delete mode 100644 doc/Make-template delete mode 100644 doc/guides/Make-template delete mode 100644 doc/man/Make-template delete mode 100644 doc/man/man1/Make-template delete mode 100644 doc/man/man3/Make-template delete mode 100644 doc/man/man5/Make-template delete mode 100644 doc/man/man8/Make-template delete mode 100644 doc/rfc/Make-template delete mode 100644 include/Make-template delete mode 100644 include/ldapconfig.h.edit delete mode 100644 libraries/Make-template delete mode 100644 libraries/libavl/Make-template delete mode 100644 libraries/liblber/Make-template delete mode 100644 libraries/libldap/Make-template delete mode 100644 libraries/libldbm/Make-template delete mode 100644 libraries/libldif/Make-template delete mode 100644 libraries/liblthread/Make-template delete mode 100644 libraries/macintosh/Make-template delete mode 100644 libraries/msdos/Make-template delete mode 100644 libraries/vms/Make-template delete mode 100644 servers/Make-template delete mode 100644 servers/ldapd/Make-template delete mode 100644 servers/slapd/Make-template delete mode 100644 servers/slapd/back-ldbm/Make-template delete mode 100644 servers/slapd/back-passwd/Make-template delete mode 100644 servers/slapd/back-shell/Make-template delete mode 100644 servers/slapd/shell-backends/Make-template delete mode 100644 servers/slapd/tools/Make-template delete mode 100644 servers/slurpd/Make-template delete mode 100644 tests/Make-template diff --git a/Make-common.gmake b/Make-common.gmake deleted file mode 100644 index fcbbd5fa1c..0000000000 --- a/Make-common.gmake +++ /dev/null @@ -1,343 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright 1998 The OpenLDAP Foundation, Redwood City, California, USA -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted only -# as authorized by the OpenLDAP Public License. A copy of this -# license is available at http://www.OpenLDAP.org/license.html or -# in file LICENSE in the top-level directory of the distribution. -# -# This work is derived from the University of Michigan LDAP v3.3 -# distribution. Information concerning is available at -# http://www.umich.edu/~dirsvcs/ldap/ldap.html. -# -# This work also contains materials derived from public sources. -#----------------------------------------------------------------------------- -# Copyright (c) 1994 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -#----------------------------------------------------------------------------- -# LDAP common Make defines (included in all but top-level Makefile) - -############################################################################# -## Edit the following variables to have appropriate values for your system ## -############################################################################# - -# -# This template should be used by systems with Gnu Make. -# -# If Gnu make is not installed as make, you must uncomment out -# this line. -#MAKE=gmake - -############################################################################# -## LDAP install paths ## -############################################################################# -# by default, everything is installed below INSTROOT -# config files, etc. are put in ETCDIR -# include files get put in INCLUDEDIR -# libraries are put in LIBDIR -# man pages are put under MANDIR -# programs end-users will run are put in BINDIR -# programs sysadmins will run are put in SBINDIR -# servers are put in LIBEXECDIR -# pid/args files are put in RUNDIR -# -# Per platform defaults override these. -# -ifndef LDAP_PREFIX -LDAP_PREFIX= /usr/local -endif -ifndef LDAP_INSTROOT -LDAP_INSTROOT= $(LDAP_PREFIX) -endif -ifndef LDAP_ETCDIR -LDAP_ETCDIR= $(LDAP_INSTROOT)/etc/ldap -endif -ifndef LDAP_INCDIR -LDAP_INCDIR= $(LDAP_INSTROOT)/include -endif -ifndef LDAP_LIBDIR -LDAP_LIBDIR= $(LDAP_INSTROOT)/lib -endif -ifndef LDAP_MANDIR -LDAP_MANDIR= $(LDAP_INSTROOT)/man -endif -ifndef LDAP_BINDIR -LDAP_BINDIR= $(LDAP_INSTROOT)/bin -endif -ifndef LDAP_SBINDIR -LDAP_SBINDIR=$(LDAP_INSTROOT)/sbin -endif -ifndef LDAP_LIBEXECDIR -LDAP_LIBEXECDIR= $(LDAP_INSTROOT)/libexec -endif -ifndef LDAP_RUNDIR -LDAP_RUNDIR= $(LDAP_ETCDIR) -endif - -############################################################################# -## General compiler options ## -############################################################################# -# Passed to every compile (cc or gcc). This is where you put -O or -g, etc. -#EXTRACFLAGS=-O -g -#EXTRACFLAGS=-O -ifndef EXTRACFLAGS -EXTRACFLAGS?=-g -endif -# Passed to every link (ld). Include -g here if you did in EXTRACFLAGS. -ifndef EXTRALDFLAGS -EXTRALDFLAGS=-g -endif - -############################################################################# -## If you are NOT using Kerberos authentication, you can skip this section.## -############################################################################# -# -# Otherwise, to enable kerberos authentication, uncomment KERBEROS (and -# AFSKERBEROS if you are running the AFS version of kerberos). Also -# uncomment and change the various KRB* lines to point to where the -# kerberos libraries and include files are installed at your site. -# -# *** NOTE *** -# If you have an MIT Kerberos V distribution and you compiled it with -krb4 -# flag which enables Kerberos IV compatibility, uncomment KERBEROS_V - -# this will make sure all your includes can be found where they actually are - -# in this case /usr/local/kerberos/include/kerberosIV - simple change of -# KRBINCLUDEFLAG will _not_ work. Also uncomment the correct KRBLIBS define. -# -# For Kerberos V with Kerberos IV compatibility uncomment the following line -#KERBEROS=-DKERBEROS -DKERBEROS_V -# For Kerberos IV uncomment the following line -#KERBEROS=-DKERBEROS -# -#AFSKERBEROS=-DAFSKERBEROS -#KRBINCLUDEFLAG = -I/usr/local/kerberos/include -#KRBLIBFLAG = -L/usr/local/kerberos/lib -# For Kerberos V with Kerberos IV compatibility uncomment the following line -#KRBLIBS = -lkrb4 -lkrb5 -ldes425 -# For Kerberos IV uncomment the following line -#KRBLIBS = -lkrb -ldes - -############################################################################# -## ISODE is required ONLY to build the ldap <-> X.500 server (ldapd) ## -## If you don't want to build it, you can skip this section. ## -############################################################################# -# -# To build the ldap server, uncomment the HAVEISODE line, -# and the section describing build settings for your version of isode. -# -#HAVEISODE = yes -# If you compiled ISODE with TURBO_DISK defined, uncomment this -#ISODETURBOLIBS = -lgdbm -# uncomment these to have ldapd "pretty print" protocol elements w/debugging -#PEPSY_DUMP=-DPEPSY_DUMP -#PEPSY=/usr/local/ic/bin/pepsy -# uncommment this line to have ldapd load PP syntax handlers -# you'll also need to add -lpp to ISODEBASELIBS below -#LDAP_USE_PP=-DLDAP_USE_PP -# uncomment NO_SETPROCTITLE to have ldapd NOT change its title -#NO_SETPROCTITLE=-DNOSETPROCTITLE -# -# ISODE Consortium release build settings -# You should change the next line so that ICRELEASE matches the (integer) -# version number of whatever IC release you have, e.g. 1, 2, or 3 and -# also uncomment the next 5 lines. -#ICRELEASE=-DICRELEASE=1 -#ISODEPACKAGE=-DISODEPACKAGE=IC -#ISODEINCLUDEFLAG= -I/usr/local/ic/include/isode -I/usr/local/ic/include -#ISODELIBFLAG = -L/usr/local/ic/lib -#ISODEBASELIBS = -lisode -# -# Freely available ISODE 8.0 release build settings (uncomment the next 4 lines) -#ISODEPACKAGE=-DISODEPACKAGE -#ISODEINCLUDEFLAG= -I/usr/local/isode/include -#ISODELIBFLAG = -L/usr/local/isode/lib -#ISODEBASELIBS = -ldsap -lisode -# -# NEXOR ISODE release build settings (uncomment the next 4 lines) -#ISODEPACKAGE=-DISODEPACKAGE=XT -#ISODEINCLUDEFLAG= -I/usr/include/isode -#ISODELIBFLAG = -L/usr/local/lib -L/usr/sunlink/osi/lib -#ISODEBASELIBS = -lxtpp -lresolv -lxtdsap -lxtisode -losi - -############################################################################# -## If you don't want to run slapd, skip this section. ## -############################################################################# -# -# To build slapd (the stand-alone ldap daemon), uncomment the MAKESLAPD -# line and select the SLAPD_BACKENDS you want to use. If you enable the -# LDBM backend, also select one of the LDBM backends. -MAKESLAPD= yes -# -# remove the defines for backends you don't want to enable -SLAPD_BACKENDS= -DLDAP_LDBM -DLDAP_SHELL -DLDAP_PASSWD -# -# If you have included -DLDAP_LDBM in the SLAPD_BACKENDS line, -# which low-level database package to use must be specified. You -# may want to overide the platform settings by disabling the lines -# below and hardcoding the desired settings. -# -# The four choices: Berkeley db b-tree, Berkeley db hash, GNU dbm, or ndbm. -# You will also need to edit the include and lib strings appropriately. -# standard unix ndbm - -# Fallback settings, defaults are set in build/*/Make-platform -# The NDBM interface may not work on some (any) platforms. -# You may be happier with Berkeley DB B-trees. -ifndef LDBMBACKEND -LDBMBACKEND=-DLDBM_USE_NDBM -endif -ifndef LDBMINCLUDE -LDBMINCLUDE= -endif -ifndef LDBMLIB -LDBMLIB= -endif - -# LDBM Hardcode Setting Examples (may require editing) -# berkeley db btree package -#LDBMLIB=-ldb -#LDBMBACKEND=-DLDBM_USE_DBBTREE -#LDBMINCLUDE=-I/usr/local/db/include -#LDBMLIB?=-ldb -# berkeley db hash package -#LDBMBACKEND=-DLDBM_USE_DBHASH -#LDBMINCLUDE=-I/usr/local/db/include -#LDBMLIB=-ldb -# gnu dbm (gdbm) -#LDBMBACKEND=-DLDBM_USE_GDBM -#LDBMINCLUDE=-I/usr/local/gdbm/include -#LDBMLIB=-lgdbm - -#undef these if you have SleepyCat DB2 installed the updated DBI -#LDBMBACKEND=-DLDBM_USE_DBBTREE -DLDBM_USE_DB2 -#LDBMINCLUDE=-I/usr/local/include -#LDBMLIB=-L/usr/local/lib -ldb - -#undef these if you have SleepyCat DB2 installed (with compat185) -#LDBMBACKEND=-DLDBM_USE_DBBTREE -DLDBM_USE_DB2_COMPAT185 -#LDBMINCLUDE=-I/usr/local/include -#LDBMLIB=-L/usr/local/lib -ldb - -# if you want to use a non-default threads package change the defines below -# to one of: -# -DPOSIX_THREADS (draft 10 or standard) -# -DTHREAD_MIT_PTHREADS (draft 4) -# -DTHREAD_NEXT_CTHREADS -# -DTHREAD_DCE_PTHREADS -# -DTHREAD_SUNOS4_LWP -# -DTHREAD_SUNOS5_LWP -# and select the appropriate library. - -ifndef THREADS -THREADS=-DNO_THREADS -endif -ifndef THREADSLIB -THREADSLIB= -endif - -# Locations of auxilary programs -# (excepts to below are generally defined in Make-platform) -ifndef LDAP_SENDMAIL -LDAP_SENDMAIL=/usr/lib/sendmail -endif -ifndef LDAP_EDITOR -LDAP_EDITOR=/usr/ucb/vi -endif -ifndef LDAP_FINGER -LDAP_FINGER=/usr/ucb/finger -endif - -# For generation of compressed man pages -# (excepts to below are generally defined in Make-platform) -ifndef MANCOMPRESS -MANCOMPRESS=cat -endif -ifndef MANCOMPRESSSUFFIX -MANCOMPRESSSUFFIX= -endif - -############################################################################# -## The following options are used by the xax500 client. If you haven't ## -## retrieved the xax500 source and dropped it into the "clients" ## -## directory, you can skip this section. ## -############################################################################# -# -# location of your X include files -#XINCLUDES= -I/usr/X11/include -# -# location of your X libraries -#XLIBDIRS=-L/usr/X11/lib -# -# include any extra X libraries you need here -# the following works with sunos 4 and X11R5 -#XLIBS = $(XLIBDIRS) -lXm -lXt -lX11 -# the following has been known to work with Solaris 2.4 and X11R6 -#XLIBS = $(XLIBDIRS) -lXm -lXext -lSM -lICE -lXpm -lXt -lX11 - -############################################################################# -## If you don't want to do auto-translation of character sets, skip this ## -############################################################################# -# -# Otherwise, uncomment this line and set the following options. -#STR_TRANSLATION=-DSTR_TRANSLATION -# -# remove the defines for LDAP client library T.61 character translation -# you do not need. If you use LDAP_CHARSET_8859, replace the '1' in "88591" -# with the number of the particular character set you use. E.g., use "88594" -# if you use the ISO 8859-4 chracter set. -#LIBLDAP_CHARSETS=-DLDAP_CHARSET_8859="88591" -# -# uncomment one these lines to enable automatic T.61 translation by default -#LIBLDAP_DEF_CHARSET=-DLDAP_DEFAULT_CHARSET=LDAP_CHARSET_8859 - -############################################################################# -## General options ## -############################################################################# -# uncomment this line to enable debugging code (a good idea) -LDAP_DEBUG=-DLDAP_DEBUG - -# uncomment this line to turn on a few U of Michigan specific things -#UOFM=-DUOFM - -# uncomment this line to delete a few printfs in the lber and ldap libraries. -#NO_USERINTERFACE=-DNO_USERINTERFACE - -# uncomment this line to include Connectionless LDAP support -#CLDAP=-DCLDAP - -# uncomment this line to eliminate local caching support in the libldap -#NO_CACHE=-DNO_CACHE - -# uncomment this line to do reverse lookups (useful for doing ACLs -# by host/domain names) -LDAP_REVERSE_LOOKUP=-DREVERSE_LOOKUP - -# uncomment this line to enable support for LDAP referrals in libldap -LDAP_REFERRALS=-DLDAP_REFERRALS - -# uncomment this line to enable ACL by groups -# LDAP_ACLGROUP=-DACLGROUP - -# uncomment these lines to enable support for CRYPT, SHA1, and/or MD5 passwords -# in LDBM. Crypt uses platform provided crypt(3). -# LDAP_CRYPT=-DLDAP_CRYPT -DLDAP_SHA1 -DLDAP_MD5 -# LDAP_CRYPT_LIB= -# and comment this line out -LDAP_CRYPT_LIB= - -# uncomment these lines to enable support fro tcp_wrappers in servers. -# Requires tcp_wrappers. -# LDAP_TCP_WRAPPERS=-DTCP_WRAPPERS -I/usr/local/include -# LDAP_TCP_WRAPPERS_LIB=-L/usr/local/lib -lwrap - -# uncomment this line to use soundex for approximate matches in slapd. -# the default is to use the metaphone algorithm. -#PHONETIC=-DSOUNDEX diff --git a/build/Make-append b/build/Make-append deleted file mode 100644 index 67a2f29bb0..0000000000 --- a/build/Make-append +++ /dev/null @@ -1,78 +0,0 @@ -# -# Do NOT edit this file -- it is automatically appended to all Makefiles -# except the LDAP top-level Makefile. See the LDAP INSTALL file for more -# information. -# -#----------------------------------------------------------------------------- -# Copyright (c) 1994 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# LDAP standard Make defines (appended to all but top-level Makefile) -# -#----------------------------------------------------------------------------- - -# DEFS are included in CFLAGS -DEFS = $(PLATFORMCFLAGS) $(LDAP_DEBUG) $(KERBEROS) $(AFSKERBEROS) \ - $(UOFM) $(UOFA) $(NO_USERINTERFACE) $(CLDAP) $(NO_CACHE) \ - $(LDAP_REFERRALS) $(LDAP_DNS) $(STR_TRANSLATION) \ - $(LIBLDAP_CHARSETS) $(LIBLDAP_DEF_CHARSET) \ - $(SLAPD_BACKENDS) $(LDBMBACKEND) $(LDBMINCLUDE) $(PHONETIC) - -# SERVERDEFS are added to server builds CFLAGS (in addition to DEFS) -SERVERDEFS = $(ISODEPACKAGE) $(ICRELEASE) $(LDAP_USE_PP) \ - $(NO_SETPROCTITLE) $(PEPSY_DUMP) - -# -# ISODELIBS are used in server/ldapd builds -# -ISODELIBS = $(ISODEBASELIBS) -lm $(ISODETURBOLIBS) - -# ACFLAGS are added to CFLAGS but not passed to mkdep, lint, etc -ACFLAGS = $(EXTRACFLAGS) $(UNPROTOCFLAGS) - -# ALDFLAGS are always placed near the beginning of all linker (cc -o) commands -ALDFLAGS = $(EXTRALDFLAGS) $(PLATFORMLDFLAGS) - -# ALIBS are always placed at the end of all linker (cc -o) commands -ALIBS = $(PLATFORMLIBS) - -# -# default definitions for Unix utilities (may be over-ridden in Make-platform) -CC = cc -MAKE = make -RANLIB = ranlib -AR = ar -RM = rm -f -MV = mv -f -CP = cp -CHMOD = chmod -CAT = cat -LN = ln -s -HARDLN = ln -TAIL = tail -SED = sed -LINT = lint -5LINT = lint -MKDIR = mkdir -INSTALL = install -INSTALLFLAGS = -c -BASENAME= basename -DIRNAME = dirname -MKDEP = $(LDAPSRC)/build/mkdep -s -f Make-template -PWD = pwd -DATE = date -HOSTNAME= hostname - - -# -# empty target used to force rules to be invoked -# -FORCE: - diff --git a/build/Make-template b/build/Make-template deleted file mode 100644 index 28055d9f1f..0000000000 --- a/build/Make-template +++ /dev/null @@ -1,38 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1994 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# LDAP buildtools makefile -# -#----------------------------------------------------------------------------- - -all: FORCE - @if [ ! -z "$(NEEDUNPROTO)" ]; then \ - cd unproto; $(MAKE) $(MFLAGS) CC=$(CC); \ - else \ - exit 0; \ - fi - -install: FORCE - -clean: - cd unproto; $(MAKE) $(MFLAGS) clean - cd platforms; $(MAKE) $(MFLAGS) clean - -veryclean: - cd unproto; $(MAKE) $(MFLAGS) clean - cd platforms; $(MAKE) $(MFLAGS) veryclean - -links: - @echo "making links in `$(PWD)`"; \ - $(LN) .src/version .src/platforms .src/Make-append .src/install.sh . ; \ - ( $(MKDIR) unproto; cd unproto; $(LN) ../.src/unproto .src; \ - $(LN) .src/Makefile .src/*.[ch] . ) - diff --git a/build/platforms/Make-setup b/build/platforms/Make-setup deleted file mode 100644 index 9e0991908e..0000000000 --- a/build/platforms/Make-setup +++ /dev/null @@ -1,68 +0,0 @@ -# -# You should NOT need to edit this file at all: if you just type make -# in this directory, LDAP will be built for this platform using this -# compiler. If you type make links a build area will be created for -# you under ./obj. You should # cd in there and edit the Make-common file -# before building. See the LDAP INSTALL file for more information. -# -#----------------------------------------------------------------------------- -# Copyright (c) 1994 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# LDAP lightweight X.500 Directory access platform setup makefile -# -#----------------------------------------------------------------------------- -# -############################################################################ -# # -# You should not have to edit anything in this file # -# # -############################################################################ -LN=ln -s -RM=rm -f -SED=sed -PWD=pwd - -LDAPSRC= ../../.. - -all: platform - ( cd $(LDAPSRC); $(MAKE) $(MFLAGS) ) - -install: platform - ( cd $(LDAPSRC); $(MAKE) $(MFLAGS) install ) - -platform: FORCE - @PWD=`$(PWD)`; \ - PLATFORMCC=`basename $$PWD`; \ - PLATFORM=`echo $$PLATFORMCC | $(SED) 's/-.*$$//'`; \ - CC=`echo $$PLATFORMCC | $(SED) 's/^.*-//'`; \ - echo "** Setting platform to $$PLATFORM and compiler $$CC"; \ - ( cd $(LDAPSRC); \ - $(RM) .make-platform; \ - $(LN) build/platforms/$$PLATFORMCC/Make-platform .make-platform ) - -links: FORCE - @PWD=`$(PWD)`; \ - PLATFORMCC=`basename $$PWD`; \ - DEST=./obj-$$PLATFORMCC; \ - PLATFORM=`echo $$PLATFORMCC | $(SED) 's/-.*$$//'`; \ - CC=`echo $$PLATFORMCC | $(SED) 's/^.*-//'`; \ - echo "** Setting platform to $$PLATFORM and compiler $$CC"; \ - ( cd $(LDAPSRC); $(MAKE) $(MFLAGS) DEST=$$DEST links; \ - cd $$DEST; \ - $(LN) .src/build/platforms/$$PLATFORMCC/Make-platform .make-platform ); \ - $(LN) $(LDAPSRC)/$$DEST . - -clean: FORCE - -veryclean: - -$(RM) -r ./obj-* - -FORCE: diff --git a/build/platforms/Makefile b/build/platforms/Makefile deleted file mode 100644 index 38f3194d63..0000000000 --- a/build/platforms/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1994 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# LDAP build/platforms Makefile -# -#----------------------------------------------------------------------------- - -############################################################################ -# # -# You should not have to edit anything below this point # -# # -############################################################################ - -all: FORCE - - -install: FORCE - -clean: FORCE - @echo "making clean in `pwd`" - @for i in *; do \ - if [ -d $$i -a $$i != "RCS" ]; then \ - echo; echo " cd $$i; $(MAKE) $(MFLAGS) clean"; \ - ( cd $$i; $(MAKE) $(MFLAGS) clean ); \ - fi; \ - done - -veryclean: FORCE - @echo "making veryclean in `pwd`" - @for i in *; do \ - if [ -d $$i -a $$i != "RCS" ]; then \ - echo; echo " cd $$i; $(MAKE) $(MFLAGS) veryclean"; \ - ( cd $$i; $(MAKE) $(MFLAGS) veryclean ); \ - fi; \ - done - -FORCE: - diff --git a/build/platforms/aix-cc/Make-platform b/build/platforms/aix-cc/Make-platform deleted file mode 100644 index cb2e2fd0ba..0000000000 --- a/build/platforms/aix-cc/Make-platform +++ /dev/null @@ -1,18 +0,0 @@ -# -# LDAP AIX standard cc Make-platform file -# - - -# -# add any platform-specific overrides below here -# - -# -# ------------------------------------------------------------------------- -# you will probably not need to edit anything below this point -# ------------------------------------------------------------------------- - -# install with BSD semantics -INSTALL=/usr/ucb/install - -PLATFORMCFLAGS= -Daix diff --git a/build/platforms/aix-gcc/Make-platform b/build/platforms/aix-gcc/Make-platform deleted file mode 100644 index 29a7774e25..0000000000 --- a/build/platforms/aix-gcc/Make-platform +++ /dev/null @@ -1,19 +0,0 @@ -# -# LDAP AIX standard cc Make-platform file -# - - -# -# add any platform-specific overrides below here -# - -# -# ------------------------------------------------------------------------- -# you will probably not need to edit anything below this point -# ------------------------------------------------------------------------- -CC = gcc - -# install with BSD commandline -INSTALL=/usr/ucb/install - -PLATFORMCFLAGS= -Daix diff --git a/build/platforms/freebsd2-gcc/Make-platform b/build/platforms/freebsd2-gcc/Make-platform deleted file mode 100644 index 037ab3fec0..0000000000 --- a/build/platforms/freebsd2-gcc/Make-platform +++ /dev/null @@ -1,61 +0,0 @@ -# -# LDAP FreeBSD GNU C Make-platform file -# - - -# -# add any platform-specific overrides below here -# -EXTRACFLAGS=-O -g -LDBMBACKEND=-DLDBM_USE_DBBTREE -LDBMINCLUDE=-I/usr/include - -EDITOR=/usr/bin/vi -FINGER=/usr/bin/finger -SENDMAIL=/usr/sbin/sendmail - -LDAP_RUNDIR=/var/run - -MANCOMPRESS=gzip -MANCOMPRESSSUFFIX=.gz - -# On most (if not all) 2.X versions of FreeBSD, Pthread(3) is not -# installed by default. As such, -DNO_THREADS is used by default -# on FreeBSD 2.X. -# -# FreeBSD 2.2.5 comes with a Chris Provenzano Pthreads -# package, # but it must be manually built. See pthread(3) for details. -# OpenLDAP is compatible with this version, uncomment the following -# options: -# -#THREADS= -DPOSIX_THREADS -D_THREAD_SAFE \ -# -DPTHREAD_PREEMPTIVE -DSCHED_YIELD_MISSING -#THREADSLIB= -lc_r -# -# Some versions of FreeBSD support the gcc option "-pthread" to -# link with -lc_r. On those systems, uncomment the following: -#THREADSLIB= -pthread -# -# -# If the only thread package available is only Draft 4 compliant, -# you can try the following: -#THREADS= -DTHREAD_MIT_PTHREADS -D_THREAD_SAFE -DPTHREAD_PREEMPTIVE -# -# Note: -# LDAP has a problem with the idea of implicit vs. explicit yields -# in call conversion threading packages, like the MIT pthreads -# package. Rather than resolve this globally, I (Terry Lambert) have -# marked the threading as "preeemptive", even though it is -# technically not. -# This means that the implicit-yield threading is topologically -# equivalent to preemptive threading. - -# crypt(3) is in a separate library -LDAP_CRYPT_LIB= -lcrypt - -# -# ------------------------------------------------------------------------- -# you will probably not need to edit anything below this point -# ------------------------------------------------------------------------- -CC = gcc -PLATFORMCFLAGS= -Dfreebsd diff --git a/build/platforms/freebsd3-gcc/Make-platform b/build/platforms/freebsd3-gcc/Make-platform deleted file mode 100644 index 23d0b69e6b..0000000000 --- a/build/platforms/freebsd3-gcc/Make-platform +++ /dev/null @@ -1,49 +0,0 @@ -# -# LDAP FreeBSD GNU C Make-platform file -# - -# -# add any platform-specific overrides below here -# - -LDBMBACKEND=-DLDBM_USE_DBBTREE -LDBMINCLUDE=-I/usr/include - -EDITOR=/usr/bin/vi -FINGER=/usr/bin/finger -SENDMAIL=/usr/sbin/sendmail - -LDAP_RUNDIR=/var/run - -MANCOMPRESS=gzip -MANCOMPRESSSUFFIX=.gz - -# -# LDAP has a problem with the idea of implicit vs. explicit yields -# in call conversion threading packages, like the MIT pthreads -# package. Rather than resolve this globally, I have marked the -# threading as "preeemptive", even though it is technically not. -# -# This means that the implicit-yield threading is topologically -# equivalent to preemptive threading. -# -THREADS= -DPOSIX_THREADS -D_THREAD_SAFE -DPTHREAD_PREEMPTIVE - -# use special gcc flag to include libc_r.a -THREADSLIB= -pthread -#THREADSLIB= -lc_r - -# if you built/installed with -DNOLIBC_R, you'll need uncomment -# out the following -#THREADS= -DNO_THREADS -DPTHREAD_PREEMPTIVE -#THREADSLIB= - -# crypt(3) is in a separate library -LDAP_CRYPT_LIB= -lcrypt - -# -# ------------------------------------------------------------------------- -# you will probably not need to edit anything below this point -# ------------------------------------------------------------------------- -CC = gcc -PLATFORMCFLAGS= -Dfreebsd diff --git a/build/platforms/hpux-c89/Make-platform b/build/platforms/hpux-c89/Make-platform deleted file mode 100644 index f3d502e59b..0000000000 --- a/build/platforms/hpux-c89/Make-platform +++ /dev/null @@ -1,27 +0,0 @@ -# -# HP-UX optional c89 Make-platform file -# - -# -# add any platform-specific overrides below here -# - -# -# ------------------------------------------------------------------------- -# you will probably not need to edit anything below this point -# ------------------------------------------------------------------------- -CC=c89 - -# ranlib not needed under HP-UX -RANLIB = "" - -# install under HP-UX is not like on BSD systems, so we use our own script -INSTALL=$(LDAPSRC)/build/install.sh - -# we need to link a separate library to get ndbm routines under HP/UX -LDBMLIB=-lndbm - -# we need to link in the V3 library to get sigset() -PLATFORMLIBS= -lV3 - -PLATFORMCFLAGS= -Dhpux -Aa -D_HPUX_SOURCE diff --git a/build/platforms/hpux-cc/Make-platform b/build/platforms/hpux-cc/Make-platform deleted file mode 100644 index 3c813670ef..0000000000 --- a/build/platforms/hpux-cc/Make-platform +++ /dev/null @@ -1,33 +0,0 @@ -# -# LDAP HP-UX standard cc Make-platform file -# - -# -# add any platform-specific overrides below here -# - - -# -# ------------------------------------------------------------------------- -# you will probably not need to edit anything below this point -# ------------------------------------------------------------------------- -# ranlib not needed under HP-UX -RANLIB = "" - -# install under HP-UX is not like on BSD systems, so we use our own script -INSTALL=$(LDAPSRC)/build/install.sh - -# we need to link a separate library to get ndbm routines under HP/UX -LDBMLIB=-lndbm - -PLATFORMCFLAGS= -Dhpux - -# we need to link in the V3 library to get sigset() -PLATFORMLIBS= -lV3 - -# -# the HP-UX cc compiler doesn't understand function prototypes, so we -# need the unproto preprocessor -# -NEEDUNPROTO=yes -UNPROTOCFLAGS=-tp,$(LDAPSRC)/build/unproto/cpp diff --git a/build/platforms/hpux-gcc/Make-platform b/build/platforms/hpux-gcc/Make-platform deleted file mode 100644 index 2c3d77d7f8..0000000000 --- a/build/platforms/hpux-gcc/Make-platform +++ /dev/null @@ -1,28 +0,0 @@ -# -# LDAP HP-UX gcc Make-platform file -# - -# -# add any platform-specific overrides below here -# - - -# -# ------------------------------------------------------------------------- -# you will probably not need to edit anything below this point -# ------------------------------------------------------------------------- -CC=gcc - -# ranlib not needed under HP-UX -RANLIB = "" - -# install under HP-UX is not like on BSD systems, so we use our own script -INSTALL=$(LDAPSRC)/build/install.sh - -# we need to link a separate library to get ndbm routines under HP/UX -LDBMLIB=-lndbm - -# we need to link in the V3 library to get sigset() -PLATFORMLIBS= -lV3 - -PLATFORMCFLAGS= -Dhpux diff --git a/build/platforms/irix-cc/Make-platform b/build/platforms/irix-cc/Make-platform deleted file mode 100644 index c4b195515b..0000000000 --- a/build/platforms/irix-cc/Make-platform +++ /dev/null @@ -1,29 +0,0 @@ -# -# LDAP IRIX standard cc Make-platform file -# - -# -# add any platform-specific overrides below here -# - - -# -# ------------------------------------------------------------------------- -# you will probably not need to edit anything below this point -# ------------------------------------------------------------------------- -# ranlib not needed under IRIX -RANLIB = "" - -# be explicit about which CC to use -CC=cc - -# give full path to hostname since it may not be in user's path -HOSTNAME=/usr/bsd/hostname - -# don't count on a BSD install being present or first in path -INSTALL=$(LDAPSRC)/build/install.sh - -PLATFORMCFLAGS=-DUSE_WAITPID -PLATFORMLIBS= -THREADS= -THREADSLIB= diff --git a/build/platforms/irix-gcc/Make-platform b/build/platforms/irix-gcc/Make-platform deleted file mode 100644 index 96f698d132..0000000000 --- a/build/platforms/irix-gcc/Make-platform +++ /dev/null @@ -1,29 +0,0 @@ -# -# LDAP IRIX standard cc Make-platform file -# - -# -# add any platform-specific overrides below here -# - - -# -# ------------------------------------------------------------------------- -# you will probably not need to edit anything below this point -# ------------------------------------------------------------------------- -# ranlib not needed under IRIX -RANLIB = "" - -# be explicit about which CC to use -CC=gcc - -# give full path to hostname since it may not be in user's path -HOSTNAME=/usr/bsd/hostname - -# don't count on a BSD install being present or first in path -INSTALL=$(LDAPSRC)/build/install.sh - -PLATFORMCFLAGS=-DUSE_WAITPID -PLATFORMLIBS= -THREADS= -THREADSLIB= diff --git a/build/platforms/linux-gcc/Make-platform b/build/platforms/linux-gcc/Make-platform deleted file mode 100644 index 17798f5486..0000000000 --- a/build/platforms/linux-gcc/Make-platform +++ /dev/null @@ -1,27 +0,0 @@ -# -# LDAP Linux GNU C Make-platform file -# - -# -# add any platform-specific overrides below here -# - -EXTRACFLAGS=-O -g -CC = gcc -RANLIB = "ranlib" - -LDBMBACKEND=-DLDBM_USE_GDBM -LDBMLIB=-lgdbm - -PLATFORMCFLAGS= -Dlinux - -# not all versions of Linux support POSIX Threads -#THREADS=-DPOSIX_THREADS -DREENTRANT -#THREADSLIB=-lpthread - -# crypt(3) is in -lcrypt on some versions of Linux -#LDAP_CRYPT_LIB= -lcrypt - -LDAP_SENDMAIL=/usr/sbin/sendmail -LDAP_EDITOR=/bin/vi -LDAP_FINGER=/usr/bin/finger diff --git a/build/platforms/ncr-mp-ras-2-cc/Make-platform b/build/platforms/ncr-mp-ras-2-cc/Make-platform deleted file mode 100644 index ce98b2c0b4..0000000000 --- a/build/platforms/ncr-mp-ras-2-cc/Make-platform +++ /dev/null @@ -1,34 +0,0 @@ -# -# LDAP SVR4 standard cc Make-platform file -# -# Uses the std SVR4 stuff whenever possible. -# Some references to the BSD compatibility required. -# - -# -# add any platform-specific overrides below here -# - -# compiler to use, e.g. CC=cc or CC=gcc -CC = cc - -# flags added to every compile -# Use the BSD include files but only after the SVR4 files. -PLATFORMCFLAGS= -DSYSV -DSVR4 -I/usr/include -I/usr/ucbinclude - -# flags added to every link -PLATFORMLDFLAGS = - -# extra libraries needed (added to the end of all link commands) -PLATFORMLIBS = -lnsl -lnet -lsocket - -# ndbm library, needed if not in libc (e.g. LDBMLIB=-lndbm) -LDBMLIB = -L/usr/ucblib -lucb - -# BSD-like install command; if necessary, you can use a script -INSTALL = /usr/ucb/install - -# command to convert libraries for efficient random access; -RANLIB = "" - -# other commands - see the file build/Make-append for a list diff --git a/build/platforms/netbsd-cc/Make-platform b/build/platforms/netbsd-cc/Make-platform deleted file mode 100644 index e176e6d6a3..0000000000 --- a/build/platforms/netbsd-cc/Make-platform +++ /dev/null @@ -1,17 +0,0 @@ -# -# LDAP NetBSD cc Make-platform file -# on NetBSD, cc is gcc -# - - -# -# add any platform-specific overrides below here -# - -# -# ------------------------------------------------------------------------- -# you will probably not need to edit anything below this point -# ------------------------------------------------------------------------- -CC = gcc - -PLATFORMCFLAGS= -Dnetbsd diff --git a/build/platforms/netbsd-gcc/Make-platform b/build/platforms/netbsd-gcc/Make-platform deleted file mode 100644 index b66f8304f6..0000000000 --- a/build/platforms/netbsd-gcc/Make-platform +++ /dev/null @@ -1,16 +0,0 @@ -# -# LDAP NetBSD GNU C Make-platform file -# - - -# -# add any platform-specific overrides below here -# - -# -# ------------------------------------------------------------------------- -# you will probably not need to edit anything below this point -# ------------------------------------------------------------------------- -CC = gcc - -PLATFORMCFLAGS= -Dnetbsd diff --git a/build/platforms/nextstep-cc/Make-platform b/build/platforms/nextstep-cc/Make-platform deleted file mode 100644 index 1105e6c493..0000000000 --- a/build/platforms/nextstep-cc/Make-platform +++ /dev/null @@ -1,15 +0,0 @@ -# -# LDAP NeXTSTEP cc Make-platform file -# - - -# -# add any platform-specific overrides below here -# - -# -# ------------------------------------------------------------------------- -# you will probably not need to edit anything below this point -# ------------------------------------------------------------------------- -PLATFORMCFLAGS= -Dnextstep -PLATFORMLDFLAGS= -all_load diff --git a/build/platforms/osf1-cc/Make-platform b/build/platforms/osf1-cc/Make-platform deleted file mode 100644 index 2fd6b205c3..0000000000 --- a/build/platforms/osf1-cc/Make-platform +++ /dev/null @@ -1,24 +0,0 @@ -# -# LDAP OSF1 standard cc Make-platform file -# - -# -# add any platform-specific overrides below here -# - - -# -# ------------------------------------------------------------------------- -# you will probably not need to edit anything below this point -# ------------------------------------------------------------------------- - -# Even though prototypes are supported by the compiler, OSF's CC doesn't -# seem to define __STDC__ so we explicitly defined NEEDPROTOS here. -PLATFORMCFLAGS= -Dosf1 -DNEEDPROTOS -PLATFORMLDFLAGS= - -THREADS= -DTHREAD_DCE_PTHREADS -THREADSLIB= -lpthreads - -# the BSD-like install under OSF/1 is called installbsd -INSTALL=installbsd diff --git a/build/platforms/sco-cc/Make-platform b/build/platforms/sco-cc/Make-platform deleted file mode 100644 index 31ff05d498..0000000000 --- a/build/platforms/sco-cc/Make-platform +++ /dev/null @@ -1,23 +0,0 @@ -# -# LDAP SCO standard cc Make-platform file -# - -# -# add any platform-specific overrides below here -# - -# -# ------------------------------------------------------------------------- -# you will probably not need to edit anything below this point -# ------------------------------------------------------------------------- -# ranlib not needed under SCO -RANLIB = "" - -# be explicit about which CC to use -CC=/bin/cc - -# don't count on /usr/ucb/install being present or first in path -INSTALL=$(LDAPSRC)/build/install.sh - -PLATFORMCFLAGS= -DSCO -DNEED_BSDREGEX -DSYSV -DNOTERMCAP -PLATFORMLIBS= -lsocket -lnsl_s diff --git a/build/platforms/sco-gcc/Make-platform b/build/platforms/sco-gcc/Make-platform deleted file mode 100644 index 1abaa79e00..0000000000 --- a/build/platforms/sco-gcc/Make-platform +++ /dev/null @@ -1,22 +0,0 @@ -# -# LDAP SCO gcc Make-platform file -# - -# -# add any platform-specific overrides below here -# - -# -# ------------------------------------------------------------------------- -# you will probably not need to edit anything below this point -# ------------------------------------------------------------------------- -# ranlib not needed under SCO -RANLIB = "" - -CC=gcc - -# don't count on /usr/ucb/install being present or first in path -INSTALL=$(LDAPSRC)/build/install.sh - -PLATFORMCFLAGS= -DSCO -DNEED_BSDREGEX -DSYSV -DNOTERMCAP -PLATFORMLIBS= -lsocket -lnsl_s diff --git a/build/platforms/sunos4-cc/Make-platform b/build/platforms/sunos4-cc/Make-platform deleted file mode 100644 index 6f94bd4808..0000000000 --- a/build/platforms/sunos4-cc/Make-platform +++ /dev/null @@ -1,25 +0,0 @@ -# -# LDAP SunOS standard cc Make-platform file -# - -# -# add any platform-specific overrides below here -# - - -# -# ------------------------------------------------------------------------- -# you will probably not need to edit anything below this point -# ------------------------------------------------------------------------- -5LINT = /usr/5bin/lint - -PLATFORMCFLAGS= -Dsunos4 -THREADS= -DTHREAD_SUNOS4_LWP -THREADSLIB=-llwp - -# -# the SunOS 4 cc compiler doesn't understand function prototypes, so we -# need the unproto preprocessor -# -NEEDUNPROTO=yes -UNPROTOCFLAGS=-Qpath $(LDAPSRC)/build/unproto diff --git a/build/platforms/sunos4-gcc/Make-platform b/build/platforms/sunos4-gcc/Make-platform deleted file mode 100644 index 81c97f93c8..0000000000 --- a/build/platforms/sunos4-gcc/Make-platform +++ /dev/null @@ -1,19 +0,0 @@ -# -# LDAP SunOS GNU C Make-platform file -# - - -# -# add any platform-specific overrides below here -# - -# -# ------------------------------------------------------------------------- -# you will probably not need to edit anything below this point -# ------------------------------------------------------------------------- -CC = gcc -5LINT = /usr/5bin/lint - -PLATFORMCFLAGS= -Dsunos4 -THREADS= -DTHREAD_SUNOS4_LWP -THREADSLIB=-llwp diff --git a/build/platforms/sunos5-cc/Make-platform b/build/platforms/sunos5-cc/Make-platform deleted file mode 100644 index beaad9fe91..0000000000 --- a/build/platforms/sunos5-cc/Make-platform +++ /dev/null @@ -1,29 +0,0 @@ -# -# LDAP SunOS5 standard cc Make-platform file -# - -# -# add any platform-specific overrides below here -# - - -# -# ------------------------------------------------------------------------- -# you will probably not need to edit anything below this point -# ------------------------------------------------------------------------- -# ranlib not needed under SunOS5 -RANLIB = "" - -# be explicit about which CC to use -CC=cc - -# give full path to hostname since it may not be in user's path -HOSTNAME=/usr/ucb/hostname - -# don't count on /usr/ucb/install being present or first in path -INSTALL=$(LDAPSRC)/build/install.sh - -PLATFORMCFLAGS= -Dsunos5 -D_REENTRANT -PLATFORMLIBS= -lsocket -lnsl -lgen -THREADS= -DTHREAD_SUNOS5_LWP -THREADSLIB=-lthread diff --git a/build/platforms/sunos5-gcc/Make-platform b/build/platforms/sunos5-gcc/Make-platform deleted file mode 100644 index 20c5e4756b..0000000000 --- a/build/platforms/sunos5-gcc/Make-platform +++ /dev/null @@ -1,28 +0,0 @@ -# -# LDAP SunOS5 GNU C Make-platform file -# - -# -# add any platform-specific overrides below here -# - - -# -# ------------------------------------------------------------------------- -# you will probably not need to edit anything below this point -# ------------------------------------------------------------------------- -CC = gcc - -# ranlib not needed under SunOS5 -RANLIB = "" - -# give full path to hostname since it may not be in user's path -HOSTNAME=/usr/ucb/hostname - -# don't count on /usr/ucb/install being present or first in path -INSTALL=$(LDAPSRC)/build/install.sh - -PLATFORMCFLAGS= -Dsunos5 -D_REENTRANT -PLATFORMLIBS= -lsocket -lnsl -lgen -THREADS= -DTHREAD_SUNOS5_LWP -THREADSLIB=-lthread diff --git a/build/platforms/ultrix-cc/Make-platform b/build/platforms/ultrix-cc/Make-platform deleted file mode 100644 index 8139f5f848..0000000000 --- a/build/platforms/ultrix-cc/Make-platform +++ /dev/null @@ -1,16 +0,0 @@ -# -# LDAP Ultrix standard cc Make-platform file -# - -# -# add any platform-specific overrides below here -# - - -# -# ------------------------------------------------------------------------- -# you will probably not need to edit anything below this point -# ------------------------------------------------------------------------- - -PLATFORMCFLAGS= -Dultrix -YSYSTEM_FIVE -PLATFORMLDFLAGS= -YSYSTEM_FIVE diff --git a/build/platforms/ultrix-gcc/Make-platform b/build/platforms/ultrix-gcc/Make-platform deleted file mode 100644 index 976e069a62..0000000000 --- a/build/platforms/ultrix-gcc/Make-platform +++ /dev/null @@ -1,16 +0,0 @@ -# -# LDAP Ultrix standard gcc Make-platform file -# - -# -# add any platform-specific overrides below here -# - - -# -# ------------------------------------------------------------------------- -# you will probably not need to edit anything below this point -# ------------------------------------------------------------------------- - -CC= gcc -PLATFORMCFLAGS= -Dultrix diff --git a/build/platforms/vms/Makefile b/build/platforms/vms/Makefile deleted file mode 100644 index 65467d23d9..0000000000 --- a/build/platforms/vms/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1994 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# LDAP build/platforms/vms Makefile (do nothing) -# -#----------------------------------------------------------------------------- -# -############################################################################ -# # -# You should not have to edit anything in this file # -# # -############################################################################ -LDAPSRC= ../../.. - -all: FORCE - -links: FORCE - -clean: FORCE - -veryclean: FORCE - -FORCE: diff --git a/clients/Make-template b/clients/Make-template deleted file mode 100644 index 76a02d5a26..0000000000 --- a/clients/Make-template +++ /dev/null @@ -1,84 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1994 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# LDAP clients Makefile -# -#----------------------------------------------------------------------------- - -############################################################################ -# # -# You should not have to edit anything below this point # -# # -############################################################################ - -all: FORCE - @echo "making all in `$(PWD)`" - @for i in *; do \ - if [ -d $$i -a $$i != "RCS" ]; then \ - echo; echo " cd $$i; $(MAKE) $(MFLAGS) all"; \ - ( cd $$i; $(MAKE) $(MFLAGS) all ); \ - fi; \ - done - - -# -# rules to install the software -# - -install: FORCE - @echo "making install in `$(PWD)`" - @for i in *; do \ - if [ -d $$i -a $$i != "RCS" ]; then \ - echo; echo " cd $$i; $(MAKE) $(MFLAGS) install"; \ - ( cd $$i; $(MAKE) $(MFLAGS) install ); \ - fi; \ - done - -# -# rules to make clean -# - -clean: FORCE - @echo "making clean in `$(PWD)`" - @for i in *; do \ - if [ -d $$i -a $$i != "RCS" ]; then \ - echo; echo " cd $$i; $(MAKE) $(MFLAGS) clean"; \ - ( cd $$i; $(MAKE) $(MFLAGS) clean ); \ - fi; \ - done - -veryclean: clean - -# -# rules to make depend -# -# - -depend: FORCE - @echo "making depend in `$(PWD)`" - @for i in *; do \ - if [ -d $$i -a $$i != "RCS" ]; then \ - echo; echo " cd $$i; $(MAKE) $(MFLAGS) depend"; \ - ( cd $$i; $(MAKE) $(MFLAGS) depend ); \ - fi; \ - done - -links: - @echo "making links in `$(PWD)`"; \ - for i in .src/*; do \ - if [ -d $$i -a $$i != ".src/RCS" ]; then \ - d=`basename $$i`; \ - ( $(MKDIR) $$d; cd $$d; $(LN) ../.src/$$d .src; \ - $(LN) ../.src/$$d/Make-template . ; \ - $(MAKE) $(MFLAGS) MKDIR="$(MKDIR)" LN="$(LN)" \ - -f Make-template links ) ; \ - fi; \ - done diff --git a/clients/fax500/Make-template b/clients/fax500/Make-template deleted file mode 100644 index e3b224d772..0000000000 --- a/clients/fax500/Make-template +++ /dev/null @@ -1,87 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1994 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# X.500 ldap fax mailer makefile -# -#----------------------------------------------------------------------------- -LDAPSRC = ../.. -HDIR = $(LDAPSRC)/include -LDIR = $(LDAPSRC)/libraries -VERSIONFILE = $(LDAPSRC)/build/version - -SRCS = rp500.c main.c faxtotpc.c -OBJS = rp500.o main.o faxtotpc.o - -INCLUDES= -I$(HDIR) -DEFINES = $(DEFS) - -CFLAGS = $(INCLUDES) $(DEFINES) $(ACFLAGS) -LIBS = -lldap -llber $(KRBLIBFLAG) $(KRBLIBS) $(ALIBS) - -all: rp500 fax500 - -rp500: rpversion.o - $(CC) $(ALDFLAGS) -o $@ faxtotpc.o rp500.o rpversion.o \ - -L$(LDIR) $(LIBS) - -fax500: fax5version.o - $(CC) $(ALDFLAGS) -o $@ main.o fax5version.o faxtotpc.o \ - -L$(LDIR) $(LIBS) - -rpversion.c: faxtotpc.o rp500.o $(LDIR)/libldap.a - $(RM) $@ - (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ - t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ - -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ - -e "s|%VERSION%|$${v}|" \ - < Versionrp.c > $@) - -fax5version.c: main.o faxtotpc.o $(LDIR)/libldap.a - $(RM) $@ - (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ - t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ - -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ - -e "s|%VERSION%|$${v}|" \ - < Version.c > $@ ) - -install: rp500 xrpcomp fax500 FORCE - -$(MKDIR) -p $(ETCDIR) $(BINDIR) - $(INSTALL) $(INSTALLFLAGS) -m 755 rp500 $(ETCDIR) - $(SED) -e 's%ETCDIR%$(ETCDIR)%' xrpcomp > /tmp/xrpcomp.tmp - $(INSTALL) $(INSTALLFLAGS) -m 755 /tmp/xrpcomp.tmp $(BINDIR)/xrpcomp - $(RM) /tmp/xrpcomp.tmp - $(INSTALL) $(INSTALLFLAGS) -m 755 fax500 $(ETCDIR) - -lint: FORCE - $(LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -5lint: FORCE - $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -clean: FORCE - $(RM) *.o core a.out rpversion.c fax5version.c rp500 fax500 - -depend: FORCE - $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS) - -links: - @$(LN) .src/README .src/xrpcomp .src/*.[ch] . - -# DO NOT DELETE THIS LINE -- mkdep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -rp500.o: rp500.c ../../include/ldapconfig.h ../../include/lber.h -rp500.o: ../../include/ldap.h -main.o: main.c ../../include/ldapconfig.h ../../include/portable.h -main.o: ../../include/lber.h ../../include/ldap.h -faxtotpc.o: faxtotpc.c - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/clients/finger/Make-template b/clients/finger/Make-template deleted file mode 100644 index d55329f839..0000000000 --- a/clients/finger/Make-template +++ /dev/null @@ -1,70 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1994 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# X.500 ldap finger daemon makefile -# -#----------------------------------------------------------------------------- - -LDAPSRC = ../.. -HDIR = $(LDAPSRC)/include -LDIR = $(LDAPSRC)/libraries -VERSIONFILE = $(LDAPSRC)/build/version - -SRCS = main.c -OBJS = main.o - -INCLUDES=-I$(HDIR) -DEFINES = $(DEFS) - -CFLAGS = $(INCLUDES) $(DEFINES) $(ACFLAGS) -LIBS = -lldap -llber $(KRBLIBFLAG) $(KRBLIBS) $(ALIBS) - -all: in.xfingerd - -in.xfingerd: version.o - $(CC) $(ALDFLAGS) -o $@ $(OBJS) version.o \ - -L$(LDIR) $(LIBS) - -version.c: $(OBJS) $(LDIR)/libldap.a - $(RM) $@ - (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ - t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ - -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ - -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) - -install: in.xfingerd FORCE - -$(MKDIR) -p $(ETCDIR) - $(INSTALL) $(INSTALLFLAGS) -m 755 in.xfingerd $(ETCDIR) - -lint: FORCE - $(LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -5lint: FORCE - $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -clean: FORCE - $(RM) *.o core a.out version.c in.xfingerd - -depend: FORCE - $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS) - -links: - @$(LN) .src/README .src/*.[ch] . - -# DO NOT DELETE THIS LINE -- mkdep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -main.o: main.c ../../include/lber.h ../../include/ldap.h -main.o: ../../include/disptmpl.h ../../include/portable.h -main.o: ../../include/ldapconfig.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/clients/gopher/Make-template b/clients/gopher/Make-template deleted file mode 100644 index 9c45559d7a..0000000000 --- a/clients/gopher/Make-template +++ /dev/null @@ -1,91 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1994 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# gopher to x.500 gateway makefile -# -#----------------------------------------------------------------------------- - -LDAPSRC = ../.. -HDIR = $(LDAPSRC)/include -LDIR = $(LDAPSRC)/libraries -VERSIONFILE = $(LDAPSRC)/build/version - -SRCS = go500.c go500gw.c detach.c setproctitle.c -OBJS = go500.o go500gw.o detach.o setproctitle.o -GOOBJS = go500.o detach.o goversion.o setproctitle.o -GWOBJS = go500gw.o detach.o gwversion.o setproctitle.o - -INCLUDES= -I$(HDIR) -DEFINES = $(DEFS) - -CFLAGS = $(INCLUDES) $(DEFS) $(ACFLAGS) -LIBS = -lldap -llber $(KRBLIBFLAG) $(KRBLIBS) $(ALIBS) - -DLIBS = $(LDIR)/libldap.a $(LDIR)/liblber.a - -all: go500gw go500 - -go500gw: gwversion.o - $(CC) $(ALDFLAGS) -o $@ $(GWOBJS) -L$(LDIR) $(LIBS) - -go500: goversion.o - $(CC) $(ALDFLAGS) -o $@ $(GOOBJS) -L$(LDIR) $(LIBS) - -goversion.c: go500.o detach.o setproctitle.o $(DLIBS) - $(RM) $@ - (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ - t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ - -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ - -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) - -gwversion.c: go500gw.o detach.o setproctitle.o $(DLIBS) - $(RM) $@ - (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ - t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ - -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ - -e "s|%VERSION%|$${v}|" \ - < Versiongw.c > $@) - -install: go500 go500gw go500gw.help FORCE - -$(MKDIR) -p $(ETCDIR) - $(INSTALL) $(INSTALLFLAGS) -m 755 go500 $(ETCDIR) - $(INSTALL) $(INSTALLFLAGS) -m 755 go500gw $(ETCDIR) - -$(MV) $(ETCDIR)/go500gw.help $(ETCDIR)/go500gw.help- - $(INSTALL) $(INSTALLFLAGS) -m 644 go500gw.help $(ETCDIR) - -lint: FORCE - $(LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -5lint: FORCE - $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -clean: FORCE - $(RM) *.o core a.out gwversion.c goversion.c go500gw go500 - -depend: FORCE - $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS) - -links: - @$(LN) .src/README .src/*.help .src/*.[ch] . - -# DO NOT DELETE THIS LINE -- mkdep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -go500.o: go500.c ../../include/portable.h ../../include/ldapconfig.h -go500.o: ../../include/lber.h ../../include/ldap.h ../../include/disptmpl.h -go500gw.o: go500gw.c ../../include/lber.h ../../include/ldap.h -go500gw.o: ../../include/disptmpl.h ../../include/portable.h -go500gw.o: ../../include/ldapconfig.h -detach.o: detach.c ../../include/portable.h -setproctitle.o: setproctitle.c - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/clients/mail500/Make-template b/clients/mail500/Make-template deleted file mode 100644 index bdac2a2fc4..0000000000 --- a/clients/mail500/Make-template +++ /dev/null @@ -1,68 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1994 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# X.500 ldap mailer makefile -# -#----------------------------------------------------------------------------- -LDAPSRC = ../.. -HDIR = $(LDAPSRC)/include -LDIR = $(LDAPSRC)/libraries -VERSIONFILE = $(LDAPSRC)/build/version - -SRCS = main.c -OBJS = main.o - -INCLUDES= -I$(HDIR) -DEFINES = $(DEFS) - -CFLAGS = $(INCLUDES) $(DEFINES) $(ACFLAGS) -LDFLAGS = -L$(LDIR) -LIBS = -lldap -llber $(KRBLIBFLAG) $(KRBLIBS) $(ALIBS) - -all: mail500 - -mail500: version.o - $(CC) $(ALDFLAGS) -o $@ $(OBJS) version.o $(LDFLAGS) $(LIBS) - -version.c: $(OBJS) $(LDIR)/libldap/libldap.a - $(RM) $@ - (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ - t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ - -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ - -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) - -install: mail500 FORCE - -$(MKDIR) -p $(ETCDIR) - $(INSTALL) $(INSTALLFLAGS) -m 755 mail500 $(ETCDIR) - -lint: FORCE - $(LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -5lint: FORCE - $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -clean: FORCE - $(RM) *.o core a.out version.c mail500 - -depend: FORCE - $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS) - -links: - @$(LN) .src/README .src/sendmail.cf .src/*.[ch] . - -# DO NOT DELETE THIS LINE -- mkdep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -main.o: main.c ../../include/portable.h ../../include/lber.h -main.o: ../../include/ldap.h ../../include/ldapconfig.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/clients/rcpt500/Make-template b/clients/rcpt500/Make-template deleted file mode 100644 index 2677021a9e..0000000000 --- a/clients/rcpt500/Make-template +++ /dev/null @@ -1,71 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1994 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# X.500 ldap rcpt500 mail query responder makefile -# -#----------------------------------------------------------------------------- -LDAPSRC = ../.. -HDIR = $(LDAPSRC)/include -LDIR = $(LDAPSRC)/libraries -VERSIONFILE = $(LDAPSRC)/build/version - -SRCS= main.c cmds.c help.c query.c -OBJS= main.o cmds.o help.o query.o - -INCLUDES= -I$(HDIR) -DEFINES = $(DEFS) -CFLAGS = $(INCLUDES) $(DEFINES) $(ACFLAGS) -LIBS = -lldap -llber $(KRBLIBFLAG) $(KRBLIBS) $(ALIBS) - -all: rcpt500 - -rcpt500: version.o - $(CC) $(ALDFLAGS) -o $@ $(OBJS) version.o -L$(LDIR) $(LIBS) - -version.c: $(OBJS) $(LDIR)/libldap.a - $(RM) $@ - (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ - t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ - -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ - -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) - -install: rcpt500 rcpt500.help FORCE - -$(MKDIR) -p $(ETCDIR) - $(INSTALL) $(INSTALLFLAGS) -m 755 rcpt500 $(ETCDIR) - $(INSTALL) $(INSTALLFLAGS) -m 644 rcpt500.help $(ETCDIR) - -lint: FORCE - $(LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -5lint: FORCE - $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -clean: FORCE - $(RM) *.o core a.out version.c rcpt500 - -depend: FORCE - $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS) - -links: - @$(LN) .src/README .src/*.[ch] .src/*.help . - -# DO NOT DELETE THIS LINE -- mkdep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -main.o: main.c ../../include/portable.h ../../include/ldapconfig.h rcpt500.h -cmds.o: cmds.c rcpt500.h -help.o: help.c ../../include/portable.h ../../include/ldapconfig.h rcpt500.h -query.o: query.c ../../include/lber.h ../../include/ldap.h -query.o: ../../include/portable.h ../../include/ldapconfig.h -query.o: ../../include/disptmpl.h rcpt500.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/clients/tools/Make-template b/clients/tools/Make-template deleted file mode 100644 index af3b4d5758..0000000000 --- a/clients/tools/Make-template +++ /dev/null @@ -1,118 +0,0 @@ -#---------------------------------------------------------------------------- -# Copyright (c) 1994 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# LDAP tools makefile -# -#----------------------------------------------------------------------------- -LDAPSRC = ../.. -HDIR = $(LDAPSRC)/include -LDIR = $(LDAPSRC)/libraries -VERSIONFILE = $(LDAPSRC)/build/version - -SRCS = ldapsearch.c ldapmodify.c ldapdelete.c ldapmodrdn.c -OBJS = ldapsearch.o ldapmodify.o ldapdelete.o ldapmodrdn.o - -INCLUDES= -I$(HDIR) -DEFINES = $(DEFS) - -CFLAGS = $(INCLUDES) $(DEFINES) $(ACFLAGS) -LIBS = -lldap -llber -lldif $(KRBLIBFLAG) $(KRBLIBS) $(ALIBS) - -all: ldapsearch ldapmodify ldapdelete ldapmodrdn ldapadd - -ldapsearch: ldsversion.o - $(CC) $(ALDFLAGS) -o $@ ldapsearch.o ldsversion.o \ - -L$(LDIR) $(LIBS) - -ldapmodify: ldmversion.o - $(CC) $(ALDFLAGS) -o $@ ldapmodify.o ldmversion.o \ - -L$(LDIR) $(LIBS) - -ldapdelete: lddversion.o - $(CC) $(ALDFLAGS) -o $@ ldapdelete.o lddversion.o -L$(LDIR) $(LIBS) - -ldapmodrdn: ldrversion.o - $(CC) $(ALDFLAGS) -o $@ ldapmodrdn.o ldrversion.o -L$(LDIR) $(LIBS) - -ldapadd: ldapmodify - $(RM) $@ - $(HARDLN) ldapmodify ldapadd - -ldsversion.c: ldapsearch.o - $(RM) $@ - (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ - t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ - -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ - -e "s|%VERSION%|$${v}|" \ - < Versionlds.c > $@) - -ldmversion.c: ldapmodify.o - $(RM) $@ - (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ - t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ - -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ - -e "s|%VERSION%|$${v}|" \ - < Versionldm.c > $@) - -lddversion.c: ldapdelete.o - $(RM) $@ - (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ - t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ - -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ - -e "s|%VERSION%|$${v}|" \ - < Versionldd.c > $@) - -ldrversion.c: ldapmodrdn.o - $(RM) $@ - (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ - t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ - -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ - -e "s|%VERSION%|$${v}|" \ - < Versionldr.c > $@) - -install: ldapsearch ldapmodify ldapdelete ldapmodrdn ldapadd FORCE - -$(MKDIR) -p $(BINDIR) - $(INSTALL) $(INSTALLFLAGS) -m 755 ldapsearch $(BINDIR) - $(INSTALL) $(INSTALLFLAGS) -m 755 ldapmodify $(BINDIR) - $(INSTALL) $(INSTALLFLAGS) -m 755 ldapdelete $(BINDIR) - $(INSTALL) $(INSTALLFLAGS) -m 755 ldapmodrdn $(BINDIR) - $(RM) $(BINDIR)/ldapadd - $(HARDLN) $(BINDIR)/ldapmodify $(BINDIR)/ldapadd - -lint: FORCE - $(LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -5lint: FORCE - $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -clean: FORCE - $(RM) *.o core a.out ld*version.c ldapsearch ldapmodify ldapdelete \ - ldapmodrdn ldapadd - -depend: FORCE - $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS) - -links: - @$(LN) .src/*.[ch] . - -# DO NOT DELETE THIS LINE -- mkdep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -ldapsearch.o: ldapsearch.c ../../include/lber.h ../../include/ldap.h -ldapsearch.o: ../../include/ldif.h ../../include/ldapconfig.h -ldapmodify.o: ldapmodify.c ../../include/lber.h ../../include/ldap.h -ldapmodify.o: ../../include/ldif.h ../../include/ldapconfig.h -ldapdelete.o: ldapdelete.c ../../include/lber.h ../../include/ldap.h -ldapdelete.o: ../../include/ldapconfig.h -ldapmodrdn.o: ldapmodrdn.c ../../include/lber.h ../../include/ldap.h -ldapmodrdn.o: ../../include/ldapconfig.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/clients/ud/Make-template b/clients/ud/Make-template deleted file mode 100644 index 1cba01cbd1..0000000000 --- a/clients/ud/Make-template +++ /dev/null @@ -1,100 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1994 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# ud makefile -# -# Use -DUOFM for University of Michigan specifics like: -# if ud should know about noBatchUpdates -# Use -DDOS if building for a DOS machine -# Use -DNOTERMCAP if there is no termcap library -# also need to redefine/undefine the Makefile TERMLIB variable -#----------------------------------------------------------------------------- -LDAPSRC = ../.. -HDIR = $(LDAPSRC)/include -LDIR = $(LDAPSRC)/libraries -VERSIONFILE = $(LDAPSRC)/build/version - -SRCS= main.c find.c mod.c print.c auth.c util.c help.c\ - string_to_key.c group.c edit.c globals.c -OBJS= main.o find.o mod.o print.o auth.o util.o help.o\ - string_to_key.o group.o globals.o edit.o -HDRS= ud.h - -INCLUDES= -I$(HDIR) $(KRBINCLUDEFLAG) -DEFINES= $(DEFS) -DDEBUG -DCONFIG_FILE=\"$(RUNTIMEETCDIR)/ud.conf\" \ - -DLDAP_FRIENDLY_MAP_FILE=\"$(RUNTIMEETCDIR)/ldapfriendly\" -TERMLIB= -ltermcap - -CFLAGS= ${INCLUDES} ${DEFINES} ${ACFLAGS} -LIBS= ${TERMLIB} -lldap -llber $(KRBLIBFLAG) $(KRBLIBS) $(ALIBS) - -PURIFY= -#PURIFY=purify - -all: ud - -ud : version.o - $(PURIFY) ${CC} $(ALDFLAGS) -o $@ version.o ${OBJS} -L${LDIR} ${LIBS} - -version.c: ${OBJS} $(LDIR)/libldap/libldap.a - $(RM) $@ - (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ - t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ - -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ - -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) - -install: ud FORCE - -$(MKDIR) -p $(BINDIR) - -mv -f ${BINDIR}/ud ${BINDIR}/ud- - $(INSTALL) $(INSTALLFLAGS) -m 775 ud ${BINDIR} - -depend: FORCE - $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS) - -clean: FORCE - $(RM) $(OBJS) core ud tags version.o version.c - $(RM) *_pure_*.o ud.pure_hardlink ud.pure_linkinfo - -tags: FORCE - $(CTAGS) $(SRCS) ${HDRS} - -lint: FORCE - $(LINT) -Dlint $(INCLUDES) $(DEFINES) $(SRCS) version.c | \ - egrep -v "string_to_key|but not defined" - -5lint: FORCE - $(5LINT) -Dlint $(INCLUDES) $(DEFINES) $(SRCS) version.c - -links: - @$(LN) .src/README .src/etc.ud.conf .src/*.[ch] . - -# DO NOT DELETE THIS LINE -- mkdep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -main.o: main.c ../../include/lber.h ../../include/ldap.h -main.o: ../../include/ldapconfig.h ../../include/portable.h ud.h -find.o: find.c ../../include/lber.h ../../include/ldap.h ud.h -mod.o: mod.c ../../include/lber.h ../../include/ldap.h ud.h -print.o: print.c ../../include/lber.h ../../include/ldap.h ud.h -auth.o: auth.c ../../include/lber.h ../../include/ldap.h -auth.o: ../../include/ldapconfig.h ud.h -util.o: util.c ../../include/lber.h ../../include/ldap.h -util.o: ../../include/ldapconfig.h ../../include/portable.h ud.h -help.o: help.c ../../include/lber.h ../../include/ldap.h ud.h -string_to_key.o: string_to_key.c -group.o: group.c ../../include/lber.h ../../include/ldap.h -group.o: ../../include/ldapconfig.h ud.h -edit.o: edit.c ../../include/lber.h ../../include/ldap.h -edit.o: ../../include/ldapconfig.h ud.h -globals.o: globals.c ud.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/contrib/saucer/Make-template b/contrib/saucer/Make-template deleted file mode 100644 index cdd9233dc5..0000000000 --- a/contrib/saucer/Make-template +++ /dev/null @@ -1,54 +0,0 @@ -# Makefile for LDAP "saucer" client - -HDIR = $(LDAPSRC)/include -INSTMAN = $(MANDIR)/man$(SECT) -LDAPSRC = ../.. -LDIR = $(LDAPSRC)/libraries -SECT = 1 -VERFILE = $(LDAPSRC)/build/version - -CFLAGS = -I$(HDIR) $(DEFINES) $(ACFLAGS) -SRCS = main.c -OBJS = $(SRCS:.c=.o) -LIBS = -lldap -llber $(KRBLIBFLAG) $(KRBLIBS) $(ALIBS) - -all: saucer - -saucer: $(OBJS) - $(CC) $(ALDFLAGS) -o $@ $(OBJS) -L$(LDIR) $(LIBS) - -protoize: $(SRCS) - protoize -c "$(CFLAGS)" $(SRCS) - -unprotoize: $(SRCS) - unprotoize -c "$(CFLAGS)" $(SRCS) - -install: saucer FORCE - -$(MKDIR) -p $(BINDIR) - $(INSTALL) $(INSTALLFLAGS) -m 755 saucer $(BINDIR) - -$(MKDIR) -p $(INSTMAN) - @TMPMAN=/tmp/ldapman.$$$$; \ - VERSION=`$(CAT) $(VERFILE)`; \ - for page in *.$(SECT); do \ - $(SED) -e 's%ETCDIR%$(ETCDIR)%' -e "s%LDVERSION%$$VERSION%" \ - $$page > $$TMPMAN; \ - echo "installing $(INSTMAN)/$$page"; \ - $(INSTALL) $(INSTALLFLAGS) -m 644 $$TMPMAN $(INSTMAN)/$$page; \ - done; \ - $(RM) $$TMPMAN - -lint: FORCE - $(LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -5lint: FORCE - $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -clean: FORCE - $(RM) *.o core a.out saucer - -depend: FORCE - $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS) - -links: - @$(LN) .src/*.[ch] . - diff --git a/doc/Make-template b/doc/Make-template deleted file mode 100644 index 1dea71cc90..0000000000 --- a/doc/Make-template +++ /dev/null @@ -1,95 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1994 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# LDAP doc Makefile -# -#----------------------------------------------------------------------------- - -############################################################################ -# # -# You should not have to edit anything below this point # -# # -############################################################################ - -all: FORCE - @echo "making all in `$(PWD)`" - @for i in *; do \ - if [ -d $$i -a $$i != "RCS" ]; then \ - echo; echo " cd $$i; $(MAKE) $(MFLAGS) all"; \ - ( cd $$i; $(MAKE) $(MFLAGS) all ); \ - fi; \ - done - - -install: FORCE - @echo "making install in `$(PWD)`" - @for i in *; do \ - if [ -d $$i -a $$i != "RCS" ]; then \ - echo; echo " cd $$i; $(MAKE) $(MFLAGS) install"; \ - ( cd $$i; $(MAKE) $(MFLAGS) install ); \ - fi; \ - done - - -clean: FORCE - @echo "making clean in `$(PWD)`" - @for i in *; do \ - if [ -d $$i -a $$i != "RCS" ]; then \ - echo; echo " cd $$i; $(MAKE) $(MFLAGS) clean"; \ - ( cd $$i; $(MAKE) $(MFLAGS) clean ); \ - fi; \ - done - - -veryclean: clean - - -depend: FORCE - @echo "making depend in `$(PWD)`" - @for i in *; do \ - if [ -d $$i -a $$i != "RCS" ]; then \ - echo; echo " cd $$i; $(MAKE) $(MFLAGS) depend"; \ - ( cd $$i; $(MAKE) $(MFLAGS) depend ); \ - fi; \ - done - - -lint: FORCE - @echo "making lint in `$(PWD)`" - @for i in *; do \ - if [ -d $$i -a $$i != "RCS" ]; then \ - echo; echo " cd $$i; $(MAKE) $(MFLAGS) lint"; \ - ( cd $$i; $(MAKE) $(MFLAGS) lint ); \ - fi; \ - done - - -5lint: FORCE - @echo "making 5lint in `$(PWD)`" - @for i in *; do \ - if [ -d $$i -a $$i != "RCS" ]; then \ - echo; echo " cd $$i; $(MAKE) $(MFLAGS) 5lint"; \ - ( cd $$i; $(MAKE) $(MFLAGS) 5lint ); \ - fi; \ - done - - -links: - @echo "making links in `$(PWD)`"; \ - for i in .src/*; do \ - if [ -d $$i -a $$i != ".src/RCS" ]; then \ - d=`basename $$i`; \ - ( $(MKDIR) $$d; cd $$d; $(LN) ../.src/$$d .src; \ - $(LN) ../.src/$$d/Make-template . ; \ - $(MAKE) $(MFLAGS) MKDIR="$(MKDIR)" LN="$(LN)" \ - -f Make-template links ) ; \ - fi; \ - done diff --git a/doc/guides/Make-template b/doc/guides/Make-template deleted file mode 100644 index f54d68ac70..0000000000 --- a/doc/guides/Make-template +++ /dev/null @@ -1,29 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1994 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# LDAP doc/guides makefile -# -#----------------------------------------------------------------------------- - -all: FORCE - -install: FORCE - -lint: FORCE - -5lint: FORCE - -clean: FORCE - -depend: FORCE - -links: - @$(LN) .src/*.txt . diff --git a/doc/man/Make-template b/doc/man/Make-template deleted file mode 100644 index e975170f3e..0000000000 --- a/doc/man/Make-template +++ /dev/null @@ -1,84 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1994 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# LDAP doc/man makefile -# -#----------------------------------------------------------------------------- - -############################################################################ -# # -# You should not have to edit anything below this point # -# # -############################################################################ - -all: FORCE - @echo "making all in `$(PWD)`" - @for i in *; do \ - if [ -d $$i -a $$i != "RCS" ]; then \ - echo; echo " cd $$i; $(MAKE) $(MFLAGS) all"; \ - ( cd $$i; $(MAKE) $(MFLAGS) all ); \ - fi; \ - done - - -# -# rules to install the software -# - -install: FORCE - @echo "making install in `$(PWD)`" - @for i in *; do \ - if [ -d $$i -a $$i != "RCS" ]; then \ - echo; echo " cd $$i; $(MAKE) $(MFLAGS) install"; \ - ( cd $$i; $(MAKE) $(MFLAGS) install ); \ - fi; \ - done - -# -# rules to make clean -# - -clean: FORCE - @echo "making clean in `$(PWD)`" - @for i in *; do \ - if [ -d $$i -a $$i != "RCS" ]; then \ - echo; echo " cd $$i; $(MAKE) $(MFLAGS) clean"; \ - ( cd $$i; $(MAKE) $(MFLAGS) clean ); \ - fi; \ - done - -veryclean: clean - -# -# rules to make depend -# -# - -depend: FORCE - @echo "making depend in `$(PWD)`" - @for i in *; do \ - if [ -d $$i -a $$i != "RCS" ]; then \ - echo; echo " cd $$i; $(MAKE) $(MFLAGS) depend"; \ - ( cd $$i; $(MAKE) $(MFLAGS) depend ); \ - fi; \ - done - -links: - @echo "making links in `$(PWD)`"; \ - for i in .src/*; do \ - if [ -d $$i -a $$i != ".src/RCS" ]; then \ - d=`basename $$i`; \ - ( $(MKDIR) $$d; cd $$d; $(LN) ../.src/$$d .src; \ - $(LN) ../.src/$$d/Make-template . ; \ - $(MAKE) $(MFLAGS) MKDIR="$(MKDIR)" LN="$(LN)" \ - -f Make-template links ) ; \ - fi; \ - done diff --git a/doc/man/man1/Make-template b/doc/man/man1/Make-template deleted file mode 100644 index dfc4a51369..0000000000 --- a/doc/man/man1/Make-template +++ /dev/null @@ -1,52 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1994 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# LDAP man1 makefile -# -#----------------------------------------------------------------------------- - -LDAPSRC= ../../.. -SECT=1 -INSTDIR=$(MANDIR)/man$(SECT) -VERSIONFILE = $(LDAPSRC)/build/version - -all: FORCE - -install: FORCE - -$(MKDIR) -p $(INSTDIR) - @TMPMAN=/tmp/ldapman.$$$$; \ - VERSION=`$(CAT) $(VERSIONFILE)`; \ - for page in *.$(SECT); do \ - $(SED) -e 's%ETCDIR%$(RUNTIMEETCDIR)%' -e "s%LDVERSION%$$VERSION%" \ - $$page > $$TMPMAN; \ - echo "installing $(INSTDIR)/$$page"; \ - $(INSTALL) $(INSTALLFLAGS) -m 644 $$TMPMAN $(INSTDIR)/$$page; \ - if [ -f "$$page.links" ]; then \ - for link in `$(CAT) $$page.links`; do \ - echo ".so man$(SECT)/$$page" > $$TMPMAN; \ - echo "installing $(INSTDIR)/$$link as link to $$page"; \ - $(INSTALL) $(INSTALLFLAGS) -m 644 $$TMPMAN \ - $(INSTDIR)/$$link; \ - done; \ - fi; \ - done; \ - $(RM) $$TMPMAN - -clean: FORCE - -depend: FORCE - -lint: FORCE - -5lint: FORCE - -links: - @$(LN) .src/*.$(SECT) .src/*links . diff --git a/doc/man/man3/Make-template b/doc/man/man3/Make-template deleted file mode 100644 index 6e153f694f..0000000000 --- a/doc/man/man3/Make-template +++ /dev/null @@ -1,52 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1994 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# LDAP man3 makefile -# -#----------------------------------------------------------------------------- - -LDAPSRC= ../../.. -SECT=3 -INSTDIR=$(MANDIR)/man$(SECT) -VERSIONFILE = $(LDAPSRC)/build/version - -all: FORCE - -install: FORCE - -$(MKDIR) -p $(INSTDIR) - @TMPMAN=/tmp/ldapman.$$$$; \ - VERSION=`$(CAT) $(VERSIONFILE)`; \ - for page in *.$(SECT); do \ - $(SED) -e 's%ETCDIR%$(RUNTIMEETCDIR)%' -e "s%LDVERSION%$$VERSION%" \ - $$page > $$TMPMAN; \ - echo "installing $(INSTDIR)/$$page"; \ - $(INSTALL) $(INSTALLFLAGS) -m 644 $$TMPMAN $(INSTDIR)/$$page; \ - if [ -f "$$page.links" ]; then \ - for link in `$(CAT) $$page.links`; do \ - echo ".so man$(SECT)/$$page" > $$TMPMAN; \ - echo "installing $(INSTDIR)/$$link as link to $$page"; \ - $(INSTALL) $(INSTALLFLAGS) -m 644 $$TMPMAN \ - $(INSTDIR)/$$link; \ - done; \ - fi; \ - done; \ - $(RM) $$TMPMAN - -clean: FORCE - -depend: FORCE - -lint: FORCE - -5lint: FORCE - -links: - @$(LN) .src/*.$(SECT) .src/*links . diff --git a/doc/man/man5/Make-template b/doc/man/man5/Make-template deleted file mode 100644 index 3d2d5544bf..0000000000 --- a/doc/man/man5/Make-template +++ /dev/null @@ -1,52 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1994 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# LDAP man5 makefile -# -#----------------------------------------------------------------------------- - -LDAPSRC= ../../.. -SECT=5 -INSTDIR=$(MANDIR)/man$(SECT) -VERSIONFILE = $(LDAPSRC)/build/version - -all: FORCE - -install: FORCE - -$(MKDIR) -p $(INSTDIR) - @TMPMAN=/tmp/ldapman.$$$$; \ - VERSION=`$(CAT) $(VERSIONFILE)`; \ - for page in *.$(SECT); do \ - $(SED) -e 's%ETCDIR%$(RUNTIMEETCDIR)%' -e "s%LDVERSION%$$VERSION%" \ - $$page > $$TMPMAN; \ - echo "installing $(INSTDIR)/$$page"; \ - $(INSTALL) $(INSTALLFLAGS) -m 644 $$TMPMAN $(INSTDIR)/$$page; \ - if [ -f "$$page.links" ]; then \ - for link in `$(CAT) $$page.links`; do \ - echo ".so man$(SECT)/$$page" > $$TMPMAN; \ - echo "installing $(INSTDIR)/$$link as link to $$page"; \ - $(INSTALL) $(INSTALLFLAGS) -m 644 $$TMPMAN \ - $(INSTDIR)/$$link; \ - done; \ - fi; \ - done; \ - $(RM) $$TMPMAN - -clean: FORCE - -depend: FORCE - -lint: FORCE - -5lint: FORCE - -links: - @$(LN) .src/*.$(SECT) .src/*links . diff --git a/doc/man/man8/Make-template b/doc/man/man8/Make-template deleted file mode 100644 index 55899f5274..0000000000 --- a/doc/man/man8/Make-template +++ /dev/null @@ -1,52 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1994 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# LDAP man8 makefile -# -#----------------------------------------------------------------------------- - -LDAPSRC= ../../.. -SECT=8 -INSTDIR=$(MANDIR)/man$(SECT) -VERSIONFILE = $(LDAPSRC)/build/version - -all: FORCE - -install: FORCE - -$(MKDIR) -p $(INSTDIR) - @TMPMAN=/tmp/ldapman.$$$$; \ - VERSION=`$(CAT) $(VERSIONFILE)`; \ - for page in *.$(SECT); do \ - $(SED) -e 's%ETCDIR%$(RUNTIMEETCDIR)%' -e "s%LDVERSION%$$VERSION%" \ - $$page > $$TMPMAN; \ - echo "installing $(INSTDIR)/$$page"; \ - $(INSTALL) $(INSTALLFLAGS) -m 644 $$TMPMAN $(INSTDIR)/$$page; \ - if [ -f "$$page.links" ]; then \ - for link in `$(CAT) $$page.links`; do \ - echo ".so man$(SECT)/$$page" > $$TMPMAN; \ - echo "installing $(INSTDIR)/$$link as link to $$page"; \ - $(INSTALL) $(INSTALLFLAGS) -m 644 $$TMPMAN \ - $(INSTDIR)/$$link; \ - done; \ - fi; \ - done; \ - $(RM) $$TMPMAN - -clean: FORCE - -depend: FORCE - -lint: FORCE - -5lint: FORCE - -links: - @$(LN) .src/*.$(SECT) .src/*links . diff --git a/doc/rfc/Make-template b/doc/rfc/Make-template deleted file mode 100644 index 62e794d09f..0000000000 --- a/doc/rfc/Make-template +++ /dev/null @@ -1,29 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1994 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# LDAP doc/rfc makefile -# -#----------------------------------------------------------------------------- - -all: FORCE - -install: FORCE - -lint: FORCE - -5lint: FORCE - -clean: FORCE - -depend: FORCE - -links: - @$(LN) .src/*.txt . diff --git a/include/Make-template b/include/Make-template deleted file mode 100644 index c0a26fb629..0000000000 --- a/include/Make-template +++ /dev/null @@ -1,63 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1994 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# LDAP include file makefile -# -#----------------------------------------------------------------------------- - -LDAPSRC=.. - -all: ldapconfig.h FORCE - @if [ ! -z "$(SYSEXITSPATH)" -a ! -r sysexits.h ]; then \ - echo "$(LN) $(SYSEXITSPATH) sysexits.h"; \ - $(LN) $(SYSEXITSPATH) sysexits.h; \ - else \ - exit 0; \ - fi - -ldapconfig.h: ldapconfig.h.edit Makefile - @$(RM) $@ - @echo "/*" > $@; \ - echo " * This file was automatically generated. Do not edit it." >> $@; \ - echo " * Instead, edit the file ldapconfig.h.edit. See the LDAP" >> $@; \ - echo " * INSTALL file for more information." >> $@; \ - echo " */ " >> $@; \ - echo "" >> $@; \ - $(SED) -e 's;%ETCDIR%;$(RUNTIMEETCDIR);' ldapconfig.h.edit >> $@; \ - $(CHMOD) 444 $@ - -install: all FORCE - -$(MKDIR) -p $(INCLUDEDIR) - $(INSTALL) $(INSTALLFLAGS) -m 644 ldap.h $(INCLUDEDIR) - $(INSTALL) $(INSTALLFLAGS) -m 644 lber.h $(INCLUDEDIR) - $(INSTALL) $(INSTALLFLAGS) -m 644 proto-lber.h $(INCLUDEDIR) - $(INSTALL) $(INSTALLFLAGS) -m 644 proto-ldap.h $(INCLUDEDIR) - $(INSTALL) $(INSTALLFLAGS) -m 644 disptmpl.h $(INCLUDEDIR) - $(INSTALL) $(INSTALLFLAGS) -m 644 srchpref.h $(INCLUDEDIR) - -depend: FORCE - -clean: FORCE - -veryclean: clean - $(RM) ldapconfig.h - @if [ ! -z "$(SYSEXITSPATH)" ]; then \ - echo "$(RM) sysexits.h"; \ - $(RM) sysexits.h; \ - else \ - exit 0; \ - fi - -links: - @echo "making links in `$(PWD)` - @$(LN) .src/*.h . - @cp .src/ldapconfig.h.edit . - @-$(RM) ldapconfig.h diff --git a/include/ldapconfig.h.edit b/include/ldapconfig.h.edit deleted file mode 100644 index bb63e69e5c..0000000000 --- a/include/ldapconfig.h.edit +++ /dev/null @@ -1,302 +0,0 @@ -/* - * Copyright (c) 1994 Regents of the University of Michigan. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that this notice is preserved and that due credit is given - * to the University of Michigan at Ann Arbor. The name of the University - * may not be used to endorse or promote products derived from this - * software without specific prior written permission. This software - * is provided ``as is'' without express or implied warranty. - */ - -#ifndef _LDAP_CONFIG_H -#define _LDAP_CONFIG_H - -/* - * config.h for LDAP -- edit this file to customize LDAP client behavior. - * NO platform-specific definitions should be placed in this file. - * Note that this is NOT used by the LDAP or LBER libraries. - */ - -/* - * SHARED DEFINITIONS - things you should change - */ -#define DEFAULT_BINDIR "%BINDIR%" -#define DEFAULT_SBINDIR "%SBINDIR%" -#define DEFAULT_SYSCONFDIR "%SYSCONFDIR%" -#define DEFAULT_LIBEXECDIR "%LIBEXECDIR%" - -/* default ldap host */ -#define LDAPHOST "localhost" - -#define DEFAULT_LDAPHOST_FILE "%SYSCONFDIR%/ldaphost" -/* default place to start searching */ -#define DEFAULT_BASE "o=Your Organization Name, c=US" -#define DEFAULT_BASE_FILE "%SYSCONFDIR%/ldapbase" - -/* - * default binddn and creditials - * use files, make sure they are not generally readable - */ -#define DEFAULT_BINDDN NULL -#define DEFAULT_BINDDN_FILE "%SYSCONFDIR%/ldapbinddn" - -#define DEFAULT_BIND_CRED NULL -#define DEFAULT_BIND_CRED_FILE "%SYSCONFDIR%/ldapbindcred" - -/********************************************************************* - * * - * You probably do not need to edit anything below this point * - * * - *********************************************************************/ - -/* - * SHARED DEFINITIONS - other things you can change - */ - /* default attribute to use when sorting entries, NULL => sort by DN */ -#define SORT_ATTR NULL - /* default count of DN components to show in entry displays */ -#define DEFAULT_RDNCOUNT 2 - /* default config file locations */ -#define FILTERFILE "%SYSCONFDIR%/ldapfilter.conf" -#define TEMPLATEFILE "%SYSCONFDIR%/ldaptemplates.conf" -#define SEARCHFILE "%SYSCONFDIR%/ldapsearchprefs.conf" -#define FRIENDLYFILE "%SYSCONFDIR%/ldapfriendly" - -/* - * FINGER DEFINITIONS - */ - /* who to bind as */ -#define FINGER_BINDDN NULL -#define FINGER_BIND_CRED NULL - /* where to search */ -#define FINGER_BASE DEFAULT_BASE - /* banner to print */ -#define FINGER_BANNER "X.500 Finger Service...\r\n" - /* who to report errors to */ -#define FINGER_ERRORS "System Administrator" - /* what to say if no matches are found */ -#define FINGER_NOMATCH "Search failed to find anything.\r\n" - /* what to say if the service may be unavailable */ -#define FINGER_UNAVAILABLE \ -"The directory service may be temporarily unavailable.\r\n\ -Please try again later.\r\n" - /* printed if a match has no email address - for disptmp default */ -#define FINGER_NOEMAIL1 "None registered in this service." -#define FINGER_NOEMAIL2 NULL -#define FINGER_NOEMAIL { FINGER_NOEMAIL1, FINGER_NOEMAIL2, NULL } - /* maximum number of matches returned */ -#define FINGER_SIZELIMIT 50 - /* max number of hits displayed in full before a list is presented */ -#define FINGER_LISTLIMIT 1 - /* what to exec for "finger @host" */ -#define FINGER_CMD "%FINGER%" - /* how to treat aliases when searching */ -#define FINGER_DEREF LDAP_DEREF_FINDING - /* attribute to use when sorting results */ -#define FINGER_SORT_ATTR SORT_ATTR - /* enable ufn support */ -#define FINGER_UFN - /* timeout for searches */ -#define FINGER_TIMEOUT 60 - /* number of DN components to show in entry displays */ -#define FINGER_RDNCOUNT DEFAULT_RDNCOUNT - -/* - * GO500 GOPHER GATEWAY DEFINITIONS - */ - /* who to bind as */ -#define GO500_BINDDN NULL -#define GO500_BIND_CRED NULL - /* where to search */ -#define GO500_BASE DEFAULT_BASE - /* port on which to listen */ -#define GO500_PORT 5555 - /* how to handle aliases */ -#define GO500_DEREF LDAP_DEREF_FINDING - /* attribute to use when sorting results */ -#define GO500_SORT_ATTR SORT_ATTR - /* timeout for searches */ -#define GO500_TIMEOUT 180 - /* enable ufn support */ -#define GO500_UFN - /* - * only set and uncomment this if your hostname() does not return - * a fully qualified hostname - */ -/* #define GO500_HOSTNAME "fully.qualified.hostname.here" */ - /* number of DN components to show in entry displays */ -#define GO500_RDNCOUNT DEFAULT_RDNCOUNT - -/* - * GO500GW GOPHER GATEWAY DEFINITIONS - */ - /* who to bind as */ -#define GO500GW_BINDDN NULL -#define GO500GW_BIND_CRED NULL - /* where the helpfile lives */ -#define GO500GW_HELPFILE "%SYSCONFDIR%/go500gw.help" - /* port on which to listen */ -#define GO500GW_PORT 7777 - /* timeout on all searches */ -#define GO500GW_TIMEOUT 180 - /* enable ufn support */ -#define GO500GW_UFN - /* attribute to use when sorting results */ -#define GO500GW_SORT_ATTR SORT_ATTR - /* - * only set and uncomment this if your hostname() does not return - * a fully qualified hostname - */ -/* #define GO500GW_HOSTNAME "fully.qualified.hostname.here" */ - /* number of DN components to show in entry displays */ -#define GO500GW_RDNCOUNT DEFAULT_RDNCOUNT - -/* - * RCPT500 MAIL RESPONDER GATEWAY DEFINITIONS - */ - /* who to bind as */ -#define RCPT500_BINDDN NULL -#define RCPT500_BIND_CRED NULL - /* where the helpfile lives */ -#define RCPT500_HELPFILE "%SYSCONFDIR%/rcpt500.help" - /* maximum number of matches returned */ -#define RCPT500_SIZELIMIT 50 - /* address replies will appear to come from */ -#define RCPT500_FROM "\"Directory Query Program\" " - /* command that will accept an RFC822 message text on standard - input, and send it. sendmail -t does this nicely. */ -#define RCPT500_PIPEMAILCMD "%SENDMAIL% -t" - /* where to search */ -#define RCPT500_BASE DEFAULT_BASE - /* attribute to use when sorting results */ -#define RCPT500_SORT_ATTR SORT_ATTR - /* max number of hits displayed in full before a list is presented */ -#define RCPT500_LISTLIMIT 1 - /* enable ufn support */ -#define RCPT500_UFN - /* number of DN components to show in entry displays */ -#define RCPT500_RDNCOUNT DEFAULT_RDNCOUNT - -/* - * LDAPSEARCH TOOL - */ - /* who to bind as */ -#define LDAPSEARCH_BINDDN NULL -#define LDAPSEARCH_BIND_CRED NULL - /* search base */ -#define LDAPSEARCH_BASE DEFAULT_BASE - -/* - * LDAPMODIFY TOOL - */ - /* who to bind as */ -#define LDAPMODIFY_BINDDN NULL -#define LDAPMODIFY_BIND_CRED NULL - /* search base */ -#define LDAPMODIFY_BASE DEFAULT_BASE - -/* - * LDAPDELETE TOOL - */ - /* who to bind as */ -#define LDAPDELETE_BINDDN NULL -#define LDAPDELETE_BIND_CRED NULL - /* search base */ -#define LDAPDELETE_BASE DEFAULT_BASE - -/* - * LDAPMODRDN TOOL - */ - /* who to bind as */ -#define LDAPMODRDN_BINDDN NULL -#define LDAPMODRDN_BIND_CRED NULL - /* search base */ -#define LDAPMODRDN_BASE DEFAULT_BASE - -/* - * MAIL500 MAILER DEFINITIONS - */ - /* who to bind as */ -#define MAIL500_BINDDN NULL -#define MAIL500_BIND_CRED NULL - /* max number of ambiguous matches reported */ -#define MAIL500_MAXAMBIGUOUS 10 - /* max subscribers allowed (size limit when searching for them ) */ -#define MAIL500_MAXGROUPMEMBERS LDAP_NO_LIMIT - /* timeout for all searches */ -#define MAIL500_TIMEOUT 180 - /* sendmail location - mail500 needs to exec this */ -#define MAIL500_SENDMAIL "%SENDMAIL%" - -/* - * UD DEFINITIONS - */ - /* ud configuration file */ -#define UD_CONFIG_FILE "%SYSCONFDIR%/ud.conf" - /* default editor */ -#define UD_DEFAULT_EDITOR "%EDITOR%" - /* default bbasename of user config file */ -#define UD_USER_CONFIG_FILE ".udrc" - /* default user to bind as */ -#define UD_BINDDN NULL - /* default password to bind with */ -#define UD_BIND_CRED NULL - /* default search base */ -#define UD_BASE DEFAULT_BASE - /* default base where groups are created */ -#define UD_WHERE_GROUPS_ARE_CREATED "" - /* default base below which all groups live */ -#define UD_WHERE_ALL_GROUPS_LIVE "" - -/* - * FAX500 DEFINITIONS - */ - /* what to bind as */ -#define FAX_BINDDN NULL -#define FAX_BIND_CRED NULL - /* default search base */ -#define FAX_BASE DEFAULT_BASE - /* how long to wait for searches */ -#define FAX_TIMEOUT 180 - /* maximum number of ambiguous matches reported */ -#define FAX_MAXAMBIGUOUS 10 - /* maximum number of members allowed */ -#define FAX_MAXMEMBERS LDAP_NO_LIMIT - /* program to send mail */ -#define FAX_SENDMAIL "%SENDMAIL%" - -/* - * RP500 DEFINITIONS - */ - /* what to bind as */ -#define RP_BINDDN NULL -#define RP_BIND_CRED NULL - /* default search base */ -#define RP_BASE DEFAULT_BASE - - /* prefix to add to non-fully-qualified numbers */ -#define RP_PHONEPREFIX "" - -/* - * SLAPD DEFINITIONS - */ - /* location of the default slapd config file */ -#define SLAPD_DEFAULT_CONFIGFILE "%SYSCONFDIR%/slapd.conf" - /* default sizelimit on number of entries from a search */ -#define SLAPD_DEFAULT_SIZELIMIT 500 - /* default timelimit to spend on a search */ -#define SLAPD_DEFAULT_TIMELIMIT 3600 - /* location of the slapd pid file */ -#define SLAPD_PIDFILE "%RUNDIR%/slapd.pid" - /* location of the slapd args file */ -#define SLAPD_ARGSFILE "%RUNDIR%/slapd.args" - /* dn of the special "monitor" entry */ -#define SLAPD_MONITOR_DN "cn=monitor" - /* dn of the special "config" entry */ -#define SLAPD_CONFIG_DN "cn=config" - /* minimum max ids that a single index entry can map to in ldbm */ -#define SLAPD_LDBM_MIN_MAXIDS 4000 - -#endif /* _LDAP_CONFIG_H */ diff --git a/libraries/Make-template b/libraries/Make-template deleted file mode 100644 index 7f6c06df01..0000000000 --- a/libraries/Make-template +++ /dev/null @@ -1,86 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1994 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# LDAP libraries Makefile -# -#----------------------------------------------------------------------------- - -############################################################################ -# # -# You should not have to edit anything below this point # -# # -############################################################################ - -# -# rules to make the software -# - -all: FORCE - @echo "making all in `$(PWD)`" - @for i in *; do \ - if [ -d $$i -a $$i != "RCS" ]; then \ - echo; echo " cd $$i; $(MAKE) $(MFLAGS) all"; \ - ( cd $$i; $(MAKE) $(MFLAGS) all ); \ - fi; \ - done - - -# -# rules to install the software -# - -install: FORCE - @echo "making install in `$(PWD)`" - @for i in *; do \ - if [ -d $$i -a $$i != "RCS" ]; then \ - echo; echo " cd $$i; $(MAKE) $(MFLAGS) install"; \ - ( cd $$i; $(MAKE) $(MFLAGS) install ); \ - fi; \ - done - -# -# rules to make clean -# -clean: FORCE - @echo "making clean in `$(PWD)`" - @for i in *; do \ - if [ -d $$i -a $$i != "RCS" ]; then \ - echo; echo " cd $$i; $(MAKE) $(MFLAGS) clean"; \ - ( cd $$i; $(MAKE) $(MFLAGS) clean ); \ - fi; \ - done - -veryclean: clean - -# -# rules to make depend -# -# -depend: FORCE - @echo "making depend in `$(PWD)`" - @for i in *; do \ - if [ -d $$i -a $$i != "RCS" ]; then \ - echo; echo " cd $$i; $(MAKE) $(MFLAGS) depend"; \ - ( cd $$i; $(MAKE) $(MFLAGS) depend ); \ - fi; \ - done - -links: - @echo "making links in `$(PWD)`"; \ - for i in .src/*; do \ - if [ -d $$i -a $$i != ".src/RCS" ]; then \ - d=`basename $$i`; \ - ( $(MKDIR) $$d; cd $$d; $(LN) ../.src/$$d .src; \ - $(LN) ../.src/$$d/Make-template . ; \ - $(MAKE) $(MFLAGS) MKDIR="$(MKDIR)" LN="$(LN)" \ - -f Make-template links ) ; \ - fi; \ - done diff --git a/libraries/libavl/Make-template b/libraries/libavl/Make-template deleted file mode 100644 index 470737973d..0000000000 --- a/libraries/libavl/Make-template +++ /dev/null @@ -1,71 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1995 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# avl library makefile -# -#----------------------------------------------------------------------------- - -LDAPSRC = ../.. - -SRCS = avl.c -OBJS = avl.o - -HDIR = ../../include - -INCLUDES= -I$(HDIR) -DEFINES = $(DEFS) - -CFLAGS = $(INCLUDES) $(DEFINES) $(ACFLAGS) - -all: libavl.a - -libavl.a: version.o - $(AR) ruv $@ $(OBJS) version.o - @if [ ! -z "$(RANLIB)" ]; then \ - $(RANLIB) $@; \ - fi; \ - $(RM) ../$@; \ - $(LN) libavl/$@ ../$@ - -testavl: libavl.a testavl.o - $(CC) $(ALDFLAGS) -o $@ testavl.o -L. -lavl $(ALIBS) - -version.c: $(OBJS) - $(RM) $@ - (u=$${USER-root} v=`$(CAT) ../../build/version` d=`$(PWD)` \ - h=`$(HOSTNAME)` t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ - -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ - -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) - -install: all - -lint: FORCE - $(LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -5lint: FORCE - $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -clean: FORCE - $(RM) libavl.a ../libavl.a testavl *.o core a.out version.c - -depend: FORCE - $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS) - -links: - @$(LN) .src/*.[ch] . - -# DO NOT DELETE THIS LINE -- mkdep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -avl.o: avl.c ../../include/avl.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/libraries/liblber/Make-template b/libraries/liblber/Make-template deleted file mode 100644 index f1b9dd4f36..0000000000 --- a/libraries/liblber/Make-template +++ /dev/null @@ -1,85 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1990 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# lightweight ber library makefile -# -#----------------------------------------------------------------------------- - -LDAPSRC = ../.. -SRCS = decode.c encode.c io.c bprint.c -OBJS = decode.o encode.o io.o bprint.o - -HDIR = ../../include - -INCLUDES= -I$(HDIR) -DEFINES = $(DEFS) -CFLAGS = $(INCLUDES) $(DEFINES) $(ACFLAGS) - -all: liblber.a - -liblber.a: version.o - $(AR) ruv $@ $(OBJS) version.o - @if [ ! -z "$(RANLIB)" ]; then \ - $(RANLIB) $@; \ - fi; \ - $(RM) ../$@; \ - $(LN) liblber/$@ ../$@ - -idtest: idtest.o - $(CC) $(ALDFLAGS) -o $@ idtest.c $(ISODEINCLUDEFLAG) \ - $(KRBINCLUDEFLAG) $(ISODELIBFLAG) $(ISODELIBS) \ - $(KRBLIBLFAG) $(KRBLIBS) $(ALIBS) - -etest: liblber.a etest.o - $(CC) $(ALDFLAGS) -o $@ etest.o ./liblber.a $(ALIBS) - -dtest: liblber.a dtest.o - $(CC) $(ALDFLAGS) -o $@ dtest.o ./liblber.a $(ALIBS) - -version.c: $(OBJS) - $(RM) $@ - (u=$${USER-root} v=`$(CAT) ../../build/version` d=`$(PWD)` \ - h=`$(HOSTNAME)` t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ - -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ - -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) - -install: liblber.a FORCE - -$(MKDIR) -p $(LIBDIR) - $(INSTALL) $(INSTALLFLAGS) -m 644 liblber.a $(LIBDIR) - @if [ ! -z "$(RANLIB)" ]; then \ - (cd /tmp; $(RANLIB) $(LIBDIR)/liblber.a) \ - fi - -lint: FORCE - $(LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -5lint: FORCE - $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -clean: FORCE - $(RM) liblber.a ../liblber.a *.o core a.out version.c dtest etest idtest - -depend: FORCE - $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS) - -links: - @$(LN) .src/ldap* .src/*.[ch] . - -# DO NOT DELETE THIS LINE -- mkdep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -decode.o: decode.c ../../include/lber.h -encode.o: encode.c ../../include/lber.h -io.o: io.c ../../include/lber.h -bprint.o: bprint.c ../../include/lber.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/libraries/libldap/Make-template b/libraries/libldap/Make-template deleted file mode 100644 index 9ca5d7f234..0000000000 --- a/libraries/libldap/Make-template +++ /dev/null @@ -1,143 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1994 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# LDAP library makefile -# -#----------------------------------------------------------------------------- - -LDAPSRC = ../.. - -SRCS = bind.c open.c result.c error.c compare.c search.c \ - modify.c add.c modrdn.c delete.c abandon.c ufn.c cache.c \ - getfilter.c regex.c sbind.c kbind.c unbind.c friendly.c cldap.c \ - free.c disptmpl.c srchpref.c dsparse.c tmplout.c sort.c \ - getdn.c getentry.c getattr.c getvalues.c addentry.c \ - request.c getdxbyname.c os-ip.c url.c charset.c -OBJS = bind.o open.o result.o error.o compare.o search.o \ - modify.o add.o modrdn.o delete.o abandon.o ufn.o cache.o \ - getfilter.o regex.o sbind.o kbind.o unbind.o friendly.o cldap.o \ - free.o disptmpl.o srchpref.o dsparse.o tmplout.o sort.o \ - getdn.o getentry.o getattr.o getvalues.o addentry.o \ - request.o getdxbyname.o os-ip.o url.o charset.o - -HDIR = ../../include - -INCLUDES= -I$(HDIR) $(KRBINCLUDEFLAG) -DEFINES = $(DEFS) -DFILTERFILE="\"$(RUNTIMEETCDIR)/ldapfilter.conf\"" \ - -DTEMPLATEFILE="\"$(RUNTIMEETCDIR)/ldaptemplates.conf\"" - -CFLAGS = $(INCLUDES) $(DEFINES) $(ACFLAGS) -LIBS = -L. -L../liblber -lldap -llber $(KRBLIBFLAG) $(KRBLIBS) $(ALIBS) - -all: libldap.a ltest ttest - -libldap.a: version.o - $(AR) ruv $@ $(OBJS) version.o - @if [ ! -z "$(RANLIB)" ]; then \ - $(RANLIB) $@; \ - fi; \ - $(RM) ../$@; \ - $(LN) libldap/$@ ../$@ - -ltest: libldap.a test.o ../liblber/liblber.a - $(CC) $(ALDFLAGS) -o $@ test.o $(LIBS) - -ttest: libldap.a tmpltest.o ../liblber/liblber.a - $(CC) $(ALDFLAGS) -o $@ tmpltest.o $(LIBS) - -version.c: $(OBJS) - $(RM) $@ - (u=$${USER-root} v=`$(CAT) ../../build/version` d=`$(PWD)` \ - h=`$(HOSTNAME)` t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ - -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ - -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) - -install: libldap.a ldapfilter.conf ldapfriendly ldaptemplates.conf ldapsearchprefs.conf FORCE - -$(MKDIR) -p $(LIBDIR) - $(INSTALL) $(INSTALLFLAGS) -m 644 libldap.a $(LIBDIR) - @if [ ! -z "$(RANLIB)" ]; then \ - (cd /tmp; $(RANLIB) $(LIBDIR)/libldap.a) \ - fi - -$(MKDIR) -p $(ETCDIR) - -$(MV) $(ETCDIR)/ldapfriendly $(ETCDIR)/ldapfriendly- - $(INSTALL) $(INSTALLFLAGS) -m 644 ldapfriendly $(ETCDIR) - -$(MV) $(ETCDIR)/ldapfilter.conf $(ETCDIR)/ldapfilter.conf- - $(INSTALL) $(INSTALLFLAGS) -m 644 ldapfilter.conf $(ETCDIR) - -$(MV) $(ETCDIR)/ldaptemplates.conf $(ETCDIR)/ldaptemplates.conf- - $(INSTALL) $(INSTALLFLAGS) -m 644 ldaptemplates.conf $(ETCDIR) - -$(MV) $(ETCDIR)/ldapsearchprefs.conf $(ETCDIR)/ldapsearchprefs.conf- - $(INSTALL) $(INSTALLFLAGS) -m 644 ldapsearchprefs.conf $(ETCDIR) - -lint: FORCE - $(LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -5lint: FORCE - $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -clean: FORCE - $(RM) libldap.a ../libldap.a ltest ttest *.o core a.out *.log version.c - -depend: FORCE - $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS) - -links: - @$(LN) .src/*.[ch] .src/ldapfriendly .src/ldapfilter.conf \ - .src/ldaptemplates.conf .src/ldapsearchprefs.conf . - -# DO NOT DELETE THIS LINE -- mkdep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -bind.o: bind.c ../../include/lber.h ../../include/ldap.h -open.o: open.c ../../include/lber.h ../../include/ldap.h ldap-int.h -result.o: result.c ../../include/portable.h ../../include/lber.h -result.o: ../../include/ldap.h ldap-int.h -error.o: error.c ../../include/lber.h ../../include/ldap.h -compare.o: compare.c ../../include/lber.h ../../include/ldap.h ldap-int.h -search.o: search.c ../../include/lber.h ../../include/ldap.h ldap-int.h -modify.o: modify.c ../../include/lber.h ../../include/ldap.h ldap-int.h -add.o: add.c ../../include/lber.h ../../include/ldap.h ldap-int.h -modrdn.o: modrdn.c ../../include/lber.h ../../include/ldap.h ldap-int.h -delete.o: delete.c ../../include/lber.h ../../include/ldap.h ldap-int.h -abandon.o: abandon.c ../../include/lber.h ../../include/ldap.h ldap-int.h -ufn.o: ufn.c ../../include/lber.h ../../include/ldap.h -cache.o: cache.c ../../include/lber.h ../../include/ldap.h ldap-int.h -getfilter.o: getfilter.c ../../include/lber.h ../../include/ldap.h -getfilter.o: ../../include/regex.h -regex.o: regex.c ../../include/portable.h -sbind.o: sbind.c ../../include/lber.h ../../include/ldap.h ldap-int.h -kbind.o: kbind.c ../../include/lber.h ../../include/ldap.h ldap-int.h -unbind.o: unbind.c ../../include/lber.h ../../include/ldap.h ldap-int.h -friendly.o: friendly.c ../../include/lber.h ../../include/ldap.h -cldap.o: cldap.c ../../include/lber.h ../../include/ldap.h ldap-int.h -free.o: free.c ../../include/lber.h ../../include/ldap.h -disptmpl.o: disptmpl.c ../../include/lber.h ../../include/ldap.h -disptmpl.o: ../../include/disptmpl.h -srchpref.o: srchpref.c ../../include/lber.h ../../include/ldap.h -srchpref.o: ../../include/srchpref.h -dsparse.o: dsparse.c ../../include/lber.h ../../include/ldap.h -tmplout.o: tmplout.c ../../include/lber.h ../../include/ldap.h -tmplout.o: ../../include/disptmpl.h -sort.o: sort.c ../../include/lber.h ../../include/ldap.h -getdn.o: getdn.c ../../include/lber.h ../../include/ldap.h -getentry.o: getentry.c ../../include/lber.h ../../include/ldap.h -getattr.o: getattr.c ../../include/lber.h ../../include/ldap.h ldap-int.h -getvalues.o: getvalues.c ../../include/lber.h ../../include/ldap.h -addentry.o: addentry.c ../../include/lber.h ../../include/ldap.h -request.o: request.c ../../include/portable.h ../../include/lber.h -request.o: ../../include/ldap.h ldap-int.h -getdxbyname.o: getdxbyname.c -os-ip.o: os-ip.c ../../include/portable.h ../../include/lber.h -os-ip.o: ../../include/ldap.h -url.o: url.c ../../include/lber.h ../../include/ldap.h ldap-int.h -charset.o: charset.c - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/libraries/libldbm/Make-template b/libraries/libldbm/Make-template deleted file mode 100644 index 09ad2ee08f..0000000000 --- a/libraries/libldbm/Make-template +++ /dev/null @@ -1,71 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1995 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# avl library makefile -# -#----------------------------------------------------------------------------- - -LDAPSRC = ../.. - -SRCS = ldbm.c -OBJS = ldbm.o - -HDIR = ../../include - -INCLUDES= -I$(HDIR) -DEFINES = $(DEFS) - -CFLAGS = $(INCLUDES) $(DEFINES) $(ACFLAGS) - -all: libldbm.a - -libldbm.a: version.o - $(AR) ruv $@ $(OBJS) version.o - @if [ ! -z "$(RANLIB)" ]; then \ - $(RANLIB) $@; \ - fi; \ - $(RM) ../$@; \ - $(LN) libldbm/$@ ../$@ - -testldbm: libldbm.a testldbm.o - $(CC) $(ALDFLAGS) -o $@ testldbm.o -L. -lavl - -version.c: $(OBJS) - $(RM) $@ - (u=$${USER-root} v=`$(CAT) ../../build/version` d=`$(PWD)` \ - h=`$(HOSTNAME)` t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ - -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ - -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) - -install: all - -lint: FORCE - $(LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -5lint: FORCE - $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -clean: FORCE - $(RM) libldbm.a ../libldbm.a testldbm *.o core a.out version.c - -depend: FORCE - $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS) - -links: - @$(LN) .src/*.[ch] . - -# DO NOT DELETE THIS LINE -- mkdep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -ldbm.o: ldbm.c ../../include/ldbm.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/libraries/libldif/Make-template b/libraries/libldif/Make-template deleted file mode 100644 index 75061f7e5d..0000000000 --- a/libraries/libldif/Make-template +++ /dev/null @@ -1,69 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1996 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# ldif library makefile -# -#----------------------------------------------------------------------------- - -LDAPSRC = ../.. - -SRCS = line64.c -OBJS = line64.o - -HDIR = ../../include - -INCLUDES= -I$(HDIR) -DEFINES = $(DEFS) - -CFLAGS = $(INCLUDES) $(DEFINES) $(ACFLAGS) - -all: libldif.a - -libldif.a: version.o - $(AR) ruv $@ $(OBJS) version.o - @if [ ! -z "$(RANLIB)" ]; then \ - $(RANLIB) $@; \ - fi; \ - $(RM) ../$@; \ - $(LN) libldif/$@ ../$@ - -version.c: $(OBJS) - $(RM) $@ - (u=$${USER-root} v=`$(CAT) ../../build/version` d=`$(PWD)` \ - h=`$(HOSTNAME)` t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ - -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ - -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) - -install: all - -lint: FORCE - $(LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -5lint: FORCE - $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -clean: FORCE - $(RM) libldif.a ../libldif.a *.o core a.out version.c - -depend: FORCE - $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS) - -links: - @$(LN) .src/*.[ch] . - -# DO NOT DELETE THIS LINE -- mkdep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -line64.o: line64.c ../../include/lber.h ../../include/ldap.h -line64.o: ../../include/ldif.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/libraries/liblthread/Make-template b/libraries/liblthread/Make-template deleted file mode 100644 index 2344ba925c..0000000000 --- a/libraries/liblthread/Make-template +++ /dev/null @@ -1,69 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1995 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# lthreads library makefile -# -#----------------------------------------------------------------------------- - -LDAPSRC = ../.. - -SRCS = thread.c stack.c -OBJS = thread.o stack.o - -HDIR = ../../include - -INCLUDES= -I$(HDIR) -DEFINES = $(DEFS) $(THREADS) - -CFLAGS = $(INCLUDES) $(THREADSINCLUDE) $(DEFINES) $(ACFLAGS) - -all: liblthread.a - -liblthread.a: version.o - $(AR) ruv $@ $(OBJS) version.o - @if [ ! -z "$(RANLIB)" ]; then \ - $(RANLIB) $@; \ - fi; \ - $(RM) ../$@; \ - $(LN) liblthread/$@ ../$@ - -version.c: $(OBJS) - $(RM) $@ - (u=$${USER-root} v=`$(CAT) ../../build/version` d=`$(PWD)` \ - h=`$(HOSTNAME)` t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ - -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ - -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) - -install: all - -lint: FORCE - $(LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -5lint: FORCE - $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -clean: FORCE - $(RM) liblthread.a ../liblthread.a *.o core a.out version.c - -depend: FORCE - $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS) - -links: - @$(LN) .src/*.[ch] . - -# DO NOT DELETE THIS LINE -- mkdep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -thread.o: thread.c ../../include/lthread.h -stack.o: stack.c ../../include/lber.h ../../include/ldap.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/libraries/macintosh/Make-template b/libraries/macintosh/Make-template deleted file mode 100644 index 0bc9cb9b0b..0000000000 --- a/libraries/macintosh/Make-template +++ /dev/null @@ -1,48 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1994 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# LDAP libraries/macintosh Makefile -# -#----------------------------------------------------------------------------- - -############################################################################ -# # -# You should not have to edit anything below this point # -# # -############################################################################ - -# -# rules to make the software -# - -all: FORCE - -# -# rules to install the software -# - -install: all - -# -# rules to make clean -# - -clean: FORCE - -veryclean: clean - -# -# rules to make depend -# -# -depend: FORCE - -links: diff --git a/libraries/msdos/Make-template b/libraries/msdos/Make-template deleted file mode 100644 index 205e936f89..0000000000 --- a/libraries/msdos/Make-template +++ /dev/null @@ -1,48 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1994 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# LDAP libraries/msdos Makefile -# -#----------------------------------------------------------------------------- - -############################################################################ -# # -# You should not have to edit anything below this point # -# # -############################################################################ - -# -# rules to make the software -# - -all: FORCE - -# -# rules to install the software -# - -install: all - -# -# rules to make clean -# - -clean: FORCE - -veryclean: clean - -# -# rules to make depend -# -# -depend: FORCE - -links: diff --git a/libraries/vms/Make-template b/libraries/vms/Make-template deleted file mode 100644 index 2d7ef4e572..0000000000 --- a/libraries/vms/Make-template +++ /dev/null @@ -1,48 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1994 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# LDAP libraries/vms Makefile -# -#----------------------------------------------------------------------------- - -############################################################################ -# # -# You should not have to edit anything below this point # -# # -############################################################################ - -# -# rules to make the software -# - -all: FORCE - -# -# rules to install the software -# - -install: all - -# -# rules to make clean -# - -clean: FORCE - -veryclean: clean - -# -# rules to make depend -# -# -depend: FORCE - -links: diff --git a/servers/Make-template b/servers/Make-template deleted file mode 100644 index 39eb1240f1..0000000000 --- a/servers/Make-template +++ /dev/null @@ -1,88 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1994 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# LDAP servers Makefile -# -#----------------------------------------------------------------------------- - -############################################################################ -# # -# You should not have to edit anything below this point # -# # -############################################################################ - -# -# rules to make the software -# - -all: FORCE - @echo "making all in `$(PWD)`" - @for i in *; do \ - if [ -d $$i -a $$i != "RCS" ]; then \ - echo " cd $$i; $(MAKE) $(MFLAGS) all"; \ - ( cd $$i; $(MAKE) $(MFLAGS) all ); \ - fi; \ - done - - -# -# rules to install the software -# - -install: FORCE - @echo "making install in `$(PWD)`" - @for i in *; do \ - if [ -d $$i -a $$i != "RCS" ]; then \ - echo " cd $$i; $(MAKE) $(MFLAGS) install"; \ - ( cd $$i; $(MAKE) $(MFLAGS) install ); \ - fi; \ - done - -# -# rules to make clean -# - -clean: FORCE - @echo "making clean in `$(PWD)`" - @for i in *; do \ - if [ -d $$i -a $$i != "RCS" ]; then \ - echo " cd $$i; $(MAKE) $(MFLAGS) clean"; \ - ( cd $$i; $(MAKE) $(MFLAGS) clean ); \ - fi; \ - done - -veryclean: clean - -# -# rules to make depend -# -# - -depend: FORCE - @echo "making depend in `$(PWD)`" - @for i in *; do \ - if [ -d $$i -a $$i != "RCS" ]; then \ - echo " cd $$i; $(MAKE) $(MFLAGS) depend"; \ - ( cd $$i; $(MAKE) $(MFLAGS) depend ); \ - fi; \ - done - -links: - @echo "making links in `$(PWD)`"; \ - for i in .src/*; do \ - if [ -d $$i -a $$i != ".src/RCS" ]; then \ - d=`basename $$i`; \ - ( $(MKDIR) $$d; cd $$d; $(LN) ../.src/$$d .src; \ - $(LN) ../.src/$$d/Make-template . ; \ - $(MAKE) $(MFLAGS) MKDIR="$(MKDIR)" LN="$(LN)" \ - -f Make-template links ) ; \ - fi; \ - done diff --git a/servers/ldapd/Make-template b/servers/ldapd/Make-template deleted file mode 100644 index f8781c5323..0000000000 --- a/servers/ldapd/Make-template +++ /dev/null @@ -1,122 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1990 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# LDAP server daemon makefile -# -#----------------------------------------------------------------------------- -LDAPSRC = ../.. -HDIR = $(LDAPSRC)/include -LDIR = $(LDAPSRC)/libraries -VERSIONFILE = $(LDAPSRC)/build/version - -SRCS = main.c detach.c setproctitle.c request.c bind.c result.c error.c \ - search.c util.c compare.c message.c add.c delete.c modrdn.c modify.c \ - abandon.c syntax.c association.c kerberos.c certificate.c -OBJS = main.o detach.o setproctitle.o request.o bind.o result.o error.o \ - search.o util.o compare.o message.o add.o delete.o modrdn.o modify.o \ - abandon.o syntax.o association.o kerberos.o LDAP_tables.o \ - certificate.o - -INCLUDES= -I. -I$(HDIR) $(ISODEINCLUDEFLAG) $(KRBINCLUDEFLAG) -DEFINES = $(DEFS) $(SERVERDEFS) -CFLAGS = $(INCLUDES) $(DEFINES) $(ACFLAGS) -LDFLAGS = -L$(LDIR) $(ISODELIBFLAG) $(KRBLIBFLAG) -LIBS = -llber $(ISODELIBS) $(KRBLIBS) $(ALIBS) - -all: FORCE - @if [ "$(HAVEISODE)" = "yes" ]; then \ - $(MAKE) $(MFLAGS) CC=$(CC) ldapd; \ - else \ - echo "uncomment the HAVEISODE=yes line in the Make-common file to build ldapd"; \ - fi - - -ldapd: version.o - $(CC) $(ALDFLAGS) -o $@ $(OBJS) version.o $(LDFLAGS) $(LIBS) - -sldapd: version.o - $(CC) $(ALDFLAGS) -static -o $@ $(OBJS) version.o $(LDFLAGS) $(LIBS) -lresolv - -version.c: $(OBJS) $(LDIR)/liblber/liblber.a - $(RM) $@ - (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ - t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ - -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ - -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) - -request.o: LDAP-types.h - -LDAP_tables.c: ldap.py - @if [ ! -z "$(PEPSY)" ]; then \ - $(PEPSY) -A ldap.py; \ - else \ - touch LDAP_tables.c LDAP-types.h; \ - fi - -LDAP-types.h: LDAP_tables.c - -install: FORCE - @if [ "$(HAVEISODE)" = "yes" ]; then \ - $(MAKE) $(MFLAGS) CC=$(CC) install-ldapd; \ - else \ - echo "uncomment the HAVEISODE=yes line in the Make-common file to build and install ldapd"; \ - fi - -install-ldapd: $(ETCDIR) $(ETCDIR)/ldapd - -$(ETCDIR)/ldapd: ldapd - $(INSTALL) $(INSTALLFLAGS) -m 755 ldapd $(ETCDIR) - -lint: FORCE - $(LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -5lint: FORCE - $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -clean: FORCE - $(RM) ldapd sldapd *.o core a.out version.c LDAP* - -depend: FORCE - @if [ ! -z "$(HAVEISODE)" ]; then \ - $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS); \ - else \ - echo "uncomment the HAVEISODE=yes line in the Make-common file to build ldapd"; \ - fi - -links: - @$(LN) .src/*.py .src/*.[ch] . -# DO NOT DELETE THIS LINE -- mkdep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -main.o: main.c ../../include/portable.h ../../include/lber.h -main.o: ../../include/ldap.h common.h -detach.o: detach.c ../../include/portable.h -setproctitle.o: setproctitle.c -request.o: request.c ../../include/lber.h ../../include/ldap.h common.h -bind.o: bind.c ../../include/lber.h ../../include/ldap.h common.h -result.o: result.c ../../include/lber.h ../../include/ldap.h common.h -error.o: error.c ../../include/lber.h ../../include/ldap.h -search.o: search.c ../../include/lber.h ../../include/ldap.h common.h -util.o: util.c ../../include/lber.h ../../include/ldap.h common.h -compare.o: compare.c ../../include/lber.h ../../include/ldap.h common.h -message.o: message.c ../../include/lber.h ../../include/ldap.h common.h -add.o: add.c ../../include/lber.h ../../include/ldap.h common.h -delete.o: delete.c ../../include/lber.h ../../include/ldap.h common.h -modrdn.o: modrdn.c ../../include/lber.h ../../include/ldap.h common.h -modify.o: modify.c ../../include/lber.h ../../include/ldap.h common.h -abandon.o: abandon.c ../../include/lber.h ../../include/ldap.h common.h -syntax.o: syntax.c ../../include/lber.h ../../include/ldap.h common.h -association.o: association.c ../../include/lber.h ../../include/ldap.h common.h -kerberos.o: kerberos.c ../../include/lber.h ../../include/ldap.h common.h -certificate.o: certificate.c ../../include/lber.h ../../include/ldap.h common.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/servers/slapd/Make-template b/servers/slapd/Make-template deleted file mode 100644 index d3a5f49884..0000000000 --- a/servers/slapd/Make-template +++ /dev/null @@ -1,266 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1995 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# Stand alone LDAP server daemon makefile -# -#----------------------------------------------------------------------------- -LDAPSRC = ../.. -HDIR = $(LDAPSRC)/include -LDIR = $(LDAPSRC)/libraries -VERSIONFILE = $(LDAPSRC)/build/version - -SRCS = main.c daemon.c connection.c search.c filter.c add.c charray.c \ - attr.c entry.c config.c backend.c result.c operation.c \ - dn.c compare.c modify.c delete.c modrdn.c ch_malloc.c \ - value.c ava.c bind.c unbind.c abandon.c filterentry.c \ - phonetic.c regex.c acl.c str2filter.c aclparse.c init.c \ - detach.c strdup.c tempnam.c repl.c lock.c \ - schema.c schemaparse.c monitor.c configinfo.c -OBJS = main.o daemon.o connection.o search.o filter.o add.o charray.o \ - attr.o entry.o config.o backend.o result.o operation.o \ - dn.o compare.o modify.o delete.o modrdn.o ch_malloc.o \ - value.o ava.o bind.o unbind.o abandon.o filterentry.o \ - phonetic.o regex.o acl.o str2filter.o aclparse.o init.o \ - detach.o strdup.o tempnam.o repl.o lock.o \ - schema.o schemaparse.o monitor.o configinfo.o - -INCLUDES= -I. -I$(HDIR) $(KRBINCLUDEFLAG) -DEFINES = $(DEFS) $(SERVERDEFS) -CFLAGS = $(INCLUDES) $(THREADSINCLUDE) $(DEFINES) $(ACFLAGS) $(THREADS) -LDFLAGS = -L$(LDIR) $(KRBLIBFLAG) -LIBS = $(KRBLIBS) -llber -lldbm -lavl -llthread -lldif $(THREADSLIB) \ - $(LDBMLIB) $(ALIBS) - -all: FORCE - @if [ -z "$(MAKESLAPD)" ]; then \ - echo "uncomment the MAKESLAPD line in Make-common to make slapd"; \ - exit 0; \ - else \ - echo; \ - $(MAKE) $(MFLAGS) backendslib; \ - $(MAKE) $(MFLAGS) slapd; \ - (cd tools; $(MAKE) $(MFLAGS) all); \ - fi - -backendslib: FORCE - @for i in back-*; do \ - if [ -d $$i ]; then \ - echo; echo " cd $$i; $(MAKE) $(MFLAGS) all"; \ - ( cd $$i; $(MAKE) $(MFLAGS) all ); \ - fi; \ - done; \ - echo; \ - $(MAKE) $(MFLAGS) libbackends.a - -libbackends.a: .backend - @$(RM) -r tmp - @$(MKDIR) tmp - @-for i in back-*/*.a; do \ - ( \ - cd tmp; \ - $(AR) x ../$$i; \ - pre=`echo $$i | sed -e 's/\/.*$$//' -e 's/back-//'`; \ - for j in *.o; do \ - mv $$j $${pre}$$j; \ - done; \ - $(AR) ruv libbackends.a *.o 2>&1 | grep -v truncated; \ - $(RM) *.o __.SYMDEF; \ - echo "added backend library $$i"; \ - ); \ - done - @mv -f tmp/libbackends.a ./libbackends.a - @$(RM) -r tmp - @if [ ! -z "$(RANLIB)" ]; then \ - $(RANLIB) libbackends.a; \ - fi - @ls -l libbackends.a - -slapd: version.o - $(CC) $(ALDFLAGS) -o slapd $(OBJS) version.o libbackends.a \ - $(LDFLAGS) $(LIBS) -slapd.pure: version.o - purify $(CC) $(ALDFLAGS) -o slapd.pure $(OBJS) version.o libbackends.a \ - $(LDFLAGS) $(LIBS) - -version.c: libbackends.a $(OBJS) $(LDIR)/liblber/liblber.a \ - $(LDIR)/libldbm/libldbm.a $(LDIR)/liblthread/liblthread.a \ - $(LDIR)/libavl/libavl.a $(LDIR)/libldif/libldif.a - $(RM) $@ - (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ - t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ - -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ - -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) - -install: all $(ETCDIR) $(ETCDIR)/slapd $(ETCDIR)/slapd.conf \ - $(ETCDIR)/slapd.at.conf $(ETCDIR)/slapd.oc.conf \ - install-tools - -$(ETCDIR)/slapd: slapd - $(INSTALL) $(INSTALLFLAGS) -m 755 slapd $(ETCDIR) - -$(ETCDIR)/slapd.conf: slapd.conf - $(SED) -e 's;%ETCDIR%;$(RUNTIMEETCDIR);' slapd.conf > /tmp/slapd.$$ - -$(MV) $(ETCDIR)/slapd.conf $(ETCDIR)/slapd.conf- - $(INSTALL) $(INSTALLFLAGS) -m 644 /tmp/slapd.$$ $(ETCDIR)/slapd.conf - $(RM) -f /tmp/slapd.$$ - -$(ETCDIR)/slapd.at.conf: slapd.at.conf - -$(MV) $(ETCDIR)/slapd.at.conf $(ETCDIR)/slapd.at.conf- - $(INSTALL) $(INSTALLFLAGS) -m 644 slapd.at.conf $(ETCDIR) - -$(ETCDIR)/slapd.oc.conf: slapd.oc.conf - -$(MV) $(ETCDIR)/slapd.oc.conf $(ETCDIR)/slapd.oc.conf- - $(INSTALL) $(INSTALLFLAGS) -m 644 slapd.oc.conf $(ETCDIR) - -install-tools: FORCE - (cd tools; $(MAKE) $(MFLAGS) install) - -lint: FORCE - $(LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -5lint: FORCE - $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -clean: FORCE - @echo "making clean in `$(PWD)`" - $(RM) slapd slapd.pure *.o core a.out version.c libbackends.a .backend - @for i in back-* tools; do \ - if [ -d $$i -a $$i != "RCS" ]; then \ - echo; echo " cd $$i; $(MAKE) $(MFLAGS) clean"; \ - ( cd $$i; $(MAKE) $(MFLAGS) clean ); \ - fi; \ - done - -depend: FORCE - $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS) - @for i in back-* tools; do \ - if [ -d $$i -a $$i != "RCS" ]; then \ - echo; echo " cd $$i; $(MAKE) $(MFLAGS) depend"; \ - ( cd $$i; $(MAKE) $(MFLAGS) depend ); \ - fi; \ - done - - -links: - @echo "making links in `$(PWD)`" - @$(LN) .src/*.[ch] .src/*.conf . - @touch .backend - @for i in .src/back-* .src/tools; do \ - if [ -d $$i -a $$i != ".src/RCS" ]; then \ - d=`basename $$i`; \ - ( $(MKDIR) $$d; cd $$d; $(LN) ../.src/$$d .src; \ - $(LN) ../.src/$$d/Make-template . ; \ - $(MAKE) $(MFLAGS) MKDIR="$(MKDIR)" LN="$(LN)" \ - -f Make-template links ) ; \ - fi; \ - done; - - -# DO NOT DELETE THIS LINE -- mkdep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -main.o: main.c ../../include/portable.h slap.h ../../include/avl.h -main.o: ../../include/lber.h ../../include/ldap.h ../../include/lthread.h -main.o: ../../include/ldif.h ../../include/ldapconfig.h -daemon.o: daemon.c slap.h ../../include/avl.h ../../include/lber.h -daemon.o: ../../include/ldap.h ../../include/lthread.h ../../include/ldif.h -daemon.o: ../../include/portable.h ../../include/ldapconfig.h -connection.o: connection.c ../../include/portable.h slap.h ../../include/avl.h -connection.o: ../../include/lber.h ../../include/ldap.h ../../include/lthread.h -connection.o: ../../include/ldif.h -search.o: search.c slap.h ../../include/avl.h ../../include/lber.h -search.o: ../../include/ldap.h ../../include/lthread.h ../../include/ldif.h -search.o: ../../include/ldapconfig.h -filter.o: filter.c slap.h ../../include/avl.h ../../include/lber.h -filter.o: ../../include/ldap.h ../../include/lthread.h ../../include/ldif.h -add.o: add.c slap.h ../../include/avl.h ../../include/lber.h -add.o: ../../include/ldap.h ../../include/lthread.h ../../include/ldif.h -charray.o: charray.c slap.h ../../include/avl.h ../../include/lber.h -charray.o: ../../include/ldap.h ../../include/lthread.h ../../include/ldif.h -attr.o: attr.c ../../include/portable.h slap.h ../../include/avl.h -attr.o: ../../include/lber.h ../../include/ldap.h ../../include/lthread.h -attr.o: ../../include/ldif.h -entry.o: entry.c slap.h ../../include/avl.h ../../include/lber.h -entry.o: ../../include/ldap.h ../../include/lthread.h ../../include/ldif.h -config.o: config.c slap.h ../../include/avl.h ../../include/lber.h -config.o: ../../include/ldap.h ../../include/lthread.h ../../include/ldif.h -config.o: ../../include/ldapconfig.h -backend.o: backend.c slap.h ../../include/avl.h ../../include/lber.h -backend.o: ../../include/ldap.h ../../include/lthread.h ../../include/ldif.h -result.o: result.c ../../include/portable.h slap.h ../../include/avl.h -result.o: ../../include/lber.h ../../include/ldap.h ../../include/lthread.h -result.o: ../../include/ldif.h -operation.o: operation.c slap.h ../../include/avl.h ../../include/lber.h -operation.o: ../../include/ldap.h ../../include/lthread.h ../../include/ldif.h -dn.o: dn.c ../../include/portable.h slap.h ../../include/avl.h -dn.o: ../../include/lber.h ../../include/ldap.h ../../include/lthread.h -dn.o: ../../include/ldif.h -compare.o: compare.c slap.h ../../include/avl.h ../../include/lber.h -compare.o: ../../include/ldap.h ../../include/lthread.h ../../include/ldif.h -modify.o: modify.c slap.h ../../include/avl.h ../../include/lber.h -modify.o: ../../include/ldap.h ../../include/lthread.h ../../include/ldif.h -delete.o: delete.c slap.h ../../include/avl.h ../../include/lber.h -delete.o: ../../include/ldap.h ../../include/lthread.h ../../include/ldif.h -modrdn.o: modrdn.c slap.h ../../include/avl.h ../../include/lber.h -modrdn.o: ../../include/ldap.h ../../include/lthread.h ../../include/ldif.h -ch_malloc.o: ch_malloc.c slap.h ../../include/avl.h ../../include/lber.h -ch_malloc.o: ../../include/ldap.h ../../include/lthread.h ../../include/ldif.h -value.o: value.c ../../include/portable.h slap.h ../../include/avl.h -value.o: ../../include/lber.h ../../include/ldap.h ../../include/lthread.h -value.o: ../../include/ldif.h -ava.o: ava.c slap.h ../../include/avl.h ../../include/lber.h -ava.o: ../../include/ldap.h ../../include/lthread.h ../../include/ldif.h -bind.o: bind.c slap.h ../../include/avl.h ../../include/lber.h -bind.o: ../../include/ldap.h ../../include/lthread.h ../../include/ldif.h -unbind.o: unbind.c slap.h ../../include/avl.h ../../include/lber.h -unbind.o: ../../include/ldap.h ../../include/lthread.h ../../include/ldif.h -abandon.o: abandon.c slap.h ../../include/avl.h ../../include/lber.h -abandon.o: ../../include/ldap.h ../../include/lthread.h ../../include/ldif.h -filterentry.o: filterentry.c ../../include/regex.h slap.h ../../include/avl.h -filterentry.o: ../../include/lber.h ../../include/ldap.h -filterentry.o: ../../include/lthread.h ../../include/ldif.h -phonetic.o: phonetic.c ../../include/portable.h slap.h ../../include/avl.h -phonetic.o: ../../include/lber.h ../../include/ldap.h ../../include/lthread.h -phonetic.o: ../../include/ldif.h -regex.o: regex.c ../../include/portable.h -acl.o: acl.c ../../include/regex.h slap.h ../../include/avl.h -acl.o: ../../include/lber.h ../../include/ldap.h ../../include/lthread.h -acl.o: ../../include/ldif.h -str2filter.o: str2filter.c slap.h ../../include/avl.h ../../include/lber.h -str2filter.o: ../../include/ldap.h ../../include/lthread.h ../../include/ldif.h -aclparse.o: aclparse.c ../../include/regex.h slap.h ../../include/avl.h -aclparse.o: ../../include/lber.h ../../include/ldap.h ../../include/lthread.h -aclparse.o: ../../include/ldif.h ../../include/portable.h -init.o: init.c ../../include/portable.h slap.h ../../include/avl.h -init.o: ../../include/lber.h ../../include/ldap.h ../../include/lthread.h -init.o: ../../include/ldif.h -detach.o: detach.c ../../include/portable.h -strdup.o: strdup.c -tempnam.o: tempnam.c -repl.o: repl.c slap.h ../../include/avl.h ../../include/lber.h -repl.o: ../../include/ldap.h ../../include/lthread.h ../../include/ldif.h -lock.o: lock.c ../../include/portable.h slap.h ../../include/avl.h -lock.o: ../../include/lber.h ../../include/ldap.h ../../include/lthread.h -lock.o: ../../include/ldif.h -schema.o: schema.c slap.h ../../include/avl.h ../../include/lber.h -schema.o: ../../include/ldap.h ../../include/lthread.h ../../include/ldif.h -schemaparse.o: schemaparse.c slap.h ../../include/avl.h ../../include/lber.h -schemaparse.o: ../../include/ldap.h ../../include/lthread.h -schemaparse.o: ../../include/ldif.h -monitor.o: monitor.c slap.h ../../include/avl.h ../../include/lber.h -monitor.o: ../../include/ldap.h ../../include/lthread.h ../../include/ldif.h -monitor.o: ../../include/ldapconfig.h -configinfo.o: configinfo.c slap.h ../../include/avl.h ../../include/lber.h -configinfo.o: ../../include/ldap.h ../../include/lthread.h ../../include/ldif.h -configinfo.o: ../../include/ldapconfig.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/servers/slapd/back-ldbm/Make-template b/servers/slapd/back-ldbm/Make-template deleted file mode 100644 index 51ef7a8171..0000000000 --- a/servers/slapd/back-ldbm/Make-template +++ /dev/null @@ -1,148 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1995 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# ldbm backend to stand-alone LDAP server makefile -# -#----------------------------------------------------------------------------- -LDAPSRC = ../../.. -HDIR = $(LDAPSRC)/include -LDIR = $(LDAPSRC)/libraries -VERSIONFILE = $(LDAPSRC)/build/version - -SRCS = idl.c add.c search.c cache.c dbcache.c dn2id.c id2entry.c \ - index.c id2children.c nextid.c abandon.c compare.c \ - modify.c modrdn.c delete.c init.c config.c bind.c attr.c \ - filterindex.c unbind.c kerberos.c close.c -OBJS = idl.o add.o search.o cache.o dbcache.o dn2id.o id2entry.o \ - index.o id2children.o nextid.o abandon.o compare.o \ - modify.o modrdn.o delete.o init.o config.o bind.o attr.o \ - filterindex.o unbind.o kerberos.o close.o - -INCLUDES= -I. -I.. -I$(HDIR) $(KRBINCLUDEFLAG) -DEFINES = $(DEFS) $(THREADS) -CFLAGS = $(INCLUDES) $(THREADSINCLUDE) $(DEFINES) $(ACFLAGS) -LDFLAGS = -L$(LDIR) $(KRBLIBFLAG) - -all: FORCE - -@echo "$(SLAPD_BACKENDS)" | grep LDAP_LDBM 2>&1 > /dev/null; \ - if [ $$? = 0 ]; then \ - $(MAKE) $(MFLAGS) CC=$(CC) libback-ldbm.a; \ - else \ - echo "Include -DLDAP_LDBM in SLAPD_BACKENDS in the"; \ - echo "Make-common file to build the ldbm backend"; \ - fi - -libback-ldbm.a: version.o - $(AR) ruv $@ $(OBJS) version.o - @if [ ! -z "$(RANLIB)" ]; then \ - $(RANLIB) $@; \ - fi - @touch ../.backend - -version.c: $(OBJS) - $(RM) $@ - (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ - t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ - -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ - -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) - -lint: FORCE - $(LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -5lint: FORCE - $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -clean: FORCE - $(RM) libback-ldbm.a *.o core a.out version.c - -depend: FORCE - $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS) - -links: - @$(LN) .src/*.[ch] . -# DO NOT DELETE THIS LINE -- mkdep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -idl.o: idl.c ../slap.h ../../../include/avl.h ../../../include/lber.h -idl.o: ../../../include/ldap.h ../../../include/lthread.h -idl.o: ../../../include/ldif.h ../../../include/ldapconfig.h back-ldbm.h -idl.o: ../../../include/ldbm.h -add.o: add.c ../slap.h ../../../include/avl.h ../../../include/lber.h -add.o: ../../../include/ldap.h ../../../include/lthread.h -add.o: ../../../include/ldif.h back-ldbm.h ../../../include/ldbm.h -search.o: search.c ../slap.h ../../../include/avl.h ../../../include/lber.h -search.o: ../../../include/ldap.h ../../../include/lthread.h -search.o: ../../../include/ldif.h back-ldbm.h ../../../include/ldbm.h -cache.o: cache.c ../slap.h ../../../include/avl.h ../../../include/lber.h -cache.o: ../../../include/ldap.h ../../../include/lthread.h -cache.o: ../../../include/ldif.h back-ldbm.h ../../../include/ldbm.h -dbcache.o: dbcache.c ../../../include/portable.h ../slap.h -dbcache.o: ../../../include/avl.h ../../../include/lber.h -dbcache.o: ../../../include/ldap.h ../../../include/lthread.h -dbcache.o: ../../../include/ldif.h ../../../include/ldapconfig.h back-ldbm.h -dbcache.o: ../../../include/ldbm.h -dn2id.o: dn2id.c ../slap.h ../../../include/avl.h ../../../include/lber.h -dn2id.o: ../../../include/ldap.h ../../../include/lthread.h -dn2id.o: ../../../include/ldif.h back-ldbm.h ../../../include/ldbm.h -id2entry.o: id2entry.c ../slap.h ../../../include/avl.h ../../../include/lber.h -id2entry.o: ../../../include/ldap.h ../../../include/lthread.h -id2entry.o: ../../../include/ldif.h back-ldbm.h ../../../include/ldbm.h -index.o: index.c ../slap.h ../../../include/avl.h ../../../include/lber.h -index.o: ../../../include/ldap.h ../../../include/lthread.h -index.o: ../../../include/ldif.h back-ldbm.h ../../../include/ldbm.h -id2children.o: id2children.c ../slap.h ../../../include/avl.h -id2children.o: ../../../include/lber.h ../../../include/ldap.h -id2children.o: ../../../include/lthread.h ../../../include/ldif.h back-ldbm.h -id2children.o: ../../../include/ldbm.h -nextid.o: nextid.c ../slap.h ../../../include/avl.h ../../../include/lber.h -nextid.o: ../../../include/ldap.h ../../../include/lthread.h -nextid.o: ../../../include/ldif.h back-ldbm.h ../../../include/ldbm.h -abandon.o: abandon.c -compare.o: compare.c ../slap.h ../../../include/avl.h ../../../include/lber.h -compare.o: ../../../include/ldap.h ../../../include/lthread.h -compare.o: ../../../include/ldif.h back-ldbm.h ../../../include/ldbm.h -modify.o: modify.c ../slap.h ../../../include/avl.h ../../../include/lber.h -modify.o: ../../../include/ldap.h ../../../include/lthread.h -modify.o: ../../../include/ldif.h back-ldbm.h ../../../include/ldbm.h -modrdn.o: modrdn.c ../slap.h ../../../include/avl.h ../../../include/lber.h -modrdn.o: ../../../include/ldap.h ../../../include/lthread.h -modrdn.o: ../../../include/ldif.h back-ldbm.h ../../../include/ldbm.h -delete.o: delete.c ../slap.h ../../../include/avl.h ../../../include/lber.h -delete.o: ../../../include/ldap.h ../../../include/lthread.h -delete.o: ../../../include/ldif.h back-ldbm.h ../../../include/ldbm.h -init.o: init.c ../slap.h ../../../include/avl.h ../../../include/lber.h -init.o: ../../../include/ldap.h ../../../include/lthread.h -init.o: ../../../include/ldif.h back-ldbm.h ../../../include/ldbm.h -config.o: config.c ../slap.h ../../../include/avl.h ../../../include/lber.h -config.o: ../../../include/ldap.h ../../../include/lthread.h -config.o: ../../../include/ldif.h back-ldbm.h ../../../include/ldbm.h -bind.o: bind.c ../slap.h ../../../include/avl.h ../../../include/lber.h -bind.o: ../../../include/ldap.h ../../../include/lthread.h -bind.o: ../../../include/ldif.h back-ldbm.h ../../../include/ldbm.h -attr.o: attr.c ../slap.h ../../../include/avl.h ../../../include/lber.h -attr.o: ../../../include/ldap.h ../../../include/lthread.h -attr.o: ../../../include/ldif.h back-ldbm.h ../../../include/ldbm.h -filterindex.o: filterindex.c ../slap.h ../../../include/avl.h -filterindex.o: ../../../include/lber.h ../../../include/ldap.h -filterindex.o: ../../../include/lthread.h ../../../include/ldif.h back-ldbm.h -filterindex.o: ../../../include/ldbm.h -unbind.o: unbind.c ../slap.h ../../../include/avl.h ../../../include/lber.h -unbind.o: ../../../include/ldap.h ../../../include/lthread.h -unbind.o: ../../../include/ldif.h -kerberos.o: kerberos.c ../slap.h ../../../include/avl.h ../../../include/lber.h -kerberos.o: ../../../include/ldap.h ../../../include/lthread.h -kerberos.o: ../../../include/ldif.h back-ldbm.h ../../../include/ldbm.h -close.o: close.c ../slap.h ../../../include/avl.h ../../../include/lber.h -close.o: ../../../include/ldap.h ../../../include/lthread.h -close.o: ../../../include/ldif.h back-ldbm.h ../../../include/ldbm.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/servers/slapd/back-passwd/Make-template b/servers/slapd/back-passwd/Make-template deleted file mode 100644 index 39ea8c292e..0000000000 --- a/servers/slapd/back-passwd/Make-template +++ /dev/null @@ -1,78 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1995 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# /etc/passwd file backend to stand-alone LDAP server makefile -# -#----------------------------------------------------------------------------- -LDAPSRC = ../../.. -HDIR = $(LDAPSRC)/include -LDIR = $(LDAPSRC)/libraries -VERSIONFILE = $(LDAPSRC)/build/version - -SRCS = search.c config.c -OBJS = search.o config.o - -INCLUDES= -I. -I.. -I$(HDIR) -DEFINES = $(DEFS) $(THREADS) -CFLAGS = $(INCLUDES) $(THREADSINCLUDE) $(DEFINES) $(ACFLAGS) - -all: FORCE - -@echo "$(SLAPD_BACKENDS)" | grep LDAP_PASSWD 2>&1 > /dev/null; \ - if [ $$? = 0 ]; then \ - $(MAKE) $(MFLAGS) CC=$(CC) libback-passwd.a; \ - else \ - echo "Include -DLDAP_PASSWD in SLAPD_BACKENDS in the"; \ - echo "Make-common file to build the passwd backend"; \ - fi - - -libback-passwd.a: version.o - $(AR) ruv $@ $(OBJS) version.o - @if [ ! -z "$(RANLIB)" ]; then \ - $(RANLIB) $@; \ - fi - @touch ../.backend - -version.c: $(OBJS) - $(RM) $@ - (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ - t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ - -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ - -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) - -install: FORCE - -lint: FORCE - $(LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -5lint: FORCE - $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -clean: FORCE - $(RM) libback-passwd.a *.o core a.out version.c - -depend: FORCE - $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS) - -links: - @$(LN) .src/*.[ch] . -# DO NOT DELETE THIS LINE -- mkdep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -search.o: search.c ../../../include/portable.h ../slap.h ../../../include/avl.h -search.o: ../../../include/lber.h ../../../include/ldap.h -search.o: ../../../include/lthread.h ../../../include/ldif.h -config.o: config.c ../../../include/portable.h ../slap.h ../../../include/avl.h -config.o: ../../../include/lber.h ../../../include/ldap.h -config.o: ../../../include/lthread.h ../../../include/ldif.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/servers/slapd/back-shell/Make-template b/servers/slapd/back-shell/Make-template deleted file mode 100644 index 1eb631b57e..0000000000 --- a/servers/slapd/back-shell/Make-template +++ /dev/null @@ -1,113 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1995 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# shell backend to stand-alone LDAP server makefile -# -#----------------------------------------------------------------------------- -LDAPSRC = ../../.. -HDIR = $(LDAPSRC)/include -LDIR = $(LDAPSRC)/libraries -VERSIONFILE = $(LDAPSRC)/build/version - -SRCS = init.c config.c fork.c search.c bind.c unbind.c add.c delete.c \ - modify.c modrdn.c compare.c abandon.c result.c -OBJS = init.o config.o fork.o search.o bind.o unbind.o add.o delete.o \ - modify.o modrdn.o compare.o abandon.o result.o - -INCLUDES= -I. -I.. -I$(HDIR) -DEFINES = $(DEFS) $(THREADS) -CFLAGS = $(INCLUDES) $(THREADSINCLUDE) $(DEFINES) $(ACFLAGS) - -all: FORCE - -@echo "$(SLAPD_BACKENDS)" | grep LDAP_SHELL 2>&1 > /dev/null; \ - if [ $$? = 0 ]; then \ - $(MAKE) $(MFLAGS) CC=$(CC) libback-shell.a; \ - else \ - echo "Include -DLDAP_SHELL in SLAPD_BACKENDS in the"; \ - echo "Make-common file to build the shell backend"; \ - fi - - -libback-shell.a: version.o - $(AR) ruv $@ $(OBJS) version.o - @if [ ! -z "$(RANLIB)" ]; then \ - $(RANLIB) $@; \ - fi - @touch ../.backend - -version.c: $(OBJS) - $(RM) $@ - (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ - t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ - -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ - -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) - -install: FORCE - -lint: FORCE - $(LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -5lint: FORCE - $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -clean: FORCE - $(RM) libback-shell.a *.o core a.out version.c - -depend: FORCE - $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS) - -links: - @$(LN) .src/*.[ch] . -# DO NOT DELETE THIS LINE -- mkdep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -init.o: init.c ../slap.h ../../../include/avl.h ../../../include/lber.h -init.o: ../../../include/ldap.h ../../../include/lthread.h -init.o: ../../../include/ldif.h shell.h -config.o: config.c ../slap.h ../../../include/avl.h ../../../include/lber.h -config.o: ../../../include/ldap.h ../../../include/lthread.h -config.o: ../../../include/ldif.h shell.h -fork.o: fork.c ../slap.h ../../../include/avl.h ../../../include/lber.h -fork.o: ../../../include/ldap.h ../../../include/lthread.h -fork.o: ../../../include/ldif.h -search.o: search.c ../slap.h ../../../include/avl.h ../../../include/lber.h -search.o: ../../../include/ldap.h ../../../include/lthread.h -search.o: ../../../include/ldif.h shell.h -bind.o: bind.c ../slap.h ../../../include/avl.h ../../../include/lber.h -bind.o: ../../../include/ldap.h ../../../include/lthread.h -bind.o: ../../../include/ldif.h shell.h -unbind.o: unbind.c ../slap.h ../../../include/avl.h ../../../include/lber.h -unbind.o: ../../../include/ldap.h ../../../include/lthread.h -unbind.o: ../../../include/ldif.h shell.h -add.o: add.c ../slap.h ../../../include/avl.h ../../../include/lber.h -add.o: ../../../include/ldap.h ../../../include/lthread.h -add.o: ../../../include/ldif.h shell.h -delete.o: delete.c ../slap.h ../../../include/avl.h ../../../include/lber.h -delete.o: ../../../include/ldap.h ../../../include/lthread.h -delete.o: ../../../include/ldif.h shell.h -modify.o: modify.c ../slap.h ../../../include/avl.h ../../../include/lber.h -modify.o: ../../../include/ldap.h ../../../include/lthread.h -modify.o: ../../../include/ldif.h shell.h -modrdn.o: modrdn.c ../slap.h ../../../include/avl.h ../../../include/lber.h -modrdn.o: ../../../include/ldap.h ../../../include/lthread.h -modrdn.o: ../../../include/ldif.h shell.h -compare.o: compare.c ../slap.h ../../../include/avl.h ../../../include/lber.h -compare.o: ../../../include/ldap.h ../../../include/lthread.h -compare.o: ../../../include/ldif.h shell.h -abandon.o: abandon.c ../slap.h ../../../include/avl.h ../../../include/lber.h -abandon.o: ../../../include/ldap.h ../../../include/lthread.h -abandon.o: ../../../include/ldif.h shell.h -result.o: result.c ../slap.h ../../../include/avl.h ../../../include/lber.h -result.o: ../../../include/ldap.h ../../../include/lthread.h -result.o: ../../../include/ldif.h shell.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/servers/slapd/shell-backends/Make-template b/servers/slapd/shell-backends/Make-template deleted file mode 100644 index 473c30dacd..0000000000 --- a/servers/slapd/shell-backends/Make-template +++ /dev/null @@ -1,66 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1995 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# makefile for shell backends to use with stand-alone LDAP server -# -#----------------------------------------------------------------------------- -LDAPSRC = ../../.. -HDIR = $(LDAPSRC)/include -LDIR = $(LDAPSRC)/libraries -VERSIONFILE = $(LDAPSRC)/build/version - -CMNSRCS = shellutil.c -CMNOBJS = shellutil.o - -PWDSRCS = passwd-shell.c -PWDOBJS = passwd-shell.o pwd-version.o - -INCLUDES= -I. -I.. -I$(HDIR) -DEFINES = $(DEFS) $(THREADS) -CFLAGS = $(INCLUDES) $(THREADSINCLUDE) $(DEFINES) $(ACFLAGS) -LDFLAGS = -L$(LDIR) $(KRBLIBFLAG) -LIBS = -llber $(KRBLIBS) $(ALIBS) - -all: passwd-shell - -passwd-shell: $(PWDOBJS) $(CMNOBJS) - $(CC) $(ALDFLAGS) -o $@ $(PWDOBJS) $(CMNOBJS) \ - $(LDFLAGS) $(LIBS) - -pwd-version.c: $(OBJS) - $(RM) $@ - (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ - t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ - -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ - -e "s|%VERSION%|$${v}|" \ - < pwd-Version.c > $@) - -install: FORCE - -lint: FORCE - $(LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -5lint: FORCE - $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -clean: FORCE - $(RM) passwd-shell pwd-version.c *.o core a.out version.c - -depend: FORCE - $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS) - -links: - @$(LN) .src/*.[ch] . - -# DO NOT DELETE THIS LINE -- mkdep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/servers/slapd/tools/Make-template b/servers/slapd/tools/Make-template deleted file mode 100644 index 57cc719419..0000000000 --- a/servers/slapd/tools/Make-template +++ /dev/null @@ -1,173 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1995 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# Stand alone LDAP server tools makefile -# -#----------------------------------------------------------------------------- -LDAPSRC = ../../.. -HDIR = $(LDAPSRC)/include -LDIR = $(LDAPSRC)/libraries -VERSIONFILE = $(LDAPSRC)/build/version - -EDB2LDIFSRCS = edb2ldif.c ldapsyntax.c -EDB2LDIFOBJS = edb2ldif.o ldapsyntax.o ../strdup.o - -OBJS2 = ../config.o ../ch_malloc.o ../backend.o ../charray.o \ - ../aclparse.o ../schema.o ../result.o ../filterentry.o \ - ../acl.o ../phonetic.o ../attr.o ../value.o ../entry.o \ - ../dn.o ../filter.o ../str2filter.o ../ava.o ../init.o \ - ../schemaparse.o ../strdup.o - -INCLUDES= -I. -I$(HDIR) $(EXINCLUDES) -DEFINES = $(DEFS) $(LDAP_CRYPT) $(SERVERDEFS) $(THREADS) -CFLAGS = $(INCLUDES) $(DEFINES) $(ACFLAGS) -LDFLAGS = -L$(LDIR) $(EXLDFLAGS) -LIBS = -lldif -lldap -llber -lldbm -llutil -lavl $(LDBMLIB) $(EXLIBS) $(ALIBS) -LIBS2 = -lldif -lldbm -llutil -lavl $(LDBMLIB) -llber $(KRBLIBFLAG) $(KRBLIBS) \ - -llthread $(THREADSLIB) $(ALIBS) $(LDAP_CRYPT_LIB) - -all: build-edb2ldif ldif2index ldif2ldbm ldbmcat ldif2id2entry \ - ldif2id2children centipede ldbmtest ldif - -build-edb2ldif: FORCE - @if [ "$(HAVEISODE)" = "yes" ]; then \ - $(MAKE) $(MFLAGS) CC="$(CC)" EXINCLUDES="$(ISODEINCLUDEFLAG)" \ - EXLDFLAGS="$(ISODELIBFLAG)" EXLIBS="$(ISODELIBS)" edb2ldif; \ - else \ - echo "uncomment the HAVEISODE=yes line in the Make-common file to build edb2ldif"; \ - fi - -edb2ldif: edb2-vers.o - $(CC) $(ALDFLAGS) -o $@ $(EDB2LDIFOBJS) edb2-vers.o \ - $(LDFLAGS) $(LIBS) - -edb2-vers.c: $(EDB2LDIFOBJS) - $(RM) $@ - (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ - t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ - -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ - -e "s|%VERSION%|$${v}|" \ - < Vers-edb2.c > $@) - -build-chlog2replog: FORCE - @if [ "$(HAVEISODE)" = "yes" ]; then \ - $(MAKE) $(MFLAGS) CC="$(CC)" EXINCLUDES="$(ISODEINCLUDEFLAG)" \ - EXLDFLAGS="$(ISODELIBFLAG)" EXLIBS="$(ISODELIBS)" chlog2replog; \ - else \ - echo "uncomment the HAVEISODE=yes line in the Make-common file to build chlog2replog"; \ - fi - -chlog2replog: chlog2replog.o ../lock.o ../ch_malloc.o - $(CC) $(ALDFLAGS) -o $@ chlog2replog.o ../lock.o ../ch_malloc.o \ - $(LDFLAGS) $(LIBS) - -ldif2index: ldif2index.o ../libbackends.a $(OBJS2) - $(CC) $(ALDFLAGS) -o $@ ldif2index.o $(OBJS2) \ - ../libbackends.a $(LDFLAGS) $(LIBS2) - -ldif2ldbm: ldif2ldbm.o ../libbackends.a $(OBJS2) - $(CC) $(ALDFLAGS) -o $@ ldif2ldbm.o $(OBJS2) \ - ../libbackends.a $(LDFLAGS) $(LIBS2) - -ldif2id2entry: ldif2id2entry.o ../libbackends.a $(OBJS2) - $(CC) $(ALDFLAGS) -o $@ ldif2id2entry.o $(OBJS2) \ - ../libbackends.a $(LDFLAGS) $(LIBS2) - -ldif2id2children: ldif2id2children.o ../libbackends.a $(OBJS2) - $(CC) $(ALDFLAGS) -o $@ ldif2id2children.o $(OBJS2) \ - ../libbackends.a $(LDFLAGS) $(LIBS2) - -ldbmcat: ldbmcat.o - $(CC) $(ALDFLAGS) -o $@ ldbmcat.o $(LDFLAGS) $(LIBS) - -ldif: ldif.o - $(CC) $(ALDFLAGS) -o $@ ldif.o $(LDFLAGS) $(LIBS) $(LIBS2) - -centipede: centipede.o - $(CC) $(ALDFLAGS) -o $@ centipede.o $(LDFLAGS) $(LIBS) \ - $(KRBLIBFLAG) $(KRBLIBS) - -sizecount: sizecount.o ../phonetic.o ../ch_malloc.o - $(CC) $(ALDFLAGS) -o $@ sizecount.o ../phonetic.o ../ch_malloc.o \ - $(LDFLAGS) $(LIBS) $(KRBLIBFLAG) $(KRBLIBS) - -ldbmtest: ldbmtest.o ../libbackends.a $(OBJS2) - $(CC) $(ALDFLAGS) -o ldbmtest ldbmtest.o $(OBJS2) \ - ../libbackends.a $(LDFLAGS) $(LIBS2) - -install: $(LDAP_SBINDIR) $(LDAP_SBINDIR)/edb2ldif $(LDAP_SBINDIR)/ldif2ldbm \ - $(LDAP_SBINDIR)/ldif2index $(LDAP_SBINDIR)/ldif2id2entry \ - $(LDAP_SBINDIR)/ldif2id2children $(LDAP_SBINDIR)/ldbmcat \ - $(LDAP_SBINDIR)/centipede $(LDAP_SBINDIR)/ldbmtest \ - $(LDAP_SBINDIR)/ldif - -$(LDAP_SBINDIR)/edb2ldif: build-edb2ldif - @if [ "$(HAVEISODE)" = "yes" ]; then \ - $(INSTALL) $(INSTALLFLAGS) -m 755 edb2ldif $(LDAP_SBINDIR); \ - else \ - exit 0; \ - fi - -$(LDAP_SBINDIR)/chlog2replog: build-chlog2replog - @if [ "$(HAVEISODE)" = "yes" ]; then \ - $(INSTALL) $(INSTALLFLAGS) -m 755 chlog2replog $(LDAP_SBINDIR); \ - else \ - exit 0; \ - fi - -$(LDAP_SBINDIR)/ldif2ldbm: ldif2ldbm - $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2ldbm $(LDAP_SBINDIR) - -$(LDAP_SBINDIR)/ldif2index: ldif2index - $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2index $(LDAP_SBINDIR) - -$(LDAP_SBINDIR)/ldif2id2entry: ldif2id2entry - $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2id2entry $(LDAP_SBINDIR) - -$(LDAP_SBINDIR)/ldif2id2children: ldif2id2children - $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2id2children $(LDAP_SBINDIR) - -$(LDAP_SBINDIR)/ldbmcat: ldbmcat - $(INSTALL) $(INSTALLFLAGS) -m 755 ldbmcat $(LDAP_SBINDIR) - -$(LDAP_SBINDIR)/ldif: ldif - $(INSTALL) $(INSTALLFLAGS) -m 755 ldif $(LDAP_SBINDIR) - -$(LDAP_SBINDIR)/centipede: centipede - $(INSTALL) $(INSTALLFLAGS) -m 755 centipede $(LDAP_SBINDIR) - -$(LDAP_SBINDIR)/ldbmtest: ldbmtest - $(INSTALL) $(INSTALLFLAGS) -m 755 ldbmtest $(LDAP_SBINDIR) - -lint: FORCE - $(LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -5lint: FORCE - $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -clean: FORCE - @echo "making clean in `$(PWD)`" - $(RM) edb2ldif ldif2index *.o core a.out edb2-vers.c \ - ldif2ldbm ldif2id2entry ldif2id2children ldbmcat ldif \ - centipede chlog2replog sizecount ldbmtest - -depend: FORCE - @if [ ! -z "$(HAVEISODE)" ]; then \ - DEPENDEXTRAS="$(ISODEINCLUDEFLAG) chlog2replog.c $(EDB2LDIFSRCS)"; \ - fi; \ - $(MKDEP) $(INCLUDES) $(DEFINES) $$DEPENDEXTRAS ldif2index.c \ - ldif2ldbm.c ldif2id2entry.c ldif2id2children.c ldbmcat.c \ - centipede.c sizecount.c ldbmtest.c ldif.c - -links: - @echo "making links in `$(PWD)`" - @$(LN) .src/*.[ch] . - diff --git a/servers/slurpd/Make-template b/servers/slurpd/Make-template deleted file mode 100644 index a43494093d..0000000000 --- a/servers/slurpd/Make-template +++ /dev/null @@ -1,147 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1995 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# Stand-alone LDAP Update RePlication Daemon makefile -# -#----------------------------------------------------------------------------- -LDAPSRC = ../.. -HDIR = $(LDAPSRC)/include -LDIR = $(LDAPSRC)/libraries -VERSIONFILE = $(LDAPSRC)/build/version - -SRCS = admin.c args.c ch_malloc.c config.c detach.c \ - fm.c globals.c ldap_op.c lock.c main.c re.c \ - reject.c replica.c replog.c ri.c rq.c sanity.c st.c \ - tsleep.c - -OBJS = admin.o args.o ch_malloc.o config.o detach.o \ - fm.o globals.o ldap_op.o lock.o main.o re.o \ - reject.o replica.o replog.o ri.o rq.o sanity.o st.o \ - tsleep.o - -INCLUDES= -I. -I$(HDIR) $(KRBINCLUDEFLAG) -DEFINES = $(DEFS) $(SERVERDEFS) -CFLAGS = $(INCLUDES) $(THREADSINCLUDE) $(DEFINES) $(ACFLAGS) $(THREADS) -LDFLAGS = -L$(LDIR) $(KRBLIBFLAG) -LIBS = -lldap -llber -lm -llthread -lldif $(THREADSLIB) $(KRBLIBS) \ - $(ALIBS) - -all: FORCE - @if [ -z "$(MAKESLAPD)" ]; then \ - echo "uncomment the MAKESLAPD line in Make-common to make slurpd"; \ - exit 0; \ - else \ - make slurpd; \ - fi - -slurpd: version.o - $(CC) $(ALDFLAGS) -o $@ $(OBJS) version.o $(LDFLAGS) $(LIBS) - -slurpd.pure: version.o - purify $(CC) $(ALDFLAGS) -o $@ $(OBJS) version.o $(LDFLAGS) $(LIBS) - -version.c: $(OBJS) $(LDIR)/liblber/liblber.a $(LDIR)/libldap/libldap.a - $(RM) $@ - (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ - t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ - -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ - -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) - -install: $(ETCDIR) $(ETCDIR)/slurpd - -$(ETCDIR)/slurpd: slurpd - $(INSTALL) $(INSTALLFLAGS) -m 755 slurpd $(ETCDIR) - -lint: FORCE - $(LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -5lint: FORCE - $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS) - -clean: FORCE - @echo "making clean in `$(PWD)`" - $(RM) slurpd *.o core a.out version.c - -depend: FORCE - $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS) - -links: - @echo "making links in `$(PWD)`" - @$(LN) .src/*.[ch] . - -# DO NOT DELETE THIS LINE -- mkdep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -admin.o: admin.c slurp.h ../../include/lber.h ../../include/ldap.h -admin.o: ../../include/lthread.h ../../include/portable.h -admin.o: ../../include/ldapconfig.h ../../include/ldif.h globals.h slurp.h -args.o: args.c ../../include/lber.h ../../include/ldap.h slurp.h -args.o: ../../include/lber.h ../../include/ldap.h ../../include/lthread.h -args.o: ../../include/portable.h ../../include/ldapconfig.h -args.o: ../../include/ldif.h globals.h slurp.h -ch_malloc.o: ch_malloc.c ../slapd/slap.h ../../include/avl.h -ch_malloc.o: ../../include/lber.h ../../include/ldap.h ../../include/lthread.h -ch_malloc.o: ../../include/ldif.h -config.o: config.c ../../include/lber.h ../../include/ldap.h slurp.h -config.o: ../../include/lber.h ../../include/ldap.h ../../include/lthread.h -config.o: ../../include/portable.h ../../include/ldapconfig.h -config.o: ../../include/ldif.h globals.h slurp.h -detach.o: detach.c ../../include/portable.h -fm.o: fm.c slurp.h ../../include/lber.h ../../include/ldap.h -fm.o: ../../include/lthread.h ../../include/portable.h -fm.o: ../../include/ldapconfig.h ../../include/ldif.h globals.h slurp.h -globals.o: globals.c slurp.h ../../include/lber.h ../../include/ldap.h -globals.o: ../../include/lthread.h ../../include/portable.h -globals.o: ../../include/ldapconfig.h ../../include/ldif.h globals.h slurp.h -ldap_op.o: ldap_op.c ../../include/lber.h ../../include/ldap.h -ldap_op.o: ../../include/portable.h slurp.h ../../include/lber.h -ldap_op.o: ../../include/ldap.h ../../include/lthread.h -ldap_op.o: ../../include/portable.h ../../include/ldapconfig.h -ldap_op.o: ../../include/ldif.h -lock.o: lock.c ../../include/portable.h ../slapd/slap.h ../../include/avl.h -lock.o: ../../include/lber.h ../../include/ldap.h ../../include/lthread.h -lock.o: ../../include/ldif.h -main.o: main.c slurp.h ../../include/lber.h ../../include/ldap.h -main.o: ../../include/lthread.h ../../include/portable.h -main.o: ../../include/ldapconfig.h ../../include/ldif.h globals.h slurp.h -re.o: re.c ../slapd/slap.h ../../include/avl.h ../../include/lber.h -re.o: ../../include/ldap.h ../../include/lthread.h ../../include/ldif.h slurp.h -re.o: ../../include/lber.h ../../include/ldap.h ../../include/lthread.h -re.o: ../../include/portable.h ../../include/ldapconfig.h ../../include/ldif.h -re.o: globals.h slurp.h -reject.o: reject.c slurp.h ../../include/lber.h ../../include/ldap.h -reject.o: ../../include/lthread.h ../../include/portable.h -reject.o: ../../include/ldapconfig.h ../../include/ldif.h globals.h slurp.h -replica.o: replica.c slurp.h ../../include/lber.h ../../include/ldap.h -replica.o: ../../include/lthread.h ../../include/portable.h -replica.o: ../../include/ldapconfig.h ../../include/ldif.h globals.h slurp.h -replog.o: replog.c ../../include/portable.h slurp.h ../../include/lber.h -replog.o: ../../include/ldap.h ../../include/lthread.h ../../include/portable.h -replog.o: ../../include/ldapconfig.h ../../include/ldif.h globals.h slurp.h -ri.o: ri.c slurp.h ../../include/lber.h ../../include/ldap.h -ri.o: ../../include/lthread.h ../../include/portable.h -ri.o: ../../include/ldapconfig.h ../../include/ldif.h globals.h slurp.h -rq.o: rq.c slurp.h ../../include/lber.h ../../include/ldap.h -rq.o: ../../include/lthread.h ../../include/portable.h -rq.o: ../../include/ldapconfig.h ../../include/ldif.h globals.h slurp.h -sanity.o: sanity.c slurp.h ../../include/lber.h ../../include/ldap.h -sanity.o: ../../include/lthread.h ../../include/portable.h -sanity.o: ../../include/ldapconfig.h ../../include/ldif.h globals.h slurp.h -sanity.o: ../../include/portable.h -st.o: st.c slurp.h ../../include/lber.h ../../include/ldap.h -st.o: ../../include/lthread.h ../../include/portable.h -st.o: ../../include/ldapconfig.h ../../include/ldif.h globals.h slurp.h -tsleep.o: tsleep.c slurp.h ../../include/lber.h ../../include/ldap.h -tsleep.o: ../../include/lthread.h ../../include/portable.h -tsleep.o: ../../include/ldapconfig.h ../../include/ldif.h globals.h slurp.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/tests/Make-template b/tests/Make-template deleted file mode 100644 index f8cae98bf0..0000000000 --- a/tests/Make-template +++ /dev/null @@ -1,35 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1996 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# LDAP tests Make template file -# -#----------------------------------------------------------------------------- - -SCRIPTSDIR=./scripts - -all: FORCE - @echo "Initiating LDAP tests..."; \ - $(SCRIPTSDIR)/all $(SCRIPTSDIR) - -install: FORCE - -depend: FORCE - -clean: FORCE - $(RM) test-db/* test-repl/* - -veryclean: clean - -links: - @echo "making links in `$(PWD)`"; \ - $(LN) .src/scripts . ; \ - $(LN) .src/data . ; \ - $(MKDIR) test-db test-repl From aa16e3c6c63a7db56f82ba5cbd01e3c639bd36d8 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 18 Sep 1998 19:06:13 +0000 Subject: [PATCH 038/148] Add configure to branch. Though configure is derived from configure.in but requires autoconf to build. Some folks may not have autoconf installed. --- configure | 3700 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 3700 insertions(+) create mode 100755 configure diff --git a/configure b/configure new file mode 100755 index 0000000000..1222f05fe6 --- /dev/null +++ b/configure @@ -0,0 +1,3700 @@ +#! /bin/sh + +# Guess values for system-dependent variables and create Makefiles. +# Generated automatically using autoconf version 2.12 +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. + +# Defaults: +ac_help= +ac_default_prefix=/usr/local +# Any additions from configure.in: +ac_default_prefix=/usr/local +ac_help="$ac_help + --enable-debug enable debugging (yes)" +ac_help="$ac_help + --enable-libui enable library user interface (yes)" +ac_help="$ac_help + --enable-cache enable caching (yes)" +ac_help="$ac_help + --enable-referrals enable referrals (yes)" +ac_help="$ac_help + --enable-clapd enable connectionless ldap (no)" +ac_help="$ac_help + --with-kerberos use Kerberos (no)" +ac_help="$ac_help + --with-kerberos-afs use AFS Kerberos (no)" +ac_help="$ac_help + --with-threads use threads (yes)" +ac_help="$ac_help + --enable-ldapd enable building ldapd (no)" +ac_help="$ac_help + --enable-slapd enable building slapd (yes)" +ac_help="$ac_help + --enable-aclgroup enable ACL group support (yes)" +ac_help="$ac_help + --enable-crypt enable crypt(3) passwords (yes)" +ac_help="$ac_help + --enable-md5 enable MD5 passwords (yes)" +ac_help="$ac_help + --enable-sha1 enable SHA1 passwords (yes)" +ac_help="$ac_help + --enable-wrappers enable tcp wrapper support (no)" +ac_help="$ac_help + --enable-phonetic enable phonetic/soundex (no)" +ac_help="$ac_help + --enable-rlookups enable reverse lookups (yes)" +ac_help="$ac_help + --enable-ldbm enable ldbm backend (yes)" +ac_help="$ac_help + --enable-passwd enable passwd backend (yes)" +ac_help="$ac_help + --enable-shell enable shell backend (yes)" +ac_help="$ac_help + --with-ndbm use NDB for LDBM backend (any)" +ac_help="$ac_help + --with-gdbm use GDBM for LDBM backend (any)" +ac_help="$ac_help + --with-dbhash use Berkeley DB Hash for LDBM backend (any)" +ac_help="$ac_help + --with-dbbtree use Berkeley DB Btrees for LDBM backend (any)" +ac_help="$ac_help + --with-db2 use Berkeley DB2 API (any)" +ac_help="$ac_help + --enable-slurpd enable building slurpd (yes)" + +# Initialize some variables set by options. +# The variables have the same names as the options, with +# dashes changed to underlines. +build=NONE +cache_file=./config.cache +exec_prefix=NONE +host=NONE +no_create= +nonopt=NONE +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +target=NONE +verbose= +x_includes=NONE +x_libraries=NONE +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +# Initialize some other variables. +subdirs= +MFLAGS= MAKEFLAGS= +# Maximum number of lines to put in a shell here document. +ac_max_here_lines=12 + +ac_prev= +for ac_option +do + + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + case "$ac_option" in + -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) ac_optarg= ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case "$ac_option" in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir="$ac_optarg" ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build="$ac_optarg" ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file="$ac_optarg" ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir="$ac_optarg" ;; + + -disable-* | --disable-*) + ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + eval "enable_${ac_feature}=no" ;; + + -enable-* | --enable-*) + ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "enable_${ac_feature}='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix="$ac_optarg" ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he) + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat << EOF +Usage: configure [options] [host] +Options: [defaults in brackets after descriptions] +Configuration: + --cache-file=FILE cache test results in FILE + --help print this message + --no-create do not create output files + --quiet, --silent do not print \`checking...' messages + --version print the version of autoconf that created configure +Directory and file names: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [same as prefix] + --bindir=DIR user executables in DIR [EPREFIX/bin] + --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] + --libexecdir=DIR program executables in DIR [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data in DIR + [PREFIX/share] + --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data in DIR + [PREFIX/com] + --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] + --libdir=DIR object code libraries in DIR [EPREFIX/lib] + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM + run sed PROGRAM on installed program names +EOF + cat << EOF +Host type: + --build=BUILD configure for building on BUILD [BUILD=HOST] + --host=HOST configure for HOST [guessed] + --target=TARGET configure for TARGET [TARGET=HOST] +Features and packages: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +EOF + if test -n "$ac_help"; then + echo "--enable and --with options recognized:$ac_help" + fi + exit 0 ;; + + -host | --host | --hos | --ho) + ac_prev=host ;; + -host=* | --host=* | --hos=* | --ho=*) + host="$ac_optarg" ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir="$ac_optarg" ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir="$ac_optarg" ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir="$ac_optarg" ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir="$ac_optarg" ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir="$ac_optarg" ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir="$ac_optarg" ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix="$ac_optarg" ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix="$ac_optarg" ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix="$ac_optarg" ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name="$ac_optarg" ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir="$ac_optarg" ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir="$ac_optarg" ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site="$ac_optarg" ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir="$ac_optarg" ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir="$ac_optarg" ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target="$ac_optarg" ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) + echo "configure generated by autoconf version 2.12" + exit 0 ;; + + -with-* | --with-*) + ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "with_${ac_package}='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`echo $ac_option|sed -e 's/-*without-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + eval "with_${ac_package}=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes="$ac_optarg" ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries="$ac_optarg" ;; + + -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + ;; + + *) + if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then + echo "configure: warning: $ac_option: invalid host type" 1>&2 + fi + if test "x$nonopt" != xNONE; then + { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } + fi + nonopt="$ac_option" + ;; + + esac +done + +if test -n "$ac_prev"; then + { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } +fi + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +# File descriptor usage: +# 0 standard input +# 1 file creation +# 2 errors and warnings +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 6 checking for... messages and results +# 5 compiler messages saved in config.log +if test "$silent" = yes; then + exec 6>/dev/null +else + exec 6>&1 +fi +exec 5>./config.log + +echo "\ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. +" 1>&5 + +# Strip out --no-create and --no-recursion so they do not pile up. +# Also quote any args containing shell metacharacters. +ac_configure_args= +for ac_arg +do + case "$ac_arg" in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args $ac_arg" ;; + esac +done + +# NLS nuisances. +# Only set these to C if already set. These must not be set unconditionally +# because not all systems understand e.g. LANG=C (notably SCO). +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +# Non-C LC_CTYPE values break the ctype check. +if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo > confdefs.h + +# A filename unique to this package, relative to the directory that +# configure is in, which we can look for to find out if srcdir is correct. +ac_unique_file=include/ldap.h + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_prog=$0 + ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + else + { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + fi +fi +srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` + +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + echo "loading site script $ac_site_file" + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + echo "loading cache $cache_file" + . $cache_file +else + echo "creating cache $cache_file" + > $cache_file +fi + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi + + +ac_aux_dir= +for ac_dir in build $srcdir/build; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; } +fi +ac_config_guess=$ac_aux_dir/config.guess +ac_config_sub=$ac_aux_dir/config.sub +ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. + +echo $ac_n "checking arguments""... $ac_c" 1>&6 +echo "configure:595: checking arguments" >&5 + + +# Check whether --enable-debug or --disable-debug was given. +if test "${enable_debug+set}" = set; then + enableval="$enable_debug" + test "$enableval" != no && enableval=yes + if test "$enableval" != "yes" ; then + + LDAP_DEBUG=no + else + LDAP_DEBUG=yes + fi +else + enableval=yes + LDAP_DEBUG=yes + +fi +# Check whether --enable-libui or --disable-libui was given. +if test "${enable_libui+set}" = set; then + enableval="$enable_libui" + test "$enableval" != no && enableval=yes + if test "$enableval" != "yes" ; then + + LDAP_LIBUI=no + else + LDAP_LIBUI=yes + fi +else + enableval=yes + LDAP_LIBUI=yes + +fi +# Check whether --enable-cache or --disable-cache was given. +if test "${enable_cache+set}" = set; then + enableval="$enable_cache" + test "$enableval" != no && enableval=yes + if test "$enableval" != "yes" ; then + + LDAP_CACHE=no + else + LDAP_CACHE=yes + fi +else + enableval=yes + LDAP_CACHE=yes + +fi +# Check whether --enable-referrals or --disable-referrals was given. +if test "${enable_referrals+set}" = set; then + enableval="$enable_referrals" + test "$enableval" != no && enableval=yes + if test "$enableval" != "yes" ; then + + LDAP_REFERRALS=no + else + LDAP_REFERRALS=yes + fi +else + enableval=yes + LDAP_REFERRALS=yes + +fi + +# Check whether --enable-cldap or --disable-cldap was given. +if test "${enable_cldap+set}" = set; then + enableval="$enable_cldap" + test "$enableval" != yes && enableval=no + if test "$enableval" != "no" ; then + + LDAP_CLDAP=yes + else + LDAP_CLDAP=no + fi +else + enableval=no + LDAP_CLDAP=no + +fi + +# Check whether --with-kerberos or --without-kerberos was given. +if test "${with_kerberos+set}" = set; then + withval="$with_kerberos" + + opt_kerberos=yes +else + opt_kerberos=no +fi + +# Check whether --with-kerberos-afs or --without-kerberos-afs was given. +if test "${with_kerberos_afs+set}" = set; then + withval="$with_kerberos_afs" + + opt_kerberos_afs=yes +else + opt_kerberos_afs=no +fi + +# Check whether --with-threads or --without-threads was given. +if test "${with_threads+set}" = set; then + withval="$with_threads" + + opt_threads=yes +else + opt_threads=no +fi + + + +# Check whether --enable-ldapd or --disable-ldapd was given. +if test "${enable_ldapd+set}" = set; then + enableval="$enable_ldapd" + test "$enableval" != yes && enableval=no + if test "$enableval" != "no" ; then + + BUILD_LDAPD=yes + else + BUILD_LDAPD=no + fi +else + enableval=no + BUILD_LDAPD=no + +fi + +# Check whether --enable-slapd or --disable-slapd was given. +if test "${enable_slapd+set}" = set; then + enableval="$enable_slapd" + test "$enableval" != no && enableval=yes + if test "$enableval" != "yes" ; then + + BUILD_SLAPD=no + else + BUILD_SLAPD=yes + fi +else + enableval=yes + BUILD_SLAPD=yes + +fi +# Check whether --enable-aclgroup or --disable-aclgroup was given. +if test "${enable_aclgroup+set}" = set; then + enableval="$enable_aclgroup" + test "$enableval" != no && enableval=yes + if test "$enableval" != "yes" ; then + + SLAPD_ACLGROUP=no + else + SLAPD_ALCGROUP=yes + fi +else + enableval=yes + SLAPD_ALCGROUP=yes + +fi +# Check whether --enable-crypt or --disable-crypt was given. +if test "${enable_crypt+set}" = set; then + enableval="$enable_crypt" + test "$enableval" != no && enableval=yes + if test "$enableval" != "yes" ; then + + SLAPD_CRYPT=no + else + SLAPD_CRYPT=yes + fi +else + enableval=yes + SLAPD_CRYPT=yes + +fi +# Check whether --enable-md5 or --disable-md5 was given. +if test "${enable_md5+set}" = set; then + enableval="$enable_md5" + test "$enableval" != no && enableval=yes + if test "$enableval" != "yes" ; then + + SLAPD_MD5=no + else + SLAPD_MD5=yes + fi +else + enableval=yes + SLAPD_MD5=yes + +fi +# Check whether --enable-sha1 or --disable-sha1 was given. +if test "${enable_sha1+set}" = set; then + enableval="$enable_sha1" + test "$enableval" != no && enableval=yes + if test "$enableval" != "yes" ; then + + SLAPD_SHA1=no + else + SLAPD_SHA1=yes + fi +else + enableval=yes + SLAPD_SHA1=yes + +fi +# Check whether --enable-wrappers or --disable-wrappers was given. +if test "${enable_wrappers+set}" = set; then + enableval="$enable_wrappers" + test "$enableval" != yes && enableval=no + if test "$enableval" != "no" ; then + + SLAPD_TCP_WRAPPERS=yes + else + LDAP_TCP_WRAPPERS=no + fi +else + enableval=no + LDAP_TCP_WRAPPERS=no + +fi +# Check whether --enable-phonetic or --disable-phonetic was given. +if test "${enable_phonetic+set}" = set; then + enableval="$enable_phonetic" + test "$enableval" != yes && enableval=no + if test "$enableval" != "no" ; then + + SLAPD_PHONETIC=yes + else + SLAPD_PHONETIC=no + fi +else + enableval=no + SLAPD_PHONETIC=no + +fi +# Check whether --enable-rlookups or --disable-rlookups was given. +if test "${enable_rlookups+set}" = set; then + enableval="$enable_rlookups" + test "$enableval" != no && enableval=yes + if test "$enableval" != "yes" ; then + + SLAPD_RLOOKUP=no + else + SLAPD_RLOOKUP=yes + fi +else + enableval=yes + SLAPD_RLOOKUP=yes + +fi + +# Check whether --enable-ldbm or --disable-ldbm was given. +if test "${enable_ldbm+set}" = set; then + enableval="$enable_ldbm" + test "$enableval" != no && enableval=yes + if test "$enableval" != "yes" ; then + + SLAPD_LDBM=no + else + SLAPD_LDBM=yes + fi +else + enableval=yes + SLAPD_LDBM=yes + +fi +# Check whether --enable-passwd or --disable-passwd was given. +if test "${enable_passwd+set}" = set; then + enableval="$enable_passwd" + test "$enableval" != no && enableval=yes + if test "$enableval" != "yes" ; then + + SLAPD_PASSWD=no + else + SLAPD_PASSWD=yes + fi +else + enableval=yes + SLAPD_PASSWD=yes + +fi +# Check whether --enable-shell or --disable-shell was given. +if test "${enable_shell+set}" = set; then + enableval="$enable_shell" + test "$enableval" != no && enableval=yes + if test "$enableval" != "yes" ; then + + SLAPD_SHELL=no + else + SLAPD_SHELL=yes + fi +else + enableval=yes + SLAPD_SHELL=yes + +fi + +# Check whether --with-ndbm or --without-ndbm was given. +if test "${with_ndbm+set}" = set; then + withval="$with_ndbm" + + opt_ndbm=yes +else + opt_ndbm=no +fi + +# Check whether --with-gdbm or --without-gdbm was given. +if test "${with_gdbm+set}" = set; then + withval="$with_gdbm" + + opt_gdbm=yes +else + opt_gdbm=no +fi + +# Check whether --with-dbhash or --without-dbhash was given. +if test "${with_dbhash+set}" = set; then + withval="$with_dbhash" + + opt_dbhash=yes +else + opt_dbhash=no +fi + +# Check whether --with-dbbtree or --without-dbbtree was given. +if test "${with_dbbtree+set}" = set; then + withval="$with_dbbtree" + + opt_dbbtree=yes +else + opt_dbbtree=no +fi + +# Check whether --with-db2 or --without-db2 was given. +if test "${with_db2+set}" = set; then + withval="$with_db2" + + opt_db2=yes +else + opt_db2=no +fi + + +# Check whether --enable-slurpd or --disable-slurpd was given. +if test "${enable_slurpd+set}" = set; then + enableval="$enable_slurpd" + test "$enableval" != no && enableval=yes + if test "$enableval" != "yes" ; then + + BUILD_SLURPD=no + else + BUILD_SLURPD=yes + fi +else + enableval=yes + BUILD_SLURPD=yes + +fi + +echo "$ac_t""done" 1>&6 + +echo $ac_n "checking LDBM preferences""... $ac_c" 1>&6 +echo "configure:952: checking LDBM preferences" >&5 +ldbm_prefer=any + +if test "$opt_ndbm" = yes ; then + ldbm_prefer=ndbm +fi +if test "$opt_gdbm" = yes ; then + ldbm_prefer=gdbm +fi +if test "$opt_dbhash" = yes ; then + ldbm_prefer=dbhash +fi +if test "$opt_dbbtree" = yes ; then + ldbm_prefer=dbbtree +fi +echo "$ac_t""$ldbm_prefer" 1>&6 + +if test "$BUILD_SLAPD" != "yes" ; then + BUILD_SLURPD="no" + SLAPD_LDBM="no" + SLAPD_PASSWD="no" + SLAPD_SHELL="no" + ldbm_prefer="none" +fi + +LDAP_DEFS= +LDAP_LIBS= + +if test "$LDAP_DEBUG" = "yes" ; then + LDAP_DEFS="$LDAP_DEFS -DLDAP_DEBUG" +fi +if test "$LDAP_REFERRALS" = "yes" ; then + cat >> confdefs.h <<\EOF +#define LDAP_REFERRALS 1 +EOF + + LDAP_DEFS="$LDAP_DEFS -DLDAP_REFERRALS" +fi +if test "$LDAP_CACHE" = "no" ; then + cat >> confdefs.h <<\EOF +#define LDAP_NOCACHE 1 +EOF + + LDAP_DEFS="$LDAP_DEFS -DNO_CACHE" +fi +if test "$LDAP_CLDAP" = "yes" ; then + cat >> confdefs.h <<\EOF +#define LDAP_CONNECTIONLESS 1 +EOF + + LDAP_DEFS="$LDAP_DEFS -DCLDAP" +fi + +LTHREAD_LIBS= +if test "$opt_thread" = "no" ; then + LTHREAD_DEFS="-DNO_THREADS" + BUILD_SLURPD=no +else + LTHREAD_DEFS="-DNO_THREADS" +fi + +LDAPD_DEFS= +LDAPD_LIBS= + +SLAPD_DEFS= +if test "$SLAPD_PHONETIC" = "yes" ; then + cat >> confdefs.h <<\EOF +#define SLAPD_PHONETIC 1 +EOF + + SLAPD_DEFS="$SLAPD_DEFS -DSOUNDEX" +fi + +if test "$SLAPD_LDBM" = "yes" ; then + SLAPD_DEFS="$SLAPD_DEFS -DLDAP_LDBM" +fi +if test "$SLAPD_PASSWD" = "yes" ; then + SLAPD_DEFS="$SLAPD_DEFS -DLDAP_PASSWD" +fi +if test "$SLAPD_SHELL" = "yes" ; then + SLAPD_DEFS="$SLAPD_DEFS -DLDAP_SHELL" +fi + +SLURPD_DEFS= + + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1041: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1070: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + ac_prog_rejected=no + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:1118: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:1152: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:1157: checking whether we are using GNU C" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + GCC=yes + ac_test_CFLAGS="${CFLAGS+set}" + ac_save_CFLAGS="$CFLAGS" + CFLAGS= + echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:1181: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 + if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" + elif test $ac_cv_prog_cc_g = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-O2" + fi +else + GCC= + test "${CFLAGS+set}" = set || CFLAGS="-g" +fi + +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:1209: checking how to run the C preprocessor" >&5 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +echo "$ac_t""$CPP" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 +echo "configure:1271: checking whether ${CC-cc} needs -traditional" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_pattern="Autoconf.*'x'" + cat > conftest.$ac_ext < +Autoconf TIOCGETP +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "$ac_pattern" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_prog_gcc_traditional=yes +else + rm -rf conftest* + ac_cv_prog_gcc_traditional=no +fi +rm -f conftest* + + + if test $ac_cv_prog_gcc_traditional = no; then + cat > conftest.$ac_ext < +Autoconf TCGETA +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "$ac_pattern" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_prog_gcc_traditional=yes +fi +rm -f conftest* + + fi +fi + +echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6 + if test $ac_cv_prog_gcc_traditional = yes; then + CC="$CC -traditional" + fi +fi + + +echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 +echo "configure:1318: checking whether ln -s works" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + rm -f conftestdata +if ln -s X conftestdata 2>/dev/null +then + rm -f conftestdata + ac_cv_prog_LN_S="ln -s" +else + ac_cv_prog_LN_S=ln +fi +fi +LN_S="$ac_cv_prog_LN_S" +if test "$ac_cv_prog_LN_S" = "ln -s"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# ./install, which can be erroneously created by make from ./install.sh. +echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +echo "configure:1349: checking for a BSD compatible install" >&5 +if test -z "$INSTALL"; then +if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in + /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + for ac_prog in ginstall installbsd scoinst install; do + if test -f $ac_dir/$ac_prog; then + if test $ac_prog = install && + grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + # OSF/1 installbsd also uses dspmsg, but is usable. + : + else + ac_cv_path_install="$ac_dir/$ac_prog -c" + break 2 + fi + fi + done + ;; + esac + done + IFS="$ac_save_IFS" + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL="$ac_cv_path_install" + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL="$ac_install_sh" + fi +fi +echo "$ac_t""$INSTALL" 1>&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +# Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1401: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 +echo "configure:1428: checking whether ${MAKE-make} sets \${MAKE}" >&5 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftestmake <<\EOF +all: + @echo 'ac_maketemp="${MAKE}"' +EOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftestmake +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$ac_t""yes" 1>&6 + SET_MAKE= +else + echo "$ac_t""no" 1>&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + + +# Extract the first word of "sendmail", so it can be a program name with args. +set dummy sendmail; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1458: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$SENDMAIL" in + /*) + ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc$ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_SENDMAIL="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail" + ;; +esac +fi +SENDMAIL="$ac_cv_path_SENDMAIL" +if test -n "$SENDMAIL"; then + echo "$ac_t""$SENDMAIL" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +# Extract the first word of "vi", so it can be a program name with args. +set dummy vi; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1490: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$EDITOR" in + /*) + ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH:/usr/ucb$ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_EDITOR="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi" + ;; +esac +fi +EDITOR="$ac_cv_path_EDITOR" +if test -n "$EDITOR"; then + echo "$ac_t""$EDITOR" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +# Extract the first word of "finger", so it can be a program name with args. +set dummy finger; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1522: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$FINGER" in + /*) + ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH:/usr/ucb$ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_FINGER="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger" + ;; +esac +fi +FINGER="$ac_cv_path_FINGER" +if test -n "$FINGER"; then + echo "$ac_t""$FINGER" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +ldbm_use="none" +LDBM_LIB="" +LDBM_DEFS="" + +if test "$SLAPD_LDBM" = "yes" ; then + if test $ldbm_prefer = any -o $ldbm_prefer = dbbtree \ + -o $ldbm_prefer = dbhash ; then + echo $ac_n "checking for dbopen""... $ac_c" 1>&6 +echo "configure:1560: checking for dbopen" >&5 +if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dbopen(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_dbopen) || defined (__stub___dbopen) +choke me +#else +dbopen(); +#endif + +; return 0; } +EOF +if { (eval echo configure:1588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_dbopen=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_dbopen=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + ldbm_use=$ldbm_prefer + ldbm_prefer=found +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 +echo "configure:1609: checking for dbopen in -ldb" >&5 +ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldb $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + ldbm_use=$ldbm_prefer + ldbm_prefer=found + LDBM_LIB="-ldb" + +else + echo "$ac_t""no" 1>&6 +fi + + +fi + + + if test $ldbm_prefer = found ; then + if test $ldbm_use = dbhash ; then + LDBM_DEFS="$LDAP_DEFS -DLDBM_USE_DBHASH" + else + LDBM_DEFS="$LDAP_DEFS -DLDBM_USE_DBBTREE" + fi + fi + fi + + if test $ldbm_prefer = any -o $ldbm_prefer = gdbm ; then + echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 +echo "configure:1667: checking for gdbm_open in -lgdbm" >&5 +ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgdbm $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + ldbm_use=$ldbm_prefer + ldbm_prefer=found + LDBM_LIB="-lgdbm" + LDBM_DEFS="$LDAP_DEFS -DLDBM_USE_GDBM" + +else + echo "$ac_t""no" 1>&6 +fi + + fi + if test $ldbm_prefer = any -o $ldbm_prefer = ndbm ; then + echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 +echo "configure:1714: checking for dbm_open in -ldbm" >&5 +ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldbm $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + ldbm_use=ndbm + ldbm_prefer=found + LDBM_LIB="-ldbm" + LDBM_DEFS="$LDAP_DEFS -DLDBM_USE_NDBM" + +else + echo "$ac_t""no" 1>&6 +fi + + fi + + if test $ldbm_prefer != found ; then + { echo "configure: error: could not find suitable db for $ldbm_prefer backend" 1>&2; exit 1; } + fi + + if test $ldbm_use = ndbm ; then + echo "configure: warning: LDBM using NDBM" 1>&2 + fi +fi + +# ud needs termcap (should insert check here) +LIBTERMCAP="-ltermcap" + + +# FreeBSD (and others) have crypt(3) in -lcrypt +LIBCRYPT= +echo $ac_n "checking for crypt""... $ac_c" 1>&6 +echo "configure:1776: checking for crypt" >&5 +if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char crypt(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_crypt) || defined (__stub___crypt) +choke me +#else +crypt(); +#endif + +; return 0; } +EOF +if { (eval echo configure:1804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_crypt=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_crypt=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_CRYPT 1 +EOF + +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 +echo "configure:1826: checking for crypt in -lcrypt" >&5 +ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lcrypt $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBCRYPT="-lcrypt" + cat >> confdefs.h <<\EOF +#define HAVE_CRYPT 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + +fi + + + +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 +echo "configure:1879: checking for $ac_hdr that defines DIR" >&5 +if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include <$ac_hdr> +int main() { +DIR *dirp = 0; +; return 0; } +EOF +if { (eval echo configure:1892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_dirent_$ac_safe=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_dirent_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then +echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 +echo "configure:1917: checking for opendir in -ldir" >&5 +ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldir $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="$LIBS -ldir" +else + echo "$ac_t""no" 1>&6 +fi + +else +echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 +echo "configure:1958: checking for opendir in -lx" >&5 +ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lx $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="$LIBS -lx" +else + echo "$ac_t""no" 1>&6 +fi + +fi + +echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +echo "configure:2000: checking for ANSI C header files" >&5 +if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include +#include +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + ac_cv_header_stdc=yes +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "free" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +if test "$cross_compiling" = yes; then + : +else + cat > conftest.$ac_ext < +#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int main () { int i; for (i = 0; i < 256; i++) +if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); +exit (0); } + +EOF +if { (eval echo configure:2080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_header_stdc=no +fi +rm -fr conftest* +fi + +fi +fi + +echo "$ac_t""$ac_cv_header_stdc" 1>&6 +if test $ac_cv_header_stdc = yes; then + cat >> confdefs.h <<\EOF +#define STDC_HEADERS 1 +EOF + +fi + +echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 +echo "configure:2104: checking for sys/wait.h that is POSIX.1 compatible" >&5 +if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#ifndef WEXITSTATUS +#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) +#endif +#ifndef WIFEXITED +#define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif +int main() { +int s; +wait (&s); +s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; +; return 0; } +EOF +if { (eval echo configure:2125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_sys_wait_h=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_sys_wait_h=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 +if test $ac_cv_header_sys_wait_h = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_SYS_WAIT_H 1 +EOF + +fi + +for ac_hdr in \ + stddef.h \ + fcntl.h \ + limits.h \ + malloc.h \ + sgtty.h \ + sys/file.h \ + sys/ioctl.h \ + sys/time.h \ + syslog.h \ + termio.h \ + unistd.h \ + +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2161: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + +echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 +echo "configure:2199: checking for uid_t in sys/types.h" >&5 +if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "uid_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_uid_t=yes +else + rm -rf conftest* + ac_cv_type_uid_t=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_type_uid_t" 1>&6 +if test $ac_cv_type_uid_t = no; then + cat >> confdefs.h <<\EOF +#define uid_t int +EOF + + cat >> confdefs.h <<\EOF +#define gid_t int +EOF + +fi + +echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 +echo "configure:2233: checking type of array argument to getgroups" >&5 +if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_type_getgroups=cross +else + cat > conftest.$ac_ext < +#define NGID 256 +#undef MAX +#define MAX(x, y) ((x) > (y) ? (x) : (y)) +main() +{ + gid_t gidset[NGID]; + int i, n; + union { gid_t gval; long lval; } val; + + val.lval = -1; + for (i = 0; i < NGID; i++) + gidset[i] = val.gval; + n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, + gidset); + /* Exit non-zero if getgroups seems to require an array of ints. This + happens when gid_t is short but getgroups modifies an array of ints. */ + exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); +} + +EOF +if { (eval echo configure:2266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + ac_cv_type_getgroups=gid_t +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_type_getgroups=int +fi +rm -fr conftest* +fi + +if test $ac_cv_type_getgroups = cross; then + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_getgroups=gid_t +else + rm -rf conftest* + ac_cv_type_getgroups=int +fi +rm -f conftest* + +fi +fi + +echo "$ac_t""$ac_cv_type_getgroups" 1>&6 +cat >> confdefs.h <&6 +echo "configure:2304: checking for mode_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_mode_t=yes +else + rm -rf conftest* + ac_cv_type_mode_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_mode_t" 1>&6 +if test $ac_cv_type_mode_t = no; then + cat >> confdefs.h <<\EOF +#define mode_t int +EOF + +fi + +echo $ac_n "checking for off_t""... $ac_c" 1>&6 +echo "configure:2337: checking for off_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_off_t=yes +else + rm -rf conftest* + ac_cv_type_off_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_off_t" 1>&6 +if test $ac_cv_type_off_t = no; then + cat >> confdefs.h <<\EOF +#define off_t long +EOF + +fi + +echo $ac_n "checking for pid_t""... $ac_c" 1>&6 +echo "configure:2370: checking for pid_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_pid_t=yes +else + rm -rf conftest* + ac_cv_type_pid_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_pid_t" 1>&6 +if test $ac_cv_type_pid_t = no; then + cat >> confdefs.h <<\EOF +#define pid_t int +EOF + +fi + +echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 +echo "configure:2403: checking return type of signal handlers" >&5 +if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#ifdef signal +#undef signal +#endif +#ifdef __cplusplus +extern "C" void (*signal (int, void (*)(int)))(int); +#else +void (*signal ()) (); +#endif + +int main() { +int i; +; return 0; } +EOF +if { (eval echo configure:2425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_type_signal=void +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_type_signal=int +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_type_signal" 1>&6 +cat >> confdefs.h <&6 +echo "configure:2444: checking for size_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_size_t=yes +else + rm -rf conftest* + ac_cv_type_size_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_size_t" 1>&6 +if test $ac_cv_type_size_t = no; then + cat >> confdefs.h <<\EOF +#define size_t unsigned +EOF + +fi + +echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 +echo "configure:2477: checking for uid_t in sys/types.h" >&5 +if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "uid_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_uid_t=yes +else + rm -rf conftest* + ac_cv_type_uid_t=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_type_uid_t" 1>&6 +if test $ac_cv_type_uid_t = no; then + cat >> confdefs.h <<\EOF +#define uid_t int +EOF + + cat >> confdefs.h <<\EOF +#define gid_t int +EOF + +fi + +echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 +echo "configure:2511: checking for st_blksize in struct stat" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct stat s; s.st_blksize; +; return 0; } +EOF +if { (eval echo configure:2524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_struct_st_blksize=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_st_blksize=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6 +if test $ac_cv_struct_st_blksize = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ST_BLKSIZE 1 +EOF + +fi + +echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 +echo "configure:2545: checking whether time.h and sys/time.h may both be included" >&5 +if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include +int main() { +struct tm *tp; +; return 0; } +EOF +if { (eval echo configure:2559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_time=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_time=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_header_time" 1>&6 +if test $ac_cv_header_time = yes; then + cat >> confdefs.h <<\EOF +#define TIME_WITH_SYS_TIME 1 +EOF + +fi + +echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 +echo "configure:2580: checking whether struct tm is in sys/time.h or time.h" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct tm *tp; tp->tm_sec; +; return 0; } +EOF +if { (eval echo configure:2593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_struct_tm=time.h +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_tm=sys/time.h +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_struct_tm" 1>&6 +if test $ac_cv_struct_tm = sys/time.h; then + cat >> confdefs.h <<\EOF +#define TM_IN_SYS_TIME 1 +EOF + +fi + + +echo $ac_n "checking for working const""... $ac_c" 1>&6 +echo "configure:2615: checking for working const" >&5 +if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <j = 5; +} +{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; +} + +; return 0; } +EOF +if { (eval echo configure:2669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_const=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_c_const=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_c_const" 1>&6 +if test $ac_cv_c_const = no; then + cat >> confdefs.h <<\EOF +#define const +EOF + +fi + + +echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 +echo "configure:2691: 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 + if test "$cross_compiling" = yes; then + ac_cv_func_memcmp_clean=no +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + ac_cv_func_memcmp_clean=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_memcmp_clean=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 +test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" + +echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 +echo "configure:2727: checking return type of signal handlers" >&5 +if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#ifdef signal +#undef signal +#endif +#ifdef __cplusplus +extern "C" void (*signal (int, void (*)(int)))(int); +#else +void (*signal ()) (); +#endif + +int main() { +int i; +; return 0; } +EOF +if { (eval echo configure:2749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_type_signal=void +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_type_signal=int +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_type_signal" 1>&6 +cat >> confdefs.h <&6 +echo "configure:2768: 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 < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char strftime(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_strftime) || defined (__stub___strftime) +choke me +#else +strftime(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_strftime=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_strftime=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_STRFTIME 1 +EOF + +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:2818: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lintl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_STRFTIME 1 +EOF + +LIBS="-lintl $LIBS" +else + echo "$ac_t""no" 1>&6 +fi + +fi + +echo $ac_n "checking for vprintf""... $ac_c" 1>&6 +echo "configure:2864: 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 < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char vprintf(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_vprintf) || defined (__stub___vprintf) +choke me +#else +vprintf(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_vprintf=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_vprintf=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_VPRINTF 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + +if test "$ac_cv_func_vprintf" != yes; then +echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 +echo "configure:2916: 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 < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char _doprnt(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub__doprnt) || defined (__stub____doprnt) +choke me +#else +_doprnt(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func__doprnt=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func__doprnt=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_DOPRNT 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + +fi + +echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 +echo "configure:2969: checking for wait3 that fills in rusage" >&5 +if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_wait3_rusage=no +else + cat > conftest.$ac_ext < +#include +#include +#include +/* HP-UX has wait3 but does not fill in rusage at all. */ +main() { + struct rusage r; + int i; + /* Use a field that we can force nonzero -- + voluntary context switches. + For systems like NeXT and OSF/1 that don't set it, + also use the system CPU time. And page faults (I/O) for Linux. */ + r.ru_nvcsw = 0; + r.ru_stime.tv_sec = 0; + r.ru_stime.tv_usec = 0; + r.ru_majflt = r.ru_minflt = 0; + switch (fork()) { + case 0: /* Child. */ + sleep(1); /* Give up the CPU. */ + _exit(0); + case -1: _exit(0); /* What can we do? */ + default: /* Parent. */ + wait3(&i, 0, &r); + sleep(2); /* Avoid "text file busy" from rm on fast HP-UX machines. */ + exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0 + && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0); + } +} +EOF +if { (eval echo configure:3008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + ac_cv_func_wait3_rusage=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_wait3_rusage=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_func_wait3_rusage" 1>&6 +if test $ac_cv_func_wait3_rusage = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_WAIT3 1 +EOF + +fi + + +for ac_func in \ + gethostname \ + gettimeofday \ + mktime \ + select \ + socket \ + strdup \ + strerror \ + strstr \ + strrchr \ + strtod \ + strtol \ + strtoul \ + memcpy \ + +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3048: 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 < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:3076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + +for ac_func in strdup +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3104: 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 < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:3132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +LIBOBJS="$LIBOBJS ${ac_func}.o" +fi +done + + + +# Check Configuration + +echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 +echo "configure:3162: checking declaration of sys_errlist" >&5 +if eval "test \"`echo '$''{'cf_cv_dcl_sys_errlist'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext < +#include +#include +int main() { +char *c = (char *) *sys_errlist +; return 0; } +EOF +if { (eval echo configure:3178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + cf_cv_dcl_sys_errlist=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cf_cv_dcl_sys_errlist=no +fi +rm -f conftest* +fi + +echo "$ac_t""$cf_cv_dcl_sys_errlist" 1>&6 + +# It's possible (for near-UNIX clones) that sys_errlist doesn't exist +if test $cf_cv_dcl_sys_errlist = no ; then + cat >> confdefs.h <<\EOF +#define DECL_SYS_ERRLIST 1 +EOF + + echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6 +echo "configure:3199: checking existence of sys_errlist" >&5 + if eval "test \"`echo '$''{'cf_cv_have_sys_errlist'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext < +int main() { +char *c = (char *) *sys_errlist +; return 0; } +EOF +if { (eval echo configure:3212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + cf_cv_have_sys_errlist=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cf_cv_have_sys_errlist=no +fi +rm -f conftest* +fi + + echo "$ac_t""$cf_cv_have_sys_errlist" 1>&6 +fi + + + + + + + + + + + + + + + + + + + + + + + + + +trap '' 1 2 15 +cat > confcache <<\EOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +EOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +(set) 2>&1 | + case `(ac_space=' '; set) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache +if cmp -s $cache_file confcache; then + : +else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Any assignment to VPATH causes Sun make to only execute +# the first set of double-colon rules, so remove it if not needed. +# If there is a colon in the path, we need to keep it. +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' +fi + +trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 + +DEFS=-DHAVE_CONFIG_H + +# Without the "./", some shells look in PATH for config.status. +: ${CONFIG_STATUS=./config.status} + +echo creating $CONFIG_STATUS +rm -f $CONFIG_STATUS +cat > $CONFIG_STATUS </dev/null | sed 1q`: +# +# $0 $ac_configure_args +# +# Compiler output produced by configure, useful for debugging +# configure, is in ./config.log if it exists. + +ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" +for ac_option +do + case "\$ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" + exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) + echo "$CONFIG_STATUS generated by autoconf version 2.12" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "\$ac_cs_usage"; exit 0 ;; + *) echo "\$ac_cs_usage"; exit 1 ;; + esac +done + +ac_given_srcdir=$srcdir +ac_given_INSTALL="$INSTALL" + +trap 'rm -fr `echo "\ +Makefile:build/top.mk:Makefile.in:build/dir.mk \ +doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \ +doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \ +doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \ +doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \ +doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \ +doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \ +clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \ +clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \ +clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \ +clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \ +clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \ +clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \ +clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \ +clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \ +include/Makefile:build/top.mk:include/Makefile.in \ +libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk \ +libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk \ +libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk \ +libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk \ +libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk \ +libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk \ +libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk \ +libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk \ +servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \ +servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \ +servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \ +servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \ +servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \ +servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \ +servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \ +servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \ +servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \ +tests/Makefile:build/top.mk:tests/Makefile.in \ + include/portable.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +EOF +cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF +$ac_vpsub +$extrasub +s%@CFLAGS@%$CFLAGS%g +s%@CPPFLAGS@%$CPPFLAGS%g +s%@CXXFLAGS@%$CXXFLAGS%g +s%@DEFS@%$DEFS%g +s%@LDFLAGS@%$LDFLAGS%g +s%@LIBS@%$LIBS%g +s%@exec_prefix@%$exec_prefix%g +s%@prefix@%$prefix%g +s%@program_transform_name@%$program_transform_name%g +s%@bindir@%$bindir%g +s%@sbindir@%$sbindir%g +s%@libexecdir@%$libexecdir%g +s%@datadir@%$datadir%g +s%@sysconfdir@%$sysconfdir%g +s%@sharedstatedir@%$sharedstatedir%g +s%@localstatedir@%$localstatedir%g +s%@libdir@%$libdir%g +s%@includedir@%$includedir%g +s%@oldincludedir@%$oldincludedir%g +s%@infodir@%$infodir%g +s%@mandir@%$mandir%g +s%@CC@%$CC%g +s%@CPP@%$CPP%g +s%@LN_S@%$LN_S%g +s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_DATA@%$INSTALL_DATA%g +s%@RANLIB@%$RANLIB%g +s%@SET_MAKE@%$SET_MAKE%g +s%@SENDMAIL@%$SENDMAIL%g +s%@EDITOR@%$EDITOR%g +s%@FINGER@%$FINGER%g +s%@LIBTERMCAP@%$LIBTERMCAP%g +s%@LIBCRYPT@%$LIBCRYPT%g +s%@LIBOBJS@%$LIBOBJS%g +s%@BUILD_LDAPD@%$BUILD_LDAPD%g +s%@BUILD_SLAPD@%$BUILD_SLAPD%g +s%@SLAPD_LDBM@%$SLAPD_LDBM%g +s%@SLAPD_PASSWD@%$SLAPD_PASSWD%g +s%@SLAPD_SHELL@%$SLAPD_SHELL%g +s%@BUILD_SLURPD@%$BUILD_SLURPD%g +s%@LDAP_DEFS@%$LDAP_DEFS%g +s%@LDAP_LIBS@%$LDAP_LIBS%g +s%@LDAPD_DEFS@%$LDAPD_DEFS%g +s%@LDAPD_LIBS@%$LDAPD_LIBS%g +s%@SLAPD_DEFS@%$SLAPD_DEFS%g +s%@SLAPD_LIBS@%$SLAPD_LIBS%g +s%@SLURPD_DEFS@%$SLURPD_DEFS%g +s%@SLURPD_LIBS@%$SLURPD_LIBS%g +s%@LDBM_DEFS@%$LDBM_DEFS%g +s%@LDBM_LIBS@%$LDBM_LIBS%g +s%@LTHREAD_DEFS@%$LTHREAD_DEFS%g +s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g + +CEOF +EOF + +cat >> $CONFIG_STATUS <<\EOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi +EOF + +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + case "$ac_given_INSTALL" in + [/$]*) INSTALL="$ac_given_INSTALL" ;; + *) INSTALL="$ac_dots$ac_given_INSTALL" ;; + esac + + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + sed -e "$ac_comsub +s%@configure_input@%$configure_input%g +s%@srcdir@%$srcdir%g +s%@top_srcdir@%$top_srcdir%g +s%@INSTALL@%$INSTALL%g +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file +fi; done +rm -f conftest.s* + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' +ac_dC='\3' +ac_dD='%g' +# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". +ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='\([ ]\)%\1#\2define\3' +ac_uC=' ' +ac_uD='\4%g' +# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_eB='$%\1#\2define\3' +ac_eC=' ' +ac_eD='%g' + +if test "${CONFIG_HEADERS+set}" != set; then +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +fi +for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + echo creating $ac_file + + rm -f conftest.frag conftest.in conftest.out + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + cat $ac_file_inputs > conftest.in + +EOF + +# Transform confdefs.h into a sed script conftest.vals that substitutes +# the proper values into config.h.in to produce config.h. And first: +# Protect against being on the right side of a sed subst in config.status. +# Protect against being in an unquoted here document in config.status. +rm -f conftest.vals +cat > conftest.hdr <<\EOF +s/[\\&%]/\\&/g +s%[\\$`]%\\&%g +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp +s%ac_d%ac_u%gp +s%ac_u%ac_e%gp +EOF +sed -n -f conftest.hdr confdefs.h > conftest.vals +rm -f conftest.hdr + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >> conftest.vals <<\EOF +s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% +EOF + +# Break up conftest.vals because some shells have a limit on +# the size of here documents, and old seds have small limits too. + +rm -f conftest.tail +while : +do + ac_lines=`grep -c . conftest.vals` + # grep -c gives empty output for an empty file on some AIX systems. + if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi + # Write a limited-size here document to conftest.frag. + echo ' cat > conftest.frag <> $CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + echo 'CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in +' >> $CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail + rm -f conftest.vals + mv conftest.tail conftest.vals +done +rm -f conftest.vals + +cat >> $CONFIG_STATUS <<\EOF + rm -f conftest.frag conftest.h + echo "/* $ac_file. Generated automatically by configure. */" > conftest.h + cat conftest.in >> conftest.h + rm -f conftest.in + if cmp -s $ac_file conftest.h 2>/dev/null; then + echo "$ac_file is unchanged" + rm -f conftest.h + else + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + fi + rm -f $ac_file + mv conftest.h $ac_file + fi +fi; done + +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +date > stamp-h +exit 0 +EOF +chmod +x $CONFIG_STATUS +rm -fr confdefs* $ac_clean_files +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + From de99afa03e2d8027e29bf9a8d4d47ed3250913fb Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 18 Sep 1998 19:17:45 +0000 Subject: [PATCH 039/148] Re-add this. --- include/ldapconfig.h.edit | 302 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 302 insertions(+) create mode 100644 include/ldapconfig.h.edit diff --git a/include/ldapconfig.h.edit b/include/ldapconfig.h.edit new file mode 100644 index 0000000000..9bf23812d4 --- /dev/null +++ b/include/ldapconfig.h.edit @@ -0,0 +1,302 @@ +/* + * Copyright (c) 1994 Regents of the University of Michigan. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that this notice is preserved and that due credit is given + * to the University of Michigan at Ann Arbor. The name of the University + * may not be used to endorse or promote products derived from this + * software without specific prior written permission. This software + * is provided ``as is'' without express or implied warranty. + */ + +#ifndef _LDAP_CONFIG_H +#define _LDAP_CONFIG_H + +/* + * config.h for LDAP -- edit this file to customize LDAP client behavior. + * NO platform-specific definitions should be placed in this file. + * Note that this is NOT used by the LDAP or LBER libraries. + */ + +/* + * SHARED DEFINITIONS - things you should change + */ +#define DEFAULT_BINDIR "%BINDIR%" +#define DEFAULT_SBINDIR "%SBINDIR%" +#define DEFAULT_ETCDIR "%ETCDIR%" +#define DEFAULT_LIBEXECDIR "%LIBEXECDIR%" + +/* default ldap host */ +#define LDAPHOST "localhost" + +#define DEFAULT_LDAPHOST_FILE "%ETCDIR%/ldaphost" +/* default place to start searching */ +#define DEFAULT_BASE "o=Your Organization Name, c=US" +#define DEFAULT_BASE_FILE "%ETCDIR%/ldapbase" + +/* + * default binddn and creditials + * use files, make sure they are not generally readable + */ +#define DEFAULT_BINDDN NULL +#define DEFAULT_BINDDN_FILE "%ETCDIR%/ldapbinddn" + +#define DEFAULT_BIND_CRED NULL +#define DEFAULT_BIND_CRED_FILE "%ETCDIR%/ldapbindcred" + +/********************************************************************* + * * + * You probably do not need to edit anything below this point * + * * + *********************************************************************/ + +/* + * SHARED DEFINITIONS - other things you can change + */ + /* default attribute to use when sorting entries, NULL => sort by DN */ +#define SORT_ATTR NULL + /* default count of DN components to show in entry displays */ +#define DEFAULT_RDNCOUNT 2 + /* default config file locations */ +#define FILTERFILE "%ETCDIR%/ldapfilter.conf" +#define TEMPLATEFILE "%ETCDIR%/ldaptemplates.conf" +#define SEARCHFILE "%ETCDIR%/ldapsearchprefs.conf" +#define FRIENDLYFILE "%ETCDIR%/ldapfriendly" + +/* + * FINGER DEFINITIONS + */ + /* who to bind as */ +#define FINGER_BINDDN NULL +#define FINGER_BIND_CRED NULL + /* where to search */ +#define FINGER_BASE DEFAULT_BASE + /* banner to print */ +#define FINGER_BANNER "X.500 Finger Service...\r\n" + /* who to report errors to */ +#define FINGER_ERRORS "System Administrator" + /* what to say if no matches are found */ +#define FINGER_NOMATCH "Search failed to find anything.\r\n" + /* what to say if the service may be unavailable */ +#define FINGER_UNAVAILABLE \ +"The directory service may be temporarily unavailable.\r\n\ +Please try again later.\r\n" + /* printed if a match has no email address - for disptmp default */ +#define FINGER_NOEMAIL1 "None registered in this service." +#define FINGER_NOEMAIL2 NULL +#define FINGER_NOEMAIL { FINGER_NOEMAIL1, FINGER_NOEMAIL2, NULL } + /* maximum number of matches returned */ +#define FINGER_SIZELIMIT 50 + /* max number of hits displayed in full before a list is presented */ +#define FINGER_LISTLIMIT 1 + /* what to exec for "finger @host" */ +#define FINGER_CMD "%FINGER%" + /* how to treat aliases when searching */ +#define FINGER_DEREF LDAP_DEREF_FINDING + /* attribute to use when sorting results */ +#define FINGER_SORT_ATTR SORT_ATTR + /* enable ufn support */ +#define FINGER_UFN + /* timeout for searches */ +#define FINGER_TIMEOUT 60 + /* number of DN components to show in entry displays */ +#define FINGER_RDNCOUNT DEFAULT_RDNCOUNT + +/* + * GO500 GOPHER GATEWAY DEFINITIONS + */ + /* who to bind as */ +#define GO500_BINDDN NULL +#define GO500_BIND_CRED NULL + /* where to search */ +#define GO500_BASE DEFAULT_BASE + /* port on which to listen */ +#define GO500_PORT 5555 + /* how to handle aliases */ +#define GO500_DEREF LDAP_DEREF_FINDING + /* attribute to use when sorting results */ +#define GO500_SORT_ATTR SORT_ATTR + /* timeout for searches */ +#define GO500_TIMEOUT 180 + /* enable ufn support */ +#define GO500_UFN + /* + * only set and uncomment this if your hostname() does not return + * a fully qualified hostname + */ +/* #define GO500_HOSTNAME "fully.qualified.hostname.here" */ + /* number of DN components to show in entry displays */ +#define GO500_RDNCOUNT DEFAULT_RDNCOUNT + +/* + * GO500GW GOPHER GATEWAY DEFINITIONS + */ + /* who to bind as */ +#define GO500GW_BINDDN NULL +#define GO500GW_BIND_CRED NULL + /* where the helpfile lives */ +#define GO500GW_HELPFILE "%ETCDIR%/go500gw.help" + /* port on which to listen */ +#define GO500GW_PORT 7777 + /* timeout on all searches */ +#define GO500GW_TIMEOUT 180 + /* enable ufn support */ +#define GO500GW_UFN + /* attribute to use when sorting results */ +#define GO500GW_SORT_ATTR SORT_ATTR + /* + * only set and uncomment this if your hostname() does not return + * a fully qualified hostname + */ +/* #define GO500GW_HOSTNAME "fully.qualified.hostname.here" */ + /* number of DN components to show in entry displays */ +#define GO500GW_RDNCOUNT DEFAULT_RDNCOUNT + +/* + * RCPT500 MAIL RESPONDER GATEWAY DEFINITIONS + */ + /* who to bind as */ +#define RCPT500_BINDDN NULL +#define RCPT500_BIND_CRED NULL + /* where the helpfile lives */ +#define RCPT500_HELPFILE "%ETCDIR%/rcpt500.help" + /* maximum number of matches returned */ +#define RCPT500_SIZELIMIT 50 + /* address replies will appear to come from */ +#define RCPT500_FROM "\"Directory Query Program\" " + /* command that will accept an RFC822 message text on standard + input, and send it. sendmail -t does this nicely. */ +#define RCPT500_PIPEMAILCMD "%SENDMAIL% -t" + /* where to search */ +#define RCPT500_BASE DEFAULT_BASE + /* attribute to use when sorting results */ +#define RCPT500_SORT_ATTR SORT_ATTR + /* max number of hits displayed in full before a list is presented */ +#define RCPT500_LISTLIMIT 1 + /* enable ufn support */ +#define RCPT500_UFN + /* number of DN components to show in entry displays */ +#define RCPT500_RDNCOUNT DEFAULT_RDNCOUNT + +/* + * LDAPSEARCH TOOL + */ + /* who to bind as */ +#define LDAPSEARCH_BINDDN NULL +#define LDAPSEARCH_BIND_CRED NULL + /* search base */ +#define LDAPSEARCH_BASE DEFAULT_BASE + +/* + * LDAPMODIFY TOOL + */ + /* who to bind as */ +#define LDAPMODIFY_BINDDN NULL +#define LDAPMODIFY_BIND_CRED NULL + /* search base */ +#define LDAPMODIFY_BASE DEFAULT_BASE + +/* + * LDAPDELETE TOOL + */ + /* who to bind as */ +#define LDAPDELETE_BINDDN NULL +#define LDAPDELETE_BIND_CRED NULL + /* search base */ +#define LDAPDELETE_BASE DEFAULT_BASE + +/* + * LDAPMODRDN TOOL + */ + /* who to bind as */ +#define LDAPMODRDN_BINDDN NULL +#define LDAPMODRDN_BIND_CRED NULL + /* search base */ +#define LDAPMODRDN_BASE DEFAULT_BASE + +/* + * MAIL500 MAILER DEFINITIONS + */ + /* who to bind as */ +#define MAIL500_BINDDN NULL +#define MAIL500_BIND_CRED NULL + /* max number of ambiguous matches reported */ +#define MAIL500_MAXAMBIGUOUS 10 + /* max subscribers allowed (size limit when searching for them ) */ +#define MAIL500_MAXGROUPMEMBERS LDAP_NO_LIMIT + /* timeout for all searches */ +#define MAIL500_TIMEOUT 180 + /* sendmail location - mail500 needs to exec this */ +#define MAIL500_SENDMAIL "%SENDMAIL%" + +/* + * UD DEFINITIONS + */ + /* ud configuration file */ +#define UD_CONFIG_FILE "%ETCDIR%/ud.conf" + /* default editor */ +#define UD_DEFAULT_EDITOR "%EDITOR%" + /* default bbasename of user config file */ +#define UD_USER_CONFIG_FILE ".udrc" + /* default user to bind as */ +#define UD_BINDDN NULL + /* default password to bind with */ +#define UD_BIND_CRED NULL + /* default search base */ +#define UD_BASE DEFAULT_BASE + /* default base where groups are created */ +#define UD_WHERE_GROUPS_ARE_CREATED "" + /* default base below which all groups live */ +#define UD_WHERE_ALL_GROUPS_LIVE "" + +/* + * FAX500 DEFINITIONS + */ + /* what to bind as */ +#define FAX_BINDDN NULL +#define FAX_BIND_CRED NULL + /* default search base */ +#define FAX_BASE DEFAULT_BASE + /* how long to wait for searches */ +#define FAX_TIMEOUT 180 + /* maximum number of ambiguous matches reported */ +#define FAX_MAXAMBIGUOUS 10 + /* maximum number of members allowed */ +#define FAX_MAXMEMBERS LDAP_NO_LIMIT + /* program to send mail */ +#define FAX_SENDMAIL "%SENDMAIL%" + +/* + * RP500 DEFINITIONS + */ + /* what to bind as */ +#define RP_BINDDN NULL +#define RP_BIND_CRED NULL + /* default search base */ +#define RP_BASE DEFAULT_BASE + + /* prefix to add to non-fully-qualified numbers */ +#define RP_PHONEPREFIX "" + +/* + * SLAPD DEFINITIONS + */ + /* location of the default slapd config file */ +#define SLAPD_DEFAULT_CONFIGFILE "%ETCDIR%/slapd.conf" + /* default sizelimit on number of entries from a search */ +#define SLAPD_DEFAULT_SIZELIMIT 500 + /* default timelimit to spend on a search */ +#define SLAPD_DEFAULT_TIMELIMIT 3600 + /* location of the slapd pid file */ +#define SLAPD_PIDFILE "%RUNDIR%/slapd.pid" + /* location of the slapd args file */ +#define SLAPD_ARGSFILE "%RUNDIR%/slapd.args" + /* dn of the special "monitor" entry */ +#define SLAPD_MONITOR_DN "cn=monitor" + /* dn of the special "config" entry */ +#define SLAPD_CONFIG_DN "cn=config" + /* minimum max ids that a single index entry can map to in ldbm */ +#define SLAPD_LDBM_MIN_MAXIDS 4000 + +#endif /* _LDAP_CONFIG_H */ From 7be5fca72f7ee902ae6b92ef2e24c517841872bb Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 18 Sep 1998 19:21:18 +0000 Subject: [PATCH 040/148] Return to 1.5.10.3 --- include/ldapconfig.h.edit | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/include/ldapconfig.h.edit b/include/ldapconfig.h.edit index 9bf23812d4..bb63e69e5c 100644 --- a/include/ldapconfig.h.edit +++ b/include/ldapconfig.h.edit @@ -24,26 +24,26 @@ */ #define DEFAULT_BINDIR "%BINDIR%" #define DEFAULT_SBINDIR "%SBINDIR%" -#define DEFAULT_ETCDIR "%ETCDIR%" +#define DEFAULT_SYSCONFDIR "%SYSCONFDIR%" #define DEFAULT_LIBEXECDIR "%LIBEXECDIR%" /* default ldap host */ #define LDAPHOST "localhost" -#define DEFAULT_LDAPHOST_FILE "%ETCDIR%/ldaphost" +#define DEFAULT_LDAPHOST_FILE "%SYSCONFDIR%/ldaphost" /* default place to start searching */ #define DEFAULT_BASE "o=Your Organization Name, c=US" -#define DEFAULT_BASE_FILE "%ETCDIR%/ldapbase" +#define DEFAULT_BASE_FILE "%SYSCONFDIR%/ldapbase" /* * default binddn and creditials * use files, make sure they are not generally readable */ #define DEFAULT_BINDDN NULL -#define DEFAULT_BINDDN_FILE "%ETCDIR%/ldapbinddn" +#define DEFAULT_BINDDN_FILE "%SYSCONFDIR%/ldapbinddn" #define DEFAULT_BIND_CRED NULL -#define DEFAULT_BIND_CRED_FILE "%ETCDIR%/ldapbindcred" +#define DEFAULT_BIND_CRED_FILE "%SYSCONFDIR%/ldapbindcred" /********************************************************************* * * @@ -59,10 +59,10 @@ /* default count of DN components to show in entry displays */ #define DEFAULT_RDNCOUNT 2 /* default config file locations */ -#define FILTERFILE "%ETCDIR%/ldapfilter.conf" -#define TEMPLATEFILE "%ETCDIR%/ldaptemplates.conf" -#define SEARCHFILE "%ETCDIR%/ldapsearchprefs.conf" -#define FRIENDLYFILE "%ETCDIR%/ldapfriendly" +#define FILTERFILE "%SYSCONFDIR%/ldapfilter.conf" +#define TEMPLATEFILE "%SYSCONFDIR%/ldaptemplates.conf" +#define SEARCHFILE "%SYSCONFDIR%/ldapsearchprefs.conf" +#define FRIENDLYFILE "%SYSCONFDIR%/ldapfriendly" /* * FINGER DEFINITIONS @@ -136,7 +136,7 @@ Please try again later.\r\n" #define GO500GW_BINDDN NULL #define GO500GW_BIND_CRED NULL /* where the helpfile lives */ -#define GO500GW_HELPFILE "%ETCDIR%/go500gw.help" +#define GO500GW_HELPFILE "%SYSCONFDIR%/go500gw.help" /* port on which to listen */ #define GO500GW_PORT 7777 /* timeout on all searches */ @@ -160,7 +160,7 @@ Please try again later.\r\n" #define RCPT500_BINDDN NULL #define RCPT500_BIND_CRED NULL /* where the helpfile lives */ -#define RCPT500_HELPFILE "%ETCDIR%/rcpt500.help" +#define RCPT500_HELPFILE "%SYSCONFDIR%/rcpt500.help" /* maximum number of matches returned */ #define RCPT500_SIZELIMIT 50 /* address replies will appear to come from */ @@ -234,7 +234,7 @@ Please try again later.\r\n" * UD DEFINITIONS */ /* ud configuration file */ -#define UD_CONFIG_FILE "%ETCDIR%/ud.conf" +#define UD_CONFIG_FILE "%SYSCONFDIR%/ud.conf" /* default editor */ #define UD_DEFAULT_EDITOR "%EDITOR%" /* default bbasename of user config file */ @@ -283,7 +283,7 @@ Please try again later.\r\n" * SLAPD DEFINITIONS */ /* location of the default slapd config file */ -#define SLAPD_DEFAULT_CONFIGFILE "%ETCDIR%/slapd.conf" +#define SLAPD_DEFAULT_CONFIGFILE "%SYSCONFDIR%/slapd.conf" /* default sizelimit on number of entries from a search */ #define SLAPD_DEFAULT_SIZELIMIT 500 /* default timelimit to spend on a search */ From 6a235aad57736597bf8e9f8cc4f60d83a4568eea Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 18 Sep 1998 21:45:15 +0000 Subject: [PATCH 041/148] Added DB2 detection. --- build/top.mk | 6 +- clients/finger/Makefile.in | 2 +- configure | 368 +++++++++++++++++++++++-------------- configure.in | 62 +++++-- include/portable.h.in | 6 +- 5 files changed, 284 insertions(+), 160 deletions(-) diff --git a/build/top.mk b/build/top.mk index 8ef5437410..5d125624b1 100644 --- a/build/top.mk +++ b/build/top.mk @@ -67,10 +67,10 @@ LDAP_LIBDEPEND = $(LDAP_LIBDIR)/libldap.a # AutoConfig generated AC_CC = @CC@ -AC_DEFS = @DEFS@ @LDAP_DEFS@ -AC_LIBS = @LIBS@ +AC_DEFS = @CPPFLAGS@ @DEFS@ @LDAP_DEFS@ +AC_LIBS = @LDFLAGS@ @LIBS@ AC_CFLAGS = @CFLAGS@ -AC_LDFLAGS = @LDFLAGS@ +AC_LDFLAGS = LIBCRYPT = @LIBCRYPT@ LIBTERMCAP = @LIBTERMCAP@ diff --git a/clients/finger/Makefile.in b/clients/finger/Makefile.in index 7d342634d4..628fe2afcb 100644 --- a/clients/finger/Makefile.in +++ b/clients/finger/Makefile.in @@ -1,5 +1,5 @@ SRCS= main.c -XSRVS= version.c +XSRCS= version.c OBJS= main.o PROGRAMS= in.xfingerd diff --git a/configure b/configure index 1222f05fe6..31e708e378 100755 --- a/configure +++ b/configure @@ -973,6 +973,7 @@ if test "$BUILD_SLAPD" != "yes" ; then ldbm_prefer="none" fi +## general LDAP arguments LDAP_DEFS= LDAP_LIBS= @@ -1009,10 +1010,13 @@ else LTHREAD_DEFS="-DNO_THREADS" fi +## ldapd arguments LDAPD_DEFS= LDAPD_LIBS= +## slapd arguments SLAPD_DEFS= +SLAPD_LIBS= if test "$SLAPD_PHONETIC" = "yes" ; then cat >> confdefs.h <<\EOF #define SLAPD_PHONETIC 1 @@ -1032,12 +1036,13 @@ if test "$SLAPD_SHELL" = "yes" ; then fi SLURPD_DEFS= +SLURPD_LIBS= # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1041: checking for $ac_word" >&5 +echo "configure:1046: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1066,7 +1071,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1070: checking for $ac_word" >&5 +echo "configure:1075: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1114,7 +1119,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1118: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1123: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1124,11 +1129,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1148,12 +1153,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1152: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1157: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1157: checking whether we are using GNU C" >&5 +echo "configure:1162: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1162,7 +1167,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1177,7 +1182,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1181: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1186: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1205,7 +1210,7 @@ else fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1209: checking how to run the C preprocessor" >&5 +echo "configure:1214: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1220,13 +1225,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1237,13 +1242,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1267,13 +1272,13 @@ echo "$ac_t""$CPP" 1>&6 if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:1271: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:1276: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP @@ -1291,7 +1296,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -1314,7 +1319,7 @@ fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1318: checking whether ln -s works" >&5 +echo "configure:1323: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1345,7 +1350,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1349: checking for a BSD compatible install" >&5 +echo "configure:1354: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1397,7 +1402,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1401: checking for $ac_word" >&5 +echo "configure:1406: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1424,7 +1429,7 @@ else fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1428: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1433: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1454,7 +1459,7 @@ fi # Extract the first word of "sendmail", so it can be a program name with args. set dummy sendmail; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1458: checking for $ac_word" >&5 +echo "configure:1463: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1486,7 +1491,7 @@ fi # Extract the first word of "vi", so it can be a program name with args. set dummy vi; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1490: checking for $ac_word" >&5 +echo "configure:1495: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1518,7 +1523,7 @@ fi # Extract the first word of "finger", so it can be a program name with args. set dummy finger; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1522: checking for $ac_word" >&5 +echo "configure:1527: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1549,19 +1554,19 @@ fi ldbm_use="none" -LDBM_LIB="" -LDBM_DEFS="" +LDBM_DEFS= +LDBM_LIBS= if test "$SLAPD_LDBM" = "yes" ; then if test $ldbm_prefer = any -o $ldbm_prefer = dbbtree \ -o $ldbm_prefer = dbhash ; then echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:1560: checking for dbopen" >&5 +echo "configure:1565: checking for dbopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -1605,7 +1610,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:1609: checking for dbopen in -ldb" >&5 +echo "configure:1614: checking for dbopen in -ldb" >&5 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1613,7 +1618,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1642,7 +1647,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ldbm_use=$ldbm_prefer ldbm_prefer=found - LDBM_LIB="-ldb" + LDBM_LIBS="$LDBM_LIBS -ldb" else echo "$ac_t""no" 1>&6 @@ -1654,16 +1659,105 @@ fi if test $ldbm_prefer = found ; then if test $ldbm_use = dbhash ; then - LDBM_DEFS="$LDAP_DEFS -DLDBM_USE_DBHASH" + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBHASH" else - LDBM_DEFS="$LDAP_DEFS -DLDBM_USE_DBBTREE" + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBBTREE" + fi + fi + + echo $ac_n "checking for db2""... $ac_c" 1>&6 +echo "configure:1670: checking for db2" >&5 + if eval "test \"`echo '$''{'cf_cv_db2'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext < +/* this check could be improved */ +#ifdef DB_VERSION_MAJOR +#if DB_VERSION_MAJOR == 2 + __db_version_2 +#endif +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "__db_version_2" >/dev/null 2>&1; then + rm -rf conftest* + cf_cv_db2=yes +else + rm -rf conftest* + cf_cv_db2=no +fi +rm -f conftest* + +fi + + echo "$ac_t""$cf_cv_db2" 1>&6 + + if test $cf_cv_db2 = yes ; then + if test $opt_db2 = yes ; then + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2" + else + for ac_hdr in db185.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1710: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + if test $cf_cv_header_db185 = no ; then + { echo "configure: error: select --with-db2 or install db2 with 1.85 compatibility" 1>&2; exit 1; } + fi + + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2_COMPAT185" + fi + else + if test $opt_db2 = yes ; then + { echo "configure: error: could not local DB2" 1>&2; exit 1; } fi fi fi if test $ldbm_prefer = any -o $ldbm_prefer = gdbm ; then echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:1667: checking for gdbm_open in -lgdbm" >&5 +echo "configure:1761: checking for gdbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1671,7 +1765,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1700,8 +1794,8 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ldbm_use=$ldbm_prefer ldbm_prefer=found - LDBM_LIB="-lgdbm" - LDBM_DEFS="$LDAP_DEFS -DLDBM_USE_GDBM" + LDBM_LIBS="$LDBM_LIBS -lgdbm" + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_GDBM" else echo "$ac_t""no" 1>&6 @@ -1710,7 +1804,7 @@ fi fi if test $ldbm_prefer = any -o $ldbm_prefer = ndbm ; then echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:1714: checking for dbm_open in -ldbm" >&5 +echo "configure:1808: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1718,7 +1812,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1747,8 +1841,8 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ldbm_use=ndbm ldbm_prefer=found - LDBM_LIB="-ldbm" - LDBM_DEFS="$LDAP_DEFS -DLDBM_USE_NDBM" + LDBM_LIBS="$LDBM_LIBS -ldbm" + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_NDBM" else echo "$ac_t""no" 1>&6 @@ -1772,12 +1866,12 @@ LIBTERMCAP="-ltermcap" # FreeBSD (and others) have crypt(3) in -lcrypt LIBCRYPT= echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:1776: checking for crypt" >&5 +echo "configure:1870: checking for crypt" >&5 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -1822,7 +1916,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:1826: checking for crypt in -lcrypt" >&5 +echo "configure:1920: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1830,7 +1924,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1875,12 +1969,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:1879: checking for $ac_hdr that defines DIR" >&5 +echo "configure:1973: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -1888,7 +1982,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -1913,7 +2007,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:1917: checking for opendir in -ldir" >&5 +echo "configure:2011: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1921,7 +2015,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1954,7 +2048,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:1958: checking for opendir in -lx" >&5 +echo "configure:2052: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1962,7 +2056,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1996,12 +2090,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2000: checking for ANSI C header files" >&5 +echo "configure:2094: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2009,7 +2103,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2026,7 +2120,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2044,7 +2138,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2065,7 +2159,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2076,7 +2170,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -2100,12 +2194,12 @@ EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:2104: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:2198: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2121,7 +2215,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:2125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -2157,17 +2251,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2161: checking for $ac_hdr" >&5 +echo "configure:2255: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2195,12 +2289,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:2199: checking for uid_t in sys/types.h" >&5 +echo "configure:2293: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -2229,7 +2323,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:2233: checking type of array argument to getgroups" >&5 +echo "configure:2327: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2237,7 +2331,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -2276,7 +2370,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -2300,12 +2394,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:2304: checking for mode_t" >&5 +echo "configure:2398: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2333,12 +2427,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2337: checking for off_t" >&5 +echo "configure:2431: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2366,12 +2460,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:2370: checking for pid_t" >&5 +echo "configure:2464: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2399,12 +2493,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:2403: checking return type of signal handlers" >&5 +echo "configure:2497: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2421,7 +2515,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:2425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -2440,12 +2534,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2444: checking for size_t" >&5 +echo "configure:2538: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2473,12 +2567,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:2477: checking for uid_t in sys/types.h" >&5 +echo "configure:2571: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -2507,12 +2601,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:2511: checking for st_blksize in struct stat" >&5 +echo "configure:2605: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2520,7 +2614,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:2524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -2541,12 +2635,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:2545: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:2639: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2555,7 +2649,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:2559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -2576,12 +2670,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:2580: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:2674: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2589,7 +2683,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:2593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -2611,12 +2705,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2615: checking for working const" >&5 +echo "configure:2709: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2687,7 +2781,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:2691: checking for 8-bit clean memcmp" >&5 +echo "configure:2785: 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 @@ -2695,7 +2789,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -2723,12 +2817,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:2727: checking return type of signal handlers" >&5 +echo "configure:2821: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2745,7 +2839,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:2749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -2764,12 +2858,12 @@ EOF echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:2768: checking for strftime" >&5 +echo "configure:2862: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -2814,7 +2908,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:2818: checking for strftime in -lintl" >&5 +echo "configure:2912: 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 @@ -2822,7 +2916,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2860,12 +2954,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:2864: checking for vprintf" >&5 +echo "configure:2958: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -2912,12 +3006,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:2916: checking for _doprnt" >&5 +echo "configure:3010: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -2965,7 +3059,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:2969: checking for wait3 that fills in rusage" >&5 +echo "configure:3063: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2973,7 +3067,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -3004,7 +3098,7 @@ main() { } } EOF -if { (eval echo configure:3008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -3044,12 +3138,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3048: checking for $ac_func" >&5 +echo "configure:3142: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3100,12 +3194,12 @@ done for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3104: checking for $ac_func" >&5 +echo "configure:3198: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3158,13 +3252,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:3162: checking declaration of sys_errlist" >&5 +echo "configure:3256: checking declaration of sys_errlist" >&5 if eval "test \"`echo '$''{'cf_cv_dcl_sys_errlist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3174,7 +3268,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:3178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_dcl_sys_errlist=yes else @@ -3195,20 +3289,20 @@ if test $cf_cv_dcl_sys_errlist = no ; then EOF echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6 -echo "configure:3199: checking existence of sys_errlist" >&5 +echo "configure:3293: checking existence of sys_errlist" >&5 if eval "test \"`echo '$''{'cf_cv_have_sys_errlist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:3212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index afac7bed29..2ef1d8ba21 100644 --- a/configure.in +++ b/configure.in @@ -116,7 +116,7 @@ if test "$BUILD_SLAPD" != "yes" ; then ldbm_prefer="none" fi -dnl general LDAP arguments +## general LDAP arguments LDAP_DEFS= LDAP_LIBS= @@ -144,12 +144,13 @@ else LTHREAD_DEFS="-DNO_THREADS" fi -dnl ldapd arguments +## ldapd arguments LDAPD_DEFS= LDAPD_LIBS= -dnl slapd arguments +## slapd arguments SLAPD_DEFS= +SLAPD_LIBS= if test "$SLAPD_PHONETIC" = "yes" ; then AC_DEFINE(SLAPD_PHONETIC,1) SLAPD_DEFS="$SLAPD_DEFS -DSOUNDEX" @@ -170,6 +171,7 @@ fi dnl slurpd arguments SLURPD_DEFS= +SLURPD_LIBS= dnl End Args @@ -184,14 +186,12 @@ AC_PROG_MAKE_SET AC_PATH_PROG(SENDMAIL, sendmail, /usr/lib/sendmail, $PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc) -AC_PATH_PROG(EDITOR, vi, /usr/ucb/vi, - $PATH:/usr/ucb) -AC_PATH_PROG(FINGER, finger, /usr/ucb/finger, - $PATH:/usr/ucb) +AC_PATH_PROG(EDITOR, vi, /usr/ucb/vi, $PATH:/usr/ucb) +AC_PATH_PROG(FINGER, finger, /usr/ucb/finger, $PATH:/usr/ucb) ldbm_use="none" -LDBM_LIB="" -LDBM_DEFS="" +LDBM_DEFS= +LDBM_LIBS= if test "$SLAPD_LDBM" = "yes" ; then if test $ldbm_prefer = any -o $ldbm_prefer = dbbtree \ @@ -202,17 +202,47 @@ if test "$SLAPD_LDBM" = "yes" ; then AC_CHECK_LIB(db,dbopen,[ ldbm_use=$ldbm_prefer ldbm_prefer=found - LDBM_LIB="-ldb" + LDBM_LIBS="$LDBM_LIBS -ldb" ]) ]) if test $ldbm_prefer = found ; then if test $ldbm_use = dbhash ; then dnl AC_DEFINE(LDBM_USE_DBHASH,1) - LDBM_DEFS="$LDAP_DEFS -DLDBM_USE_DBHASH" + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBHASH" else dnl AC_DEFINE(LDBM_USE_DBBTREE,1) - LDBM_DEFS="$LDAP_DEFS -DLDBM_USE_DBBTREE" + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBBTREE" + fi + fi + + AC_MSG_CHECKING(for db2) + AC_CACHE_VAL(cf_cv_db2,[ + AC_EGREP_CPP(__db_version_2,[ +#include +/* this check could be improved */ +#ifdef DB_VERSION_MAJOR +#if DB_VERSION_MAJOR == 2 + __db_version_2 +#endif +#endif + ], cf_cv_db2=yes, cf_cv_db2=no)]) + AC_MSG_RESULT($cf_cv_db2) + + if test $cf_cv_db2 = yes ; then + if test $opt_db2 = yes ; then + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2" + else + AC_CHECK_HEADERS(db185.h) + if test $cf_cv_header_db185 = no ; then + AC_MSG_ERROR([select --with-db2 or install db2 with 1.85 compatibility]) + fi + + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2_COMPAT185" + fi + else + if test $opt_db2 = yes ; then + AC_MSG_ERROR(could not local DB2) fi fi fi @@ -221,18 +251,18 @@ dnl AC_DEFINE(LDBM_USE_DBBTREE,1) AC_CHECK_LIB(gdbm, gdbm_open,[ ldbm_use=$ldbm_prefer ldbm_prefer=found - LDBM_LIB="-lgdbm" + LDBM_LIBS="$LDBM_LIBS -lgdbm" dnl AC_DEFINE(LDBM_USE_GDBM,1) - LDBM_DEFS="$LDAP_DEFS -DLDBM_USE_GDBM" + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_GDBM" ]) fi if test $ldbm_prefer = any -o $ldbm_prefer = ndbm ; then AC_CHECK_LIB(dbm,dbm_open,[ ldbm_use=ndbm ldbm_prefer=found - LDBM_LIB="-ldbm" + LDBM_LIBS="$LDBM_LIBS -ldbm" dnl AC_DEFINE(LDBM_USE_NDBM,1) - LDBM_DEFS="$LDAP_DEFS -DLDBM_USE_NDBM" + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_NDBM" ]) fi diff --git a/include/portable.h.in b/include/portable.h.in index 5d862fde03..ec4f2a8936 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -127,6 +127,9 @@ /* Define if you have the strtoul function. */ #undef HAVE_STRTOUL +/* Define if you have the header file. */ +#undef HAVE_DB185_H + /* Define if you have the header file. */ #undef HAVE_DIRENT_H @@ -172,9 +175,6 @@ /* Define if you have the header file. */ #undef HAVE_UNISTD_H -/* Define if you have the compat library (-lcompat). */ -#undef HAVE_LIBCOMPAT - #ifdef HAVE_STDDEF_H # include #endif From 92a1440f2de25d2e4de764fa237db4e3debf8386 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 18 Sep 1998 22:54:37 +0000 Subject: [PATCH 042/148] Fixed CRYPT, MD5, and SHA1 support. Added basic -lwrap detection. --- build/top.mk | 2 - configure | 372 +++++++++++++++++----------- configure.in | 50 +++- libraries/liblutil/Makefile.in | 2 + servers/slapd/Makefile.in | 4 +- servers/slapd/back-ldbm/Makefile.in | 2 +- servers/slapd/tools/Makefile.in | 2 +- 7 files changed, 271 insertions(+), 163 deletions(-) diff --git a/build/top.mk b/build/top.mk index 5d125624b1..819a7b70be 100644 --- a/build/top.mk +++ b/build/top.mk @@ -72,9 +72,7 @@ AC_LIBS = @LDFLAGS@ @LIBS@ AC_CFLAGS = @CFLAGS@ AC_LDFLAGS = -LIBCRYPT = @LIBCRYPT@ LIBTERMCAP = @LIBTERMCAP@ -LIBDB = @LIBDB@ # Our Defaults CC = $(AC_CC) diff --git a/configure b/configure index 31e708e378..f9e5236b2b 100755 --- a/configure +++ b/configure @@ -799,11 +799,11 @@ if test "${enable_wrappers+set}" = set; then SLAPD_TCP_WRAPPERS=yes else - LDAP_TCP_WRAPPERS=no + SLAPD_TCP_WRAPPERS=no fi else enableval=no - LDAP_TCP_WRAPPERS=no + SLAPD_TCP_WRAPPERS=no fi # Check whether --enable-phonetic or --disable-phonetic was given. @@ -1017,6 +1017,7 @@ LDAPD_LIBS= ## slapd arguments SLAPD_DEFS= SLAPD_LIBS= +LUTIL_DEFS= if test "$SLAPD_PHONETIC" = "yes" ; then cat >> confdefs.h <<\EOF #define SLAPD_PHONETIC 1 @@ -1025,6 +1026,22 @@ EOF SLAPD_DEFS="$SLAPD_DEFS -DSOUNDEX" fi +if test "$SLAPD_MD5" = "yes" ; then + cat >> confdefs.h <<\EOF +#define SLAPD_MD5 1 +EOF + + LUTIL_DEFS="$LUTIL_DEFS -DLDAP_MD5" +fi + +if test "$SLAPD_SHA1" = "yes" ; then + cat >> confdefs.h <<\EOF +#define SLAPD_SHA1 1 +EOF + + LUTIL_DEFS="$LUTIL_DEFS -DLDAP_SHA1" +fi + if test "$SLAPD_LDBM" = "yes" ; then SLAPD_DEFS="$SLAPD_DEFS -DLDAP_LDBM" fi @@ -1042,7 +1059,7 @@ SLURPD_LIBS= # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1046: checking for $ac_word" >&5 +echo "configure:1063: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1071,7 +1088,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1075: checking for $ac_word" >&5 +echo "configure:1092: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1119,7 +1136,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1123: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1140: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1129,11 +1146,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1153,12 +1170,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1157: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1174: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1162: checking whether we are using GNU C" >&5 +echo "configure:1179: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1167,7 +1184,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1182,7 +1199,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1186: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1203: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1210,7 +1227,7 @@ else fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1214: checking how to run the C preprocessor" >&5 +echo "configure:1231: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1225,13 +1242,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1242,13 +1259,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1272,13 +1289,13 @@ echo "$ac_t""$CPP" 1>&6 if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:1276: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:1293: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP @@ -1296,7 +1313,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -1319,7 +1336,7 @@ fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1323: checking whether ln -s works" >&5 +echo "configure:1340: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1350,7 +1367,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1354: checking for a BSD compatible install" >&5 +echo "configure:1371: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1402,7 +1419,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1406: checking for $ac_word" >&5 +echo "configure:1423: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1429,7 +1446,7 @@ else fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1433: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1450: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1459,7 +1476,7 @@ fi # Extract the first word of "sendmail", so it can be a program name with args. set dummy sendmail; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1463: checking for $ac_word" >&5 +echo "configure:1480: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1491,7 +1508,7 @@ fi # Extract the first word of "vi", so it can be a program name with args. set dummy vi; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1495: checking for $ac_word" >&5 +echo "configure:1512: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1523,7 +1540,7 @@ fi # Extract the first word of "finger", so it can be a program name with args. set dummy finger; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1527: checking for $ac_word" >&5 +echo "configure:1544: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1553,6 +1570,7 @@ else fi + ldbm_use="none" LDBM_DEFS= LDBM_LIBS= @@ -1561,12 +1579,12 @@ if test "$SLAPD_LDBM" = "yes" ; then if test $ldbm_prefer = any -o $ldbm_prefer = dbbtree \ -o $ldbm_prefer = dbhash ; then echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:1565: checking for dbopen" >&5 +echo "configure:1583: checking for dbopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -1610,7 +1628,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:1614: checking for dbopen in -ldb" >&5 +echo "configure:1632: checking for dbopen in -ldb" >&5 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1618,7 +1636,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1666,13 +1684,13 @@ fi fi echo $ac_n "checking for db2""... $ac_c" 1>&6 -echo "configure:1670: checking for db2" >&5 +echo "configure:1688: checking for db2" >&5 if eval "test \"`echo '$''{'cf_cv_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -1706,17 +1724,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1710: checking for $ac_hdr" >&5 +echo "configure:1728: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1757,7 +1775,7 @@ done if test $ldbm_prefer = any -o $ldbm_prefer = gdbm ; then echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:1761: checking for gdbm_open in -lgdbm" >&5 +echo "configure:1779: checking for gdbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1765,7 +1783,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1804,7 +1822,7 @@ fi fi if test $ldbm_prefer = any -o $ldbm_prefer = ndbm ; then echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:1808: checking for dbm_open in -ldbm" >&5 +echo "configure:1826: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1812,7 +1830,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1859,19 +1877,68 @@ fi fi fi +if test "$SLAPD_TCP_WRAPPERS" = "yes" ; then + echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6 +echo "configure:1883: checking for hosts_access in -lwrap" >&5 +ac_lib_var=`echo wrap'_'hosts_access | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lwrap $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBTCPD="-lwrap" + cat >> confdefs.h <<\EOF +#define HAVE_TCPD 1 +EOF + + SLAPD_DEFS="$SLAPD_DEFS -DTCP_WRAPPERS" + +else + echo "$ac_t""no" 1>&6 +fi + +fi + # ud needs termcap (should insert check here) LIBTERMCAP="-ltermcap" # FreeBSD (and others) have crypt(3) in -lcrypt -LIBCRYPT= -echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:1870: checking for crypt" >&5 +if test "$SLAPD_CRYPT" = "yes" ; then + echo $ac_n "checking for crypt""... $ac_c" 1>&6 +echo "configure:1937: checking for crypt" >&5 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -1908,15 +1975,12 @@ fi if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define HAVE_CRYPT 1 -EOF - + have_crypt=yes else echo "$ac_t""no" 1>&6 - echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:1920: checking for crypt in -lcrypt" >&5 + echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 +echo "configure:1984: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1924,7 +1988,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1950,31 +2014,38 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - LIBCRYPT="-lcrypt" - cat >> confdefs.h <<\EOF -#define HAVE_CRYPT 1 -EOF - + LUTIL_LIBS="$LUTIL_LIBS -lcrypt" + have_crypt=yes else echo "$ac_t""no" 1>&6 +have_crypt=no fi - fi + if test $have_crypt = yes ; then + cat >> confdefs.h <<\EOF +#define SLAPD_CRYPT 1 +EOF + + LUTIL_DEFS="$LUTIL_DEFS -DLDAP_CRYPT" + else + echo "configure: warning: could not find crypt" 1>&2 + fi +fi ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:1973: checking for $ac_hdr that defines DIR" >&5 +echo "configure:2044: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -1982,7 +2053,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -2007,7 +2078,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:2011: checking for opendir in -ldir" >&5 +echo "configure:2082: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2015,7 +2086,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2048,7 +2119,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:2052: checking for opendir in -lx" >&5 +echo "configure:2123: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2056,7 +2127,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2090,12 +2161,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2094: checking for ANSI C header files" >&5 +echo "configure:2165: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2103,7 +2174,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2120,7 +2191,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2138,7 +2209,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2159,7 +2230,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2170,7 +2241,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -2194,12 +2265,12 @@ EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:2198: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:2269: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2215,7 +2286,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:2219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -2251,17 +2322,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2255: checking for $ac_hdr" >&5 +echo "configure:2326: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2289,12 +2360,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:2293: checking for uid_t in sys/types.h" >&5 +echo "configure:2364: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -2323,7 +2394,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:2327: checking type of array argument to getgroups" >&5 +echo "configure:2398: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2331,7 +2402,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -2370,7 +2441,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -2394,12 +2465,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:2398: checking for mode_t" >&5 +echo "configure:2469: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2427,12 +2498,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2431: checking for off_t" >&5 +echo "configure:2502: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2460,12 +2531,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:2464: checking for pid_t" >&5 +echo "configure:2535: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2493,12 +2564,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:2497: checking return type of signal handlers" >&5 +echo "configure:2568: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2515,7 +2586,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:2519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -2534,12 +2605,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2538: checking for size_t" >&5 +echo "configure:2609: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2567,12 +2638,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:2571: checking for uid_t in sys/types.h" >&5 +echo "configure:2642: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -2601,12 +2672,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:2605: checking for st_blksize in struct stat" >&5 +echo "configure:2676: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2614,7 +2685,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:2618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -2635,12 +2706,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:2639: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:2710: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2649,7 +2720,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:2653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -2670,12 +2741,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:2674: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:2745: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2683,7 +2754,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:2687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -2705,12 +2776,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2709: checking for working const" >&5 +echo "configure:2780: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2781,7 +2852,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:2785: checking for 8-bit clean memcmp" >&5 +echo "configure:2856: 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 @@ -2789,7 +2860,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -2817,12 +2888,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:2821: checking return type of signal handlers" >&5 +echo "configure:2892: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2839,7 +2910,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:2843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -2858,12 +2929,12 @@ EOF echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:2862: checking for strftime" >&5 +echo "configure:2933: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -2908,7 +2979,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:2912: checking for strftime in -lintl" >&5 +echo "configure:2983: 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 @@ -2916,7 +2987,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2954,12 +3025,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:2958: checking for vprintf" >&5 +echo "configure:3029: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -3006,12 +3077,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:3010: checking for _doprnt" >&5 +echo "configure:3081: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -3059,7 +3130,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:3063: checking for wait3 that fills in rusage" >&5 +echo "configure:3134: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3067,7 +3138,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -3098,7 +3169,7 @@ main() { } } EOF -if { (eval echo configure:3102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -3138,12 +3209,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3142: checking for $ac_func" >&5 +echo "configure:3213: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3194,12 +3265,12 @@ done for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3198: checking for $ac_func" >&5 +echo "configure:3269: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3252,13 +3323,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:3256: checking declaration of sys_errlist" >&5 +echo "configure:3327: checking declaration of sys_errlist" >&5 if eval "test \"`echo '$''{'cf_cv_dcl_sys_errlist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3268,7 +3339,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:3272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_dcl_sys_errlist=yes else @@ -3289,20 +3360,20 @@ if test $cf_cv_dcl_sys_errlist = no ; then EOF echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6 -echo "configure:3293: checking existence of sys_errlist" >&5 +echo "configure:3364: checking existence of sys_errlist" >&5 if eval "test \"`echo '$''{'cf_cv_have_sys_errlist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:3306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_cv_have_sys_errlist=yes else @@ -3338,6 +3409,8 @@ fi + + @@ -3518,7 +3591,6 @@ s%@SENDMAIL@%$SENDMAIL%g s%@EDITOR@%$EDITOR%g s%@FINGER@%$FINGER%g s%@LIBTERMCAP@%$LIBTERMCAP%g -s%@LIBCRYPT@%$LIBCRYPT%g s%@LIBOBJS@%$LIBOBJS%g s%@BUILD_LDAPD@%$BUILD_LDAPD%g s%@BUILD_SLAPD@%$BUILD_SLAPD%g @@ -3538,6 +3610,8 @@ s%@LDBM_DEFS@%$LDBM_DEFS%g s%@LDBM_LIBS@%$LDBM_LIBS%g s%@LTHREAD_DEFS@%$LTHREAD_DEFS%g s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g +s%@LUTIL_DEFS@%$LUTIL_DEFS%g +s%@LUTIL_LIBS@%$LUTIL_LIBS%g CEOF EOF diff --git a/configure.in b/configure.in index 2ef1d8ba21..78c9710b84 100644 --- a/configure.in +++ b/configure.in @@ -60,7 +60,7 @@ CF_ARG_OPTION(md5,[ --enable-md5 enable MD5 passwords (yes)],[ CF_ARG_OPTION(sha1,[ --enable-sha1 enable SHA1 passwords (yes)],[ SLAPD_SHA1=no],[SLAPD_SHA1=yes],yes)dnl CF_ARG_OPTION(wrappers,[ --enable-wrappers enable tcp wrapper support (no)],[ - SLAPD_TCP_WRAPPERS=yes],[LDAP_TCP_WRAPPERS=no],no)dnl + SLAPD_TCP_WRAPPERS=yes],[SLAPD_TCP_WRAPPERS=no],no)dnl CF_ARG_OPTION(phonetic,[ --enable-phonetic enable phonetic/soundex (no)],[ SLAPD_PHONETIC=yes],[SLAPD_PHONETIC=no],no)dnl CF_ARG_OPTION(rlookups,[ --enable-rlookups enable reverse lookups (yes)],[ @@ -151,11 +151,22 @@ LDAPD_LIBS= ## slapd arguments SLAPD_DEFS= SLAPD_LIBS= +LUTIL_DEFS= if test "$SLAPD_PHONETIC" = "yes" ; then AC_DEFINE(SLAPD_PHONETIC,1) SLAPD_DEFS="$SLAPD_DEFS -DSOUNDEX" fi +if test "$SLAPD_MD5" = "yes" ; then + AC_DEFINE(SLAPD_MD5,1) + LUTIL_DEFS="$LUTIL_DEFS -DLDAP_MD5" +fi + +if test "$SLAPD_SHA1" = "yes" ; then + AC_DEFINE(SLAPD_SHA1,1) + LUTIL_DEFS="$LUTIL_DEFS -DLDAP_SHA1" +fi + if test "$SLAPD_LDBM" = "yes" ; then dnl AC_DEFINE(SLAPD_LDBM,1) SLAPD_DEFS="$SLAPD_DEFS -DLDAP_LDBM" @@ -175,7 +186,8 @@ SLURPD_LIBS= dnl End Args -dnl Checks for programs. +dnl ---------------------------------------------------------------- +dnl Checks for programs AC_PROG_CC AC_PROG_GCC_TRADITIONAL @@ -189,6 +201,9 @@ AC_PATH_PROG(SENDMAIL, sendmail, /usr/lib/sendmail, AC_PATH_PROG(EDITOR, vi, /usr/ucb/vi, $PATH:/usr/ucb) AC_PATH_PROG(FINGER, finger, /usr/ucb/finger, $PATH:/usr/ucb) +dnl ---------------------------------------------------------------- +dnl Checks for libraries + ldbm_use="none" LDBM_DEFS= LDBM_LIBS= @@ -275,18 +290,32 @@ dnl AC_DEFINE(LDBM_USE_NDBM,1) fi fi +if test "$SLAPD_TCP_WRAPPERS" = "yes" ; then + AC_CHECK_LIB(wrap, hosts_access, [LIBTCPD="-lwrap" + AC_DEFINE(HAVE_TCPD) + SLAPD_DEFS="$SLAPD_DEFS -DTCP_WRAPPERS" + ]) +fi + # ud needs termcap (should insert check here) LIBTERMCAP="-ltermcap" AC_SUBST(LIBTERMCAP) # FreeBSD (and others) have crypt(3) in -lcrypt -LIBCRYPT= -AC_CHECK_FUNC(crypt, AC_DEFINE(HAVE_CRYPT), [ - AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt" - AC_DEFINE(HAVE_CRYPT)]) -]) -AC_SUBST(LIBCRYPT) +if test "$SLAPD_CRYPT" = "yes" ; then + AC_CHECK_FUNC(crypt, have_crypt=yes, [ + AC_CHECK_LIB(crypt, crypt, [LUTIL_LIBS="$LUTIL_LIBS -lcrypt" + have_crypt=yes], [have_crypt=no])]) + if test $have_crypt = yes ; then + AC_DEFINE(SLAPD_CRYPT,1) + LUTIL_DEFS="$LUTIL_DEFS -DLDAP_CRYPT" + else + AC_MSG_WARN(could not find crypt, disabling crypt support) + fi +fi + +dnl ---------------------------------------------------------------- dnl Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC @@ -305,6 +334,7 @@ AC_CHECK_HEADERS( \ unistd.h \ ) +dnl ---------------------------------------------------------------- dnl Checks for typedefs, structures, and compiler characteristics. AC_TYPE_GETGROUPS AC_TYPE_MODE_T @@ -320,6 +350,7 @@ AC_STRUCT_TM dnl AC_C_BIGENDIAN AC_C_CONST +dnl ---------------------------------------------------------------- dnl Checks for library functions. AC_FUNC_MEMCMP AC_TYPE_SIGNAL @@ -345,6 +376,7 @@ AC_CHECK_FUNCS( \ AC_REPLACE_FUNCS(strdup) +dnl ---------------------------------------------------------------- # Check Configuration CF_SYS_ERRLIST @@ -369,6 +401,8 @@ AC_SUBST(LDBM_DEFS) AC_SUBST(LDBM_LIBS) AC_SUBST(LTHREAD_DEFS) AC_SUBST(LTHREAD_LIBS) +AC_SUBST(LUTIL_DEFS) +AC_SUBST(LUTIL_LIBS) dnl AC_OUTPUT( \ dnl contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \ diff --git a/libraries/liblutil/Makefile.in b/libraries/liblutil/Makefile.in index 67e499385a..0cdbed7239 100644 --- a/libraries/liblutil/Makefile.in +++ b/libraries/liblutil/Makefile.in @@ -5,3 +5,5 @@ LIBRARY = liblutil.a SRCS = base64.c md5.c sha1.c OBJS = base64.o md5.o sha1.o + +XDEFS = @LUTIL_DEFS@ diff --git a/servers/slapd/Makefile.in b/servers/slapd/Makefile.in index b057e0136e..b915eb6fba 100644 --- a/servers/slapd/Makefile.in +++ b/servers/slapd/Makefile.in @@ -26,9 +26,9 @@ all-local: FORCE $(MAKE) $(MFLAGS) slapd (cd tools; $(MAKE) $(MFLAGS) all) -XDEFS = @SLAPD_DEFS@ @LDBM_DEFS@ @LTHREAD_DEFS@ +XDEFS = @SLAPD_DEFS@ @LDBM_DEFS@ @LTHREAD_DEFS@ @LUTIL_DEFS@ XLIBS = @SLAPD_LIBS@ libbackends.a \ - -lavl -llutil -lldbm @LDBM_LIBS@ -llthread @LTHREAD_LIBS@ + -lavl -llutil -lldbm @LDBM_LIBS@ -llthread @LTHREAD_LIBS@ @LUTIL_LIBS@ slapd: version.o $(CC) $(LDFLGS) -o $@ $(OBJS) version.o $(LIBS) diff --git a/servers/slapd/back-ldbm/Makefile.in b/servers/slapd/back-ldbm/Makefile.in index 4098c22e09..9d463937a6 100644 --- a/servers/slapd/back-ldbm/Makefile.in +++ b/servers/slapd/back-ldbm/Makefile.in @@ -11,7 +11,7 @@ BUILD_OPT = "--enable-ldbm" BUILD_SRV = @SLAPD_LDBM@ XINCLUDEDIR = -I.. -XDEFS = @LDBM_DEFS@ @LTHREAD_DEFS@ +XDEFS = @LDBM_DEFS@ @LTHREAD_DEFS@ @LUTIL_DEFS@ PROGRAMS = libback-ldbm.a diff --git a/servers/slapd/tools/Makefile.in b/servers/slapd/tools/Makefile.in index 912aa07a51..69726d9988 100644 --- a/servers/slapd/tools/Makefile.in +++ b/servers/slapd/tools/Makefile.in @@ -33,7 +33,7 @@ OBJS2 = ../config.o ../ch_malloc.o ../backend.o ../charray.o \ all-local: build-edb2ldif build-chlog2replog $(PROGRAMS) XDEFS = @SLAPD_DEFS@ @LDBM_DEFS@ @LTHREAD_DEFS@ -XLIBS = @SLAPD_LIBS@ -lavl -lldbm @LDBM_LIBS@ -llthread @LTHREAD_LIBS@ +XLIBS = @SLAPD_LIBS@ -lavl -lldbm @LDBM_LIBS@ -llthread @LTHREAD_LIBS@ -llutil @LUTIL_LIBS@ build-edb2ldif: FORCE @if [ "$(HAVE_ISODE)" = "yes" ]; then \ From e4e6bde3591bc5c12f882a30c65b42c030ff41a2 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 18 Sep 1998 23:07:56 +0000 Subject: [PATCH 043/148] Now with working Wrapper support --- configure | 293 ++++++++++++++++++++---------------------- configure.in | 14 +- include/portable.h.in | 3 - 3 files changed, 147 insertions(+), 163 deletions(-) diff --git a/configure b/configure index f9e5236b2b..efd8d33b36 100755 --- a/configure +++ b/configure @@ -1027,18 +1027,10 @@ EOF fi if test "$SLAPD_MD5" = "yes" ; then - cat >> confdefs.h <<\EOF -#define SLAPD_MD5 1 -EOF - LUTIL_DEFS="$LUTIL_DEFS -DLDAP_MD5" fi if test "$SLAPD_SHA1" = "yes" ; then - cat >> confdefs.h <<\EOF -#define SLAPD_SHA1 1 -EOF - LUTIL_DEFS="$LUTIL_DEFS -DLDAP_SHA1" fi @@ -1059,7 +1051,7 @@ SLURPD_LIBS= # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1063: checking for $ac_word" >&5 +echo "configure:1055: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1088,7 +1080,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1092: checking for $ac_word" >&5 +echo "configure:1084: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1136,7 +1128,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1140: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1132: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1146,11 +1138,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1170,12 +1162,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1174: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1166: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1179: checking whether we are using GNU C" >&5 +echo "configure:1171: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1184,7 +1176,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1199,7 +1191,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1203: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1195: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1227,7 +1219,7 @@ else fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1231: checking how to run the C preprocessor" >&5 +echo "configure:1223: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1242,13 +1234,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1259,13 +1251,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1261: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1289,13 +1281,13 @@ echo "$ac_t""$CPP" 1>&6 if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:1293: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:1285: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP @@ -1313,7 +1305,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -1336,7 +1328,7 @@ fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1340: checking whether ln -s works" >&5 +echo "configure:1332: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1367,7 +1359,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1371: checking for a BSD compatible install" >&5 +echo "configure:1363: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1419,7 +1411,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1423: checking for $ac_word" >&5 +echo "configure:1415: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1446,7 +1438,7 @@ else fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1450: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1442: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1476,7 +1468,7 @@ fi # Extract the first word of "sendmail", so it can be a program name with args. set dummy sendmail; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1480: checking for $ac_word" >&5 +echo "configure:1472: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1508,7 +1500,7 @@ fi # Extract the first word of "vi", so it can be a program name with args. set dummy vi; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1512: checking for $ac_word" >&5 +echo "configure:1504: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1540,7 +1532,7 @@ fi # Extract the first word of "finger", so it can be a program name with args. set dummy finger; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1544: checking for $ac_word" >&5 +echo "configure:1536: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1579,12 +1571,12 @@ if test "$SLAPD_LDBM" = "yes" ; then if test $ldbm_prefer = any -o $ldbm_prefer = dbbtree \ -o $ldbm_prefer = dbhash ; then echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:1583: checking for dbopen" >&5 +echo "configure:1575: checking for dbopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -1628,7 +1620,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:1632: checking for dbopen in -ldb" >&5 +echo "configure:1624: checking for dbopen in -ldb" >&5 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1636,7 +1628,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1684,13 +1676,13 @@ fi fi echo $ac_n "checking for db2""... $ac_c" 1>&6 -echo "configure:1688: checking for db2" >&5 +echo "configure:1680: checking for db2" >&5 if eval "test \"`echo '$''{'cf_cv_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -1724,17 +1716,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1728: checking for $ac_hdr" >&5 +echo "configure:1720: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1760,7 +1752,7 @@ else fi done - if test $cf_cv_header_db185 = no ; then + if test "$cf_cv_header_db185_h" = no ; then { echo "configure: error: select --with-db2 or install db2 with 1.85 compatibility" 1>&2; exit 1; } fi @@ -1775,7 +1767,7 @@ done if test $ldbm_prefer = any -o $ldbm_prefer = gdbm ; then echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:1779: checking for gdbm_open in -lgdbm" >&5 +echo "configure:1771: checking for gdbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1783,7 +1775,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1822,7 +1814,7 @@ fi fi if test $ldbm_prefer = any -o $ldbm_prefer = ndbm ; then echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:1826: checking for dbm_open in -ldbm" >&5 +echo "configure:1818: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1830,7 +1822,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1879,7 +1871,7 @@ fi if test "$SLAPD_TCP_WRAPPERS" = "yes" ; then echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6 -echo "configure:1883: checking for hosts_access in -lwrap" >&5 +echo "configure:1875: checking for hosts_access in -lwrap" >&5 ac_lib_var=`echo wrap'_'hosts_access | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1887,7 +1879,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lwrap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1913,12 +1905,9 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - LIBTCPD="-lwrap" - cat >> confdefs.h <<\EOF -#define HAVE_TCPD 1 -EOF - + SLAPD_DEFS="$SLAPD_DEFS -DTCP_WRAPPERS" + SLAPD_LIBS="$SLAPD_LIBS -lwrap" else echo "$ac_t""no" 1>&6 @@ -1933,12 +1922,12 @@ LIBTERMCAP="-ltermcap" # FreeBSD (and others) have crypt(3) in -lcrypt if test "$SLAPD_CRYPT" = "yes" ; then echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:1937: checking for crypt" >&5 +echo "configure:1926: checking for crypt" >&5 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -1980,7 +1969,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:1984: checking for crypt in -lcrypt" >&5 +echo "configure:1973: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1988,7 +1977,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2025,10 +2014,6 @@ fi if test $have_crypt = yes ; then - cat >> confdefs.h <<\EOF -#define SLAPD_CRYPT 1 -EOF - LUTIL_DEFS="$LUTIL_DEFS -DLDAP_CRYPT" else echo "configure: warning: could not find crypt" 1>&2 @@ -2040,12 +2025,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:2044: checking for $ac_hdr that defines DIR" >&5 +echo "configure:2029: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -2053,7 +2038,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:2057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -2078,7 +2063,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:2082: checking for opendir in -ldir" >&5 +echo "configure:2067: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2086,7 +2071,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2119,7 +2104,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:2123: checking for opendir in -lx" >&5 +echo "configure:2108: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2127,7 +2112,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2161,12 +2146,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2165: checking for ANSI C header files" >&5 +echo "configure:2150: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2174,7 +2159,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2191,7 +2176,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2209,7 +2194,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2230,7 +2215,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2241,7 +2226,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -2265,12 +2250,12 @@ EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:2269: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:2254: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2286,7 +2271,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:2290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -2322,17 +2307,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2326: checking for $ac_hdr" >&5 +echo "configure:2311: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2360,12 +2345,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:2364: checking for uid_t in sys/types.h" >&5 +echo "configure:2349: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -2394,7 +2379,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:2398: checking type of array argument to getgroups" >&5 +echo "configure:2383: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2402,7 +2387,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -2441,7 +2426,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -2465,12 +2450,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:2469: checking for mode_t" >&5 +echo "configure:2454: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2498,12 +2483,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2502: checking for off_t" >&5 +echo "configure:2487: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2531,12 +2516,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:2535: checking for pid_t" >&5 +echo "configure:2520: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2564,12 +2549,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:2568: checking return type of signal handlers" >&5 +echo "configure:2553: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2586,7 +2571,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:2590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -2605,12 +2590,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2609: checking for size_t" >&5 +echo "configure:2594: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2638,12 +2623,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:2642: checking for uid_t in sys/types.h" >&5 +echo "configure:2627: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -2672,12 +2657,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:2676: checking for st_blksize in struct stat" >&5 +echo "configure:2661: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2685,7 +2670,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:2689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -2706,12 +2691,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:2710: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:2695: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2720,7 +2705,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:2724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -2741,12 +2726,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:2745: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:2730: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2754,7 +2739,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:2758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -2776,12 +2761,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2780: checking for working const" >&5 +echo "configure:2765: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2819: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2852,7 +2837,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:2856: checking for 8-bit clean memcmp" >&5 +echo "configure:2841: 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 @@ -2860,7 +2845,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -2888,12 +2873,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:2892: checking return type of signal handlers" >&5 +echo "configure:2877: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2910,7 +2895,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:2914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -2929,12 +2914,12 @@ EOF echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:2933: checking for strftime" >&5 +echo "configure:2918: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -2979,7 +2964,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:2983: checking for strftime in -lintl" >&5 +echo "configure:2968: 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 @@ -2987,7 +2972,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3025,12 +3010,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:3029: checking for vprintf" >&5 +echo "configure:3014: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -3077,12 +3062,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:3081: checking for _doprnt" >&5 +echo "configure:3066: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -3130,7 +3115,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:3134: checking for wait3 that fills in rusage" >&5 +echo "configure:3119: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3138,7 +3123,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -3169,7 +3154,7 @@ main() { } } EOF -if { (eval echo configure:3173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -3209,12 +3194,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3213: checking for $ac_func" >&5 +echo "configure:3198: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3265,12 +3250,12 @@ done for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3269: checking for $ac_func" >&5 +echo "configure:3254: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3323,13 +3308,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:3327: checking declaration of sys_errlist" >&5 +echo "configure:3312: checking declaration of sys_errlist" >&5 if eval "test \"`echo '$''{'cf_cv_dcl_sys_errlist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3339,7 +3324,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:3343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_dcl_sys_errlist=yes else @@ -3360,20 +3345,20 @@ if test $cf_cv_dcl_sys_errlist = no ; then EOF echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6 -echo "configure:3364: checking existence of sys_errlist" >&5 +echo "configure:3349: checking existence of sys_errlist" >&5 if eval "test \"`echo '$''{'cf_cv_have_sys_errlist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:3377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index 78c9710b84..22bed04914 100644 --- a/configure.in +++ b/configure.in @@ -158,12 +158,12 @@ if test "$SLAPD_PHONETIC" = "yes" ; then fi if test "$SLAPD_MD5" = "yes" ; then - AC_DEFINE(SLAPD_MD5,1) +dnl AC_DEFINE(SLAPD_MD5,1) LUTIL_DEFS="$LUTIL_DEFS -DLDAP_MD5" fi if test "$SLAPD_SHA1" = "yes" ; then - AC_DEFINE(SLAPD_SHA1,1) +dnl AC_DEFINE(SLAPD_SHA1,1) LUTIL_DEFS="$LUTIL_DEFS -DLDAP_SHA1" fi @@ -249,7 +249,7 @@ dnl AC_DEFINE(LDBM_USE_DBBTREE,1) LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2" else AC_CHECK_HEADERS(db185.h) - if test $cf_cv_header_db185 = no ; then + if test "$cf_cv_header_db185_h" = no ; then AC_MSG_ERROR([select --with-db2 or install db2 with 1.85 compatibility]) fi @@ -291,9 +291,11 @@ dnl AC_DEFINE(LDBM_USE_NDBM,1) fi if test "$SLAPD_TCP_WRAPPERS" = "yes" ; then - AC_CHECK_LIB(wrap, hosts_access, [LIBTCPD="-lwrap" - AC_DEFINE(HAVE_TCPD) + AC_CHECK_LIB(wrap, hosts_access, [ +dnl LIBTCPD="-lwrap" +dnl AC_DEFINE(HAVE_TCPD) SLAPD_DEFS="$SLAPD_DEFS -DTCP_WRAPPERS" + SLAPD_LIBS="$SLAPD_LIBS -lwrap" ]) fi @@ -308,7 +310,7 @@ if test "$SLAPD_CRYPT" = "yes" ; then have_crypt=yes], [have_crypt=no])]) if test $have_crypt = yes ; then - AC_DEFINE(SLAPD_CRYPT,1) +dnl AC_DEFINE(SLAPD_CRYPT,1) LUTIL_DEFS="$LUTIL_DEFS -DLDAP_CRYPT" else AC_MSG_WARN(could not find crypt, disabling crypt support) diff --git a/include/portable.h.in b/include/portable.h.in index ec4f2a8936..59cbfe78b5 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -73,9 +73,6 @@ /* define this if sys_errlist is not defined in stdio.h or errno.h */ #undef DECL_SYS_ERRLIST -/* define this you have crypt */ -#undef HAVE_CRYPT - /* define this for connectionless LDAP support */ #undef LDAP_CONNECTIONLESS From 59c26cc381272f1066bb46b1cc3eff4e7a883589 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sat, 19 Sep 1998 01:03:25 +0000 Subject: [PATCH 044/148] Added detection of POSIX thread defines. --- configure | 406 ++++++++++++++++++++++------------ configure.in | 62 +++++- include/portable.h.in | 10 +- libraries/liblthread/thread.c | 5 +- 4 files changed, 323 insertions(+), 160 deletions(-) diff --git a/configure b/configure index efd8d33b36..55fb33e1a9 100755 --- a/configure +++ b/configure @@ -1002,14 +1002,6 @@ EOF LDAP_DEFS="$LDAP_DEFS -DCLDAP" fi -LTHREAD_LIBS= -if test "$opt_thread" = "no" ; then - LTHREAD_DEFS="-DNO_THREADS" - BUILD_SLURPD=no -else - LTHREAD_DEFS="-DNO_THREADS" -fi - ## ldapd arguments LDAPD_DEFS= LDAPD_LIBS= @@ -1051,7 +1043,7 @@ SLURPD_LIBS= # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1055: checking for $ac_word" >&5 +echo "configure:1047: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1080,7 +1072,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1084: checking for $ac_word" >&5 +echo "configure:1076: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1128,7 +1120,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1132: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1124: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1138,11 +1130,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1162,12 +1154,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1166: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1158: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1171: checking whether we are using GNU C" >&5 +echo "configure:1163: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1176,7 +1168,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1191,7 +1183,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1195: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1187: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1219,7 +1211,7 @@ else fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1223: checking how to run the C preprocessor" >&5 +echo "configure:1215: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1234,13 +1226,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1251,13 +1243,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1261: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1281,13 +1273,13 @@ echo "$ac_t""$CPP" 1>&6 if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:1285: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:1277: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP @@ -1305,7 +1297,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -1328,7 +1320,7 @@ fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1332: checking whether ln -s works" >&5 +echo "configure:1324: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1359,7 +1351,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1363: checking for a BSD compatible install" >&5 +echo "configure:1355: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1411,7 +1403,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1415: checking for $ac_word" >&5 +echo "configure:1407: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1438,7 +1430,7 @@ else fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1442: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1434: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1468,7 +1460,7 @@ fi # Extract the first word of "sendmail", so it can be a program name with args. set dummy sendmail; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1472: checking for $ac_word" >&5 +echo "configure:1464: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1500,7 +1492,7 @@ fi # Extract the first word of "vi", so it can be a program name with args. set dummy vi; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1504: checking for $ac_word" >&5 +echo "configure:1496: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1532,7 +1524,7 @@ fi # Extract the first word of "finger", so it can be a program name with args. set dummy finger; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1536: checking for $ac_word" >&5 +echo "configure:1528: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1563,6 +1555,128 @@ fi +LTHREAD_LIBS= +if test "$opt_thread" = "no" ; then + LTHREAD_DEFS="-DNO_THREADS" + BUILD_SLURPD=no +else + for ac_hdr in pthread.h sched.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1568: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1578: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + + if test "$ac_cv_header_pthread_h" = yes ; then + echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6 +echo "configure:1607: checking POSIX thread version" >&5 + if eval "test \"`echo '$''{'cf_cv_pthread_version'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext < +/* this check could be improved */ +#ifdef PTHREAD_ONCE_INIT + final +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "final" >/dev/null 2>&1; then + rm -rf conftest* + pthread_final=yes +else + rm -rf conftest* + pthread_final=no +fi +rm -f conftest* + + + cat > conftest.$ac_ext < +/* this check could be improved */ +#ifdef pthread_once_init + draft4 +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "draft4" >/dev/null 2>&1; then + rm -rf conftest* + pthread_draft4=yes +else + rm -rf conftest* + pthread_draft4=no +fi +rm -f conftest* + + + if test $pthread_final = yes -a $pthread_draft4 = no; then + cf_cv_pthread_version=final + elif test $pthread_final = no -a $pthread_draft4 = yes; then + cf_cv_pthread_version=draft4 + else + cf_cv_pthread_version=unknown + fi + +fi + + echo "$ac_t""$cf_cv_pthread_version" 1>&6 + + if test $cf_cv_pthread_version = final ; then + LTHREAD_DEFS="$LTHREAD_DEFS -DPOSIX_THREADS" + elif test $cf_cv_pthread_version = draft4 ; then + LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_MIT_PTHREADS" + else + { echo "configure: error: unknown pthread version" 1>&2; exit 1; } + fi + else + LTHREAD_DEFS="-DNO_THREADS" + fi +fi + + ldbm_use="none" LDBM_DEFS= LDBM_LIBS= @@ -1571,12 +1685,12 @@ if test "$SLAPD_LDBM" = "yes" ; then if test $ldbm_prefer = any -o $ldbm_prefer = dbbtree \ -o $ldbm_prefer = dbhash ; then echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:1575: checking for dbopen" >&5 +echo "configure:1689: checking for dbopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -1620,7 +1734,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:1624: checking for dbopen in -ldb" >&5 +echo "configure:1738: checking for dbopen in -ldb" >&5 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1628,7 +1742,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1676,13 +1790,13 @@ fi fi echo $ac_n "checking for db2""... $ac_c" 1>&6 -echo "configure:1680: checking for db2" >&5 +echo "configure:1794: checking for db2" >&5 if eval "test \"`echo '$''{'cf_cv_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -1712,21 +1826,21 @@ fi if test $opt_db2 = yes ; then LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2" else - for ac_hdr in db185.h + for ac_hdr in db_185.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1720: checking for $ac_hdr" >&5 +echo "configure:1834: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1752,7 +1866,7 @@ else fi done - if test "$cf_cv_header_db185_h" = no ; then + if test $ac_cv_header_db_185_h = no ; then { echo "configure: error: select --with-db2 or install db2 with 1.85 compatibility" 1>&2; exit 1; } fi @@ -1767,7 +1881,7 @@ done if test $ldbm_prefer = any -o $ldbm_prefer = gdbm ; then echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:1771: checking for gdbm_open in -lgdbm" >&5 +echo "configure:1885: checking for gdbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1775,7 +1889,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1814,7 +1928,7 @@ fi fi if test $ldbm_prefer = any -o $ldbm_prefer = ndbm ; then echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:1818: checking for dbm_open in -ldbm" >&5 +echo "configure:1932: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1822,7 +1936,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1871,7 +1985,7 @@ fi if test "$SLAPD_TCP_WRAPPERS" = "yes" ; then echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6 -echo "configure:1875: checking for hosts_access in -lwrap" >&5 +echo "configure:1989: checking for hosts_access in -lwrap" >&5 ac_lib_var=`echo wrap'_'hosts_access | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1879,7 +1993,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lwrap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1922,12 +2036,12 @@ LIBTERMCAP="-ltermcap" # FreeBSD (and others) have crypt(3) in -lcrypt if test "$SLAPD_CRYPT" = "yes" ; then echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:1926: checking for crypt" >&5 +echo "configure:2040: checking for crypt" >&5 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -1969,7 +2083,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:1973: checking for crypt in -lcrypt" >&5 +echo "configure:2087: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1977,7 +2091,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2025,12 +2139,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:2029: checking for $ac_hdr that defines DIR" >&5 +echo "configure:2143: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -2038,7 +2152,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:2042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -2063,7 +2177,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:2067: checking for opendir in -ldir" >&5 +echo "configure:2181: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2071,7 +2185,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2104,7 +2218,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:2108: checking for opendir in -lx" >&5 +echo "configure:2222: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2112,7 +2226,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2146,12 +2260,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2150: checking for ANSI C header files" >&5 +echo "configure:2264: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2159,7 +2273,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2176,7 +2290,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2194,7 +2308,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2215,7 +2329,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2226,7 +2340,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -2250,12 +2364,12 @@ EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:2254: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:2368: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2271,7 +2385,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:2275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -2307,17 +2421,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2311: checking for $ac_hdr" >&5 +echo "configure:2425: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2345,12 +2459,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:2349: checking for uid_t in sys/types.h" >&5 +echo "configure:2463: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -2379,7 +2493,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:2383: checking type of array argument to getgroups" >&5 +echo "configure:2497: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2387,7 +2501,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -2426,7 +2540,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -2450,12 +2564,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:2454: checking for mode_t" >&5 +echo "configure:2568: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2483,12 +2597,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2487: checking for off_t" >&5 +echo "configure:2601: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2516,12 +2630,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:2520: checking for pid_t" >&5 +echo "configure:2634: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2549,12 +2663,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:2553: checking return type of signal handlers" >&5 +echo "configure:2667: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2571,7 +2685,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:2575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -2590,12 +2704,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2594: checking for size_t" >&5 +echo "configure:2708: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2623,12 +2737,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:2627: checking for uid_t in sys/types.h" >&5 +echo "configure:2741: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -2657,12 +2771,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:2661: checking for st_blksize in struct stat" >&5 +echo "configure:2775: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2670,7 +2784,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:2674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -2691,12 +2805,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:2695: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:2809: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2705,7 +2819,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:2709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2823: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -2726,12 +2840,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:2730: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:2844: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2739,7 +2853,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:2743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -2761,12 +2875,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2765: checking for working const" >&5 +echo "configure:2879: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2837,7 +2951,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:2841: checking for 8-bit clean memcmp" >&5 +echo "configure:2955: 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 @@ -2845,7 +2959,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -2873,12 +2987,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:2877: checking return type of signal handlers" >&5 +echo "configure:2991: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2895,7 +3009,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:2899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -2914,12 +3028,12 @@ EOF echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:2918: checking for strftime" >&5 +echo "configure:3032: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -2964,7 +3078,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:2968: checking for strftime in -lintl" >&5 +echo "configure:3082: 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 @@ -2972,7 +3086,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3010,12 +3124,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:3014: checking for vprintf" >&5 +echo "configure:3128: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -3062,12 +3176,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:3066: checking for _doprnt" >&5 +echo "configure:3180: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -3115,7 +3229,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:3119: checking for wait3 that fills in rusage" >&5 +echo "configure:3233: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3123,7 +3237,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -3154,7 +3268,7 @@ main() { } } EOF -if { (eval echo configure:3158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -3194,12 +3308,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3198: checking for $ac_func" >&5 +echo "configure:3312: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3250,12 +3364,12 @@ done for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3254: checking for $ac_func" >&5 +echo "configure:3368: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3308,13 +3422,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:3312: checking declaration of sys_errlist" >&5 +echo "configure:3426: checking declaration of sys_errlist" >&5 if eval "test \"`echo '$''{'cf_cv_dcl_sys_errlist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3324,7 +3438,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:3328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_dcl_sys_errlist=yes else @@ -3345,20 +3459,20 @@ if test $cf_cv_dcl_sys_errlist = no ; then EOF echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6 -echo "configure:3349: checking existence of sys_errlist" >&5 +echo "configure:3463: checking existence of sys_errlist" >&5 if eval "test \"`echo '$''{'cf_cv_have_sys_errlist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:3362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index 22bed04914..7f4e41585e 100644 --- a/configure.in +++ b/configure.in @@ -136,14 +136,6 @@ if test "$LDAP_CLDAP" = "yes" ; then LDAP_DEFS="$LDAP_DEFS -DCLDAP" fi -LTHREAD_LIBS= -if test "$opt_thread" = "no" ; then - LTHREAD_DEFS="-DNO_THREADS" - BUILD_SLURPD=no -else - LTHREAD_DEFS="-DNO_THREADS" -fi - ## ldapd arguments LDAPD_DEFS= LDAPD_LIBS= @@ -204,6 +196,56 @@ AC_PATH_PROG(FINGER, finger, /usr/ucb/finger, $PATH:/usr/ucb) dnl ---------------------------------------------------------------- dnl Checks for libraries +LTHREAD_LIBS= +if test "$opt_thread" = "no" ; then + LTHREAD_DEFS="-DNO_THREADS" + BUILD_SLURPD=no +else + AC_CHECK_HEADERS(pthread.h sched.h) + + if test "$ac_cv_header_pthread_h" = yes ; then + dnl We have some form of pthreads + AC_MSG_CHECKING(POSIX thread version) + AC_CACHE_VAL(cf_cv_pthread_version,[ + AC_EGREP_CPP(final,[ +#include +/* this check could be improved */ +#ifdef PTHREAD_ONCE_INIT + final +#endif + ], pthread_final=yes, pthread_final=no) + + AC_EGREP_CPP(draft4,[ +#include +/* this check could be improved */ +#ifdef pthread_once_init + draft4 +#endif + ], pthread_draft4=yes, pthread_draft4=no) + + if test $pthread_final = yes -a $pthread_draft4 = no; then + cf_cv_pthread_version=final + elif test $pthread_final = no -a $pthread_draft4 = yes; then + cf_cv_pthread_version=draft4 + else + cf_cv_pthread_version=unknown + fi + ]) + AC_MSG_RESULT($cf_cv_pthread_version) + + if test $cf_cv_pthread_version = final ; then + LTHREAD_DEFS="$LTHREAD_DEFS -DPOSIX_THREADS" + elif test $cf_cv_pthread_version = draft4 ; then + LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_MIT_PTHREADS" + else + AC_MSG_ERROR(unknown pthread version) + fi + else + LTHREAD_DEFS="-DNO_THREADS" + fi +fi + + ldbm_use="none" LDBM_DEFS= LDBM_LIBS= @@ -248,8 +290,8 @@ dnl AC_DEFINE(LDBM_USE_DBBTREE,1) if test $opt_db2 = yes ; then LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2" else - AC_CHECK_HEADERS(db185.h) - if test "$cf_cv_header_db185_h" = no ; then + AC_CHECK_HEADERS(db_185.h) + if test $ac_cv_header_db_185_h = no ; then AC_MSG_ERROR([select --with-db2 or install db2 with 1.85 compatibility]) fi diff --git a/include/portable.h.in b/include/portable.h.in index 59cbfe78b5..d3ca50a3ec 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -124,8 +124,8 @@ /* Define if you have the strtoul function. */ #undef HAVE_STRTOUL -/* Define if you have the header file. */ -#undef HAVE_DB185_H +/* Define if you have the header file. */ +#undef HAVE_DB_185_H /* Define if you have the header file. */ #undef HAVE_DIRENT_H @@ -142,6 +142,12 @@ /* Define if you have the header file. */ #undef HAVE_NDIR_H +/* Define if you have the header file. */ +#undef HAVE_PTHREAD_H + +/* Define if you have the header file. */ +#undef HAVE_SCHED_H + /* Define if you have the header file. */ #undef HAVE_SGTTY_H diff --git a/libraries/liblthread/thread.c b/libraries/liblthread/thread.c index 12574d0606..a0bf1e5f5c 100644 --- a/libraries/liblthread/thread.c +++ b/libraries/liblthread/thread.c @@ -491,14 +491,15 @@ pthread_kill( pthread_t tid, int sig ) #if defined ( POSIX_THREADS ) -#ifndef SCHED_YIELD_MISSING +#ifdef HAVE_SCHED_H #include +#endif +/* POSIX Threads (final) does have a pthread_yield function */ void pthread_yield( void ) { sched_yield(); } -#endif #endif /* posix threads */ #endif /* dce pthreads */ From ea3024f1e55c748a8763cf331ed944047ab4092c Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sat, 19 Sep 1998 02:31:39 +0000 Subject: [PATCH 045/148] Added gcc -pthread detection. --- configure | 272 +++++++++++++++++++++++++++++---------------------- configure.in | 26 +++-- 2 files changed, 176 insertions(+), 122 deletions(-) diff --git a/configure b/configure index 55fb33e1a9..89b6a0b1db 100755 --- a/configure +++ b/configure @@ -1604,7 +1604,7 @@ done if test "$ac_cv_header_pthread_h" = yes ; then echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6 echo "configure:1607: checking POSIX thread version" >&5 - if eval "test \"`echo '$''{'cf_cv_pthread_version'+set}'`\" = set"; then +if eval "test \"`echo '$''{'cf_cv_pthread_version'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1662,7 +1662,7 @@ rm -f conftest* fi - echo "$ac_t""$cf_cv_pthread_version" 1>&6 +echo "$ac_t""$cf_cv_pthread_version" 1>&6 if test $cf_cv_pthread_version = final ; then LTHREAD_DEFS="$LTHREAD_DEFS -DPOSIX_THREADS" @@ -1671,6 +1671,46 @@ fi else { echo "configure: error: unknown pthread version" 1>&2; exit 1; } fi + + + echo $ac_n "checking compiler for -pthread option""... $ac_c" 1>&6 +echo "configure:1678: checking compiler for -pthread option" >&5 +if eval "test \"`echo '$''{'cf_cv_pthread_flag'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + save_CPPFLAGS=$CPPFLAGS + CPPFLAGS="-pthread $CPPFLAGS" + cat > conftest.$ac_ext < +int main() { + + if(0) pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); + +; return 0; } +EOF +if { (eval echo configure:1695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + cf_cv_pthread_flag=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cf_cv_pthread_flag=no +fi +rm -f conftest* + CPPFLAGS=$save_CPPFLAGS + +fi + +echo "$ac_t""$cf_cv_pthread_flag" 1>&6 + + if test $cf_cv_pthread_flag = yes ; then + LTHREAD_LIBS="$LTHREAD_LIBS -pthread" + fi + else LTHREAD_DEFS="-DNO_THREADS" fi @@ -1685,12 +1725,12 @@ if test "$SLAPD_LDBM" = "yes" ; then if test $ldbm_prefer = any -o $ldbm_prefer = dbbtree \ -o $ldbm_prefer = dbhash ; then echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:1689: checking for dbopen" >&5 +echo "configure:1729: checking for dbopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -1734,7 +1774,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:1738: checking for dbopen in -ldb" >&5 +echo "configure:1778: checking for dbopen in -ldb" >&5 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1742,7 +1782,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1790,13 +1830,13 @@ fi fi echo $ac_n "checking for db2""... $ac_c" 1>&6 -echo "configure:1794: checking for db2" >&5 - if eval "test \"`echo '$''{'cf_cv_db2'+set}'`\" = set"; then +echo "configure:1834: checking for db2" >&5 +if eval "test \"`echo '$''{'cf_cv_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -1820,7 +1860,7 @@ rm -f conftest* fi - echo "$ac_t""$cf_cv_db2" 1>&6 +echo "$ac_t""$cf_cv_db2" 1>&6 if test $cf_cv_db2 = yes ; then if test $opt_db2 = yes ; then @@ -1830,17 +1870,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1834: checking for $ac_hdr" >&5 +echo "configure:1874: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1881,7 +1921,7 @@ done if test $ldbm_prefer = any -o $ldbm_prefer = gdbm ; then echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:1885: checking for gdbm_open in -lgdbm" >&5 +echo "configure:1925: checking for gdbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1889,7 +1929,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1928,7 +1968,7 @@ fi fi if test $ldbm_prefer = any -o $ldbm_prefer = ndbm ; then echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:1932: checking for dbm_open in -ldbm" >&5 +echo "configure:1972: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1936,7 +1976,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1985,7 +2025,7 @@ fi if test "$SLAPD_TCP_WRAPPERS" = "yes" ; then echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6 -echo "configure:1989: checking for hosts_access in -lwrap" >&5 +echo "configure:2029: checking for hosts_access in -lwrap" >&5 ac_lib_var=`echo wrap'_'hosts_access | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1993,7 +2033,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lwrap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2036,12 +2076,12 @@ LIBTERMCAP="-ltermcap" # FreeBSD (and others) have crypt(3) in -lcrypt if test "$SLAPD_CRYPT" = "yes" ; then echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:2040: checking for crypt" >&5 +echo "configure:2080: checking for crypt" >&5 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -2083,7 +2123,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:2087: checking for crypt in -lcrypt" >&5 +echo "configure:2127: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2091,7 +2131,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2139,12 +2179,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:2143: checking for $ac_hdr that defines DIR" >&5 +echo "configure:2183: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -2152,7 +2192,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:2156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -2177,7 +2217,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:2181: checking for opendir in -ldir" >&5 +echo "configure:2221: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2185,7 +2225,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2218,7 +2258,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:2222: checking for opendir in -lx" >&5 +echo "configure:2262: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2226,7 +2266,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2260,12 +2300,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2264: checking for ANSI C header files" >&5 +echo "configure:2304: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2273,7 +2313,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2317: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2290,7 +2330,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2308,7 +2348,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2329,7 +2369,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2340,7 +2380,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -2364,12 +2404,12 @@ EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:2368: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:2408: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2385,7 +2425,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:2389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -2421,17 +2461,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2425: checking for $ac_hdr" >&5 +echo "configure:2465: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2459,12 +2499,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:2463: checking for uid_t in sys/types.h" >&5 +echo "configure:2503: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -2493,7 +2533,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:2497: checking type of array argument to getgroups" >&5 +echo "configure:2537: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2501,7 +2541,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -2540,7 +2580,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -2564,12 +2604,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:2568: checking for mode_t" >&5 +echo "configure:2608: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2597,12 +2637,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2601: checking for off_t" >&5 +echo "configure:2641: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2630,12 +2670,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:2634: checking for pid_t" >&5 +echo "configure:2674: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2663,12 +2703,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:2667: checking return type of signal handlers" >&5 +echo "configure:2707: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2685,7 +2725,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:2689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -2704,12 +2744,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2708: checking for size_t" >&5 +echo "configure:2748: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2737,12 +2777,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:2741: checking for uid_t in sys/types.h" >&5 +echo "configure:2781: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -2771,12 +2811,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:2775: checking for st_blksize in struct stat" >&5 +echo "configure:2815: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2784,7 +2824,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:2788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -2805,12 +2845,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:2809: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:2849: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2819,7 +2859,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:2823: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -2840,12 +2880,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:2844: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:2884: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2853,7 +2893,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:2857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2897: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -2875,12 +2915,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2879: checking for working const" >&5 +echo "configure:2919: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2951,7 +2991,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:2955: checking for 8-bit clean memcmp" >&5 +echo "configure:2995: 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 @@ -2959,7 +2999,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -2987,12 +3027,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:2991: checking return type of signal handlers" >&5 +echo "configure:3031: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3009,7 +3049,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3028,12 +3068,12 @@ EOF echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:3032: checking for strftime" >&5 +echo "configure:3072: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -3078,7 +3118,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:3082: checking for strftime in -lintl" >&5 +echo "configure:3122: 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 @@ -3086,7 +3126,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3124,12 +3164,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:3128: checking for vprintf" >&5 +echo "configure:3168: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -3176,12 +3216,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:3180: checking for _doprnt" >&5 +echo "configure:3220: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -3229,7 +3269,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:3233: checking for wait3 that fills in rusage" >&5 +echo "configure:3273: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3237,7 +3277,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -3268,7 +3308,7 @@ main() { } } EOF -if { (eval echo configure:3272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -3308,12 +3348,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3312: checking for $ac_func" >&5 +echo "configure:3352: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3364,12 +3404,12 @@ done for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3368: checking for $ac_func" >&5 +echo "configure:3408: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3422,13 +3462,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:3426: checking declaration of sys_errlist" >&5 +echo "configure:3466: checking declaration of sys_errlist" >&5 if eval "test \"`echo '$''{'cf_cv_dcl_sys_errlist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3438,7 +3478,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:3442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_dcl_sys_errlist=yes else @@ -3459,20 +3499,20 @@ if test $cf_cv_dcl_sys_errlist = no ; then EOF echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6 -echo "configure:3463: checking existence of sys_errlist" >&5 +echo "configure:3503: checking existence of sys_errlist" >&5 if eval "test \"`echo '$''{'cf_cv_have_sys_errlist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:3476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index 7f4e41585e..54cfba2800 100644 --- a/configure.in +++ b/configure.in @@ -205,8 +205,7 @@ else if test "$ac_cv_header_pthread_h" = yes ; then dnl We have some form of pthreads - AC_MSG_CHECKING(POSIX thread version) - AC_CACHE_VAL(cf_cv_pthread_version,[ + AC_CACHE_CHECK([POSIX thread version],cf_cv_pthread_version,[ AC_EGREP_CPP(final,[ #include /* this check could be improved */ @@ -231,7 +230,6 @@ else cf_cv_pthread_version=unknown fi ]) - AC_MSG_RESULT($cf_cv_pthread_version) if test $cf_cv_pthread_version = final ; then LTHREAD_DEFS="$LTHREAD_DEFS -DPOSIX_THREADS" @@ -240,6 +238,24 @@ else else AC_MSG_ERROR(unknown pthread version) fi + + dnl Now the hard part, how to link + + AC_CACHE_CHECK([compiler for -pthread option], cf_cv_pthread_flag,[ + dnl save the CPPFLAGS + save_CPPFLAGS=$CPPFLAGS + CPPFLAGS="-pthread $CPPFLAGS" + AC_TRY_LINK([#include ],[ + if(0) pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); + ], cf_cv_pthread_flag=yes, cf_cv_pthread_flag=no) + dnl restore the CPPFLAGS + CPPFLAGS=$save_CPPFLAGS + ]) + + if test $cf_cv_pthread_flag = yes ; then + LTHREAD_LIBS="$LTHREAD_LIBS -pthread" + fi + else LTHREAD_DEFS="-DNO_THREADS" fi @@ -273,8 +289,7 @@ dnl AC_DEFINE(LDBM_USE_DBBTREE,1) fi fi - AC_MSG_CHECKING(for db2) - AC_CACHE_VAL(cf_cv_db2,[ + AC_CACHE_CHECK(for db2, cf_cv_db2,[ AC_EGREP_CPP(__db_version_2,[ #include /* this check could be improved */ @@ -284,7 +299,6 @@ dnl AC_DEFINE(LDBM_USE_DBBTREE,1) #endif #endif ], cf_cv_db2=yes, cf_cv_db2=no)]) - AC_MSG_RESULT($cf_cv_db2) if test $cf_cv_db2 = yes ; then if test $opt_db2 = yes ; then From f3eddc769b2703bc3706d2e67fe7006ad0f32286 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sat, 19 Sep 1998 03:53:11 +0000 Subject: [PATCH 046/148] More Posix Thread detection. --- configure | 689 ++++++++++++++++++++++++++++++++++-------- configure.in | 100 +++++- include/portable.h.in | 15 + 3 files changed, 662 insertions(+), 142 deletions(-) diff --git a/configure b/configure index 89b6a0b1db..9f0e2fb0d1 100755 --- a/configure +++ b/configure @@ -1672,26 +1672,99 @@ echo "$ac_t""$cf_cv_pthread_version" 1>&6 { echo "configure: error: unknown pthread version" 1>&2; exit 1; } fi + echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 +echo "configure:1677: checking for LinuxThreads" >&5 +if eval "test \"`echo '$''{'cf_cv_linux_threads'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l` + if test "$res" -gt 0 ; then + cf_cv_linux_threads=yes + else + cf_cv_linux_threads=no + fi - echo $ac_n "checking compiler for -pthread option""... $ac_c" 1>&6 -echo "configure:1678: checking compiler for -pthread option" >&5 +fi + +echo "$ac_t""$cf_cv_linux_threads" 1>&6 + + if test $cf_cv_linux_threads = yes ; then + LTHREAD_DEFS="$LTHREAD_DEFS -DHAVE_LINUX_THREADS" + fi + + + echo $ac_n "checking for pthread_create""... $ac_c" 1>&6 +echo "configure:1699: checking for pthread_create" >&5 +if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char pthread_create(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_pthread_create) || defined (__stub___pthread_create) +choke me +#else +pthread_create(); +#endif + +; return 0; } +EOF +if { (eval echo configure:1727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_pthread_create=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_pthread_create=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then + echo "$ac_t""yes" 1>&6 + pthread_link=yes +else + echo "$ac_t""no" 1>&6 +pthread_link=no +fi + + + if test $pthread_link = no ; then + echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6 +echo "configure:1750: checking for pthread_create with -pthread" >&5 if eval "test \"`echo '$''{'cf_cv_pthread_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - save_CPPFLAGS=$CPPFLAGS - CPPFLAGS="-pthread $CPPFLAGS" - cat > conftest.$ac_ext < conftest.$ac_ext < int main() { - if(0) pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); - + if(0) pthread_create((pthread_t*) 0, + (pthread_attr_t*) 0, 0, 0); + ; return 0; } EOF -if { (eval echo configure:1695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_cv_pthread_flag=yes else @@ -1701,21 +1774,382 @@ else cf_cv_pthread_flag=no fi rm -f conftest* - CPPFLAGS=$save_CPPFLAGS - + CPPFLAGS=$save_CPPFLAGS + fi echo "$ac_t""$cf_cv_pthread_flag" 1>&6 - if test $cf_cv_pthread_flag = yes ; then - LTHREAD_LIBS="$LTHREAD_LIBS -pthread" + if test $cf_cv_pthread_flag = yes ; then + LTHREAD_LIBS="$LTHREAD_LIBS -pthread" + pthread_link=yes + fi fi - + + if test $pthread_link = no ; then + save_LIBS="$LIBS" + echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 +echo "configure:1793: checking for pthread_create in -lpthread" >&5 +ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpthread $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + pthread_link=yes + LTHREAD_LIBS="$LTHREAD_LIBS -lpthread" +else + echo "$ac_t""no" 1>&6 +fi + + LIBS="$save_LIBS" + fi + + if test $pthread_link = no ; then + save_LIBS="$LIBS" + echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 +echo "configure:1840: checking for pthread_create in -lc_r" >&5 +ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lc_r $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + pthread_link=yes + LTHREAD_LIBS="$LTHREAD_LIBS -lc_r" +else + echo "$ac_t""no" 1>&6 +fi + + LIBS="$save_LIBS" + fi + + if test $pthread_link = no ; then + save_LIBS="$LIBS" + echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 +echo "configure:1887: checking for pthread_create in -lpthread" >&5 +ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpthread -lmach -lexc -lc $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + pthread_link=yes + LTHREAD_DEFS="$LTHREAD_DEFS -DDEC_THREADS" + LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc" +else + echo "$ac_t""no" 1>&6 +fi + + LIBS="$save_LIBS" + fi + else LTHREAD_DEFS="-DNO_THREADS" fi fi +# check for strtok_r +save_LIBS="$LIBS" +LIBS="$save_LIBS $LTHREAD_LIBS" +echo $ac_n "checking for strtok_r in -lpthread""... $ac_c" 1>&6 +echo "configure:1941: checking for strtok_r in -lpthread" >&5 +ac_lib_var=`echo pthread'_'strtok_r | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpthread $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo pthread | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + +if test $ac_cv_lib_pthread_strtok_r = no ; then + echo $ac_n "checking for strtok_r in -lc_r""... $ac_c" 1>&6 +echo "configure:1990: checking for strtok_r in -lc_r" >&5 +ac_lib_var=`echo c_r'_'strtok_r | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lc_r $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo c_r | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + for ac_func in strtok_r pthread_init +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2039: 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 < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + if test $ac_cv_lib_c_r_strtok_r = yes ; then + LTHREAD_LIBS="$LTHREAD_LIBS -lc_r" + fi +else + for ac_func in strtok_r +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2098: 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 < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +fi + +LIBS="$save_LIBS" + ldbm_use="none" LDBM_DEFS= @@ -1725,12 +2159,12 @@ if test "$SLAPD_LDBM" = "yes" ; then if test $ldbm_prefer = any -o $ldbm_prefer = dbbtree \ -o $ldbm_prefer = dbhash ; then echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:1729: checking for dbopen" >&5 +echo "configure:2163: checking for dbopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -1774,7 +2208,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:1778: checking for dbopen in -ldb" >&5 +echo "configure:2212: checking for dbopen in -ldb" >&5 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1782,7 +2216,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1830,13 +2264,13 @@ fi fi echo $ac_n "checking for db2""... $ac_c" 1>&6 -echo "configure:1834: checking for db2" >&5 +echo "configure:2268: checking for db2" >&5 if eval "test \"`echo '$''{'cf_cv_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -1870,17 +2304,17 @@ echo "$ac_t""$cf_cv_db2" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1874: checking for $ac_hdr" >&5 +echo "configure:2308: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1921,7 +2355,7 @@ done if test $ldbm_prefer = any -o $ldbm_prefer = gdbm ; then echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:1925: checking for gdbm_open in -lgdbm" >&5 +echo "configure:2359: checking for gdbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1929,7 +2363,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1968,7 +2402,7 @@ fi fi if test $ldbm_prefer = any -o $ldbm_prefer = ndbm ; then echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:1972: checking for dbm_open in -ldbm" >&5 +echo "configure:2406: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1976,7 +2410,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2025,7 +2459,7 @@ fi if test "$SLAPD_TCP_WRAPPERS" = "yes" ; then echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6 -echo "configure:2029: checking for hosts_access in -lwrap" >&5 +echo "configure:2463: checking for hosts_access in -lwrap" >&5 ac_lib_var=`echo wrap'_'hosts_access | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2033,7 +2467,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lwrap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2076,12 +2510,12 @@ LIBTERMCAP="-ltermcap" # FreeBSD (and others) have crypt(3) in -lcrypt if test "$SLAPD_CRYPT" = "yes" ; then echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:2080: checking for crypt" >&5 +echo "configure:2514: checking for crypt" >&5 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -2123,7 +2557,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:2127: checking for crypt in -lcrypt" >&5 +echo "configure:2561: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2131,7 +2565,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2179,12 +2613,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:2183: checking for $ac_hdr that defines DIR" >&5 +echo "configure:2617: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -2192,7 +2626,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:2196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -2217,7 +2651,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:2221: checking for opendir in -ldir" >&5 +echo "configure:2655: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2225,7 +2659,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2258,7 +2692,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:2262: checking for opendir in -lx" >&5 +echo "configure:2696: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2266,7 +2700,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2300,12 +2734,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2304: checking for ANSI C header files" >&5 +echo "configure:2738: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2313,7 +2747,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2317: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2330,7 +2764,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2348,7 +2782,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2369,7 +2803,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2380,7 +2814,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -2404,12 +2838,12 @@ EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:2408: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:2842: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2425,7 +2859,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:2429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -2461,17 +2895,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2465: checking for $ac_hdr" >&5 +echo "configure:2899: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2499,12 +2933,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:2503: checking for uid_t in sys/types.h" >&5 +echo "configure:2937: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -2533,7 +2967,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:2537: checking type of array argument to getgroups" >&5 +echo "configure:2971: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2541,7 +2975,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -2580,7 +3014,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -2604,12 +3038,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:2608: checking for mode_t" >&5 +echo "configure:3042: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2637,12 +3071,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2641: checking for off_t" >&5 +echo "configure:3075: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2670,12 +3104,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:2674: checking for pid_t" >&5 +echo "configure:3108: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2703,12 +3137,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:2707: checking return type of signal handlers" >&5 +echo "configure:3141: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2725,7 +3159,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:2729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -2744,12 +3178,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2748: checking for size_t" >&5 +echo "configure:3182: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2777,12 +3211,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:2781: checking for uid_t in sys/types.h" >&5 +echo "configure:3215: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -2811,12 +3245,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:2815: checking for st_blksize in struct stat" >&5 +echo "configure:3249: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2824,7 +3258,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:2828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -2845,12 +3279,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:2849: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:3283: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2859,7 +3293,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:2863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -2880,12 +3314,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:2884: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:3318: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2893,7 +3327,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:2897: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -2915,12 +3349,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2919: checking for working const" >&5 +echo "configure:3353: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2991,7 +3425,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:2995: checking for 8-bit clean memcmp" >&5 +echo "configure:3429: 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 @@ -2999,7 +3433,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -3027,12 +3461,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3031: checking return type of signal handlers" >&5 +echo "configure:3465: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3049,7 +3483,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3068,12 +3502,12 @@ EOF echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:3072: checking for strftime" >&5 +echo "configure:3506: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -3118,7 +3552,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:3122: checking for strftime in -lintl" >&5 +echo "configure:3556: 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 @@ -3126,7 +3560,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3164,12 +3598,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:3168: checking for vprintf" >&5 +echo "configure:3602: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -3216,12 +3650,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:3220: checking for _doprnt" >&5 +echo "configure:3654: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -3269,7 +3703,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:3273: checking for wait3 that fills in rusage" >&5 +echo "configure:3707: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3277,7 +3711,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -3308,7 +3742,7 @@ main() { } } EOF -if { (eval echo configure:3312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -3344,16 +3778,17 @@ for ac_func in \ strtod \ strtol \ strtoul \ + strsep \ memcpy \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3352: checking for $ac_func" >&5 +echo "configure:3787: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3401,15 +3836,15 @@ fi done -for ac_func in strdup +for ac_func in strsep strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3408: checking for $ac_func" >&5 +echo "configure:3843: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3462,13 +3897,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:3466: checking declaration of sys_errlist" >&5 +echo "configure:3901: checking declaration of sys_errlist" >&5 if eval "test \"`echo '$''{'cf_cv_dcl_sys_errlist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3478,7 +3913,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:3482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_dcl_sys_errlist=yes else @@ -3499,20 +3934,20 @@ if test $cf_cv_dcl_sys_errlist = no ; then EOF echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6 -echo "configure:3503: checking existence of sys_errlist" >&5 +echo "configure:3938: checking existence of sys_errlist" >&5 if eval "test \"`echo '$''{'cf_cv_have_sys_errlist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:3516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index 54cfba2800..f1dd41b909 100644 --- a/configure.in +++ b/configure.in @@ -239,28 +239,97 @@ else AC_MSG_ERROR(unknown pthread version) fi - dnl Now the hard part, how to link - - AC_CACHE_CHECK([compiler for -pthread option], cf_cv_pthread_flag,[ - dnl save the CPPFLAGS - save_CPPFLAGS=$CPPFLAGS - CPPFLAGS="-pthread $CPPFLAGS" - AC_TRY_LINK([#include ],[ - if(0) pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); - ], cf_cv_pthread_flag=yes, cf_cv_pthread_flag=no) - dnl restore the CPPFLAGS - CPPFLAGS=$save_CPPFLAGS + AC_CACHE_CHECK([for LinuxThreads], cf_cv_linux_threads, [ + res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l` + if test "$res" -gt 0 ; then + cf_cv_linux_threads=yes + else + cf_cv_linux_threads=no + fi ]) - if test $cf_cv_pthread_flag = yes ; then - LTHREAD_LIBS="$LTHREAD_LIBS -pthread" + if test $cf_cv_linux_threads = yes ; then +dnl AC_DEFINE(HAVE_LINUX_THREADS,1) + LTHREAD_DEFS="$LTHREAD_DEFS -DHAVE_LINUX_THREADS" fi - + + dnl Now the hard part, how to link + + dnl A few platforms have pthread support in standard libraries + AC_CHECK_FUNC(pthread_create,pthread_link=yes,pthread_link=no) + + if test $pthread_link = no ; then + dnl try -pthread + AC_CACHE_CHECK([for pthread_create with -pthread], + cf_cv_pthread_flag, [ + dnl save the CPPFLAGS + save_CPPFLAGS=$CPPFLAGS + CPPFLAGS="-pthread $CPPFLAGS" + AC_TRY_LINK([#include ],[ + if(0) pthread_create((pthread_t*) 0, + (pthread_attr_t*) 0, 0, 0); + ], cf_cv_pthread_flag=yes, cf_cv_pthread_flag=no) + dnl restore the CPPFLAGS + CPPFLAGS=$save_CPPFLAGS + ]) + + if test $cf_cv_pthread_flag = yes ; then + LTHREAD_LIBS="$LTHREAD_LIBS -pthread" + pthread_link=yes + fi + fi + + if test $pthread_link = no ; then + dnl try -lpthread + save_LIBS="$LIBS" + AC_CHECK_LIB(pthread, pthread_create, [ + pthread_link=yes + LTHREAD_LIBS="$LTHREAD_LIBS -lpthread"]) + LIBS="$save_LIBS" + fi + + if test $pthread_link = no ; then + dnl try -lc_r + save_LIBS="$LIBS" + AC_CHECK_LIB(c_r, pthread_create, [ + pthread_link=yes + LTHREAD_LIBS="$LTHREAD_LIBS -lc_r"]) + LIBS="$save_LIBS" + fi + + if test $pthread_link = no ; then + dnl try DEC Threads + save_LIBS="$LIBS" + AC_CHECK_LIB(pthread, pthread_create, [ + pthread_link=yes + LTHREAD_DEFS="$LTHREAD_DEFS -DDEC_THREADS" + LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc"],, + [-lmach -lexc -lc]) + LIBS="$save_LIBS" + fi + else LTHREAD_DEFS="-DNO_THREADS" fi fi +# check for strtok_r +save_LIBS="$LIBS" +LIBS="$save_LIBS $LTHREAD_LIBS" +AC_CHECK_LIB(pthread,strtok_r) + +if test $ac_cv_lib_pthread_strtok_r = no ; then + AC_CHECK_LIB(c_r,strtok_r) + AC_CHECK_FUNCS(strtok_r pthread_init) + if test $ac_cv_lib_c_r_strtok_r = yes ; then + LTHREAD_LIBS="$LTHREAD_LIBS -lc_r" + fi +else + AC_CHECK_FUNCS(strtok_r) +fi + +LIBS="$save_LIBS" + ldbm_use="none" LDBM_DEFS= @@ -429,10 +498,11 @@ AC_CHECK_FUNCS( \ strtod \ strtol \ strtoul \ + strsep \ memcpy \ ) -AC_REPLACE_FUNCS(strdup) +AC_REPLACE_FUNCS(strsep strdup) dnl ---------------------------------------------------------------- # Check Configuration diff --git a/include/portable.h.in b/include/portable.h.in index d3ca50a3ec..323964157c 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -97,6 +97,9 @@ /* Define if you have the mktime function. */ #undef HAVE_MKTIME +/* Define if you have the pthread_init function. */ +#undef HAVE_PTHREAD_INIT + /* Define if you have the select function. */ #undef HAVE_SELECT @@ -112,12 +115,18 @@ /* Define if you have the strrchr function. */ #undef HAVE_STRRCHR +/* Define if you have the strsep function. */ +#undef HAVE_STRSEP + /* Define if you have the strstr function. */ #undef HAVE_STRSTR /* Define if you have the strtod function. */ #undef HAVE_STRTOD +/* Define if you have the strtok_r function. */ +#undef HAVE_STRTOK_R + /* Define if you have the strtol function. */ #undef HAVE_STRTOL @@ -178,6 +187,12 @@ /* Define if you have the header file. */ #undef HAVE_UNISTD_H +/* Define if you have the c_r library (-lc_r). */ +#undef HAVE_LIBC_R + +/* Define if you have the pthread library (-lpthread). */ +#undef HAVE_LIBPTHREAD + #ifdef HAVE_STDDEF_H # include #endif From f41beb9ecf88e57b86de6347b29374371f096b83 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sat, 19 Sep 1998 04:57:41 +0000 Subject: [PATCH 047/148] -pthread test should have mangled LIBS not CPPFLAGS --- configure | 6 +++--- configure.in | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/configure b/configure index 9f0e2fb0d1..f0de599955 100755 --- a/configure +++ b/configure @@ -1751,8 +1751,8 @@ if eval "test \"`echo '$''{'cf_cv_pthread_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - save_CPPFLAGS=$CPPFLAGS - CPPFLAGS="-pthread $CPPFLAGS" + save_LIBS="$LIBS" + LIBS="-pthread $LIBS" cat > conftest.$ac_ext <],[ if(0) pthread_create((pthread_t*) 0, (pthread_attr_t*) 0, 0, 0); ], cf_cv_pthread_flag=yes, cf_cv_pthread_flag=no) - dnl restore the CPPFLAGS - CPPFLAGS=$save_CPPFLAGS + dnl restore the LIBS + LIBS="$save_LIBS" ]) if test $cf_cv_pthread_flag = yes ; then From 832024aa2730bbbcac23cae057ce8ec90069568f Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sat, 19 Sep 1998 05:08:14 +0000 Subject: [PATCH 048/148] Optimizer eliminated the pthread_create() call. --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 6b5abd5d29..c3b54bace3 100644 --- a/configure.in +++ b/configure.in @@ -266,7 +266,7 @@ dnl AC_DEFINE(HAVE_LINUX_THREADS,1) save_LIBS="$LIBS" LIBS="-pthread $LIBS" AC_TRY_LINK([#include ],[ - if(0) pthread_create((pthread_t*) 0, + pthread_create((pthread_t*) 0, (pthread_attr_t*) 0, 0, 0); ], cf_cv_pthread_flag=yes, cf_cv_pthread_flag=no) dnl restore the LIBS From 5547d063c45af053148fccd44740f5137c71a739 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sat, 19 Sep 1998 05:09:57 +0000 Subject: [PATCH 049/148] Optimizer eliminated pthread_create call. --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index f0de599955..a865d1c682 100755 --- a/configure +++ b/configure @@ -1759,7 +1759,7 @@ else #include int main() { - if(0) pthread_create((pthread_t*) 0, + pthread_create((pthread_t*) 0, (pthread_attr_t*) 0, 0, 0); ; return 0; } From 9f1812ce635344cdc139429cf5855c22d361be6d Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sat, 19 Sep 1998 05:40:47 +0000 Subject: [PATCH 050/148] FreeBSD 2.X has POSIX_THREADS, but is missing sched_yield(). --- configure | 4 ++-- configure.in | 4 ++-- include/portable.h.in | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/configure b/configure index a865d1c682..ee61a39f97 100755 --- a/configure +++ b/configure @@ -2032,7 +2032,7 @@ else echo "$ac_t""no" 1>&6 fi - for ac_func in strtok_r pthread_init + for ac_func in strtok_r sched_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:2039: checking for $ac_func" >&5 @@ -2091,7 +2091,7 @@ done LTHREAD_LIBS="$LTHREAD_LIBS -lc_r" fi else - for ac_func in strtok_r + for ac_func in strtok_r sched_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:2098: checking for $ac_func" >&5 diff --git a/configure.in b/configure.in index c3b54bace3..f8f4b55271 100644 --- a/configure.in +++ b/configure.in @@ -320,12 +320,12 @@ AC_CHECK_LIB(pthread,strtok_r) if test $ac_cv_lib_pthread_strtok_r = no ; then AC_CHECK_LIB(c_r,strtok_r) - AC_CHECK_FUNCS(strtok_r pthread_init) + AC_CHECK_FUNCS(strtok_r sched_yield) if test $ac_cv_lib_c_r_strtok_r = yes ; then LTHREAD_LIBS="$LTHREAD_LIBS -lc_r" fi else - AC_CHECK_FUNCS(strtok_r) + AC_CHECK_FUNCS(strtok_r sched_yield) fi LIBS="$save_LIBS" diff --git a/include/portable.h.in b/include/portable.h.in index 323964157c..7121fb0936 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -97,8 +97,8 @@ /* Define if you have the mktime function. */ #undef HAVE_MKTIME -/* Define if you have the pthread_init function. */ -#undef HAVE_PTHREAD_INIT +/* Define if you have the sched_yield function. */ +#undef HAVE_SCHED_YIELD /* Define if you have the select function. */ #undef HAVE_SELECT From 2753c5176ac4778e8702f48e638b7b7096cacdb8 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sat, 19 Sep 1998 05:43:12 +0000 Subject: [PATCH 051/148] FreeBSD2 has POSIX_THREADS but is missing sched_yield() --- libraries/liblthread/thread.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/liblthread/thread.c b/libraries/liblthread/thread.c index a0bf1e5f5c..d0a62d5a81 100644 --- a/libraries/liblthread/thread.c +++ b/libraries/liblthread/thread.c @@ -491,15 +491,17 @@ pthread_kill( pthread_t tid, int sig ) #if defined ( POSIX_THREADS ) +#ifdef HAVE_SCHED_YIELD #ifdef HAVE_SCHED_H #include -#endif +#endif /* HAVE_SCHED_H */ /* POSIX Threads (final) does have a pthread_yield function */ void pthread_yield( void ) { sched_yield(); } +#endif /* HAVE_SCHED_YIELD */ #endif /* posix threads */ #endif /* dce pthreads */ From e01f6988a3e5bb9e9927c131eb4c4a5600655c3a Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sat, 19 Sep 1998 17:43:52 +0000 Subject: [PATCH 052/148] import generic headers --- include/ac/alloca.h | 24 ++++++++++++++++++++++++ include/ac/dirent.h | 23 +++++++++++++++++++++++ include/ac/string.h | 20 ++++++++++++++++++++ include/ac/time.h | 17 +++++++++++++++++ include/ac/unistd.h | 13 +++++++++++++ include/ac/wait.h | 17 +++++++++++++++++ 6 files changed, 114 insertions(+) create mode 100644 include/ac/alloca.h create mode 100644 include/ac/dirent.h create mode 100644 include/ac/string.h create mode 100644 include/ac/time.h create mode 100644 include/ac/unistd.h create mode 100644 include/ac/wait.h diff --git a/include/ac/alloca.h b/include/ac/alloca.h new file mode 100644 index 0000000000..80bcd44fee --- /dev/null +++ b/include/ac/alloca.h @@ -0,0 +1,24 @@ +/* Generic alloca.h */ + +#ifndef _AC_ALLOCA_H +#define _AC_ALLOCA_H + +/* AIX requires this to be the first thing in the file. */ +#ifdef __GNUC__ +# define alloca __builtin_alloca +#else +# if HAVE_ALLOCA_H +# include +# else +# ifdef _AIX +#pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +char *alloca (); +# endif +# endif +# endif +#endif + + +#endif /* _AC_ALLOCA_H */ diff --git a/include/ac/dirent.h b/include/ac/dirent.h new file mode 100644 index 0000000000..b6ec697318 --- /dev/null +++ b/include/ac/dirent.h @@ -0,0 +1,23 @@ +/* Generic dirent.h */ + +#ifndef _AC_DIRENT_H +#define _AC_DIRENT_H + +#if HAVE_DIRENT_H +# include +# define NAMLEN(dirent) strlen((dirent)->d_name) +#else +# define dirent direct +# define NAMLEN(dirent) (dirent)->d_namlen +# if HAVE_SYS_NDIR_H +# include +# endif +# if HAVE_SYS_DIR_H +# include +# endif +# if HAVE_NDIR_H +# include +# endif +#endif + +#endif /* _AC_DIRENT_H */ diff --git a/include/ac/string.h b/include/ac/string.h new file mode 100644 index 0000000000..4123f4c9e3 --- /dev/null +++ b/include/ac/string.h @@ -0,0 +1,20 @@ +/* Generic string.h */ + +#ifndef _AC_STRING_H +#define _AC_STRING_H + +#if STDC_HEADERS +# include +#else +# ifndef HAVE_STRCHR +# define strchr index +# define strrchr rindex +# endif +char *strchr (), *strrchr (); +# ifndef HAVE_MEMCPY +# define memcpy(d, s, n) bcopy ((s), (d), (n)) +# define memmove(d, s, n) bcopy ((s), (d), (n)) +# endif +#endif + +#endif /* _AC_STRING_H */ diff --git a/include/ac/time.h b/include/ac/time.h new file mode 100644 index 0000000000..9cc89f43b4 --- /dev/null +++ b/include/ac/time.h @@ -0,0 +1,17 @@ +/* Generic time.h */ + +#ifndef _AC_TIME_H +#define _AC_TIME_H + +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif + +#endif /* _AC_TIME_H */ diff --git a/include/ac/unistd.h b/include/ac/unistd.h new file mode 100644 index 0000000000..f524f99b2f --- /dev/null +++ b/include/ac/unistd.h @@ -0,0 +1,13 @@ +/* Generic unistd.h */ + +#ifndef _AC_UNISTD_H +#define _AC_UNISTD_H + +#if HAVE_UNISTD_H +# include +# include +#endif + +/* use _POSIX_VERSION for POSIX.1 code */ + +#endif /* _AC_UNISTD_H */ diff --git a/include/ac/wait.h b/include/ac/wait.h new file mode 100644 index 0000000000..ab69a883a7 --- /dev/null +++ b/include/ac/wait.h @@ -0,0 +1,17 @@ +/* Generic wait.h */ + +#ifndef _AC_WAIT_H +#define _AC_WAIT_H + +#include +#if HAVE_SYS_WAIT_H +# include +#endif +#ifndef WEXITSTATUS +# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) +#endif +#ifndef WIFEXITED +# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif + +#endif /* _AC_WAIT_H */ From b5d6d5e2a8ba30c4b3b5333fa6a5ddcae22e065c Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sat, 19 Sep 1998 20:57:14 +0000 Subject: [PATCH 053/148] Allow OpenLDAP to be built without LDBM. --- configure | 419 ++++++++++++++++++-------------- configure.in | 47 +++- include/portable.h.in | 3 - libraries/libldbm/ldbm.c | 118 ++++++++- servers/slapd/tools/Makefile.in | 51 +++- 5 files changed, 421 insertions(+), 217 deletions(-) diff --git a/configure b/configure index ee61a39f97..2178735689 100755 --- a/configure +++ b/configure @@ -14,10 +14,14 @@ ac_default_prefix=/usr/local ac_default_prefix=/usr/local ac_help="$ac_help --enable-debug enable debugging (yes)" +ac_help="$ac_help + --enable-syslog enable syslog support (no)" ac_help="$ac_help --enable-libui enable library user interface (yes)" ac_help="$ac_help --enable-cache enable caching (yes)" +ac_help="$ac_help + --enable-dns enable dns support (no)" ac_help="$ac_help --enable-referrals enable referrals (yes)" ac_help="$ac_help @@ -591,7 +595,7 @@ ac_config_sub=$ac_aux_dir/config.sub ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. echo $ac_n "checking arguments""... $ac_c" 1>&6 -echo "configure:595: checking arguments" >&5 +echo "configure:599: checking arguments" >&5 # Check whether --enable-debug or --disable-debug was given. @@ -608,6 +612,21 @@ else enableval=yes LDAP_DEBUG=yes +fi +# Check whether --enable-syslog or --disable-syslog was given. +if test "${enable_syslog+set}" = set; then + enableval="$enable_syslog" + test "$enableval" != yes && enableval=no + if test "$enableval" != "no" ; then + + LDAP_CLDAP=yes + else + LDAP_CLDAP=no + fi +else + enableval=no + LDAP_CLDAP=no + fi # Check whether --enable-libui or --disable-libui was given. if test "${enable_libui+set}" = set; then @@ -638,6 +657,21 @@ else enableval=yes LDAP_CACHE=yes +fi +# Check whether --enable-dns or --disable-dns was given. +if test "${enable_dns+set}" = set; then + enableval="$enable_dns" + test "$enableval" != yes && enableval=no + if test "$enableval" != "no" ; then + + LDAP_DNS=yes + else + LDAP_DNS=no + fi +else + enableval=no + LDAP_DNS=no + fi # Check whether --enable-referrals or --disable-referrals was given. if test "${enable_referrals+set}" = set; then @@ -948,7 +982,7 @@ fi echo "$ac_t""done" 1>&6 echo $ac_n "checking LDBM preferences""... $ac_c" 1>&6 -echo "configure:952: checking LDBM preferences" >&5 +echo "configure:986: checking LDBM preferences" >&5 ldbm_prefer=any if test "$opt_ndbm" = yes ; then @@ -976,15 +1010,21 @@ fi ## general LDAP arguments LDAP_DEFS= LDAP_LIBS= +LDBM_DEFS= +LDBM_LIBS= +LUTIL_DEFS= +LUTIL_LIBS= if test "$LDAP_DEBUG" = "yes" ; then LDAP_DEFS="$LDAP_DEFS -DLDAP_DEBUG" fi +if test "$LDAP_SYSLOG" = "yes" ; then + LDAP_DEFS="$LDAP_DEFS -DLDAP_SYSLOG" +fi +if test "$LDAP_DNS" = "yes" ; then + LDAP_DEFS="$LDAP_DEFS -DLDAP_DNS" +fi if test "$LDAP_REFERRALS" = "yes" ; then - cat >> confdefs.h <<\EOF -#define LDAP_REFERRALS 1 -EOF - LDAP_DEFS="$LDAP_DEFS -DLDAP_REFERRALS" fi if test "$LDAP_CACHE" = "no" ; then @@ -1009,7 +1049,6 @@ LDAPD_LIBS= ## slapd arguments SLAPD_DEFS= SLAPD_LIBS= -LUTIL_DEFS= if test "$SLAPD_PHONETIC" = "yes" ; then cat >> confdefs.h <<\EOF #define SLAPD_PHONETIC 1 @@ -1026,8 +1065,10 @@ if test "$SLAPD_SHA1" = "yes" ; then LUTIL_DEFS="$LUTIL_DEFS -DLDAP_SHA1" fi +BUILD_LDBM=no if test "$SLAPD_LDBM" = "yes" ; then - SLAPD_DEFS="$SLAPD_DEFS -DLDAP_LDBM" + BUILD_LDBM=yes + LDBM_DEFS="$LDBM_DEFS -DLDAP_LDBM" fi if test "$SLAPD_PASSWD" = "yes" ; then SLAPD_DEFS="$SLAPD_DEFS -DLDAP_PASSWD" @@ -1043,7 +1084,7 @@ SLURPD_LIBS= # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1047: checking for $ac_word" >&5 +echo "configure:1088: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1072,7 +1113,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1076: checking for $ac_word" >&5 +echo "configure:1117: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1120,7 +1161,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1124: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1165: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1130,11 +1171,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1154,12 +1195,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1158: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1199: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1163: checking whether we are using GNU C" >&5 +echo "configure:1204: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1168,7 +1209,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1183,7 +1224,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1187: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1228: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1211,7 +1252,7 @@ else fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1215: checking how to run the C preprocessor" >&5 +echo "configure:1256: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1226,13 +1267,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1243,13 +1284,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1273,13 +1314,13 @@ echo "$ac_t""$CPP" 1>&6 if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:1277: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:1318: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP @@ -1297,7 +1338,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -1320,7 +1361,7 @@ fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1324: checking whether ln -s works" >&5 +echo "configure:1365: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1351,7 +1392,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1355: checking for a BSD compatible install" >&5 +echo "configure:1396: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1403,7 +1444,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1407: checking for $ac_word" >&5 +echo "configure:1448: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1430,7 +1471,7 @@ else fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1434: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1475: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1460,7 +1501,7 @@ fi # Extract the first word of "sendmail", so it can be a program name with args. set dummy sendmail; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1464: checking for $ac_word" >&5 +echo "configure:1505: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1492,7 +1533,7 @@ fi # Extract the first word of "vi", so it can be a program name with args. set dummy vi; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1496: checking for $ac_word" >&5 +echo "configure:1537: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1524,7 +1565,7 @@ fi # Extract the first word of "finger", so it can be a program name with args. set dummy finger; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1528: checking for $ac_word" >&5 +echo "configure:1569: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1564,17 +1605,17 @@ else do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1568: checking for $ac_hdr" >&5 +echo "configure:1609: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1578: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1603,13 +1644,13 @@ done if test "$ac_cv_header_pthread_h" = yes ; then echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6 -echo "configure:1607: checking POSIX thread version" >&5 +echo "configure:1648: checking POSIX thread version" >&5 if eval "test \"`echo '$''{'cf_cv_pthread_version'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -1631,7 +1672,7 @@ rm -f conftest* cat > conftest.$ac_ext < @@ -1673,7 +1714,7 @@ echo "$ac_t""$cf_cv_pthread_version" 1>&6 fi echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 -echo "configure:1677: checking for LinuxThreads" >&5 +echo "configure:1718: checking for LinuxThreads" >&5 if eval "test \"`echo '$''{'cf_cv_linux_threads'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1695,12 +1736,12 @@ echo "$ac_t""$cf_cv_linux_threads" 1>&6 echo $ac_n "checking for pthread_create""... $ac_c" 1>&6 -echo "configure:1699: checking for pthread_create" >&5 +echo "configure:1740: checking for pthread_create" >&5 if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_pthread_create=yes" else @@ -1746,7 +1787,7 @@ fi if test $pthread_link = no ; then echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6 -echo "configure:1750: checking for pthread_create with -pthread" >&5 +echo "configure:1791: checking for pthread_create with -pthread" >&5 if eval "test \"`echo '$''{'cf_cv_pthread_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1754,7 +1795,7 @@ else save_LIBS="$LIBS" LIBS="-pthread $LIBS" cat > conftest.$ac_ext < int main() { @@ -1764,7 +1805,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_cv_pthread_flag=yes else @@ -1789,7 +1830,7 @@ echo "$ac_t""$cf_cv_pthread_flag" 1>&6 if test $pthread_link = no ; then save_LIBS="$LIBS" echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:1793: checking for pthread_create in -lpthread" >&5 +echo "configure:1834: checking for pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1797,7 +1838,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1836,7 +1877,7 @@ fi if test $pthread_link = no ; then save_LIBS="$LIBS" echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:1840: checking for pthread_create in -lc_r" >&5 +echo "configure:1881: checking for pthread_create in -lc_r" >&5 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1844,7 +1885,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1883,7 +1924,7 @@ fi if test $pthread_link = no ; then save_LIBS="$LIBS" echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:1887: checking for pthread_create in -lpthread" >&5 +echo "configure:1928: checking for pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1891,7 +1932,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread -lmach -lexc -lc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1933,11 +1974,11 @@ fi fi fi -# check for strtok_r +# check for strtok_r (and presumely other reentrant functions) save_LIBS="$LIBS" LIBS="$save_LIBS $LTHREAD_LIBS" echo $ac_n "checking for strtok_r in -lpthread""... $ac_c" 1>&6 -echo "configure:1941: checking for strtok_r in -lpthread" >&5 +echo "configure:1982: checking for strtok_r in -lpthread" >&5 ac_lib_var=`echo pthread'_'strtok_r | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1945,7 +1986,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1985,8 +2026,9 @@ fi if test $ac_cv_lib_pthread_strtok_r = no ; then + LIBS="$save_LIBS $LTHREAD_LIBS" echo $ac_n "checking for strtok_r in -lc_r""... $ac_c" 1>&6 -echo "configure:1990: checking for strtok_r in -lc_r" >&5 +echo "configure:2032: checking for strtok_r in -lc_r" >&5 ac_lib_var=`echo c_r'_'strtok_r | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1994,7 +2036,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2035,12 +2077,12 @@ fi for ac_func in strtok_r sched_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2039: checking for $ac_func" >&5 +echo "configure:2081: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2094,12 +2136,12 @@ else for ac_func in strtok_r sched_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2098: checking for $ac_func" >&5 +echo "configure:2140: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2152,19 +2194,16 @@ LIBS="$save_LIBS" ldbm_use="none" -LDBM_DEFS= -LDBM_LIBS= - if test "$SLAPD_LDBM" = "yes" ; then if test $ldbm_prefer = any -o $ldbm_prefer = dbbtree \ -o $ldbm_prefer = dbhash ; then echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:2163: checking for dbopen" >&5 +echo "configure:2202: checking for dbopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -2208,7 +2247,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:2212: checking for dbopen in -ldb" >&5 +echo "configure:2251: checking for dbopen in -ldb" >&5 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2216,7 +2255,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2264,13 +2303,13 @@ fi fi echo $ac_n "checking for db2""... $ac_c" 1>&6 -echo "configure:2268: checking for db2" >&5 +echo "configure:2307: checking for db2" >&5 if eval "test \"`echo '$''{'cf_cv_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -2304,17 +2343,17 @@ echo "$ac_t""$cf_cv_db2" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2308: checking for $ac_hdr" >&5 +echo "configure:2347: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2357: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2355,7 +2394,7 @@ done if test $ldbm_prefer = any -o $ldbm_prefer = gdbm ; then echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:2359: checking for gdbm_open in -lgdbm" >&5 +echo "configure:2398: checking for gdbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2363,7 +2402,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2402,7 +2441,7 @@ fi fi if test $ldbm_prefer = any -o $ldbm_prefer = ndbm ; then echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:2406: checking for dbm_open in -ldbm" >&5 +echo "configure:2445: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2410,7 +2449,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2459,7 +2498,7 @@ fi if test "$SLAPD_TCP_WRAPPERS" = "yes" ; then echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6 -echo "configure:2463: checking for hosts_access in -lwrap" >&5 +echo "configure:2502: checking for hosts_access in -lwrap" >&5 ac_lib_var=`echo wrap'_'hosts_access | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2467,7 +2506,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lwrap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2510,12 +2549,12 @@ LIBTERMCAP="-ltermcap" # FreeBSD (and others) have crypt(3) in -lcrypt if test "$SLAPD_CRYPT" = "yes" ; then echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:2514: checking for crypt" >&5 +echo "configure:2553: checking for crypt" >&5 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -2557,7 +2596,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:2561: checking for crypt in -lcrypt" >&5 +echo "configure:2600: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2565,7 +2604,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2613,12 +2652,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:2617: checking for $ac_hdr that defines DIR" >&5 +echo "configure:2656: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -2626,7 +2665,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:2630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -2651,7 +2690,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:2655: checking for opendir in -ldir" >&5 +echo "configure:2694: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2659,7 +2698,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2692,7 +2731,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:2696: checking for opendir in -lx" >&5 +echo "configure:2735: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2700,7 +2739,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2734,12 +2773,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2738: checking for ANSI C header files" >&5 +echo "configure:2777: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2747,7 +2786,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2764,7 +2803,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2782,7 +2821,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2803,7 +2842,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2814,7 +2853,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -2838,12 +2877,12 @@ EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:2842: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:2881: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2859,7 +2898,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:2863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -2895,17 +2934,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2899: checking for $ac_hdr" >&5 +echo "configure:2938: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2933,12 +2972,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:2937: checking for uid_t in sys/types.h" >&5 +echo "configure:2976: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -2967,7 +3006,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:2971: checking type of array argument to getgroups" >&5 +echo "configure:3010: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2975,7 +3014,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -3014,7 +3053,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -3038,12 +3077,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3042: checking for mode_t" >&5 +echo "configure:3081: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3071,12 +3110,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3075: checking for off_t" >&5 +echo "configure:3114: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3104,12 +3143,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3108: checking for pid_t" >&5 +echo "configure:3147: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3137,12 +3176,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3141: checking return type of signal handlers" >&5 +echo "configure:3180: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3159,7 +3198,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3178,12 +3217,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3182: checking for size_t" >&5 +echo "configure:3221: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3211,12 +3250,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3215: checking for uid_t in sys/types.h" >&5 +echo "configure:3254: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3245,12 +3284,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:3249: checking for st_blksize in struct stat" >&5 +echo "configure:3288: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3258,7 +3297,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:3262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -3279,12 +3318,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3283: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:3322: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3293,7 +3332,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -3314,12 +3353,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:3318: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:3357: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3327,7 +3366,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:3331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -3349,12 +3388,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3353: checking for working const" >&5 +echo "configure:3392: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3425,7 +3464,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:3429: checking for 8-bit clean memcmp" >&5 +echo "configure:3468: 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 @@ -3433,7 +3472,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -3461,12 +3500,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3465: checking return type of signal handlers" >&5 +echo "configure:3504: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3483,7 +3522,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3502,12 +3541,12 @@ EOF echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:3506: checking for strftime" >&5 +echo "configure:3545: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -3552,7 +3591,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:3556: checking for strftime in -lintl" >&5 +echo "configure:3595: 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 @@ -3560,7 +3599,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3598,12 +3637,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:3602: checking for vprintf" >&5 +echo "configure:3641: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -3650,12 +3689,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:3654: checking for _doprnt" >&5 +echo "configure:3693: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -3703,7 +3742,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:3707: checking for wait3 that fills in rusage" >&5 +echo "configure:3746: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3711,7 +3750,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -3742,7 +3781,7 @@ main() { } } EOF -if { (eval echo configure:3746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -3783,12 +3822,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3787: checking for $ac_func" >&5 +echo "configure:3826: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3836,15 +3875,15 @@ fi done -for ac_func in strsep strdup +for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3843: checking for $ac_func" >&5 +echo "configure:3882: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3897,13 +3936,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:3901: checking declaration of sys_errlist" >&5 +echo "configure:3940: checking declaration of sys_errlist" >&5 if eval "test \"`echo '$''{'cf_cv_dcl_sys_errlist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3913,7 +3952,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:3917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_dcl_sys_errlist=yes else @@ -3934,20 +3973,20 @@ if test $cf_cv_dcl_sys_errlist = no ; then EOF echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6 -echo "configure:3938: checking existence of sys_errlist" >&5 +echo "configure:3977: checking existence of sys_errlist" >&5 if eval "test \"`echo '$''{'cf_cv_have_sys_errlist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:3951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_cv_have_sys_errlist=yes else @@ -3965,7 +4004,6 @@ fi - @@ -3978,6 +4016,10 @@ fi + + + + @@ -4168,9 +4210,9 @@ s%@LIBTERMCAP@%$LIBTERMCAP%g s%@LIBOBJS@%$LIBOBJS%g s%@BUILD_LDAPD@%$BUILD_LDAPD%g s%@BUILD_SLAPD@%$BUILD_SLAPD%g -s%@SLAPD_LDBM@%$SLAPD_LDBM%g -s%@SLAPD_PASSWD@%$SLAPD_PASSWD%g -s%@SLAPD_SHELL@%$SLAPD_SHELL%g +s%@BUILD_LDBM@%$BUILD_LDBM%g +s%@BUILD_PASSWD@%$BUILD_PASSWD%g +s%@BUILD_SHELL@%$BUILD_SHELL%g s%@BUILD_SLURPD@%$BUILD_SLURPD%g s%@LDAP_DEFS@%$LDAP_DEFS%g s%@LDAP_LIBS@%$LDAP_LIBS%g @@ -4178,6 +4220,9 @@ s%@LDAPD_DEFS@%$LDAPD_DEFS%g s%@LDAPD_LIBS@%$LDAPD_LIBS%g s%@SLAPD_DEFS@%$SLAPD_DEFS%g s%@SLAPD_LIBS@%$SLAPD_LIBS%g +s%@SLAPD_LDBM@%$SLAPD_LDBM%g +s%@SLAPD_PASSWD@%$SLAPD_PASSWD%g +s%@SLAPD_SHELL@%$SLAPD_SHELL%g s%@SLURPD_DEFS@%$SLURPD_DEFS%g s%@SLURPD_LIBS@%$SLURPD_LIBS%g s%@LDBM_DEFS@%$LDBM_DEFS%g diff --git a/configure.in b/configure.in index f8f4b55271..846c08820b 100644 --- a/configure.in +++ b/configure.in @@ -24,10 +24,14 @@ AC_PREFIX_DEFAULT(/usr/local) dnl General "enable" options CF_ARG_OPTION(debug,[ --enable-debug enable debugging (yes)],[ LDAP_DEBUG=no],[LDAP_DEBUG=yes],yes)dnl +CF_ARG_OPTION(syslog,[ --enable-syslog enable syslog support (no)],[ + LDAP_CLDAP=yes],[LDAP_CLDAP=no],no)dnl CF_ARG_OPTION(libui,[ --enable-libui enable library user interface (yes)],[ LDAP_LIBUI=no],[LDAP_LIBUI=yes],yes)dnl CF_ARG_OPTION(cache,[ --enable-cache enable caching (yes)],[ LDAP_CACHE=no],[LDAP_CACHE=yes],yes)dnl +CF_ARG_OPTION(dns,[ --enable-dns enable dns support (no)],[ + LDAP_DNS=yes],[LDAP_DNS=no],no)dnl CF_ARG_OPTION(referrals,[ --enable-referrals enable referrals (yes)],[ LDAP_REFERRALS=no],[LDAP_REFERRALS=yes],yes)dnl @@ -119,12 +123,23 @@ fi ## general LDAP arguments LDAP_DEFS= LDAP_LIBS= +LDBM_DEFS= +LDBM_LIBS= +LUTIL_DEFS= +LUTIL_LIBS= if test "$LDAP_DEBUG" = "yes" ; then LDAP_DEFS="$LDAP_DEFS -DLDAP_DEBUG" fi +if test "$LDAP_SYSLOG" = "yes" ; then + LDAP_DEFS="$LDAP_DEFS -DLDAP_SYSLOG" +fi +if test "$LDAP_DNS" = "yes" ; then +dnl AC_DEFINE(LDAP_DNS,1) + LDAP_DEFS="$LDAP_DEFS -DLDAP_DNS" +fi if test "$LDAP_REFERRALS" = "yes" ; then - AC_DEFINE(LDAP_REFERRALS,1) +dnl AC_DEFINE(LDAP_REFERRALS,1) LDAP_DEFS="$LDAP_DEFS -DLDAP_REFERRALS" fi if test "$LDAP_CACHE" = "no" ; then @@ -143,7 +158,6 @@ LDAPD_LIBS= ## slapd arguments SLAPD_DEFS= SLAPD_LIBS= -LUTIL_DEFS= if test "$SLAPD_PHONETIC" = "yes" ; then AC_DEFINE(SLAPD_PHONETIC,1) SLAPD_DEFS="$SLAPD_DEFS -DSOUNDEX" @@ -159,9 +173,11 @@ dnl AC_DEFINE(SLAPD_SHA1,1) LUTIL_DEFS="$LUTIL_DEFS -DLDAP_SHA1" fi +BUILD_LDBM=no if test "$SLAPD_LDBM" = "yes" ; then dnl AC_DEFINE(SLAPD_LDBM,1) - SLAPD_DEFS="$SLAPD_DEFS -DLDAP_LDBM" + BUILD_LDBM=yes + LDBM_DEFS="$LDBM_DEFS -DLDAP_LDBM" fi if test "$SLAPD_PASSWD" = "yes" ; then dnl AC_DEFINE(SLAPD_PASSWD,1) @@ -313,12 +329,13 @@ dnl AC_DEFINE(HAVE_LINUX_THREADS,1) fi fi -# check for strtok_r +# check for strtok_r (and presumely other reentrant functions) save_LIBS="$LIBS" LIBS="$save_LIBS $LTHREAD_LIBS" AC_CHECK_LIB(pthread,strtok_r) if test $ac_cv_lib_pthread_strtok_r = no ; then + LIBS="$save_LIBS $LTHREAD_LIBS" AC_CHECK_LIB(c_r,strtok_r) AC_CHECK_FUNCS(strtok_r sched_yield) if test $ac_cv_lib_c_r_strtok_r = yes ; then @@ -332,9 +349,6 @@ LIBS="$save_LIBS" ldbm_use="none" -LDBM_DEFS= -LDBM_LIBS= - if test "$SLAPD_LDBM" = "yes" ; then if test $ldbm_prefer = any -o $ldbm_prefer = dbbtree \ -o $ldbm_prefer = dbhash ; then @@ -502,27 +516,30 @@ AC_CHECK_FUNCS( \ memcpy \ ) -AC_REPLACE_FUNCS(strsep strdup) +AC_REPLACE_FUNCS(strdup) dnl ---------------------------------------------------------------- # Check Configuration CF_SYS_ERRLIST +dnl ---------------------------------------------------------------- AC_SUBST(BUILD_LDAPD) - AC_SUBST(BUILD_SLAPD) - AC_SUBST(SLAPD_LDBM) - AC_SUBST(SLAPD_PASSWD) - AC_SUBST(SLAPD_SHELL) - + AC_SUBST(BUILD_LDBM) + AC_SUBST(BUILD_PASSWD) + AC_SUBST(BUILD_SHELL) AC_SUBST(BUILD_SLURPD) + AC_SUBST(LDAP_DEFS) AC_SUBST(LDAP_LIBS) AC_SUBST(LDAPD_DEFS) AC_SUBST(LDAPD_LIBS) AC_SUBST(SLAPD_DEFS) AC_SUBST(SLAPD_LIBS) + AC_SUBST(SLAPD_LDBM) + AC_SUBST(SLAPD_PASSWD) + AC_SUBST(SLAPD_SHELL) AC_SUBST(SLURPD_DEFS) AC_SUBST(SLURPD_LIBS) AC_SUBST(LDBM_DEFS) @@ -532,6 +549,10 @@ AC_SUBST(LTHREAD_LIBS) AC_SUBST(LUTIL_DEFS) AC_SUBST(LUTIL_LIBS) +dnl ---------------------------------------------------------------- +dnl final output +dnl + dnl AC_OUTPUT( \ dnl contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \ dnl contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \ diff --git a/include/portable.h.in b/include/portable.h.in index 7121fb0936..4812407c36 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -79,9 +79,6 @@ /* define this to remove -lldap cache support */ #undef LDAP_NOCACHE -/* define this for LDAP referrals support */ -#undef LDAP_REFERRALS - /* define this for phonetic support */ #undef SLAPD_PHONETIC diff --git a/libraries/libldbm/ldbm.c b/libraries/libldbm/ldbm.c index 6d15e4629e..33bd1888a7 100644 --- a/libraries/libldbm/ldbm.c +++ b/libraries/libldbm/ldbm.c @@ -1,5 +1,13 @@ /* ldbm.c - ldap dbm compatibility routines */ +/* Patched for Berkeley DB version 2.0; /KSp; 98/02/23 + * + * - basic implementation; 1998/02/23, /KSp + * - DB_DBT_MALLOC ; 1998/03/22, /KSp + */ + +#ifdef LDAP_LDBM + #include #include "ldbm.h" @@ -121,10 +129,41 @@ ldbm_errno( LDBM ldbm ) * * *****************************************************************/ +#ifdef LDBM_USE_DB2 +/************************************************* + * * + * A malloc routine for use with DB_DBT_MALLOC * + * * + *************************************************/ + +#include + + +void * +ldbm_malloc( size_t size ) +{ + return( calloc( 1, size )); +} + +#endif + + LDBM ldbm_open( char *name, int rw, int mode, int dbcachesize ) { - LDBM ret; + LDBM ret = NULL; + +#ifdef LDBM_USE_DB2 + DB_INFO dbinfo; + + memset( &dbinfo, 0, sizeof( dbinfo )); + dbinfo.db_cachesize = dbcachesize; + dbinfo.db_pagesize = DEFAULT_DB_PAGE_SIZE; + dbinfo.db_malloc = ldbm_malloc; + + db_open( name, DB_TYPE, rw, mode, NULL, &dbinfo, &ret ); + +#else void *info; BTREEINFO binfo; HASHINFO hinfo; @@ -140,14 +179,22 @@ ldbm_open( char *name, int rw, int mode, int dbcachesize ) } else { info = NULL; } + ret = dbopen( name, rw, mode, DB_TYPE, info ); + +#endif + return( ret ); } void ldbm_close( LDBM ldbm ) { +#ifdef LDBM_USE_DB2 + (*ldbm->close)( ldbm, 0 ); +#else (*ldbm->close)( ldbm ); +#endif } void @@ -167,6 +214,10 @@ ldbm_datum_dup( LDBM ldbm, Datum data ) { Datum dup; +#ifdef LDBM_USE_DB2 + memset( &dup, 0, sizeof( dup )); +#endif + if ( data.dsize == 0 ) { dup.dsize = 0; dup.dptr = NULL; @@ -186,9 +237,18 @@ ldbm_fetch( LDBM ldbm, Datum key ) Datum data; int rc; +#ifdef LDBM_USE_DB2 + memset( &data, 0, sizeof( data )); + + data.flags = DB_DBT_MALLOC; + + if ( (rc = (*ldbm->get)( ldbm, NULL, &key, &data, 0 )) != 0 ) { + if ( data.dptr ) free( data.dptr ); +#else if ( (rc = (*ldbm->get)( ldbm, &key, &data, 0 )) == 0 ) { data = ldbm_datum_dup( ldbm, data ); } else { +#endif data.dptr = NULL; data.dsize = 0; } @@ -201,7 +261,12 @@ ldbm_store( LDBM ldbm, Datum key, Datum data, int flags ) { int rc; +#ifdef LDBM_USE_DB2 + rc = (*ldbm->put)( ldbm, NULL, &key, &data, flags & ~LDBM_SYNC ); + rc = (-1 ) * rc; +#else rc = (*ldbm->put)( ldbm, &key, &data, flags & ~LDBM_SYNC ); +#endif if ( flags & LDBM_SYNC ) (*ldbm->sync)( ldbm, 0 ); return( rc ); @@ -212,38 +277,88 @@ ldbm_delete( LDBM ldbm, Datum key ) { int rc; +#ifdef LDBM_USE_DB2 + rc = (*ldbm->del)( ldbm, NULL, &key, 0 ); + rc = (-1 ) * rc; +#else rc = (*ldbm->del)( ldbm, &key, 0 ); +#endif (*ldbm->sync)( ldbm, 0 ); return( rc ); } Datum +#ifdef LDBM_USE_DB2 +ldbm_firstkey( LDBM ldbm, DBC **dbch ) +#else ldbm_firstkey( LDBM ldbm ) +#endif { Datum key, data; int rc; +#ifdef LDBM_USE_DB2 + DBC *dbci; + + memset( &key, 0, sizeof( key )); + memset( &data, 0, sizeof( data )); + + key.flags = data.flags = DB_DBT_MALLOC; + + /* acquire a cursor for the DB */ + if ( (*ldbm->cursor)( ldbm, NULL, &dbci )) { + return( key ); + } else { + *dbch = dbci; + if ( (*dbci->c_get)( dbci, &key, &data, DB_NEXT ) == 0 ) { + if ( data.dptr ) free( data.dptr ); +#else if ( (rc = (*ldbm->seq)( ldbm, &key, &data, R_FIRST )) == 0 ) { key = ldbm_datum_dup( ldbm, key ); +#endif } else { key.dptr = NULL; key.dsize = 0; } + +#ifdef LDBM_USE_DB2 + } +#endif + return( key ); } Datum +#ifdef LDBM_USE_DB2 +ldbm_nextkey( LDBM ldbm, Datum key, DBC *dbcp ) +#else ldbm_nextkey( LDBM ldbm, Datum key ) +#endif { Datum data; int rc; +#ifdef LDBM_USE_DB2 + void *oldKey = key.dptr; + + memset( &data, 0, sizeof( data )); + + data.flags = DB_DBT_MALLOC; + + if ( (*dbcp->c_get)( dbcp, &key, &data, DB_NEXT ) == 0 ) { + if ( data.dptr ) free( data.dptr ); +#else if ( (rc = (*ldbm->seq)( ldbm, &key, &data, R_NEXT )) == 0 ) { key = ldbm_datum_dup( ldbm, key ); +#endif } else { key.dptr = NULL; key.dsize = 0; } +#ifdef LDBM_USE_DB2 + if ( oldKey ) free( oldKey ); +#endif + return( key ); } @@ -346,3 +461,4 @@ ldbm_errno( LDBM ldbm ) #endif /* ndbm */ #endif /* db */ #endif /* gdbm */ +#endif /* ldbm */ diff --git a/servers/slapd/tools/Makefile.in b/servers/slapd/tools/Makefile.in index 69726d9988..5c3127eeb2 100644 --- a/servers/slapd/tools/Makefile.in +++ b/servers/slapd/tools/Makefile.in @@ -30,7 +30,16 @@ OBJS2 = ../config.o ../ch_malloc.o ../backend.o ../charray.o \ ../dn.o ../filter.o ../str2filter.o ../ava.o ../init.o \ ../schemaparse.o ../strdup.o -all-local: build-edb2ldif build-chlog2replog $(PROGRAMS) +all-local: build-ldbm build-edb2ldif build-chlog2replog + +build-ldbm: FORCE + @if [ "$(BUILD_LDBM)" = "yes" ]; then \ + $(MAKE) $(MFLAGS) ldbm-tools; \ + else \ + echo "run configure with --with-ldbm to build LDBM tools"; \ + fi + +ldbm-tools: $(PROGRAMS) XDEFS = @SLAPD_DEFS@ @LDBM_DEFS@ @LTHREAD_DEFS@ XLIBS = @SLAPD_LIBS@ -lavl -lldbm @LDBM_LIBS@ -llthread @LTHREAD_LIBS@ -llutil @LUTIL_LIBS@ @@ -95,21 +104,37 @@ clean-local: FORCE $(RM) $(PROGRAMS) $(XPROGRAMS) $(XSRCS) edb2-vers.c *.o a.out core depend-local: FORCE - @if [ "$(HAVE_ISODE)" = "yes" ]; then \ - DEPENDEXTRAS="$(ISODEINCLUDEFLAG) chlog2replog.c $(EDB2LDIFSRCS)"; \ + @DEPEND=no ; DEPEND_LDBM= ; DEPEND_ISODE= ;\ + if [ "$(BUILD_LDBM)" = "yes" ]; then \ + DEPEND_LDBM="$(SRCS)"; \ + DEPEND=yes ; \ fi; \ - $(MKDEP) $(DEFS) $(DEFINES) $$DEPENDEXTRAS $(SRCS) + if [ "$(HAVE_ISODE)" = "yes" ]; then \ + DEPEND_ISODE="$(ISODEINCLUDEFLAG) chlog2replog.c $(EDB2LDIFSRCS)"; \ + DEPEND=yes ; \ + fi; \ + if [ "$$DEPEND" = "yes" ]; then \ + $(MKDEP) $(DEFS) $(DEFINES) $$DEPEND_ISODE $$DEPEND_LDBM \ + else \ + exit 0 ; \ + fi -install-local: install-isode FORCE +install-local: install-ldbm install-isode FORCE + +install-ldbm: FORCE @-$(MKDIR) -p $(sbindir) - $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2ldbm $(sbindir) - $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2index $(sbindir) - $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2id2entry $(sbindir) - $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2id2children $(sbindir) - $(INSTALL) $(INSTALLFLAGS) -m 755 ldbmcat $(sbindir) - $(INSTALL) $(INSTALLFLAGS) -m 755 ldif $(sbindir) - $(INSTALL) $(INSTALLFLAGS) -m 755 centipede $(sbindir) - $(INSTALL) $(INSTALLFLAGS) -m 755 ldbmtest $(sbindir) + @if [ "$(BUILD_LDBM)" = "yes" ]; then \ + $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2ldbm $(sbindir) \ + $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2index $(sbindir) \ + $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2id2entry $(sbindir) \ + $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2id2children $(sbindir) \ + $(INSTALL) $(INSTALLFLAGS) -m 755 ldbmcat $(sbindir) \ + $(INSTALL) $(INSTALLFLAGS) -m 755 ldif $(sbindir) \ + $(INSTALL) $(INSTALLFLAGS) -m 755 centipede $(sbindir) \ + $(INSTALL) $(INSTALLFLAGS) -m 755 ldbmtest $(sbindir) \ + else \ + exit 0; \ + fi install-isode: FORCE @-$(MKDIR) -p $(sbindir) From 721a62af38dc99468964403c8dc750aad4adeb86 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sun, 20 Sep 1998 05:35:00 +0000 Subject: [PATCH 054/148] Reworked enable/with options. Mostly works. --- aclocal.m4 | 270 ++- configure | 2483 +++++++++++++++---------- configure.in | 685 ++++--- servers/slapd/back-ldbm/Makefile.in | 8 +- servers/slapd/back-passwd/Makefile.in | 2 +- servers/slapd/back-shell/Makefile.in | 2 +- 6 files changed, 2102 insertions(+), 1348 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index bc90b35598..1441586f15 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,50 +1,266 @@ -dnl -------------------------------------------------------------------- -dnl Restricted form of AC_ARG_ENABLE that ensures user doesn't give bogus -dnl values. dnl -dnl Parameters: +dnl OpenLDAP Autoconf Macros +dnl +dnl -------------------------------------------------------------------- +dnl Restricted form of AC_ARG_ENABLE that limits user options +dnl dnl $1 = option name dnl $2 = help-string -dnl $3 = action to perform if option is not default -dnl $4 = action if perform if option is default -dnl $5 = default option value (either 'yes' or 'no') -AC_DEFUN([CF_ARG_OPTION], -[AC_ARG_ENABLE($1,[$2],[test "$enableval" != ifelse($5,no,yes,no) && enableval=ifelse($5,no,no,yes) - if test "$enableval" != "$5" ; then -ifelse($3,,[ :]dnl -,[ $3]) ifelse($4,,,[ - else - $4]) - fi],[enableval=$5 ifelse($4,,,[ - $4 +dnl $3 = default value (auto) +dnl $4 = allowed values (auto yes no) +AC_DEFUN([OL_ARG_ENABLE], [# OpenLDAP --enable-$1 + AC_ARG_ENABLE($1,[$2 (]ifelse($3,,auto,$3)[)],[ + ol_arg=invalid + for ol_val in ifelse($4,,[auto yes no],[$4]) ; do + if test "$enableval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + AC_MSG_ERROR(bad value $enableval for --enable-$1) + fi + ol_enable_$1="$ol_arg" +], +[ ol_enable_$1=ifelse($3,,"auto","$3")])dnl +dnl AC_VERBOSE(OpenLDAP -enable-$1 $ol_enable_$1) +# end --enable-$1 ])dnl - ])])dnl +dnl dnl -------------------------------------------------------------------- +dnl Restricted form of AC_ARG_WITH that limits user options +dnl +dnl $1 = option name +dnl $2 = help-string +dnl $3 = default value (no) +dnl $4 = allowed values (yes or no) +AC_DEFUN([OL_ARG_WITH], [# OpenLDAP --with-$1 + AC_ARG_WITH($1,[$2 (]ifelse($3,,yes,$3)[)],[ + ol_arg=invalid + for ol_val in ifelse($4,,[yes no],[$4]) ; do + if test "$withval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + AC_MSG_ERROR(bad value $withval for --with-$1) + fi + ol_with_$1="$ol_arg" +], +[ ol_with_$1=ifelse($3,,"no","$3")])dnl +dnl AC_VERBOSE(OpenLDAP --with-$1 $ol_with_$1) +# end --with-$1 +])dnl +dnl +dnl ==================================================================== +dnl Check if db.h is Berkeley DB2 +AC_DEFUN([OL_HEADER_BERKELEY_DB2], +[AC_CHECK_HEADERS(db.h) +if test $ac_cv_header_db_h = yes ; then + AC_CACHE_CHECK(if db.h is DB2, [ol_cv_header_db2],[ + AC_EGREP_CPP(__db_version_2,[ +# include + /* this check could be improved */ +# ifdef DB_VERSION_MAJOR +# if DB_VERSION_MAJOR == 2 + __db_version_2 +# endif +# endif + ], ol_cv_header_db2=yes, ol_cv_header_db2=no)]) +fi +])dnl +dnl -------------------------------------------------------------------- +dnl Check if Berkeley DB2 library exists +dnl Check for dbopen in standard libraries or -ldb +AC_DEFUN([OL_LIB_BERKELEY_DB2], +[AC_CACHE_CHECK(for DB2 library, [ol_cv_lib_db2], +[ ol_LIBS="$LIBS" + AC_CHECK_LIB(db,db_open,[ol_cv_lib_db2=-ldb],[ol_cv_lib_db2=no]) + LIBS="$ol_LIBS" +]) +])dnl +dnl +dnl -------------------------------------------------------------------- +dnl Check if Berkeley db2 exists +AC_DEFUN([OL_BERKELEY_DB2], +[AC_REQUIRE([OL_LIB_BERKELEY_DB2]) + AC_REQUIRE([OL_HEADER_BERKELEY_DB2]) + AC_CACHE_CHECK(for Berkeley DB2, [ol_cv_berkeley_db2], [ + if test $ol_cv_lib_db2 = no -o $ol_cv_header_db2 = no ; then + ol_cv_berkeley_db2=no + else + ol_cv_berkeley_db2=yes + fi +]) +])dnl +dnl +dnl ==================================================================== +dnl Check for db.h/db_185.h is Berkeley DB +AC_DEFUN([OL_HEADER_BERKELEY_DB], +[AC_REQUIRE([OL_HEADER_BERKELEY_DB2]) +AC_CHECK_HEADERS(db_185.h) +if test $ol_cv_header_db2 = yes ; then + dnl db.h is db2! + + ol_cv_header_db=$ac_cv_header_db_185_h +else + ol_cv_header_db=$ac_cv_header_db_h +fi +])dnl +dnl +dnl -------------------------------------------------------------------- +dnl Check if Berkeley DB library exists +dnl Check for dbopen in standard libraries or -ldb +AC_DEFUN([OL_LIB_BERKELEY_DB], +[AC_CACHE_CHECK(for Berkeley DB library, [ol_cv_lib_db], +[ ol_LIBS="$LIBS" + AC_CHECK_FUNC(dbopen,[ol_cv_lib_db=yes], [ + AC_CHECK_LIB(db,dbopen,[ol_cv_lib_db=-ldb],[ol_cv_lib_db=no]) + ]) + LIBS="$ol_LIBS" +]) +])dnl +dnl +dnl -------------------------------------------------------------------- +dnl Check if db exists +AC_DEFUN([OL_BERKELEY_DB], +[AC_REQUIRE([OL_LIB_BERKELEY_DB]) + AC_REQUIRE([OL_HEADER_BERKELEY_DB]) + AC_CACHE_CHECK(for Berkeley DB, [ol_cv_berkeley_db], [ + if test $ol_cv_lib_db = no -o $ol_cv_header_db = no ; then + ol_cv_berkeley_db=no + else + ol_cv_berkeley_db=yes + fi +]) +])dnl +dnl +dnl ==================================================================== +dnl Check if GDBM library exists +dnl Check for gdbm_open in standard libraries or -lgdbm +AC_DEFUN([OL_LIB_GDBM], +[AC_CACHE_CHECK(for GDBM library, [ol_cv_lib_gdbm], +[ ol_LIBS="$LIBS" + AC_CHECK_FUNC(gdbm_open,[ol_cv_lib_gdbm=yes], [ + AC_CHECK_LIB(gdbm,gdbm_open,[ol_cv_lib_gdbm=-lgdbm],[ol_cv_lib_gdbm=no]) + ]) + LIBS="$ol_LIBS" +]) +])dnl +dnl +dnl -------------------------------------------------------------------- +dnl Check if GDBM exists +AC_DEFUN([OL_GDBM], +[AC_REQUIRE([OL_LIB_GDBM]) + AC_CHECK_HEADERS(gdbm.h) + AC_CACHE_CHECK(for db, [ol_cv_gdbm], [ + if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then + ol_cv_gdbm=no + else + ol_cv_gdbm=yes + fi +]) +])dnl +dnl +dnl ==================================================================== +dnl Check if NDBM library exists +dnl Check for dbm_open in standard libraries or -lndbm or -ldbm +AC_DEFUN([OL_LIB_NDBM], +[AC_CACHE_CHECK(for NDBM library, [ol_cv_lib_ndbm], +[ ol_LIBS="$LIBS" + AC_CHECK_FUNC(dbm_open,[ol_cv_lib_ndbm=yes], [ + AC_CHECK_LIB(ndbm,dbm_open,[ol_cv_lib_ndbm=-lndbm], [ + AC_CHECK_LIB(dbm,dbm_open,[ol_cv_lib_ndbm=-ldbm], + [ol_cv_lib_ndbm=no])dnl + ]) + ]) + LIBS="$ol_LIBS" +]) +])dnl +dnl +dnl -------------------------------------------------------------------- +dnl Check if NDBM exists +AC_DEFUN([OL_NDBM], +[AC_REQUIRE([OL_LIB_NDBM]) + AC_CHECK_HEADERS(ndbm.h) + AC_CACHE_CHECK(for db, [ol_cv_ndbm], [ + if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then + ol_cv_ndbm=no + else + ol_cv_ndbm=yes + fi +]) +])dnl +dnl +dnl ==================================================================== +dnl Check POSIX Thread version +AC_DEFUN([OL_POSIX_THREAD_VERSION], +[AC_CACHE_CHECK([POSIX thread version],[ol_cv_pthread_version],[ + AC_EGREP_CPP(final,[ +# include + /* this check could be improved */ +# ifdef PTHREAD_ONCE_INIT + final +# endif + ], ol_pthread_final=yes, ol_pthread_final=no) + + AC_EGREP_CPP(draft4,[ +# include + /* this check could be improved */ +# ifdef pthread_once_init + draft4 +# endif + ], ol_pthread_draft4=yes, ol_pthread_draft4=no) + + if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then + ol_cv_pthread_version=final + elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then + ol_cv_pthread_version=draft4 + else + ol_cv_pthread_version=unknown + fi +]) +])dnl +dnl +dnl -------------------------------------------------------------------- +dnl Check LinuxThread +AC_DEFUN([OL_LINUX_THREADS], +[ +AC_CACHE_CHECK([for LinuxThreads], [ol_cv_linux_threads], [ + res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l` + if test "$res" -gt 0 ; then + ol_cv_linux_threads=yes + else + ol_cv_linux_threads=no + fi +]) +])dnl +dnl +dnl ==================================================================== dnl Check for declaration of sys_errlist in one of stdio.h and errno.h. dnl Declaration of sys_errlist on BSD4.4 interferes with our declaration. dnl Reported by Keith Bostic. -AC_DEFUN([CF_SYS_ERRLIST], +AC_DEFUN([OL_SYS_ERRLIST], [ AC_MSG_CHECKING([declaration of sys_errlist]) -AC_CACHE_VAL(cf_cv_dcl_sys_errlist,[ +AC_CACHE_VAL(ol_cv_dcl_sys_errlist,[ AC_TRY_COMPILE([ #include #include #include ], [char *c = (char *) *sys_errlist], - [cf_cv_dcl_sys_errlist=yes], - [cf_cv_dcl_sys_errlist=no])]) -AC_MSG_RESULT($cf_cv_dcl_sys_errlist) + [ol_cv_dcl_sys_errlist=yes], + [ol_cv_dcl_sys_errlist=no])]) +AC_MSG_RESULT($ol_cv_dcl_sys_errlist) # It's possible (for near-UNIX clones) that sys_errlist doesn't exist -if test $cf_cv_dcl_sys_errlist = no ; then +if test $ol_cv_dcl_sys_errlist = no ; then AC_DEFINE(DECL_SYS_ERRLIST) AC_MSG_CHECKING([existence of sys_errlist]) - AC_CACHE_VAL(cf_cv_have_sys_errlist,[ + AC_CACHE_VAL(ol_cv_have_sys_errlist,[ AC_TRY_LINK([#include ], [char *c = (char *) *sys_errlist], - [cf_cv_have_sys_errlist=yes], - [cf_cv_have_sys_errlist=no])]) - AC_MSG_RESULT($cf_cv_have_sys_errlist) + [ol_cv_have_sys_errlist=yes], + [ol_cv_have_sys_errlist=no])]) + AC_MSG_RESULT($ol_cv_have_sys_errlist) fi ])dnl diff --git a/configure b/configure index 2178735689..b0a666855e 100755 --- a/configure +++ b/configure @@ -14,60 +14,50 @@ ac_default_prefix=/usr/local ac_default_prefix=/usr/local ac_help="$ac_help --enable-debug enable debugging (yes)" -ac_help="$ac_help - --enable-syslog enable syslog support (no)" ac_help="$ac_help --enable-libui enable library user interface (yes)" ac_help="$ac_help --enable-cache enable caching (yes)" ac_help="$ac_help - --enable-dns enable dns support (no)" + --enable-dns enable dns support (auto)" ac_help="$ac_help --enable-referrals enable referrals (yes)" ac_help="$ac_help --enable-clapd enable connectionless ldap (no)" ac_help="$ac_help - --with-kerberos use Kerberos (no)" + --with-kerberos use Kerberos (auto)" ac_help="$ac_help - --with-kerberos-afs use AFS Kerberos (no)" -ac_help="$ac_help - --with-threads use threads (yes)" + --with-threads use threads (auto)" ac_help="$ac_help --enable-ldapd enable building ldapd (no)" ac_help="$ac_help --enable-slapd enable building slapd (yes)" ac_help="$ac_help - --enable-aclgroup enable ACL group support (yes)" + --enable-aclgroup enable ACL group support (auto)" ac_help="$ac_help - --enable-crypt enable crypt(3) passwords (yes)" + --enable-crypt enable crypt(3) passwords (auto)" ac_help="$ac_help - --enable-md5 enable MD5 passwords (yes)" + --enable-md5 enable MD5 passwords (auto)" ac_help="$ac_help - --enable-sha1 enable SHA1 passwords (yes)" + --enable-sha1 enable SHA1 passwords (auto)" ac_help="$ac_help --enable-wrappers enable tcp wrapper support (no)" ac_help="$ac_help - --enable-phonetic enable phonetic/soundex (no)" + --enable-phonetic enable phonetic/soundex (no)" ac_help="$ac_help - --enable-rlookups enable reverse lookups (yes)" + --enable-rlookups enable reverse lookups (auto)" ac_help="$ac_help --enable-ldbm enable ldbm backend (yes)" ac_help="$ac_help - --enable-passwd enable passwd backend (yes)" + --with-ldbm-api use LDBM API (auto)" ac_help="$ac_help - --enable-shell enable shell backend (yes)" + --with-ldbm-type use LDBM type (auto)" ac_help="$ac_help - --with-ndbm use NDB for LDBM backend (any)" + --enable-passwd enable passwd backend (no)" ac_help="$ac_help - --with-gdbm use GDBM for LDBM backend (any)" + --enable-shell enable shell backend (no)" ac_help="$ac_help - --with-dbhash use Berkeley DB Hash for LDBM backend (any)" -ac_help="$ac_help - --with-dbbtree use Berkeley DB Btrees for LDBM backend (any)" -ac_help="$ac_help - --with-db2 use Berkeley DB2 API (any)" -ac_help="$ac_help - --enable-slurpd enable building slurpd (yes)" + --enable-slurpd enable building slurpd (auto)" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -594,497 +584,606 @@ ac_config_guess=$ac_aux_dir/config.guess ac_config_sub=$ac_aux_dir/config.sub ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. -echo $ac_n "checking arguments""... $ac_c" 1>&6 -echo "configure:599: checking arguments" >&5 +echo $ac_n "checking configure arguments""... $ac_c" 1>&6 +echo "configure:589: checking configure arguments" >&5 -# Check whether --enable-debug or --disable-debug was given. +# OpenLDAP --enable-debug + # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" - test "$enableval" != no && enableval=yes - if test "$enableval" != "yes" ; then - - LDAP_DEBUG=no - else - LDAP_DEBUG=yes - fi -else - enableval=yes - LDAP_DEBUG=yes -fi -# Check whether --enable-syslog or --disable-syslog was given. -if test "${enable_syslog+set}" = set; then - enableval="$enable_syslog" - test "$enableval" != yes && enableval=no - if test "$enableval" != "no" ; then - - LDAP_CLDAP=yes - else - LDAP_CLDAP=no - fi + ol_arg=invalid + for ol_val in auto yes no ; do + if test "$enableval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; } + fi + ol_enable_debug="$ol_arg" + else - enableval=no - LDAP_CLDAP=no - + ol_enable_debug="yes" fi -# Check whether --enable-libui or --disable-libui was given. +# end --enable-debug +#OL_ARG_ENABLE(syslog,[ --enable-syslog enable syslog support], auto)dnl +# OpenLDAP --enable-libui + # Check whether --enable-libui or --disable-libui was given. if test "${enable_libui+set}" = set; then enableval="$enable_libui" - test "$enableval" != no && enableval=yes - if test "$enableval" != "yes" ; then - - LDAP_LIBUI=no - else - LDAP_LIBUI=yes - fi -else - enableval=yes - LDAP_LIBUI=yes + ol_arg=invalid + for ol_val in auto yes no ; do + if test "$enableval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $enableval for --enable-libui" 1>&2; exit 1; } + fi + ol_enable_libui="$ol_arg" + +else + ol_enable_libui="yes" fi -# Check whether --enable-cache or --disable-cache was given. +# end --enable-libui +# OpenLDAP --enable-cache + # Check whether --enable-cache or --disable-cache was given. if test "${enable_cache+set}" = set; then enableval="$enable_cache" - test "$enableval" != no && enableval=yes - if test "$enableval" != "yes" ; then - - LDAP_CACHE=no - else - LDAP_CACHE=yes - fi -else - enableval=yes - LDAP_CACHE=yes + ol_arg=invalid + for ol_val in auto yes no ; do + if test "$enableval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; } + fi + ol_enable_cache="$ol_arg" + +else + ol_enable_cache="yes" fi -# Check whether --enable-dns or --disable-dns was given. +# end --enable-cache +# OpenLDAP --enable-dns + # Check whether --enable-dns or --disable-dns was given. if test "${enable_dns+set}" = set; then enableval="$enable_dns" - test "$enableval" != yes && enableval=no - if test "$enableval" != "no" ; then - - LDAP_DNS=yes - else - LDAP_DNS=no - fi -else - enableval=no - LDAP_DNS=no + ol_arg=invalid + for ol_val in auto yes no ; do + if test "$enableval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; } + fi + ol_enable_dns="$ol_arg" + +else + ol_enable_dns="auto" fi -# Check whether --enable-referrals or --disable-referrals was given. +# end --enable-dns +# OpenLDAP --enable-referrals + # Check whether --enable-referrals or --disable-referrals was given. if test "${enable_referrals+set}" = set; then enableval="$enable_referrals" - test "$enableval" != no && enableval=yes - if test "$enableval" != "yes" ; then - - LDAP_REFERRALS=no - else - LDAP_REFERRALS=yes - fi -else - enableval=yes - LDAP_REFERRALS=yes -fi + ol_arg=invalid + for ol_val in auto yes no ; do + if test "$enableval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; } + fi + ol_enable_referrals="$ol_arg" -# Check whether --enable-cldap or --disable-cldap was given. +else + ol_enable_referrals="yes" +fi +# end --enable-referrals +# OpenLDAP --enable-cldap + # Check whether --enable-cldap or --disable-cldap was given. if test "${enable_cldap+set}" = set; then enableval="$enable_cldap" - test "$enableval" != yes && enableval=no - if test "$enableval" != "no" ; then - - LDAP_CLDAP=yes - else - LDAP_CLDAP=no - fi -else - enableval=no - LDAP_CLDAP=no -fi + ol_arg=invalid + for ol_val in auto yes no ; do + if test "$enableval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; } + fi + ol_enable_cldap="$ol_arg" -# Check whether --with-kerberos or --without-kerberos was given. +else + ol_enable_cldap="no" +fi +# end --enable-cldap + +# OpenLDAP --with-kerberos + # Check whether --with-kerberos or --without-kerberos was given. if test "${with_kerberos+set}" = set; then withval="$with_kerberos" - opt_kerberos=yes -else - opt_kerberos=no -fi + ol_arg=invalid + for ol_val in auto k5 k4 afs yes no ; do + if test "$withval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; } + fi + ol_with_kerberos="$ol_arg" -# Check whether --with-kerberos-afs or --without-kerberos-afs was given. -if test "${with_kerberos_afs+set}" = set; then - withval="$with_kerberos_afs" - - opt_kerberos_afs=yes else - opt_kerberos_afs=no + ol_with_kerberos="auto" fi +# end --with-kerberos -# Check whether --with-threads or --without-threads was given. +# OpenLDAP --with-threads + # Check whether --with-threads or --without-threads was given. if test "${with_threads+set}" = set; then withval="$with_threads" - opt_threads=yes + ol_arg=invalid + for ol_val in auto posix dce mach yes no ; do + if test "$withval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; } + fi + ol_with_threads="$ol_arg" + else - opt_threads=no + ol_with_threads="auto" fi +# end --with-threads -# Check whether --enable-ldapd or --disable-ldapd was given. +# OpenLDAP --enable-ldapd + # Check whether --enable-ldapd or --disable-ldapd was given. if test "${enable_ldapd+set}" = set; then enableval="$enable_ldapd" - test "$enableval" != yes && enableval=no - if test "$enableval" != "no" ; then - - BUILD_LDAPD=yes - else - BUILD_LDAPD=no - fi -else - enableval=no - BUILD_LDAPD=no -fi + ol_arg=invalid + for ol_val in auto yes no ; do + if test "$enableval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; } + fi + ol_enable_ldapd="$ol_arg" -# Check whether --enable-slapd or --disable-slapd was given. +else + ol_enable_ldapd="no" +fi +# end --enable-ldapd + +# OpenLDAP --enable-slapd + # Check whether --enable-slapd or --disable-slapd was given. if test "${enable_slapd+set}" = set; then enableval="$enable_slapd" - test "$enableval" != no && enableval=yes - if test "$enableval" != "yes" ; then - - BUILD_SLAPD=no - else - BUILD_SLAPD=yes - fi -else - enableval=yes - BUILD_SLAPD=yes + ol_arg=invalid + for ol_val in auto yes no ; do + if test "$enableval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; } + fi + ol_enable_slapd="$ol_arg" + +else + ol_enable_slapd="yes" fi -# Check whether --enable-aclgroup or --disable-aclgroup was given. +# end --enable-slapd +# OpenLDAP --enable-aclgroup + # Check whether --enable-aclgroup or --disable-aclgroup was given. if test "${enable_aclgroup+set}" = set; then enableval="$enable_aclgroup" - test "$enableval" != no && enableval=yes - if test "$enableval" != "yes" ; then - - SLAPD_ACLGROUP=no - else - SLAPD_ALCGROUP=yes - fi -else - enableval=yes - SLAPD_ALCGROUP=yes + ol_arg=invalid + for ol_val in auto yes no ; do + if test "$enableval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $enableval for --enable-aclgroup" 1>&2; exit 1; } + fi + ol_enable_aclgroup="$ol_arg" + +else + ol_enable_aclgroup="auto" fi -# Check whether --enable-crypt or --disable-crypt was given. +# end --enable-aclgroup +# OpenLDAP --enable-crypt + # Check whether --enable-crypt or --disable-crypt was given. if test "${enable_crypt+set}" = set; then enableval="$enable_crypt" - test "$enableval" != no && enableval=yes - if test "$enableval" != "yes" ; then - - SLAPD_CRYPT=no - else - SLAPD_CRYPT=yes - fi -else - enableval=yes - SLAPD_CRYPT=yes + ol_arg=invalid + for ol_val in auto yes no ; do + if test "$enableval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; } + fi + ol_enable_crypt="$ol_arg" + +else + ol_enable_crypt="auto" fi -# Check whether --enable-md5 or --disable-md5 was given. +# end --enable-crypt +# OpenLDAP --enable-md5 + # Check whether --enable-md5 or --disable-md5 was given. if test "${enable_md5+set}" = set; then enableval="$enable_md5" - test "$enableval" != no && enableval=yes - if test "$enableval" != "yes" ; then - - SLAPD_MD5=no - else - SLAPD_MD5=yes - fi -else - enableval=yes - SLAPD_MD5=yes + ol_arg=invalid + for ol_val in auto yes no ; do + if test "$enableval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $enableval for --enable-md5" 1>&2; exit 1; } + fi + ol_enable_md5="$ol_arg" + +else + ol_enable_md5="auto" fi -# Check whether --enable-sha1 or --disable-sha1 was given. +# end --enable-md5 +# OpenLDAP --enable-sha1 + # Check whether --enable-sha1 or --disable-sha1 was given. if test "${enable_sha1+set}" = set; then enableval="$enable_sha1" - test "$enableval" != no && enableval=yes - if test "$enableval" != "yes" ; then - - SLAPD_SHA1=no - else - SLAPD_SHA1=yes - fi -else - enableval=yes - SLAPD_SHA1=yes + ol_arg=invalid + for ol_val in auto yes no ; do + if test "$enableval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $enableval for --enable-sha1" 1>&2; exit 1; } + fi + ol_enable_sha1="$ol_arg" + +else + ol_enable_sha1="auto" fi -# Check whether --enable-wrappers or --disable-wrappers was given. +# end --enable-sha1 +# OpenLDAP --enable-wrappers + # Check whether --enable-wrappers or --disable-wrappers was given. if test "${enable_wrappers+set}" = set; then enableval="$enable_wrappers" - test "$enableval" != yes && enableval=no - if test "$enableval" != "no" ; then - - SLAPD_TCP_WRAPPERS=yes - else - SLAPD_TCP_WRAPPERS=no - fi -else - enableval=no - SLAPD_TCP_WRAPPERS=no + ol_arg=invalid + for ol_val in auto yes no ; do + if test "$enableval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; } + fi + ol_enable_wrappers="$ol_arg" + +else + ol_enable_wrappers="no" fi -# Check whether --enable-phonetic or --disable-phonetic was given. +# end --enable-wrappers +# OpenLDAP --enable-phonetic + # Check whether --enable-phonetic or --disable-phonetic was given. if test "${enable_phonetic+set}" = set; then enableval="$enable_phonetic" - test "$enableval" != yes && enableval=no - if test "$enableval" != "no" ; then - - SLAPD_PHONETIC=yes - else - SLAPD_PHONETIC=no - fi -else - enableval=no - SLAPD_PHONETIC=no + ol_arg=invalid + for ol_val in auto yes no ; do + if test "$enableval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; } + fi + ol_enable_phonetic="$ol_arg" + +else + ol_enable_phonetic="no" fi -# Check whether --enable-rlookups or --disable-rlookups was given. +# end --enable-phonetic +# OpenLDAP --enable-rlookups + # Check whether --enable-rlookups or --disable-rlookups was given. if test "${enable_rlookups+set}" = set; then enableval="$enable_rlookups" - test "$enableval" != no && enableval=yes - if test "$enableval" != "yes" ; then - - SLAPD_RLOOKUP=no - else - SLAPD_RLOOKUP=yes - fi -else - enableval=yes - SLAPD_RLOOKUP=yes -fi + ol_arg=invalid + for ol_val in auto yes no ; do + if test "$enableval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; } + fi + ol_enable_rlookups="$ol_arg" -# Check whether --enable-ldbm or --disable-ldbm was given. +else + ol_enable_rlookups="auto" +fi +# end --enable-rlookups + +# OpenLDAP --enable-ldbm + # Check whether --enable-ldbm or --disable-ldbm was given. if test "${enable_ldbm+set}" = set; then enableval="$enable_ldbm" - test "$enableval" != no && enableval=yes - if test "$enableval" != "yes" ; then - - SLAPD_LDBM=no - else - SLAPD_LDBM=yes - fi -else - enableval=yes - SLAPD_LDBM=yes + ol_arg=invalid + for ol_val in auto yes no ; do + if test "$enableval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; } + fi + ol_enable_ldbm="$ol_arg" + +else + ol_enable_ldbm="yes" fi -# Check whether --enable-passwd or --disable-passwd was given. +# end --enable-ldbm +# OpenLDAP --with-ldbm_api + # Check whether --with-ldbm_api or --without-ldbm_api was given. +if test "${with_ldbm_api+set}" = set; then + withval="$with_ldbm_api" + + ol_arg=invalid + for ol_val in auto db2 db gdbm ndbm ; do + if test "$withval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; } + fi + ol_with_ldbm_api="$ol_arg" + +else + ol_with_ldbm_api="auto" +fi +# end --with-ldbm_api + +# OpenLDAP --with-ldbm_type + # Check whether --with-ldbm_type or --without-ldbm_type was given. +if test "${with_ldbm_type+set}" = set; then + withval="$with_ldbm_type" + + ol_arg=invalid + for ol_val in auto btree hash ; do + if test "$withval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; } + fi + ol_with_ldbm_type="$ol_arg" + +else + ol_with_ldbm_type="auto" +fi +# end --with-ldbm_type + + +# OpenLDAP --enable-passwd + # Check whether --enable-passwd or --disable-passwd was given. if test "${enable_passwd+set}" = set; then enableval="$enable_passwd" - test "$enableval" != no && enableval=yes - if test "$enableval" != "yes" ; then - - SLAPD_PASSWD=no - else - SLAPD_PASSWD=yes - fi -else - enableval=yes - SLAPD_PASSWD=yes + ol_arg=invalid + for ol_val in auto yes no ; do + if test "$enableval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; } + fi + ol_enable_passwd="$ol_arg" + +else + ol_enable_passwd="no" fi -# Check whether --enable-shell or --disable-shell was given. +# end --enable-passwd +# OpenLDAP --enable-shell + # Check whether --enable-shell or --disable-shell was given. if test "${enable_shell+set}" = set; then enableval="$enable_shell" - test "$enableval" != no && enableval=yes - if test "$enableval" != "yes" ; then - - SLAPD_SHELL=no - else - SLAPD_SHELL=yes - fi -else - enableval=yes - SLAPD_SHELL=yes -fi + ol_arg=invalid + for ol_val in auto yes no ; do + if test "$enableval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; } + fi + ol_enable_shell="$ol_arg" -# Check whether --with-ndbm or --without-ndbm was given. -if test "${with_ndbm+set}" = set; then - withval="$with_ndbm" - - opt_ndbm=yes else - opt_ndbm=no + ol_enable_shell="no" fi +# end --enable-shell -# Check whether --with-gdbm or --without-gdbm was given. -if test "${with_gdbm+set}" = set; then - withval="$with_gdbm" - - opt_gdbm=yes -else - opt_gdbm=no -fi - -# Check whether --with-dbhash or --without-dbhash was given. -if test "${with_dbhash+set}" = set; then - withval="$with_dbhash" - - opt_dbhash=yes -else - opt_dbhash=no -fi - -# Check whether --with-dbbtree or --without-dbbtree was given. -if test "${with_dbbtree+set}" = set; then - withval="$with_dbbtree" - - opt_dbbtree=yes -else - opt_dbbtree=no -fi - -# Check whether --with-db2 or --without-db2 was given. -if test "${with_db2+set}" = set; then - withval="$with_db2" - - opt_db2=yes -else - opt_db2=no -fi - - -# Check whether --enable-slurpd or --disable-slurpd was given. +# OpenLDAP --enable-slurpd + # Check whether --enable-slurpd or --disable-slurpd was given. if test "${enable_slurpd+set}" = set; then enableval="$enable_slurpd" - test "$enableval" != no && enableval=yes - if test "$enableval" != "yes" ; then - - BUILD_SLURPD=no - else - BUILD_SLURPD=yes - fi -else - enableval=yes - BUILD_SLURPD=yes + ol_arg=invalid + for ol_val in auto yes no ; do + if test "$enableval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; } + fi + ol_enable_slurpd="$ol_arg" + +else + ol_enable_slurpd="auto" +fi +# end --enable-slurpd + +if test $ol_enable_slapd = no ; then + if test $ol_enable_ldbm = yes ; then + echo "configure: warning: slapd disabled, ignoring --enable_ldbm argument" 1>&2; + fi + if test $ol_enable_passwd = yes ; then + echo "configure: warning: slapd disabled, ignoring --enable_passwd argument" 1>&2; + fi + if test $ol_enable_shell = yes ; then + echo "configure: warning: slapd disabled, ignoring --enable_shell argument" 1>&2; + fi + if test $ol_enable_aclgroup = yes ; then + echo "configure: warning: slapd disabled, ignoring --enable_aclgroup argument" 1>&2; + fi + if test $ol_enable_crypt = yes ; then + echo "configure: warning: slapd disabled, ignoring --enable_crypt argument" 1>&2; + fi + if test $ol_enable_md5 = yes ; then + echo "configure: warning: slapd disabled, ignoring --enable_md5 argument" 1>&2; + fi + if test $ol_enable_sha1 = yes ; then + echo "configure: warning: slapd disabled, ignoring --enable_sha1 argument" 1>&2; + fi + if test $ol_enable_wrappers = yes ; then + echo "configure: warning: slapd disabled, ignoring --enable_wrappers argument" 1>&2; + fi + if test $ol_enable_phonetic = yes ; then + echo "configure: warning: slapd disabled, ignoring --enable_phonetic argument" 1>&2; + fi + if test $ol_enable_rlookups = yes ; then + echo "configure: warning: slapd disabled, ignoring --enable_rlookups argument" 1>&2; + fi + if test $ol_with_ldbm_api != auto ; then + echo "configure: warning: slapd disabled, ignoring --with_ldbm_api argument" 1>&2; + fi + if test $ol_with_ldbm_type != auto ; then + echo "configure: warning: slapd disabled, ignoring --with_ldbm_type argument" 1>&2; + fi + if test $ol_enable_slurpd = yes ; then + { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }; + fi + + # force settings to no + ol_enable_ldbm=no + ol_enable_shell=no + ol_enable_passwd=no + ol_enable_aclgroup=no + ol_enable_crypt=no + ol_enable_md5=no + ol_enable_sha1=no + ol_enable_wrappers=no + ol_enable_phonetic=no + ol_enable_rlookups=no + ol_with_ldbm_api=no + ol_with_ldbm_type=no + ol_enable_slurpd=no + +elif test $ol_enable_ldbm = no ; then + + if test $ol_with_ldbm_api != auto ; then + echo "configure: warning: LDBM disabled, ignoring --with_ldbm_api argument" 1>&2; + fi + + if test $ol_with_ldbm_type != auto ; then + echo "configure: warning: LDBM disabled, ignoring --with_ldbm_type argument" 1>&2; + fi + + if test $ol_enable_passwd = no -a $ol_enable_shell = no ; then + { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }; + fi + + ol_with_ldbm_api=no + ol_with_ldbm_type=no + +else + + if test $ol_with_ldbm_api = gdbm -a \ + $ol_with_ldbm_type = btree ; then + { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }; + fi + if test $ol_with_ldbm_api = ndbm -a \ + $ol_with_ldbm_type = btree ; then + { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }; + fi +fi + +if test $ol_enable_slurpd = yes ; then + if test $ol_with_threads = no ; then + { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }; + fi fi echo "$ac_t""done" 1>&6 -echo $ac_n "checking LDBM preferences""... $ac_c" 1>&6 -echo "configure:986: checking LDBM preferences" >&5 -ldbm_prefer=any - -if test "$opt_ndbm" = yes ; then - ldbm_prefer=ndbm -fi -if test "$opt_gdbm" = yes ; then - ldbm_prefer=gdbm -fi -if test "$opt_dbhash" = yes ; then - ldbm_prefer=dbhash -fi -if test "$opt_dbbtree" = yes ; then - ldbm_prefer=dbbtree -fi -echo "$ac_t""$ldbm_prefer" 1>&6 - -if test "$BUILD_SLAPD" != "yes" ; then - BUILD_SLURPD="no" - SLAPD_LDBM="no" - SLAPD_PASSWD="no" - SLAPD_SHELL="no" - ldbm_prefer="none" -fi - -## general LDAP arguments +## Initialize vars LDAP_DEFS= LDAP_LIBS= LDBM_DEFS= LDBM_LIBS= +LTHREAD_DEFS= +LTHREAD_LIBS= LUTIL_DEFS= LUTIL_LIBS= -if test "$LDAP_DEBUG" = "yes" ; then - LDAP_DEFS="$LDAP_DEFS -DLDAP_DEBUG" -fi -if test "$LDAP_SYSLOG" = "yes" ; then - LDAP_DEFS="$LDAP_DEFS -DLDAP_SYSLOG" -fi -if test "$LDAP_DNS" = "yes" ; then - LDAP_DEFS="$LDAP_DEFS -DLDAP_DNS" -fi -if test "$LDAP_REFERRALS" = "yes" ; then - LDAP_DEFS="$LDAP_DEFS -DLDAP_REFERRALS" -fi -if test "$LDAP_CACHE" = "no" ; then - cat >> confdefs.h <<\EOF -#define LDAP_NOCACHE 1 -EOF - - LDAP_DEFS="$LDAP_DEFS -DNO_CACHE" -fi -if test "$LDAP_CLDAP" = "yes" ; then - cat >> confdefs.h <<\EOF -#define LDAP_CONNECTIONLESS 1 -EOF - - LDAP_DEFS="$LDAP_DEFS -DCLDAP" -fi - -## ldapd arguments LDAPD_DEFS= LDAPD_LIBS= - -## slapd arguments SLAPD_DEFS= SLAPD_LIBS= -if test "$SLAPD_PHONETIC" = "yes" ; then - cat >> confdefs.h <<\EOF -#define SLAPD_PHONETIC 1 -EOF - - SLAPD_DEFS="$SLAPD_DEFS -DSOUNDEX" -fi - -if test "$SLAPD_MD5" = "yes" ; then - LUTIL_DEFS="$LUTIL_DEFS -DLDAP_MD5" -fi - -if test "$SLAPD_SHA1" = "yes" ; then - LUTIL_DEFS="$LUTIL_DEFS -DLDAP_SHA1" -fi - -BUILD_LDBM=no -if test "$SLAPD_LDBM" = "yes" ; then - BUILD_LDBM=yes - LDBM_DEFS="$LDBM_DEFS -DLDAP_LDBM" -fi -if test "$SLAPD_PASSWD" = "yes" ; then - SLAPD_DEFS="$SLAPD_DEFS -DLDAP_PASSWD" -fi -if test "$SLAPD_SHELL" = "yes" ; then - SLAPD_DEFS="$SLAPD_DEFS -DLDAP_SHELL" -fi - SLURPD_DEFS= SLURPD_LIBS= +BUILD_LDAPD=no +BUILD_SLAPD=no +BUILD_SLURPD=no + +BUILD_LDBM=no +BUILD_PASSWD=no +BUILD_SHELL=no + # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1088: checking for $ac_word" >&5 +echo "configure:1187: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1113,7 +1212,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1117: checking for $ac_word" >&5 +echo "configure:1216: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1161,7 +1260,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1165: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1264: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1171,11 +1270,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1195,12 +1294,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1199: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1298: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1204: checking whether we are using GNU C" >&5 +echo "configure:1303: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1209,7 +1308,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1224,7 +1323,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1228: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1327: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1252,7 +1351,7 @@ else fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1256: checking how to run the C preprocessor" >&5 +echo "configure:1355: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1267,13 +1366,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1376: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1284,13 +1383,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1393: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1314,13 +1413,13 @@ echo "$ac_t""$CPP" 1>&6 if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:1318: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:1417: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP @@ -1338,7 +1437,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -1361,7 +1460,7 @@ fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1365: checking whether ln -s works" >&5 +echo "configure:1464: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1392,7 +1491,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1396: checking for a BSD compatible install" >&5 +echo "configure:1495: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1444,7 +1543,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1448: checking for $ac_word" >&5 +echo "configure:1547: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1471,7 +1570,7 @@ else fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1475: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1574: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1501,7 +1600,7 @@ fi # Extract the first word of "sendmail", so it can be a program name with args. set dummy sendmail; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1505: checking for $ac_word" >&5 +echo "configure:1604: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1533,7 +1632,7 @@ fi # Extract the first word of "vi", so it can be a program name with args. set dummy vi; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1537: checking for $ac_word" >&5 +echo "configure:1636: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1565,7 +1664,7 @@ fi # Extract the first word of "finger", so it can be a program name with args. set dummy finger; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1569: checking for $ac_word" >&5 +echo "configure:1668: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1596,26 +1695,23 @@ fi -LTHREAD_LIBS= -if test "$opt_thread" = "no" ; then - LTHREAD_DEFS="-DNO_THREADS" - BUILD_SLURPD=no -else +ol_link_threads=no +if test $ol_with_threads = auto -o $ol_with_threads = posix ; then for ac_hdr in pthread.h sched.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1609: checking for $ac_hdr" >&5 +echo "configure:1705: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1715: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1643,105 +1739,111 @@ done if test "$ac_cv_header_pthread_h" = yes ; then - echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6 -echo "configure:1648: checking POSIX thread version" >&5 -if eval "test \"`echo '$''{'cf_cv_pthread_version'+set}'`\" = set"; then + echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6 +echo "configure:1744: checking POSIX thread version" >&5 +if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext < conftest.$ac_ext < -/* this check could be improved */ -#ifdef PTHREAD_ONCE_INIT - final -#endif - +# include + /* this check could be improved */ +# ifdef PTHREAD_ONCE_INIT + final +# endif + EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "final" >/dev/null 2>&1; then rm -rf conftest* - pthread_final=yes + ol_pthread_final=yes else rm -rf conftest* - pthread_final=no + ol_pthread_final=no fi rm -f conftest* - cat > conftest.$ac_ext < conftest.$ac_ext < -/* this check could be improved */ -#ifdef pthread_once_init - draft4 -#endif - +# include + /* this check could be improved */ +# ifdef pthread_once_init + draft4 +# endif + EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "draft4" >/dev/null 2>&1; then rm -rf conftest* - pthread_draft4=yes + ol_pthread_draft4=yes else rm -rf conftest* - pthread_draft4=no + ol_pthread_draft4=no fi rm -f conftest* - if test $pthread_final = yes -a $pthread_draft4 = no; then - cf_cv_pthread_version=final - elif test $pthread_final = no -a $pthread_draft4 = yes; then - cf_cv_pthread_version=draft4 - else - cf_cv_pthread_version=unknown - fi - + if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then + ol_cv_pthread_version=final + elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then + ol_cv_pthread_version=draft4 + else + ol_cv_pthread_version=unknown + fi + fi -echo "$ac_t""$cf_cv_pthread_version" 1>&6 - - if test $cf_cv_pthread_version = final ; then +echo "$ac_t""$ol_cv_pthread_version" 1>&6 + + + if test $ol_cv_pthread_version = final ; then LTHREAD_DEFS="$LTHREAD_DEFS -DPOSIX_THREADS" - elif test $cf_cv_pthread_version = draft4 ; then + elif test $ol_cv_pthread_version = draft4 ; then LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_MIT_PTHREADS" else { echo "configure: error: unknown pthread version" 1>&2; exit 1; } fi - echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 -echo "configure:1718: checking for LinuxThreads" >&5 -if eval "test \"`echo '$''{'cf_cv_linux_threads'+set}'`\" = set"; then + # consider threads found + ol_with_threads="posix" + + +echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 +echo "configure:1819: checking for LinuxThreads" >&5 +if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l` - if test "$res" -gt 0 ; then - cf_cv_linux_threads=yes - else - cf_cv_linux_threads=no - fi - + res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l` + if test "$res" -gt 0 ; then + ol_cv_linux_threads=yes + else + ol_cv_linux_threads=no + fi + fi -echo "$ac_t""$cf_cv_linux_threads" 1>&6 +echo "$ac_t""$ol_cv_linux_threads" 1>&6 - if test $cf_cv_linux_threads = yes ; then + + if test $ol_cv_linux_threads = yes ; then LTHREAD_DEFS="$LTHREAD_DEFS -DHAVE_LINUX_THREADS" fi echo $ac_n "checking for pthread_create""... $ac_c" 1>&6 -echo "configure:1740: checking for pthread_create" >&5 +echo "configure:1842: checking for pthread_create" >&5 if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_pthread_create=yes" else @@ -1778,24 +1880,23 @@ fi if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then echo "$ac_t""yes" 1>&6 - pthread_link=yes + ol_link_threads=yes else echo "$ac_t""no" 1>&6 -pthread_link=no fi - if test $pthread_link = no ; then + if test $ol_link_threads = no ; then echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6 -echo "configure:1791: checking for pthread_create with -pthread" >&5 -if eval "test \"`echo '$''{'cf_cv_pthread_flag'+set}'`\" = set"; then +echo "configure:1892: checking for pthread_create with -pthread" >&5 +if eval "test \"`echo '$''{'ol_cv_pthread_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else save_LIBS="$LIBS" LIBS="-pthread $LIBS" cat > conftest.$ac_ext < int main() { @@ -1805,32 +1906,32 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* - cf_cv_pthread_flag=yes + ol_cv_pthread_flag=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - cf_cv_pthread_flag=no + ol_cv_pthread_flag=no fi rm -f conftest* LIBS="$save_LIBS" fi -echo "$ac_t""$cf_cv_pthread_flag" 1>&6 +echo "$ac_t""$ol_cv_pthread_flag" 1>&6 - if test $cf_cv_pthread_flag = yes ; then + if test $ol_cv_pthread_flag = yes ; then LTHREAD_LIBS="$LTHREAD_LIBS -pthread" - pthread_link=yes + ol_link_threads=yes fi fi - if test $pthread_link = no ; then + if test $ol_link_threads = no ; then save_LIBS="$LIBS" echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:1834: checking for pthread_create in -lpthread" >&5 +echo "configure:1935: checking for pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1838,7 +1939,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1865,7 +1966,7 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - pthread_link=yes + ol_link_threads=yes LTHREAD_LIBS="$LTHREAD_LIBS -lpthread" else echo "$ac_t""no" 1>&6 @@ -1874,10 +1975,10 @@ fi LIBS="$save_LIBS" fi - if test $pthread_link = no ; then + if test $ol_link_threads = no ; then save_LIBS="$LIBS" echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:1881: checking for pthread_create in -lc_r" >&5 +echo "configure:1982: checking for pthread_create in -lc_r" >&5 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1885,116 +1986,15 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - - pthread_link=yes - LTHREAD_LIBS="$LTHREAD_LIBS -lc_r" -else - echo "$ac_t""no" 1>&6 -fi - - LIBS="$save_LIBS" - fi - - if test $pthread_link = no ; then - save_LIBS="$LIBS" - echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:1928: checking for pthread_create in -lpthread" >&5 -ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lpthread -lmach -lexc -lc $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - - pthread_link=yes - LTHREAD_DEFS="$LTHREAD_DEFS -DDEC_THREADS" - LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc" -else - echo "$ac_t""no" 1>&6 -fi - - LIBS="$save_LIBS" - fi - - else - LTHREAD_DEFS="-DNO_THREADS" - fi -fi - -# check for strtok_r (and presumely other reentrant functions) -save_LIBS="$LIBS" -LIBS="$save_LIBS $LTHREAD_LIBS" -echo $ac_n "checking for strtok_r in -lpthread""... $ac_c" 1>&6 -echo "configure:1982: checking for strtok_r in -lpthread" >&5 -ac_lib_var=`echo pthread'_'strtok_r | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lpthread $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then @@ -2012,42 +2012,39 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo pthread | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 fi + LIBS="$save_LIBS" + fi -if test $ac_cv_lib_pthread_strtok_r = no ; then - LIBS="$save_LIBS $LTHREAD_LIBS" - echo $ac_n "checking for strtok_r in -lc_r""... $ac_c" 1>&6 -echo "configure:2032: checking for strtok_r in -lc_r" >&5 -ac_lib_var=`echo c_r'_'strtok_r | sed 'y%./+-%__p_%'` + if test $ol_link_threads = no ; then + save_LIBS="$LIBS" + echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 +echo "configure:2029: checking for pthread_create in -lpthread" >&5 +ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lc_r $LIBS" +LIBS="-lpthread -lmach -lexc -lc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2061,212 +2058,71 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo c_r | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - for ac_func in strtok_r sched_yield -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2081: 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 < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:2109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - - if test $ac_cv_lib_c_r_strtok_r = yes ; then - LTHREAD_LIBS="$LTHREAD_LIBS -lc_r" - fi -else - for ac_func in strtok_r sched_yield -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2140: 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 < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:2168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -fi - -LIBS="$save_LIBS" - - -ldbm_use="none" -if test "$SLAPD_LDBM" = "yes" ; then - if test $ldbm_prefer = any -o $ldbm_prefer = dbbtree \ - -o $ldbm_prefer = dbhash ; then - echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:2202: checking for dbopen" >&5 -if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dbopen(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_dbopen) || defined (__stub___dbopen) -choke me -#else -dbopen(); -#endif - -; return 0; } -EOF -if { (eval echo configure:2230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_dbopen=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_dbopen=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then echo "$ac_t""yes" 1>&6 - ldbm_use=$ldbm_prefer - ldbm_prefer=found + ol_link_threads=yes + LTHREAD_DEFS="$LTHREAD_DEFS -DDEC_THREADS" + LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc" else echo "$ac_t""no" 1>&6 +fi - echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:2251: checking for dbopen in -ldb" >&5 -ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'` + LIBS="$save_LIBS" + fi + + if test $ol_link_threads = no ; then + { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; } + fi + elif test $ol_with_threads = posix ; then + { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; } + fi +fi + +if test $ol_link_threads = no ; then + if test $ol_with_threads = yes ; then + { echo "configure: error: no suitable thread support" 1>&2; exit 1; } + fi + + if test $ol_with_threads = auto ; then + echo "configure: warning: no suitable thread support, disabling threads" 1>&2 + $ol_with_threads = no + fi + + LTHREAD_DEFS="-DNO_THREADS" + LTHREAD_LIBS="" +fi + + + +ol_link_ldbm=no +if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then + echo $ac_n "checking for DB2 library""... $ac_c" 1>&6 +echo "configure:2101: checking for DB2 library" >&5 +if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ol_LIBS="$LIBS" + echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6 +echo "configure:2107: checking for db_open in -ldb" >&5 +ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2281,79 +2137,33 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - - ldbm_use=$ldbm_prefer - ldbm_prefer=found - LDBM_LIBS="$LDBM_LIBS -ldb" - + ol_cv_lib_db2=-ldb else echo "$ac_t""no" 1>&6 -fi - - +ol_cv_lib_db2=no fi - - if test $ldbm_prefer = found ; then - if test $ldbm_use = dbhash ; then - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBHASH" - else - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBBTREE" - fi - fi - - echo $ac_n "checking for db2""... $ac_c" 1>&6 -echo "configure:2307: checking for db2" >&5 -if eval "test \"`echo '$''{'cf_cv_db2'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext < -/* this check could be improved */ -#ifdef DB_VERSION_MAJOR -#if DB_VERSION_MAJOR == 2 - __db_version_2 -#endif -#endif - -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "__db_version_2" >/dev/null 2>&1; then - rm -rf conftest* - cf_cv_db2=yes -else - rm -rf conftest* - cf_cv_db2=no -fi -rm -f conftest* + LIBS="$ol_LIBS" fi -echo "$ac_t""$cf_cv_db2" 1>&6 +echo "$ac_t""$ol_cv_lib_db2" 1>&6 - if test $cf_cv_db2 = yes ; then - if test $opt_db2 = yes ; then - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2" - else - for ac_hdr in db_185.h +for ac_hdr in db.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2347: checking for $ac_hdr" >&5 +echo "configure:2157: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2357: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2379,22 +2189,330 @@ else fi done - if test $ac_cv_header_db_185_h = no ; then - { echo "configure: error: select --with-db2 or install db2 with 1.85 compatibility" 1>&2; exit 1; } - fi +if test $ac_cv_header_db_h = yes ; then + echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6 +echo "configure:2195: checking if db.h is DB2" >&5 +if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <&2; exit 1; } - fi - fi +# include + /* this check could be improved */ +# ifdef DB_VERSION_MAJOR +# if DB_VERSION_MAJOR == 2 + __db_version_2 +# endif +# endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "__db_version_2" >/dev/null 2>&1; then + rm -rf conftest* + ol_cv_header_db2=yes +else + rm -rf conftest* + ol_cv_header_db2=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ol_cv_header_db2" 1>&6 +fi + + + + echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6 +echo "configure:2231: checking for Berkeley DB2" >&5 +if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + if test $ol_cv_lib_db2 = no -o $ol_cv_header_db2 = no ; then + ol_cv_berkeley_db2=no + else + ol_cv_berkeley_db2=yes fi - if test $ldbm_prefer = any -o $ldbm_prefer = gdbm ; then +fi + +echo "$ac_t""$ol_cv_berkeley_db2" 1>&6 + + + if test $ol_cv_berkeley_db2 = yes ; then + ol_link_ldbm=db2 + ol_with_ldbm_api=db2 + + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2" + + if test $ol_with_ldbm_type = hash ; then + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBHASH" + else + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBBTREE" + fi + + if test $ol_cv_lib_db2 != yes ; then + LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2" + fi + fi +fi + +if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then + echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6 +echo "configure:2267: checking for Berkeley DB library" >&5 +if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ol_LIBS="$LIBS" + echo $ac_n "checking for dbopen""... $ac_c" 1>&6 +echo "configure:2273: checking for dbopen" >&5 +if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dbopen(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_dbopen) || defined (__stub___dbopen) +choke me +#else +dbopen(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_dbopen=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_dbopen=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ol_cv_lib_db=yes +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 +echo "configure:2320: checking for dbopen in -ldb" >&5 +ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldb $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ol_cv_lib_db=-ldb +else + echo "$ac_t""no" 1>&6 +ol_cv_lib_db=no +fi + + +fi + + LIBS="$ol_LIBS" + +fi + +echo "$ac_t""$ol_cv_lib_db" 1>&6 + + +for ac_hdr in db_185.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2374: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2384: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +if test $ol_cv_header_db2 = yes ; then + + ol_cv_header_db=$ac_cv_header_db_185_h +else + ol_cv_header_db=$ac_cv_header_db_h +fi + + + + echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6 +echo "configure:2420: checking for Berkeley DB" >&5 +if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + if test $ol_cv_lib_db = no -o $ol_cv_header_db = no ; then + ol_cv_berkeley_db=no + else + ol_cv_berkeley_db=yes + fi + +fi + +echo "$ac_t""$ol_cv_berkeley_db" 1>&6 + + + if test $ol_cv_berkeley_db = yes ; then + ol_link_ldbm=db + ol_with_ldbm_api=db + + if test $ac_cv_header_db_185_h = yes ; then + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2_COMPAT185" + fi + + if test $ol_with_ldbm_type = hash ; then + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBHASH" + else + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBBTREE" + fi + + if test $ol_cv_lib_db != yes ; then + LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db" + fi + fi +fi + +if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then + echo "configure: warning: Could not find LDBM with BTREE support" 1>&2; + $ol_with_ldbm_api=none +fi + +if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then + echo $ac_n "checking for GDBM library""... $ac_c" 1>&6 +echo "configure:2463: checking for GDBM library" >&5 +if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ol_LIBS="$LIBS" + echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6 +echo "configure:2469: checking for gdbm_open" >&5 +if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gdbm_open(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_gdbm_open) || defined (__stub___gdbm_open) +choke me +#else +gdbm_open(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_gdbm_open=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_gdbm_open=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ol_cv_lib_gdbm=yes +else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:2398: checking for gdbm_open in -lgdbm" >&5 +echo "configure:2516: checking for gdbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2402,7 +2520,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2428,28 +2546,155 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - - ldbm_use=$ldbm_prefer - ldbm_prefer=found - LDBM_LIBS="$LDBM_LIBS -lgdbm" - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_GDBM" - + ol_cv_lib_gdbm=-lgdbm +else + echo "$ac_t""no" 1>&6 +ol_cv_lib_gdbm=no +fi + + +fi + + LIBS="$ol_LIBS" + +fi + +echo "$ac_t""$ol_cv_lib_gdbm" 1>&6 + + + for ac_hdr in gdbm.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2570: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 fi - +done + + echo $ac_n "checking for db""... $ac_c" 1>&6 +echo "configure:2607: checking for db" >&5 +if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then + ol_cv_gdbm=no + else + ol_cv_gdbm=yes fi - if test $ldbm_prefer = any -o $ldbm_prefer = ndbm ; then - echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:2445: checking for dbm_open in -ldbm" >&5 -ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` + +fi + +echo "$ac_t""$ol_cv_gdbm" 1>&6 + + + if test $ol_cv_gdbm = yes ; then + ol_link_ldbm=gdbm + ol_with_ldbm_api=gdbm + + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_GDBM" + + if test $ol_cv_lib_db != yes ; then + LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm" + fi + fi +fi + +if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = ndbm ; then + echo $ac_n "checking for NDBM library""... $ac_c" 1>&6 +echo "configure:2637: checking for NDBM library" >&5 +if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ol_LIBS="$LIBS" + echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 +echo "configure:2643: checking for dbm_open" >&5 +if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dbm_open(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_dbm_open) || defined (__stub___dbm_open) +choke me +#else +dbm_open(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_dbm_open=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_dbm_open=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ol_cv_lib_ndbm=yes +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6 +echo "configure:2690: checking for dbm_open in -lndbm" >&5 +ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-ldbm $LIBS" +LIBS="-lndbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2475,30 +2720,149 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - - ldbm_use=ndbm - ldbm_prefer=found - LDBM_LIBS="$LDBM_LIBS -ldbm" - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_NDBM" + ol_cv_lib_ndbm=-lndbm +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 +echo "configure:2729: checking for dbm_open in -ldbm" >&5 +ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldbm $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ol_cv_lib_ndbm=-ldbm +else + echo "$ac_t""no" 1>&6 +ol_cv_lib_ndbm=no +fi +fi + + +fi + + LIBS="$ol_LIBS" + +fi + +echo "$ac_t""$ol_cv_lib_ndbm" 1>&6 + + + for ac_hdr in ndbm.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2785: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 fi - +done + + echo $ac_n "checking for db""... $ac_c" 1>&6 +echo "configure:2822: checking for db" >&5 +if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then + ol_cv_ndbm=no + else + ol_cv_ndbm=yes fi - if test $ldbm_prefer != found ; then - { echo "configure: error: could not find suitable db for $ldbm_prefer backend" 1>&2; exit 1; } - fi +fi - if test $ldbm_use = ndbm ; then - echo "configure: warning: LDBM using NDBM" 1>&2 +echo "$ac_t""$ol_cv_ndbm" 1>&6 + + + if test $ol_cv_ndbm = yes ; then + ol_link_ldbm=ndbm + ol_with_ldbm_api=ndbm + + if test $ol_with_ldbm_api = ndbm ; then + echo "configure: warning: Attempting to use NDBM. Functionality will be limited." 1>&2 + fi + + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_NDBM" + + if test $ol_cv_lib_db != yes ; then + LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm" + fi fi fi -if test "$SLAPD_TCP_WRAPPERS" = "yes" ; then +if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then + echo "configure: warning: could not find suitable LDBM backend" 1>&2 + if test $ol_enable_ldbm = yes ; then + { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; } + fi + + echo "configure: warning: disabling LDBM" 1>&2 + $ol_enable_ldbm=no +fi + +if test $ol_enable_wrappers = yes ; then echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6 -echo "configure:2502: checking for hosts_access in -lwrap" >&5 +echo "configure:2866: checking for hosts_access in -lwrap" >&5 ac_lib_var=`echo wrap'_'hosts_access | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2506,7 +2870,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lwrap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2532,14 +2896,26 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - - SLAPD_DEFS="$SLAPD_DEFS -DTCP_WRAPPERS" - SLAPD_LIBS="$SLAPD_LIBS -lwrap" - + have_wrappers=yes else echo "$ac_t""no" 1>&6 +have_wrappers=no fi + + if test $have_wrappers = yes ; then + SLAPD_DEFS="$SLAPD_DEFS -DTCP_WRAPPERS" + SLAPD_LIBS="$SLAPD_LIBS -lwrap" + else + echo "configure: warning: could not find -lwrap" 1>&2 + if test $ol_enable_wrappers = yes ; then + { echo "configure: error: could not find wrappers" 1>&2; exit 1; } + fi + + echo "configure: warning: disabling wrappers support" 1>&2 + ol_enable_wrappers=no + fi + fi # ud needs termcap (should insert check here) @@ -2547,14 +2923,14 @@ LIBTERMCAP="-ltermcap" # FreeBSD (and others) have crypt(3) in -lcrypt -if test "$SLAPD_CRYPT" = "yes" ; then +if test $ol_enable_crypt != no ; then echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:2553: checking for crypt" >&5 +echo "configure:2929: checking for crypt" >&5 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -2596,7 +2972,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:2600: checking for crypt in -lcrypt" >&5 +echo "configure:2976: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2604,7 +2980,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2644,6 +3020,12 @@ fi LUTIL_DEFS="$LUTIL_DEFS -DLDAP_CRYPT" else echo "configure: warning: could not find crypt" 1>&2 + if test $ol_enable_crypt = yes ; then + { echo "configure: error: could not find crypt" 1>&2; exit 1; } + fi + + echo "configure: warning: disabling crypt support" 1>&2 + ol_enable_crypt=no fi fi @@ -2652,12 +3034,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:2656: checking for $ac_hdr that defines DIR" >&5 +echo "configure:3038: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -2665,7 +3047,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:2669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -2690,7 +3072,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:2694: checking for opendir in -ldir" >&5 +echo "configure:3076: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2698,7 +3080,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2731,7 +3113,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:2735: checking for opendir in -lx" >&5 +echo "configure:3117: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2739,7 +3121,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2773,12 +3155,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2777: checking for ANSI C header files" >&5 +echo "configure:3159: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2786,7 +3168,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2803,7 +3185,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2821,7 +3203,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2842,7 +3224,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2853,7 +3235,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -2877,12 +3259,12 @@ EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:2881: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:3263: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2898,7 +3280,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:2902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -2934,17 +3316,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2938: checking for $ac_hdr" >&5 +echo "configure:3320: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2972,12 +3354,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:2976: checking for uid_t in sys/types.h" >&5 +echo "configure:3358: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3006,7 +3388,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:3010: checking type of array argument to getgroups" >&5 +echo "configure:3392: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3014,7 +3396,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -3053,7 +3435,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -3077,12 +3459,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3081: checking for mode_t" >&5 +echo "configure:3463: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3110,12 +3492,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3114: checking for off_t" >&5 +echo "configure:3496: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3143,12 +3525,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3147: checking for pid_t" >&5 +echo "configure:3529: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3176,12 +3558,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3180: checking return type of signal handlers" >&5 +echo "configure:3562: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3198,7 +3580,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3217,12 +3599,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3221: checking for size_t" >&5 +echo "configure:3603: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3250,12 +3632,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3254: checking for uid_t in sys/types.h" >&5 +echo "configure:3636: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3284,12 +3666,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:3288: checking for st_blksize in struct stat" >&5 +echo "configure:3670: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3297,7 +3679,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:3301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -3318,12 +3700,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3322: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:3704: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3332,7 +3714,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -3353,12 +3735,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:3357: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:3739: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3366,7 +3748,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:3370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -3388,12 +3770,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3392: checking for working const" >&5 +echo "configure:3774: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3464,7 +3846,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:3468: checking for 8-bit clean memcmp" >&5 +echo "configure:3850: 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 @@ -3472,7 +3854,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -3500,12 +3882,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3504: checking return type of signal handlers" >&5 +echo "configure:3886: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3522,7 +3904,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3541,12 +3923,12 @@ EOF echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:3545: checking for strftime" >&5 +echo "configure:3927: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -3591,7 +3973,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:3595: checking for strftime in -lintl" >&5 +echo "configure:3977: 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 @@ -3599,7 +3981,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3637,12 +4019,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:3641: checking for vprintf" >&5 +echo "configure:4023: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -3689,12 +4071,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:3693: checking for _doprnt" >&5 +echo "configure:4075: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -3742,7 +4124,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:3746: checking for wait3 that fills in rusage" >&5 +echo "configure:4128: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3750,7 +4132,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -3781,7 +4163,7 @@ main() { } } EOF -if { (eval echo configure:3785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -3822,12 +4204,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3826: checking for $ac_func" >&5 +echo "configure:4208: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3878,12 +4260,12 @@ done for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3882: checking for $ac_func" >&5 +echo "configure:4264: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3936,13 +4318,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:3940: checking declaration of sys_errlist" >&5 -if eval "test \"`echo '$''{'cf_cv_dcl_sys_errlist'+set}'`\" = set"; then +echo "configure:4322: 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 < @@ -3952,53 +4334,132 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:3956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - cf_cv_dcl_sys_errlist=yes + ol_cv_dcl_sys_errlist=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - cf_cv_dcl_sys_errlist=no + ol_cv_dcl_sys_errlist=no fi rm -f conftest* fi -echo "$ac_t""$cf_cv_dcl_sys_errlist" 1>&6 +echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist -if test $cf_cv_dcl_sys_errlist = no ; then +if test $ol_cv_dcl_sys_errlist = no ; then cat >> confdefs.h <<\EOF #define DECL_SYS_ERRLIST 1 EOF echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6 -echo "configure:3977: checking existence of sys_errlist" >&5 - if eval "test \"`echo '$''{'cf_cv_have_sys_errlist'+set}'`\" = set"; then +echo "configure:4359: 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 < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:3990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* - cf_cv_have_sys_errlist=yes + ol_cv_have_sys_errlist=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - cf_cv_have_sys_errlist=no + ol_cv_have_sys_errlist=no fi rm -f conftest* fi - echo "$ac_t""$cf_cv_have_sys_errlist" 1>&6 + echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6 +fi + + + +if test $ol_enable_debug != no ; then + LDAP_DEFS="$LDAP_DEFS -DLDAP_DEBUG" +fi +#if test $ol_enable_syslog != no ; then +# LDAP_DEFS="$LDAP_DEFS -DLDAP_SYSLOG" +#fi +if test $ol_enable_libui = no ; then + LDAP_DEFS="$LDAP_DEFS -DNO_USERINTERFACE" +fi +if test $ol_enable_cache = no ; then + LDAP_DEFS="$LDAP_DEFS -DNO_CACHE" +fi +if test $ol_enable_dns != no ; then + LDAP_DEFS="$LDAP_DEFS -DLDAP_DNS" +fi +if test $ol_enable_referrals != no ; then + LDAP_DEFS="$LDAP_DEFS -DLDAP_REFERRALS" +fi +if test $ol_enable_cldap != no ; then + LDAP_DEFS="$LDAP_DEFS -DCLDAP" +fi + +if test $ol_enable_aclgroup != no ; then + cat >> confdefs.h <<\EOF +#define SLAPD_ACLGROUP 1 +EOF + + SLAPD_DEFS="$SLAPD_DEFS -DACLGROUP" +fi + +if test $ol_enable_md5 != no ; then + LUTIL_DEFS="$LUTIL_DEFS -DLDAP_MD5" +fi + +if test $ol_enable_sha1 != no ; then + LUTIL_DEFS="$LUTIL_DEFS -DLDAP_SHA1" +fi + +if test $ol_enable_phonetic != no ; then + cat >> confdefs.h <<\EOF +#define SLAPD_PHONETIC 1 +EOF + + SLAPD_DEFS="$SLAPD_DEFS -DSOUNDEX" +fi + +if test $ol_enable_rlookups != no ; then + cat >> confdefs.h <<\EOF +#define SLAPD_RLOOKUPS 1 +EOF + + SLAPD_DEFS="$SLAPD_DEFS -DREVERSE_LOOKUPS" +fi + +if test $ol_link_ldbm != no ; then + BUILD_SLAPD=yes + BUILD_LDBM=yes + LDBM_DEFS="-DLDAP_LDBM $LDBM_DEFS" +fi + +if test $ol_enable_passwd != no ; then + BUILD_SLAPD=yes + BUILD_PASSWD=yes + SLAPD_DEFS="-DLDAP_PASSWD $SLAPD_DEFS" +fi + +if test $ol_enable_shell != no ; then + BUILD_SLAPD=yes + BUILD_SHELL=yes + SLAPD_DEFS="-DLDAP_SHELL $SLAPD_DEFS" +fi + +if test $ol_enable_slurpd != no -a $ol_link_threads != no -a \ + $BUILD_SLAPD = yes ; then + BUILD_SLURPD=yes fi @@ -4016,9 +4477,6 @@ fi - - - @@ -4220,9 +4678,6 @@ s%@LDAPD_DEFS@%$LDAPD_DEFS%g s%@LDAPD_LIBS@%$LDAPD_LIBS%g s%@SLAPD_DEFS@%$SLAPD_DEFS%g s%@SLAPD_LIBS@%$SLAPD_LIBS%g -s%@SLAPD_LDBM@%$SLAPD_LDBM%g -s%@SLAPD_PASSWD@%$SLAPD_PASSWD%g -s%@SLAPD_SHELL@%$SLAPD_SHELL%g s%@SLURPD_DEFS@%$SLURPD_DEFS%g s%@SLURPD_LIBS@%$SLURPD_LIBS%g s%@LDBM_DEFS@%$LDBM_DEFS%g diff --git a/configure.in b/configure.in index 846c08820b..e481f32f24 100644 --- a/configure.in +++ b/configure.in @@ -18,184 +18,177 @@ AC_CONFIG_AUX_DIR(build) AC_CONFIG_HEADER(include/portable.h)dnl dnl dnl Start Args -AC_MSG_CHECKING(arguments) +AC_MSG_CHECKING(configure arguments) AC_PREFIX_DEFAULT(/usr/local) dnl General "enable" options -CF_ARG_OPTION(debug,[ --enable-debug enable debugging (yes)],[ - LDAP_DEBUG=no],[LDAP_DEBUG=yes],yes)dnl -CF_ARG_OPTION(syslog,[ --enable-syslog enable syslog support (no)],[ - LDAP_CLDAP=yes],[LDAP_CLDAP=no],no)dnl -CF_ARG_OPTION(libui,[ --enable-libui enable library user interface (yes)],[ - LDAP_LIBUI=no],[LDAP_LIBUI=yes],yes)dnl -CF_ARG_OPTION(cache,[ --enable-cache enable caching (yes)],[ - LDAP_CACHE=no],[LDAP_CACHE=yes],yes)dnl -CF_ARG_OPTION(dns,[ --enable-dns enable dns support (no)],[ - LDAP_DNS=yes],[LDAP_DNS=no],no)dnl -CF_ARG_OPTION(referrals,[ --enable-referrals enable referrals (yes)],[ - LDAP_REFERRALS=no],[LDAP_REFERRALS=yes],yes)dnl - -CF_ARG_OPTION(cldap,[ --enable-clapd enable connectionless ldap (no)],[ - LDAP_CLDAP=yes],[LDAP_CLDAP=no],no)dnl +OL_ARG_ENABLE(debug,[ --enable-debug enable debugging], yes)dnl +#OL_ARG_ENABLE(syslog,[ --enable-syslog enable syslog support], auto)dnl +OL_ARG_ENABLE(libui,[ --enable-libui enable library user interface], yes)dnl +OL_ARG_ENABLE(cache,[ --enable-cache enable caching], yes)dnl +OL_ARG_ENABLE(dns,[ --enable-dns enable dns support], auto)dnl +OL_ARG_ENABLE(referrals,[ --enable-referrals enable referrals], yes)dnl +OL_ARG_ENABLE(cldap,[ --enable-clapd enable connectionless ldap], no)dnl dnl General "with" options -AC_ARG_WITH(kerberos,[ --with-kerberos use Kerberos (no)],[ - opt_kerberos=yes],[opt_kerberos=no]) -AC_ARG_WITH(kerberos-afs,[ --with-kerberos-afs use AFS Kerberos (no)],[ - opt_kerberos_afs=yes],[opt_kerberos_afs=no]) -AC_ARG_WITH(threads,[ --with-threads use threads (yes)],[ - opt_threads=yes],[opt_threads=no]) +OL_ARG_WITH(kerberos,[ --with-kerberos use Kerberos], + auto, [auto k5 k4 afs yes no]) +OL_ARG_WITH(threads,[ --with-threads use threads], + auto, [auto posix dce mach yes no] ) dnl Server options dnl LDAPD OPTIONS -CF_ARG_OPTION(ldapd,[ --enable-ldapd enable building ldapd (no)],[ - BUILD_LDAPD=yes],[BUILD_LDAPD=no],no)dnl +OL_ARG_ENABLE(ldapd,[ --enable-ldapd enable building ldapd], no)dnl dnl SLAPD OPTIONS -CF_ARG_OPTION(slapd,[ --enable-slapd enable building slapd (yes)],[ - BUILD_SLAPD=no],[BUILD_SLAPD=yes],yes)dnl -CF_ARG_OPTION(aclgroup,[ --enable-aclgroup enable ACL group support (yes)],[ - SLAPD_ACLGROUP=no],[SLAPD_ALCGROUP=yes],yes)dnl -CF_ARG_OPTION(crypt,[ --enable-crypt enable crypt(3) passwords (yes)],[ - SLAPD_CRYPT=no],[SLAPD_CRYPT=yes],yes)dnl -CF_ARG_OPTION(md5,[ --enable-md5 enable MD5 passwords (yes)],[ - SLAPD_MD5=no],[SLAPD_MD5=yes],yes)dnl -CF_ARG_OPTION(sha1,[ --enable-sha1 enable SHA1 passwords (yes)],[ - SLAPD_SHA1=no],[SLAPD_SHA1=yes],yes)dnl -CF_ARG_OPTION(wrappers,[ --enable-wrappers enable tcp wrapper support (no)],[ - SLAPD_TCP_WRAPPERS=yes],[SLAPD_TCP_WRAPPERS=no],no)dnl -CF_ARG_OPTION(phonetic,[ --enable-phonetic enable phonetic/soundex (no)],[ - SLAPD_PHONETIC=yes],[SLAPD_PHONETIC=no],no)dnl -CF_ARG_OPTION(rlookups,[ --enable-rlookups enable reverse lookups (yes)],[ - SLAPD_RLOOKUP=no],[SLAPD_RLOOKUP=yes],yes)dnl +OL_ARG_ENABLE(slapd,[ --enable-slapd enable building slapd], yes)dnl +OL_ARG_ENABLE(aclgroup,[ --enable-aclgroup enable ACL group support], auto)dnl +OL_ARG_ENABLE(crypt,[ --enable-crypt enable crypt(3) passwords], auto)dnl +OL_ARG_ENABLE(md5,[ --enable-md5 enable MD5 passwords], auto)dnl +OL_ARG_ENABLE(sha1,[ --enable-sha1 enable SHA1 passwords], auto)dnl +OL_ARG_ENABLE(wrappers,[ --enable-wrappers enable tcp wrapper support], no)dnl +OL_ARG_ENABLE(phonetic,[ --enable-phonetic enable phonetic/soundex], no)dnl +OL_ARG_ENABLE(rlookups,[ --enable-rlookups enable reverse lookups], auto)dnl dnl SLAPD Backend options -CF_ARG_OPTION(ldbm,[ --enable-ldbm enable ldbm backend (yes)],[ - SLAPD_LDBM=no],[SLAPD_LDBM=yes],yes)dnl -CF_ARG_OPTION(passwd,[ --enable-passwd enable passwd backend (yes)],[ - SLAPD_PASSWD=no],[SLAPD_PASSWD=yes],yes)dnl -CF_ARG_OPTION(shell,[ --enable-shell enable shell backend (yes)],[ - SLAPD_SHELL=no],[SLAPD_SHELL=yes],yes)dnl +OL_ARG_ENABLE(ldbm,[ --enable-ldbm enable ldbm backend], yes)dnl +OL_ARG_WITH(ldbm_api,[ --with-ldbm-api use LDBM API], auto, + [auto db2 db gdbm ndbm]) +OL_ARG_WITH(ldbm_type,[ --with-ldbm-type use LDBM type], auto, + [auto btree hash]) -AC_ARG_WITH(ndbm,[ --with-ndbm use NDB for LDBM backend (any)],[ - opt_ndbm=yes],[opt_ndbm=no]) -AC_ARG_WITH(gdbm,[ --with-gdbm use GDBM for LDBM backend (any)],[ - opt_gdbm=yes],[opt_gdbm=no]) -AC_ARG_WITH(dbhash,[ --with-dbhash use Berkeley DB Hash for LDBM backend (any)],[ - opt_dbhash=yes],[opt_dbhash=no]) -AC_ARG_WITH(dbbtree,[ --with-dbbtree use Berkeley DB Btrees for LDBM backend (any)],[ - opt_dbbtree=yes],[opt_dbbtree=no]) -AC_ARG_WITH(db2,[ --with-db2 use Berkeley DB2 API (any)],[ - opt_db2=yes],[opt_db2=no]) +OL_ARG_ENABLE(passwd,[ --enable-passwd enable passwd backend], no)dnl +OL_ARG_ENABLE(shell,[ --enable-shell enable shell backend], no)dnl dnl SLURPD OPTIONS -CF_ARG_OPTION(slurpd,[ --enable-slurpd enable building slurpd (yes)],[ - BUILD_SLURPD=no],[BUILD_SLURPD=yes],yes)dnl +OL_ARG_ENABLE(slurpd,[ --enable-slurpd enable building slurpd], auto)dnl + +if test $ol_enable_slapd = no ; then + dnl SLAPD was specificallly disabled + if test $ol_enable_ldbm = yes ; then + AC_MSG_WARN([slapd disabled, ignoring --enable_ldbm argument]); + fi + if test $ol_enable_passwd = yes ; then + AC_MSG_WARN([slapd disabled, ignoring --enable_passwd argument]); + fi + if test $ol_enable_shell = yes ; then + AC_MSG_WARN([slapd disabled, ignoring --enable_shell argument]); + fi + if test $ol_enable_aclgroup = yes ; then + AC_MSG_WARN([slapd disabled, ignoring --enable_aclgroup argument]); + fi + if test $ol_enable_crypt = yes ; then + AC_MSG_WARN([slapd disabled, ignoring --enable_crypt argument]); + fi + if test $ol_enable_md5 = yes ; then + AC_MSG_WARN([slapd disabled, ignoring --enable_md5 argument]); + fi + if test $ol_enable_sha1 = yes ; then + AC_MSG_WARN([slapd disabled, ignoring --enable_sha1 argument]); + fi + if test $ol_enable_wrappers = yes ; then + AC_MSG_WARN([slapd disabled, ignoring --enable_wrappers argument]); + fi + if test $ol_enable_phonetic = yes ; then + AC_MSG_WARN([slapd disabled, ignoring --enable_phonetic argument]); + fi + if test $ol_enable_rlookups = yes ; then + AC_MSG_WARN([slapd disabled, ignoring --enable_rlookups argument]); + fi + if test $ol_with_ldbm_api != auto ; then + AC_MSG_WARN([slapd disabled, ignoring --with_ldbm_api argument]); + fi + if test $ol_with_ldbm_type != auto ; then + AC_MSG_WARN([slapd disabled, ignoring --with_ldbm_type argument]); + fi + if test $ol_enable_slurpd = yes ; then + AC_MSG_ERROR([slurpd requires slapd]); + fi + + # force settings to no + ol_enable_ldbm=no + ol_enable_shell=no + ol_enable_passwd=no + ol_enable_aclgroup=no + ol_enable_crypt=no + ol_enable_md5=no + ol_enable_sha1=no + ol_enable_wrappers=no + ol_enable_phonetic=no + ol_enable_rlookups=no + ol_with_ldbm_api=no + ol_with_ldbm_type=no + ol_enable_slurpd=no + +elif test $ol_enable_ldbm = no ; then + dnl SLAPD without LDBM + + if test $ol_with_ldbm_api != auto ; then + AC_MSG_WARN([LDBM disabled, ignoring --with_ldbm_api argument]); + fi + + if test $ol_with_ldbm_type != auto ; then + AC_MSG_WARN([LDBM disabled, ignoring --with_ldbm_type argument]); + fi + + if test $ol_enable_passwd = no -a $ol_enable_shell = no ; then + AC_MSG_ERROR([slapd requires a backend]); + fi + + ol_with_ldbm_api=no + ol_with_ldbm_type=no + +else + dnl SLAPD with LDBM + + if test $ol_with_ldbm_api = gdbm -a \ + $ol_with_ldbm_type = btree ; then + AC_MSG_ERROR([GDBM only supports LDBM type hash]); + fi + if test $ol_with_ldbm_api = ndbm -a \ + $ol_with_ldbm_type = btree ; then + AC_MSG_ERROR([NDBM only supports LDBM type hash]); + fi +fi + +if test $ol_enable_slurpd = yes ; then + dnl SLURPD was specifically enabled + if test $ol_with_threads = no ; then + AC_MSG_ERROR([slurpd requires threads]); + fi +fi AC_MSG_RESULT(done) -AC_MSG_CHECKING(LDBM preferences) -ldbm_prefer=any - -if test "$opt_ndbm" = yes ; then - ldbm_prefer=ndbm -fi -if test "$opt_gdbm" = yes ; then - ldbm_prefer=gdbm -fi -if test "$opt_dbhash" = yes ; then - ldbm_prefer=dbhash -fi -if test "$opt_dbbtree" = yes ; then - ldbm_prefer=dbbtree -fi -AC_MSG_RESULT($ldbm_prefer) - -if test "$BUILD_SLAPD" != "yes" ; then - BUILD_SLURPD="no" - SLAPD_LDBM="no" - SLAPD_PASSWD="no" - SLAPD_SHELL="no" - ldbm_prefer="none" -fi - -## general LDAP arguments +## Initialize vars LDAP_DEFS= LDAP_LIBS= LDBM_DEFS= LDBM_LIBS= +LTHREAD_DEFS= +LTHREAD_LIBS= LUTIL_DEFS= LUTIL_LIBS= -if test "$LDAP_DEBUG" = "yes" ; then - LDAP_DEFS="$LDAP_DEFS -DLDAP_DEBUG" -fi -if test "$LDAP_SYSLOG" = "yes" ; then - LDAP_DEFS="$LDAP_DEFS -DLDAP_SYSLOG" -fi -if test "$LDAP_DNS" = "yes" ; then -dnl AC_DEFINE(LDAP_DNS,1) - LDAP_DEFS="$LDAP_DEFS -DLDAP_DNS" -fi -if test "$LDAP_REFERRALS" = "yes" ; then -dnl AC_DEFINE(LDAP_REFERRALS,1) - LDAP_DEFS="$LDAP_DEFS -DLDAP_REFERRALS" -fi -if test "$LDAP_CACHE" = "no" ; then - AC_DEFINE(LDAP_NOCACHE,1) - LDAP_DEFS="$LDAP_DEFS -DNO_CACHE" -fi -if test "$LDAP_CLDAP" = "yes" ; then - AC_DEFINE(LDAP_CONNECTIONLESS,1) - LDAP_DEFS="$LDAP_DEFS -DCLDAP" -fi - -## ldapd arguments LDAPD_DEFS= LDAPD_LIBS= - -## slapd arguments SLAPD_DEFS= SLAPD_LIBS= -if test "$SLAPD_PHONETIC" = "yes" ; then - AC_DEFINE(SLAPD_PHONETIC,1) - SLAPD_DEFS="$SLAPD_DEFS -DSOUNDEX" -fi - -if test "$SLAPD_MD5" = "yes" ; then -dnl AC_DEFINE(SLAPD_MD5,1) - LUTIL_DEFS="$LUTIL_DEFS -DLDAP_MD5" -fi - -if test "$SLAPD_SHA1" = "yes" ; then -dnl AC_DEFINE(SLAPD_SHA1,1) - LUTIL_DEFS="$LUTIL_DEFS -DLDAP_SHA1" -fi - -BUILD_LDBM=no -if test "$SLAPD_LDBM" = "yes" ; then -dnl AC_DEFINE(SLAPD_LDBM,1) - BUILD_LDBM=yes - LDBM_DEFS="$LDBM_DEFS -DLDAP_LDBM" -fi -if test "$SLAPD_PASSWD" = "yes" ; then -dnl AC_DEFINE(SLAPD_PASSWD,1) - SLAPD_DEFS="$SLAPD_DEFS -DLDAP_PASSWD" -fi -if test "$SLAPD_SHELL" = "yes" ; then -dnl AC_DEFINE(SLAPD_SHELL,1) - SLAPD_DEFS="$SLAPD_DEFS -DLDAP_SHELL" -fi - -dnl slurpd arguments SLURPD_DEFS= SLURPD_LIBS= -dnl End Args +BUILD_LDAPD=no +BUILD_SLAPD=no +BUILD_SLURPD=no + +BUILD_LDBM=no +BUILD_PASSWD=no +BUILD_SHELL=no dnl ---------------------------------------------------------------- dnl Checks for programs + AC_PROG_CC AC_PROG_GCC_TRADITIONAL @@ -212,59 +205,27 @@ AC_PATH_PROG(FINGER, finger, /usr/ucb/finger, $PATH:/usr/ucb) dnl ---------------------------------------------------------------- dnl Checks for libraries -LTHREAD_LIBS= -if test "$opt_thread" = "no" ; then - LTHREAD_DEFS="-DNO_THREADS" - BUILD_SLURPD=no -else +ol_link_threads=no +if test $ol_with_threads = auto -o $ol_with_threads = posix ; then AC_CHECK_HEADERS(pthread.h sched.h) if test "$ac_cv_header_pthread_h" = yes ; then - dnl We have some form of pthreads - AC_CACHE_CHECK([POSIX thread version],cf_cv_pthread_version,[ - AC_EGREP_CPP(final,[ -#include -/* this check could be improved */ -#ifdef PTHREAD_ONCE_INIT - final -#endif - ], pthread_final=yes, pthread_final=no) + OL_POSIX_THREAD_VERSION - AC_EGREP_CPP(draft4,[ -#include -/* this check could be improved */ -#ifdef pthread_once_init - draft4 -#endif - ], pthread_draft4=yes, pthread_draft4=no) - - if test $pthread_final = yes -a $pthread_draft4 = no; then - cf_cv_pthread_version=final - elif test $pthread_final = no -a $pthread_draft4 = yes; then - cf_cv_pthread_version=draft4 - else - cf_cv_pthread_version=unknown - fi - ]) - - if test $cf_cv_pthread_version = final ; then + if test $ol_cv_pthread_version = final ; then LTHREAD_DEFS="$LTHREAD_DEFS -DPOSIX_THREADS" - elif test $cf_cv_pthread_version = draft4 ; then + elif test $ol_cv_pthread_version = draft4 ; then LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_MIT_PTHREADS" else - AC_MSG_ERROR(unknown pthread version) + AC_MSG_ERROR([unknown pthread version]) fi - AC_CACHE_CHECK([for LinuxThreads], cf_cv_linux_threads, [ - res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l` - if test "$res" -gt 0 ; then - cf_cv_linux_threads=yes - else - cf_cv_linux_threads=no - fi - ]) + # consider threads found + ol_with_threads="posix" - if test $cf_cv_linux_threads = yes ; then + OL_LINUX_THREADS + + if test $ol_cv_linux_threads = yes ; then dnl AC_DEFINE(HAVE_LINUX_THREADS,1) LTHREAD_DEFS="$LTHREAD_DEFS -DHAVE_LINUX_THREADS" fi @@ -272,170 +233,212 @@ dnl AC_DEFINE(HAVE_LINUX_THREADS,1) dnl Now the hard part, how to link dnl A few platforms have pthread support in standard libraries - AC_CHECK_FUNC(pthread_create,pthread_link=yes,pthread_link=no) + AC_CHECK_FUNC(pthread_create,ol_link_threads=yes) - if test $pthread_link = no ; then + if test $ol_link_threads = no ; then dnl try -pthread AC_CACHE_CHECK([for pthread_create with -pthread], - cf_cv_pthread_flag, [ + [ol_cv_pthread_flag], [ dnl save the CPPFLAGS save_LIBS="$LIBS" LIBS="-pthread $LIBS" AC_TRY_LINK([#include ],[ pthread_create((pthread_t*) 0, (pthread_attr_t*) 0, 0, 0); - ], cf_cv_pthread_flag=yes, cf_cv_pthread_flag=no) + ], ol_cv_pthread_flag=yes, ol_cv_pthread_flag=no) dnl restore the LIBS LIBS="$save_LIBS" ]) - if test $cf_cv_pthread_flag = yes ; then + if test $ol_cv_pthread_flag = yes ; then LTHREAD_LIBS="$LTHREAD_LIBS -pthread" - pthread_link=yes + ol_link_threads=yes fi fi - if test $pthread_link = no ; then + if test $ol_link_threads = no ; then dnl try -lpthread save_LIBS="$LIBS" AC_CHECK_LIB(pthread, pthread_create, [ - pthread_link=yes + ol_link_threads=yes LTHREAD_LIBS="$LTHREAD_LIBS -lpthread"]) LIBS="$save_LIBS" fi - if test $pthread_link = no ; then + if test $ol_link_threads = no ; then dnl try -lc_r save_LIBS="$LIBS" AC_CHECK_LIB(c_r, pthread_create, [ - pthread_link=yes + ol_link_threads=yes LTHREAD_LIBS="$LTHREAD_LIBS -lc_r"]) LIBS="$save_LIBS" fi - if test $pthread_link = no ; then + if test $ol_link_threads = no ; then dnl try DEC Threads save_LIBS="$LIBS" AC_CHECK_LIB(pthread, pthread_create, [ - pthread_link=yes + ol_link_threads=yes LTHREAD_DEFS="$LTHREAD_DEFS -DDEC_THREADS" LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc"],, [-lmach -lexc -lc]) LIBS="$save_LIBS" fi - else - LTHREAD_DEFS="-DNO_THREADS" - fi -fi - -# check for strtok_r (and presumely other reentrant functions) -save_LIBS="$LIBS" -LIBS="$save_LIBS $LTHREAD_LIBS" -AC_CHECK_LIB(pthread,strtok_r) - -if test $ac_cv_lib_pthread_strtok_r = no ; then - LIBS="$save_LIBS $LTHREAD_LIBS" - AC_CHECK_LIB(c_r,strtok_r) - AC_CHECK_FUNCS(strtok_r sched_yield) - if test $ac_cv_lib_c_r_strtok_r = yes ; then - LTHREAD_LIBS="$LTHREAD_LIBS -lc_r" - fi -else - AC_CHECK_FUNCS(strtok_r sched_yield) -fi - -LIBS="$save_LIBS" - - -ldbm_use="none" -if test "$SLAPD_LDBM" = "yes" ; then - if test $ldbm_prefer = any -o $ldbm_prefer = dbbtree \ - -o $ldbm_prefer = dbhash ; then - AC_CHECK_FUNC(dbopen,[ - ldbm_use=$ldbm_prefer - ldbm_prefer=found],[ - AC_CHECK_LIB(db,dbopen,[ - ldbm_use=$ldbm_prefer - ldbm_prefer=found - LDBM_LIBS="$LDBM_LIBS -ldb" - ]) - ]) - - if test $ldbm_prefer = found ; then - if test $ldbm_use = dbhash ; then -dnl AC_DEFINE(LDBM_USE_DBHASH,1) - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBHASH" - else -dnl AC_DEFINE(LDBM_USE_DBBTREE,1) - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBBTREE" - fi + if test $ol_link_threads = no ; then + AC_MSG_ERROR([could not link with POSIX Threads]) fi + elif test $ol_with_threads = posix ; then + AC_MSG_ERROR([could not locate POSIX Threads]) + fi +fi - AC_CACHE_CHECK(for db2, cf_cv_db2,[ - AC_EGREP_CPP(__db_version_2,[ -#include -/* this check could be improved */ -#ifdef DB_VERSION_MAJOR -#if DB_VERSION_MAJOR == 2 - __db_version_2 -#endif -#endif - ], cf_cv_db2=yes, cf_cv_db2=no)]) +if test $ol_link_threads = no ; then + if test $ol_with_threads = yes ; then + AC_MSG_ERROR([no suitable thread support]) + fi - if test $cf_cv_db2 = yes ; then - if test $opt_db2 = yes ; then - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2" - else - AC_CHECK_HEADERS(db_185.h) - if test $ac_cv_header_db_185_h = no ; then - AC_MSG_ERROR([select --with-db2 or install db2 with 1.85 compatibility]) - fi + if test $ol_with_threads = auto ; then + AC_MSG_WARN([no suitable thread support, disabling threads]) + $ol_with_threads = no + fi - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2_COMPAT185" - fi + LTHREAD_DEFS="-DNO_THREADS" + LTHREAD_LIBS="" +fi + +dnl # check for strtok_r (and presumely other reentrant functions) +dnl save_LIBS="$LIBS" +dnl LIBS="$save_LIBS $LTHREAD_LIBS" +dnl AC_CHECK_LIB(pthread,strtok_r) +dnl +dnl if test $ac_cv_lib_pthread_strtok_r = no ; then +dnl LIBS="$save_LIBS $LTHREAD_LIBS" +dnl AC_CHECK_LIB(c_r,strtok_r) +dnl AC_CHECK_FUNCS(strtok_r sched_yield) +dnl if test $ac_cv_lib_c_r_strtok_r = yes ; then +dnl LTHREAD_LIBS="$LTHREAD_LIBS -lc_r" +dnl fi +dnl else +dnl AC_CHECK_FUNCS(strtok_r sched_yield) +dnl fi +dnl +dnl LIBS="$save_LIBS" + + +ol_link_ldbm=no +if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then + OL_BERKELEY_DB2 + + if test $ol_cv_berkeley_db2 = yes ; then + ol_link_ldbm=db2 + ol_with_ldbm_api=db2 + + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2" + + if test $ol_with_ldbm_type = hash ; then + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBHASH" else - if test $opt_db2 = yes ; then - AC_MSG_ERROR(could not local DB2) - fi + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBBTREE" fi - fi - if test $ldbm_prefer = any -o $ldbm_prefer = gdbm ; then - AC_CHECK_LIB(gdbm, gdbm_open,[ - ldbm_use=$ldbm_prefer - ldbm_prefer=found - LDBM_LIBS="$LDBM_LIBS -lgdbm" -dnl AC_DEFINE(LDBM_USE_GDBM,1) - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_GDBM" - ]) - fi - if test $ldbm_prefer = any -o $ldbm_prefer = ndbm ; then - AC_CHECK_LIB(dbm,dbm_open,[ - ldbm_use=ndbm - ldbm_prefer=found - LDBM_LIBS="$LDBM_LIBS -ldbm" -dnl AC_DEFINE(LDBM_USE_NDBM,1) - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_NDBM" - ]) - fi - - if test $ldbm_prefer != found ; then - AC_MSG_ERROR(could not find suitable db for $ldbm_prefer backend) - fi - - if test $ldbm_use = ndbm ; then - AC_MSG_WARN(LDBM using NDBM, functionality will be limited) + if test $ol_cv_lib_db2 != yes ; then + LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2" + fi fi fi -if test "$SLAPD_TCP_WRAPPERS" = "yes" ; then - AC_CHECK_LIB(wrap, hosts_access, [ +if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then + OL_BERKELEY_DB + + if test $ol_cv_berkeley_db = yes ; then + ol_link_ldbm=db + ol_with_ldbm_api=db + + if test $ac_cv_header_db_185_h = yes ; then + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2_COMPAT185" + fi + + if test $ol_with_ldbm_type = hash ; then + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBHASH" + else + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBBTREE" + fi + + if test $ol_cv_lib_db != yes ; then + LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db" + fi + fi +fi + +if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then + AC_MSG_WARN(Could not find LDBM with BTREE support); + $ol_with_ldbm_api=none +fi + +if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then + OL_GDBM + + if test $ol_cv_gdbm = yes ; then + ol_link_ldbm=gdbm + ol_with_ldbm_api=gdbm + + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_GDBM" + + if test $ol_cv_lib_db != yes ; then + LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm" + fi + fi +fi + +if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = ndbm ; then + OL_NDBM + + if test $ol_cv_ndbm = yes ; then + ol_link_ldbm=ndbm + ol_with_ldbm_api=ndbm + + if test $ol_with_ldbm_api = ndbm ; then + AC_WARN([Attempting to use NDBM. Functionality will be limited.]) + fi + + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_NDBM" + + if test $ol_cv_lib_db != yes ; then + LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm" + fi + fi +fi + +if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then + AC_MSG_WARN(could not find suitable LDBM backend) + if test $ol_enable_ldbm = yes ; then + AC_MSG_ERROR(select appropriate LDBM options or disable) + fi + + AC_MSG_WARN(disabling LDBM) + $ol_enable_ldbm=no +fi + +if test $ol_enable_wrappers = yes ; then + AC_CHECK_LIB(wrap, hosts_access, + [have_wrappers=yes], [have_wrappers=no]) + + if test $have_wrappers = yes ; then dnl LIBTCPD="-lwrap" dnl AC_DEFINE(HAVE_TCPD) SLAPD_DEFS="$SLAPD_DEFS -DTCP_WRAPPERS" SLAPD_LIBS="$SLAPD_LIBS -lwrap" - ]) + else + AC_MSG_WARN(could not find -lwrap) + if test $ol_enable_wrappers = yes ; then + AC_MSG_ERROR(could not find wrappers, select appropriate options or disable) + fi + + AC_MSG_WARN(disabling wrappers support) + ol_enable_wrappers=no + fi + fi # ud needs termcap (should insert check here) @@ -443,7 +446,7 @@ LIBTERMCAP="-ltermcap" AC_SUBST(LIBTERMCAP) # FreeBSD (and others) have crypt(3) in -lcrypt -if test "$SLAPD_CRYPT" = "yes" ; then +if test $ol_enable_crypt != no ; then AC_CHECK_FUNC(crypt, have_crypt=yes, [ AC_CHECK_LIB(crypt, crypt, [LUTIL_LIBS="$LUTIL_LIBS -lcrypt" have_crypt=yes], [have_crypt=no])]) @@ -452,7 +455,13 @@ if test "$SLAPD_CRYPT" = "yes" ; then dnl AC_DEFINE(SLAPD_CRYPT,1) LUTIL_DEFS="$LUTIL_DEFS -DLDAP_CRYPT" else - AC_MSG_WARN(could not find crypt, disabling crypt support) + AC_MSG_WARN(could not find crypt) + if test $ol_enable_crypt = yes ; then + AC_MSG_ERROR(could not find crypt, select appropriate options or disable) + fi + + AC_MSG_WARN(disabling crypt support) + ol_enable_crypt=no fi fi @@ -520,9 +529,86 @@ AC_REPLACE_FUNCS(strdup) dnl ---------------------------------------------------------------- # Check Configuration -CF_SYS_ERRLIST +OL_SYS_ERRLIST dnl ---------------------------------------------------------------- +dnl Sort out defines + +if test $ol_enable_debug != no ; then + LDAP_DEFS="$LDAP_DEFS -DLDAP_DEBUG" +fi +#if test $ol_enable_syslog != no ; then +# LDAP_DEFS="$LDAP_DEFS -DLDAP_SYSLOG" +#fi +if test $ol_enable_libui = no ; then + LDAP_DEFS="$LDAP_DEFS -DNO_USERINTERFACE" +fi +if test $ol_enable_cache = no ; then + LDAP_DEFS="$LDAP_DEFS -DNO_CACHE" +fi +if test $ol_enable_dns != no ; then + LDAP_DEFS="$LDAP_DEFS -DLDAP_DNS" +fi +if test $ol_enable_referrals != no ; then + LDAP_DEFS="$LDAP_DEFS -DLDAP_REFERRALS" +fi +if test $ol_enable_cldap != no ; then + LDAP_DEFS="$LDAP_DEFS -DCLDAP" +fi + +if test $ol_enable_aclgroup != no ; then + AC_DEFINE(SLAPD_ACLGROUP,1) + SLAPD_DEFS="$SLAPD_DEFS -DACLGROUP" +fi + +if test $ol_enable_md5 != no ; then +dnl AC_DEFINE(SLAPD_MD5,1) + LUTIL_DEFS="$LUTIL_DEFS -DLDAP_MD5" +fi + +if test $ol_enable_sha1 != no ; then +dnl AC_DEFINE(SLAPD_SHA1,1) + LUTIL_DEFS="$LUTIL_DEFS -DLDAP_SHA1" +fi + +if test $ol_enable_phonetic != no ; then + AC_DEFINE(SLAPD_PHONETIC,1) + SLAPD_DEFS="$SLAPD_DEFS -DSOUNDEX" +fi + +if test $ol_enable_rlookups != no ; then + AC_DEFINE(SLAPD_RLOOKUPS,1) + SLAPD_DEFS="$SLAPD_DEFS -DREVERSE_LOOKUPS" +fi + +if test $ol_link_ldbm != no ; then +dnl AC_DEFINE(SLAPD_LDBM,1) + BUILD_SLAPD=yes + BUILD_LDBM=yes + LDBM_DEFS="-DLDAP_LDBM $LDBM_DEFS" +fi + +if test $ol_enable_passwd != no ; then +dnl AC_DEFINE(SLAPD_PASSWD,1) + BUILD_SLAPD=yes + BUILD_PASSWD=yes + SLAPD_DEFS="-DLDAP_PASSWD $SLAPD_DEFS" +fi + +if test $ol_enable_shell != no ; then +dnl AC_DEFINE(SLAPD_SHELL,1) + BUILD_SLAPD=yes + BUILD_SHELL=yes + SLAPD_DEFS="-DLDAP_SHELL $SLAPD_DEFS" +fi + +if test $ol_enable_slurpd != no -a $ol_link_threads != no -a \ + $BUILD_SLAPD = yes ; then + BUILD_SLURPD=yes +fi + +dnl ---------------------------------------------------------------- + AC_SUBST(BUILD_LDAPD) AC_SUBST(BUILD_SLAPD) AC_SUBST(BUILD_LDBM) @@ -537,9 +623,6 @@ AC_SUBST(LDAPD_DEFS) AC_SUBST(LDAPD_LIBS) AC_SUBST(SLAPD_DEFS) AC_SUBST(SLAPD_LIBS) - AC_SUBST(SLAPD_LDBM) - AC_SUBST(SLAPD_PASSWD) - AC_SUBST(SLAPD_SHELL) AC_SUBST(SLURPD_DEFS) AC_SUBST(SLURPD_LIBS) AC_SUBST(LDBM_DEFS) diff --git a/servers/slapd/back-ldbm/Makefile.in b/servers/slapd/back-ldbm/Makefile.in index 9d463937a6..51414776df 100644 --- a/servers/slapd/back-ldbm/Makefile.in +++ b/servers/slapd/back-ldbm/Makefile.in @@ -1,17 +1,17 @@ SRCS = idl.c add.c search.c cache.c dbcache.c dn2id.c id2entry.c \ - index.c id2children.c nextid.c abandon.c compare.c \ + index.c id2children.c nextid.c abandon.c compare.c group.c \ modify.c modrdn.c delete.c init.c config.c bind.c attr.c \ filterindex.c unbind.c kerberos.c close.c OBJS = idl.o add.o search.o cache.o dbcache.o dn2id.o id2entry.o \ - index.o id2children.o nextid.o abandon.o compare.o \ + index.o id2children.o nextid.o abandon.o compare.o group.o \ modify.o modrdn.o delete.o init.o config.o bind.o attr.o \ filterindex.o unbind.o kerberos.o close.o BUILD_OPT = "--enable-ldbm" -BUILD_SRV = @SLAPD_LDBM@ +BUILD_SRV = @BUILD_LDBM@ XINCLUDEDIR = -I.. -XDEFS = @LDBM_DEFS@ @LTHREAD_DEFS@ @LUTIL_DEFS@ +XDEFS = @SLAPD_DEFS@ @LDBM_DEFS@ @LTHREAD_DEFS@ @LUTIL_DEFS@ PROGRAMS = libback-ldbm.a diff --git a/servers/slapd/back-passwd/Makefile.in b/servers/slapd/back-passwd/Makefile.in index 2552ead44c..012780d32f 100644 --- a/servers/slapd/back-passwd/Makefile.in +++ b/servers/slapd/back-passwd/Makefile.in @@ -2,7 +2,7 @@ SRCS = search.c config.c OBJS = search.o config.o BUILD_OPT = "--enable-passwd" -BUILD_SRV = @SLAPD_PASSWD@ +BUILD_SRV = @BUILD_PASSWD@ PROGRAMS= libback-passwd.a XINCLUDEDIR= -I.. diff --git a/servers/slapd/back-shell/Makefile.in b/servers/slapd/back-shell/Makefile.in index 34a57e9b67..87b3892e87 100644 --- a/servers/slapd/back-shell/Makefile.in +++ b/servers/slapd/back-shell/Makefile.in @@ -4,7 +4,7 @@ OBJS = init.o config.o fork.o search.o bind.o unbind.o add.o delete.o \ modify.o modrdn.o compare.o abandon.o result.o BUILD_OPT = "--enable-shell" -BUILD_SRV = @SLAPD_SHELL@ +BUILD_SRV = @BUILD_SHELL@ PROGRAMS = libback-shell.a XINCLUDEDIR = -I.. From cbd6badaed68c1693a4703da83e330a4d44c5976 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sun, 20 Sep 1998 08:34:18 +0000 Subject: [PATCH 055/148] Fixed GDBM bugs. --- INSTALL | 122 ++++++--------- README | 67 ++++---- acconfig.h | 6 + configure | 353 ++++++++++++++++++++++++------------------ configure.in | 44 ++---- include/portable.h.in | 29 ++-- 6 files changed, 318 insertions(+), 303 deletions(-) diff --git a/INSTALL b/INSTALL index 958d72e704..ccfa7dc7c4 100644 --- a/INSTALL +++ b/INSTALL @@ -1,87 +1,61 @@ -Making and Installing the U-M LDAP Distribution +Making and Installing the OpenLDAP Distribution ** It is recommended that you read or at least skim through ALL of the ** instructions in this file before attempting to build the software. If you want to build binaries for more than one platform from a single source tree, skip ahead to the "Building LDAP For More Than One Platform" -section near the end of this file. If you are planning to run slapd, -you should read the "SLAPD and SLURPD Administrator's Guide", found in -the doc/guides/ directory within the distribution. +section near the end of this file. If you simply want to build LDAP for a single machine platform, follow these steps: 1. untar the distribution and cd to the top: - % zcat ldap-3.3.tar.Z | tar xf - - % cd ldap-3.3 + % tar xfz ldap-stable.tgz + % cd ldap If you are reading this file, you probably have already done this! + 2. Type: + % ./configure --help - 2. edit the files Make-common and include/ldapconfig.h.edit to configure + to list available configuration options. + + The configure script will also use your environmental + variables for determining compiler/linker options. + + These environment variables are used: + CC C Compiler (cc, ecgs) + CFLAGS C Flags (-ansi) + CPPFLAGS CPP Flags (-I/path/include -Ddef) + LDFLAGS LDFLAGS (-L/path/lib -llib) + + 3. edit the file include/ldapconfig.h.edit to configure the software for your site (the files are well-commented): - % vi Make-common % vi include/ldapconfig.h.edit - Note that you should NOT need to edit the Makefile located at the - top of the distribution. + 4. Configure the build system - If you just want to see if things will build, you can leave the - configuration alone and change it later. + % [env settings] ./configure [options] - If you have the ISODE package built and want to build the - LDAP-to-X.500 server (ldapd), be sure to uncomment the appropriate - lines near the end of the Make-common file. By default only the - stand-alone server, LDAP libraries and client software are built. + If all goes well, the configure script with auto-detect the + appropriate settings. Use configure enable/with options and/or + environment variables to obtain desired results. - 3. make the software: + 5. Build dependencies + + % make depend + + 6. Build the system % make - If all goes well, then make will figure out what platform you are on, - pick a compiler to use, construct Makefiles, and build everything. - If you see a message like "unknown platform..." LDAP has probably not - been set up to build on your machine. See the file build/PORTS for - hints on what to do in that case. - - Note that if your make does not use the Bourne (sh) shell by - default when executing internal scripts (reportedly the case on SGI - machines at least), you will need to run the make explicitly from - within a Bourne shell. If you a syntax error such as "Missing ]" - when you do the make under your usual shell, try this: - - % sh - $ make - - If you don't like the some of the platform-specific options chosen - by the automatic build process (such as the compiler to use, etc), - you can intervene and edit them before anything is actually compiled - by explicitly doing a "make platform" step, editing the .make-platform - file (actually a link to the file to be edited), and then doing a - regular make: - - % make platform - % vi .make-platform - % make - - If you want to choose the build platform yourself from among those that - the distribution supports, cd to the appropriate directory underneath - build/platforms and make from there. For example, if you are on a - machine running SunOS 4.1.4 and you want to force the use of the cc - compiler, you would do this: - - % cd build/platforms/sunos4-cc - % make - - If you want to run some simple tests after the build is complete, you - can do this: - - % make test - - 4. install the binaries and man pages. You may need to be superuser to + If all goes well, the system will build as configured. If not, + return to step 4 after reviewing the enable/with options settings. + + 7. install the binaries and man pages. You may need to be superuser to do this (depending on where you are installing things): % su @@ -103,34 +77,26 @@ these steps: Building LDAP For More Than One Platform It is now possible to build LDAP for more than one platform from the same -source tree. This is accomplished by some rules in the Makefiles that -create a shadow (linked) directory tree where the binaries are placed. +source tree. This is accomplished by using make(1) VPATH support. If +your make(1) program is old and doesn't have VPATH support, install GNU +Make. Follow these steps for each different platform: - 1. move to the directory that matches the platform and compiler you - want to build for and type make. The directories are all located - underneath the build/platforms directory. If your platform is not - there, you may need to do a port - see the build/PORTS file for - more information. For a Sun running SunOS 4.1.4, you might do - this: + 1. Create a directory for the platform object files. - % cd build/platforms/sunos4-cc - % make links + % mkdir obj-platform - This will create a linked source area. + 2. Change your working directory to the platform object directory. + % cd obj-platform - 2. move to the new directory and make as for a single platform. Follow steps - 1-4 above to accomplish this. For example: + 3. Configure the build system - % cd obj-sunos4-cc - % make + % [env settings] ../configure --src-dir=.. [options] - That's all there is to it. You can also create the linked source area(s) - by just typing "make links" at the top of the distribution, in which case - the Makefile will try to automatically determine the platform and - compiler. + ( replace ".." with the appropriate path ) + 4. Continue as above (starting at step 5). -End of LDAP INSTALL file. +End of OpenLDAP INSTALL file. diff --git a/README b/README index fb8dd8ab36..1236676d41 100644 --- a/README +++ b/README @@ -1,20 +1,40 @@ -UM-LDAP 3.3 README file +OpenLDAP 1.0 README - This is the UM-LDAP version 3.3 distribution. For a description of - what this distribution contains, see the ANNOUNCEMENT file in this - directory. For a description of changes from previous releases, - see the CHANGES file in this directory. For a more detailed - description of how to make and install the distribution, see the - INSTALL file in this directory. For more information on making and - installing slapd, see the "SLAPD and SLURPD Administrator's Guide" - in the doc/guides/ directory. + This is the OpenLDAP version 1.0 distribution. + + For a description of what this distribution contains, see the + ANNOUNCEMENT file in this directory. For a description of + changes from previous releases, see the CHANGES file in this + directory. For a more detailed description of how to make an + install the distribution, see the INSTALL file in this directory. + + For more information: + http://www.OpenLDAP.org/ MAKING AND INSTALLING THE DISTRIBUTION You should be able to make and install the distribution with a pretty standard default configuration by typing the following commands - % make + % ./configure --help + This will list the available options. + The configure script will also use your environmental + variables for determining compiler/linker options. + These environment variables are used: + CC C compiler (cc, ecgs) + CFLAGS C Flags (-ansi) + CPPFLAGS CPP Flags (-I -D) + LDFLAGS LDFLAGS (-L -l) + + % [env settings] ./configure [options] + this will configure the build system + + % make depend + this will create dependency information + + % make + this will build the system + % su # make install @@ -22,18 +42,11 @@ MAKING AND INSTALLING THE DISTRIBUTION works. You will probably want to do a little configuration to suit your - site, though. There are two files you might want to edit: + site, though. There are one file you might want to edit: - Make-common This file contains definitions for - where things will be installed, where - to find various things, etc. If you - want to build an ldap server, you'll - definitely need to edit this file - - include/ldapconfig.h.edit This file contains #defines used - by many parts of the distribution. - You'll at least want to change - DEFAULT_BASE. + include/ldapconfig.h.edit + This file contains #defines used by many parts of the + distribution. You'll at least want to change DEFAULT_BASE. See the INSTALL file in this directory for more information. @@ -42,18 +55,16 @@ DOCUMENTATION There are man pages for most programs in the distribution and routines in the various libraries. See ldap(3) for details. - There is a postscript version of an administrator's guide for - slapd in doc/guides/slapd.ps. - - There is an LDAP homepage available that contains the latest + There is an OpenLDAP homepage available that contains the latest LDAP news, releases announcements, pointers to other LDAP resources, etc. You can access it at this URL: - http://www.umich.edu/~rsug/ldap/ + http://www.OpenLDAP.org/ -FEEDBACK / PROBLEM REPORTS +FEEDBACK / PROBLEM REPORTS / DISCUSSIONS We would appreciate any feedback you can provide. If you have problems, report them to this address: - ldap-support@umich.edu + OpenLDAP-bugs@OpenLDAP.org + diff --git a/acconfig.h b/acconfig.h index 24eadb2950..b34ceaf659 100644 --- a/acconfig.h +++ b/acconfig.h @@ -20,6 +20,12 @@ /* define this for LDAP referrals support */ #undef LDAP_REFERRALS +/* define this for ACL Group support */ +#undef SLAPD_ACLGROUPS + +/* define this for Reverse Lookup support */ +#undef SLAPD_RLOOKUPS + /* define this for phonetic support */ #undef SLAPD_PHONETIC diff --git a/configure b/configure index b0a666855e..5ce0e3dc1b 100755 --- a/configure +++ b/configure @@ -1811,7 +1811,7 @@ echo "$ac_t""$ol_cv_pthread_version" 1>&6 fi # consider threads found - ol_with_threads="posix" + ol_with_threads=found echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 @@ -1924,7 +1924,7 @@ echo "$ac_t""$ol_cv_pthread_flag" 1>&6 if test $ol_cv_pthread_flag = yes ; then LTHREAD_LIBS="$LTHREAD_LIBS -pthread" - ol_link_threads=yes + ol_link_threads=posix fi fi @@ -1966,7 +1966,7 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - ol_link_threads=yes + ol_link_threads=posix LTHREAD_LIBS="$LTHREAD_LIBS -lpthread" else echo "$ac_t""no" 1>&6 @@ -2013,7 +2013,7 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - ol_link_threads=yes + ol_link_threads=posix LTHREAD_LIBS="$LTHREAD_LIBS -lc_r" else echo "$ac_t""no" 1>&6 @@ -2060,7 +2060,7 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - ol_link_threads=yes + ol_link_threads=posix LTHREAD_DEFS="$LTHREAD_DEFS -DDEC_THREADS" LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc" else @@ -2070,10 +2070,61 @@ fi LIBS="$save_LIBS" fi - if test $ol_link_threads = no ; then + if test $ol_link_threads != no ; then + echo $ac_n "checking for sched_yield""... $ac_c" 1>&6 +echo "configure:2076: checking for sched_yield" >&5 +if eval "test \"`echo '$''{'ac_cv_func_sched_yield'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char sched_yield(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_sched_yield) || defined (__stub___sched_yield) +choke me +#else +sched_yield(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_sched_yield=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_sched_yield=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'sched_yield`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +fi + + else { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; } fi - elif test $ol_with_threads = posix ; then + fi + + if test $ol_with_threads = posix ; then { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; } fi fi @@ -2092,18 +2143,16 @@ if test $ol_link_threads = no ; then LTHREAD_LIBS="" fi - - ol_link_ldbm=no if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then echo $ac_n "checking for DB2 library""... $ac_c" 1>&6 -echo "configure:2101: checking for DB2 library" >&5 +echo "configure:2150: checking for DB2 library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6 -echo "configure:2107: checking for db_open in -ldb" >&5 +echo "configure:2156: checking for db_open in -ldb" >&5 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2111,7 +2160,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2153,17 +2202,17 @@ for ac_hdr in db.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2157: checking for $ac_hdr" >&5 +echo "configure:2206: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2191,13 +2240,13 @@ done if test $ac_cv_header_db_h = yes ; then echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6 -echo "configure:2195: checking if db.h is DB2" >&5 +echo "configure:2244: checking if db.h is DB2" >&5 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -2227,7 +2276,7 @@ fi echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6 -echo "configure:2231: checking for Berkeley DB2" >&5 +echo "configure:2280: checking for Berkeley DB2" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2263,18 +2312,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6 -echo "configure:2267: checking for Berkeley DB library" >&5 +echo "configure:2316: checking for Berkeley DB library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:2273: checking for dbopen" >&5 +echo "configure:2322: checking for dbopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -2316,7 +2365,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:2320: checking for dbopen in -ldb" >&5 +echo "configure:2369: checking for dbopen in -ldb" >&5 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2324,7 +2373,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2370,17 +2419,17 @@ for ac_hdr in db_185.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2374: checking for $ac_hdr" >&5 +echo "configure:2423: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2384: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2416,7 +2465,7 @@ fi echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6 -echo "configure:2420: checking for Berkeley DB" >&5 +echo "configure:2469: checking for Berkeley DB" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2459,18 +2508,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then echo $ac_n "checking for GDBM library""... $ac_c" 1>&6 -echo "configure:2463: checking for GDBM library" >&5 +echo "configure:2512: checking for GDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6 -echo "configure:2469: checking for gdbm_open" >&5 +echo "configure:2518: checking for gdbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gdbm_open=yes" else @@ -2512,7 +2561,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:2516: checking for gdbm_open in -lgdbm" >&5 +echo "configure:2565: checking for gdbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2520,7 +2569,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2566,17 +2615,17 @@ echo "$ac_t""$ol_cv_lib_gdbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2570: checking for $ac_hdr" >&5 +echo "configure:2619: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2603,7 +2652,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:2607: checking for db" >&5 +echo "configure:2656: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2625,7 +2674,7 @@ echo "$ac_t""$ol_cv_gdbm" 1>&6 LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_GDBM" - if test $ol_cv_lib_db != yes ; then + if test $ol_cv_lib_gdbm != yes ; then LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm" fi fi @@ -2633,18 +2682,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = ndbm ; then echo $ac_n "checking for NDBM library""... $ac_c" 1>&6 -echo "configure:2637: checking for NDBM library" >&5 +echo "configure:2686: checking for NDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:2643: checking for dbm_open" >&5 +echo "configure:2692: checking for dbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -2686,7 +2735,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6 -echo "configure:2690: checking for dbm_open in -lndbm" >&5 +echo "configure:2739: checking for dbm_open in -lndbm" >&5 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2694,7 +2743,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lndbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2725,7 +2774,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:2729: checking for dbm_open in -ldbm" >&5 +echo "configure:2778: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2733,7 +2782,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2781,17 +2830,17 @@ echo "$ac_t""$ol_cv_lib_ndbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2785: checking for $ac_hdr" >&5 +echo "configure:2834: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2818,7 +2867,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:2822: checking for db" >&5 +echo "configure:2871: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2844,7 +2893,7 @@ echo "$ac_t""$ol_cv_ndbm" 1>&6 LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_NDBM" - if test $ol_cv_lib_db != yes ; then + if test $ol_cv_lib_ndbm != yes ; then LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm" fi fi @@ -2862,7 +2911,7 @@ fi if test $ol_enable_wrappers = yes ; then echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6 -echo "configure:2866: checking for hosts_access in -lwrap" >&5 +echo "configure:2915: checking for hosts_access in -lwrap" >&5 ac_lib_var=`echo wrap'_'hosts_access | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2870,7 +2919,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lwrap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2925,12 +2974,12 @@ LIBTERMCAP="-ltermcap" # FreeBSD (and others) have crypt(3) in -lcrypt if test $ol_enable_crypt != no ; then echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:2929: checking for crypt" >&5 +echo "configure:2978: checking for crypt" >&5 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -2972,7 +3021,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:2976: checking for crypt in -lcrypt" >&5 +echo "configure:3025: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2980,7 +3029,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3034,12 +3083,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:3038: checking for $ac_hdr that defines DIR" >&5 +echo "configure:3087: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -3047,7 +3096,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:3051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -3072,7 +3121,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:3076: checking for opendir in -ldir" >&5 +echo "configure:3125: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3080,7 +3129,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3113,7 +3162,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:3117: checking for opendir in -lx" >&5 +echo "configure:3166: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3121,7 +3170,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3155,12 +3204,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3159: checking for ANSI C header files" >&5 +echo "configure:3208: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3168,7 +3217,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3185,7 +3234,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3203,7 +3252,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3224,7 +3273,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3235,7 +3284,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:3239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -3259,12 +3308,12 @@ EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:3263: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:3312: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3280,7 +3329,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:3284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -3316,17 +3365,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3320: checking for $ac_hdr" >&5 +echo "configure:3369: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3379: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3354,12 +3403,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3358: checking for uid_t in sys/types.h" >&5 +echo "configure:3407: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3388,7 +3437,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:3392: checking type of array argument to getgroups" >&5 +echo "configure:3441: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3396,7 +3445,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -3435,7 +3484,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -3459,12 +3508,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3463: checking for mode_t" >&5 +echo "configure:3512: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3492,12 +3541,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3496: checking for off_t" >&5 +echo "configure:3545: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3525,12 +3574,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3529: checking for pid_t" >&5 +echo "configure:3578: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3558,12 +3607,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3562: checking return type of signal handlers" >&5 +echo "configure:3611: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3580,7 +3629,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3633: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3599,12 +3648,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3603: checking for size_t" >&5 +echo "configure:3652: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3632,12 +3681,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3636: checking for uid_t in sys/types.h" >&5 +echo "configure:3685: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3666,12 +3715,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:3670: checking for st_blksize in struct stat" >&5 +echo "configure:3719: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3679,7 +3728,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:3683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3732: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -3700,12 +3749,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3704: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:3753: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3714,7 +3763,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -3735,12 +3784,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:3739: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:3788: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3748,7 +3797,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:3752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -3770,12 +3819,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3774: checking for working const" >&5 +echo "configure:3823: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3846,7 +3895,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:3850: checking for 8-bit clean memcmp" >&5 +echo "configure:3899: 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 @@ -3854,7 +3903,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -3882,12 +3931,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3886: checking return type of signal handlers" >&5 +echo "configure:3935: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3904,7 +3953,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3923,12 +3972,12 @@ EOF echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:3927: checking for strftime" >&5 +echo "configure:3976: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -3973,7 +4022,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:3977: checking for strftime in -lintl" >&5 +echo "configure:4026: 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 @@ -3981,7 +4030,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4019,12 +4068,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:4023: checking for vprintf" >&5 +echo "configure:4072: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -4071,12 +4120,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:4075: checking for _doprnt" >&5 +echo "configure:4124: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -4124,7 +4173,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:4128: checking for wait3 that fills in rusage" >&5 +echo "configure:4177: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4132,7 +4181,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -4163,7 +4212,7 @@ main() { } } EOF -if { (eval echo configure:4167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -4204,12 +4253,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4208: checking for $ac_func" >&5 +echo "configure:4257: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4260,12 +4309,12 @@ done for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4264: checking for $ac_func" >&5 +echo "configure:4313: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4318,13 +4367,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:4322: checking declaration of sys_errlist" >&5 +echo "configure:4371: 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 < @@ -4334,7 +4383,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:4338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -4355,20 +4404,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:4359: checking existence of sys_errlist" >&5 +echo "configure:4408: 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 < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:4372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index e481f32f24..22156f587f 100644 --- a/configure.in +++ b/configure.in @@ -221,7 +221,7 @@ if test $ol_with_threads = auto -o $ol_with_threads = posix ; then fi # consider threads found - ol_with_threads="posix" + ol_with_threads=found OL_LINUX_THREADS @@ -233,7 +233,7 @@ dnl AC_DEFINE(HAVE_LINUX_THREADS,1) dnl Now the hard part, how to link dnl A few platforms have pthread support in standard libraries - AC_CHECK_FUNC(pthread_create,ol_link_threads=yes) + AC_CHECK_FUNC(pthread_create,[ol_link_threads=yes]) if test $ol_link_threads = no ; then dnl try -pthread @@ -252,7 +252,7 @@ dnl AC_DEFINE(HAVE_LINUX_THREADS,1) if test $ol_cv_pthread_flag = yes ; then LTHREAD_LIBS="$LTHREAD_LIBS -pthread" - ol_link_threads=yes + ol_link_threads=posix fi fi @@ -260,7 +260,7 @@ dnl AC_DEFINE(HAVE_LINUX_THREADS,1) dnl try -lpthread save_LIBS="$LIBS" AC_CHECK_LIB(pthread, pthread_create, [ - ol_link_threads=yes + ol_link_threads=posix LTHREAD_LIBS="$LTHREAD_LIBS -lpthread"]) LIBS="$save_LIBS" fi @@ -269,7 +269,7 @@ dnl AC_DEFINE(HAVE_LINUX_THREADS,1) dnl try -lc_r save_LIBS="$LIBS" AC_CHECK_LIB(c_r, pthread_create, [ - ol_link_threads=yes + ol_link_threads=posix LTHREAD_LIBS="$LTHREAD_LIBS -lc_r"]) LIBS="$save_LIBS" fi @@ -278,17 +278,22 @@ dnl AC_DEFINE(HAVE_LINUX_THREADS,1) dnl try DEC Threads save_LIBS="$LIBS" AC_CHECK_LIB(pthread, pthread_create, [ - ol_link_threads=yes + ol_link_threads=posix LTHREAD_DEFS="$LTHREAD_DEFS -DDEC_THREADS" LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc"],, [-lmach -lexc -lc]) LIBS="$save_LIBS" fi - if test $ol_link_threads = no ; then + if test $ol_link_threads != no ; then + dnl All POSIX Thread (final) implementations should have sched_yield + AC_CHECK_FUNC(sched_yield) + else AC_MSG_ERROR([could not link with POSIX Threads]) fi - elif test $ol_with_threads = posix ; then + fi + + if test $ol_with_threads = posix ; then AC_MSG_ERROR([could not locate POSIX Threads]) fi fi @@ -307,25 +312,6 @@ if test $ol_link_threads = no ; then LTHREAD_LIBS="" fi -dnl # check for strtok_r (and presumely other reentrant functions) -dnl save_LIBS="$LIBS" -dnl LIBS="$save_LIBS $LTHREAD_LIBS" -dnl AC_CHECK_LIB(pthread,strtok_r) -dnl -dnl if test $ac_cv_lib_pthread_strtok_r = no ; then -dnl LIBS="$save_LIBS $LTHREAD_LIBS" -dnl AC_CHECK_LIB(c_r,strtok_r) -dnl AC_CHECK_FUNCS(strtok_r sched_yield) -dnl if test $ac_cv_lib_c_r_strtok_r = yes ; then -dnl LTHREAD_LIBS="$LTHREAD_LIBS -lc_r" -dnl fi -dnl else -dnl AC_CHECK_FUNCS(strtok_r sched_yield) -dnl fi -dnl -dnl LIBS="$save_LIBS" - - ol_link_ldbm=no if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then OL_BERKELEY_DB2 @@ -385,7 +371,7 @@ if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_GDBM" - if test $ol_cv_lib_db != yes ; then + if test $ol_cv_lib_gdbm != yes ; then LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm" fi fi @@ -404,7 +390,7 @@ if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = ndbm ; then LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_NDBM" - if test $ol_cv_lib_db != yes ; then + if test $ol_cv_lib_ndbm != yes ; then LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm" fi fi diff --git a/include/portable.h.in b/include/portable.h.in index 4812407c36..a68944d6b5 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -73,11 +73,11 @@ /* define this if sys_errlist is not defined in stdio.h or errno.h */ #undef DECL_SYS_ERRLIST -/* define this for connectionless LDAP support */ -#undef LDAP_CONNECTIONLESS +/* define this for ACL Group support */ +#undef SLAPD_ACLGROUPS -/* define this to remove -lldap cache support */ -#undef LDAP_NOCACHE +/* define this for Reverse Lookup support */ +#undef SLAPD_RLOOKUPS /* define this for phonetic support */ #undef SLAPD_PHONETIC @@ -94,9 +94,6 @@ /* Define if you have the mktime function. */ #undef HAVE_MKTIME -/* Define if you have the sched_yield function. */ -#undef HAVE_SCHED_YIELD - /* Define if you have the select function. */ #undef HAVE_SELECT @@ -121,15 +118,15 @@ /* Define if you have the strtod function. */ #undef HAVE_STRTOD -/* Define if you have the strtok_r function. */ -#undef HAVE_STRTOK_R - /* Define if you have the strtol function. */ #undef HAVE_STRTOL /* Define if you have the strtoul function. */ #undef HAVE_STRTOUL +/* Define if you have the header file. */ +#undef HAVE_DB_H + /* Define if you have the header file. */ #undef HAVE_DB_185_H @@ -139,12 +136,18 @@ /* Define if you have the header file. */ #undef HAVE_FCNTL_H +/* Define if you have the header file. */ +#undef HAVE_GDBM_H + /* Define if you have the header file. */ #undef HAVE_LIMITS_H /* Define if you have the header file. */ #undef HAVE_MALLOC_H +/* Define if you have the header file. */ +#undef HAVE_NDBM_H + /* Define if you have the header file. */ #undef HAVE_NDIR_H @@ -184,12 +187,6 @@ /* Define if you have the header file. */ #undef HAVE_UNISTD_H -/* Define if you have the c_r library (-lc_r). */ -#undef HAVE_LIBC_R - -/* Define if you have the pthread library (-lpthread). */ -#undef HAVE_LIBPTHREAD - #ifdef HAVE_STDDEF_H # include #endif From 32a688f0dffe39b9ebbd5e691d37092051f3fd35 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sun, 20 Sep 1998 18:54:36 +0000 Subject: [PATCH 056/148] Added basic VPATH support. VPATH Make depend still needs work. --- build/lib.mk | 4 ++-- build/top.mk | 9 ++++----- clients/fax500/Makefile.in | 7 +++++-- clients/finger/Makefile.in | 7 +++++-- clients/gopher/Makefile.in | 8 ++++++-- clients/mail500/Makefile.in | 6 +++++- clients/rcpt500/Makefile.in | 6 +++++- clients/tools/Makefile.in | 12 ++++++++---- clients/ud/Makefile.in | 6 +++++- include/Makefile.in | 5 +++-- libraries/libldap/Makefile.in | 3 +++ servers/ldapd/Makefile.in | 6 +++++- servers/slapd/Makefile.in | 6 +++++- servers/slapd/back-ldbm/Makefile.in | 4 +++- servers/slapd/back-passwd/Makefile.in | 4 +++- servers/slapd/back-shell/Makefile.in | 4 +++- servers/slapd/shell-backends/Makefile.in | 4 +++- servers/slapd/tools/Makefile.in | 4 ++++ servers/slurpd/Makefile.in | 6 +++++- 19 files changed, 82 insertions(+), 29 deletions(-) diff --git a/build/lib.mk b/build/lib.mk index 8ae91785ad..4526fcf552 100644 --- a/build/lib.mk +++ b/build/lib.mk @@ -11,13 +11,13 @@ $(LIBRARY): version.o $(RM) ../$@; \ (d=`$(PWD)` ; $(LN_S) `$(BASENAME) $$d`/$@ ../$@) -version.c: $(OBJS) +version.c: $(OBJS) $(srcdir)/Version.c $(RM) $@ (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` \ h=`$(HOSTNAME)` t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) + < $(srcdir)/Version.c > $@) install-common: all-common install-local diff --git a/build/top.mk b/build/top.mk index 819a7b70be..f1b1763de4 100644 --- a/build/top.mk +++ b/build/top.mk @@ -59,11 +59,10 @@ SENDMAIL = @SENDMAIL@ # Version VERSIONFILE = $(top_srcdir)/build/version -INCLUDEDIR = -I$(top_srcdir)/include $(XINCLUDEDIR) +INCLUDEDIR = -I$(top_srcdir)/include -LDAP_LIBDIR = $(top_srcdir)/libraries LDAP_LIBS = -lldif -lldap -llber -LDAP_LIBDEPEND = $(LDAP_LIBDIR)/libldap.a +LDAP_LIBDEPEND = $(VLIBDIR)/libldif.a $(VLIBDIR)/libldap.a $(VLIBDIR)/liblber.a # AutoConfig generated AC_CC = @CC@ @@ -76,8 +75,8 @@ LIBTERMCAP = @LIBTERMCAP@ # Our Defaults CC = $(AC_CC) -DEFS = $(AC_DEFS) $(INCLUDEDIR) $(LDAP_DEFS) $(XDEFS) -LIBS = -L$(LDAP_LIBDIR) $(LDAP_LIBS) $(XLIBS) $(AC_LIBS) +DEFS = $(LDAP_DEFS) $(VINCLUDEDIR) $(INCLUDEDIR) $(XDEFS) $(AC_DEFS) +LIBS = $(VLIBS) $(LDAP_LIBS) $(XLIBS) $(AC_LIBS) CFLAGS = $(AC_CFLAGS) $(DEFS) $(DEFINES) LDFLAGS = $(AC_LDFLAGS) diff --git a/clients/fax500/Makefile.in b/clients/fax500/Makefile.in index 08d85bee73..85da96cde5 100644 --- a/clients/fax500/Makefile.in +++ b/clients/fax500/Makefile.in @@ -3,6 +3,9 @@ XSRCS=fax5version.c rpversion.c FAX5OBJS = main.o faxtotpc.o RPOBJS = rp500.o faxtotpc.o PROGRAMS= rp500 fax500 +VINCLUDEDIR= -I../../include +VLIBDIR= ../../libraries +VLIBS= -L$(VLIBDIR) rp500 : rpversion.o @@ -17,7 +20,7 @@ rpversion.c: ${RPOBJS} $(LDAP_LIBDEPEND) t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Versionrp.c > $@) + < $(srcdir)/Versionrp.c > $@) fax5version.c: ${FAX5OBJS} $(LDAP_LIBDEPEND) $(RM) $@ @@ -25,7 +28,7 @@ fax5version.c: ${FAX5OBJS} $(LDAP_LIBDEPEND) t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) + < $(srcdir)/Version.c > $@) install: $(PROGRAMS) xrpcomp FORCE -$(MKDIR) -p $(libexecdir) diff --git a/clients/finger/Makefile.in b/clients/finger/Makefile.in index 628fe2afcb..10f2c34e99 100644 --- a/clients/finger/Makefile.in +++ b/clients/finger/Makefile.in @@ -2,17 +2,20 @@ SRCS= main.c XSRCS= version.c OBJS= main.o PROGRAMS= in.xfingerd +VINCLUDEDIR= -I../../include +VLIBDIR= ../../libraries +VLIBS= -L$(VLIBDIR) in.xfingerd : version.o $(CC) $(LDFLAGS) -o $@ version.o $(OBJS) $(LIBS) -version.c: ${OBJS} $(LDAP_LIBDEPEND) +version.c: ${OBJS} ${LDAP_LIBDEPEND} $(RM) $@ (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) + < $(srcdir)/Version.c > $@) install: $(PROGRAMS) FORCE -$(MKDIR) -p $(libexecdir) diff --git a/clients/gopher/Makefile.in b/clients/gopher/Makefile.in index 45ac3eb36f..728229170c 100644 --- a/clients/gopher/Makefile.in +++ b/clients/gopher/Makefile.in @@ -8,6 +8,10 @@ XSRCS= gwversion.o goversion.o GOOBJS = go500.o detach.o setproctitle.o GWOBJS = go500gw.o detach.o setproctitle.o +VINCLUDEDIR= -I../../include +VLIBDIR= ../../libraries +VLIBS= -L$(VLIBDIR) + go500 : goversion.o $(CC) $(LDFLAGS) -o $@ $(GOOBJS) goversion.o $(LIBS) @@ -20,7 +24,7 @@ goversion.c: ${GOOBJS} $(LDAP_LIBDEPEND) t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) + < $(srcdir)/Version.c > $@) gwversion.c: ${GWOBJS} $(LDAP_LIBDEPEND) $(RM) $@ @@ -28,7 +32,7 @@ gwversion.c: ${GWOBJS} $(LDAP_LIBDEPEND) t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Versiongw.c > $@) + < $(srcdir)/Versiongw.c > $@) install: $(PROGRAMS) go500gw.help FORCE -$(MKDIR) -p $(libexecdir) $(sysconfdir) diff --git a/clients/mail500/Makefile.in b/clients/mail500/Makefile.in index f96f5731d6..ae040c10ef 100644 --- a/clients/mail500/Makefile.in +++ b/clients/mail500/Makefile.in @@ -4,6 +4,10 @@ SRCS= main.c XSRCS= version.c OBJS= main.o +VINCLUDEDIR= -I../../include +VLIBDIR= ../../libraries +VLIBS= -L$(VLIBDIR) + mail500 : version.o $(CC) $(LDFLAGS) -o $@ version.o $(OBJS) $(LIBS) @@ -13,7 +17,7 @@ version.c: ${OBJS} $(LDAP_LIBDEPEND) t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) + < $(srcdir)/Version.c > $@) install: $(PROGRAMS) FORCE -$(MKDIR) -p $(libexecdir) diff --git a/clients/rcpt500/Makefile.in b/clients/rcpt500/Makefile.in index 4582b24aec..76c2e088d8 100644 --- a/clients/rcpt500/Makefile.in +++ b/clients/rcpt500/Makefile.in @@ -4,6 +4,10 @@ XSRCS= version.c OBJS= main.o cmds.o help.o query.o HDRS= rcpt500.h +VINCLUDEDIR= -I../../include +VLIBDIR= ../../libraries +VLIBS= -L$(VLIBDIR) + rcpt500 : version.o $(CC) $(LDFLAGS) -o $@ version.o $(OBJS) $(LIBS) @@ -13,7 +17,7 @@ version.c: ${OBJS} $(LDAP_LIBDEPEND) t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) + < $(srcdir)/Version.c > $@) install: $(PROGRAMS) rcpt500.help FORCE -$(MKDIR) -p $(libexecdir) $(sysconfdir) diff --git a/clients/tools/Makefile.in b/clients/tools/Makefile.in index a65ae1df05..e95894e29e 100644 --- a/clients/tools/Makefile.in +++ b/clients/tools/Makefile.in @@ -5,6 +5,10 @@ SRCS = ldapsearch.c ldapmodify.c ldapdelete.c ldapmodrdn.c OBJS = ldapsearch.o ldapmodify.o ldapdelete.o ldapmodrdn.o XLIBS = -llber -lldap +VINCLUDEDIR= -I../../include +VLIBDIR= ../../libraries +VLIBS= -L$(VLIBDIR) + XSRCS = ldsversion.c ldmversion.c lddversion.c ldrversion.c PROGRAMS = ldapsearch ldapmodify ldapdelete ldapmodrdn ldapadd @@ -31,7 +35,7 @@ ldsversion.c: ldapsearch.o $(LDAP_LIBDEPEND) t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Versionlds.c > $@) + < $(srcdir)/Versionlds.c > $@) ldmversion.c: ldapmodify.o $(LDAP_LIBDEPEND) $(RM) $@ @@ -39,7 +43,7 @@ ldmversion.c: ldapmodify.o $(LDAP_LIBDEPEND) t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Versionldm.c > $@) + < $(srcdir)/Versionldm.c > $@) lddversion.c: ldapdelete.o $(LDAP_LIBDEPEND) $(RM) $@ @@ -47,7 +51,7 @@ lddversion.c: ldapdelete.o $(LDAP_LIBDEPEND) t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Versionldd.c > $@) + < $(srcdir)/Versionldd.c > $@) ldrversion.c: ldapmodrdn.o $(LDAP_LIBDEPEND) $(RM) $@ @@ -55,7 +59,7 @@ ldrversion.c: ldapmodrdn.o $(LDAP_LIBDEPEND) t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Versionldr.c > $@) + < $(srcdir)/Versionldr.c > $@) installlocal: ldapsearch ldapmodify ldapdelete ldapmodrdn ldapadd FORCE -$(MKDIR) -p $(bindir) diff --git a/clients/ud/Makefile.in b/clients/ud/Makefile.in index faf2ab6c6e..e62e301e0a 100644 --- a/clients/ud/Makefile.in +++ b/clients/ud/Makefile.in @@ -6,6 +6,10 @@ OBJS= main.o find.o mod.o print.o auth.o util.o help.o \ HDRS= ud.h PROGRAMS= ud +VINCLUDEDIR= -I../../include +VLIBDIR= ../../libraries +VLIBS= -L$(VLIBDIR) + XLIBS = $(LIBTERMCAP) ud : version.o @@ -17,7 +21,7 @@ version.c: ${OBJS} $(LDAP_LIBDEPEND) t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) + < $(srcdir)/Version.c > $@) install: $(PROGRAMS) FORCE -$(MKDIR) -p $(bindir) diff --git a/include/Makefile.in b/include/Makefile.in index e9c029af63..a36d6c3bdd 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -18,10 +18,11 @@ clean-local: FORCE $(RM) ldapconfig.h veryclean-local: clean-local FORCE + $(RM) portable.h depend-local: ldapconfig.h FORCE -ldapconfig.h: ldapconfig.h.edit Makefile +ldapconfig.h: $(srcdir)/ldapconfig.h.edit Makefile @$(RM) $@ @echo "Making ldapconfig.h" @echo "/*" > $@; \ @@ -39,7 +40,7 @@ ldapconfig.h: ldapconfig.h.edit Makefile -e 's;%EDITOR%;$(EDITOR);' \ -e 's;%FINGER%;$(FINGER);' \ -e 's;%SENDMAIL%;$(SENDMAIL);' \ - ldapconfig.h.edit >> $@; \ + $(srcdir)/ldapconfig.h.edit >> $@; \ $(CHMOD) 444 $@ all-common: all-local diff --git a/libraries/libldap/Makefile.in b/libraries/libldap/Makefile.in index fce02b633d..e4a5f35444 100644 --- a/libraries/libldap/Makefile.in +++ b/libraries/libldap/Makefile.in @@ -3,6 +3,9 @@ ## LIBRARY = libldap.a PROGRAMS = ltest ttest +VINCLUDEDIR = -I../../include +VLIBDIR= ../../libraries +VLIBS= -L(VLIBDIR) SRCS = bind.c open.c result.c error.c compare.c search.c \ modify.c add.c modrdn.c delete.c abandon.c ufn.c cache.c \ diff --git a/servers/ldapd/Makefile.in b/servers/ldapd/Makefile.in index 8a7d913485..b8c2f7d37b 100644 --- a/servers/ldapd/Makefile.in +++ b/servers/ldapd/Makefile.in @@ -11,6 +11,10 @@ OBJS = main.o detach.o setproctitle.o request.o bind.o result.o error.o \ abandon.o syntax.o association.o kerberos.o LDAP_tables.o \ certificate.o +VINCLUDEDIR= -I../../include +VLIBDIR= ../../libraries +VLIBS= -L$(VLIBDIR) + BUILD_OPT = "--enable-ldapd" BUILD_SRV = @BUILD_LDAPD@ @@ -31,7 +35,7 @@ version.c: $(OBJS) $(LDIR)/liblber/liblber.a t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) + < $(srcdir)/Version.c > $@) request.o: LDAP-types.h diff --git a/servers/slapd/Makefile.in b/servers/slapd/Makefile.in index b915eb6fba..6055a1ca69 100644 --- a/servers/slapd/Makefile.in +++ b/servers/slapd/Makefile.in @@ -18,6 +18,10 @@ OBJS = main.o daemon.o connection.o search.o filter.o add.o charray.o \ detach.o strdup.o tempnam.o repl.o lock.o \ schema.o schemaparse.o monitor.o configinfo.o +VINCLUDEDIR= -I../../include +VLIBDIR= ../../libraries +VLIBS= -L$(VLIBDIR) + BUILD_OPT = "--enable-slapd" BUILD_SRV = @BUILD_SLAPD@ @@ -77,7 +81,7 @@ version.c: libbackends.a $(OBJS) \ t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) + < $(srcdir)/Version.c > $@) clean-local: FORCE @for i in back-* tools; do \ diff --git a/servers/slapd/back-ldbm/Makefile.in b/servers/slapd/back-ldbm/Makefile.in index 51414776df..825bb02540 100644 --- a/servers/slapd/back-ldbm/Makefile.in +++ b/servers/slapd/back-ldbm/Makefile.in @@ -7,6 +7,8 @@ OBJS = idl.o add.o search.o cache.o dbcache.o dn2id.o id2entry.o \ modify.o modrdn.o delete.o init.o config.o bind.o attr.o \ filterindex.o unbind.o kerberos.o close.o +VINCLUDEDIR= -I../../../include -I$(srcdir)/.. + BUILD_OPT = "--enable-ldbm" BUILD_SRV = @BUILD_LDBM@ @@ -30,5 +32,5 @@ version.c: $(OBJS) $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) + < $(srcdir)/Version.c > $@) diff --git a/servers/slapd/back-passwd/Makefile.in b/servers/slapd/back-passwd/Makefile.in index 012780d32f..183ede5186 100644 --- a/servers/slapd/back-passwd/Makefile.in +++ b/servers/slapd/back-passwd/Makefile.in @@ -1,6 +1,8 @@ SRCS = search.c config.c OBJS = search.o config.o +VINCLUDEDIR= -I../../../include + BUILD_OPT = "--enable-passwd" BUILD_SRV = @BUILD_PASSWD@ @@ -22,4 +24,4 @@ version.c: $(OBJS) t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) + < $(srcdir)/Version.c > $@) diff --git a/servers/slapd/back-shell/Makefile.in b/servers/slapd/back-shell/Makefile.in index 87b3892e87..b63e7143a3 100644 --- a/servers/slapd/back-shell/Makefile.in +++ b/servers/slapd/back-shell/Makefile.in @@ -3,6 +3,8 @@ SRCS = init.c config.c fork.c search.c bind.c unbind.c add.c delete.c \ OBJS = init.o config.o fork.o search.o bind.o unbind.o add.o delete.o \ modify.o modrdn.o compare.o abandon.o result.o +VINCLUDEDIR= -I../../../include + BUILD_OPT = "--enable-shell" BUILD_SRV = @BUILD_SHELL@ @@ -24,4 +26,4 @@ version.c: $(OBJS) t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) + < $(srcdir)/Version.c > $@) diff --git a/servers/slapd/shell-backends/Makefile.in b/servers/slapd/shell-backends/Makefile.in index eb45c9c63f..76b4e0374a 100644 --- a/servers/slapd/shell-backends/Makefile.in +++ b/servers/slapd/shell-backends/Makefile.in @@ -4,6 +4,8 @@ SRCS = passwd-shell.c shellutil.c XSRCS = pwd-version.c OBJS = passwd-shell.o shellutil.o +VINCLUDEDIR= -I../../../include + passwd-shell: pwd-version.o $(CC) $(LDFLAGS) -o $@ $(OBJS) pwd-version.o $(LIBS) @@ -13,4 +15,4 @@ pwd-version.c: $(OBJS) t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < pwd-Version.c > $@) + < $(srcdir)/pwd-Version.c > $@) diff --git a/servers/slapd/tools/Makefile.in b/servers/slapd/tools/Makefile.in index 5c3127eeb2..a8e0d302b6 100644 --- a/servers/slapd/tools/Makefile.in +++ b/servers/slapd/tools/Makefile.in @@ -15,6 +15,10 @@ HAVE_ISODE = @HAVE_ISODE@ BUILD_LDBM = @BUILD_LDBM@ +VINCLUDEDIR= -I../../../include +VLIBDIR= ../../../libraries +VLIBS = -L$(VLIBDIR) + PROGRAMS=ldif2index ldif2ldbm ldbmcat ldif2id2entry \ ldif2id2children centipede ldbmtest ldif diff --git a/servers/slurpd/Makefile.in b/servers/slurpd/Makefile.in index 4c1c4233f4..483cf90678 100644 --- a/servers/slurpd/Makefile.in +++ b/servers/slurpd/Makefile.in @@ -12,6 +12,10 @@ OBJS = admin.o args.o ch_malloc.o config.o detach.o \ reject.o replica.o replog.o ri.o rq.o sanity.o st.o \ tsleep.o +VINCLUDEDIR= -I../../include +VLIBDIR= ../../libraries +VLIBS= -L$(VLIBDIR) + BUILD_OPT = "--enable-slurpd" BUILD_SRV = @BUILD_SLURPD@ @@ -29,7 +33,7 @@ version.c: $(OBJS) $(LDAP_LIBDIR)/liblber.a $(LDAP_LIBDIR)/libldap.a t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) + < $(srcdir)/Version.c > $@) install-local: FORCE @-$(MKDIR) -p $(libexecdir) From 377b46fc095714889a838d06dc7d96b2338594e5 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sun, 20 Sep 1998 18:56:58 +0000 Subject: [PATCH 057/148] Add comment about broken VPATH make depend. --- INSTALL | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/INSTALL b/INSTALL index ccfa7dc7c4..fa2c404b70 100644 --- a/INSTALL +++ b/INSTALL @@ -97,6 +97,8 @@ Follow these steps for each different platform: ( replace ".." with the appropriate path ) - 4. Continue as above (starting at step 5). + 4. Continue as above (starting at step 6). + + Note: make depend in VPATH environment is not yet supported. End of OpenLDAP INSTALL file. From b279463b281d128b8c8334967e432aee7076c010 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sun, 20 Sep 1998 23:20:33 +0000 Subject: [PATCH 058/148] Use builtin mkdep --- build/top.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/top.mk b/build/top.mk index f1b1763de4..46d81b7322 100644 --- a/build/top.mk +++ b/build/top.mk @@ -39,7 +39,7 @@ AR = ar LINT = lint 5LINT = 5lint -MKDEP = mkdep +MKDEP = $(top_srcdir)/build/mkdep # Misc UNIX commands used in makefiles SED = sed From cb480bce95325816de08a76676f66c6409d4fde7 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sun, 20 Sep 1998 23:22:32 +0000 Subject: [PATCH 059/148] Fixup crypt detection. --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 22156f587f..939adc284a 100644 --- a/configure.in +++ b/configure.in @@ -433,7 +433,7 @@ AC_SUBST(LIBTERMCAP) # FreeBSD (and others) have crypt(3) in -lcrypt if test $ol_enable_crypt != no ; then - AC_CHECK_FUNC(crypt, have_crypt=yes, [ + AC_CHECK_FUNC(crypt, [have_crypt=yes], [ AC_CHECK_LIB(crypt, crypt, [LUTIL_LIBS="$LUTIL_LIBS -lcrypt" have_crypt=yes], [have_crypt=no])]) From dc8c278c3987cd797690394216d959a65ba97cae Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 21 Sep 1998 00:41:49 +0000 Subject: [PATCH 060/148] Add some comments to Berkeley DB and DB2 macros. --- aclocal.m4 | 53 +++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 47 insertions(+), 6 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index 1441586f15..6991230270 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -53,10 +53,16 @@ dnl AC_VERBOSE(OpenLDAP --with-$1 $ol_with_$1) dnl dnl ==================================================================== dnl Check if db.h is Berkeley DB2 +dnl +dnl defines ol_cv_header_db2 to 'yes' or 'no' +dnl +dnl uses: +dnl AC_CHECK_HEADERS(db.h) +dnl AC_DEFUN([OL_HEADER_BERKELEY_DB2], [AC_CHECK_HEADERS(db.h) if test $ac_cv_header_db_h = yes ; then - AC_CACHE_CHECK(if db.h is DB2, [ol_cv_header_db2],[ + AC_CACHE_CHECK([if db.h is DB2], [ol_cv_header_db2],[ AC_EGREP_CPP(__db_version_2,[ # include /* this check could be improved */ @@ -71,8 +77,14 @@ fi dnl -------------------------------------------------------------------- dnl Check if Berkeley DB2 library exists dnl Check for dbopen in standard libraries or -ldb +dnl +dnl defines ol_cv_lib_db2 to '-ldb' or 'no' +dnl +dnl uses: +dnl AC_CHECK_LIB(db,db_open) +dnl AC_DEFUN([OL_LIB_BERKELEY_DB2], -[AC_CACHE_CHECK(for DB2 library, [ol_cv_lib_db2], +[AC_CACHE_CHECK([for DB2 library], [ol_cv_lib_db2], [ ol_LIBS="$LIBS" AC_CHECK_LIB(db,db_open,[ol_cv_lib_db2=-ldb],[ol_cv_lib_db2=no]) LIBS="$ol_LIBS" @@ -81,10 +93,17 @@ AC_DEFUN([OL_LIB_BERKELEY_DB2], dnl dnl -------------------------------------------------------------------- dnl Check if Berkeley db2 exists +dnl +dnl defines ol_cv_berkeley_db2 to 'yes' or 'no' +dnl +dnl uses: +dnl OL_LIB_BERKELEY_DB2 +dnl OL_HEADER_BERKELEY_DB2 +dnl AC_DEFUN([OL_BERKELEY_DB2], [AC_REQUIRE([OL_LIB_BERKELEY_DB2]) AC_REQUIRE([OL_HEADER_BERKELEY_DB2]) - AC_CACHE_CHECK(for Berkeley DB2, [ol_cv_berkeley_db2], [ + AC_CACHE_CHECK([for Berkeley DB2], [ol_cv_berkeley_db2], [ if test $ol_cv_lib_db2 = no -o $ol_cv_header_db2 = no ; then ol_cv_berkeley_db2=no else @@ -95,6 +114,13 @@ AC_DEFUN([OL_BERKELEY_DB2], dnl dnl ==================================================================== dnl Check for db.h/db_185.h is Berkeley DB +dnl +dnl defines ol_cv_header_db to 'yes' or 'no' +dnl +dnl uses: +dnl OL_HEADER_BERKELEY_DB2 +dnl AC_CHECK_HEADERS(db_185.h) +dnl AC_DEFUN([OL_HEADER_BERKELEY_DB], [AC_REQUIRE([OL_HEADER_BERKELEY_DB2]) AC_CHECK_HEADERS(db_185.h) @@ -110,8 +136,16 @@ dnl dnl -------------------------------------------------------------------- dnl Check if Berkeley DB library exists dnl Check for dbopen in standard libraries or -ldb +dnl +dnl defines ol_cv_lib_db to 'yes' or '-ldb' or 'no' +dnl 'yes' implies dbopen is in $LIBS +dnl +dnl uses: +dnl AC_CHECK_FUNC(dbopen) +dnl AC_CHECK_LIB(db,dbopen) +dnl AC_DEFUN([OL_LIB_BERKELEY_DB], -[AC_CACHE_CHECK(for Berkeley DB library, [ol_cv_lib_db], +[AC_CACHE_CHECK([for Berkeley DB library], [ol_cv_lib_db], [ ol_LIBS="$LIBS" AC_CHECK_FUNC(dbopen,[ol_cv_lib_db=yes], [ AC_CHECK_LIB(db,dbopen,[ol_cv_lib_db=-ldb],[ol_cv_lib_db=no]) @@ -121,11 +155,18 @@ AC_DEFUN([OL_LIB_BERKELEY_DB], ])dnl dnl dnl -------------------------------------------------------------------- -dnl Check if db exists +dnl Check if Berkeley DB exists +dnl +dnl defines ol_cv_berkeley_db to 'yes' or 'no' +dnl +dnl uses: +dnl OL_LIB_BERKELEY_DB +dnl OL_HEADER_BERKELEY_DB +dnl AC_DEFUN([OL_BERKELEY_DB], [AC_REQUIRE([OL_LIB_BERKELEY_DB]) AC_REQUIRE([OL_HEADER_BERKELEY_DB]) - AC_CACHE_CHECK(for Berkeley DB, [ol_cv_berkeley_db], [ + AC_CACHE_CHECK([for Berkeley DB], [ol_cv_berkeley_db], [ if test $ol_cv_lib_db = no -o $ol_cv_header_db = no ; then ol_cv_berkeley_db=no else From 57d861cda31b63e1f139e0b157d46630a2a33d1f Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 21 Sep 1998 01:14:56 +0000 Subject: [PATCH 061/148] Fix Berkeley DB2 Macro --- aclocal.m4 | 45 +++++++++ configure | 270 ++++++++++++++++++++++++++------------------------- configure.in | 4 + 3 files changed, 185 insertions(+), 134 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index 6991230270..a1d6465264 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -72,6 +72,8 @@ if test $ac_cv_header_db_h = yes ; then # endif # endif ], ol_cv_header_db2=yes, ol_cv_header_db2=no)]) +else + ol_cv_header_db2=no fi ])dnl dnl -------------------------------------------------------------------- @@ -178,6 +180,14 @@ dnl dnl ==================================================================== dnl Check if GDBM library exists dnl Check for gdbm_open in standard libraries or -lgdbm +dnl +dnl defines ol_cv_lib_gdbm to 'yes' or '-lgdbm' or 'no' +dnl 'yes' implies gdbm_open is in $LIBS +dnl +dnl uses: +dnl AC_CHECK_FUNC(gdbm_open) +dnl AC_CHECK_LIB(gdbm,gdbm_open) +dnl AC_DEFUN([OL_LIB_GDBM], [AC_CACHE_CHECK(for GDBM library, [ol_cv_lib_gdbm], [ ol_LIBS="$LIBS" @@ -190,6 +200,13 @@ AC_DEFUN([OL_LIB_GDBM], dnl dnl -------------------------------------------------------------------- dnl Check if GDBM exists +dnl +dnl defines ol_cv_gdbm to 'yes' or 'no' +dnl +dnl uses: +dnl OL_LIB_GDBM +dnl AC_CHECK_HEADERS(gdbm.h) +dnl AC_DEFUN([OL_GDBM], [AC_REQUIRE([OL_LIB_GDBM]) AC_CHECK_HEADERS(gdbm.h) @@ -205,6 +222,15 @@ dnl dnl ==================================================================== dnl Check if NDBM library exists dnl Check for dbm_open in standard libraries or -lndbm or -ldbm +dnl +dnl defines ol_cv_lib_ndbm to 'yes' or '-lndbm' or -ldbm or 'no' +dnl 'yes' implies ndbm_open is in $LIBS +dnl +dnl uses: +dnl AC_CHECK_FUNC(dbm_open) +dnl AC_CHECK_LIB(ndbm,dbm_open) +dnl AC_CHECK_LIB(dbm,dbm_open) +dnl AC_DEFUN([OL_LIB_NDBM], [AC_CACHE_CHECK(for NDBM library, [ol_cv_lib_ndbm], [ ol_LIBS="$LIBS" @@ -220,6 +246,13 @@ AC_DEFUN([OL_LIB_NDBM], dnl dnl -------------------------------------------------------------------- dnl Check if NDBM exists +dnl +dnl defines ol_cv_ndbm to 'yes' or 'no' +dnl +dnl uses: +dnl OL_LIB_NDBM +dnl AC_CHECK_HEADERS(ndbm.h) +dnl AC_DEFUN([OL_NDBM], [AC_REQUIRE([OL_LIB_NDBM]) AC_CHECK_HEADERS(ndbm.h) @@ -234,6 +267,12 @@ AC_DEFUN([OL_NDBM], dnl dnl ==================================================================== dnl Check POSIX Thread version +dnl +dnl defines ol_cv_posix_version to 'final' or 'draft' or 'unknown' +dnl 'unknown' implies that the version could not be detected +dnl or that pthreads.h does exist. Existance of pthreads.h +dnl should be tested separately. +dnl AC_DEFUN([OL_POSIX_THREAD_VERSION], [AC_CACHE_CHECK([POSIX thread version],[ol_cv_pthread_version],[ AC_EGREP_CPP(final,[ @@ -264,6 +303,12 @@ AC_DEFUN([OL_POSIX_THREAD_VERSION], dnl dnl -------------------------------------------------------------------- dnl Check LinuxThread +dnl +dnl defines ol_cv_linux_threads to 'yes' or 'no' +dnl 'no' implies pthreads.h is not LinuxThreads or pthreads.h +dnl doesn't exists. Existance of pthread.h should separately +dnl checked. +dnl AC_DEFUN([OL_LINUX_THREADS], [ AC_CACHE_CHECK([for LinuxThreads], [ol_cv_linux_threads], [ diff --git a/configure b/configure index 5ce0e3dc1b..46eb2645ca 100755 --- a/configure +++ b/configure @@ -2271,12 +2271,14 @@ rm -f conftest* fi echo "$ac_t""$ol_cv_header_db2" 1>&6 +else + ol_cv_header_db2=no fi echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6 -echo "configure:2280: checking for Berkeley DB2" >&5 +echo "configure:2282: checking for Berkeley DB2" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2304,7 +2306,7 @@ echo "$ac_t""$ol_cv_berkeley_db2" 1>&6 LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBBTREE" fi - if test $ol_cv_lib_db2 != yes ; then + if test $ol_cv_lib_db2 != yes ; then LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2" fi fi @@ -2312,18 +2314,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6 -echo "configure:2316: checking for Berkeley DB library" >&5 +echo "configure:2318: checking for Berkeley DB library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:2322: checking for dbopen" >&5 +echo "configure:2324: checking for dbopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -2365,7 +2367,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:2369: checking for dbopen in -ldb" >&5 +echo "configure:2371: checking for dbopen in -ldb" >&5 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2373,7 +2375,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2419,17 +2421,17 @@ for ac_hdr in db_185.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2423: checking for $ac_hdr" >&5 +echo "configure:2425: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2465,7 +2467,7 @@ fi echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6 -echo "configure:2469: checking for Berkeley DB" >&5 +echo "configure:2471: checking for Berkeley DB" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2495,7 +2497,7 @@ echo "$ac_t""$ol_cv_berkeley_db" 1>&6 LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBBTREE" fi - if test $ol_cv_lib_db != yes ; then + if test $ol_cv_lib_db != yes ; then LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db" fi fi @@ -2508,18 +2510,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then echo $ac_n "checking for GDBM library""... $ac_c" 1>&6 -echo "configure:2512: checking for GDBM library" >&5 +echo "configure:2514: checking for GDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6 -echo "configure:2518: checking for gdbm_open" >&5 +echo "configure:2520: checking for gdbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gdbm_open=yes" else @@ -2561,7 +2563,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:2565: checking for gdbm_open in -lgdbm" >&5 +echo "configure:2567: checking for gdbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2569,7 +2571,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2615,17 +2617,17 @@ echo "$ac_t""$ol_cv_lib_gdbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2619: checking for $ac_hdr" >&5 +echo "configure:2621: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2631: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2652,7 +2654,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:2656: checking for db" >&5 +echo "configure:2658: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2682,18 +2684,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = ndbm ; then echo $ac_n "checking for NDBM library""... $ac_c" 1>&6 -echo "configure:2686: checking for NDBM library" >&5 +echo "configure:2688: checking for NDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:2692: checking for dbm_open" >&5 +echo "configure:2694: checking for dbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -2735,7 +2737,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6 -echo "configure:2739: checking for dbm_open in -lndbm" >&5 +echo "configure:2741: checking for dbm_open in -lndbm" >&5 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2743,7 +2745,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lndbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2774,7 +2776,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:2778: checking for dbm_open in -ldbm" >&5 +echo "configure:2780: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2782,7 +2784,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2830,17 +2832,17 @@ echo "$ac_t""$ol_cv_lib_ndbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2834: checking for $ac_hdr" >&5 +echo "configure:2836: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2846: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2867,7 +2869,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:2871: checking for db" >&5 +echo "configure:2873: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2911,7 +2913,7 @@ fi if test $ol_enable_wrappers = yes ; then echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6 -echo "configure:2915: checking for hosts_access in -lwrap" >&5 +echo "configure:2917: checking for hosts_access in -lwrap" >&5 ac_lib_var=`echo wrap'_'hosts_access | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2919,7 +2921,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lwrap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2974,12 +2976,12 @@ LIBTERMCAP="-ltermcap" # FreeBSD (and others) have crypt(3) in -lcrypt if test $ol_enable_crypt != no ; then echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:2978: checking for crypt" >&5 +echo "configure:2980: checking for crypt" >&5 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -3021,7 +3023,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:3025: checking for crypt in -lcrypt" >&5 +echo "configure:3027: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3029,7 +3031,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3083,12 +3085,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:3087: checking for $ac_hdr that defines DIR" >&5 +echo "configure:3089: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -3096,7 +3098,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:3100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -3121,7 +3123,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:3125: checking for opendir in -ldir" >&5 +echo "configure:3127: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3129,7 +3131,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3162,7 +3164,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:3166: checking for opendir in -lx" >&5 +echo "configure:3168: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3170,7 +3172,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3204,12 +3206,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3208: checking for ANSI C header files" >&5 +echo "configure:3210: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3217,7 +3219,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3223: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3234,7 +3236,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3252,7 +3254,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3273,7 +3275,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3284,7 +3286,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:3288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -3308,12 +3310,12 @@ EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:3312: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:3314: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3329,7 +3331,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:3333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -3365,17 +3367,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3369: checking for $ac_hdr" >&5 +echo "configure:3371: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3379: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3403,12 +3405,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3407: checking for uid_t in sys/types.h" >&5 +echo "configure:3409: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3437,7 +3439,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:3441: checking type of array argument to getgroups" >&5 +echo "configure:3443: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3445,7 +3447,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -3484,7 +3486,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -3508,12 +3510,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3512: checking for mode_t" >&5 +echo "configure:3514: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3541,12 +3543,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3545: checking for off_t" >&5 +echo "configure:3547: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3574,12 +3576,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3578: checking for pid_t" >&5 +echo "configure:3580: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3607,12 +3609,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3611: checking return type of signal handlers" >&5 +echo "configure:3613: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3629,7 +3631,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3633: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3648,12 +3650,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3652: checking for size_t" >&5 +echo "configure:3654: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3681,12 +3683,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3685: checking for uid_t in sys/types.h" >&5 +echo "configure:3687: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3715,12 +3717,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:3719: checking for st_blksize in struct stat" >&5 +echo "configure:3721: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3728,7 +3730,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:3732: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -3749,12 +3751,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3753: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:3755: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3763,7 +3765,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -3784,12 +3786,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:3788: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:3790: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3797,7 +3799,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:3801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -3819,12 +3821,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3823: checking for working const" >&5 +echo "configure:3825: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3895,7 +3897,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:3899: checking for 8-bit clean memcmp" >&5 +echo "configure:3901: 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 @@ -3903,7 +3905,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -3931,12 +3933,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3935: checking return type of signal handlers" >&5 +echo "configure:3937: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3953,7 +3955,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3972,12 +3974,12 @@ EOF echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:3976: checking for strftime" >&5 +echo "configure:3978: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -4022,7 +4024,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:4026: checking for strftime in -lintl" >&5 +echo "configure:4028: 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 @@ -4030,7 +4032,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4068,12 +4070,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:4072: checking for vprintf" >&5 +echo "configure:4074: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -4120,12 +4122,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:4124: checking for _doprnt" >&5 +echo "configure:4126: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -4173,7 +4175,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:4177: checking for wait3 that fills in rusage" >&5 +echo "configure:4179: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4181,7 +4183,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -4212,7 +4214,7 @@ main() { } } EOF -if { (eval echo configure:4216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -4253,12 +4255,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4257: checking for $ac_func" >&5 +echo "configure:4259: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4309,12 +4311,12 @@ done for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4313: checking for $ac_func" >&5 +echo "configure:4315: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4367,13 +4369,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:4371: checking declaration of sys_errlist" >&5 +echo "configure:4373: 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 < @@ -4383,7 +4385,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:4387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -4404,20 +4406,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:4408: checking existence of sys_errlist" >&5 +echo "configure:4410: 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 < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:4421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index 939adc284a..d7b0c153c7 100644 --- a/configure.in +++ b/configure.in @@ -328,6 +328,8 @@ if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBBTREE" fi + dnl $ol_cv_lib_db2 should be yes or -ldb + dnl (it could be no, but that would be an error if test $ol_cv_lib_db2 != yes ; then LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2" fi @@ -351,6 +353,8 @@ if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBBTREE" fi + dnl $ol_cv_lib_db should be yes or -ldb + dnl (it could be no, but that would be an error if test $ol_cv_lib_db != yes ; then LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db" fi From d0339b19a2045ca5d923b86fc519c6ce07036682 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 21 Sep 1998 02:59:21 +0000 Subject: [PATCH 062/148] Fix VPATH includes/libraries --- build/top.mk | 12 +++++++----- clients/fax500/Makefile.in | 11 ++++++----- clients/finger/Makefile.in | 6 +++--- clients/gopher/Makefile.in | 6 +++--- clients/mail500/Makefile.in | 5 ++--- clients/rcpt500/Makefile.in | 5 ++--- clients/tools/Makefile.in | 5 ++--- clients/ud/Makefile.in | 5 ++--- libraries/libavl/Makefile.in | 3 +++ libraries/liblber/Makefile.in | 3 +++ libraries/libldap/Makefile.in | 7 ++++--- libraries/libldbm/Makefile.in | 7 ++++--- libraries/libldif/Makefile.in | 4 ++++ libraries/liblthread/Makefile.in | 5 +++++ libraries/liblutil/Makefile.in | 3 +++ servers/ldapd/Makefile.in | 5 ++--- servers/slapd/Makefile.in | 7 +++---- servers/slapd/back-ldbm/Makefile.in | 7 ++++--- servers/slapd/back-passwd/Makefile.in | 8 +++++--- servers/slapd/back-shell/Makefile.in | 8 +++++--- servers/slapd/shell-backends/Makefile.in | 5 +++-- servers/slapd/tools/Makefile.in | 5 ++--- servers/slurpd/Makefile.in | 7 +++---- 23 files changed, 80 insertions(+), 59 deletions(-) diff --git a/build/top.mk b/build/top.mk index 46d81b7322..6cec0b0369 100644 --- a/build/top.mk +++ b/build/top.mk @@ -59,10 +59,12 @@ SENDMAIL = @SENDMAIL@ # Version VERSIONFILE = $(top_srcdir)/build/version -INCLUDEDIR = -I$(top_srcdir)/include +INCLUDEDIR = $(top_srcdir)/include +LDAP_INCPATH = -I$(LDAP_INCDIR) -I$(INCLUDEDIR) +LDAP_LIBPATH = -L$(LDAP_LIBDIR) -LDAP_LIBS = -lldif -lldap -llber -LDAP_LIBDEPEND = $(VLIBDIR)/libldif.a $(VLIBDIR)/libldap.a $(VLIBDIR)/liblber.a +LDAP_LIBS = $(LDAP_LIBPATH) -lldif -lldap -llber +LDAP_LIBDEPEND = $(LDAP_LIBDIR)/libldif.a $(LDAP_LIBDIR)/libldap.a $(LDAP_LIBDIR)/liblber.a # AutoConfig generated AC_CC = @CC@ @@ -75,8 +77,8 @@ LIBTERMCAP = @LIBTERMCAP@ # Our Defaults CC = $(AC_CC) -DEFS = $(LDAP_DEFS) $(VINCLUDEDIR) $(INCLUDEDIR) $(XDEFS) $(AC_DEFS) -LIBS = $(VLIBS) $(LDAP_LIBS) $(XLIBS) $(AC_LIBS) +DEFS = $(LDAP_DEFS) $(LDAP_INCPATH) $(XINCPATH) $(XDEFS) $(AC_DEFS) +LIBS = $(LDAP_LIBS) $(XLIBS) $(AC_LIBS) CFLAGS = $(AC_CFLAGS) $(DEFS) $(DEFINES) LDFLAGS = $(AC_LDFLAGS) diff --git a/clients/fax500/Makefile.in b/clients/fax500/Makefile.in index 85da96cde5..302d1c93aa 100644 --- a/clients/fax500/Makefile.in +++ b/clients/fax500/Makefile.in @@ -1,12 +1,13 @@ +PROGRAMS= rp500 fax500 + SRCS= main.c faxtotpc.c rp500.c XSRCS=fax5version.c rpversion.c + FAX5OBJS = main.o faxtotpc.o RPOBJS = rp500.o faxtotpc.o -PROGRAMS= rp500 fax500 -VINCLUDEDIR= -I../../include -VLIBDIR= ../../libraries -VLIBS= -L$(VLIBDIR) +LDAP_INCDIR= ../../include +LDAP_LIBDIR= ../../libraries rp500 : rpversion.o $(CC) $(LDFLAGS) -o $@ $(RPOBJS) rpversion.o $(LIBS) @@ -34,6 +35,6 @@ install: $(PROGRAMS) xrpcomp FORCE -$(MKDIR) -p $(libexecdir) $(INSTALL) $(INSTALLFLAGS) -m 755 rp500 $(libexecdir) $(INSTALL) $(INSTALLFLAGS) -m 755 fax500 $(libexecdir) - $(SED) -e 's%LIBEXECDIR%$(libexecdir)%' xrpcomp > /tmp/xrpcomp.tmp + $(SED) -e 's%LIBEXECDIR%$(libexecdir)%' $(srcdir)/xrpcomp > /tmp/xrpcomp.tmp $(INSTALL) $(INSTALLFLAGS) -m 755 /tmp/xrpcomp.tmp $(libexecdir)/xrpcomp $(RM) /tmp/xrpcomp.tmp diff --git a/clients/finger/Makefile.in b/clients/finger/Makefile.in index 10f2c34e99..951d5684b4 100644 --- a/clients/finger/Makefile.in +++ b/clients/finger/Makefile.in @@ -2,9 +2,9 @@ SRCS= main.c XSRCS= version.c OBJS= main.o PROGRAMS= in.xfingerd -VINCLUDEDIR= -I../../include -VLIBDIR= ../../libraries -VLIBS= -L$(VLIBDIR) + +LDAP_INCDIR= ../../include +LDAP_LIBDIR= ../../libraries in.xfingerd : version.o $(CC) $(LDFLAGS) -o $@ version.o $(OBJS) $(LIBS) diff --git a/clients/gopher/Makefile.in b/clients/gopher/Makefile.in index 728229170c..d6f4aacf8e 100644 --- a/clients/gopher/Makefile.in +++ b/clients/gopher/Makefile.in @@ -8,9 +8,9 @@ XSRCS= gwversion.o goversion.o GOOBJS = go500.o detach.o setproctitle.o GWOBJS = go500gw.o detach.o setproctitle.o -VINCLUDEDIR= -I../../include -VLIBDIR= ../../libraries -VLIBS= -L$(VLIBDIR) +LDAP_INCDIR= ../../include +LDAP_LIBDIR= ../../libraries + go500 : goversion.o $(CC) $(LDFLAGS) -o $@ $(GOOBJS) goversion.o $(LIBS) diff --git a/clients/mail500/Makefile.in b/clients/mail500/Makefile.in index ae040c10ef..53bee9af94 100644 --- a/clients/mail500/Makefile.in +++ b/clients/mail500/Makefile.in @@ -4,9 +4,8 @@ SRCS= main.c XSRCS= version.c OBJS= main.o -VINCLUDEDIR= -I../../include -VLIBDIR= ../../libraries -VLIBS= -L$(VLIBDIR) +LDAP_INCDIR= ../../include +LDAP_LIBDIR= ../../libraries mail500 : version.o $(CC) $(LDFLAGS) -o $@ version.o $(OBJS) $(LIBS) diff --git a/clients/rcpt500/Makefile.in b/clients/rcpt500/Makefile.in index 76c2e088d8..ba6654270a 100644 --- a/clients/rcpt500/Makefile.in +++ b/clients/rcpt500/Makefile.in @@ -4,9 +4,8 @@ XSRCS= version.c OBJS= main.o cmds.o help.o query.o HDRS= rcpt500.h -VINCLUDEDIR= -I../../include -VLIBDIR= ../../libraries -VLIBS= -L$(VLIBDIR) +LDAP_INCDIR= ../../include +LDAP_LIBDIR= ../../libraries rcpt500 : version.o $(CC) $(LDFLAGS) -o $@ version.o $(OBJS) $(LIBS) diff --git a/clients/tools/Makefile.in b/clients/tools/Makefile.in index e95894e29e..9133a26410 100644 --- a/clients/tools/Makefile.in +++ b/clients/tools/Makefile.in @@ -5,9 +5,8 @@ SRCS = ldapsearch.c ldapmodify.c ldapdelete.c ldapmodrdn.c OBJS = ldapsearch.o ldapmodify.o ldapdelete.o ldapmodrdn.o XLIBS = -llber -lldap -VINCLUDEDIR= -I../../include -VLIBDIR= ../../libraries -VLIBS= -L$(VLIBDIR) +LDAP_INCDIR= ../../include +LDAP_LIBDIR= ../../libraries XSRCS = ldsversion.c ldmversion.c lddversion.c ldrversion.c diff --git a/clients/ud/Makefile.in b/clients/ud/Makefile.in index e62e301e0a..e68ca716bf 100644 --- a/clients/ud/Makefile.in +++ b/clients/ud/Makefile.in @@ -6,9 +6,8 @@ OBJS= main.o find.o mod.o print.o auth.o util.o help.o \ HDRS= ud.h PROGRAMS= ud -VINCLUDEDIR= -I../../include -VLIBDIR= ../../libraries -VLIBS= -L$(VLIBDIR) +LDAP_INCDIR= ../../include +LDAP_LIBDIR= ../../libraries XLIBS = $(LIBTERMCAP) diff --git a/libraries/libavl/Makefile.in b/libraries/libavl/Makefile.in index 367a17887e..7dca5eb04b 100644 --- a/libraries/libavl/Makefile.in +++ b/libraries/libavl/Makefile.in @@ -6,6 +6,9 @@ SRCS = avl.c testavl.c XSRCS = version.c OBJS = avl.o +LDAP_INCDIR= ../../include +LDAP_LIBDIR= ../../libraries + LIBRARY = libavl.a XPROGRAMS = testavl diff --git a/libraries/liblber/Makefile.in b/libraries/liblber/Makefile.in index bfcfce1093..1a93680fb9 100644 --- a/libraries/liblber/Makefile.in +++ b/libraries/liblber/Makefile.in @@ -6,6 +6,9 @@ SRCS = decode.c encode.c io.c bprint.c OBJS = decode.o encode.o io.o bprint.o XSRCS = version.c +LDAP_INCDIR= ../../include +LDAP_LIBDIR= ../../libraries + LIBRARY = liblber.a install-local: $(LIBRARY) FORCE diff --git a/libraries/libldap/Makefile.in b/libraries/libldap/Makefile.in index e4a5f35444..3edc528754 100644 --- a/libraries/libldap/Makefile.in +++ b/libraries/libldap/Makefile.in @@ -3,9 +3,10 @@ ## LIBRARY = libldap.a PROGRAMS = ltest ttest -VINCLUDEDIR = -I../../include -VLIBDIR= ../../libraries -VLIBS= -L(VLIBDIR) + +LDAP_INCDIR= ../../include +LDAP_LIBDIR= ../../libraries + SRCS = bind.c open.c result.c error.c compare.c search.c \ modify.c add.c modrdn.c delete.c abandon.c ufn.c cache.c \ diff --git a/libraries/libldbm/Makefile.in b/libraries/libldbm/Makefile.in index 4ef12dd410..34cead14cc 100644 --- a/libraries/libldbm/Makefile.in +++ b/libraries/libldbm/Makefile.in @@ -7,10 +7,11 @@ XPROGRAMS = testldbm SRCS = ldbm.c OBJS = ldbm.o -XDEFS = @LDBM_DEFS@ -XLIBS = @LDBM_LIBS@ +LDAP_INCDIR= ../../include +LDAP_LIBDIR= ../../libraries -LIBS = -L$(LDAP_LIBDIR) -lavl $(AC_LIBS) +XDEFS = @LDBM_DEFS@ +XLIBS = @LDBM_LIBS@ -lavl testldbm: libldbm.a testldbm.o $(CC) $(LDFLAGS) -o $@ testldbm.o $(LIBS) diff --git a/libraries/libldif/Makefile.in b/libraries/libldif/Makefile.in index 6881b0707c..c1560a31b4 100644 --- a/libraries/libldif/Makefile.in +++ b/libraries/libldif/Makefile.in @@ -5,3 +5,7 @@ LIBRARY = libldif.a SRCS = line64.c OBJS = line64.o + +LDAP_INCDIR= ../../include +LDAP_LIBDIR= ../../libraries + diff --git a/libraries/liblthread/Makefile.in b/libraries/liblthread/Makefile.in index 9b12990e6e..47a810bd62 100644 --- a/libraries/liblthread/Makefile.in +++ b/libraries/liblthread/Makefile.in @@ -7,5 +7,10 @@ XSRCS = version.c SRCS = thread.c stack.c OBJS = thread.o stack.o +LDAP_INCDIR= ../../include +LDAP_LIBDIR= ../../libraries + XDEFS = @LTHREAD_DEFS@ XLIBS = @LTHREAD_LIBS@ + + diff --git a/libraries/liblutil/Makefile.in b/libraries/liblutil/Makefile.in index 0cdbed7239..e4cd68314c 100644 --- a/libraries/liblutil/Makefile.in +++ b/libraries/liblutil/Makefile.in @@ -6,4 +6,7 @@ LIBRARY = liblutil.a SRCS = base64.c md5.c sha1.c OBJS = base64.o md5.o sha1.o +LDAP_INCDIR= ../../include +LDAP_LIBDIR= ../../libraries + XDEFS = @LUTIL_DEFS@ diff --git a/servers/ldapd/Makefile.in b/servers/ldapd/Makefile.in index b8c2f7d37b..79610e878f 100644 --- a/servers/ldapd/Makefile.in +++ b/servers/ldapd/Makefile.in @@ -11,9 +11,8 @@ OBJS = main.o detach.o setproctitle.o request.o bind.o result.o error.o \ abandon.o syntax.o association.o kerberos.o LDAP_tables.o \ certificate.o -VINCLUDEDIR= -I../../include -VLIBDIR= ../../libraries -VLIBS= -L$(VLIBDIR) +LDAP_INCDIR= ../../include +LDAP_LIBDIR= ../../libraries BUILD_OPT = "--enable-ldapd" BUILD_SRV = @BUILD_LDAPD@ diff --git a/servers/slapd/Makefile.in b/servers/slapd/Makefile.in index 6055a1ca69..af4289e762 100644 --- a/servers/slapd/Makefile.in +++ b/servers/slapd/Makefile.in @@ -18,9 +18,8 @@ OBJS = main.o daemon.o connection.o search.o filter.o add.o charray.o \ detach.o strdup.o tempnam.o repl.o lock.o \ schema.o schemaparse.o monitor.o configinfo.o -VINCLUDEDIR= -I../../include -VLIBDIR= ../../libraries -VLIBS= -L$(VLIBDIR) +LDAP_INCDIR= ../../include +LDAP_LIBDIR= ../../libraries BUILD_OPT = "--enable-slapd" BUILD_SRV = @BUILD_SLAPD@ @@ -70,7 +69,7 @@ libbackends.a: .backend fi @ls -l libbackends.a -version.c: libbackends.a $(OBJS) \ +version.c: libbackends.a $(OBJS) $(LDAP_LIBDEPEND) \ $(LDAP_LIBDIR)/liblber.a \ $(LDAP_LIBDIR)/liblldbm.a \ $(LDAP_LIBDIR)/liblavl.a \ diff --git a/servers/slapd/back-ldbm/Makefile.in b/servers/slapd/back-ldbm/Makefile.in index 825bb02540..00a29c73ce 100644 --- a/servers/slapd/back-ldbm/Makefile.in +++ b/servers/slapd/back-ldbm/Makefile.in @@ -7,12 +7,13 @@ OBJS = idl.o add.o search.o cache.o dbcache.o dn2id.o id2entry.o \ modify.o modrdn.o delete.o init.o config.o bind.o attr.o \ filterindex.o unbind.o kerberos.o close.o -VINCLUDEDIR= -I../../../include -I$(srcdir)/.. +LDAP_INCDIR= ../../../include +LDAP_LIBDIR= ../../../libraries BUILD_OPT = "--enable-ldbm" BUILD_SRV = @BUILD_LDBM@ -XINCLUDEDIR = -I.. +XINCPATH = -I.. -I$(srcdir)/.. XDEFS = @SLAPD_DEFS@ @LDBM_DEFS@ @LTHREAD_DEFS@ @LUTIL_DEFS@ PROGRAMS = libback-ldbm.a @@ -25,7 +26,7 @@ libback-ldbm.a: version.o @$(RANLIB) $@ @touch ../.backend -version.c: $(OBJS) +version.c: $(OBJS) $(LDAP_LIBDEPEND) $(RM) $@ (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` \ h=`$(HOSTNAME)` t=`$(DATE)`; \ diff --git a/servers/slapd/back-passwd/Makefile.in b/servers/slapd/back-passwd/Makefile.in index 183ede5186..577f50daf7 100644 --- a/servers/slapd/back-passwd/Makefile.in +++ b/servers/slapd/back-passwd/Makefile.in @@ -1,13 +1,15 @@ SRCS = search.c config.c OBJS = search.o config.o -VINCLUDEDIR= -I../../../include +LDAP_INCDIR= ../../../include +LDAP_LIBDIR= ../../../libraries BUILD_OPT = "--enable-passwd" BUILD_SRV = @BUILD_PASSWD@ PROGRAMS= libback-passwd.a -XINCLUDEDIR= -I.. + +XINCPATH = -I.. -I$(srcdir)/.. XDEFS = @LTHREAD_DEFS@ all-local: FORCE @@ -18,7 +20,7 @@ libback-passwd.a: version.o @$(RANLIB) $@ @touch ../.backend -version.c: $(OBJS) +version.c: $(OBJS) $(LDAP_LIBDEPEND) $(RM) $@ (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ diff --git a/servers/slapd/back-shell/Makefile.in b/servers/slapd/back-shell/Makefile.in index b63e7143a3..f3e1f3e53b 100644 --- a/servers/slapd/back-shell/Makefile.in +++ b/servers/slapd/back-shell/Makefile.in @@ -3,13 +3,15 @@ SRCS = init.c config.c fork.c search.c bind.c unbind.c add.c delete.c \ OBJS = init.o config.o fork.o search.o bind.o unbind.o add.o delete.o \ modify.o modrdn.o compare.o abandon.o result.o -VINCLUDEDIR= -I../../../include +LDAP_INCDIR= ../../../include +LDAP_LIBDIR= ../../../libraries BUILD_OPT = "--enable-shell" BUILD_SRV = @BUILD_SHELL@ PROGRAMS = libback-shell.a -XINCLUDEDIR = -I.. + +XINCPATH = -I.. -I$(srcdir)/.. XDEFS = @LTHREAD_DEFS@ all-local: FORCE @@ -20,7 +22,7 @@ libback-shell.a: version.o @$(RANLIB) $@ @touch ../.backend -version.c: $(OBJS) +version.c: $(OBJS) $(LDAP_LIBDEPEND) $(RM) $@ (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ diff --git a/servers/slapd/shell-backends/Makefile.in b/servers/slapd/shell-backends/Makefile.in index 76b4e0374a..aab59ca8fc 100644 --- a/servers/slapd/shell-backends/Makefile.in +++ b/servers/slapd/shell-backends/Makefile.in @@ -4,12 +4,13 @@ SRCS = passwd-shell.c shellutil.c XSRCS = pwd-version.c OBJS = passwd-shell.o shellutil.o -VINCLUDEDIR= -I../../../include +LDAP_INCDIR= ../../../include +LDAP_LIBDIR= ../../../libraries passwd-shell: pwd-version.o $(CC) $(LDFLAGS) -o $@ $(OBJS) pwd-version.o $(LIBS) -pwd-version.c: $(OBJS) +pwd-version.c: $(OBJS) $(LDAP_LIBDEPEND) $(RM) $@ (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ diff --git a/servers/slapd/tools/Makefile.in b/servers/slapd/tools/Makefile.in index a8e0d302b6..6af0234824 100644 --- a/servers/slapd/tools/Makefile.in +++ b/servers/slapd/tools/Makefile.in @@ -15,9 +15,8 @@ HAVE_ISODE = @HAVE_ISODE@ BUILD_LDBM = @BUILD_LDBM@ -VINCLUDEDIR= -I../../../include -VLIBDIR= ../../../libraries -VLIBS = -L$(VLIBDIR) +LDAP_INCDIR= ../../../include +LDAP_LIBDIR= ../../../libraries PROGRAMS=ldif2index ldif2ldbm ldbmcat ldif2id2entry \ ldif2id2children centipede ldbmtest ldif diff --git a/servers/slurpd/Makefile.in b/servers/slurpd/Makefile.in index 483cf90678..591efe24a6 100644 --- a/servers/slurpd/Makefile.in +++ b/servers/slurpd/Makefile.in @@ -12,9 +12,8 @@ OBJS = admin.o args.o ch_malloc.o config.o detach.o \ reject.o replica.o replog.o ri.o rq.o sanity.o st.o \ tsleep.o -VINCLUDEDIR= -I../../include -VLIBDIR= ../../libraries -VLIBS= -L$(VLIBDIR) +LDAP_INCDIR= ../../include +LDAP_LIBDIR= ../../libraries BUILD_OPT = "--enable-slurpd" BUILD_SRV = @BUILD_SLURPD@ @@ -27,7 +26,7 @@ XLIBS = @SLURPD_LIBS@ -llthread @LTHREAD_LIBS@ slurpd: version.o $(CC) $(LDFLAGS) -o $@ $(OBJS) version.o $(LIBS) -version.c: $(OBJS) $(LDAP_LIBDIR)/liblber.a $(LDAP_LIBDIR)/libldap.a +version.c: $(OBJS) $(LDAP_LIBDEPEND) $(RM) $@ (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ From 47bd4c4d9680e27feabc73add8a484a93d81a4b6 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 21 Sep 1998 03:22:09 +0000 Subject: [PATCH 063/148] prefix md5 calls with ldap_ --- servers/slapd/back-ldbm/bind.c | 114 ++++++++++++++++++++++++++++++++- 1 file changed, 111 insertions(+), 3 deletions(-) diff --git a/servers/slapd/back-ldbm/bind.c b/servers/slapd/back-ldbm/bind.c index 88fd4030c4..796d471aaa 100644 --- a/servers/slapd/back-ldbm/bind.c +++ b/servers/slapd/back-ldbm/bind.c @@ -7,8 +7,30 @@ #include "slap.h" #include "back-ldbm.h" #ifdef KERBEROS -#include "krb.h" +#ifdef KERBEROS_V +#include +#else +#include +#endif /* KERBEROS_V */ +#endif /* KERBEROS */ + +#ifdef LDAP_CRYPT +/* change for crypted passwords -- lukeh */ +#ifdef __NeXT__ +extern char *crypt (char *key, char *salt); +#else +#include #endif +#endif /* LDAP_CRYPT */ + +#ifdef LDAP_SHA1 +#include +#endif /* LDAP_SHA1 */ +#ifdef LDAP_MD5 +#include +#endif /* LDAP_MD5 */ + +#include extern Entry *dn2entry(); extern Attribute *attr_find(); @@ -17,6 +39,87 @@ extern Attribute *attr_find(); extern int krbv4_ldap_auth(); #endif +#ifdef LDAP_CRYPT +pthread_mutex_t crypt_mutex; + +static int +crypted_value_find( + struct berval **vals, + struct berval *v, + int syntax, + int normalize, + struct berval *cred +) +{ + int i; + for ( i = 0; vals[i] != NULL; i++ ) { + if ( syntax != SYNTAX_BIN && strncasecmp( "{CRYPT}", + vals[i]->bv_val, (sizeof("{CRYPT}") - 1 ) ) == 0 ) { + char *userpassword = vals[i]->bv_val + sizeof("{CRYPT}") - 1; + pthread_mutex_lock( &crypt_mutex ); + if (strcmp(userpassword, crypt(cred->bv_val, + userpassword)) == 0) { + pthread_mutex_unlock( &crypt_mutex ); + return ( 0 ); + } + pthread_mutex_unlock( &crypt_mutex ); +#ifdef LDAP_MD5 + } else if ( syntax != SYNTAX_BIN && strncasecmp( "{MD5}", + vals[i]->bv_val, (sizeof("{MD5}") - 1 ) ) == 0 ) { + MD5_CTX MD5context; + unsigned char MD5digest[20]; + char base64digest[29]; /* ceiling(sizeof(input)/3) * 4 + 1 */ + + char *userpassword = vals[i]->bv_val + sizeof("{MD5}") - 1; + + ldap_MD5Init(&MD5context); + ldap_MD5Update(&MD5context, cred->bv_val, strlen(cred->bv_val)); + ldap_MD5Final(MD5digest, &MD5context); + + if (b64_ntop(MD5digest, sizeof(MD5digest), + base64digest, sizeof(base64digest)) < 0) + { + return ( 1 ); + } + + if (strcmp(userpassword, base64digest) == 0) { + return ( 0 ); + } +#endif /* LDAP_MD5 */ +#ifdef LDAP_SHA1 + } else if ( syntax != SYNTAX_BIN && strncasecmp( "{SHA}", + vals[i]->bv_val, (sizeof("{SHA}") - 1 ) ) == 0 ) { + SHA1_CTX SHA1context; + unsigned char SHA1digest[20]; + char base64digest[29]; /* ceiling(sizeof(input)/3) * 4 + 1 */ + + char *userpassword = vals[i]->bv_val + sizeof("{SHA}") - 1; + + ldap_SHA1Init(&SHA1context); + ldap_SHA1Update(&SHA1context, cred->bv_val, strlen(cred->bv_val)); + ldap_SHA1Final(SHA1digest, &SHA1context); + + if (b64_ntop(SHA1digest, sizeof(SHA1digest), + base64digest, sizeof(base64digest)) < 0) + { + return ( 1 ); + } + + if (strcmp(userpassword, base64digest) == 0) { + return ( 0 ); + } +#endif /* LDAP_SHA1 */ + } else { + if ( value_cmp( vals[i], v, syntax, normalize ) == 0 ) { + return( 0 ); + } + } + } + + return( 1 ); +} +#endif /* LDAP_CRYPT */ + int ldbm_back_bind( Backend *be, @@ -81,13 +184,18 @@ ldbm_back_bind( return( 1 ); } - if ( value_find( a->a_vals, cred, a->a_syntax, 0 ) != 0 ) { +#ifdef LDAP_CRYPT + if ( crypted_value_find( a->a_vals, cred, a->a_syntax, 0, cred ) != 0 ) +#else + if ( value_find( a->a_vals, cred, a->a_syntax, 0 ) != 0 ) +#endif +{ if ( be_isroot_pw( be, dn, cred ) ) { /* front end will send result */ return( 0 ); } send_ldap_result( conn, op, LDAP_INVALID_CREDENTIALS, - NULL, NULL ); + NULL, NULL ); cache_return_entry( &li->li_cache, e ); return( 1 ); } From b2d9693254b4da133cb73b4703ff816171a8754b Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 21 Sep 1998 04:36:15 +0000 Subject: [PATCH 064/148] Add support for manual specification of LDBM and Thread flags. --- configure | 640 ++++++++++++++++++++++++++++++++------------------- configure.in | 26 ++- 2 files changed, 423 insertions(+), 243 deletions(-) diff --git a/configure b/configure index 46eb2645ca..826f7eb408 100755 --- a/configure +++ b/configure @@ -737,7 +737,7 @@ if test "${with_threads+set}" = set; then withval="$with_threads" ol_arg=invalid - for ol_val in auto posix dce mach yes no ; do + for ol_val in auto posix dce mach yes no manual ; do if test "$withval" = "$ol_val" ; then ol_arg="$ol_val" fi @@ -962,7 +962,7 @@ if test "${with_ldbm_api+set}" = set; then withval="$with_ldbm_api" ol_arg=invalid - for ol_val in auto db2 db gdbm ndbm ; do + for ol_val in auto db2 db gdbm ndbm manual ; do if test "$withval" = "$ol_val" ; then ol_arg="$ol_val" fi @@ -2129,6 +2129,119 @@ fi fi fi +if test $ol_with_threads = manual ; then + $ol_link_threads=yes + + echo "configure: warning: thread defines and link options must be set manually" 1>&2 + + for ac_hdr in pthread.h sched.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2142: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + echo $ac_n "checking for sched_yield""... $ac_c" 1>&6 +echo "configure:2179: checking for sched_yield" >&5 +if eval "test \"`echo '$''{'ac_cv_func_sched_yield'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char sched_yield(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_sched_yield) || defined (__stub___sched_yield) +choke me +#else +sched_yield(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_sched_yield=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_sched_yield=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'sched_yield`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +fi + + +echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 +echo "configure:2228: checking for LinuxThreads" >&5 +if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l` + if test "$res" -gt 0 ; then + ol_cv_linux_threads=yes + else + ol_cv_linux_threads=no + fi + +fi + +echo "$ac_t""$ol_cv_linux_threads" 1>&6 + +fi + if test $ol_link_threads = no ; then if test $ol_with_threads = yes ; then { echo "configure: error: no suitable thread support" 1>&2; exit 1; } @@ -2146,13 +2259,13 @@ fi ol_link_ldbm=no if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then echo $ac_n "checking for DB2 library""... $ac_c" 1>&6 -echo "configure:2150: checking for DB2 library" >&5 +echo "configure:2263: checking for DB2 library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6 -echo "configure:2156: checking for db_open in -ldb" >&5 +echo "configure:2269: checking for db_open in -ldb" >&5 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2160,7 +2273,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2202,17 +2315,17 @@ for ac_hdr in db.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2206: checking for $ac_hdr" >&5 +echo "configure:2319: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2240,13 +2353,13 @@ done if test $ac_cv_header_db_h = yes ; then echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6 -echo "configure:2244: checking if db.h is DB2" >&5 +echo "configure:2357: checking if db.h is DB2" >&5 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -2278,7 +2391,7 @@ fi echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6 -echo "configure:2282: checking for Berkeley DB2" >&5 +echo "configure:2395: checking for Berkeley DB2" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2314,18 +2427,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6 -echo "configure:2318: checking for Berkeley DB library" >&5 +echo "configure:2431: checking for Berkeley DB library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:2324: checking for dbopen" >&5 +echo "configure:2437: checking for dbopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -2367,7 +2480,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:2371: checking for dbopen in -ldb" >&5 +echo "configure:2484: checking for dbopen in -ldb" >&5 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2375,7 +2488,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2421,17 +2534,17 @@ for ac_hdr in db_185.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2425: checking for $ac_hdr" >&5 +echo "configure:2538: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2467,7 +2580,7 @@ fi echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6 -echo "configure:2471: checking for Berkeley DB" >&5 +echo "configure:2584: checking for Berkeley DB" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2503,6 +2616,53 @@ echo "$ac_t""$ol_cv_berkeley_db" 1>&6 fi fi +if test $ol_with_ldbm_api = manual ; then + $ol_link_ldbm=yes + + echo "configure: warning: LDBM defines and link options must be set manually" 1>&2 + + for ac_hdr in db.h db_185.h gdbm.h ndbm.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2629: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +fi + if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then echo "configure: warning: Could not find LDBM with BTREE support" 1>&2; $ol_with_ldbm_api=none @@ -2510,18 +2670,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then echo $ac_n "checking for GDBM library""... $ac_c" 1>&6 -echo "configure:2514: checking for GDBM library" >&5 +echo "configure:2674: checking for GDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6 -echo "configure:2520: checking for gdbm_open" >&5 +echo "configure:2680: checking for gdbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gdbm_open=yes" else @@ -2563,7 +2723,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:2567: checking for gdbm_open in -lgdbm" >&5 +echo "configure:2727: checking for gdbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2571,7 +2731,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2617,17 +2777,17 @@ echo "$ac_t""$ol_cv_lib_gdbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2621: checking for $ac_hdr" >&5 +echo "configure:2781: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2631: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2654,7 +2814,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:2658: checking for db" >&5 +echo "configure:2818: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2684,18 +2844,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = ndbm ; then echo $ac_n "checking for NDBM library""... $ac_c" 1>&6 -echo "configure:2688: checking for NDBM library" >&5 +echo "configure:2848: checking for NDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:2694: checking for dbm_open" >&5 +echo "configure:2854: checking for dbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -2737,7 +2897,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6 -echo "configure:2741: checking for dbm_open in -lndbm" >&5 +echo "configure:2901: checking for dbm_open in -lndbm" >&5 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2745,7 +2905,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lndbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2776,7 +2936,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:2780: checking for dbm_open in -ldbm" >&5 +echo "configure:2940: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2784,7 +2944,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2832,17 +2992,17 @@ echo "$ac_t""$ol_cv_lib_ndbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2836: checking for $ac_hdr" >&5 +echo "configure:2996: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2846: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2869,7 +3029,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:2873: checking for db" >&5 +echo "configure:3033: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2913,7 +3073,7 @@ fi if test $ol_enable_wrappers = yes ; then echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6 -echo "configure:2917: checking for hosts_access in -lwrap" >&5 +echo "configure:3077: checking for hosts_access in -lwrap" >&5 ac_lib_var=`echo wrap'_'hosts_access | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2921,7 +3081,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lwrap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2976,12 +3136,12 @@ LIBTERMCAP="-ltermcap" # FreeBSD (and others) have crypt(3) in -lcrypt if test $ol_enable_crypt != no ; then echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:2980: checking for crypt" >&5 +echo "configure:3140: checking for crypt" >&5 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -3023,7 +3183,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:3027: checking for crypt in -lcrypt" >&5 +echo "configure:3187: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3031,7 +3191,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3080,17 +3240,121 @@ fi fi fi +echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +echo "configure:3245: checking for ANSI C header files" >&5 +if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include +#include +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + ac_cv_header_stdc=yes +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "free" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +if test "$cross_compiling" = yes; then + : +else + cat > conftest.$ac_ext < +#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int main () { int i; for (i = 0; i < 256; i++) +if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); +exit (0); } + +EOF +if { (eval echo configure:3325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_header_stdc=no +fi +rm -fr conftest* +fi + +fi +fi + +echo "$ac_t""$ac_cv_header_stdc" 1>&6 +if test $ac_cv_header_stdc = yes; then + cat >> confdefs.h <<\EOF +#define STDC_HEADERS 1 +EOF + +fi + ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:3089: checking for $ac_hdr that defines DIR" >&5 +echo "configure:3353: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -3098,7 +3362,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:3102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -3123,7 +3387,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:3127: checking for opendir in -ldir" >&5 +echo "configure:3391: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3131,7 +3395,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3164,7 +3428,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:3168: checking for opendir in -lx" >&5 +echo "configure:3432: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3172,7 +3436,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3205,117 +3469,13 @@ fi fi -echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3210: checking for ANSI C header files" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -#include -#include -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3223: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - ac_cv_header_stdc=yes -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "memchr" >/dev/null 2>&1; then - : -else - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "free" >/dev/null 2>&1; then - : -else - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -if test "$cross_compiling" = yes; then - : -else - cat > conftest.$ac_ext < -#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int main () { int i; for (i = 0; i < 256; i++) -if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); -exit (0); } - -EOF -if { (eval echo configure:3290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then - : -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_header_stdc=no -fi -rm -fr conftest* -fi - -fi -fi - -echo "$ac_t""$ac_cv_header_stdc" 1>&6 -if test $ac_cv_header_stdc = yes; then - cat >> confdefs.h <<\EOF -#define STDC_HEADERS 1 -EOF - -fi - echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:3314: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:3474: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3331,7 +3491,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:3335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3495: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -3367,17 +3527,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3371: checking for $ac_hdr" >&5 +echo "configure:3531: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3405,12 +3565,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3409: checking for uid_t in sys/types.h" >&5 +echo "configure:3569: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3439,7 +3599,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:3443: checking type of array argument to getgroups" >&5 +echo "configure:3603: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3447,7 +3607,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -3486,7 +3646,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -3510,12 +3670,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3514: checking for mode_t" >&5 +echo "configure:3674: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3543,12 +3703,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3547: checking for off_t" >&5 +echo "configure:3707: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3576,12 +3736,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3580: checking for pid_t" >&5 +echo "configure:3740: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3609,12 +3769,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3613: checking return type of signal handlers" >&5 +echo "configure:3773: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3631,7 +3791,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3650,12 +3810,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3654: checking for size_t" >&5 +echo "configure:3814: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3683,12 +3843,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3687: checking for uid_t in sys/types.h" >&5 +echo "configure:3847: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3717,12 +3877,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:3721: checking for st_blksize in struct stat" >&5 +echo "configure:3881: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3730,7 +3890,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:3734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -3751,12 +3911,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3755: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:3915: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3765,7 +3925,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -3786,12 +3946,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:3790: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:3950: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3799,7 +3959,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:3803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -3821,12 +3981,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3825: checking for working const" >&5 +echo "configure:3985: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3897,7 +4057,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:3901: checking for 8-bit clean memcmp" >&5 +echo "configure:4061: 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 @@ -3905,7 +4065,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -3933,12 +4093,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3937: checking return type of signal handlers" >&5 +echo "configure:4097: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3955,7 +4115,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3974,12 +4134,12 @@ EOF echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:3978: checking for strftime" >&5 +echo "configure:4138: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -4024,7 +4184,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:4028: checking for strftime in -lintl" >&5 +echo "configure:4188: 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 @@ -4032,7 +4192,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4070,12 +4230,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:4074: checking for vprintf" >&5 +echo "configure:4234: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -4122,12 +4282,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:4126: checking for _doprnt" >&5 +echo "configure:4286: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -4175,7 +4335,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:4179: checking for wait3 that fills in rusage" >&5 +echo "configure:4339: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4183,7 +4343,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -4214,7 +4374,7 @@ main() { } } EOF -if { (eval echo configure:4218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -4255,12 +4415,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4259: checking for $ac_func" >&5 +echo "configure:4419: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4311,12 +4471,12 @@ done for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4315: checking for $ac_func" >&5 +echo "configure:4475: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4369,13 +4529,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:4373: checking declaration of sys_errlist" >&5 +echo "configure:4533: 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 < @@ -4385,7 +4545,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:4389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -4406,20 +4566,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:4410: checking existence of sys_errlist" >&5 +echo "configure:4570: 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 < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:4423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index d7b0c153c7..e04cff3119 100644 --- a/configure.in +++ b/configure.in @@ -34,7 +34,7 @@ dnl General "with" options OL_ARG_WITH(kerberos,[ --with-kerberos use Kerberos], auto, [auto k5 k4 afs yes no]) OL_ARG_WITH(threads,[ --with-threads use threads], - auto, [auto posix dce mach yes no] ) + auto, [auto posix dce mach yes no manual] ) dnl Server options @@ -54,7 +54,7 @@ OL_ARG_ENABLE(rlookups,[ --enable-rlookups enable reverse lookups], auto)dnl dnl SLAPD Backend options OL_ARG_ENABLE(ldbm,[ --enable-ldbm enable ldbm backend], yes)dnl OL_ARG_WITH(ldbm_api,[ --with-ldbm-api use LDBM API], auto, - [auto db2 db gdbm ndbm]) + [auto db2 db gdbm ndbm manual]) OL_ARG_WITH(ldbm_type,[ --with-ldbm-type use LDBM type], auto, [auto btree hash]) @@ -298,6 +298,17 @@ dnl AC_DEFINE(HAVE_LINUX_THREADS,1) fi fi +if test $ol_with_threads = manual ; then + dnl User thinks he can manually configure threads. + $ol_link_threads=yes + + AC_MSG_WARN([thread defines and link options must be set manually]) + + AC_CHECK_HEADERS(pthread.h sched.h) + AC_CHECK_FUNC(sched_yield) + OL_LINUX_THREADS +fi + if test $ol_link_threads = no ; then if test $ol_with_threads = yes ; then AC_MSG_ERROR([no suitable thread support]) @@ -361,6 +372,15 @@ if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then fi fi +if test $ol_with_ldbm_api = manual ; then + dnl User thinks he can manually configure LDBM api. + $ol_link_ldbm=yes + + AC_MSG_WARN([LDBM defines and link options must be set manually]) + + AC_CHECK_HEADERS(db.h db_185.h gdbm.h ndbm.h) +fi + if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then AC_MSG_WARN(Could not find LDBM with BTREE support); $ol_with_ldbm_api=none @@ -457,8 +477,8 @@ fi dnl ---------------------------------------------------------------- dnl Checks for header files. -AC_HEADER_DIRENT AC_HEADER_STDC +AC_HEADER_DIRENT AC_HEADER_SYS_WAIT AC_CHECK_HEADERS( \ stddef.h \ From 8c1eae32fab9bca3689ca5ba01d908b291923a11 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 21 Sep 1998 04:56:22 +0000 Subject: [PATCH 065/148] Use more portable sh if statement to resolve include problem. --- build/top.mk | 2 +- configure | 408 +++++++++++++++++++++++++-------------------------- configure.in | 10 +- 3 files changed, 208 insertions(+), 212 deletions(-) diff --git a/build/top.mk b/build/top.mk index 6cec0b0369..954714223b 100644 --- a/build/top.mk +++ b/build/top.mk @@ -99,7 +99,7 @@ lint-local: lint5-local: Makefile: Makefile.in ${top_srcdir}/config.status - @if [ $(top_srcdir) = $(srcdir) ]; then ; \ + @if test "$(top_srcdir)" = "$(srcdir)" ; then ; \ ./config.status ; \ else ; \ echo "Makefile out of date, run config.status from $top_srcdir" ; \ diff --git a/configure b/configure index 826f7eb408..b1516adecf 100755 --- a/configure +++ b/configure @@ -19,7 +19,7 @@ ac_help="$ac_help ac_help="$ac_help --enable-cache enable caching (yes)" ac_help="$ac_help - --enable-dns enable dns support (auto)" + --enable-dns enable dns support (no)" ac_help="$ac_help --enable-referrals enable referrals (yes)" ac_help="$ac_help @@ -608,7 +608,6 @@ else ol_enable_debug="yes" fi # end --enable-debug -#OL_ARG_ENABLE(syslog,[ --enable-syslog enable syslog support], auto)dnl # OpenLDAP --enable-libui # Check whether --enable-libui or --disable-libui was given. if test "${enable_libui+set}" = set; then @@ -666,7 +665,7 @@ if test "${enable_dns+set}" = set; then ol_enable_dns="$ol_arg" else - ol_enable_dns="auto" + ol_enable_dns="no" fi # end --enable-dns # OpenLDAP --enable-referrals @@ -1183,7 +1182,7 @@ BUILD_SHELL=no # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1187: checking for $ac_word" >&5 +echo "configure:1186: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1212,7 +1211,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1216: checking for $ac_word" >&5 +echo "configure:1215: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1260,7 +1259,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1264: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1263: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1270,11 +1269,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1294,12 +1293,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1298: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1297: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1303: checking whether we are using GNU C" >&5 +echo "configure:1302: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1308,7 +1307,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1323,7 +1322,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1327: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1326: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1351,7 +1350,7 @@ else fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1355: checking how to run the C preprocessor" >&5 +echo "configure:1354: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1366,13 +1365,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1376: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1383,13 +1382,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1393: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1413,13 +1412,13 @@ echo "$ac_t""$CPP" 1>&6 if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:1417: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:1416: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP @@ -1437,7 +1436,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -1460,7 +1459,7 @@ fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1464: checking whether ln -s works" >&5 +echo "configure:1463: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1491,7 +1490,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1495: checking for a BSD compatible install" >&5 +echo "configure:1494: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1543,7 +1542,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1547: checking for $ac_word" >&5 +echo "configure:1546: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1570,7 +1569,7 @@ else fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1574: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1573: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1600,7 +1599,7 @@ fi # Extract the first word of "sendmail", so it can be a program name with args. set dummy sendmail; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1604: checking for $ac_word" >&5 +echo "configure:1603: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1632,7 +1631,7 @@ fi # Extract the first word of "vi", so it can be a program name with args. set dummy vi; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1636: checking for $ac_word" >&5 +echo "configure:1635: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1664,7 +1663,7 @@ fi # Extract the first word of "finger", so it can be a program name with args. set dummy finger; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1668: checking for $ac_word" >&5 +echo "configure:1667: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1701,17 +1700,17 @@ if test $ol_with_threads = auto -o $ol_with_threads = posix ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1705: checking for $ac_hdr" >&5 +echo "configure:1704: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1715: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1740,13 +1739,13 @@ done if test "$ac_cv_header_pthread_h" = yes ; then echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6 -echo "configure:1744: checking POSIX thread version" >&5 +echo "configure:1743: checking POSIX thread version" >&5 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -1768,7 +1767,7 @@ rm -f conftest* cat > conftest.$ac_ext < @@ -1815,7 +1814,7 @@ echo "$ac_t""$ol_cv_pthread_version" 1>&6 echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 -echo "configure:1819: checking for LinuxThreads" >&5 +echo "configure:1818: checking for LinuxThreads" >&5 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1838,12 +1837,12 @@ echo "$ac_t""$ol_cv_linux_threads" 1>&6 echo $ac_n "checking for pthread_create""... $ac_c" 1>&6 -echo "configure:1842: checking for pthread_create" >&5 +echo "configure:1841: checking for pthread_create" >&5 if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_pthread_create=yes" else @@ -1888,7 +1887,7 @@ fi if test $ol_link_threads = no ; then echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6 -echo "configure:1892: checking for pthread_create with -pthread" >&5 +echo "configure:1891: checking for pthread_create with -pthread" >&5 if eval "test \"`echo '$''{'ol_cv_pthread_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1896,7 +1895,7 @@ else save_LIBS="$LIBS" LIBS="-pthread $LIBS" cat > conftest.$ac_ext < int main() { @@ -1906,7 +1905,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_pthread_flag=yes else @@ -1931,7 +1930,7 @@ echo "$ac_t""$ol_cv_pthread_flag" 1>&6 if test $ol_link_threads = no ; then save_LIBS="$LIBS" echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:1935: checking for pthread_create in -lpthread" >&5 +echo "configure:1934: checking for pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1939,7 +1938,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1978,7 +1977,7 @@ fi if test $ol_link_threads = no ; then save_LIBS="$LIBS" echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:1982: checking for pthread_create in -lc_r" >&5 +echo "configure:1981: checking for pthread_create in -lc_r" >&5 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1986,7 +1985,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2025,7 +2024,7 @@ fi if test $ol_link_threads = no ; then save_LIBS="$LIBS" echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:2029: checking for pthread_create in -lpthread" >&5 +echo "configure:2028: checking for pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2033,7 +2032,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread -lmach -lexc -lc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2072,12 +2071,12 @@ fi if test $ol_link_threads != no ; then echo $ac_n "checking for sched_yield""... $ac_c" 1>&6 -echo "configure:2076: checking for sched_yield" >&5 +echo "configure:2075: checking for sched_yield" >&5 if eval "test \"`echo '$''{'ac_cv_func_sched_yield'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_sched_yield=yes" else @@ -2138,17 +2137,17 @@ if test $ol_with_threads = manual ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2142: checking for $ac_hdr" >&5 +echo "configure:2141: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2175,12 +2174,12 @@ fi done echo $ac_n "checking for sched_yield""... $ac_c" 1>&6 -echo "configure:2179: checking for sched_yield" >&5 +echo "configure:2178: checking for sched_yield" >&5 if eval "test \"`echo '$''{'ac_cv_func_sched_yield'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_sched_yield=yes" else @@ -2224,7 +2223,7 @@ fi echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 -echo "configure:2228: checking for LinuxThreads" >&5 +echo "configure:2227: checking for LinuxThreads" >&5 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2259,13 +2258,13 @@ fi ol_link_ldbm=no if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then echo $ac_n "checking for DB2 library""... $ac_c" 1>&6 -echo "configure:2263: checking for DB2 library" >&5 +echo "configure:2262: checking for DB2 library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6 -echo "configure:2269: checking for db_open in -ldb" >&5 +echo "configure:2268: checking for db_open in -ldb" >&5 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2273,7 +2272,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2315,17 +2314,17 @@ for ac_hdr in db.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2319: checking for $ac_hdr" >&5 +echo "configure:2318: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2353,13 +2352,13 @@ done if test $ac_cv_header_db_h = yes ; then echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6 -echo "configure:2357: checking if db.h is DB2" >&5 +echo "configure:2356: checking if db.h is DB2" >&5 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -2391,7 +2390,7 @@ fi echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6 -echo "configure:2395: checking for Berkeley DB2" >&5 +echo "configure:2394: checking for Berkeley DB2" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2427,18 +2426,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6 -echo "configure:2431: checking for Berkeley DB library" >&5 +echo "configure:2430: checking for Berkeley DB library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:2437: checking for dbopen" >&5 +echo "configure:2436: checking for dbopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -2480,7 +2479,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:2484: checking for dbopen in -ldb" >&5 +echo "configure:2483: checking for dbopen in -ldb" >&5 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2488,7 +2487,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2534,17 +2533,17 @@ for ac_hdr in db_185.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2538: checking for $ac_hdr" >&5 +echo "configure:2537: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2580,7 +2579,7 @@ fi echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6 -echo "configure:2584: checking for Berkeley DB" >&5 +echo "configure:2583: checking for Berkeley DB" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2625,17 +2624,17 @@ if test $ol_with_ldbm_api = manual ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2629: checking for $ac_hdr" >&5 +echo "configure:2628: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2670,18 +2669,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then echo $ac_n "checking for GDBM library""... $ac_c" 1>&6 -echo "configure:2674: checking for GDBM library" >&5 +echo "configure:2673: checking for GDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6 -echo "configure:2680: checking for gdbm_open" >&5 +echo "configure:2679: checking for gdbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gdbm_open=yes" else @@ -2723,7 +2722,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:2727: checking for gdbm_open in -lgdbm" >&5 +echo "configure:2726: checking for gdbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2731,7 +2730,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2777,17 +2776,17 @@ echo "$ac_t""$ol_cv_lib_gdbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2781: checking for $ac_hdr" >&5 +echo "configure:2780: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2814,7 +2813,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:2818: checking for db" >&5 +echo "configure:2817: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2844,18 +2843,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = ndbm ; then echo $ac_n "checking for NDBM library""... $ac_c" 1>&6 -echo "configure:2848: checking for NDBM library" >&5 +echo "configure:2847: checking for NDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:2854: checking for dbm_open" >&5 +echo "configure:2853: checking for dbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -2897,7 +2896,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6 -echo "configure:2901: checking for dbm_open in -lndbm" >&5 +echo "configure:2900: checking for dbm_open in -lndbm" >&5 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2905,7 +2904,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lndbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2936,7 +2935,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:2940: checking for dbm_open in -ldbm" >&5 +echo "configure:2939: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2944,7 +2943,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2992,17 +2991,17 @@ echo "$ac_t""$ol_cv_lib_ndbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2996: checking for $ac_hdr" >&5 +echo "configure:2995: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3029,7 +3028,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:3033: checking for db" >&5 +echo "configure:3032: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3073,7 +3072,7 @@ fi if test $ol_enable_wrappers = yes ; then echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6 -echo "configure:3077: checking for hosts_access in -lwrap" >&5 +echo "configure:3076: checking for hosts_access in -lwrap" >&5 ac_lib_var=`echo wrap'_'hosts_access | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3081,7 +3080,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lwrap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3136,12 +3135,12 @@ LIBTERMCAP="-ltermcap" # FreeBSD (and others) have crypt(3) in -lcrypt if test $ol_enable_crypt != no ; then echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:3140: checking for crypt" >&5 +echo "configure:3139: checking for crypt" >&5 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -3183,7 +3182,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:3187: checking for crypt in -lcrypt" >&5 +echo "configure:3186: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3191,7 +3190,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3241,12 +3240,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3245: checking for ANSI C header files" >&5 +echo "configure:3244: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3254,7 +3253,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3271,7 +3270,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3289,7 +3288,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3310,7 +3309,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3321,7 +3320,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:3325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -3349,12 +3348,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:3353: checking for $ac_hdr that defines DIR" >&5 +echo "configure:3352: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -3362,7 +3361,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:3366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -3387,7 +3386,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:3391: checking for opendir in -ldir" >&5 +echo "configure:3390: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3395,7 +3394,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3428,7 +3427,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:3432: checking for opendir in -lx" >&5 +echo "configure:3431: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3436,7 +3435,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3470,12 +3469,12 @@ fi fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:3474: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:3473: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3491,7 +3490,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:3495: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -3527,17 +3526,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3531: checking for $ac_hdr" >&5 +echo "configure:3530: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3565,12 +3564,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3569: checking for uid_t in sys/types.h" >&5 +echo "configure:3568: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3599,7 +3598,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:3603: checking type of array argument to getgroups" >&5 +echo "configure:3602: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3607,7 +3606,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -3646,7 +3645,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -3670,12 +3669,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3674: checking for mode_t" >&5 +echo "configure:3673: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3703,12 +3702,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3707: checking for off_t" >&5 +echo "configure:3706: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3736,12 +3735,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3740: checking for pid_t" >&5 +echo "configure:3739: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3769,12 +3768,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3773: checking return type of signal handlers" >&5 +echo "configure:3772: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3791,7 +3790,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3810,12 +3809,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3814: checking for size_t" >&5 +echo "configure:3813: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3843,12 +3842,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3847: checking for uid_t in sys/types.h" >&5 +echo "configure:3846: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3877,12 +3876,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:3881: checking for st_blksize in struct stat" >&5 +echo "configure:3880: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3890,7 +3889,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:3894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -3911,12 +3910,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3915: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:3914: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3925,7 +3924,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -3946,12 +3945,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:3950: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:3949: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3959,7 +3958,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:3963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -3981,12 +3980,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3985: checking for working const" >&5 +echo "configure:3984: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -4057,7 +4056,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:4061: checking for 8-bit clean memcmp" >&5 +echo "configure:4060: 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 @@ -4065,7 +4064,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -4093,12 +4092,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:4097: checking return type of signal handlers" >&5 +echo "configure:4096: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4115,7 +4114,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:4119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -4134,12 +4133,12 @@ EOF echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:4138: checking for strftime" >&5 +echo "configure:4137: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -4184,7 +4183,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:4188: checking for strftime in -lintl" >&5 +echo "configure:4187: 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 @@ -4192,7 +4191,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4230,12 +4229,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:4234: checking for vprintf" >&5 +echo "configure:4233: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -4282,12 +4281,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:4286: checking for _doprnt" >&5 +echo "configure:4285: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -4335,7 +4334,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:4339: checking for wait3 that fills in rusage" >&5 +echo "configure:4338: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4343,7 +4342,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -4374,7 +4373,7 @@ main() { } } EOF -if { (eval echo configure:4378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -4415,12 +4414,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4419: checking for $ac_func" >&5 +echo "configure:4418: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4471,12 +4470,12 @@ done for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4475: checking for $ac_func" >&5 +echo "configure:4474: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4529,13 +4528,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:4533: checking declaration of sys_errlist" >&5 +echo "configure:4532: 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 < @@ -4545,7 +4544,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:4549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -4566,20 +4565,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:4570: checking existence of sys_errlist" >&5 +echo "configure:4569: 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 < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:4583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else @@ -4599,9 +4598,6 @@ fi if test $ol_enable_debug != no ; then LDAP_DEFS="$LDAP_DEFS -DLDAP_DEBUG" fi -#if test $ol_enable_syslog != no ; then -# LDAP_DEFS="$LDAP_DEFS -DLDAP_SYSLOG" -#fi if test $ol_enable_libui = no ; then LDAP_DEFS="$LDAP_DEFS -DNO_USERINTERFACE" fi diff --git a/configure.in b/configure.in index e04cff3119..394a8fbc2a 100644 --- a/configure.in +++ b/configure.in @@ -23,10 +23,10 @@ AC_PREFIX_DEFAULT(/usr/local) dnl General "enable" options OL_ARG_ENABLE(debug,[ --enable-debug enable debugging], yes)dnl -#OL_ARG_ENABLE(syslog,[ --enable-syslog enable syslog support], auto)dnl +dnl OL_ARG_ENABLE(syslog,[ --enable-syslog enable syslog support], auto)dnl OL_ARG_ENABLE(libui,[ --enable-libui enable library user interface], yes)dnl OL_ARG_ENABLE(cache,[ --enable-cache enable caching], yes)dnl -OL_ARG_ENABLE(dns,[ --enable-dns enable dns support], auto)dnl +OL_ARG_ENABLE(dns,[ --enable-dns enable dns support], no)dnl OL_ARG_ENABLE(referrals,[ --enable-referrals enable referrals], yes)dnl OL_ARG_ENABLE(cldap,[ --enable-clapd enable connectionless ldap], no)dnl @@ -547,9 +547,9 @@ dnl Sort out defines if test $ol_enable_debug != no ; then LDAP_DEFS="$LDAP_DEFS -DLDAP_DEBUG" fi -#if test $ol_enable_syslog != no ; then -# LDAP_DEFS="$LDAP_DEFS -DLDAP_SYSLOG" -#fi +dnl if test $ol_enable_syslog != no ; then +dnl LDAP_DEFS="$LDAP_DEFS -DLDAP_SYSLOG" +dnl fi if test $ol_enable_libui = no ; then LDAP_DEFS="$LDAP_DEFS -DNO_USERINTERFACE" fi From 088ff280611856f81b97c35aa67139611dab6fd8 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 21 Sep 1998 05:46:46 +0000 Subject: [PATCH 066/148] Fix library depends --- build/top.mk | 3 ++- servers/slapd/Makefile.in | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/build/top.mk b/build/top.mk index 954714223b..4d16d1778b 100644 --- a/build/top.mk +++ b/build/top.mk @@ -73,7 +73,8 @@ AC_LIBS = @LDFLAGS@ @LIBS@ AC_CFLAGS = @CFLAGS@ AC_LDFLAGS = -LIBTERMCAP = @LIBTERMCAP@ +TERMCAP_DEFS = @TERMCAP_DEFS@ +TERMCAP_LIBS = @TERMCAP_LIBS@ # Our Defaults CC = $(AC_CC) diff --git a/servers/slapd/Makefile.in b/servers/slapd/Makefile.in index af4289e762..776e492ab5 100644 --- a/servers/slapd/Makefile.in +++ b/servers/slapd/Makefile.in @@ -70,10 +70,10 @@ libbackends.a: .backend @ls -l libbackends.a version.c: libbackends.a $(OBJS) $(LDAP_LIBDEPEND) \ - $(LDAP_LIBDIR)/liblber.a \ - $(LDAP_LIBDIR)/liblldbm.a \ - $(LDAP_LIBDIR)/liblavl.a \ - $(LDAP_LIBDIR)/liblldif.a \ + $(LDAP_LIBDIR)/libldbm.a \ + $(LDAP_LIBDIR)/libavl.a \ + $(LDAP_LIBDIR)/libldif.a \ + $(LDAP_LIBDIR)/liblutil.a \ $(LDAP_LIBDIR)/liblthread.a $(RM) $@ (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ From 3b4931c0befbc6e0d0902d1731582807658e74d9 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 21 Sep 1998 06:09:46 +0000 Subject: [PATCH 067/148] Added termcap and ncurses detection. --- clients/ud/Makefile.in | 3 +- configure | 336 +++++++++++++++++++++++++++++------------ configure.in | 32 +++- include/portable.h.in | 6 + 4 files changed, 280 insertions(+), 97 deletions(-) diff --git a/clients/ud/Makefile.in b/clients/ud/Makefile.in index e68ca716bf..3af751457c 100644 --- a/clients/ud/Makefile.in +++ b/clients/ud/Makefile.in @@ -9,7 +9,8 @@ PROGRAMS= ud LDAP_INCDIR= ../../include LDAP_LIBDIR= ../../libraries -XLIBS = $(LIBTERMCAP) +XDEFS = $(TERMCAP_DEFS) +XLIBS = $(TERMCAP_LIBS) ud : version.o $(CC) $(LDFLAGS) -o $@ version.o $(OBJS) $(LIBS) diff --git a/configure b/configure index b1516adecf..da0bc17d19 100755 --- a/configure +++ b/configure @@ -3129,18 +3129,165 @@ fi fi # ud needs termcap (should insert check here) -LIBTERMCAP="-ltermcap" +ol_link_termcap=no + +TERMCAP_DEFS= +TERMCAP_LIBS= + +for ac_hdr in termcap.h ncurses.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3142: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + +if test $ol_link_termcap = no ; then + echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6 +echo "configure:3181: checking for tputs in -ltermcap" >&5 +ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ltermcap $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_termcap=yes +else + echo "$ac_t""no" 1>&6 +have_termcap=no +fi + + if test $have_termcap = yes ; then + ol_link_termcap=yes + TERMCAP_LIBS=-ltermcap + fi +fi + +if test $ol_link_termcap = no ; then + echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 +echo "configure:3229: checking for initscr in -lncurses" >&5 +ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lncurses $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_ncurses=yes +else + echo "$ac_t""no" 1>&6 +have_ncurses=no +fi + + if test $have_ncurses = yes ; then + ol_link_termcap=yes + TERMCAP_LIBS=-lncurses + fi +fi + +if test $ol_link_termcap = no ; then + TERMCAP_DEFS="-DNOTERMCAP" + TERMCAP_LIBS= +fi + + # FreeBSD (and others) have crypt(3) in -lcrypt if test $ol_enable_crypt != no ; then echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:3139: checking for crypt" >&5 +echo "configure:3286: checking for crypt" >&5 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -3182,7 +3329,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:3186: checking for crypt in -lcrypt" >&5 +echo "configure:3333: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3190,7 +3337,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3240,12 +3387,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3244: checking for ANSI C header files" >&5 +echo "configure:3391: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3253,7 +3400,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3270,7 +3417,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3288,7 +3435,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3309,7 +3456,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3320,7 +3467,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:3324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -3348,12 +3495,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:3352: checking for $ac_hdr that defines DIR" >&5 +echo "configure:3499: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -3361,7 +3508,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:3365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -3386,7 +3533,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:3390: checking for opendir in -ldir" >&5 +echo "configure:3537: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3394,7 +3541,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3427,7 +3574,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:3431: checking for opendir in -lx" >&5 +echo "configure:3578: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3435,7 +3582,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3469,12 +3616,12 @@ fi fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:3473: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:3620: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3490,7 +3637,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:3494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -3526,17 +3673,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3530: checking for $ac_hdr" >&5 +echo "configure:3677: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3564,12 +3711,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3568: checking for uid_t in sys/types.h" >&5 +echo "configure:3715: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3598,7 +3745,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:3602: checking type of array argument to getgroups" >&5 +echo "configure:3749: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3606,7 +3753,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -3645,7 +3792,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -3669,12 +3816,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3673: checking for mode_t" >&5 +echo "configure:3820: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3702,12 +3849,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3706: checking for off_t" >&5 +echo "configure:3853: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3735,12 +3882,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3739: checking for pid_t" >&5 +echo "configure:3886: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3768,12 +3915,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3772: checking return type of signal handlers" >&5 +echo "configure:3919: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3790,7 +3937,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3809,12 +3956,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3813: checking for size_t" >&5 +echo "configure:3960: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3842,12 +3989,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3846: checking for uid_t in sys/types.h" >&5 +echo "configure:3993: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3876,12 +4023,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:3880: checking for st_blksize in struct stat" >&5 +echo "configure:4027: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3889,7 +4036,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:3893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -3910,12 +4057,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3914: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:4061: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3924,7 +4071,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -3945,12 +4092,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:3949: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:4096: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3958,7 +4105,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:3962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -3980,12 +4127,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3984: checking for working const" >&5 +echo "configure:4131: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -4056,7 +4203,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:4060: checking for 8-bit clean memcmp" >&5 +echo "configure:4207: 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 @@ -4064,7 +4211,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -4092,12 +4239,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:4096: checking return type of signal handlers" >&5 +echo "configure:4243: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4114,7 +4261,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:4118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -4133,12 +4280,12 @@ EOF echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:4137: checking for strftime" >&5 +echo "configure:4284: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -4183,7 +4330,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:4187: checking for strftime in -lintl" >&5 +echo "configure:4334: 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 @@ -4191,7 +4338,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4229,12 +4376,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:4233: checking for vprintf" >&5 +echo "configure:4380: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -4281,12 +4428,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:4285: checking for _doprnt" >&5 +echo "configure:4432: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -4334,7 +4481,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:4338: checking for wait3 that fills in rusage" >&5 +echo "configure:4485: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4342,7 +4489,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -4373,7 +4520,7 @@ main() { } } EOF -if { (eval echo configure:4377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -4414,12 +4561,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4418: checking for $ac_func" >&5 +echo "configure:4565: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4470,12 +4617,12 @@ done for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4474: checking for $ac_func" >&5 +echo "configure:4621: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4528,13 +4675,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:4532: checking declaration of sys_errlist" >&5 +echo "configure:4679: 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 < @@ -4544,7 +4691,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:4548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -4565,20 +4712,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:4569: checking existence of sys_errlist" >&5 +echo "configure:4716: 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 < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:4582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else @@ -4871,7 +5018,8 @@ s%@SET_MAKE@%$SET_MAKE%g s%@SENDMAIL@%$SENDMAIL%g s%@EDITOR@%$EDITOR%g s%@FINGER@%$FINGER%g -s%@LIBTERMCAP@%$LIBTERMCAP%g +s%@TERMCAP_DEFS@%$TERMCAP_DEFS%g +s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g s%@LIBOBJS@%$LIBOBJS%g s%@BUILD_LDAPD@%$BUILD_LDAPD%g s%@BUILD_SLAPD@%$BUILD_SLAPD%g diff --git a/configure.in b/configure.in index 394a8fbc2a..539574bc6d 100644 --- a/configure.in +++ b/configure.in @@ -452,8 +452,36 @@ dnl AC_DEFINE(HAVE_TCPD) fi # ud needs termcap (should insert check here) -LIBTERMCAP="-ltermcap" -AC_SUBST(LIBTERMCAP) +ol_link_termcap=no + +TERMCAP_DEFS= +TERMCAP_LIBS= + +AC_CHECK_HEADERS(termcap.h ncurses.h) + +if test $ol_link_termcap = no ; then + AC_CHECK_LIB(termcap, tputs, [have_termcap=yes], [have_termcap=no]) + if test $have_termcap = yes ; then + ol_link_termcap=yes + TERMCAP_LIBS=-ltermcap + fi +fi + +if test $ol_link_termcap = no ; then + AC_CHECK_LIB(ncurses, initscr, [have_ncurses=yes], [have_ncurses=no]) + if test $have_ncurses = yes ; then + ol_link_termcap=yes + TERMCAP_LIBS=-lncurses + fi +fi + +if test $ol_link_termcap = no ; then + TERMCAP_DEFS="-DNOTERMCAP" + TERMCAP_LIBS= +fi + +AC_SUBST(TERMCAP_DEFS) +AC_SUBST(TERMCAP_LIBS) # FreeBSD (and others) have crypt(3) in -lcrypt if test $ol_enable_crypt != no ; then diff --git a/include/portable.h.in b/include/portable.h.in index a68944d6b5..1e1bd69d3b 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -145,6 +145,9 @@ /* Define if you have the header file. */ #undef HAVE_MALLOC_H +/* Define if you have the header file. */ +#undef HAVE_NCURSES_H + /* Define if you have the header file. */ #undef HAVE_NDBM_H @@ -181,6 +184,9 @@ /* Define if you have the header file. */ #undef HAVE_SYSLOG_H +/* Define if you have the header file. */ +#undef HAVE_TERMCAP_H + /* Define if you have the header file. */ #undef HAVE_TERMIO_H From d376986c1e30b4e26737ae4efabdbba9cff6a998 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 21 Sep 1998 20:43:53 +0000 Subject: [PATCH 068/148] Add detection of -lnsl, -lsocket, -linet --- configure | 562 ++++++++++++++++++++++++++++-------------- configure.in | 7 +- include/portable.h.in | 9 + 3 files changed, 391 insertions(+), 187 deletions(-) diff --git a/configure b/configure index da0bc17d19..2209054a59 100755 --- a/configure +++ b/configure @@ -1694,23 +1694,214 @@ fi +echo $ac_n "checking for socket""... $ac_c" 1>&6 +echo "configure:1699: checking for socket" >&5 +if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char socket(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_socket) || defined (__stub___socket) +choke me +#else +socket(); +#endif + +; return 0; } +EOF +if { (eval echo configure:1727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_socket=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_socket=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6 +echo "configure:1745: checking for gethostname in -lnsl" >&5 +ac_lib_var=`echo nsl'_'gethostname | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lnsl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 +echo "configure:1792: checking for socket in -lsocket" >&5 +ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsocket $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6 +echo "configure:1839: checking for socket in -linet" >&5 +ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-linet $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + +fi + + ol_link_threads=no if test $ol_with_threads = auto -o $ol_with_threads = posix ; then for ac_hdr in pthread.h sched.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1704: checking for $ac_hdr" >&5 +echo "configure:1895: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1739,13 +1930,13 @@ done if test "$ac_cv_header_pthread_h" = yes ; then echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6 -echo "configure:1743: checking POSIX thread version" >&5 +echo "configure:1934: checking POSIX thread version" >&5 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -1767,7 +1958,7 @@ rm -f conftest* cat > conftest.$ac_ext < @@ -1814,7 +2005,7 @@ echo "$ac_t""$ol_cv_pthread_version" 1>&6 echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 -echo "configure:1818: checking for LinuxThreads" >&5 +echo "configure:2009: checking for LinuxThreads" >&5 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1837,12 +2028,12 @@ echo "$ac_t""$ol_cv_linux_threads" 1>&6 echo $ac_n "checking for pthread_create""... $ac_c" 1>&6 -echo "configure:1841: checking for pthread_create" >&5 +echo "configure:2032: checking for pthread_create" >&5 if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_pthread_create=yes" else @@ -1887,7 +2078,7 @@ fi if test $ol_link_threads = no ; then echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6 -echo "configure:1891: checking for pthread_create with -pthread" >&5 +echo "configure:2082: checking for pthread_create with -pthread" >&5 if eval "test \"`echo '$''{'ol_cv_pthread_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1895,7 +2086,7 @@ else save_LIBS="$LIBS" LIBS="-pthread $LIBS" cat > conftest.$ac_ext < int main() { @@ -1905,7 +2096,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_pthread_flag=yes else @@ -1930,7 +2121,7 @@ echo "$ac_t""$ol_cv_pthread_flag" 1>&6 if test $ol_link_threads = no ; then save_LIBS="$LIBS" echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:1934: checking for pthread_create in -lpthread" >&5 +echo "configure:2125: checking for pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1938,7 +2129,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1977,7 +2168,7 @@ fi if test $ol_link_threads = no ; then save_LIBS="$LIBS" echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:1981: checking for pthread_create in -lc_r" >&5 +echo "configure:2172: checking for pthread_create in -lc_r" >&5 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1985,7 +2176,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2024,7 +2215,7 @@ fi if test $ol_link_threads = no ; then save_LIBS="$LIBS" echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:2028: checking for pthread_create in -lpthread" >&5 +echo "configure:2219: checking for pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2032,7 +2223,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread -lmach -lexc -lc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2071,12 +2262,12 @@ fi if test $ol_link_threads != no ; then echo $ac_n "checking for sched_yield""... $ac_c" 1>&6 -echo "configure:2075: checking for sched_yield" >&5 +echo "configure:2266: checking for sched_yield" >&5 if eval "test \"`echo '$''{'ac_cv_func_sched_yield'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_sched_yield=yes" else @@ -2137,17 +2328,17 @@ if test $ol_with_threads = manual ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2141: checking for $ac_hdr" >&5 +echo "configure:2332: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2174,12 +2365,12 @@ fi done echo $ac_n "checking for sched_yield""... $ac_c" 1>&6 -echo "configure:2178: checking for sched_yield" >&5 +echo "configure:2369: checking for sched_yield" >&5 if eval "test \"`echo '$''{'ac_cv_func_sched_yield'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_sched_yield=yes" else @@ -2223,7 +2414,7 @@ fi echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 -echo "configure:2227: checking for LinuxThreads" >&5 +echo "configure:2418: checking for LinuxThreads" >&5 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2258,13 +2449,13 @@ fi ol_link_ldbm=no if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then echo $ac_n "checking for DB2 library""... $ac_c" 1>&6 -echo "configure:2262: checking for DB2 library" >&5 +echo "configure:2453: checking for DB2 library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6 -echo "configure:2268: checking for db_open in -ldb" >&5 +echo "configure:2459: checking for db_open in -ldb" >&5 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2272,7 +2463,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2314,17 +2505,17 @@ for ac_hdr in db.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2318: checking for $ac_hdr" >&5 +echo "configure:2509: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2352,13 +2543,13 @@ done if test $ac_cv_header_db_h = yes ; then echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6 -echo "configure:2356: checking if db.h is DB2" >&5 +echo "configure:2547: checking if db.h is DB2" >&5 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -2390,7 +2581,7 @@ fi echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6 -echo "configure:2394: checking for Berkeley DB2" >&5 +echo "configure:2585: checking for Berkeley DB2" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2426,18 +2617,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6 -echo "configure:2430: checking for Berkeley DB library" >&5 +echo "configure:2621: checking for Berkeley DB library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:2436: checking for dbopen" >&5 +echo "configure:2627: checking for dbopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -2479,7 +2670,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:2483: checking for dbopen in -ldb" >&5 +echo "configure:2674: checking for dbopen in -ldb" >&5 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2487,7 +2678,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2533,17 +2724,17 @@ for ac_hdr in db_185.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2537: checking for $ac_hdr" >&5 +echo "configure:2728: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2579,7 +2770,7 @@ fi echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6 -echo "configure:2583: checking for Berkeley DB" >&5 +echo "configure:2774: checking for Berkeley DB" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2624,17 +2815,17 @@ if test $ol_with_ldbm_api = manual ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2628: checking for $ac_hdr" >&5 +echo "configure:2819: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2669,18 +2860,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then echo $ac_n "checking for GDBM library""... $ac_c" 1>&6 -echo "configure:2673: checking for GDBM library" >&5 +echo "configure:2864: checking for GDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6 -echo "configure:2679: checking for gdbm_open" >&5 +echo "configure:2870: checking for gdbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gdbm_open=yes" else @@ -2722,7 +2913,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:2726: checking for gdbm_open in -lgdbm" >&5 +echo "configure:2917: checking for gdbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2730,7 +2921,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2776,17 +2967,17 @@ echo "$ac_t""$ol_cv_lib_gdbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2780: checking for $ac_hdr" >&5 +echo "configure:2971: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2813,7 +3004,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:2817: checking for db" >&5 +echo "configure:3008: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2843,18 +3034,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = ndbm ; then echo $ac_n "checking for NDBM library""... $ac_c" 1>&6 -echo "configure:2847: checking for NDBM library" >&5 +echo "configure:3038: checking for NDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:2853: checking for dbm_open" >&5 +echo "configure:3044: checking for dbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -2896,7 +3087,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6 -echo "configure:2900: checking for dbm_open in -lndbm" >&5 +echo "configure:3091: checking for dbm_open in -lndbm" >&5 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2904,7 +3095,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lndbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2935,7 +3126,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:2939: checking for dbm_open in -ldbm" >&5 +echo "configure:3130: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2943,7 +3134,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2991,17 +3182,17 @@ echo "$ac_t""$ol_cv_lib_ndbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2995: checking for $ac_hdr" >&5 +echo "configure:3186: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3196: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3028,7 +3219,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:3032: checking for db" >&5 +echo "configure:3223: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3072,7 +3263,7 @@ fi if test $ol_enable_wrappers = yes ; then echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6 -echo "configure:3076: checking for hosts_access in -lwrap" >&5 +echo "configure:3267: checking for hosts_access in -lwrap" >&5 ac_lib_var=`echo wrap'_'hosts_access | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3080,7 +3271,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lwrap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3138,17 +3329,17 @@ for ac_hdr in termcap.h ncurses.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3142: checking for $ac_hdr" >&5 +echo "configure:3333: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3343: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3177,7 +3368,7 @@ done if test $ol_link_termcap = no ; then echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6 -echo "configure:3181: checking for tputs in -ltermcap" >&5 +echo "configure:3372: checking for tputs in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3185,7 +3376,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3225,7 +3416,7 @@ fi if test $ol_link_termcap = no ; then echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 -echo "configure:3229: checking for initscr in -lncurses" >&5 +echo "configure:3420: checking for initscr in -lncurses" >&5 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3233,7 +3424,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3282,12 +3473,12 @@ fi # FreeBSD (and others) have crypt(3) in -lcrypt if test $ol_enable_crypt != no ; then echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:3286: checking for crypt" >&5 +echo "configure:3477: checking for crypt" >&5 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -3329,7 +3520,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:3333: checking for crypt in -lcrypt" >&5 +echo "configure:3524: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3337,7 +3528,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3387,12 +3578,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3391: checking for ANSI C header files" >&5 +echo "configure:3582: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3400,7 +3591,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3417,7 +3608,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3435,7 +3626,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3456,7 +3647,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3467,7 +3658,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:3471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -3495,12 +3686,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:3499: checking for $ac_hdr that defines DIR" >&5 +echo "configure:3690: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -3508,7 +3699,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:3512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -3533,7 +3724,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:3537: checking for opendir in -ldir" >&5 +echo "configure:3728: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3541,7 +3732,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3574,7 +3765,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:3578: checking for opendir in -lx" >&5 +echo "configure:3769: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3582,7 +3773,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3616,12 +3807,12 @@ fi fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:3620: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:3811: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3637,7 +3828,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:3641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -3673,17 +3864,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3677: checking for $ac_hdr" >&5 +echo "configure:3868: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3711,12 +3902,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3715: checking for uid_t in sys/types.h" >&5 +echo "configure:3906: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3745,7 +3936,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:3749: checking type of array argument to getgroups" >&5 +echo "configure:3940: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3753,7 +3944,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -3792,7 +3983,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -3816,12 +4007,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3820: checking for mode_t" >&5 +echo "configure:4011: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3849,12 +4040,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3853: checking for off_t" >&5 +echo "configure:4044: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3882,12 +4073,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3886: checking for pid_t" >&5 +echo "configure:4077: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3915,12 +4106,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3919: checking return type of signal handlers" >&5 +echo "configure:4110: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3937,7 +4128,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3956,12 +4147,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3960: checking for size_t" >&5 +echo "configure:4151: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3989,12 +4180,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3993: checking for uid_t in sys/types.h" >&5 +echo "configure:4184: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -4023,12 +4214,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:4027: checking for st_blksize in struct stat" >&5 +echo "configure:4218: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4036,7 +4227,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:4040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -4057,12 +4248,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:4061: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:4252: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4071,7 +4262,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:4075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -4092,12 +4283,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:4096: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:4287: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4105,7 +4296,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:4109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -4127,12 +4318,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:4131: checking for working const" >&5 +echo "configure:4322: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -4203,7 +4394,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:4207: checking for 8-bit clean memcmp" >&5 +echo "configure:4398: 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 @@ -4211,7 +4402,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -4239,12 +4430,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:4243: checking return type of signal handlers" >&5 +echo "configure:4434: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4261,7 +4452,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:4265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -4280,12 +4471,12 @@ EOF echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:4284: checking for strftime" >&5 +echo "configure:4475: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -4330,7 +4521,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:4334: checking for strftime in -lintl" >&5 +echo "configure:4525: 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 @@ -4338,7 +4529,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4376,12 +4567,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:4380: checking for vprintf" >&5 +echo "configure:4571: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -4428,12 +4619,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:4432: checking for _doprnt" >&5 +echo "configure:4623: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -4481,7 +4672,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:4485: checking for wait3 that fills in rusage" >&5 +echo "configure:4676: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4489,7 +4680,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -4520,7 +4711,7 @@ main() { } } EOF -if { (eval echo configure:4524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -4549,7 +4740,6 @@ for ac_func in \ mktime \ select \ socket \ - strdup \ strerror \ strstr \ strrchr \ @@ -4561,12 +4751,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4565: checking for $ac_func" >&5 +echo "configure:4755: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4617,12 +4807,12 @@ done for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4621: checking for $ac_func" >&5 +echo "configure:4811: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4675,13 +4865,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:4679: checking declaration of sys_errlist" >&5 +echo "configure:4869: 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 < @@ -4691,7 +4881,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:4695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -4712,20 +4902,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:4716: checking existence of sys_errlist" >&5 +echo "configure:4906: 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 < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:4729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index 539574bc6d..0c1938fa64 100644 --- a/configure.in +++ b/configure.in @@ -205,6 +205,12 @@ AC_PATH_PROG(FINGER, finger, /usr/ucb/finger, $PATH:/usr/ucb) dnl ---------------------------------------------------------------- dnl Checks for libraries +AC_CHECK_FUNC(socket, :, +[ AC_CHECK_LIB(nsl, gethostname) + AC_CHECK_LIB(socket, socket) + AC_CHECK_LIB(inet, socket) +]) + ol_link_threads=no if test $ol_with_threads = auto -o $ol_with_threads = posix ; then AC_CHECK_HEADERS(pthread.h sched.h) @@ -552,7 +558,6 @@ AC_CHECK_FUNCS( \ mktime \ select \ socket \ - strdup \ strerror \ strstr \ strrchr \ diff --git a/include/portable.h.in b/include/portable.h.in index 1e1bd69d3b..b021bd61c0 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -193,6 +193,15 @@ /* Define if you have the header file. */ #undef HAVE_UNISTD_H +/* Define if you have the inet library (-linet). */ +#undef HAVE_LIBINET + +/* Define if you have the nsl library (-lnsl). */ +#undef HAVE_LIBNSL + +/* Define if you have the socket library (-lsocket). */ +#undef HAVE_LIBSOCKET + #ifdef HAVE_STDDEF_H # include #endif From c0ec19cb6999e15058db7f7c6749b27fa717cac0 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 21 Sep 1998 21:30:09 +0000 Subject: [PATCH 069/148] Add check for pthread_yield(). Verify either sched_yield() or pthread_yield() exist if using POSIX Threads. --- configure | 387 ++++++++++++++++++++++-------------------- configure.in | 15 +- include/portable.h.in | 6 + 3 files changed, 222 insertions(+), 186 deletions(-) diff --git a/configure b/configure index 2209054a59..368ec1f5e0 100755 --- a/configure +++ b/configure @@ -2261,54 +2261,68 @@ fi fi if test $ol_link_threads != no ; then - echo $ac_n "checking for sched_yield""... $ac_c" 1>&6 -echo "configure:2266: checking for sched_yield" >&5 -if eval "test \"`echo '$''{'ac_cv_func_sched_yield'+set}'`\" = set"; then + for ac_func in sched_yield pthread_yield +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2268: 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 < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char sched_yield(); +char $ac_func(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_sched_yield) || defined (__stub___sched_yield) +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -sched_yield(); +$ac_func(); #endif ; return 0; } EOF -if { (eval echo configure:2294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* - eval "ac_cv_func_sched_yield=yes" + eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_sched_yield=no" + eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_func_'sched_yield`\" = yes"; then +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 - : + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 fi +done + + if test $ac_cv_func_sched_yield = no -a \ + $ac_cv_func_pthread_yield = no ; then + + echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2 + { echo "configure: error: POSIX Threads are not usable" 1>&2; exit 1; } + fi else { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; } fi @@ -2328,17 +2342,17 @@ if test $ol_with_threads = manual ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2332: checking for $ac_hdr" >&5 +echo "configure:2346: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2364,57 +2378,64 @@ else fi done - echo $ac_n "checking for sched_yield""... $ac_c" 1>&6 -echo "configure:2369: checking for sched_yield" >&5 -if eval "test \"`echo '$''{'ac_cv_func_sched_yield'+set}'`\" = set"; then + for ac_func in sched_yield pthread_yield +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2385: 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 < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char sched_yield(); +char $ac_func(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_sched_yield) || defined (__stub___sched_yield) +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -sched_yield(); +$ac_func(); #endif ; return 0; } EOF -if { (eval echo configure:2397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* - eval "ac_cv_func_sched_yield=yes" + eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_sched_yield=no" + eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_func_'sched_yield`\" = yes"; then +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 - : + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 fi +done echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 -echo "configure:2418: checking for LinuxThreads" >&5 +echo "configure:2439: checking for LinuxThreads" >&5 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2449,13 +2470,13 @@ fi ol_link_ldbm=no if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then echo $ac_n "checking for DB2 library""... $ac_c" 1>&6 -echo "configure:2453: checking for DB2 library" >&5 +echo "configure:2474: checking for DB2 library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6 -echo "configure:2459: checking for db_open in -ldb" >&5 +echo "configure:2480: checking for db_open in -ldb" >&5 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2463,7 +2484,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2505,17 +2526,17 @@ for ac_hdr in db.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2509: checking for $ac_hdr" >&5 +echo "configure:2530: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2543,13 +2564,13 @@ done if test $ac_cv_header_db_h = yes ; then echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6 -echo "configure:2547: checking if db.h is DB2" >&5 +echo "configure:2568: checking if db.h is DB2" >&5 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -2581,7 +2602,7 @@ fi echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6 -echo "configure:2585: checking for Berkeley DB2" >&5 +echo "configure:2606: checking for Berkeley DB2" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2617,18 +2638,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6 -echo "configure:2621: checking for Berkeley DB library" >&5 +echo "configure:2642: checking for Berkeley DB library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:2627: checking for dbopen" >&5 +echo "configure:2648: checking for dbopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -2670,7 +2691,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:2674: checking for dbopen in -ldb" >&5 +echo "configure:2695: checking for dbopen in -ldb" >&5 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2678,7 +2699,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2724,17 +2745,17 @@ for ac_hdr in db_185.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2728: checking for $ac_hdr" >&5 +echo "configure:2749: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2759: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2770,7 +2791,7 @@ fi echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6 -echo "configure:2774: checking for Berkeley DB" >&5 +echo "configure:2795: checking for Berkeley DB" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2815,17 +2836,17 @@ if test $ol_with_ldbm_api = manual ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2819: checking for $ac_hdr" >&5 +echo "configure:2840: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2860,18 +2881,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then echo $ac_n "checking for GDBM library""... $ac_c" 1>&6 -echo "configure:2864: checking for GDBM library" >&5 +echo "configure:2885: checking for GDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6 -echo "configure:2870: checking for gdbm_open" >&5 +echo "configure:2891: checking for gdbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gdbm_open=yes" else @@ -2913,7 +2934,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:2917: checking for gdbm_open in -lgdbm" >&5 +echo "configure:2938: checking for gdbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2921,7 +2942,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2967,17 +2988,17 @@ echo "$ac_t""$ol_cv_lib_gdbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2971: checking for $ac_hdr" >&5 +echo "configure:2992: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3004,7 +3025,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:3008: checking for db" >&5 +echo "configure:3029: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3034,18 +3055,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = ndbm ; then echo $ac_n "checking for NDBM library""... $ac_c" 1>&6 -echo "configure:3038: checking for NDBM library" >&5 +echo "configure:3059: checking for NDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:3044: checking for dbm_open" >&5 +echo "configure:3065: checking for dbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -3087,7 +3108,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6 -echo "configure:3091: checking for dbm_open in -lndbm" >&5 +echo "configure:3112: checking for dbm_open in -lndbm" >&5 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3095,7 +3116,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lndbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3126,7 +3147,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:3130: checking for dbm_open in -ldbm" >&5 +echo "configure:3151: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3134,7 +3155,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3182,17 +3203,17 @@ echo "$ac_t""$ol_cv_lib_ndbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3186: checking for $ac_hdr" >&5 +echo "configure:3207: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3196: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3219,7 +3240,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:3223: checking for db" >&5 +echo "configure:3244: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3263,7 +3284,7 @@ fi if test $ol_enable_wrappers = yes ; then echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6 -echo "configure:3267: checking for hosts_access in -lwrap" >&5 +echo "configure:3288: checking for hosts_access in -lwrap" >&5 ac_lib_var=`echo wrap'_'hosts_access | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3271,7 +3292,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lwrap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3329,17 +3350,17 @@ for ac_hdr in termcap.h ncurses.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3333: checking for $ac_hdr" >&5 +echo "configure:3354: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3343: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3368,7 +3389,7 @@ done if test $ol_link_termcap = no ; then echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6 -echo "configure:3372: checking for tputs in -ltermcap" >&5 +echo "configure:3393: checking for tputs in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3376,7 +3397,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3416,7 +3437,7 @@ fi if test $ol_link_termcap = no ; then echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 -echo "configure:3420: checking for initscr in -lncurses" >&5 +echo "configure:3441: checking for initscr in -lncurses" >&5 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3424,7 +3445,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3473,12 +3494,12 @@ fi # FreeBSD (and others) have crypt(3) in -lcrypt if test $ol_enable_crypt != no ; then echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:3477: checking for crypt" >&5 +echo "configure:3498: checking for crypt" >&5 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -3520,7 +3541,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:3524: checking for crypt in -lcrypt" >&5 +echo "configure:3545: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3528,7 +3549,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3578,12 +3599,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3582: checking for ANSI C header files" >&5 +echo "configure:3603: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3591,7 +3612,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3608,7 +3629,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3626,7 +3647,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3647,7 +3668,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3658,7 +3679,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:3662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -3686,12 +3707,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:3690: checking for $ac_hdr that defines DIR" >&5 +echo "configure:3711: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -3699,7 +3720,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:3703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -3724,7 +3745,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:3728: checking for opendir in -ldir" >&5 +echo "configure:3749: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3732,7 +3753,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3765,7 +3786,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:3769: checking for opendir in -lx" >&5 +echo "configure:3790: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3773,7 +3794,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3807,12 +3828,12 @@ fi fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:3811: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:3832: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3828,7 +3849,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:3832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -3864,17 +3885,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3868: checking for $ac_hdr" >&5 +echo "configure:3889: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3902,12 +3923,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3906: checking for uid_t in sys/types.h" >&5 +echo "configure:3927: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3936,7 +3957,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:3940: checking type of array argument to getgroups" >&5 +echo "configure:3961: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3944,7 +3965,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -3983,7 +4004,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -4007,12 +4028,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:4011: checking for mode_t" >&5 +echo "configure:4032: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4040,12 +4061,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:4044: checking for off_t" >&5 +echo "configure:4065: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4073,12 +4094,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:4077: checking for pid_t" >&5 +echo "configure:4098: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4106,12 +4127,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:4110: checking return type of signal handlers" >&5 +echo "configure:4131: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4128,7 +4149,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:4132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -4147,12 +4168,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:4151: checking for size_t" >&5 +echo "configure:4172: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4180,12 +4201,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:4184: checking for uid_t in sys/types.h" >&5 +echo "configure:4205: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -4214,12 +4235,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:4218: checking for st_blksize in struct stat" >&5 +echo "configure:4239: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4227,7 +4248,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:4231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -4248,12 +4269,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:4252: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:4273: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4262,7 +4283,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:4266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -4283,12 +4304,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:4287: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:4308: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4296,7 +4317,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:4300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -4318,12 +4339,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:4322: checking for working const" >&5 +echo "configure:4343: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -4394,7 +4415,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:4398: checking for 8-bit clean memcmp" >&5 +echo "configure:4419: 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 @@ -4402,7 +4423,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -4430,12 +4451,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:4434: checking return type of signal handlers" >&5 +echo "configure:4455: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4452,7 +4473,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:4456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -4471,12 +4492,12 @@ EOF echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:4475: checking for strftime" >&5 +echo "configure:4496: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -4521,7 +4542,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:4525: checking for strftime in -lintl" >&5 +echo "configure:4546: 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 @@ -4529,7 +4550,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4567,12 +4588,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:4571: checking for vprintf" >&5 +echo "configure:4592: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -4619,12 +4640,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:4623: checking for _doprnt" >&5 +echo "configure:4644: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -4672,7 +4693,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:4676: checking for wait3 that fills in rusage" >&5 +echo "configure:4697: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4680,7 +4701,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -4711,7 +4732,7 @@ main() { } } EOF -if { (eval echo configure:4715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -4751,12 +4772,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4755: checking for $ac_func" >&5 +echo "configure:4776: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4807,12 +4828,12 @@ done for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4811: checking for $ac_func" >&5 +echo "configure:4832: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4865,13 +4886,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:4869: checking declaration of sys_errlist" >&5 +echo "configure:4890: 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 < @@ -4881,7 +4902,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:4885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -4902,20 +4923,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:4906: checking existence of sys_errlist" >&5 +echo "configure:4927: 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 < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:4919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index 0c1938fa64..d544ab586d 100644 --- a/configure.in +++ b/configure.in @@ -292,8 +292,17 @@ dnl AC_DEFINE(HAVE_LINUX_THREADS,1) fi if test $ol_link_threads != no ; then - dnl All POSIX Thread (final) implementations should have sched_yield - AC_CHECK_FUNC(sched_yield) + dnl All POSIX Thread (final) implementations should have + dnl sched_yield instead of pthread yield. + dnl check for both + AC_CHECK_FUNCS(sched_yield pthread_yield) + + if test $ac_cv_func_sched_yield = no -a \ + $ac_cv_func_pthread_yield = no ; then + + AC_MSG_WARN([could not locate sched_yield() or pthread_yield()]) + AC_MSG_ERROR([POSIX Threads are not usable]) + fi else AC_MSG_ERROR([could not link with POSIX Threads]) fi @@ -311,7 +320,7 @@ if test $ol_with_threads = manual ; then AC_MSG_WARN([thread defines and link options must be set manually]) AC_CHECK_HEADERS(pthread.h sched.h) - AC_CHECK_FUNC(sched_yield) + AC_CHECK_FUNCS(sched_yield pthread_yield) OL_LINUX_THREADS fi diff --git a/include/portable.h.in b/include/portable.h.in index b021bd61c0..1f67768994 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -94,6 +94,12 @@ /* Define if you have the mktime function. */ #undef HAVE_MKTIME +/* Define if you have the pthread_yield function. */ +#undef HAVE_PTHREAD_YIELD + +/* Define if you have the sched_yield function. */ +#undef HAVE_SCHED_YIELD + /* Define if you have the select function. */ #undef HAVE_SELECT From 39aa70851aadb446002af65f2f233810246b210a Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 21 Sep 1998 22:35:13 +0000 Subject: [PATCH 070/148] Add additional bridge support, including detection of SYSV routines. Still needs more work. --- configure | 180 +++++++++++++++++------------------------- configure.in | 12 ++- include/bridge.h | 30 +++---- include/portable.h.in | 21 +++++ 4 files changed, 114 insertions(+), 129 deletions(-) diff --git a/configure b/configure index 368ec1f5e0..47d8f8d9b7 100755 --- a/configure +++ b/configure @@ -3872,6 +3872,7 @@ fi for ac_hdr in \ stddef.h \ fcntl.h \ + filio.h \ limits.h \ malloc.h \ sgtty.h \ @@ -3885,17 +3886,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3889: checking for $ac_hdr" >&5 +echo "configure:3890: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3923,12 +3924,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3927: checking for uid_t in sys/types.h" >&5 +echo "configure:3928: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3957,7 +3958,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:3961: checking type of array argument to getgroups" >&5 +echo "configure:3962: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3965,7 +3966,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -4004,7 +4005,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -4028,12 +4029,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:4032: checking for mode_t" >&5 +echo "configure:4033: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4061,12 +4062,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:4065: checking for off_t" >&5 +echo "configure:4066: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4094,12 +4095,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:4098: checking for pid_t" >&5 +echo "configure:4099: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4127,12 +4128,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:4131: checking return type of signal handlers" >&5 +echo "configure:4132: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4149,7 +4150,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:4153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -4168,12 +4169,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:4172: checking for size_t" >&5 +echo "configure:4173: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4201,12 +4202,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:4205: checking for uid_t in sys/types.h" >&5 +echo "configure:4206: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -4235,12 +4236,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:4239: checking for st_blksize in struct stat" >&5 +echo "configure:4240: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4248,7 +4249,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:4252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -4269,12 +4270,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:4273: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:4274: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4283,7 +4284,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:4287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -4304,12 +4305,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:4308: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:4309: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4317,7 +4318,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:4321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -4339,12 +4340,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:4343: checking for working const" >&5 +echo "configure:4344: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -4415,7 +4416,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:4419: checking for 8-bit clean memcmp" >&5 +echo "configure:4420: 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 @@ -4423,7 +4424,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -4450,54 +4451,13 @@ fi echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" -echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:4455: checking return type of signal handlers" >&5 -if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -#ifdef signal -#undef signal -#endif -#ifdef __cplusplus -extern "C" void (*signal (int, void (*)(int)))(int); -#else -void (*signal ()) (); -#endif - -int main() { -int i; -; return 0; } -EOF -if { (eval echo configure:4477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_type_signal=void -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_type_signal=int -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_type_signal" 1>&6 -cat >> confdefs.h <&6 -echo "configure:4496: checking for strftime" >&5 +echo "configure:4456: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -4542,7 +4502,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:4546: checking for strftime in -lintl" >&5 +echo "configure:4506: 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 @@ -4550,7 +4510,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4588,12 +4548,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:4592: checking for vprintf" >&5 +echo "configure:4552: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -4640,12 +4600,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:4644: checking for _doprnt" >&5 +echo "configure:4604: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -4693,7 +4653,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:4697: checking for wait3 that fills in rusage" >&5 +echo "configure:4657: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4701,7 +4661,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -4732,7 +4692,7 @@ main() { } } EOF -if { (eval echo configure:4736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -4758,26 +4718,32 @@ fi for ac_func in \ gethostname \ gettimeofday \ + getdtablesize \ + memcpy \ mktime \ select \ + setpwfile \ + setsid \ + signal \ + sigset \ socket \ strerror \ strstr \ strrchr \ + strsep \ strtod \ strtol \ strtoul \ - strsep \ - memcpy \ + sysconf \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4776: checking for $ac_func" >&5 +echo "configure:4742: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4828,12 +4794,12 @@ done for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4832: checking for $ac_func" >&5 +echo "configure:4798: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4886,13 +4852,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:4890: checking declaration of sys_errlist" >&5 +echo "configure:4856: 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 < @@ -4902,7 +4868,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:4906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -4923,20 +4889,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:4927: checking existence of sys_errlist" >&5 +echo "configure:4893: 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 < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:4940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index d544ab586d..35cf681352 100644 --- a/configure.in +++ b/configure.in @@ -526,6 +526,7 @@ AC_HEADER_SYS_WAIT AC_CHECK_HEADERS( \ stddef.h \ fcntl.h \ + filio.h \ limits.h \ malloc.h \ sgtty.h \ @@ -556,7 +557,6 @@ AC_C_CONST dnl ---------------------------------------------------------------- dnl Checks for library functions. AC_FUNC_MEMCMP -AC_TYPE_SIGNAL AC_FUNC_STRFTIME AC_FUNC_VPRINTF AC_FUNC_WAIT3 @@ -564,17 +564,23 @@ AC_FUNC_WAIT3 AC_CHECK_FUNCS( \ gethostname \ gettimeofday \ + getdtablesize \ + memcpy \ mktime \ select \ + setpwfile \ + setsid \ + signal \ + sigset \ socket \ strerror \ strstr \ strrchr \ + strsep \ strtod \ strtol \ strtoul \ - strsep \ - memcpy \ + sysconf \ ) AC_REPLACE_FUNCS(strdup) diff --git a/include/bridge.h b/include/bridge.h index c7c4a29a42..975bce3bfd 100644 --- a/include/bridge.h +++ b/include/bridge.h @@ -28,13 +28,12 @@ #if defined( hpux ) || defined( sunos5 ) || defined ( sgi ) || defined( SVR4 ) #define SYSV #endif -#endif /* * under System V, use sysconf() instead of getdtablesize */ -#if !defined( USE_SYSCONF ) && defined( SYSV ) +#if defined( HAVE_SYSCONF ) && !defined( HAVE_GETDTABLESIZE ) #define USE_SYSCONF #endif @@ -43,7 +42,7 @@ * under System V, daemons should use setsid() instead of detaching from their * tty themselves */ -#if !defined( USE_SETSID ) && defined( SYSV ) +#if defined( HAVE_SETSID ) #define USE_SETSID #endif @@ -51,21 +50,21 @@ /* * System V has socket options in filio.h */ -#if !defined( NEED_FILIO ) && defined( SYSV ) && !defined( hpux ) +#if defined( HAVE_FILIO_H ) #define NEED_FILIO #endif /* * use lockf() under System V */ -#if !defined( USE_LOCKF ) && ( defined( SYSV ) || defined( aix )) +#if !defined( HAVE_LOCKF ) && !defined( HAVE_FLOCK ) #define USE_LOCKF #endif /* * on most systems, we should use waitpid() instead of waitN() */ -#if !defined( USE_WAITPID ) && !defined( nextstep ) +#if defined( HAVE_WAITPID ) && !defined( nextstep ) #define USE_WAITPID #endif @@ -73,7 +72,7 @@ /* * define the wait status argument type */ -#if ( defined( SunOS ) && SunOS < 40 ) || defined( nextstep ) +#if !defined( HAVE_SYS_WAIT_H ) #define WAITSTATUSTYPE union wait #else #define WAITSTATUSTYPE int @@ -99,24 +98,17 @@ #endif -/* - * some systems don't have the BSD re_comp and re_exec routines - */ -#ifndef NEED_BSDREGEX -#if defined( SYSV ) || defined( VMS ) || defined( netbsd ) || defined( freebsd ) || defined( linux ) -#define NEED_BSDREGEX -#endif -#endif - /* * many systems do not have the setpwfile() library routine... we just * enable use for those systems we know have it. */ +#ifdef NOTDEF #ifndef HAVE_SETPWFILE -#if defined( sunos4 ) || defined( ultrix ) || defined( __osf__ ) +if defined( sunos4 ) || defined( ultrix ) || defined( __osf__ ) #define HAVE_SETPWFILE #endif #endif +#endif NOTDEF /* * Are sys_errlist and sys_nerr declared in stdio.h? @@ -172,7 +164,7 @@ * call signal or sigset (signal does not block the signal while * in the handler on sys v and sigset does not exist on bsd) */ -#if defined(SYSV) && !defined(linux) +#ifdef HAVE_SIGSET #define SIGNAL sigset #else #define SIGNAL signal @@ -192,7 +184,7 @@ /* * put a cover on the tty-related ioctl calls we need to use */ -#if defined( NeXT ) || (defined(SunOS) && SunOS < 40) +#if !defined( HAVE_TERMIOS ) #define TERMIO_TYPE struct sgttyb #define TERMFLAG_TYPE int #define GETATTR( fd, tiop ) ioctl((fd), TIOCGETP, (caddr_t)(tiop)) diff --git a/include/portable.h.in b/include/portable.h.in index 1f67768994..5a63372999 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -82,6 +82,9 @@ /* define this for phonetic support */ #undef SLAPD_PHONETIC +/* Define if you have the getdtablesize function. */ +#undef HAVE_GETDTABLESIZE + /* Define if you have the gethostname function. */ #undef HAVE_GETHOSTNAME @@ -103,6 +106,18 @@ /* Define if you have the select function. */ #undef HAVE_SELECT +/* Define if you have the setpwfile function. */ +#undef HAVE_SETPWFILE + +/* Define if you have the setsid function. */ +#undef HAVE_SETSID + +/* Define if you have the signal function. */ +#undef HAVE_SIGNAL + +/* Define if you have the sigset function. */ +#undef HAVE_SIGSET + /* Define if you have the socket function. */ #undef HAVE_SOCKET @@ -130,6 +145,9 @@ /* Define if you have the strtoul function. */ #undef HAVE_STRTOUL +/* Define if you have the sysconf function. */ +#undef HAVE_SYSCONF + /* Define if you have the header file. */ #undef HAVE_DB_H @@ -142,6 +160,9 @@ /* Define if you have the header file. */ #undef HAVE_FCNTL_H +/* Define if you have the header file. */ +#undef HAVE_FILIO_H + /* Define if you have the header file. */ #undef HAVE_GDBM_H From f32239e8239706d5135c6b7f2301b7efb2feff40 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 21 Sep 1998 23:15:58 +0000 Subject: [PATCH 071/148] Added more tests and fixed mismatched ifdefs. --- configure | 1 + include/bridge.h | 32 +++++++++++++++----------------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/configure b/configure index 47d8f8d9b7..fa05114192 100755 --- a/configure +++ b/configure @@ -4724,6 +4724,7 @@ for ac_func in \ select \ setpwfile \ setsid \ + sigaction \ signal \ sigset \ socket \ diff --git a/include/bridge.h b/include/bridge.h index 975bce3bfd..fe7a9e4805 100644 --- a/include/bridge.h +++ b/include/bridge.h @@ -26,7 +26,8 @@ #ifndef SYSV #if defined( hpux ) || defined( sunos5 ) || defined ( sgi ) || defined( SVR4 ) -#define SYSV +# define SYSV +#endif #endif @@ -72,30 +73,36 @@ /* * define the wait status argument type */ +#if !defined( WAITSTATUSTYPE ) #if !defined( HAVE_SYS_WAIT_H ) #define WAITSTATUSTYPE union wait #else #define WAITSTATUSTYPE int #endif +#endif /* * define the flags for wait */ +#if !defined( WAIT_FLAGS ) #ifdef sunos5 #define WAIT_FLAGS ( WNOHANG | WUNTRACED | WCONTINUED ) #else #define WAIT_FLAGS ( WNOHANG | WUNTRACED ) #endif +#endif /* * defined the options for openlog (syslog) */ +#if !defined( OPENLOG_OPTIONS ) #ifdef ultrix #define OPENLOG_OPTIONS LOG_PID #else #define OPENLOG_OPTIONS ( LOG_PID | LOG_NOWAIT ) #endif +#endif /* @@ -104,7 +111,7 @@ */ #ifdef NOTDEF #ifndef HAVE_SETPWFILE -if defined( sunos4 ) || defined( ultrix ) || defined( __osf__ ) +#if defined( sunos4 ) || defined( ultrix ) || defined( __osf__ ) #define HAVE_SETPWFILE #endif #endif @@ -144,31 +151,22 @@ if defined( sunos4 ) || defined( ultrix ) || defined( __osf__ ) /* * for signal() -- what do signal handling functions return? */ -#ifndef SIG_FN -#ifdef sunos5 -# define SIG_FN void /* signal-catching functions return void */ -#else /* sunos5 */ -# ifdef BSD -# if (BSD >= 199006) || defined(NeXT) || defined(__osf__) || defined(sun) || defined(ultrix) || defined(apollo) || defined(POSIX_SIGNALS) -# define SIG_FN void /* signal-catching functions return void */ -# else -# define SIG_FN int /* signal-catching functions return int */ -# endif -# else /* BSD */ -# define SIG_FN void /* signal-catching functions return void */ -# endif /* BSD */ -#endif /* sunos5 */ -#endif /* SIG_FN */ +#ifdef RETSIGTYPE +#define SIG_FN RETSIGTYPE +#endif + /* * call signal or sigset (signal does not block the signal while * in the handler on sys v and sigset does not exist on bsd) */ +#ifndef SIGNAL #ifdef HAVE_SIGSET #define SIGNAL sigset #else #define SIGNAL signal #endif +#endif /* * toupper and tolower macros are different under bsd and sys v From bad86cb484e834238e91515a5c7502ab97010ffd Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 21 Sep 1998 23:34:32 +0000 Subject: [PATCH 072/148] Fix test for sched_yield/pthread_yield(), needed $LTHREAD_LIBS added to $LIBS. --- configure | 326 ++++++++++++++++++++++++++------------------------- configure.in | 3 + 2 files changed, 167 insertions(+), 162 deletions(-) diff --git a/configure b/configure index fa05114192..2dc6c63af0 100755 --- a/configure +++ b/configure @@ -2261,15 +2261,17 @@ fi fi if test $ol_link_threads != no ; then - for ac_func in sched_yield pthread_yield + save_LIBS="$LIBS" + LIBS="$LTHREAD_LIBS $LIBS" + for ac_func in sched_yield pthread_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2268: checking for $ac_func" >&5 +echo "configure:2270: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2316,6 +2318,7 @@ else fi done + LIBS="$save_LIBS" if test $ac_cv_func_sched_yield = no -a \ $ac_cv_func_pthread_yield = no ; then @@ -2342,17 +2345,17 @@ if test $ol_with_threads = manual ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2346: checking for $ac_hdr" >&5 +echo "configure:2349: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2381,12 +2384,12 @@ done for ac_func in sched_yield pthread_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2385: checking for $ac_func" >&5 +echo "configure:2388: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2435,7 +2438,7 @@ done echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 -echo "configure:2439: checking for LinuxThreads" >&5 +echo "configure:2442: checking for LinuxThreads" >&5 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2470,13 +2473,13 @@ fi ol_link_ldbm=no if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then echo $ac_n "checking for DB2 library""... $ac_c" 1>&6 -echo "configure:2474: checking for DB2 library" >&5 +echo "configure:2477: checking for DB2 library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6 -echo "configure:2480: checking for db_open in -ldb" >&5 +echo "configure:2483: checking for db_open in -ldb" >&5 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2484,7 +2487,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2526,17 +2529,17 @@ for ac_hdr in db.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2530: checking for $ac_hdr" >&5 +echo "configure:2533: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2564,13 +2567,13 @@ done if test $ac_cv_header_db_h = yes ; then echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6 -echo "configure:2568: checking if db.h is DB2" >&5 +echo "configure:2571: checking if db.h is DB2" >&5 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -2602,7 +2605,7 @@ fi echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6 -echo "configure:2606: checking for Berkeley DB2" >&5 +echo "configure:2609: checking for Berkeley DB2" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2638,18 +2641,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6 -echo "configure:2642: checking for Berkeley DB library" >&5 +echo "configure:2645: checking for Berkeley DB library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:2648: checking for dbopen" >&5 +echo "configure:2651: checking for dbopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -2691,7 +2694,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:2695: checking for dbopen in -ldb" >&5 +echo "configure:2698: checking for dbopen in -ldb" >&5 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2699,7 +2702,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2745,17 +2748,17 @@ for ac_hdr in db_185.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2749: checking for $ac_hdr" >&5 +echo "configure:2752: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2759: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2791,7 +2794,7 @@ fi echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6 -echo "configure:2795: checking for Berkeley DB" >&5 +echo "configure:2798: checking for Berkeley DB" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2836,17 +2839,17 @@ if test $ol_with_ldbm_api = manual ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2840: checking for $ac_hdr" >&5 +echo "configure:2843: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2881,18 +2884,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then echo $ac_n "checking for GDBM library""... $ac_c" 1>&6 -echo "configure:2885: checking for GDBM library" >&5 +echo "configure:2888: checking for GDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6 -echo "configure:2891: checking for gdbm_open" >&5 +echo "configure:2894: checking for gdbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gdbm_open=yes" else @@ -2934,7 +2937,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:2938: checking for gdbm_open in -lgdbm" >&5 +echo "configure:2941: checking for gdbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2942,7 +2945,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2988,17 +2991,17 @@ echo "$ac_t""$ol_cv_lib_gdbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2992: checking for $ac_hdr" >&5 +echo "configure:2995: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3025,7 +3028,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:3029: checking for db" >&5 +echo "configure:3032: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3055,18 +3058,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = ndbm ; then echo $ac_n "checking for NDBM library""... $ac_c" 1>&6 -echo "configure:3059: checking for NDBM library" >&5 +echo "configure:3062: checking for NDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:3065: checking for dbm_open" >&5 +echo "configure:3068: checking for dbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -3108,7 +3111,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6 -echo "configure:3112: checking for dbm_open in -lndbm" >&5 +echo "configure:3115: checking for dbm_open in -lndbm" >&5 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3116,7 +3119,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lndbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3147,7 +3150,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:3151: checking for dbm_open in -ldbm" >&5 +echo "configure:3154: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3155,7 +3158,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3203,17 +3206,17 @@ echo "$ac_t""$ol_cv_lib_ndbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3207: checking for $ac_hdr" >&5 +echo "configure:3210: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3240,7 +3243,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:3244: checking for db" >&5 +echo "configure:3247: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3284,7 +3287,7 @@ fi if test $ol_enable_wrappers = yes ; then echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6 -echo "configure:3288: checking for hosts_access in -lwrap" >&5 +echo "configure:3291: checking for hosts_access in -lwrap" >&5 ac_lib_var=`echo wrap'_'hosts_access | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3292,7 +3295,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lwrap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3350,17 +3353,17 @@ for ac_hdr in termcap.h ncurses.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3354: checking for $ac_hdr" >&5 +echo "configure:3357: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3389,7 +3392,7 @@ done if test $ol_link_termcap = no ; then echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6 -echo "configure:3393: checking for tputs in -ltermcap" >&5 +echo "configure:3396: checking for tputs in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3397,7 +3400,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3437,7 +3440,7 @@ fi if test $ol_link_termcap = no ; then echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 -echo "configure:3441: checking for initscr in -lncurses" >&5 +echo "configure:3444: checking for initscr in -lncurses" >&5 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3445,7 +3448,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3494,12 +3497,12 @@ fi # FreeBSD (and others) have crypt(3) in -lcrypt if test $ol_enable_crypt != no ; then echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:3498: checking for crypt" >&5 +echo "configure:3501: checking for crypt" >&5 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -3541,7 +3544,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:3545: checking for crypt in -lcrypt" >&5 +echo "configure:3548: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3549,7 +3552,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3599,12 +3602,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3603: checking for ANSI C header files" >&5 +echo "configure:3606: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3612,7 +3615,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3629,7 +3632,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3647,7 +3650,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3668,7 +3671,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3679,7 +3682,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:3683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -3707,12 +3710,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:3711: checking for $ac_hdr that defines DIR" >&5 +echo "configure:3714: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -3720,7 +3723,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:3724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -3745,7 +3748,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:3749: checking for opendir in -ldir" >&5 +echo "configure:3752: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3753,7 +3756,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3786,7 +3789,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:3790: checking for opendir in -lx" >&5 +echo "configure:3793: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3794,7 +3797,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3828,12 +3831,12 @@ fi fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:3832: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:3835: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3849,7 +3852,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:3853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -3886,17 +3889,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3890: checking for $ac_hdr" >&5 +echo "configure:3893: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3903: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3924,12 +3927,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3928: checking for uid_t in sys/types.h" >&5 +echo "configure:3931: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3958,7 +3961,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:3962: checking type of array argument to getgroups" >&5 +echo "configure:3965: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3966,7 +3969,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -4005,7 +4008,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -4029,12 +4032,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:4033: checking for mode_t" >&5 +echo "configure:4036: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4062,12 +4065,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:4066: checking for off_t" >&5 +echo "configure:4069: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4095,12 +4098,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:4099: checking for pid_t" >&5 +echo "configure:4102: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4128,12 +4131,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:4132: checking return type of signal handlers" >&5 +echo "configure:4135: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4150,7 +4153,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:4154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -4169,12 +4172,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:4173: checking for size_t" >&5 +echo "configure:4176: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4202,12 +4205,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:4206: checking for uid_t in sys/types.h" >&5 +echo "configure:4209: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -4236,12 +4239,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:4240: checking for st_blksize in struct stat" >&5 +echo "configure:4243: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4249,7 +4252,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:4253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -4270,12 +4273,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:4274: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:4277: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4284,7 +4287,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:4288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -4305,12 +4308,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:4309: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:4312: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4318,7 +4321,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:4322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -4340,12 +4343,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:4344: checking for working const" >&5 +echo "configure:4347: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -4416,7 +4419,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:4420: checking for 8-bit clean memcmp" >&5 +echo "configure:4423: 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 @@ -4424,7 +4427,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -4452,12 +4455,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:4456: checking for strftime" >&5 +echo "configure:4459: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -4502,7 +4505,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:4506: checking for strftime in -lintl" >&5 +echo "configure:4509: 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 @@ -4510,7 +4513,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4548,12 +4551,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:4552: checking for vprintf" >&5 +echo "configure:4555: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -4600,12 +4603,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:4604: checking for _doprnt" >&5 +echo "configure:4607: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -4653,7 +4656,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:4657: checking for wait3 that fills in rusage" >&5 +echo "configure:4660: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4661,7 +4664,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -4692,7 +4695,7 @@ main() { } } EOF -if { (eval echo configure:4696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -4724,7 +4727,6 @@ for ac_func in \ select \ setpwfile \ setsid \ - sigaction \ signal \ sigset \ socket \ @@ -4739,12 +4741,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4742: checking for $ac_func" >&5 +echo "configure:4745: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4795,12 +4797,12 @@ done for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4798: checking for $ac_func" >&5 +echo "configure:4801: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4853,13 +4855,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:4856: checking declaration of sys_errlist" >&5 +echo "configure:4859: 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 < @@ -4869,7 +4871,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:4872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -4890,20 +4892,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:4893: checking existence of sys_errlist" >&5 +echo "configure:4896: 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 < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:4906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index 35cf681352..7cf772181d 100644 --- a/configure.in +++ b/configure.in @@ -295,7 +295,10 @@ dnl AC_DEFINE(HAVE_LINUX_THREADS,1) dnl All POSIX Thread (final) implementations should have dnl sched_yield instead of pthread yield. dnl check for both + save_LIBS="$LIBS" + LIBS="$LTHREAD_LIBS $LIBS" AC_CHECK_FUNCS(sched_yield pthread_yield) + LIBS="$save_LIBS" if test $ac_cv_func_sched_yield = no -a \ $ac_cv_func_pthread_yield = no ; then From e27fd5e0d942428aded2383770270445c164828d Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 22 Sep 1998 00:09:33 +0000 Subject: [PATCH 073/148] Update lockf/flock detection and bridge handling. --- configure | 26 ++++++++++++++------------ configure.in | 2 ++ include/portable.h.in | 6 ++++++ 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/configure b/configure index 2dc6c63af0..6a0e5859cd 100755 --- a/configure +++ b/configure @@ -4719,9 +4719,11 @@ fi for ac_func in \ + flock \ gethostname \ gettimeofday \ getdtablesize \ + lockf \ memcpy \ mktime \ select \ @@ -4741,12 +4743,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4745: checking for $ac_func" >&5 +echo "configure:4747: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4797,12 +4799,12 @@ done for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4801: checking for $ac_func" >&5 +echo "configure:4803: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4855,13 +4857,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:4859: checking declaration of sys_errlist" >&5 +echo "configure:4861: 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 < @@ -4871,7 +4873,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:4875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -4892,20 +4894,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:4896: checking existence of sys_errlist" >&5 +echo "configure:4898: 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 < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:4909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index 7cf772181d..9727ea97c3 100644 --- a/configure.in +++ b/configure.in @@ -565,9 +565,11 @@ AC_FUNC_VPRINTF AC_FUNC_WAIT3 AC_CHECK_FUNCS( \ + flock \ gethostname \ gettimeofday \ getdtablesize \ + lockf \ memcpy \ mktime \ select \ diff --git a/include/portable.h.in b/include/portable.h.in index 5a63372999..4dbf2c4f26 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -82,6 +82,9 @@ /* define this for phonetic support */ #undef SLAPD_PHONETIC +/* Define if you have the flock function. */ +#undef HAVE_FLOCK + /* Define if you have the getdtablesize function. */ #undef HAVE_GETDTABLESIZE @@ -91,6 +94,9 @@ /* Define if you have the gettimeofday function. */ #undef HAVE_GETTIMEOFDAY +/* Define if you have the lockf function. */ +#undef HAVE_LOCKF + /* Define if you have the memcpy function. */ #undef HAVE_MEMCPY From 4662b7d12478b565b12b16604deb996ed61674e7 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 22 Sep 1998 02:25:42 +0000 Subject: [PATCH 074/148] Cleanup config.status and Makefile:Makefile.in dependency rules Add basics of Kerberos detection. --- Makefile.in | 14 +- build/dir.mk | 2 + build/info.mk | 1 + build/lib.mk | 2 + build/man.mk | 2 + build/rules.mk | 2 + build/srv.mk | 2 + build/top.mk | 10 +- configure | 648 +++++++++++++++++++++++++++--------------- configure.in | 51 +++- include/portable.h.in | 12 + 11 files changed, 497 insertions(+), 249 deletions(-) diff --git a/Makefile.in b/Makefile.in index 8f4109902b..adb827bd1f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -9,19 +9,23 @@ INSTALLDIRS= doc makefiles: FORCE ./config.status -configure: configure.in aclocal.m4 - autoconf +${srcdir}/configure: configure.in aclocal.m4 + cd ${srcdir} && autoconf -# autoheader might not change config.h.in, so touch a stamp file +# autoheader might not change portable.h.in, so touch a stamp file ${srcdir}/include/portable.h.in: stamp-h.in -${srcdir}/stamp-h.in: configure.in aclocal.m4 acconfig.h +${srcdir}/stamp-h.in: configure.in aclocal.m4 acconfig.h \ + ${srcdir}/include/portable.h.top ${srcdir}/include/portable.h.bot cd ${srcdir} && autoheader @echo timestamp > ${srcdir}/stamp-h.in -config.h: stamp-h +./include/portable.h: stamp-h stamp-h: config.h.in config.status ./config.status +Makefile: Makefile.in config.status + ./config.status + config.status: configure ./config.status --recheck diff --git a/build/dir.mk b/build/dir.mk index 3a0dde4d9f..659f6d18d7 100644 --- a/build/dir.mk +++ b/build/dir.mk @@ -43,3 +43,5 @@ depend-common: depend-local FORCE ( cd $$i; $(MAKE) $(MFLAGS) depend ); \ echo " "; \ done + +Makefile: $(top_srcdir)/build/dir.mk diff --git a/build/info.mk b/build/info.mk index 10e85e765f..17c77375d5 100644 --- a/build/info.mk +++ b/build/info.mk @@ -3,3 +3,4 @@ ## Makefile Template for Non-Source Directories ## +Makefile: $(top_srcdir)/build/info.mk diff --git a/build/lib.mk b/build/lib.mk index 4526fcf552..b96c162cf6 100644 --- a/build/lib.mk +++ b/build/lib.mk @@ -38,3 +38,5 @@ veryclean-common: veryclean-local clean-common lint-local: FORCE lint5-local: FORCE + +Makefile: $(top_srcdir)/build/lib.mk diff --git a/build/man.mk b/build/man.mk index 2b616b4c2d..ee6e277dcd 100644 --- a/build/man.mk +++ b/build/man.mk @@ -41,3 +41,5 @@ lint5: lint5-local # these could be empty lint-local: FORCE lint5-local: FORCE + +Makefile: $(top_srcdir)/build/lib.mk diff --git a/build/rules.mk b/build/rules.mk index 0137b28999..aaf164799d 100644 --- a/build/rules.mk +++ b/build/rules.mk @@ -24,3 +24,5 @@ lint5: lint5-local # these could be empty lint-local: FORCE lint5-local: FORCE + +Makefile: $(top_srcdir)/build/rules.mk diff --git a/build/srv.mk b/build/srv.mk index f93539b719..7bef5bebf4 100644 --- a/build/srv.mk +++ b/build/srv.mk @@ -69,3 +69,5 @@ depend-srv: depend-local $(MKDEP) $(DEFS) $(DEFINES) $(SRCS) veryclean-srv: clean-srv veryclean-local + +Makefile: $(top_srcdir)/build/srv.mk diff --git a/build/top.mk b/build/top.mk index 4d16d1778b..ef83f22680 100644 --- a/build/top.mk +++ b/build/top.mk @@ -73,6 +73,8 @@ AC_LIBS = @LDFLAGS@ @LIBS@ AC_CFLAGS = @CFLAGS@ AC_LDFLAGS = +KRB_DEFS = @KRB_DEFS@ +KRB_LIBS = @KRB_LIBS@ TERMCAP_DEFS = @TERMCAP_DEFS@ TERMCAP_LIBS = @TERMCAP_LIBS@ @@ -99,13 +101,7 @@ depend-local: lint-local: lint5-local: -Makefile: Makefile.in ${top_srcdir}/config.status - @if test "$(top_srcdir)" = "$(srcdir)" ; then ; \ - ./config.status ; \ - else ; \ - echo "Makefile out of date, run config.status from $top_srcdir" ; \ - exit 1 ; \ - fi +Makefile: Makefile.in $(top_srcdir)/build/top.mk # empty rule for forcing rules FORCE: diff --git a/configure b/configure index 6a0e5859cd..0d62fb28f0 100755 --- a/configure +++ b/configure @@ -1178,11 +1178,16 @@ BUILD_LDBM=no BUILD_PASSWD=no BUILD_SHELL=no +KRB_DEFS= +KRB_LIBS= +TERMCAP_DEFS= +TERMCAP_LIBS= + # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1186: checking for $ac_word" >&5 +echo "configure:1191: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1211,7 +1216,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1215: checking for $ac_word" >&5 +echo "configure:1220: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1259,7 +1264,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1263: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1268: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1269,11 +1274,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1293,12 +1298,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1297: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1302: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1302: checking whether we are using GNU C" >&5 +echo "configure:1307: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1307,7 +1312,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1322,7 +1327,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1326: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1331: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1350,7 +1355,7 @@ else fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1354: checking how to run the C preprocessor" >&5 +echo "configure:1359: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1365,13 +1370,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1380: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1382,13 +1387,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1397: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1412,13 +1417,13 @@ echo "$ac_t""$CPP" 1>&6 if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:1416: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:1421: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP @@ -1436,7 +1441,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -1459,7 +1464,7 @@ fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1463: checking whether ln -s works" >&5 +echo "configure:1468: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1490,7 +1495,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1494: checking for a BSD compatible install" >&5 +echo "configure:1499: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1542,7 +1547,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1546: checking for $ac_word" >&5 +echo "configure:1551: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1569,7 +1574,7 @@ else fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1573: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1578: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1599,7 +1604,7 @@ fi # Extract the first word of "sendmail", so it can be a program name with args. set dummy sendmail; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1603: checking for $ac_word" >&5 +echo "configure:1608: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1631,7 +1636,7 @@ fi # Extract the first word of "vi", so it can be a program name with args. set dummy vi; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1635: checking for $ac_word" >&5 +echo "configure:1640: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1663,7 +1668,7 @@ fi # Extract the first word of "finger", so it can be a program name with args. set dummy finger; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1667: checking for $ac_word" >&5 +echo "configure:1672: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1695,12 +1700,12 @@ fi echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:1699: checking for socket" >&5 +echo "configure:1704: checking for socket" >&5 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_socket=yes" else @@ -1741,7 +1746,7 @@ if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6 -echo "configure:1745: checking for gethostname in -lnsl" >&5 +echo "configure:1750: checking for gethostname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1749,7 +1754,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1788,7 +1793,7 @@ else fi echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:1792: checking for socket in -lsocket" >&5 +echo "configure:1797: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1796,7 +1801,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1835,7 +1840,7 @@ else fi echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6 -echo "configure:1839: checking for socket in -linet" >&5 +echo "configure:1844: checking for socket in -linet" >&5 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1843,7 +1848,7 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1885,23 +1890,22 @@ fi fi -ol_link_threads=no -if test $ol_with_threads = auto -o $ol_with_threads = posix ; then - for ac_hdr in pthread.h sched.h +if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then + for ac_hdr in kerberosIV/krb.h kerberosIV/des.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1895: checking for $ac_hdr" >&5 +echo "configure:1899: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1928,15 +1932,198 @@ fi done - if test "$ac_cv_header_pthread_h" = yes ; then + if test $ac_cv_header_kerberosIV_krb_h = yes ; then + echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6 +echo "configure:1938: checking for main in -lkrb4" >&5 +ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_k5=yes +else + echo "$ac_t""no" 1>&6 +have_k5=no +fi + + + if test $have_k5 = yes ; then + ol_with_kerberos=found + ol_link_kerberos=yes + + KRB_DEFS="-DKERBEROS" + KRB_LIBS="-lkrb4 -lkrb5 -ldes425" + fi + fi +fi +if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then + for ac_hdr in krb.h des.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1989: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + + if test $ac_cv_header_krb_h = yes ; then + echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6 +echo "configure:2028: checking for main in -lkrb" >&5 +ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lkrb -ldes $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_k4=yes +else + echo "$ac_t""no" 1>&6 +have_k4=no +fi + + + if test $have_k4 = yes ; then + ol_with_kerberos=found + ol_link_kerberos=yes + + KRB_DEFS="-DKERBEROS" + KRB_LIBS="-lkrb -ldes" + fi + fi +fi + + +ol_link_threads=no +if test $ol_with_threads = auto -o $ol_with_threads = posix ; then + for ac_hdr in pthread.h sched.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2082: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + + if test $ac_cv_header_pthread_h = yes ; then echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6 -echo "configure:1934: checking POSIX thread version" >&5 +echo "configure:2121: checking POSIX thread version" >&5 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -1958,7 +2145,7 @@ rm -f conftest* cat > conftest.$ac_ext < @@ -2005,7 +2192,7 @@ echo "$ac_t""$ol_cv_pthread_version" 1>&6 echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 -echo "configure:2009: checking for LinuxThreads" >&5 +echo "configure:2196: checking for LinuxThreads" >&5 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2028,12 +2215,12 @@ echo "$ac_t""$ol_cv_linux_threads" 1>&6 echo $ac_n "checking for pthread_create""... $ac_c" 1>&6 -echo "configure:2032: checking for pthread_create" >&5 +echo "configure:2219: checking for pthread_create" >&5 if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_pthread_create=yes" else @@ -2078,7 +2265,7 @@ fi if test $ol_link_threads = no ; then echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6 -echo "configure:2082: checking for pthread_create with -pthread" >&5 +echo "configure:2269: checking for pthread_create with -pthread" >&5 if eval "test \"`echo '$''{'ol_cv_pthread_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2086,7 +2273,7 @@ else save_LIBS="$LIBS" LIBS="-pthread $LIBS" cat > conftest.$ac_ext < int main() { @@ -2096,7 +2283,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_pthread_flag=yes else @@ -2121,7 +2308,7 @@ echo "$ac_t""$ol_cv_pthread_flag" 1>&6 if test $ol_link_threads = no ; then save_LIBS="$LIBS" echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:2125: checking for pthread_create in -lpthread" >&5 +echo "configure:2312: checking for pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2129,7 +2316,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2168,7 +2355,7 @@ fi if test $ol_link_threads = no ; then save_LIBS="$LIBS" echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:2172: checking for pthread_create in -lc_r" >&5 +echo "configure:2359: checking for pthread_create in -lc_r" >&5 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2176,7 +2363,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2215,7 +2402,7 @@ fi if test $ol_link_threads = no ; then save_LIBS="$LIBS" echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:2219: checking for pthread_create in -lpthread" >&5 +echo "configure:2406: checking for pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2223,7 +2410,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread -lmach -lexc -lc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2266,12 +2453,12 @@ fi for ac_func in sched_yield pthread_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2270: checking for $ac_func" >&5 +echo "configure:2457: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2345,17 +2532,17 @@ if test $ol_with_threads = manual ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2349: checking for $ac_hdr" >&5 +echo "configure:2536: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2384,12 +2571,12 @@ done for ac_func in sched_yield pthread_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2388: checking for $ac_func" >&5 +echo "configure:2575: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2438,7 +2625,7 @@ done echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 -echo "configure:2442: checking for LinuxThreads" >&5 +echo "configure:2629: checking for LinuxThreads" >&5 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2473,13 +2660,13 @@ fi ol_link_ldbm=no if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then echo $ac_n "checking for DB2 library""... $ac_c" 1>&6 -echo "configure:2477: checking for DB2 library" >&5 +echo "configure:2664: checking for DB2 library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6 -echo "configure:2483: checking for db_open in -ldb" >&5 +echo "configure:2670: checking for db_open in -ldb" >&5 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2487,7 +2674,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2529,17 +2716,17 @@ for ac_hdr in db.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2533: checking for $ac_hdr" >&5 +echo "configure:2720: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2567,13 +2754,13 @@ done if test $ac_cv_header_db_h = yes ; then echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6 -echo "configure:2571: checking if db.h is DB2" >&5 +echo "configure:2758: checking if db.h is DB2" >&5 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -2605,7 +2792,7 @@ fi echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6 -echo "configure:2609: checking for Berkeley DB2" >&5 +echo "configure:2796: checking for Berkeley DB2" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2641,18 +2828,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6 -echo "configure:2645: checking for Berkeley DB library" >&5 +echo "configure:2832: checking for Berkeley DB library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:2651: checking for dbopen" >&5 +echo "configure:2838: checking for dbopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -2694,7 +2881,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:2698: checking for dbopen in -ldb" >&5 +echo "configure:2885: checking for dbopen in -ldb" >&5 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2702,7 +2889,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2748,17 +2935,17 @@ for ac_hdr in db_185.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2752: checking for $ac_hdr" >&5 +echo "configure:2939: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2794,7 +2981,7 @@ fi echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6 -echo "configure:2798: checking for Berkeley DB" >&5 +echo "configure:2985: checking for Berkeley DB" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2839,17 +3026,17 @@ if test $ol_with_ldbm_api = manual ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2843: checking for $ac_hdr" >&5 +echo "configure:3030: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3040: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2884,18 +3071,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then echo $ac_n "checking for GDBM library""... $ac_c" 1>&6 -echo "configure:2888: checking for GDBM library" >&5 +echo "configure:3075: checking for GDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6 -echo "configure:2894: checking for gdbm_open" >&5 +echo "configure:3081: checking for gdbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gdbm_open=yes" else @@ -2937,7 +3124,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:2941: checking for gdbm_open in -lgdbm" >&5 +echo "configure:3128: checking for gdbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2945,7 +3132,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2991,17 +3178,17 @@ echo "$ac_t""$ol_cv_lib_gdbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2995: checking for $ac_hdr" >&5 +echo "configure:3182: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3192: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3028,7 +3215,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:3032: checking for db" >&5 +echo "configure:3219: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3058,18 +3245,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = ndbm ; then echo $ac_n "checking for NDBM library""... $ac_c" 1>&6 -echo "configure:3062: checking for NDBM library" >&5 +echo "configure:3249: checking for NDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:3068: checking for dbm_open" >&5 +echo "configure:3255: checking for dbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -3111,7 +3298,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6 -echo "configure:3115: checking for dbm_open in -lndbm" >&5 +echo "configure:3302: checking for dbm_open in -lndbm" >&5 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3119,7 +3306,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lndbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3150,7 +3337,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:3154: checking for dbm_open in -ldbm" >&5 +echo "configure:3341: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3158,7 +3345,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3206,17 +3393,17 @@ echo "$ac_t""$ol_cv_lib_ndbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3210: checking for $ac_hdr" >&5 +echo "configure:3397: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3407: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3243,7 +3430,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:3247: checking for db" >&5 +echo "configure:3434: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3287,7 +3474,7 @@ fi if test $ol_enable_wrappers = yes ; then echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6 -echo "configure:3291: checking for hosts_access in -lwrap" >&5 +echo "configure:3478: checking for hosts_access in -lwrap" >&5 ac_lib_var=`echo wrap'_'hosts_access | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3295,7 +3482,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lwrap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3346,24 +3533,21 @@ fi # ud needs termcap (should insert check here) ol_link_termcap=no -TERMCAP_DEFS= -TERMCAP_LIBS= - for ac_hdr in termcap.h ncurses.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3357: checking for $ac_hdr" >&5 +echo "configure:3541: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3392,7 +3576,7 @@ done if test $ol_link_termcap = no ; then echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6 -echo "configure:3396: checking for tputs in -ltermcap" >&5 +echo "configure:3580: checking for tputs in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3400,7 +3584,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3440,7 +3624,7 @@ fi if test $ol_link_termcap = no ; then echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 -echo "configure:3444: checking for initscr in -lncurses" >&5 +echo "configure:3628: checking for initscr in -lncurses" >&5 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3448,7 +3632,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3491,18 +3675,15 @@ if test $ol_link_termcap = no ; then TERMCAP_LIBS= fi - - - # FreeBSD (and others) have crypt(3) in -lcrypt if test $ol_enable_crypt != no ; then echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:3501: checking for crypt" >&5 +echo "configure:3682: checking for crypt" >&5 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -3544,7 +3725,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:3548: checking for crypt in -lcrypt" >&5 +echo "configure:3729: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3552,7 +3733,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3602,12 +3783,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3606: checking for ANSI C header files" >&5 +echo "configure:3787: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3615,7 +3796,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3632,7 +3813,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3650,7 +3831,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3671,7 +3852,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3682,7 +3863,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:3686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -3710,12 +3891,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:3714: checking for $ac_hdr that defines DIR" >&5 +echo "configure:3895: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -3723,7 +3904,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:3727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -3748,7 +3929,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:3752: checking for opendir in -ldir" >&5 +echo "configure:3933: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3756,7 +3937,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3789,7 +3970,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:3793: checking for opendir in -lx" >&5 +echo "configure:3974: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3797,7 +3978,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3831,12 +4012,12 @@ fi fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:3835: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:4016: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3852,7 +4033,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:3856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -3889,17 +4070,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3893: checking for $ac_hdr" >&5 +echo "configure:4074: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3903: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4084: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3927,12 +4108,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3931: checking for uid_t in sys/types.h" >&5 +echo "configure:4112: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3961,7 +4142,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:3965: checking type of array argument to getgroups" >&5 +echo "configure:4146: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3969,7 +4150,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -4008,7 +4189,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -4032,12 +4213,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:4036: checking for mode_t" >&5 +echo "configure:4217: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4065,12 +4246,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:4069: checking for off_t" >&5 +echo "configure:4250: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4098,12 +4279,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:4102: checking for pid_t" >&5 +echo "configure:4283: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4131,12 +4312,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:4135: checking return type of signal handlers" >&5 +echo "configure:4316: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4153,7 +4334,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:4157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -4172,12 +4353,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:4176: checking for size_t" >&5 +echo "configure:4357: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4205,12 +4386,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:4209: checking for uid_t in sys/types.h" >&5 +echo "configure:4390: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -4239,12 +4420,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:4243: checking for st_blksize in struct stat" >&5 +echo "configure:4424: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4252,7 +4433,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:4256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -4273,12 +4454,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:4277: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:4458: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4287,7 +4468,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:4291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -4308,12 +4489,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:4312: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:4493: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4321,7 +4502,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:4325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -4343,12 +4524,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:4347: checking for working const" >&5 +echo "configure:4528: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -4419,7 +4600,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:4423: checking for 8-bit clean memcmp" >&5 +echo "configure:4604: 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 @@ -4427,7 +4608,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -4455,12 +4636,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:4459: checking for strftime" >&5 +echo "configure:4640: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -4505,7 +4686,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:4509: checking for strftime in -lintl" >&5 +echo "configure:4690: 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 @@ -4513,7 +4694,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4551,12 +4732,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:4555: checking for vprintf" >&5 +echo "configure:4736: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -4603,12 +4784,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:4607: checking for _doprnt" >&5 +echo "configure:4788: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -4656,7 +4837,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:4660: checking for wait3 that fills in rusage" >&5 +echo "configure:4841: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4664,7 +4845,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -4695,7 +4876,7 @@ main() { } } EOF -if { (eval echo configure:4699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -4743,12 +4924,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4747: checking for $ac_func" >&5 +echo "configure:4928: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4799,12 +4980,12 @@ done for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4803: checking for $ac_func" >&5 +echo "configure:4984: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4857,13 +5038,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:4861: checking declaration of sys_errlist" >&5 +echo "configure:5042: 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 < @@ -4873,7 +5054,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:4877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -4894,20 +5075,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:4898: checking existence of sys_errlist" >&5 +echo "configure:5079: 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 < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:4911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else @@ -5018,6 +5199,11 @@ fi + + + + + @@ -5200,8 +5386,6 @@ s%@SET_MAKE@%$SET_MAKE%g s%@SENDMAIL@%$SENDMAIL%g s%@EDITOR@%$EDITOR%g s%@FINGER@%$FINGER%g -s%@TERMCAP_DEFS@%$TERMCAP_DEFS%g -s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g s%@LIBOBJS@%$LIBOBJS%g s%@BUILD_LDAPD@%$BUILD_LDAPD%g s%@BUILD_SLAPD@%$BUILD_SLAPD%g @@ -5223,6 +5407,10 @@ s%@LTHREAD_DEFS@%$LTHREAD_DEFS%g s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g s%@LUTIL_DEFS@%$LUTIL_DEFS%g s%@LUTIL_LIBS@%$LUTIL_LIBS%g +s%@KRB_DEFS@%$KRB_DEFS%g +s%@KRB_LIBS@%$KRB_LIBS%g +s%@TERMCAP_DEFS@%$TERMCAP_DEFS%g +s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g CEOF EOF diff --git a/configure.in b/configure.in index 9727ea97c3..8c02423e9e 100644 --- a/configure.in +++ b/configure.in @@ -186,6 +186,11 @@ BUILD_LDBM=no BUILD_PASSWD=no BUILD_SHELL=no +KRB_DEFS= +KRB_LIBS= +TERMCAP_DEFS= +TERMCAP_LIBS= + dnl ---------------------------------------------------------------- dnl Checks for programs @@ -211,11 +216,44 @@ AC_CHECK_FUNC(socket, :, AC_CHECK_LIB(inet, socket) ]) +if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then + AC_CHECK_HEADERS(kerberosIV/krb.h kerberosIV/des.h) + + if test $ac_cv_header_kerberosIV_krb_h = yes ; then + AC_CHECK_LIB(krb4, main, [have_k5=yes], [have_k5=no], + [-lkrb5 -ldes425]) + + if test $have_k5 = yes ; then + ol_with_kerberos=found + ol_link_kerberos=yes + + KRB_DEFS="-DKERBEROS" + KRB_LIBS="-lkrb4 -lkrb5 -ldes425" + fi + fi +fi +if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then + AC_CHECK_HEADERS(krb.h des.h) + + if test $ac_cv_header_krb_h = yes ; then + AC_CHECK_LIB(krb, main, [have_k4=yes], [have_k4=no], [-ldes]) + + if test $have_k4 = yes ; then + ol_with_kerberos=found + ol_link_kerberos=yes + + KRB_DEFS="-DKERBEROS" + KRB_LIBS="-lkrb -ldes" + fi + fi +fi + + ol_link_threads=no if test $ol_with_threads = auto -o $ol_with_threads = posix ; then AC_CHECK_HEADERS(pthread.h sched.h) - if test "$ac_cv_header_pthread_h" = yes ; then + if test $ac_cv_header_pthread_h = yes ; then OL_POSIX_THREAD_VERSION if test $ol_cv_pthread_version = final ; then @@ -472,9 +510,6 @@ fi # ud needs termcap (should insert check here) ol_link_termcap=no -TERMCAP_DEFS= -TERMCAP_LIBS= - AC_CHECK_HEADERS(termcap.h ncurses.h) if test $ol_link_termcap = no ; then @@ -498,9 +533,6 @@ if test $ol_link_termcap = no ; then TERMCAP_LIBS= fi -AC_SUBST(TERMCAP_DEFS) -AC_SUBST(TERMCAP_LIBS) - # FreeBSD (and others) have crypt(3) in -lcrypt if test $ol_enable_crypt != no ; then AC_CHECK_FUNC(crypt, [have_crypt=yes], [ @@ -695,6 +727,11 @@ AC_SUBST(LTHREAD_LIBS) AC_SUBST(LUTIL_DEFS) AC_SUBST(LUTIL_LIBS) +AC_SUBST(KRB_DEFS) +AC_SUBST(KRB_LIBS) +AC_SUBST(TERMCAP_DEFS) +AC_SUBST(TERMCAP_LIBS) + dnl ---------------------------------------------------------------- dnl final output dnl diff --git a/include/portable.h.in b/include/portable.h.in index 4dbf2c4f26..86e691b6d7 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -160,6 +160,9 @@ /* Define if you have the header file. */ #undef HAVE_DB_185_H +/* Define if you have the header file. */ +#undef HAVE_DES_H + /* Define if you have the header file. */ #undef HAVE_DIRENT_H @@ -172,6 +175,15 @@ /* Define if you have the header file. */ #undef HAVE_GDBM_H +/* Define if you have the header file. */ +#undef HAVE_KERBEROSIV_DES_H + +/* Define if you have the header file. */ +#undef HAVE_KERBEROSIV_KRB_H + +/* Define if you have the header file. */ +#undef HAVE_KRB_H + /* Define if you have the header file. */ #undef HAVE_LIMITS_H From 14df2c8ba27736d79893f138a3e85208fda6ecbc Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 22 Sep 1998 08:59:26 +0000 Subject: [PATCH 075/148] Fixed md5/sha files. --- aclocal.m4 | 7 + configure | 685 ++++++++++++++++++++------------- configure.in | 20 +- include/bridge.h | 6 +- include/lutil.h | 18 + include/lutil_md5.h | 50 +++ include/lutil_sha1.h | 52 +++ include/portable.h.in | 12 + libraries/liblutil/md5.c | 322 ++++++++++++++++ libraries/liblutil/sha1.c | 265 +++++++++++++ servers/slapd/back-ldbm/bind.c | 4 +- 11 files changed, 1176 insertions(+), 265 deletions(-) create mode 100644 include/lutil.h create mode 100644 include/lutil_md5.h create mode 100644 include/lutil_sha1.h create mode 100644 libraries/liblutil/md5.c create mode 100644 libraries/liblutil/sha1.c diff --git a/aclocal.m4 b/aclocal.m4 index a1d6465264..3492f08721 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -231,6 +231,10 @@ dnl AC_CHECK_FUNC(dbm_open) dnl AC_CHECK_LIB(ndbm,dbm_open) dnl AC_CHECK_LIB(dbm,dbm_open) dnl +dnl restrictions: +dnl should also check SVR4 case: dbm_open() in -lucb but that +dnl would requiring dealing with -L/usr/ucblib +dnl AC_DEFUN([OL_LIB_NDBM], [AC_CACHE_CHECK(for NDBM library, [ol_cv_lib_ndbm], [ ol_LIBS="$LIBS" @@ -253,6 +257,9 @@ dnl uses: dnl OL_LIB_NDBM dnl AC_CHECK_HEADERS(ndbm.h) dnl +dnl restrictions: +dnl Doesn't handle SVR4 case (see above) +dnl AC_DEFUN([OL_NDBM], [AC_REQUIRE([OL_LIB_NDBM]) AC_CHECK_HEADERS(ndbm.h) diff --git a/configure b/configure index 0d62fb28f0..aeb8c432bf 100755 --- a/configure +++ b/configure @@ -1699,13 +1699,14 @@ fi + echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:1704: checking for socket" >&5 +echo "configure:1705: checking for socket" >&5 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_socket=yes" else @@ -1745,74 +1746,24 @@ if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then : else echo "$ac_t""no" 1>&6 - echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6 -echo "configure:1750: checking for gethostname in -lnsl" >&5 -ac_lib_var=`echo nsl'_'gethostname | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lnsl $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:1797: checking for socket in -lsocket" >&5 -ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` + + echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 +echo "configure:1752: checking for main in -lsocket" >&5 +ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1835,12 +1786,141 @@ EOF LIBS="-lsocket $LIBS" +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6 +echo "configure:1795: checking for main in -lnet" >&5 +ac_lib_var=`echo net'_'main | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lnet $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6 +echo "configure:1838: checking for main in -lnsl_s" >&5 +ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lnsl_s $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 +echo "configure:1881: checking for main in -lnsl" >&5 +ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lnsl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 fi echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6 -echo "configure:1844: checking for socket in -linet" >&5 +echo "configure:1924: checking for socket in -linet" >&5 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1848,7 +1928,7 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1886,7 +1966,98 @@ else echo "$ac_t""no" 1>&6 fi + echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6 +echo "configure:1971: checking for main in -lgen" >&5 +ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgen $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + +fi + + +echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6 +echo "configure:2018: checking for sigset in -lV3" >&5 +ac_lib_var=`echo V3'_'sigset | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lV3 $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 fi @@ -1895,17 +2066,17 @@ if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1899: checking for $ac_hdr" >&5 +echo "configure:2070: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1934,7 +2105,7 @@ done if test $ac_cv_header_kerberosIV_krb_h = yes ; then echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6 -echo "configure:1938: checking for main in -lkrb4" >&5 +echo "configure:2109: checking for main in -lkrb4" >&5 ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1942,14 +2113,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1985,17 +2156,17 @@ if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1989: checking for $ac_hdr" >&5 +echo "configure:2160: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2024,7 +2195,7 @@ done if test $ac_cv_header_krb_h = yes ; then echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6 -echo "configure:2028: checking for main in -lkrb" >&5 +echo "configure:2199: checking for main in -lkrb" >&5 ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2032,14 +2203,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lkrb -ldes $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2078,17 +2249,17 @@ if test $ol_with_threads = auto -o $ol_with_threads = posix ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2082: checking for $ac_hdr" >&5 +echo "configure:2253: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2263: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2117,13 +2288,13 @@ done if test $ac_cv_header_pthread_h = yes ; then echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6 -echo "configure:2121: checking POSIX thread version" >&5 +echo "configure:2292: checking POSIX thread version" >&5 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -2145,7 +2316,7 @@ rm -f conftest* cat > conftest.$ac_ext < @@ -2192,7 +2363,7 @@ echo "$ac_t""$ol_cv_pthread_version" 1>&6 echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 -echo "configure:2196: checking for LinuxThreads" >&5 +echo "configure:2367: checking for LinuxThreads" >&5 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2215,12 +2386,12 @@ echo "$ac_t""$ol_cv_linux_threads" 1>&6 echo $ac_n "checking for pthread_create""... $ac_c" 1>&6 -echo "configure:2219: checking for pthread_create" >&5 +echo "configure:2390: checking for pthread_create" >&5 if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_pthread_create=yes" else @@ -2265,7 +2436,7 @@ fi if test $ol_link_threads = no ; then echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6 -echo "configure:2269: checking for pthread_create with -pthread" >&5 +echo "configure:2440: checking for pthread_create with -pthread" >&5 if eval "test \"`echo '$''{'ol_cv_pthread_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2273,7 +2444,7 @@ else save_LIBS="$LIBS" LIBS="-pthread $LIBS" cat > conftest.$ac_ext < int main() { @@ -2283,7 +2454,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_pthread_flag=yes else @@ -2308,7 +2479,7 @@ echo "$ac_t""$ol_cv_pthread_flag" 1>&6 if test $ol_link_threads = no ; then save_LIBS="$LIBS" echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:2312: checking for pthread_create in -lpthread" >&5 +echo "configure:2483: checking for pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2316,7 +2487,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2355,7 +2526,7 @@ fi if test $ol_link_threads = no ; then save_LIBS="$LIBS" echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:2359: checking for pthread_create in -lc_r" >&5 +echo "configure:2530: checking for pthread_create in -lc_r" >&5 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2363,7 +2534,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2402,7 +2573,7 @@ fi if test $ol_link_threads = no ; then save_LIBS="$LIBS" echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:2406: checking for pthread_create in -lpthread" >&5 +echo "configure:2577: checking for pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2410,7 +2581,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread -lmach -lexc -lc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2453,12 +2624,12 @@ fi for ac_func in sched_yield pthread_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2457: checking for $ac_func" >&5 +echo "configure:2628: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2532,17 +2703,17 @@ if test $ol_with_threads = manual ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2536: checking for $ac_hdr" >&5 +echo "configure:2707: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2571,12 +2742,12 @@ done for ac_func in sched_yield pthread_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2575: checking for $ac_func" >&5 +echo "configure:2746: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2625,7 +2796,7 @@ done echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 -echo "configure:2629: checking for LinuxThreads" >&5 +echo "configure:2800: checking for LinuxThreads" >&5 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2660,13 +2831,13 @@ fi ol_link_ldbm=no if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then echo $ac_n "checking for DB2 library""... $ac_c" 1>&6 -echo "configure:2664: checking for DB2 library" >&5 +echo "configure:2835: checking for DB2 library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6 -echo "configure:2670: checking for db_open in -ldb" >&5 +echo "configure:2841: checking for db_open in -ldb" >&5 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2674,7 +2845,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2716,17 +2887,17 @@ for ac_hdr in db.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2720: checking for $ac_hdr" >&5 +echo "configure:2891: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2754,13 +2925,13 @@ done if test $ac_cv_header_db_h = yes ; then echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6 -echo "configure:2758: checking if db.h is DB2" >&5 +echo "configure:2929: checking if db.h is DB2" >&5 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -2792,7 +2963,7 @@ fi echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6 -echo "configure:2796: checking for Berkeley DB2" >&5 +echo "configure:2967: checking for Berkeley DB2" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2828,18 +2999,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6 -echo "configure:2832: checking for Berkeley DB library" >&5 +echo "configure:3003: checking for Berkeley DB library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:2838: checking for dbopen" >&5 +echo "configure:3009: checking for dbopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -2881,7 +3052,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:2885: checking for dbopen in -ldb" >&5 +echo "configure:3056: checking for dbopen in -ldb" >&5 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2889,7 +3060,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2935,17 +3106,17 @@ for ac_hdr in db_185.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2939: checking for $ac_hdr" >&5 +echo "configure:3110: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2981,7 +3152,7 @@ fi echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6 -echo "configure:2985: checking for Berkeley DB" >&5 +echo "configure:3156: checking for Berkeley DB" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3026,17 +3197,17 @@ if test $ol_with_ldbm_api = manual ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3030: checking for $ac_hdr" >&5 +echo "configure:3201: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3040: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3071,18 +3242,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then echo $ac_n "checking for GDBM library""... $ac_c" 1>&6 -echo "configure:3075: checking for GDBM library" >&5 +echo "configure:3246: checking for GDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6 -echo "configure:3081: checking for gdbm_open" >&5 +echo "configure:3252: checking for gdbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gdbm_open=yes" else @@ -3124,7 +3295,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:3128: checking for gdbm_open in -lgdbm" >&5 +echo "configure:3299: checking for gdbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3132,7 +3303,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3178,17 +3349,17 @@ echo "$ac_t""$ol_cv_lib_gdbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3182: checking for $ac_hdr" >&5 +echo "configure:3353: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3192: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3363: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3215,7 +3386,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:3219: checking for db" >&5 +echo "configure:3390: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3245,18 +3416,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = ndbm ; then echo $ac_n "checking for NDBM library""... $ac_c" 1>&6 -echo "configure:3249: checking for NDBM library" >&5 +echo "configure:3420: checking for NDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:3255: checking for dbm_open" >&5 +echo "configure:3426: checking for dbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -3298,7 +3469,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6 -echo "configure:3302: checking for dbm_open in -lndbm" >&5 +echo "configure:3473: checking for dbm_open in -lndbm" >&5 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3306,7 +3477,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lndbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3337,7 +3508,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:3341: checking for dbm_open in -ldbm" >&5 +echo "configure:3512: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3345,7 +3516,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3393,17 +3564,17 @@ echo "$ac_t""$ol_cv_lib_ndbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3397: checking for $ac_hdr" >&5 +echo "configure:3568: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3407: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3578: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3430,7 +3601,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:3434: checking for db" >&5 +echo "configure:3605: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3474,7 +3645,7 @@ fi if test $ol_enable_wrappers = yes ; then echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6 -echo "configure:3478: checking for hosts_access in -lwrap" >&5 +echo "configure:3649: checking for hosts_access in -lwrap" >&5 ac_lib_var=`echo wrap'_'hosts_access | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3482,7 +3653,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lwrap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3537,17 +3708,17 @@ for ac_hdr in termcap.h ncurses.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3541: checking for $ac_hdr" >&5 +echo "configure:3712: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3722: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3576,7 +3747,7 @@ done if test $ol_link_termcap = no ; then echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6 -echo "configure:3580: checking for tputs in -ltermcap" >&5 +echo "configure:3751: checking for tputs in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3584,7 +3755,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3624,7 +3795,7 @@ fi if test $ol_link_termcap = no ; then echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 -echo "configure:3628: checking for initscr in -lncurses" >&5 +echo "configure:3799: checking for initscr in -lncurses" >&5 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3632,7 +3803,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3678,12 +3849,12 @@ fi # FreeBSD (and others) have crypt(3) in -lcrypt if test $ol_enable_crypt != no ; then echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:3682: checking for crypt" >&5 +echo "configure:3853: checking for crypt" >&5 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -3725,7 +3896,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:3729: checking for crypt in -lcrypt" >&5 +echo "configure:3900: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3733,7 +3904,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3783,12 +3954,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3787: checking for ANSI C header files" >&5 +echo "configure:3958: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3796,7 +3967,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3813,7 +3984,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3831,7 +4002,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3852,7 +4023,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3863,7 +4034,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:3867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -3891,12 +4062,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:3895: checking for $ac_hdr that defines DIR" >&5 +echo "configure:4066: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -3904,7 +4075,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:3908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -3929,7 +4100,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:3933: checking for opendir in -ldir" >&5 +echo "configure:4104: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3937,7 +4108,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3970,7 +4141,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:3974: checking for opendir in -lx" >&5 +echo "configure:4145: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3978,7 +4149,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4012,12 +4183,12 @@ fi fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:4016: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:4187: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4033,7 +4204,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:4037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -4070,17 +4241,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4074: checking for $ac_hdr" >&5 +echo "configure:4245: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4084: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4108,12 +4279,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:4112: checking for uid_t in sys/types.h" >&5 +echo "configure:4283: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -4142,7 +4313,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:4146: checking type of array argument to getgroups" >&5 +echo "configure:4317: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4150,7 +4321,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -4189,7 +4360,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -4213,12 +4384,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:4217: checking for mode_t" >&5 +echo "configure:4388: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4246,12 +4417,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:4250: checking for off_t" >&5 +echo "configure:4421: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4279,12 +4450,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:4283: checking for pid_t" >&5 +echo "configure:4454: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4312,12 +4483,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:4316: checking return type of signal handlers" >&5 +echo "configure:4487: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4334,7 +4505,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:4338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -4353,12 +4524,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:4357: checking for size_t" >&5 +echo "configure:4528: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4386,12 +4557,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:4390: checking for uid_t in sys/types.h" >&5 +echo "configure:4561: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -4420,12 +4591,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:4424: checking for st_blksize in struct stat" >&5 +echo "configure:4595: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4433,7 +4604,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:4437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -4454,12 +4625,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:4458: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:4629: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4468,7 +4639,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:4472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -4489,12 +4660,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:4493: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:4664: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4502,7 +4673,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:4506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4677: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -4524,12 +4695,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:4528: checking for working const" >&5 +echo "configure:4699: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -4600,7 +4771,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:4604: checking for 8-bit clean memcmp" >&5 +echo "configure:4775: 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 @@ -4608,7 +4779,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -4636,12 +4807,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:4640: checking for strftime" >&5 +echo "configure:4811: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -4686,7 +4857,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:4690: checking for strftime in -lintl" >&5 +echo "configure:4861: 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 @@ -4694,7 +4865,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4732,12 +4903,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:4736: checking for vprintf" >&5 +echo "configure:4907: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -4784,12 +4955,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:4788: checking for _doprnt" >&5 +echo "configure:4959: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -4837,7 +5008,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:4841: checking for wait3 that fills in rusage" >&5 +echo "configure:5012: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4845,7 +5016,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -4876,7 +5047,7 @@ main() { } } EOF -if { (eval echo configure:4880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -4924,12 +5095,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4928: checking for $ac_func" >&5 +echo "configure:5099: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4980,12 +5151,12 @@ done for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4984: checking for $ac_func" >&5 +echo "configure:5155: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5038,13 +5209,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:5042: checking declaration of sys_errlist" >&5 +echo "configure:5213: 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 < @@ -5054,7 +5225,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:5058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -5075,20 +5246,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:5079: checking existence of sys_errlist" >&5 +echo "configure:5250: 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 < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:5092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index 8c02423e9e..a8b9790c4c 100644 --- a/configure.in +++ b/configure.in @@ -210,12 +210,26 @@ AC_PATH_PROG(FINGER, finger, /usr/ucb/finger, $PATH:/usr/ucb) dnl ---------------------------------------------------------------- dnl Checks for libraries -AC_CHECK_FUNC(socket, :, -[ AC_CHECK_LIB(nsl, gethostname) - AC_CHECK_LIB(socket, socket) +dnl Find socket() +dnl Likely combinations: +dnl -lsocket [ -lnsl_s | -lnsl ] +dnl -linet + +AC_CHECK_FUNC(socket, :, [ +dnl +dnl hopefully we won't include too many libraries +dnl + AC_CHECK_LIB(socket, main) + AC_CHECK_LIB(net, main) + AC_CHECK_LIB(nsl_s, main) + AC_CHECK_LIB(nsl, main) AC_CHECK_LIB(inet, socket) + AC_CHECK_LIB(gen, main) ]) +dnl HP-UX requires -lV3 +AC_CHECK_LIB(V3, sigset) + if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then AC_CHECK_HEADERS(kerberosIV/krb.h kerberosIV/des.h) diff --git a/include/bridge.h b/include/bridge.h index fe7a9e4805..7adf1cf62d 100644 --- a/include/bridge.h +++ b/include/bridge.h @@ -12,8 +12,8 @@ /* This file SHOULD go away !!! */ -#ifndef _LDAP_BRIDGE_H -#define _LDAP_BRIDGE_H +#ifndef LDAP_BRIDGE +#define LDAP_BRIDGE /* * portable.h for LDAP -- this is where we define common stuff to make @@ -204,4 +204,4 @@ extern char *strdup(); #endif /* ultrix || nextstep */ -#endif /* _LDAP_BRIDGE_H */ +#endif /* LDAP_BRIDGE */ diff --git a/include/lutil.h b/include/lutil.h new file mode 100644 index 0000000000..4d8d209b5d --- /dev/null +++ b/include/lutil.h @@ -0,0 +1,18 @@ +#ifndef _LUTIL_H +#define _LUTIL_H 1 + +#include +/* + * Include file for LDAP utility routine + */ + +/* ISC Base64 Routines */ + +LDAP_BEGIN_DECL + +LDAP_F int b64_ntop LDAP_P((u_char const *, size_t, char *, size_t)); +LDAP_F int b64_pton LDAP_P((char const *, u_char *, size_t)); + +LDAP_END_DECL + +#endif /* _LUTIL_H */ diff --git a/include/lutil_md5.h b/include/lutil_md5.h new file mode 100644 index 0000000000..e7d8b0682f --- /dev/null +++ b/include/lutil_md5.h @@ -0,0 +1,50 @@ +/* See md5.c for explanation and copyright information. */ + +#ifndef _LDAP_MD5_H_ +#define _LDAP_MD5_H_ + +#include + +LDAP_BEGIN_DECL + +/* Unlike previous versions of this code, uint32 need not be exactly + 32 bits, merely 32 bits or more. Choosing a data type which is 32 + bits instead of 64 is not important; speed is considerably more + important. ANSI guarantees that "unsigned long" will be big enough, + and always using it seems to have few disadvantages. */ + +#ifndef LDAP_UINT32 +#define LDAP_UINT32 +typedef unsigned long uint32; +#endif + +struct ldap_MD5Context { + uint32 buf[4]; + uint32 bits[2]; + unsigned char in[64]; +}; + +LDAP_F void ldap_MD5Init LDAP_P(( + struct ldap_MD5Context *context)); + +LDAP_F void ldap_MD5Update LDAP_P(( + struct ldap_MD5Context *context, + unsigned char const *buf, + unsigned len)); + +LDAP_F void ldap_MD5Final LDAP_P(( + unsigned char digest[16], + struct ldap_MD5Context *context)); + +LDAP_F void ldap_MD5Transform LDAP_P(( + uint32 buf[4], + const unsigned char in[64])); + +/* + * This is needed to make RSAREF happy on some MS-DOS compilers. + */ +typedef struct ldap_MD5Context ldap_MD5_CTX; + +LDAP_END_DECL + +#endif /* _LDAP_MD5_H_ */ diff --git a/include/lutil_sha1.h b/include/lutil_sha1.h new file mode 100644 index 0000000000..f4ed0a7538 --- /dev/null +++ b/include/lutil_sha1.h @@ -0,0 +1,52 @@ +/* This version is based on: + * $OpenBSD: sha1.h,v 1.8 1997/07/15 01:54:23 millert Exp $ */ + +#ifndef _LDAP_SHA1_H_ +#define _LDAP_SHA1_H_ + +#include + +LDAP_BEGIN_DECL + +/* + * SHA-1 in C + * By Steve Reid + * 100% Public Domain + */ + +/* XXX I wonder if this will work on 64bit architectures... */ +#ifndef LDAP_UINT32 +#define LDAP_UINT32 +typedef unsigned long uint32; +#endif + +typedef struct { + uint32 state[5]; + uint32 count[2]; + unsigned char buffer[64]; +} ldap_SHA1_CTX; + +LDAP_F void ldap_SHA1Transform + LDAP_P((uint32 state[5], const unsigned char buffer[64])); + +LDAP_F void ldap_SHA1Init + LDAP_P((ldap_SHA1_CTX *context)); + +LDAP_F void ldap_SHA1Update + LDAP_P((ldap_SHA1_CTX *context, const unsigned char *data, u_int len)); + +LDAP_F void ldap_SHA1Final + LDAP_P((unsigned char digest[20], ldap_SHA1_CTX *context)); + +LDAP_F char *ldap_SHA1End + LDAP_P((ldap_SHA1_CTX *, char *)); + +LDAP_F char *ldap_SHA1File + LDAP_P((char *, char *)); + +LDAP_F char *ldap_SHA1Data + LDAP_P((const unsigned char *, size_t, char *)); + +LDAP_END_DECL + +#endif _LDAP_SHA1_H_ diff --git a/include/portable.h.in b/include/portable.h.in index 86e691b6d7..1cdd3b169c 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -238,12 +238,24 @@ /* Define if you have the header file. */ #undef HAVE_UNISTD_H +/* Define if you have the V3 library (-lV3). */ +#undef HAVE_LIBV3 + +/* Define if you have the gen library (-lgen). */ +#undef HAVE_LIBGEN + /* Define if you have the inet library (-linet). */ #undef HAVE_LIBINET +/* Define if you have the net library (-lnet). */ +#undef HAVE_LIBNET + /* Define if you have the nsl library (-lnsl). */ #undef HAVE_LIBNSL +/* Define if you have the nsl_s library (-lnsl_s). */ +#undef HAVE_LIBNSL_S + /* Define if you have the socket library (-lsocket). */ #undef HAVE_LIBSOCKET diff --git a/libraries/liblutil/md5.c b/libraries/liblutil/md5.c new file mode 100644 index 0000000000..46857666ec --- /dev/null +++ b/libraries/liblutil/md5.c @@ -0,0 +1,322 @@ +/* + * Modified by Kurt D. Zeilenga for inclusion into OpenLDAP + * I hereby disclaim copyright in any changes I have made; this + * code remains in the public domain. + */ + +/* + * This code implements the MD5 message-digest algorithm. + * The algorithm is due to Ron Rivest. This code was + * written by Colin Plumb in 1993, no copyright is claimed. + * This code is in the public domain; do with it what you wish. + * + * Equivalent code is available from RSA Data Security, Inc. + * This code has been tested against that, and is equivalent, + * except that you don't need to include two pages of legalese + * with every copy. + * + * To compute the message digest of a chunk of bytes, declare an + * MD5Context structure, pass it to MD5Init, call MD5Update as + * needed on buffers full of bytes, and then call MD5Final, which + * will fill a supplied 16-byte array with the digest. + */ + +/* This code was modified in 1997 by Jim Kingdon of Cyclic Software to + not require an integer type which is exactly 32 bits. This work + draws on the changes for the same purpose by Tatu Ylonen + as part of SSH, but since I didn't actually use + that code, there is no copyright issue. I hereby disclaim + copyright in any changes I have made; this code remains in the + public domain. */ + +#include "portable.h" + +#include + +#include + +/* Little-endian byte-swapping routines. Note that these do not + depend on the size of datatypes such as uint32, nor do they require + us to detect the endianness of the machine we are running on. It + is possible they should be macros for speed, but I would be + surprised if they were a performance bottleneck for MD5. */ + +static uint32 +getu32 (addr) + const unsigned char *addr; +{ + return (((((unsigned long)addr[3] << 8) | addr[2]) << 8) + | addr[1]) << 8 | addr[0]; +} + +static void +putu32 (data, addr) + uint32 data; + unsigned char *addr; +{ + addr[0] = (unsigned char)data; + addr[1] = (unsigned char)(data >> 8); + addr[2] = (unsigned char)(data >> 16); + addr[3] = (unsigned char)(data >> 24); +} + +/* + * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious + * initialization constants. + */ +void +ldap_MD5Init(ctx) + struct ldap_MD5Context *ctx; +{ + ctx->buf[0] = 0x67452301; + ctx->buf[1] = 0xefcdab89; + ctx->buf[2] = 0x98badcfe; + ctx->buf[3] = 0x10325476; + + ctx->bits[0] = 0; + ctx->bits[1] = 0; +} + +/* + * Update context to reflect the concatenation of another buffer full + * of bytes. + */ +void +ldap_MD5Update(ctx, buf, len) + struct ldap_MD5Context *ctx; + unsigned char const *buf; + unsigned len; +{ + uint32 t; + + /* Update bitcount */ + + t = ctx->bits[0]; + if ((ctx->bits[0] = (t + ((uint32)len << 3)) & 0xffffffff) < t) + ctx->bits[1]++; /* Carry from low to high */ + ctx->bits[1] += len >> 29; + + t = (t >> 3) & 0x3f; /* Bytes already in shsInfo->data */ + + /* Handle any leading odd-sized chunks */ + + if ( t ) { + unsigned char *p = ctx->in + t; + + t = 64-t; + if (len < t) { + memcpy(p, buf, len); + return; + } + memcpy(p, buf, t); + ldap_MD5Transform(ctx->buf, ctx->in); + buf += t; + len -= t; + } + + /* Process data in 64-byte chunks */ + + while (len >= 64) { + memcpy(ctx->in, buf, 64); + ldap_MD5Transform(ctx->buf, ctx->in); + buf += 64; + len -= 64; + } + + /* Handle any remaining bytes of data. */ + + memcpy(ctx->in, buf, len); +} + +/* + * Final wrapup - pad to 64-byte boundary with the bit pattern + * 1 0* (64-bit count of bits processed, MSB-first) + */ +void +ldap_MD5Final(digest, ctx) + unsigned char digest[16]; + struct ldap_MD5Context *ctx; +{ + unsigned count; + unsigned char *p; + + /* Compute number of bytes mod 64 */ + count = (ctx->bits[0] >> 3) & 0x3F; + + /* Set the first char of padding to 0x80. This is safe since there is + always at least one byte free */ + p = ctx->in + count; + *p++ = 0x80; + + /* Bytes of padding needed to make 64 bytes */ + count = 64 - 1 - count; + + /* Pad out to 56 mod 64 */ + if (count < 8) { + /* Two lots of padding: Pad the first block to 64 bytes */ + memset(p, 0, count); + ldap_MD5Transform(ctx->buf, ctx->in); + + /* Now fill the next block with 56 bytes */ + memset(ctx->in, 0, 56); + } else { + /* Pad block to 56 bytes */ + memset(p, 0, count-8); + } + + /* Append length in bits and transform */ + putu32(ctx->bits[0], ctx->in + 56); + putu32(ctx->bits[1], ctx->in + 60); + + ldap_MD5Transform(ctx->buf, ctx->in); + putu32(ctx->buf[0], digest); + putu32(ctx->buf[1], digest + 4); + putu32(ctx->buf[2], digest + 8); + putu32(ctx->buf[3], digest + 12); + memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ +} + +#ifndef ASM_MD5 + +/* The four core functions - F1 is optimized somewhat */ + +/* #define F1(x, y, z) (x & y | ~x & z) */ +#define F1(x, y, z) (z ^ (x & (y ^ z))) +#define F2(x, y, z) F1(z, x, y) +#define F3(x, y, z) (x ^ y ^ z) +#define F4(x, y, z) (y ^ (x | ~z)) + +/* This is the central step in the MD5 algorithm. */ +#define MD5STEP(f, w, x, y, z, data, s) \ + ( w += f(x, y, z) + data, w &= 0xffffffff, w = w<>(32-s), w += x ) + +/* + * The core of the MD5 algorithm, this alters an existing MD5 hash to + * reflect the addition of 16 longwords of new data. MD5Update blocks + * the data and converts bytes into longwords for this routine. + */ +void +ldap_MD5Transform(buf, inraw) + uint32 buf[4]; + const unsigned char inraw[64]; +{ + register uint32 a, b, c, d; + uint32 in[16]; + int i; + + for (i = 0; i < 16; ++i) + in[i] = getu32 (inraw + 4 * i); + + a = buf[0]; + b = buf[1]; + c = buf[2]; + d = buf[3]; + + MD5STEP(F1, a, b, c, d, in[ 0]+0xd76aa478, 7); + MD5STEP(F1, d, a, b, c, in[ 1]+0xe8c7b756, 12); + MD5STEP(F1, c, d, a, b, in[ 2]+0x242070db, 17); + MD5STEP(F1, b, c, d, a, in[ 3]+0xc1bdceee, 22); + MD5STEP(F1, a, b, c, d, in[ 4]+0xf57c0faf, 7); + MD5STEP(F1, d, a, b, c, in[ 5]+0x4787c62a, 12); + MD5STEP(F1, c, d, a, b, in[ 6]+0xa8304613, 17); + MD5STEP(F1, b, c, d, a, in[ 7]+0xfd469501, 22); + MD5STEP(F1, a, b, c, d, in[ 8]+0x698098d8, 7); + MD5STEP(F1, d, a, b, c, in[ 9]+0x8b44f7af, 12); + MD5STEP(F1, c, d, a, b, in[10]+0xffff5bb1, 17); + MD5STEP(F1, b, c, d, a, in[11]+0x895cd7be, 22); + MD5STEP(F1, a, b, c, d, in[12]+0x6b901122, 7); + MD5STEP(F1, d, a, b, c, in[13]+0xfd987193, 12); + MD5STEP(F1, c, d, a, b, in[14]+0xa679438e, 17); + MD5STEP(F1, b, c, d, a, in[15]+0x49b40821, 22); + + MD5STEP(F2, a, b, c, d, in[ 1]+0xf61e2562, 5); + MD5STEP(F2, d, a, b, c, in[ 6]+0xc040b340, 9); + MD5STEP(F2, c, d, a, b, in[11]+0x265e5a51, 14); + MD5STEP(F2, b, c, d, a, in[ 0]+0xe9b6c7aa, 20); + MD5STEP(F2, a, b, c, d, in[ 5]+0xd62f105d, 5); + MD5STEP(F2, d, a, b, c, in[10]+0x02441453, 9); + MD5STEP(F2, c, d, a, b, in[15]+0xd8a1e681, 14); + MD5STEP(F2, b, c, d, a, in[ 4]+0xe7d3fbc8, 20); + MD5STEP(F2, a, b, c, d, in[ 9]+0x21e1cde6, 5); + MD5STEP(F2, d, a, b, c, in[14]+0xc33707d6, 9); + MD5STEP(F2, c, d, a, b, in[ 3]+0xf4d50d87, 14); + MD5STEP(F2, b, c, d, a, in[ 8]+0x455a14ed, 20); + MD5STEP(F2, a, b, c, d, in[13]+0xa9e3e905, 5); + MD5STEP(F2, d, a, b, c, in[ 2]+0xfcefa3f8, 9); + MD5STEP(F2, c, d, a, b, in[ 7]+0x676f02d9, 14); + MD5STEP(F2, b, c, d, a, in[12]+0x8d2a4c8a, 20); + + MD5STEP(F3, a, b, c, d, in[ 5]+0xfffa3942, 4); + MD5STEP(F3, d, a, b, c, in[ 8]+0x8771f681, 11); + MD5STEP(F3, c, d, a, b, in[11]+0x6d9d6122, 16); + MD5STEP(F3, b, c, d, a, in[14]+0xfde5380c, 23); + MD5STEP(F3, a, b, c, d, in[ 1]+0xa4beea44, 4); + MD5STEP(F3, d, a, b, c, in[ 4]+0x4bdecfa9, 11); + MD5STEP(F3, c, d, a, b, in[ 7]+0xf6bb4b60, 16); + MD5STEP(F3, b, c, d, a, in[10]+0xbebfbc70, 23); + MD5STEP(F3, a, b, c, d, in[13]+0x289b7ec6, 4); + MD5STEP(F3, d, a, b, c, in[ 0]+0xeaa127fa, 11); + MD5STEP(F3, c, d, a, b, in[ 3]+0xd4ef3085, 16); + MD5STEP(F3, b, c, d, a, in[ 6]+0x04881d05, 23); + MD5STEP(F3, a, b, c, d, in[ 9]+0xd9d4d039, 4); + MD5STEP(F3, d, a, b, c, in[12]+0xe6db99e5, 11); + MD5STEP(F3, c, d, a, b, in[15]+0x1fa27cf8, 16); + MD5STEP(F3, b, c, d, a, in[ 2]+0xc4ac5665, 23); + + MD5STEP(F4, a, b, c, d, in[ 0]+0xf4292244, 6); + MD5STEP(F4, d, a, b, c, in[ 7]+0x432aff97, 10); + MD5STEP(F4, c, d, a, b, in[14]+0xab9423a7, 15); + MD5STEP(F4, b, c, d, a, in[ 5]+0xfc93a039, 21); + MD5STEP(F4, a, b, c, d, in[12]+0x655b59c3, 6); + MD5STEP(F4, d, a, b, c, in[ 3]+0x8f0ccc92, 10); + MD5STEP(F4, c, d, a, b, in[10]+0xffeff47d, 15); + MD5STEP(F4, b, c, d, a, in[ 1]+0x85845dd1, 21); + MD5STEP(F4, a, b, c, d, in[ 8]+0x6fa87e4f, 6); + MD5STEP(F4, d, a, b, c, in[15]+0xfe2ce6e0, 10); + MD5STEP(F4, c, d, a, b, in[ 6]+0xa3014314, 15); + MD5STEP(F4, b, c, d, a, in[13]+0x4e0811a1, 21); + MD5STEP(F4, a, b, c, d, in[ 4]+0xf7537e82, 6); + MD5STEP(F4, d, a, b, c, in[11]+0xbd3af235, 10); + MD5STEP(F4, c, d, a, b, in[ 2]+0x2ad7d2bb, 15); + MD5STEP(F4, b, c, d, a, in[ 9]+0xeb86d391, 21); + + buf[0] += a; + buf[1] += b; + buf[2] += c; + buf[3] += d; +} +#endif + +#ifdef TEST +/* Simple test program. Can use it to manually run the tests from + RFC1321 for example. */ +#include + +int +main (int argc, char **argv) +{ + struct ldap_MD5Context context; + unsigned char checksum[16]; + int i; + int j; + + if (argc < 2) + { + fprintf (stderr, "usage: %s string-to-hash\n", argv[0]); + exit (1); + } + for (j = 1; j < argc; ++j) + { + printf ("MD5 (\"%s\") = ", argv[j]); + ldap_MD5Init (&context); + ldap_MD5Update (&context, argv[j], strlen (argv[j])); + ldap_MD5Final (checksum, &context); + for (i = 0; i < 16; i++) + { + printf ("%02x", (unsigned int) checksum[i]); + } + printf ("\n"); + } + return 0; +} +#endif /* TEST */ diff --git a/libraries/liblutil/sha1.c b/libraries/liblutil/sha1.c new file mode 100644 index 0000000000..870b23b16a --- /dev/null +++ b/libraries/liblutil/sha1.c @@ -0,0 +1,265 @@ +/* Acquired from: + * $OpenBSD: sha1.c,v 1.9 1997/07/23 21:12:32 kstailey Exp $ */ + +/* + * SHA-1 in C + * By Steve Reid + * 100% Public Domain + * + * Test Vectors (from FIPS PUB 180-1) + * "abc" + * A9993E36 4706816A BA3E2571 7850C26C 9CD0D89D + * "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" + * 84983E44 1C3BD26E BAAE4AA1 F95129E5 E54670F1 + * A million repetitions of "a" + * 34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F + */ + +#define SHA1HANDSOFF /* Copies data before messing with it. */ + +#define LDAP_BRIDGE +#include "portable.h" + +#include +#include + +#include "lutil_sha1.h" + +#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) + +/* + * blk0() and blk() perform the initial expand. + * I got the idea of expanding during the round function from SSLeay + */ +#if BYTE_ORDER == LITTLE_ENDIAN +# define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \ + |(rol(block->l[i],8)&0x00FF00FF)) +#else +# define blk0(i) block->l[i] +#endif +#define blk(i) (block->l[i&15] = rol(block->l[(i+13)&15]^block->l[(i+8)&15] \ + ^block->l[(i+2)&15]^block->l[i&15],1)) + +/* + * (R0+R1), R2, R3, R4 are the different operations (rounds) used in SHA1 + */ +#define R0(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk0(i)+0x5A827999+rol(v,5);w=rol(w,30); +#define R1(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk(i)+0x5A827999+rol(v,5);w=rol(w,30); +#define R2(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0x6ED9EBA1+rol(v,5);w=rol(w,30); +#define R3(v,w,x,y,z,i) z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30); +#define R4(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30); + + +/* + * Hash a single 512-bit block. This is the core of the algorithm. + */ +void ldap_SHA1Transform(state, buffer) + uint32 state[5]; + const unsigned char buffer[64]; +{ + uint32 a, b, c, d, e; + typedef union { + unsigned char c[64]; + u_int l[16]; + } CHAR64LONG16; + CHAR64LONG16 *block; + +#ifdef SHA1HANDSOFF + static unsigned char workspace[64]; + block = (CHAR64LONG16 *)workspace; + (void)memcpy(block, buffer, 64); +#else + block = (CHAR64LONG16 *)buffer; +#endif + + /* Copy context->state[] to working vars */ + a = state[0]; + b = state[1]; + c = state[2]; + d = state[3]; + e = state[4]; + + /* 4 rounds of 20 operations each. Loop unrolled. */ + R0(a,b,c,d,e, 0); R0(e,a,b,c,d, 1); R0(d,e,a,b,c, 2); R0(c,d,e,a,b, 3); + R0(b,c,d,e,a, 4); R0(a,b,c,d,e, 5); R0(e,a,b,c,d, 6); R0(d,e,a,b,c, 7); + R0(c,d,e,a,b, 8); R0(b,c,d,e,a, 9); R0(a,b,c,d,e,10); R0(e,a,b,c,d,11); + R0(d,e,a,b,c,12); R0(c,d,e,a,b,13); R0(b,c,d,e,a,14); R0(a,b,c,d,e,15); + R1(e,a,b,c,d,16); R1(d,e,a,b,c,17); R1(c,d,e,a,b,18); R1(b,c,d,e,a,19); + R2(a,b,c,d,e,20); R2(e,a,b,c,d,21); R2(d,e,a,b,c,22); R2(c,d,e,a,b,23); + R2(b,c,d,e,a,24); R2(a,b,c,d,e,25); R2(e,a,b,c,d,26); R2(d,e,a,b,c,27); + R2(c,d,e,a,b,28); R2(b,c,d,e,a,29); R2(a,b,c,d,e,30); R2(e,a,b,c,d,31); + R2(d,e,a,b,c,32); R2(c,d,e,a,b,33); R2(b,c,d,e,a,34); R2(a,b,c,d,e,35); + R2(e,a,b,c,d,36); R2(d,e,a,b,c,37); R2(c,d,e,a,b,38); R2(b,c,d,e,a,39); + R3(a,b,c,d,e,40); R3(e,a,b,c,d,41); R3(d,e,a,b,c,42); R3(c,d,e,a,b,43); + R3(b,c,d,e,a,44); R3(a,b,c,d,e,45); R3(e,a,b,c,d,46); R3(d,e,a,b,c,47); + R3(c,d,e,a,b,48); R3(b,c,d,e,a,49); R3(a,b,c,d,e,50); R3(e,a,b,c,d,51); + R3(d,e,a,b,c,52); R3(c,d,e,a,b,53); R3(b,c,d,e,a,54); R3(a,b,c,d,e,55); + R3(e,a,b,c,d,56); R3(d,e,a,b,c,57); R3(c,d,e,a,b,58); R3(b,c,d,e,a,59); + R4(a,b,c,d,e,60); R4(e,a,b,c,d,61); R4(d,e,a,b,c,62); R4(c,d,e,a,b,63); + R4(b,c,d,e,a,64); R4(a,b,c,d,e,65); R4(e,a,b,c,d,66); R4(d,e,a,b,c,67); + R4(c,d,e,a,b,68); R4(b,c,d,e,a,69); R4(a,b,c,d,e,70); R4(e,a,b,c,d,71); + R4(d,e,a,b,c,72); R4(c,d,e,a,b,73); R4(b,c,d,e,a,74); R4(a,b,c,d,e,75); + R4(e,a,b,c,d,76); R4(d,e,a,b,c,77); R4(c,d,e,a,b,78); R4(b,c,d,e,a,79); + + /* Add the working vars back into context.state[] */ + state[0] += a; + state[1] += b; + state[2] += c; + state[3] += d; + state[4] += e; + + /* Wipe variables */ + a = b = c = d = e = 0; +} + + +/* + * ldap_SHA1Init - Initialize new context + */ +void ldap_SHA1Init(context) + ldap_SHA1_CTX *context; +{ + + /* SHA1 initialization constants */ + context->state[0] = 0x67452301; + context->state[1] = 0xEFCDAB89; + context->state[2] = 0x98BADCFE; + context->state[3] = 0x10325476; + context->state[4] = 0xC3D2E1F0; + context->count[0] = context->count[1] = 0; +} + + +/* + * Run your data through this. + */ +void ldap_SHA1Update(context, data, len) + ldap_SHA1_CTX *context; + const unsigned char *data; + u_int len; +{ + u_int i, j; + + j = context->count[0]; + if ((context->count[0] += len << 3) < j) + context->count[1] += (len>>29)+1; + j = (j >> 3) & 63; + if ((j + len) > 63) { + (void)memcpy(&context->buffer[j], data, (i = 64-j)); + ldap_SHA1Transform(context->state, context->buffer); + for ( ; i + 63 < len; i += 64) + ldap_SHA1Transform(context->state, &data[i]); + j = 0; + } else { + i = 0; + } + (void)memcpy(&context->buffer[j], &data[i], len - i); +} + + +/* + * Add padding and return the message digest. + */ +void ldap_SHA1Final(digest, context) + unsigned char digest[20]; + ldap_SHA1_CTX* context; +{ + u_int i; + unsigned char finalcount[8]; + + for (i = 0; i < 8; i++) { + finalcount[i] = (unsigned char)((context->count[(i >= 4 ? 0 : 1)] + >> ((3-(i & 3)) * 8) ) & 255); /* Endian independent */ + } + ldap_SHA1Update(context, (unsigned char *)"\200", 1); + while ((context->count[0] & 504) != 448) + ldap_SHA1Update(context, (unsigned char *)"\0", 1); + ldap_SHA1Update(context, finalcount, 8); /* Should cause a SHA1Transform() */ + + if (digest) { + for (i = 0; i < 20; i++) + digest[i] = (unsigned char) + ((context->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255); + } +} + + +/* sha1hl.c + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this notice you + * can do whatever you want with this stuff. If we meet some day, and you think + * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp + * ---------------------------------------------------------------------------- + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char rcsid[] = "$OpenBSD: sha1hl.c,v 1.1 1997/07/12 20:06:03 millert Exp $"; +#endif /* LIBC_SCCS and not lint */ + +#include +#include +#include +#include +#include +#include +#include + +/* ARGSUSED */ +char * +ldap_SHA1End(ctx, buf) + ldap_SHA1_CTX *ctx; + char *buf; +{ + int i; + char *p = buf; + unsigned char digest[20]; + static const char hex[]="0123456789abcdef"; + + if (p == NULL && (p = malloc(41)) == NULL) + return 0; + + ldap_SHA1Final(digest,ctx); + for (i = 0; i < 20; i++) { + p[i + i] = hex[digest[i] >> 4]; + p[i + i + 1] = hex[digest[i] & 0x0f]; + } + p[i + i] = '\0'; + return(p); +} + +char * +ldap_SHA1File (filename, buf) + char *filename; + char *buf; +{ + unsigned char buffer[BUFSIZ]; + ldap_SHA1_CTX ctx; + int fd, num, oerrno; + + ldap_SHA1Init(&ctx); + + if ((fd = open(filename,O_RDONLY)) < 0) + return(0); + + while ((num = read(fd, buffer, sizeof(buffer))) > 0) + ldap_SHA1Update(&ctx, buffer, num); + + oerrno = errno; + close(fd); + errno = oerrno; + return(num < 0 ? 0 : ldap_SHA1End(&ctx, buf)); +} + +char * +ldap_SHA1Data (data, len, buf) + const unsigned char *data; + size_t len; + char *buf; +{ + ldap_SHA1_CTX ctx; + + ldap_SHA1Init(&ctx); + ldap_SHA1Update(&ctx, data, len); + return(ldap_SHA1End(&ctx, buf)); +} diff --git a/servers/slapd/back-ldbm/bind.c b/servers/slapd/back-ldbm/bind.c index 796d471aaa..be453f8e5d 100644 --- a/servers/slapd/back-ldbm/bind.c +++ b/servers/slapd/back-ldbm/bind.c @@ -66,7 +66,7 @@ crypted_value_find( #ifdef LDAP_MD5 } else if ( syntax != SYNTAX_BIN && strncasecmp( "{MD5}", vals[i]->bv_val, (sizeof("{MD5}") - 1 ) ) == 0 ) { - MD5_CTX MD5context; + ldap_MD5_CTX MD5context; unsigned char MD5digest[20]; char base64digest[29]; /* ceiling(sizeof(input)/3) * 4 + 1 */ @@ -89,7 +89,7 @@ crypted_value_find( #ifdef LDAP_SHA1 } else if ( syntax != SYNTAX_BIN && strncasecmp( "{SHA}", vals[i]->bv_val, (sizeof("{SHA}") - 1 ) ) == 0 ) { - SHA1_CTX SHA1context; + ldap_SHA1_CTX SHA1context; unsigned char SHA1digest[20]; char base64digest[29]; /* ceiling(sizeof(input)/3) * 4 + 1 */ From 63e7569fa56074f0755ab01d541703e9a70b22a4 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 22 Sep 1998 09:00:51 +0000 Subject: [PATCH 076/148] Add header for special C defines. --- include/ldap_cdefs.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 include/ldap_cdefs.h diff --git a/include/ldap_cdefs.h b/include/ldap_cdefs.h new file mode 100644 index 0000000000..2f7ed6e987 --- /dev/null +++ b/include/ldap_cdefs.h @@ -0,0 +1,36 @@ +/* LDAP C Defines */ + +#ifndef _LDAP_CDEFS_H +#define _LDAP_CDEFS_H + +#if defined(__cplusplus) +# define LDAP_BEGIN_DECL extern "C" { +# define LDAP_END_DECL } +#else +# define LDAP_BEGIN_DECL +# define LDAP_END_DECL +#endif + +#if defined(__STDC__) || defined(__cplusplus) + /* 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 */ + /* traditional C */ +# define LDAP_P(protos) () +# define LDAP_CONCAT(x,y) x/**/y +# define LDAP_STRING(x) "x" +#endif /* __STDC__ || __cplusplus */ + +#ifndef LDAP_F +# ifdef _WIN32 +# define LDAP_F __declspec( dllexport ) +# else /* ! _WIN32 */ +# define LDAP_F extern +# endif /* _WIN32 */ +#endif /* LDAP_FDECL */ + +#endif /* _LDAP_CDEFS_H */ From 2614a4095f90ac85ea9ea141a61737047af90d46 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 22 Sep 1998 20:15:20 +0000 Subject: [PATCH 077/148] Add detection of LWP threads (untested). --- configure | 661 ++++++++++++++++++++++++++++++---------- configure.in | 54 +++- include/ldapconfig.h.in | 313 ------------------- include/portable.h.in | 33 ++ 4 files changed, 580 insertions(+), 481 deletions(-) delete mode 100644 include/ldapconfig.h.in diff --git a/configure b/configure index aeb8c432bf..dd1ceb1df0 100755 --- a/configure +++ b/configure @@ -736,7 +736,7 @@ if test "${with_threads+set}" = set; then withval="$with_threads" ol_arg=invalid - for ol_val in auto posix dce mach yes no manual ; do + for ol_val in auto posix mach lwp yes no manual ; do if test "$withval" = "$ol_val" ; then ol_arg="$ol_val" fi @@ -2619,17 +2619,18 @@ fi fi if test $ol_link_threads != no ; then - save_LIBS="$LIBS" + save_LIBS="$LIBS" LIBS="$LTHREAD_LIBS $LIBS" - for ac_func in sched_yield pthread_yield + + for ac_func in sched_yield pthread_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2628: checking for $ac_func" >&5 +echo "configure:2629: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2676,7 +2677,6 @@ else fi done - LIBS="$save_LIBS" if test $ac_cv_func_sched_yield = no -a \ $ac_cv_func_pthread_yield = no ; then @@ -2684,6 +2684,68 @@ done echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2 { echo "configure: error: POSIX Threads are not usable" 1>&2; exit 1; } fi + + for ac_func in pthread_kill \ + pthread_attr_init pthread_attr_create \ + pthread_attr_destroy pthread_attr_delete \ + pthread_attr_setdetachstate pthread_attr_setdetach_np \ + +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2696: 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 < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + + LIBS="$save_LIBS" else { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; } fi @@ -2694,6 +2756,277 @@ done fi fi +if test $ol_with_threads = auto -o $ol_with_threads = cthreads ; then + for ac_hdr in mach/cthreads.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2765: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + if test $ac_cv_header_lwp_lwp_h = yes ; then + echo $ac_n "checking for cthread_fork in -llwp""... $ac_c" 1>&6 +echo "configure:2803: checking for cthread_fork in -llwp" >&5 +ac_lib_var=`echo lwp'_'cthread_fork | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-llwp $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_cthreads=yes +else + echo "$ac_t""no" 1>&6 +have_cthreads=no +fi + + + if test $have_cthreads = yes ; then + LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_NEXT_CTHREADS" + LTHREAD_LIBS="$LTHREAD_LIBS -llwp" + fi + fi +fi + +if test $ol_with_threads = auto -o $ol_with_threads = lwp ; then + for ac_hdr in lwp/lwp.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2856: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + if test $ac_cv_header_lwp_lwp_h = yes ; then + echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6 +echo "configure:2894: checking for thr_create in -lthread" >&5 +ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lthread $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_lwp=yes +else + echo "$ac_t""no" 1>&6 +have_lwp=no +fi + + + if test $have_lwp = yes ; then + LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_SUNOS5_LWP" + LTHREAD_LIBS="$LTHREAD_LIBS -llwp" + fi + fi + + for ac_hdr in thread.h synch.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2945: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then + echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6 +echo "configure:2983: checking for lwp_create in -llwp" >&5 +ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-llwp $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_lwp=yes +else + echo "$ac_t""no" 1>&6 +have_lwp=no +fi + + + if test $have_lwp = yes ; then + LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_SUNOS4_LWP" + LTHREAD_LIBS="$LTHREAD_LIBS -llwp" + fi + fi +fi + if test $ol_with_threads = manual ; then $ol_link_threads=yes @@ -2703,17 +3036,17 @@ if test $ol_with_threads = manual ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2707: checking for $ac_hdr" >&5 +echo "configure:3040: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2742,12 +3075,12 @@ done for ac_func in sched_yield pthread_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2746: checking for $ac_func" >&5 +echo "configure:3079: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2796,7 +3129,7 @@ done echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 -echo "configure:2800: checking for LinuxThreads" >&5 +echo "configure:3133: checking for LinuxThreads" >&5 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2831,13 +3164,13 @@ fi ol_link_ldbm=no if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then echo $ac_n "checking for DB2 library""... $ac_c" 1>&6 -echo "configure:2835: checking for DB2 library" >&5 +echo "configure:3168: checking for DB2 library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6 -echo "configure:2841: checking for db_open in -ldb" >&5 +echo "configure:3174: checking for db_open in -ldb" >&5 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2845,7 +3178,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2887,17 +3220,17 @@ for ac_hdr in db.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2891: checking for $ac_hdr" >&5 +echo "configure:3224: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2925,13 +3258,13 @@ done if test $ac_cv_header_db_h = yes ; then echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6 -echo "configure:2929: checking if db.h is DB2" >&5 +echo "configure:3262: checking if db.h is DB2" >&5 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -2963,7 +3296,7 @@ fi echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6 -echo "configure:2967: checking for Berkeley DB2" >&5 +echo "configure:3300: checking for Berkeley DB2" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2999,18 +3332,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6 -echo "configure:3003: checking for Berkeley DB library" >&5 +echo "configure:3336: checking for Berkeley DB library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:3009: checking for dbopen" >&5 +echo "configure:3342: checking for dbopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -3052,7 +3385,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:3056: checking for dbopen in -ldb" >&5 +echo "configure:3389: checking for dbopen in -ldb" >&5 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3060,7 +3393,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3106,17 +3439,17 @@ for ac_hdr in db_185.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3110: checking for $ac_hdr" >&5 +echo "configure:3443: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3152,7 +3485,7 @@ fi echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6 -echo "configure:3156: checking for Berkeley DB" >&5 +echo "configure:3489: checking for Berkeley DB" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3197,17 +3530,17 @@ if test $ol_with_ldbm_api = manual ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3201: checking for $ac_hdr" >&5 +echo "configure:3534: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3242,18 +3575,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then echo $ac_n "checking for GDBM library""... $ac_c" 1>&6 -echo "configure:3246: checking for GDBM library" >&5 +echo "configure:3579: checking for GDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6 -echo "configure:3252: checking for gdbm_open" >&5 +echo "configure:3585: checking for gdbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gdbm_open=yes" else @@ -3295,7 +3628,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:3299: checking for gdbm_open in -lgdbm" >&5 +echo "configure:3632: checking for gdbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3303,7 +3636,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3349,17 +3682,17 @@ echo "$ac_t""$ol_cv_lib_gdbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3353: checking for $ac_hdr" >&5 +echo "configure:3686: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3363: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3386,7 +3719,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:3390: checking for db" >&5 +echo "configure:3723: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3416,18 +3749,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = ndbm ; then echo $ac_n "checking for NDBM library""... $ac_c" 1>&6 -echo "configure:3420: checking for NDBM library" >&5 +echo "configure:3753: checking for NDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:3426: checking for dbm_open" >&5 +echo "configure:3759: checking for dbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -3469,7 +3802,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6 -echo "configure:3473: checking for dbm_open in -lndbm" >&5 +echo "configure:3806: checking for dbm_open in -lndbm" >&5 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3477,7 +3810,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lndbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3508,7 +3841,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:3512: checking for dbm_open in -ldbm" >&5 +echo "configure:3845: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3516,7 +3849,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3564,17 +3897,17 @@ echo "$ac_t""$ol_cv_lib_ndbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3568: checking for $ac_hdr" >&5 +echo "configure:3901: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3578: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3601,7 +3934,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:3605: checking for db" >&5 +echo "configure:3938: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3645,7 +3978,7 @@ fi if test $ol_enable_wrappers = yes ; then echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6 -echo "configure:3649: checking for hosts_access in -lwrap" >&5 +echo "configure:3982: checking for hosts_access in -lwrap" >&5 ac_lib_var=`echo wrap'_'hosts_access | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3653,7 +3986,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lwrap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3708,17 +4041,17 @@ for ac_hdr in termcap.h ncurses.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3712: checking for $ac_hdr" >&5 +echo "configure:4045: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3722: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3747,7 +4080,7 @@ done if test $ol_link_termcap = no ; then echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6 -echo "configure:3751: checking for tputs in -ltermcap" >&5 +echo "configure:4084: checking for tputs in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3755,7 +4088,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3795,7 +4128,7 @@ fi if test $ol_link_termcap = no ; then echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 -echo "configure:3799: checking for initscr in -lncurses" >&5 +echo "configure:4132: checking for initscr in -lncurses" >&5 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3803,7 +4136,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3849,12 +4182,12 @@ fi # FreeBSD (and others) have crypt(3) in -lcrypt if test $ol_enable_crypt != no ; then echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:3853: checking for crypt" >&5 +echo "configure:4186: checking for crypt" >&5 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -3896,7 +4229,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:3900: checking for crypt in -lcrypt" >&5 +echo "configure:4233: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3904,7 +4237,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3954,12 +4287,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3958: checking for ANSI C header files" >&5 +echo "configure:4291: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3967,7 +4300,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3984,7 +4317,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -4002,7 +4335,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -4023,7 +4356,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -4034,7 +4367,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:4038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -4062,12 +4395,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:4066: checking for $ac_hdr that defines DIR" >&5 +echo "configure:4399: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -4075,7 +4408,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:4079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -4100,7 +4433,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:4104: checking for opendir in -ldir" >&5 +echo "configure:4437: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4108,7 +4441,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4141,7 +4474,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:4145: checking for opendir in -lx" >&5 +echo "configure:4478: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4149,7 +4482,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4183,12 +4516,12 @@ fi fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:4187: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:4520: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4204,7 +4537,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:4208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -4241,17 +4574,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4245: checking for $ac_hdr" >&5 +echo "configure:4578: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4279,12 +4612,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:4283: checking for uid_t in sys/types.h" >&5 +echo "configure:4616: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -4313,7 +4646,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:4317: checking type of array argument to getgroups" >&5 +echo "configure:4650: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4321,7 +4654,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -4360,7 +4693,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -4384,12 +4717,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:4388: checking for mode_t" >&5 +echo "configure:4721: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4417,12 +4750,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:4421: checking for off_t" >&5 +echo "configure:4754: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4450,12 +4783,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:4454: checking for pid_t" >&5 +echo "configure:4787: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4483,12 +4816,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:4487: checking return type of signal handlers" >&5 +echo "configure:4820: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4505,7 +4838,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:4509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -4524,12 +4857,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:4528: checking for size_t" >&5 +echo "configure:4861: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4557,12 +4890,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:4561: checking for uid_t in sys/types.h" >&5 +echo "configure:4894: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -4591,12 +4924,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:4595: checking for st_blksize in struct stat" >&5 +echo "configure:4928: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4604,7 +4937,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:4608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -4625,12 +4958,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:4629: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:4962: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4639,7 +4972,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:4643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -4660,12 +4993,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:4664: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:4997: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4673,7 +5006,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:4677: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -4695,12 +5028,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:4699: checking for working const" >&5 +echo "configure:5032: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -4771,7 +5104,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:4775: checking for 8-bit clean memcmp" >&5 +echo "configure:5108: 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 @@ -4779,7 +5112,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -4807,12 +5140,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:4811: checking for strftime" >&5 +echo "configure:5144: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -4857,7 +5190,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:4861: checking for strftime in -lintl" >&5 +echo "configure:5194: 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 @@ -4865,7 +5198,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4903,12 +5236,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:4907: checking for vprintf" >&5 +echo "configure:5240: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -4955,12 +5288,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:4959: checking for _doprnt" >&5 +echo "configure:5292: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -5008,7 +5341,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:5012: checking for wait3 that fills in rusage" >&5 +echo "configure:5345: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5016,7 +5349,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -5047,7 +5380,7 @@ main() { } } EOF -if { (eval echo configure:5051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -5095,12 +5428,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5099: checking for $ac_func" >&5 +echo "configure:5432: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5151,12 +5484,12 @@ done for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5155: checking for $ac_func" >&5 +echo "configure:5488: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5209,13 +5542,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:5213: checking declaration of sys_errlist" >&5 +echo "configure:5546: 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 < @@ -5225,7 +5558,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:5229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -5246,20 +5579,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:5250: checking existence of sys_errlist" >&5 +echo "configure:5583: 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 < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:5263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index a8b9790c4c..91d9b746aa 100644 --- a/configure.in +++ b/configure.in @@ -34,7 +34,7 @@ dnl General "with" options OL_ARG_WITH(kerberos,[ --with-kerberos use Kerberos], auto, [auto k5 k4 afs yes no]) OL_ARG_WITH(threads,[ --with-threads use threads], - auto, [auto posix dce mach yes no manual] ) + auto, [auto posix mach lwp yes no manual] ) dnl Server options @@ -344,13 +344,13 @@ dnl AC_DEFINE(HAVE_LINUX_THREADS,1) fi if test $ol_link_threads != no ; then + save_LIBS="$LIBS" + LIBS="$LTHREAD_LIBS $LIBS" + dnl All POSIX Thread (final) implementations should have dnl sched_yield instead of pthread yield. dnl check for both - save_LIBS="$LIBS" - LIBS="$LTHREAD_LIBS $LIBS" AC_CHECK_FUNCS(sched_yield pthread_yield) - LIBS="$save_LIBS" if test $ac_cv_func_sched_yield = no -a \ $ac_cv_func_pthread_yield = no ; then @@ -358,6 +358,15 @@ dnl AC_DEFINE(HAVE_LINUX_THREADS,1) AC_MSG_WARN([could not locate sched_yield() or pthread_yield()]) AC_MSG_ERROR([POSIX Threads are not usable]) fi + + dnl Check functions for compatibility + AC_CHECK_FUNCS(pthread_kill \ + pthread_attr_init pthread_attr_create \ + pthread_attr_destroy pthread_attr_delete \ + pthread_attr_setdetachstate pthread_attr_setdetach_np \ + ) + + LIBS="$save_LIBS" else AC_MSG_ERROR([could not link with POSIX Threads]) fi @@ -368,6 +377,43 @@ dnl AC_DEFINE(HAVE_LINUX_THREADS,1) fi fi +if test $ol_with_threads = auto -o $ol_with_threads = cthreads ; then + dnl check for Mach CThreads + AC_CHECK_HEADERS(mach/cthreads.h) + if test $ac_cv_header_lwp_lwp_h = yes ; then + AC_CHECK_LIB(lwp, cthread_fork, [have_cthreads=yes], [have_cthreads=no]) + + if test $have_cthreads = yes ; then + LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_NEXT_CTHREADS" + LTHREAD_LIBS="$LTHREAD_LIBS -llwp" + fi + fi +fi + +if test $ol_with_threads = auto -o $ol_with_threads = lwp ; then + dnl check for SunOS5 LWP + AC_CHECK_HEADERS(lwp/lwp.h) + if test $ac_cv_header_lwp_lwp_h = yes ; then + AC_CHECK_LIB(thread, thr_create, [have_lwp=yes], [have_lwp=no]) + + if test $have_lwp = yes ; then + LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_SUNOS5_LWP" + LTHREAD_LIBS="$LTHREAD_LIBS -llwp" + fi + fi + + dnl check for SunOS4 LWP + AC_CHECK_HEADERS(thread.h synch.h) + if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then + AC_CHECK_LIB(lwp, lwp_create, [have_lwp=yes], [have_lwp=no]) + + if test $have_lwp = yes ; then + LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_SUNOS4_LWP" + LTHREAD_LIBS="$LTHREAD_LIBS -llwp" + fi + fi +fi + if test $ol_with_threads = manual ; then dnl User thinks he can manually configure threads. $ol_link_threads=yes diff --git a/include/ldapconfig.h.in b/include/ldapconfig.h.in deleted file mode 100644 index b9b139d3c3..0000000000 --- a/include/ldapconfig.h.in +++ /dev/null @@ -1,313 +0,0 @@ -/* - * Copyright 1998 The OpenLDAP Foundation. - * Copying restrictions apply. See COPYRIGHT file for details. - * - * Portions Copyright (c) 1994 Regents of the University of Michigan. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that this notice is preserved and that due credit is given - * to the University of Michigan at Ann Arbor. The name of the University - * may not be used to endorse or promote products derived from this - * software without specific prior written permission. This software - * is provided ``as is'' without express or implied warranty. - */ - -#ifndef _LDAP_CONFIG_H -#define _LDAP_CONFIG_H - -/* - * config.h for LDAP -- edit this file to customize LDAP client behavior. - * NO platform-specific definitions should be placed in this file. - * Note that this is NOT used by the LDAP or LBER libraries. - */ - -/* - * SHARED DEFINITIONS - */ -#define DEFAULT_BINDIR "@BINDIR@" -#define DEFAULT_SBINDIR "@SBINDIR@" -#define DEFAULT_LIBEXECDIR "@LIBEXECDIR@" -#define DEFAULT_DATADIR "@DATADIR@" -#define DEFAULT_SYSCONFDIR "@SYSCONFDIR@" -#define DEFAULT_SHAREDSTATEDIR "@SHAREDSTATEDIR@" -#define DEFAULT_LOCALSTATEDIR "@LOCALSTATEDIR@" -#define DEFAULT_LIBDIR "@LIBDIR@" -#define DEFAULT_INCLUDEDIR "@INCLUDEDIR@" -#define DEFAULT_OLDINCLUDEDIR "@OLDINCLUDEDIR@" -#define DEFAULT_INFODIR "@INFODIR@" -#define DEFAULT_MANDIR "@MANDIR@" - -/* default ldap host */ -#define LDAPHOST "localhost" - -#define DEFAULT_LDAPHOST_FILE "@SYSCONFDIR@/ldaphost" -/* default place to start searching */ -#define DEFAULT_BASE "o=Your Organization Name, c=US" -#define DEFAULT_BASE_FILE "@SYSCONFDIR@/ldapbase" - -/* - * default binddn and creditials - * use files, make sure they are not generally readable - */ -#define DEFAULT_BINDDN NULL -#define DEFAULT_BINDDN_FILE "@SYSCONFDIR@/ldapbinddn" - -#define DEFAULT_BIND_CRED NULL -#define DEFAULT_BIND_CRED_FILE "@SYSCONFDIR@/ldapbindcred" - -/********************************************************************* - * * - * You probably do not need to edit anything below this point * - * * - *********************************************************************/ - -/* - * SHARED DEFINITIONS - other things you can change - */ - /* default attribute to use when sorting entries, NULL => sort by DN */ -#define SORT_ATTR NULL - /* default count of DN components to show in entry displays */ -#define DEFAULT_RDNCOUNT 2 - /* default config file locations */ -#define FILTERFILE "@SYSCONFDIR@/ldapfilter.conf" -#define TEMPLATEFILE "@SYSCONFDIR@/ldaptemplates.conf" -#define SEARCHFILE "@SYSCONFDIR@/ldapsearchprefs.conf" -#define FRIENDLYFILE "@SYSCONFDIR@/ldapfriendly" - -/* - * FINGER DEFINITIONS - */ - /* who to bind as */ -#define FINGER_BINDDN NULL -#define FINGER_BIND_CRED NULL - /* where to search */ -#define FINGER_BASE DEFAULT_BASE - /* banner to print */ -#define FINGER_BANNER "X.500 Finger Service...\r\n" - /* who to report errors to */ -#define FINGER_ERRORS "System Administrator" - /* what to say if no matches are found */ -#define FINGER_NOMATCH "Search failed to find anything.\r\n" - /* what to say if the service may be unavailable */ -#define FINGER_UNAVAILABLE \ -"The directory service may be temporarily unavailable.\r\n\ -Please try again later.\r\n" - /* printed if a match has no email address - for disptmp default */ -#define FINGER_NOEMAIL1 "None registered in this service." -#define FINGER_NOEMAIL2 NULL -#define FINGER_NOEMAIL { FINGER_NOEMAIL1, FINGER_NOEMAIL2, NULL } - /* maximum number of matches returned */ -#define FINGER_SIZELIMIT 50 - /* max number of hits displayed in full before a list is presented */ -#define FINGER_LISTLIMIT 1 - /* what to exec for "finger @host" */ -#define FINGER_CMD "@FINGER@" - /* how to treat aliases when searching */ -#define FINGER_DEREF LDAP_DEREF_FINDING - /* attribute to use when sorting results */ -#define FINGER_SORT_ATTR SORT_ATTR - /* enable ufn support */ -#define FINGER_UFN - /* timeout for searches */ -#define FINGER_TIMEOUT 60 - /* number of DN components to show in entry displays */ -#define FINGER_RDNCOUNT DEFAULT_RDNCOUNT - -/* - * GO500 GOPHER GATEWAY DEFINITIONS - */ - /* who to bind as */ -#define GO500_BINDDN NULL -#define GO500_BIND_CRED NULL - /* where to search */ -#define GO500_BASE DEFAULT_BASE - /* port on which to listen */ -#define GO500_PORT 5555 - /* how to handle aliases */ -#define GO500_DEREF LDAP_DEREF_FINDING - /* attribute to use when sorting results */ -#define GO500_SORT_ATTR SORT_ATTR - /* timeout for searches */ -#define GO500_TIMEOUT 180 - /* enable ufn support */ -#define GO500_UFN - /* - * only set and uncomment this if your hostname() does not return - * a fully qualified hostname - */ -/* #define GO500_HOSTNAME "fully.qualified.hostname.here" */ - /* number of DN components to show in entry displays */ -#define GO500_RDNCOUNT DEFAULT_RDNCOUNT - -/* - * GO500GW GOPHER GATEWAY DEFINITIONS - */ - /* who to bind as */ -#define GO500GW_BINDDN NULL -#define GO500GW_BIND_CRED NULL - /* where the helpfile lives */ -#define GO500GW_HELPFILE "@SYSCONFDIR@/go500gw.help" - /* port on which to listen */ -#define GO500GW_PORT 7777 - /* timeout on all searches */ -#define GO500GW_TIMEOUT 180 - /* enable ufn support */ -#define GO500GW_UFN - /* attribute to use when sorting results */ -#define GO500GW_SORT_ATTR SORT_ATTR - /* - * only set and uncomment this if your hostname() does not return - * a fully qualified hostname - */ -/* #define GO500GW_HOSTNAME "fully.qualified.hostname.here" */ - /* number of DN components to show in entry displays */ -#define GO500GW_RDNCOUNT DEFAULT_RDNCOUNT - -/* - * RCPT500 MAIL RESPONDER GATEWAY DEFINITIONS - */ - /* who to bind as */ -#define RCPT500_BINDDN NULL -#define RCPT500_BIND_CRED NULL - /* where the helpfile lives */ -#define RCPT500_HELPFILE "@SYSCONFDIR@/rcpt500.help" - /* maximum number of matches returned */ -#define RCPT500_SIZELIMIT 50 - /* address replies will appear to come from */ -#define RCPT500_FROM "\"Directory Query Program\" " - /* command that will accept an RFC822 message text on standard - input, and send it. sendmail -t does this nicely. */ -#define RCPT500_PIPEMAILCMD "@SENDMAIL@ -t" - /* where to search */ -#define RCPT500_BASE DEFAULT_BASE - /* attribute to use when sorting results */ -#define RCPT500_SORT_ATTR SORT_ATTR - /* max number of hits displayed in full before a list is presented */ -#define RCPT500_LISTLIMIT 1 - /* enable ufn support */ -#define RCPT500_UFN - /* number of DN components to show in entry displays */ -#define RCPT500_RDNCOUNT DEFAULT_RDNCOUNT - -/* - * LDAPSEARCH TOOL - */ - /* who to bind as */ -#define LDAPSEARCH_BINDDN NULL -#define LDAPSEARCH_BIND_CRED NULL - /* search base */ -#define LDAPSEARCH_BASE DEFAULT_BASE - -/* - * LDAPMODIFY TOOL - */ - /* who to bind as */ -#define LDAPMODIFY_BINDDN NULL -#define LDAPMODIFY_BIND_CRED NULL - /* search base */ -#define LDAPMODIFY_BASE DEFAULT_BASE - -/* - * LDAPDELETE TOOL - */ - /* who to bind as */ -#define LDAPDELETE_BINDDN NULL -#define LDAPDELETE_BIND_CRED NULL - /* search base */ -#define LDAPDELETE_BASE DEFAULT_BASE - -/* - * LDAPMODRDN TOOL - */ - /* who to bind as */ -#define LDAPMODRDN_BINDDN NULL -#define LDAPMODRDN_BIND_CRED NULL - /* search base */ -#define LDAPMODRDN_BASE DEFAULT_BASE - -/* - * MAIL500 MAILER DEFINITIONS - */ - /* who to bind as */ -#define MAIL500_BINDDN NULL -#define MAIL500_BIND_CRED NULL - /* max number of ambiguous matches reported */ -#define MAIL500_MAXAMBIGUOUS 10 - /* max subscribers allowed (size limit when searching for them ) */ -#define MAIL500_MAXGROUPMEMBERS LDAP_NO_LIMIT - /* timeout for all searches */ -#define MAIL500_TIMEOUT 180 - /* sendmail location - mail500 needs to exec this */ -#define MAIL500_SENDMAIL "@SENDMAIL@" - -/* - * UD DEFINITIONS - */ - /* ud configuration file */ -#define UD_CONFIG_FILE "@SYSCONFDIR@/ud.conf" - /* default editor */ -#define UD_DEFAULT_EDITOR "@EDITOR@" - /* default bbasename of user config file */ -#define UD_USER_CONFIG_FILE ".udrc" - /* default user to bind as */ -#define UD_BINDDN NULL - /* default password to bind with */ -#define UD_BIND_CRED NULL - /* default search base */ -#define UD_BASE DEFAULT_BASE - /* default base where groups are created */ -#define UD_WHERE_GROUPS_ARE_CREATED "" - /* default base below which all groups live */ -#define UD_WHERE_ALL_GROUPS_LIVE "" - -/* - * FAX500 DEFINITIONS - */ - /* what to bind as */ -#define FAX_BINDDN NULL -#define FAX_BIND_CRED NULL - /* default search base */ -#define FAX_BASE DEFAULT_BASE - /* how long to wait for searches */ -#define FAX_TIMEOUT 180 - /* maximum number of ambiguous matches reported */ -#define FAX_MAXAMBIGUOUS 10 - /* maximum number of members allowed */ -#define FAX_MAXMEMBERS LDAP_NO_LIMIT - /* program to send mail */ -#define FAX_SENDMAIL "@SENDMAIL@" - -/* - * RP500 DEFINITIONS - */ - /* what to bind as */ -#define RP_BINDDN NULL -#define RP_BIND_CRED NULL - /* default search base */ -#define RP_BASE DEFAULT_BASE - - /* prefix to add to non-fully-qualified numbers */ -#define RP_PHONEPREFIX "" - -/* - * SLAPD DEFINITIONS - */ - /* location of the default slapd config file */ -#define SLAPD_DEFAULT_CONFIGFILE "@SYSCONFDIR@/slapd.conf" - /* default sizelimit on number of entries from a search */ -#define SLAPD_DEFAULT_SIZELIMIT 500 - /* default timelimit to spend on a search */ -#define SLAPD_DEFAULT_TIMELIMIT 3600 - /* location of the slapd pid file */ -#define SLAPD_PIDFILE "@RUNDIR@/slapd.pid" - /* location of the slapd args file */ -#define SLAPD_ARGSFILE "@RUNDIR@/slapd.args" - /* dn of the special "monitor" entry */ -#define SLAPD_MONITOR_DN "cn=monitor" - /* dn of the special "config" entry */ -#define SLAPD_CONFIG_DN "cn=config" - /* minimum max ids that a single index entry can map to in ldbm */ -#define SLAPD_LDBM_MIN_MAXIDS 4000 - -#endif /* _LDAP_CONFIG_H */ diff --git a/include/portable.h.in b/include/portable.h.in index 1cdd3b169c..20edd07584 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -103,6 +103,27 @@ /* Define if you have the mktime function. */ #undef HAVE_MKTIME +/* Define if you have the pthread_attr_create function. */ +#undef HAVE_PTHREAD_ATTR_CREATE + +/* Define if you have the pthread_attr_delete function. */ +#undef HAVE_PTHREAD_ATTR_DELETE + +/* Define if you have the pthread_attr_destroy function. */ +#undef HAVE_PTHREAD_ATTR_DESTROY + +/* Define if you have the pthread_attr_init function. */ +#undef HAVE_PTHREAD_ATTR_INIT + +/* Define if you have the pthread_attr_setdetach_np function. */ +#undef HAVE_PTHREAD_ATTR_SETDETACH_NP + +/* Define if you have the pthread_attr_setdetachstate function. */ +#undef HAVE_PTHREAD_ATTR_SETDETACHSTATE + +/* Define if you have the pthread_kill function. */ +#undef HAVE_PTHREAD_KILL + /* Define if you have the pthread_yield function. */ #undef HAVE_PTHREAD_YIELD @@ -187,6 +208,12 @@ /* Define if you have the header file. */ #undef HAVE_LIMITS_H +/* Define if you have the header file. */ +#undef HAVE_LWP_LWP_H + +/* Define if you have the header file. */ +#undef HAVE_MACH_CTHREADS_H + /* Define if you have the header file. */ #undef HAVE_MALLOC_H @@ -211,6 +238,9 @@ /* Define if you have the header file. */ #undef HAVE_STDDEF_H +/* Define if you have the header file. */ +#undef HAVE_SYNCH_H + /* Define if you have the header file. */ #undef HAVE_SYS_DIR_H @@ -235,6 +265,9 @@ /* Define if you have the header file. */ #undef HAVE_TERMIO_H +/* Define if you have the header file. */ +#undef HAVE_THREAD_H + /* Define if you have the header file. */ #undef HAVE_UNISTD_H From 3d8ae33db7b18ac179ed37a3f16bd547448ee7c0 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 23 Sep 1998 04:26:52 +0000 Subject: [PATCH 078/148] U-MICH -> OpenLDAP change. Added ACKNOWLEDGEMENT of U. Michigan contribution. --- doc/man/man1/ldapdelete.1 | 7 +- doc/man/man1/ldapmodify.1 | 7 +- doc/man/man1/ldapmodrdn.1 | 7 +- doc/man/man1/ldapsearch.1 | 7 +- doc/man/man1/ud.1 | 7 +- doc/man/man3/cldap_close.3 | 7 +- doc/man/man3/cldap_open.3 | 7 +- doc/man/man3/cldap_search_s.3 | 7 +- doc/man/man3/cldap_setretryinfo.3 | 7 +- doc/man/man3/lber-decode.3 | 7 +- doc/man/man3/lber-encode.3 | 7 +- doc/man/man3/ldap.3 | 7 +- doc/man/man3/ldap_abandon.3 | 7 +- doc/man/man3/ldap_add.3 | 7 +- doc/man/man3/ldap_bind.3 | 7 +- doc/man/man3/ldap_cache.3 | 7 +- doc/man/man3/ldap_charset.3 | 7 +- doc/man/man3/ldap_compare.3 | 7 +- doc/man/man3/ldap_delete.3 | 7 +- doc/man/man3/ldap_disptmpl.3 | 7 +- doc/man/man3/ldap_entry2text.3 | 7 +- doc/man/man3/ldap_error.3 | 7 +- doc/man/man3/ldap_first_attribute.3 | 7 +- doc/man/man3/ldap_first_entry.3 | 7 +- doc/man/man3/ldap_friendly.3 | 7 +- doc/man/man3/ldap_get_dn.3 | 7 +- doc/man/man3/ldap_get_values.3 | 7 +- doc/man/man3/ldap_getfilter.3 | 7 +- doc/man/man3/ldap_modify.3 | 7 +- doc/man/man3/ldap_modrdn.3 | 7 +- doc/man/man3/ldap_open.3 | 7 +- doc/man/man3/ldap_result.3 | 7 +- doc/man/man3/ldap_search.3 | 7 +- doc/man/man3/ldap_searchprefs.3 | 7 +- doc/man/man3/ldap_sort.3 | 7 +- doc/man/man3/ldap_ufn.3 | 7 +- doc/man/man3/ldap_url.3 | 7 +- doc/man/man3/regex.3 | 326 ---------------------------- doc/man/man5/ldapfilter.conf.5 | 7 +- doc/man/man5/ldapfriendly.5 | 7 +- doc/man/man5/ldapsearchprefs.conf.5 | 7 +- doc/man/man5/ldaptemplates.conf.5 | 7 +- doc/man/man5/ldif.5 | 7 +- doc/man/man5/slapd.conf.5 | 7 +- doc/man/man5/slapd.replog.5 | 7 +- doc/man/man5/ud.conf.5 | 7 +- doc/man/man8/centipede.8 | 13 +- doc/man/man8/chlog2replog.8 | 15 +- doc/man/man8/edb2ldif.8 | 9 +- doc/man/man8/go500.8 | 17 +- doc/man/man8/go500gw.8 | 17 +- doc/man/man8/in.xfingerd.8 | 11 +- doc/man/man8/ldapd.8 | 13 +- doc/man/man8/ldbmcat.8 | 15 +- doc/man/man8/ldif.8 | 9 +- doc/man/man8/ldif2ldbm.8 | 21 +- doc/man/man8/mail500.8 | 15 +- doc/man/man8/rcpt500.8 | 11 +- doc/man/man8/slapd.8 | 13 +- doc/man/man8/slurpd.8 | 13 +- 60 files changed, 401 insertions(+), 432 deletions(-) delete mode 100644 doc/man/man3/regex.3 diff --git a/doc/man/man1/ldapdelete.1 b/doc/man/man1/ldapdelete.1 index ea2f4726c2..43ae6033ee 100644 --- a/doc/man/man1/ldapdelete.1 +++ b/doc/man/man1/ldapdelete.1 @@ -1,4 +1,4 @@ -.TH LDAPDELETE 1 "13 November 1995" "U-M LDAP LDVERSION" +.TH LDAPDELETE 1 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldapdelete \- ldap delete entry tool .SH SYNOPSIS @@ -107,3 +107,8 @@ Kille, S., ISODE Consortium, March 1995. .SH BUGS There is no interactive mode, but there probably should be. +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man1/ldapmodify.1 b/doc/man/man1/ldapmodify.1 index 3ffbe59a92..679f672a27 100644 --- a/doc/man/man1/ldapmodify.1 +++ b/doc/man/man1/ldapmodify.1 @@ -1,4 +1,4 @@ -.TH LDAPMODIFY 1 "13 November 1995" "U-M LDAP LDVERSION" +.TH LDAPMODIFY 1 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldapmodify, ldapadd \- ldap modify entry and ldap add entry tools .SH SYNOPSIS @@ -299,3 +299,8 @@ Kille, S., ISODE Consortium, March 1995. .SH BUGS There is no interactive mode, but there probably should be. +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man1/ldapmodrdn.1 b/doc/man/man1/ldapmodrdn.1 index 8468e7a4e5..86d76655bd 100644 --- a/doc/man/man1/ldapmodrdn.1 +++ b/doc/man/man1/ldapmodrdn.1 @@ -1,4 +1,4 @@ -.TH LDAPMODRDN 1 "13 November 1995" "U-M LDAP LDVERSION" +.TH LDAPMODRDN 1 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldapmodrdn \- ldap modify entry RDN tool .SH SYNOPSIS @@ -130,3 +130,8 @@ Kille, S., ISODE Consortium, March 1995. .SH BUGS There is no interactive mode, but there probably should be. +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man1/ldapsearch.1 b/doc/man/man1/ldapsearch.1 index 2d66334d80..84facf394d 100644 --- a/doc/man/man1/ldapsearch.1 +++ b/doc/man/man1/ldapsearch.1 @@ -1,4 +1,4 @@ -.TH LDAPSEARCH 1 "29 March 1996" "U-M LDAP LDVERSION" +.TH LDAPSEARCH 1 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldapsearch \- ldap search tool .SH SYNOPSIS @@ -289,3 +289,8 @@ Howes, T., .SM RFC 1558, University of Michigan, December 1993. +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man1/ud.1 b/doc/man/man1/ud.1 index 43284a7f74..1c74bf8f35 100644 --- a/doc/man/man1/ud.1 +++ b/doc/man/man1/ud.1 @@ -1,4 +1,4 @@ -.TH UD 1 "18 March 1993" "U-M LDAP LDVERSION" +.TH UD 1 "22 September 1998" "OpenLDAP LDVERSION" .UC 6 .SH NAME ud \- interactive X.500 Directory Server query program @@ -71,3 +71,8 @@ uses the ldap_perror() routine to print an informative diagnostic. Too numerous to mention. .SH AUTHOR Bryan Beecher, University of Michigan +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man3/cldap_close.3 b/doc/man/man3/cldap_close.3 index 7896ba0923..fae64eac3a 100644 --- a/doc/man/man3/cldap_close.3 +++ b/doc/man/man3/cldap_close.3 @@ -1,4 +1,4 @@ -.TH CLDAP_CLOSE 3 "18 November 1994" "U-M LDAP LDVERSION" +.TH CLDAP_CLOSE 3 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME cldap_close \- Dispose of Connectionless LDAP Pointer .SH SYNOPSIS @@ -28,3 +28,8 @@ returned by a previous call to .BR cldap_open (3), .BR cldap_search_s (3), .BR cldap_setretryinfo (3) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man3/cldap_open.3 b/doc/man/man3/cldap_open.3 index 738bda2324..131bae6eaa 100644 --- a/doc/man/man3/cldap_open.3 +++ b/doc/man/man3/cldap_open.3 @@ -1,4 +1,4 @@ -.TH CLDAP_OPEN 3 "18 November 1994" "U-M LDAP LDVERSION" +.TH CLDAP_OPEN 3 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME cldap_open \- Prepare for Connectionless LDAP Communication .SH SYNOPSIS @@ -51,3 +51,8 @@ will return NULL and errno will be set appropriately. .BR cldap_setretryinfo (3), .BR cldap_close (3), .BR udp (4p) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man3/cldap_search_s.3 b/doc/man/man3/cldap_search_s.3 index 1c4da546f9..48b18fbaf1 100644 --- a/doc/man/man3/cldap_search_s.3 +++ b/doc/man/man3/cldap_search_s.3 @@ -1,4 +1,4 @@ -.TH CLDAP_SEARCH_S 3 "18 November 1994" "U-M LDAP LDVERSION" +.TH CLDAP_SEARCH_S 3 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME cldap_search_s \- Connectionless LDAP Search .SH SYNOPSIS @@ -103,3 +103,8 @@ for more information. .BR cldap_setretryinfo (3), .BR cldap_close (3), .BR udp (4p) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man3/cldap_setretryinfo.3 b/doc/man/man3/cldap_setretryinfo.3 index 55ef67159d..80d510e115 100644 --- a/doc/man/man3/cldap_setretryinfo.3 +++ b/doc/man/man3/cldap_setretryinfo.3 @@ -1,4 +1,4 @@ -.TH CLDAP_SETRETRYINFO 3 "18 November 1994" "U-M LDAP LDVERSION" +.TH CLDAP_SETRETRYINFO 3 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME cldap_setretryinfo \- Set Connectionless LDAP Request Retransmission Parameters .SH SYNOPSIS @@ -40,3 +40,8 @@ algorithm used. .BR cldap_open (3), .BR cldap_search_s (3), .BR cldap_close (3) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man3/lber-decode.3 b/doc/man/man3/lber-decode.3 index e05fb33c4b..e885337a38 100644 --- a/doc/man/man3/lber-decode.3 +++ b/doc/man/man3/lber-decode.3 @@ -1,4 +1,4 @@ -.TH LBER-DECODE 3 "18 November 1994" +.TH LBER_DECODE 3 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ber_get_next, ber_skiptag, ber_peek_tag, ber_scanf, ber_get_int, ber_get_stringb, ber_get_stringa, ber_get_null, ber_get_boolean, ber_get_bitstring, ber_first_element, ber_next_element \- LBER simplified Basic Encoding Rules library routines for decoding .SH SYNOPSIS @@ -356,3 +356,8 @@ Syntax Notation One, International Organization for Standardization, International Standard 8825. .SH AUTHOR Tim Howes, University of Michigan +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man3/lber-encode.3 b/doc/man/man3/lber-encode.3 index 01304810b7..7d6806b245 100644 --- a/doc/man/man3/lber-encode.3 +++ b/doc/man/man3/lber-encode.3 @@ -1,4 +1,4 @@ -.TH LBER-ENCODE 3 "15 June 1992" +.TH LBER_ENCODE 3 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ber_alloc, ber_flush, ber_printf, ber_put_int, ber_put_ostring, ber_put_string, ber_put_null, ber_put_boolean, ber_put_bitstring, ber_start_seq, ber_start_set, ber_put_seq, ber_put_set \- LBER simplified Basic Encoding Rules library routines for encoding .SH SYNOPSIS @@ -313,3 +313,8 @@ Syntax Notation One, International Organization for Standardization, International Standard 8825. .SH AUTHOR Tim Howes, University of Michigan +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man3/ldap.3 b/doc/man/man3/ldap.3 index 8f2c20e9e0..53d3a68213 100644 --- a/doc/man/man3/ldap.3 +++ b/doc/man/man3/ldap.3 @@ -1,4 +1,4 @@ -.TH LDAP 3 "13 November 1995" "U-M LDAP LDVERSION" +.TH LDAP 3 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldap - Lightweight Directory Access Protocol package .SH SYNOPSIS @@ -499,3 +499,8 @@ terminate a connectionless LDAP session .SH AUTHORS Tim Howes, Mark Smith, Gordon Good, Lance Sloan, and Steve Rothwell from the University of Michigan, along with help from lots of others. +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man3/ldap_abandon.3 b/doc/man/man3/ldap_abandon.3 index 770513cb3d..080f77e73b 100644 --- a/doc/man/man3/ldap_abandon.3 +++ b/doc/man/man3/ldap_abandon.3 @@ -1,4 +1,4 @@ -.TH LDAP_ABANDON 3 "1 December 1994" "U-M LDAP LDVERSION" +.TH LDAP_ABANDON 3 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldap_abandon \- Abandon an LDAP operation in progress .SH SYNOPSIS @@ -40,3 +40,8 @@ for details. .BR ldap(3), .BR ldap_result(3), .B ldap_error(3) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man3/ldap_add.3 b/doc/man/man3/ldap_add.3 index 85290ad94e..9c1460406a 100644 --- a/doc/man/man3/ldap_add.3 +++ b/doc/man/man3/ldap_add.3 @@ -1,4 +1,4 @@ -.TH LDAP_ADD 3 "15 November 1994" "U-M LDAP LDVERSION" +.TH LDAP_ADD 3 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldap_add, ldap_add_s \- Perform an LDAP add operation .SH SYNOPSIS @@ -58,3 +58,8 @@ directly (LDAP_SUCCESS if everything went ok, some error otherwise). .SH SEE ALSO .BR ldap(3), .B ldap_modify(3) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man3/ldap_bind.3 b/doc/man/man3/ldap_bind.3 index c172b28c3a..7f4540d4ce 100644 --- a/doc/man/man3/ldap_bind.3 +++ b/doc/man/man3/ldap_bind.3 @@ -1,4 +1,4 @@ -.TH LDAP_BIND 3 "28 March 1996" "U-M LDAP LDVERSION" +.TH LDAP_BIND 3 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldap_bind, ldap_bind_s, ldap_simple_bind, ldap_simple_bind_s, ldap_kerberos_bind_s, ldap_kerberos_bind1, ldap_kerberos_bind1_s, ldap_kerberos_bind2, ldap_kerberos_bind2_s, ldap_unbind, ldap_unbind_s, ldap_set_rebind_proc \- LDAP bind routines .SH SYNOPSIS @@ -194,3 +194,8 @@ for more information. .BR ldap(3), .BR ldap_error(3), .BR ldap_open(3) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man3/ldap_cache.3 b/doc/man/man3/ldap_cache.3 index fbc8b0fcb0..b6cd00c20b 100644 --- a/doc/man/man3/ldap_cache.3 +++ b/doc/man/man3/ldap_cache.3 @@ -1,4 +1,4 @@ -.TH LDAP_CACHE 3 "14 November 1994" "U-M LDAP LDVERSION" +.TH LDAP_CACHE 3 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldap_enable_cache, ldap_disable_cache, ldap_destroy_cache, ldap_flush_cache, ldap_uncache_entry, ldap_uncache_request, ldap_set_cache_options \- LDAP client caching routines .SH SYNOPSIS @@ -115,3 +115,8 @@ void and return nothing. .BR ldap_search (3), .BR ldap_compare (3), .BR cldap_search_s (3) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man3/ldap_charset.3 b/doc/man/man3/ldap_charset.3 index c926b07e6a..7cad320fee 100644 --- a/doc/man/man3/ldap_charset.3 +++ b/doc/man/man3/ldap_charset.3 @@ -1,4 +1,4 @@ -.TH LDAP_CHARSET 3 "28 March 1996" "U-M LDAP LDVERSION" +.TH LDAP_CHARSET 3 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldap_set_string_translators, ldap_t61_to_8859, @@ -125,3 +125,8 @@ For example, you would not want to translate a binary attributes such as jpegPhoto. .SH SEE ALSO .BR ldap (3) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man3/ldap_compare.3 b/doc/man/man3/ldap_compare.3 index 3df8ca9c6b..7edf1b2684 100644 --- a/doc/man/man3/ldap_compare.3 +++ b/doc/man/man3/ldap_compare.3 @@ -1,4 +1,4 @@ -.TH LDAP_COMPARE 3 "15 November 1994" "U-M LDAP LDVERSION" +.TH LDAP_COMPARE 3 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldap_compare, ldap_compare_s \- Perform an LDAP compare operation .SH SYNOPSIS @@ -49,3 +49,8 @@ There is no way to compare binary values, but there should be. .SH SEE ALSO .BR ldap(3), .BR ldap_error(3) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man3/ldap_delete.3 b/doc/man/man3/ldap_delete.3 index 3149890d84..c978e1abf4 100644 --- a/doc/man/man3/ldap_delete.3 +++ b/doc/man/man3/ldap_delete.3 @@ -1,4 +1,4 @@ -.TH LDAP_DELETE 3 "15 November 1994" "U-M LDAP LDVERSION" +.TH LDAP_DELETE 3 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldap_delete, ldap_delete_s \- Perform an LDAP delete operation .SH SYNOPSIS @@ -46,3 +46,8 @@ non-negative message id of the request if things went ok. .SH SEE ALSO .BR ldap(3), .BR ldap_error(3) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man3/ldap_disptmpl.3 b/doc/man/man3/ldap_disptmpl.3 index 03c1e656ec..d8f918d61b 100644 --- a/doc/man/man3/ldap_disptmpl.3 +++ b/doc/man/man3/ldap_disptmpl.3 @@ -1,4 +1,4 @@ -.TH LDAP_DISPTMPL 3 "13 December 1994" "U-M LDAP LDVERSION" +.TH LDAP_DISPTMPL 3 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldap_init_templates, ldap_init_templates_buf, ldap_free_templates, ldap_first_disptmpl, ldap_next_disptmpl, ldap_oc2template, ldap_tmplattrs, ldap_first_tmplrow, ldap_next_tmplrow, ldap_first_tmplcol, ldap_next_tmplcol, \- LDAP display template routines .SH SYNOPSIS @@ -448,3 +448,8 @@ upon error. .BR ldap (3), .BR ldap_entry2text (3), .BR ldaptemplates.conf (5) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man3/ldap_entry2text.3 b/doc/man/man3/ldap_entry2text.3 index 54454253a1..381bc925b9 100644 --- a/doc/man/man3/ldap_entry2text.3 +++ b/doc/man/man3/ldap_entry2text.3 @@ -1,4 +1,4 @@ -.TH LDAP_ENTRY2TEXT 3 "13 November 1994" "U-M LDAP %LDVERSION%" +.TH LDAP_ENTRY2TEXT 3 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldap_entry2text, ldap_entry2text_search, ldap_vals2text \- LDAP entry display routines .SH SYNOPSIS @@ -324,3 +324,8 @@ ETCDIR/ldaptemplates.conf .BR ldap (3), .BR ldap_disptmpl (3), .BR ldaptemplates.conf (5) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man3/ldap_error.3 b/doc/man/man3/ldap_error.3 index c517b7e6e3..8d3b9b68d8 100644 --- a/doc/man/man3/ldap_error.3 +++ b/doc/man/man3/ldap_error.3 @@ -1,4 +1,4 @@ -.TH LDAP_ERROR 3 "15 November 1994" "U-M LDAP LDVERSION" +.TH LDAP_ERROR 3 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldap_perror, ld_errno, ldap_result2error, ldap_errlist, ldap_err2string \- LDAP protocol error handling routines .SH SYNOPSIS @@ -217,3 +217,8 @@ library routine. .SH SEE ALSO .BR ldap(3), .BR perror(3) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man3/ldap_first_attribute.3 b/doc/man/man3/ldap_first_attribute.3 index 452a928bf1..8646ed364d 100644 --- a/doc/man/man3/ldap_first_attribute.3 +++ b/doc/man/man3/ldap_first_attribute.3 @@ -1,4 +1,4 @@ -.TH LDAP_FIRST_ATTRIBUTE 3 "25 November 1994" "U-M LDAP LDVERSION" +.TH LDAP_FIRST_ATTRIBUTE 3 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldap_first_attribute, ldap_next_attribute \- step through LDAP entry attributes .SH SYNOPSIS @@ -77,3 +77,8 @@ be freed by the caller via .BR ldap_first_entry(3), .BR ldap_get_values(3), .BR ldap_error(3) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man3/ldap_first_entry.3 b/doc/man/man3/ldap_first_entry.3 index 368ad0ffff..7f6c58c37c 100644 --- a/doc/man/man3/ldap_first_entry.3 +++ b/doc/man/man3/ldap_first_entry.3 @@ -1,4 +1,4 @@ -.TH LDAP_FIRST_ENTRY 3 "25 November 1994" "U-M LDAP LDVERSION" +.TH LDAP_FIRST_ENTRY 3 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldap_first_entry, ldap_next_entry, ldap_count_entries \- LDAP result entry parsing and counting routines .SH SYNOPSIS @@ -81,3 +81,8 @@ for a description of possible error codes. .BR ldap_first_attribute(3), .BR ldap_get_values(3), .BR ldap_get_dn(3) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man3/ldap_friendly.3 b/doc/man/man3/ldap_friendly.3 index 1cf254b475..889cd5b132 100644 --- a/doc/man/man3/ldap_friendly.3 +++ b/doc/man/man3/ldap_friendly.3 @@ -1,4 +1,4 @@ -.TH LDAP_FRIENDLY 3 "11 October 1993" "U-M LDAP LDVERSION" +.TH LDAP_FRIENDLY 3 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldap_friendly_name, ldap_free_friendlymap \- LDAP unfriendly to friendly name mapping routine .SH SYNOPSIS @@ -66,3 +66,8 @@ format, or if the \fImap\fP parameter is NULL. ETCDIR/ldapfriendly.conf .SH SEE ALSO .BR ldap (3) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man3/ldap_get_dn.3 b/doc/man/man3/ldap_get_dn.3 index 55530fcbd4..0536578e74 100644 --- a/doc/man/man3/ldap_get_dn.3 +++ b/doc/man/man3/ldap_get_dn.3 @@ -1,4 +1,4 @@ -.TH LDAP_GET_DN 3 "16 June 1995" "U-M LDAP LDVERSION" +.TH LDAP_GET_DN 3 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldap_get_dn, ldap_explode_dn, ldap_dn2ufn, ldap_is_dns_dn, ldap_explode_dns \- LDAP DN handling routines .SH SYNOPSIS @@ -114,3 +114,8 @@ These routines malloc memory that the caller must free. .BR ldap_first_entry(3), .BR ldap_error(3), .BR ldap_value_free(3) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man3/ldap_get_values.3 b/doc/man/man3/ldap_get_values.3 index ac0dcdb6b3..794b172aee 100644 --- a/doc/man/man3/ldap_get_values.3 +++ b/doc/man/man3/ldap_get_values.3 @@ -1,4 +1,4 @@ -.TH LDAP_GET_VALUES 3 "25 November 1994" "U-M LDAP LDVERSION" +.TH LDAP_GET_VALUES 3 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldap_get_values, ldap_get_values_len, ldap_count_values \- LDAP attribute value handling routines .SH SYNOPSIS @@ -97,3 +97,8 @@ These routines malloc memory that the caller must free. .BR ldap_first_entry(3), .BR ldap_first_attribute(3), .BR ldap_error(3) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man3/ldap_getfilter.3 b/doc/man/man3/ldap_getfilter.3 index 67a8df3ccd..c2562731e8 100644 --- a/doc/man/man3/ldap_getfilter.3 +++ b/doc/man/man3/ldap_getfilter.3 @@ -1,4 +1,4 @@ -.TH LDAP_GETFILTER 3 "28 November 1994" "U-M LDAP LDVERSION" +.TH LDAP_GETFILTER 3 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldap_init_getfilter, ldap_init_getfilter_buf, ldap_getfilter_free, ldap_getfirstfilter, ldap_getnextfilter, ldap_build_filter \- LDAP filter generating routines @@ -191,3 +191,8 @@ ETCDIR/ldapfilter.conf .SH SEE ALSO .BR ldap (3), .BR ldapfilter.conf (5) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man3/ldap_modify.3 b/doc/man/man3/ldap_modify.3 index baf71a3736..8e265e63f6 100644 --- a/doc/man/man3/ldap_modify.3 +++ b/doc/man/man3/ldap_modify.3 @@ -1,4 +1,4 @@ -.TH LDAP_MODIFY 3 "15 November 1994" "U-M LDAP LDVERSION" +.TH LDAP_MODIFY 3 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldap_modify, ldap_modify_s \- Perform an LDAP modify operation .SH SYNOPSIS @@ -111,3 +111,8 @@ field of \fIld\fP. .BR ldap (3), .BR ldap_error (3), .BR ldap_add (3) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man3/ldap_modrdn.3 b/doc/man/man3/ldap_modrdn.3 index 1b382758f1..9c97385d2c 100644 --- a/doc/man/man3/ldap_modrdn.3 +++ b/doc/man/man3/ldap_modrdn.3 @@ -1,4 +1,4 @@ -.TH LDAP_MODRDN 3 "1 December 1994" "U-M LDAP LDVERSION" +.TH LDAP_MODRDN 3 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldap_modrdn, ldap_modrdn_s, ldap_modrdn2, ldap_modrdn2_s \- Perform an LDAP modify RDN operation .SH SYNOPSIS @@ -73,3 +73,8 @@ for more details. .SH SEE ALSO .BR ldap (3), .BR ldap_error (3) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man3/ldap_open.3 b/doc/man/man3/ldap_open.3 index 746e66509a..7c19bc9b12 100644 --- a/doc/man/man3/ldap_open.3 +++ b/doc/man/man3/ldap_open.3 @@ -1,4 +1,4 @@ -.TH LDAP_OPEN 3 "28 March 1996" "U-M LDAP LDVERSION" +.TH LDAP_OPEN 3 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldap_init, ldap_open \- Initialize the LDAP library and open a connection to an LDAP server .SH SYNOPSIS @@ -111,3 +111,8 @@ in the LDAP structure. .BR ldap (3), .BR ldap_bind (3), .BR errno (3) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man3/ldap_result.3 b/doc/man/man3/ldap_result.3 index 306e8be44c..4a3039b896 100644 --- a/doc/man/man3/ldap_result.3 +++ b/doc/man/man3/ldap_result.3 @@ -1,4 +1,4 @@ -.TH LDAP_RESULT 3 "26 November 1994" "U-M LDAP LDVERSION" +.TH LDAP_RESULT 3 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldap_result \- Wait for the result of an LDAP operation .SH SYNOPSIS @@ -104,3 +104,8 @@ can be freed by calling .BR ldap (3), .BR ldap_search (3), .BR select (2) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man3/ldap_search.3 b/doc/man/man3/ldap_search.3 index e1a7022bcd..8a149aa9b6 100644 --- a/doc/man/man3/ldap_search.3 +++ b/doc/man/man3/ldap_search.3 @@ -1,4 +1,4 @@ -.TH LDAP_SEARCH 3 "23 November 1994" "U-M LDAP LDVERSION" +.TH LDAP_SEARCH 3 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldap_search, ldap_search_s, ldap_search_st \- Perform an LDAP search operation .SH SYNOPSIS @@ -114,3 +114,8 @@ in . .BR ldap_result (3), .BR ldap_getfilter (3), .BR ldap_error (3) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man3/ldap_searchprefs.3 b/doc/man/man3/ldap_searchprefs.3 index 98b6e78d77..f33ff61ce2 100644 --- a/doc/man/man3/ldap_searchprefs.3 +++ b/doc/man/man3/ldap_searchprefs.3 @@ -1,4 +1,4 @@ -.TH SEARCHPREFS 3 "13 June 1994" "U-M LDAP LDVERSION" +.TH SEARCHPREFS 3 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldap_init_searchprefs, ldap_init_searchprefs_buf, ldap_free_searchprefs, ldap_first_searchobj, ldap_next_searchobj \- LDAP search preference configuration routeines .SH SYNOPSIS @@ -156,3 +156,8 @@ OSI-DS-23, April 1992. Information Processing - Open Systems Interconnection - The Directory, International Organization for Standardization. International Standard 9594, (1988). +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man3/ldap_sort.3 b/doc/man/man3/ldap_sort.3 index f56122af0b..2f2c173f54 100644 --- a/doc/man/man3/ldap_sort.3 +++ b/doc/man/man3/ldap_sort.3 @@ -1,4 +1,4 @@ -.TH LDAP_SORT 3 "14 November 1994" "U-M LDAP LDVERSION" +.TH LDAP_SORT 3 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldap_sort_entries, ldap_sort_values, ldap_sort_strcasecmp \- LDAP sorting routines .SH SYNOPSIS @@ -99,3 +99,8 @@ The return values for all of these functions are declared in the .BR ldap_search (3), .BR ldap_result (3), .BR qsort (3) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man3/ldap_ufn.3 b/doc/man/man3/ldap_ufn.3 index 6fe1a5123d..f2db01d764 100644 --- a/doc/man/man3/ldap_ufn.3 +++ b/doc/man/man3/ldap_ufn.3 @@ -1,4 +1,4 @@ -.TH LDAP_UFN 3 "23 November 1994" "U-M LDAP LDVERSION" +.TH LDAP_UFN 3 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldap_ufn_search_s, ldap_ufn_search_c, ldap_ufn_search_ct, ldap_ufn_setfilter, ldap_ufn_setfilter, ldap_ufn_setprefix, ldap_ufn_timeout \- Perform an LDAP user friendly search operation .SH SYNOPSIS @@ -128,3 +128,8 @@ in . .BR ldap_getfilter (3), .BR ldapfilter.conf (5), .BR ldap_error (3) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man3/ldap_url.3 b/doc/man/man3/ldap_url.3 index 7e04bcc337..f4debb98bc 100644 --- a/doc/man/man3/ldap_url.3 +++ b/doc/man/man3/ldap_url.3 @@ -1,4 +1,4 @@ -.TH LDAP_URL 3 "28 March 1996" "U-M LDAP LDVERSION" +.TH LDAP_URL 3 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldap_is_ldap_url, ldap_url_parse, @@ -134,3 +134,8 @@ Currently available at this URL: .nf ftp://ds.internic.net/internet-drafts/draft-ietf-asid-ldap-format-03.txt .fi +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man3/regex.3 b/doc/man/man3/regex.3 deleted file mode 100644 index ba9cc388bd..0000000000 --- a/doc/man/man3/regex.3 +++ /dev/null @@ -1,326 +0,0 @@ -.TH regex 3 local -.DA Jun 19 1986 -.SH NAME -re_comp, re_exec, re_subs, re_modw, re_fail \- regular expression handling -.SH ORIGIN -Dept. of Computer Science -.br -York University -.SH SYNOPSIS -.B char *re_comp(pat) -.br -.B char *pat; -.PP -.B re_exec(str) -.br -.B char *str; -.PP -.B re_subs(src, dst) -.br -.B char *src; -.br -.B char *dst; -.PP -.B void re_fail(msg, op) -.br -.B char *msg; -.br -.B char op; -.PP -.B void re_modw(str) -.br -.B char *str; - -.SH DESCRIPTION -.PP -These functions implement -.IR ed (1)-style -partial regular expressions and supporting facilities. -.PP -.I Re_comp -compiles a pattern string into an internal form (a deterministic finite-state -automaton) to be executed by -.I re_exec -for pattern matching. -.I Re_comp -returns 0 if the pattern is compiled successfully, otherwise it returns an -error message string. If -.I re_comp -is called with a 0 or a \fInull\fR string, it returns without changing the -currently compiled regular expression. -.sp -.I Re_comp -supports the same limited set of -.I regular expressions -found in -.I ed -and Berkeley -.IR regex (3) -routines: -.sp -.if n .in +1.6i -.if t .in +1i -.de Ti -.if n .ti -1.6i -.if t .ti -1i -.. -.if n .ta 0.8i +0.8i +0.8i -.if t .ta 0.5i +0.5i +0.5i -.Ti -[1] \fIchar\fR Matches itself, unless it is a special -character (meta-character): \fB. \\ [ ] * + ^ $\fR - -.Ti -[2] \fB.\fR Matches \fIany\fR character. - -.Ti -[3] \fB\\\fR Matches the character following it, except -when followed by a digit 1 to 9, \fB(\fR, fB)\fR, \fB<\fR or \fB>\fR. -(see [7], [8] and [9]) It is used as an escape character for all -other meta-characters, and itself. When used -in a set ([4]), it is treated as an ordinary -character. - -.Ti -[4] \fB[\fIset\fB]\fR Matches one of the characters in the set. -If the first character in the set is \fB^\fR, -it matches a character NOT in the set. A -shorthand -.IR S - E -is used to specify a set of -characters -.I S -up to -.IR E , -inclusive. The special -characters \fB]\fR and \fB-\fR have no special -meaning if they appear as the first chars -in the set. -.nf - examples: match: - [a-z] any lowercase alpha - [^]-] any char except ] and - - [^A-Z] any char except - uppercase alpha - [a-zA-Z0-9] any alphanumeric -.fi - -.Ti -[5] \fB*\fR Any regular expression form [1] to [4], followed by -closure char (*) matches zero or more matches of -that form. - -.Ti -[6] \fB+\fR Same as [5], except it matches one or more. - -.Ti -[7] A regular expression in the form [1] to [10], enclosed -as \\(\fIform\fR\\) matches what form matches. The enclosure -creates a set of tags, used for [8] and for -pattern substitution in -.I re_subs. -The tagged forms are numbered -starting from 1. - -.Ti -[8] A \\ followed by a digit 1 to 9 matches whatever a -previously tagged regular expression ([7]) matched. - -.Ti -[9] \fB\\<\fR Matches the beginning of a \fIword\fR, -that is, an empty string followed by a -letter, digit, or _ and not preceded by -a letter, digit, or _ . -.Ti - \fB\\>\fR Matches the end of a \fIword\fR, -that is, an empty string preceded -by a letter, digit, or _ , and not -followed by a letter, digit, or _ . - -.Ti -[10] A composite regular expression -\fIxy\fR where \fIx\fR and \fIy\fR -are in the form of [1] to [10] matches the longest -match of \fIx\fR followed by a match for \fIy\fR. - -.Ti -[11] \fB^ $\fR a regular expression starting with a \fB^\fR character -and/or ending with a \fB$\fR character, restricts the -pattern matching to the beginning of the line, -and/or the end of line [anchors]. Elsewhere in the -pattern, \fB^\fR and \fB$\fR are treated as ordinary characters. -.if n .in -1.6i -.if t .in -1i - -.PP -.I Re_exec -executes the internal form produced by -.I re_comp -and searches the argument string for the regular expression described -by the internal -form. -.I Re_exec -returns 1 if the last regular expression pattern is matched within the string, -0 if no match is found. In case of an internal error (corrupted internal -form), -.I re_exec -calls the user-supplied -.I re_fail -and returns 0. -.PP -The strings passed to both -.I re_comp -and -.I re_exec -may have trailing or embedded newline characters. The strings -must be terminated by nulls. -.PP -.I Re_subs -does -.IR ed -style -pattern substitution, after a successful match is found by -.I re_exec. -The source string parameter to -.I re_subs -is copied to the destination string with the following interpretation; -.sp -.if n .in +1.6i -.if t .in +1i -.Ti -[1] & Substitute the entire matched string in the destination. - -.Ti -[2] \\\fIn\fR Substitute the substring matched by a tagged subpattern -numbered \fIn\fR, where \fIn\fR is between 1 to 9, inclusive. - -.Ti -[3] \\\fIchar\fR Treat the next character literally, -unless the character is a digit ([2]). -.if n .in -1.6i -.if t .in -1i - -.PP -If the copy operation with the substitutions is successful, -.I re_subs -returns 1. -If the source string is corrupted, or the last call to -.I re_exec -fails, it returns 0. - -.I Re_modw -is used to -add new characters into an internal table to -change the re_exec's understanding of what -a \fIword\fR should look like, when matching with \fB\\<\fR and \fB\\>\fR -constructs. If the string parameter is 0 or null string, -the table is reset back to the default, which contains \fBA-Z a-z 0-9 _\fR . - -.I Re_fail -is a user-supplied routine to handle internal errors. -.I re_exec -calls -.I re_fail -with an error message string, and the opcode character that caused the error. -The default -.I re_fail -routine simply prints the message and the opcode character to -.I stderr -and invokes -.IR exit (2). -.SH EXAMPLES -In the examples below, the -.I nfaform -describes the internal form after the pattern is compiled. For additional -details, refer to the sources. -.PP -.ta 0.5i +0.5i +0.5i -.nf -foo*.* - nfaform: CHR f CHR o CLO CHR o END CLO ANY END END - matches: \fIfo foo fooo foobar fobar foxx ...\fR - -fo[ob]a[rz] - nfaform: CHR f CHR o CCL 2 o b CHR a CCL 2 r z END - matches: \fIfobar fooar fobaz fooaz\fR - -foo\\\\+ - nfaform: CHR f CHR o CHR o CHR \\ CLO CHR \\ END END - matches: \fIfoo\\ foo\\\\ foo\\\\\\ ...\fR - -\\(foo\\)[1-3]\\1 (same as foo[1-3]foo, but takes less internal space) - nfaform: BOT 1 CHR f CHR o CHR o EOT 1 CCL 3 1 2 3 REF 1 END - matches: \fIfoo1foo foo2foo foo3foo\fR - -\\(fo.*\\)-\\1 - nfaform: BOT 1 CHR f CHR o CLO ANY END EOT 1 CHR - REF 1 END - matches: \fIfoo-foo fo-fo fob-fob foobar-foobar ...\fR -.SH DIAGNOSTICS -.I Re_comp -returns one of the following strings if an error occurs: -.PP -.nf -.in +0.5i -\fINo previous regular expression, -Empty closure, -Illegal closure, -Cyclical reference, -Undetermined reference, -Unmatched \e(, -Missing ], -Null pattern inside \e(\e), -Null pattern inside \e<\e>, -Too many \e(\e) pairs, -Unmatched \e)\fP. -.in -0.5i -.fi -.SH REFERENCES -.if n .ta 3i -.if t .ta 1.8i -.nf -\fISoftware tools\fR Kernighan & Plauger -\fISoftware tools in Pascal\fR Kernighan & Plauger -\fIGrep sources\fR [rsx-11 C dist] David Conroy -\fIEd - text editor\fR Unix Programmer's Manual -\fIAdvanced editing on Unix\fR B. W. Kernighan -\fIRegExp sources\fR Henry Spencer -.fi -.SH "HISTORY AND NOTES" -These routines are derived from various implementations -found in -.I "Software Tools" -books, and David Conroy's -.I grep. -They are NOT derived from licensed/restricted software. -For more interesting/academic/complicated implementations, -see Henry Spencer's -.I regexp -routines (V8), or -.I "GNU Emacs" -pattern -matching module. -.PP -The -.I re_comp -and -.I re_exec -routines perform -.I almost -as well as their licensed counterparts, sometimes better. -In very few instances, they -are about 10% to 15% slower. -.SH AUTHOR -Ozan S. Yigit (oz) -.br -usenet: utzoo!yetti!oz -.br -bitnet: oz@yusol || oz@yuyetti -.SH "SEE ALSO" -ed(1), ex(1), egrep(1), fgrep(1), grep(1), regex(3) -.SH BUGS -These routines are \fIPublic Domain\fR. You can get them -in source. -.br -The internal storage for the \fInfa form\fR is not checked for -overflows. Currently, it is 1024 bytes. -.br -Others, no doubt. diff --git a/doc/man/man5/ldapfilter.conf.5 b/doc/man/man5/ldapfilter.conf.5 index 954bc2fd4d..ff70b7cf35 100644 --- a/doc/man/man5/ldapfilter.conf.5 +++ b/doc/man/man5/ldapfilter.conf.5 @@ -1,4 +1,4 @@ -.TH LDAPFILTER.CONF 5 "21 September 1994" "U-M LDAP LDVERSION" +.TH LDAPFILTER.CONF 5 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldapfilter.conf \- configuration file for LDAP get filter routines .SH SYNOPSIS @@ -196,3 +196,8 @@ ETCDIR/ldapfilter.conf .SH SEE ALSO .BR ldap (3), .BR ldap_getfilter (3) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man5/ldapfriendly.5 b/doc/man/man5/ldapfriendly.5 index 088fd13560..f3aaf877d0 100644 --- a/doc/man/man5/ldapfriendly.5 +++ b/doc/man/man5/ldapfriendly.5 @@ -1,4 +1,4 @@ -.TH LDAPFRIENDLY 5 "24 November 1994" "U-M LDAP LDVERSION" +.TH LDAPFRIENDLY 5 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldapfriendly \- configuration file for LDAP friendly routines .SH SYNOPSIS @@ -24,3 +24,8 @@ ETCDIR/ldapfriendly .SH SEE ALSO .BR ldap (3), .BR ldap_friendly_name (3) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man5/ldapsearchprefs.conf.5 b/doc/man/man5/ldapsearchprefs.conf.5 index 7f58505ed3..db8c09a0d1 100644 --- a/doc/man/man5/ldapsearchprefs.conf.5 +++ b/doc/man/man5/ldapsearchprefs.conf.5 @@ -1,4 +1,4 @@ -.TH LDAPSEARCHPREFS.CONF 5 "1 December 1994" "U-M LDAP LDVERSION" +.TH LDAPSEARCHPREFS.CONF 5 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldapsearchprefs.conf \- configuration file for LDAP search preference routines .SH SYNOPSIS @@ -244,3 +244,8 @@ ETCDIR/ldapsearchprefs.conf .SH SEE ALSO .BR ldap (3). .BR ldap-searchprefs (3) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man5/ldaptemplates.conf.5 b/doc/man/man5/ldaptemplates.conf.5 index 5b6579eb34..2c07b08394 100644 --- a/doc/man/man5/ldaptemplates.conf.5 +++ b/doc/man/man5/ldaptemplates.conf.5 @@ -1,4 +1,4 @@ -.TH LDAPTEMPLATES.CONF 5 "13 December 1994" "U-M LDAP LDVERSION" +.TH LDAPTEMPLATES.CONF 5 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldaptemplates.conf \- configuration file for LDAP display template routines .SH SYNOPSIS @@ -273,3 +273,8 @@ ETCDIR/ldaptemplates.conf .SH SEE ALSO .BR ldap (3), .BR ldap_disptmpl (3) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man5/ldif.5 b/doc/man/man5/ldif.5 index 3eaba3b54c..1a81714bef 100644 --- a/doc/man/man5/ldif.5 +++ b/doc/man/man5/ldif.5 @@ -1,4 +1,4 @@ -.TH LDIF 5 "13 November 1995" "U-M LDAP LDVERSION" +.TH LDIF 5 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldif \- LDAP Data Interchange Format .SH DESCRIPTION @@ -105,3 +105,8 @@ base 64. .BR ldbmcat (8) .LP "The SLAPD and SLURPD Administrator's Guide" +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man5/slapd.conf.5 b/doc/man/man5/slapd.conf.5 index e0e6249d02..06c5063151 100644 --- a/doc/man/man5/slapd.conf.5 +++ b/doc/man/man5/slapd.conf.5 @@ -1,4 +1,4 @@ -.TH SLAPD.CONF 5 "13 November 1995" "U-M LDAP LDVERSION" +.TH SLAPD.CONF 5 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME slapd.conf \- configuration file for slapd, the stand-alone LDAP daemon .SH SYNOPSIS @@ -338,3 +338,8 @@ ETCDIR/slapd.conf .BR slurpd (8), .LP "The SLAPD and SLURPD Administrator's Guide" +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man5/slapd.replog.5 b/doc/man/man5/slapd.replog.5 index 83d0cc69fd..996f278991 100644 --- a/doc/man/man5/slapd.replog.5 +++ b/doc/man/man5/slapd.replog.5 @@ -1,4 +1,4 @@ -.TH SLAPD.REPLOG 5 "11 April 1995" "U-M LDAP LDVERSION" +.TH SLAPD.REPLOG 5 "22 September 1998" "OpenLDAP LDVERSION" .SH NAME slapd.replog \- slapd replication log format .SH SYNOPSIS @@ -156,3 +156,8 @@ slapd.replog.lock .BR ldif (5), .BR slapd (8), .BR slurpd (8) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man5/ud.conf.5 b/doc/man/man5/ud.conf.5 index 13575bf7ea..88f450581d 100644 --- a/doc/man/man5/ud.conf.5 +++ b/doc/man/man5/ud.conf.5 @@ -1,4 +1,4 @@ -.TH UD.CONF 5 "18 March 1993" "U-M LDAP LDVERSION" +.TH UD.CONF 5 "22 September 1998" "OpenLDAP LDVERSION" .UC 6 .SH NAME ud.conf \- ud configuration file @@ -94,3 +94,8 @@ ud(1), ldap(3) .SH AUTHOR Bryan Beecher, University of Michigan +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man8/centipede.8 b/doc/man/man8/centipede.8 index 680e9b971d..a36356d1e8 100644 --- a/doc/man/man8/centipede.8 +++ b/doc/man/man8/centipede.8 @@ -1,8 +1,8 @@ -.TH CENTIPEDE 8C "2 December 1995" "U-M LDAP LDVERSION" +.TH CENTIPEDE 8C "22 September 1998" "OpenLDAP LDVERSION" .SH NAME centipede \- LDAP centroid index generation and maintenance program .SH SYNOPSIS -.B ETCDIR/centipede +.B SBINDIR/centipede .B [\-f filter] .B [\-F] [\-R] .B [\-f filter] [\-t directory] @@ -25,7 +25,7 @@ The basic form of the command is as follows .LP .nf .ft tt - ETCDIR/centipede [options] + SBINDIR/centipede [options] -s "ldap://[host/]subtree-to-index-dn" -d "ldap://[host/]parent-of-index-entry-dn" attributes @@ -61,7 +61,7 @@ like this: .LP .nf .ft tt - ETCDIR/centipede -f '(objectclass=person)' + SBINDIR/centipede -f '(objectclass=person)' -m simple -b your-rootdn -p your-rootdnpw -s "ldap://babs.com/o=BabsCo, c=US" -d "ldap://vertigo.rs.itd.umich.edu/c=US" @@ -152,3 +152,8 @@ etc.). A future version may also allow weights to be generated. .BR slapd (8) .LP "The SLAPD and SLURPD Administrator's Guide" +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man8/chlog2replog.8 b/doc/man/man8/chlog2replog.8 index e99dfd81c9..15f295d5d6 100644 --- a/doc/man/man8/chlog2replog.8 +++ b/doc/man/man8/chlog2replog.8 @@ -1,9 +1,9 @@ -.TH CHLOG2REPLOG 8C "26 April 1996" "U-M LDAP LDVERSION" +.TH CHLOG2REPLOG 8C "22 September 1998" "OpenLDAP LDVERSION" .SH NAME chlog2replog \- convert an X.500 DSA-style changelog to an LDAP-style replication log .SH SYNOPSIS -.B ETCDIR/chlog2replog +.B SBINDIR/chlog2replog .B \-r hostname:port [\-r hostname:port ...] .B \-d dn\-suffix [\-o output\-file] < input\-file .LP @@ -64,7 +64,7 @@ DNs, and including a replica: entry for host "ldapserver," port .LP .nf .ft tt - ETCDIR/chlog2replog -d ", o=University of Michigan, c=US" + SBINDIR/chlog2replog -d ", o=University of Michigan, c=US" -r ldapserver:389 < changelog .ft .fi @@ -75,7 +75,7 @@ give this command: .LP .nf .ft tt - ETCDIR/chlog2replog -d ", o=University of Michigan, c=US" + SBINDIR/chlog2replog -d ", o=University of Michigan, c=US" -r ldapserver:389 -o replog < changelog .ft .fi @@ -86,7 +86,7 @@ give this command: .LP .nf .ft tt - tail +0f changelog | ETCDIR/chlog2replog + tail +0f changelog | SBINDIR/chlog2replog -d ", o=University of Michigan, c=US" -r ldapserver:389 -o replog < changelog .ft @@ -100,3 +100,8 @@ give this command: .BR slapd (8), .LP "The SLAPD and SLURPD Administrator's Guide" +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man8/edb2ldif.8 b/doc/man/man8/edb2ldif.8 index 15c066f8c2..6b93f10f67 100644 --- a/doc/man/man8/edb2ldif.8 +++ b/doc/man/man8/edb2ldif.8 @@ -1,8 +1,8 @@ -.TH EDB2LDIF 8C "12 November 1995" "U-M LDAP LDVERSION" +.TH EDB2LDIF 8C "22 September 1998" "OpenLDAP LDVERSION" .SH NAME edb2ldif \- QUIPU EDB file to LDIF conversion tool .SH SYNOPSIS -.B ETCDIR/edb2ldif +.B SBINDIR/edb2ldif .B [\-d] [\-v] [\-r] [\-o] [\-b basedn] .B [\-a addvalsfile] [\-f fileattrdir] .B [\-i ignoreattr...] [edbfile...] @@ -97,3 +97,8 @@ Specify an attribute that should not be converted. You can include as many "The SLAPD and SLURPD Administrator's Guide" .LP Volume 5 of The ISODE Manual +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man8/go500.8 b/doc/man/man8/go500.8 index 6fbbf8f5d3..26f2b040d9 100644 --- a/doc/man/man8/go500.8 +++ b/doc/man/man8/go500.8 @@ -1,8 +1,8 @@ -.TH GO500 8C "27 November 1994" "U-M LDAP LDVERSION" +.TH GO500 8C "22 September 1998" "OpenLDAP LDVERSION" .SH NAME go500 \- Local Gopher index search to X.500 search gateway .SH SYNOPSIS -.B ETCDIR/go500 [\-b searchbase] [\-d level] [\-l] +.B LIBEXECDIR/go500 [\-b searchbase] [\-d level] [\-l] .B [\-x hostname] [\-c rdncount] [\-f filterfile] .B [\-t templatefile] .B [\-p port] [\-I] @@ -27,7 +27,7 @@ as a stand-alone server, simply start it with no arguments .LP .nf .ft tt - ETCDIR/go500 + LIBEXECDIR/go500 .ft .fi .LP @@ -38,8 +38,8 @@ or equivalent file: .LP .nf .ft tt - if [ -f ETCDIR/go500 ]; then - ETCDIR/go500; echo ' go500' + if [ -f LIBEXECDIR/go500 ]; then + LIBEXECDIR/go500; echo ' go500' fi .ft .fi @@ -65,7 +65,7 @@ file, or the equivalent: .LP .nf .ft tt - go500 stream tcp nowait nobody ETCDIR/go500 go500 -I + go500 stream tcp nowait nobody LIBEXECDIR/go500 go500 -I .ft .fi .LP @@ -168,3 +168,8 @@ include file. .BR inetd (8), .BR gopherd (8), .BR go500gw (8) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man8/go500gw.8 b/doc/man/man8/go500gw.8 index 4464a88b43..5186c64dbb 100644 --- a/doc/man/man8/go500gw.8 +++ b/doc/man/man8/go500gw.8 @@ -1,8 +1,8 @@ -.TH GO500GW 8C "27 November 1994" "U-M LDAP LDVERSION" +.TH GO500GW 8C "22 September 1998" "OpenLDAP LDVERSION" .SH NAME go500gw \- General Gopher to X.500 gateway for browsing and searching .SH SYNOPSIS -.B ETCDIR/go500gw [\-a] [\-d level] [\-f filterfile] +.B LIBEXECDIR/go500gw [\-a] [\-d level] [\-f filterfile] .B [\-t templatefile] [\-c rdncount] .B [\-h helpfile] [\-l] [\-p listenport] .B [\-P ldapport] [\-x ldaphost] [\-I] @@ -27,7 +27,7 @@ as a stand-alone server, simply start it with no arguments .LP .nf .ft tt - ETCDIR/go500gw + LIBEXECDIR/go500gw .ft .fi .LP @@ -38,8 +38,8 @@ or equivalent file: .LP .nf .ft tt - if [ -f ETCDIR/go500gw ]; then - ETCDIR/go500gw; echo ' go500gw' + if [ -f LIBEXECDIR/go500gw ]; then + LIBEXECDIR/go500gw; echo ' go500gw' fi .ft .fi @@ -64,7 +64,7 @@ file, or the equivalent: .LP .nf .ft tt - go500gw stream tcp nowait nobody ETCDIR/go500gw go500gw -I + go500gw stream tcp nowait nobody LIBEXECDIR/go500gw go500gw -I .ft .fi .LP @@ -168,3 +168,8 @@ include file. .BR inetd (8), .BR gopherd (8), .BR go500 (8) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man8/in.xfingerd.8 b/doc/man/man8/in.xfingerd.8 index a2cf788b18..1b92f6aa99 100644 --- a/doc/man/man8/in.xfingerd.8 +++ b/doc/man/man8/in.xfingerd.8 @@ -1,8 +1,8 @@ -.TH IN.XFINGERD 8C "27 November 1994" "U-M LDAP LDVERSION" +.TH IN.XFINGERD 8C "22 September 1998" "OpenLDAP LDVERSION" .SH NAME in.xfingerd \- Finger to LDAP/X.500 gateway daemon .SH SYNOPSIS -.B ETCDIR/in.xfingerd [\-f filterfile] [\-i] +.B LIBEXECDIR/in.xfingerd [\-f filterfile] [\-i] .B [\-l] [\-t templatefile] [\-c rdncount] [\-x hostname] .B [\-p port] .SH DESCRIPTION @@ -22,7 +22,7 @@ file, or the equivalent: .LP .nf .ft tt - finger stream tcp nowait nobody ETCDIR/in.xfingerd in.xfingerd + finger stream tcp nowait nobody LIBEXECDIR/in.xfingerd in.xfingerd .ft .fi .LP @@ -77,3 +77,8 @@ for your site. .BR ldap (3), .BR ldap_getfilter (3), .BR inetd (8), +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man8/ldapd.8 b/doc/man/man8/ldapd.8 index d771093776..b8704f68f1 100644 --- a/doc/man/man8/ldapd.8 +++ b/doc/man/man8/ldapd.8 @@ -1,8 +1,8 @@ -.TH LDAPD 8C "15 June 1992" "U-M LDAP LDVERSION" +.TH LDAPD 8C "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldapd \- LDAP X.500 Protocol Daemon .SH SYNOPSIS -.B ETCDIR/ldapd [\-d level] [\-l] [\-c dsaname] +.B LIBEXECDIR/ldapd [\-d level] [\-l] [\-c dsaname] .B [\-p port] [\-t timeout] [\-r referraltimeout] .B [\-I] [\-U] .SH DESCRIPTION @@ -103,7 +103,7 @@ to the first DSA listed in the dsaptailor file, just type: .LP .nf .ft tt - ETCDIR/ldapd + LIBEXECDIR/ldapd .ft .fi .LP @@ -112,7 +112,7 @@ will be printed on standard error, type: .LP .nf .ft tt - ETCDIR/ldapd -c dsanameoraddr -d 31 + LIBEXECDIR/ldapd -c dsanameoraddr -d 31 .ft .fi .LP @@ -125,3 +125,8 @@ in the local dsaptailor file. .BR inetd (8) .LP Volume 5 of The ISODE Manual +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man8/ldbmcat.8 b/doc/man/man8/ldbmcat.8 index f7fefeff77..96c9350309 100644 --- a/doc/man/man8/ldbmcat.8 +++ b/doc/man/man8/ldbmcat.8 @@ -1,8 +1,8 @@ -.TH LDBMCAT 8C "13 November 1995" "U-M LDAP LDVERSION" +.TH LDBMCAT 8C "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldbmcat \- LDBM to LDIF database format conversion utility .SH SYNOPSIS -.B ETCDIR/ldbmcat [\-n] id2entry\-file +.B SBINDIR/ldbmcat [\-n] id2entry\-file .LP .SH DESCRIPTION .LP @@ -33,7 +33,7 @@ give the command: .LP .nf .ft tt - ETCDIR/ldbmcat -n id2entry.dbb > ldif + SBINDIR/ldbmcat -n id2entry.dbb > ldif .ft .fi .LP @@ -43,8 +43,8 @@ attribute, give these commands: .LP .nf .ft tt - ETCDIR/ldbmcat id2entry.dbb > ldif - ETCDIR/ldif2index -i ldif -f slapd-config-file mail + SBINDIR/ldbmcat id2entry.dbb > ldif + SBINDIR/ldif2index -i ldif -f slapd-config-file mail .ft .fi .LP @@ -59,3 +59,8 @@ mode) when you do this to ensure consistency of the database. .BR slapd (8) .LP "The SLAPD and SLURPD Administrator's Guide" +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man8/ldif.8 b/doc/man/man8/ldif.8 index 2482de3074..034e7abc35 100644 --- a/doc/man/man8/ldif.8 +++ b/doc/man/man8/ldif.8 @@ -1,8 +1,8 @@ -.TH LDIF 8C "15 November 1995" "U-M LDAP LDVERSION" +.TH LDIF 8C "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldif \- convert arbitrary data to LDIF format .SH SYNOPSIS -.B ETCDIR/ldif [\-b] attr\-name +.B SBINDIR/ldif [\-b] attr\-name .LP .SH DESCRIPTION .LP @@ -46,3 +46,8 @@ containing a single value. .BR slapd (8) .LP "The SLAPD and SLURPD Administrator's Guide" +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man8/ldif2ldbm.8 b/doc/man/man8/ldif2ldbm.8 index f6edfc6a52..a34d8d34cb 100644 --- a/doc/man/man8/ldif2ldbm.8 +++ b/doc/man/man8/ldif2ldbm.8 @@ -1,22 +1,22 @@ -.TH LDIF2LDBM 8C "13 November 1995" "U-M LDAP LDVERSION" +.TH LDIF2LDBM 8C "22 September 1998" "OpenLDAP LDVERSION" .SH NAME ldif2ldbm, ldif2index, ldif2id2entry, ldif2id2children \- LDIF to LDBM database format conversion utilities .SH SYNOPSIS -.B ETCDIR/ldif2ldbm +.B SBINDIR/ldif2ldbm .B \-i ldif\-input\-file .B [\-d debug\-level] [\-f slapd\-config\-file] .B [\-j number\-of\-jobs] .LP -.B ETCDIR/ldif2index +.B SBINDIR/ldif2index .B \-i ldif\-input\-file .B [\-d debug\-level] [\-f slapd\-config\-file] .B attribute\-name .LP -.B ETCDIR/ldif2id2entry +.B SBINDIR/ldif2id2entry .B \-i ldif\-input\-file .B [\-d debug\-level] [\-f slapd\-config\-file] .LP -.B ETCDIR/ldif2id2children +.B SBINDIR/ldif2id2children .B \-i ldif\-input\-file .B [\-d debug\-level] [\-f slapd\-config\-file] .LP @@ -85,12 +85,12 @@ To convert the file into an LDBM database with indexes as described in the .I slapd config file -.BR /usr/local/etc/slapd.conf , +.BR ETCDIR/slapd.conf , give the command: .LP .nf .ft tt - ETCDIR/ldif2index -i ldif.input -f /usr/local/etc/slapd.conf + SBINDIR/ldif2index -i ldif.input -f ETCDIR/slapd.conf .ft .fi .LP @@ -99,7 +99,7 @@ give this command: .LP .nf .ft tt - ETCDIR/ldif2index -i ldif.input -f /usr/local/etc/slapd.conf -j 2 + SBINDIR/ldif2index -i ldif.input -f ETCDIR/slapd.conf -j 2 .ft .fi .LP @@ -111,3 +111,8 @@ give this command: .BR edb2ldif (8) .LP "The SLAPD and SLURPD Administrator's Guide" +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man8/mail500.8 b/doc/man/man8/mail500.8 index fd9bffb105..c517b1470d 100644 --- a/doc/man/man8/mail500.8 +++ b/doc/man/man8/mail500.8 @@ -1,14 +1,14 @@ -.TH MAIL500 8C "30 November 1994" "U-M LDAP LDVERSION" +.TH MAIL500 8C "22 September 1998" "OpenLDAP LDVERSION" .SH NAME mail500 \- X.500 capable mailer .LP fax500 \- X.500 capable fax delivery agent .SH SYNOPSIS -.B ETCDIR/mail500 [\-d level] [\-f mailfrom] +.B LIBEXECDIR/mail500 [\-d level] [\-f mailfrom] .B [\-h hostname] [\-l ldaphost] .B [\-m address] [\-v vacationhost] .LP -.B ETCDIR/fax500 [\-d level] [\-f mailfrom] +.B LIBEXECDIR/fax500 [\-d level] [\-f mailfrom] .B [\-h hostname] [\-l ldaphost] .B [\-m address] .SH DESCRIPTION @@ -253,8 +253,8 @@ The mail500 and fax500 mailers should be defined similar to this in the sendmail.cf file: .LP .nf -Mmail500, P=ETCDIR/mail500, F=DFMSmnXuh, A=mail500 -f $f -h $h -m $n@$w $u -Mfax500, P=ETCDIR/fax500, F=DFMSmnXuh, A=fax500 -f $f -h $h -m $n@$w $u +Mmail500, P=LIBEXECDIR/mail500, F=DFMSmnXuh, A=mail500 -f $f -h $h -m $n@$w $u +Mfax500, P=LIBEXECDIR/fax500, F=DFMSmnXuh, A=fax500 -f $f -h $h -m $n@$w $u .fi .LP This defines how mail500/fax500 will be treated by sendmail and what @@ -285,3 +285,8 @@ but not to fax500. .BR ldap(3), .BR sendmail.cf(5), .BR sendmail(8), +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man8/rcpt500.8 b/doc/man/man8/rcpt500.8 index 3131812bb8..a8d71566cf 100644 --- a/doc/man/man8/rcpt500.8 +++ b/doc/man/man8/rcpt500.8 @@ -1,8 +1,8 @@ -.TH RCPT500 8C "16 December 1994" "U-M LDAP LDVERSION" +.TH RCPT500 8C "22 September 1998" "OpenLDAP LDVERSION" .SH NAME rcpt500 \- mail to X.500 gateway program .SH SYNOPSIS -.B ETCDIR/rcpt500 [\-l] [\-h ldaphost] [\-p ldapport] +.B LIBEXECDIR/rcpt500 [\-l] [\-h ldaphost] [\-p ldapport] .B [\-b searchbase] [\-a] [\-U] [\-z sizelimit] [\-u dapuser] .B [\-f filterfile] [\-t templatefile] [\-c rdncount] .SH DESCRIPTION @@ -27,7 +27,7 @@ invoked whenever mail is sent to the address \fInamelookup\fP on your host: .nf .fi .ft tt - namelookup: "|ETCDIR/rcpt500 -l" + namelookup: "|LIBEXECDIR/rcpt500 -l" .ft .fi .SH OPTIONS @@ -84,3 +84,8 @@ help file .BR ldap (3), .BR aliases (5), .BR sendmail (8) +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man8/slapd.8 b/doc/man/man8/slapd.8 index be0c97d3bf..e63ca7450e 100644 --- a/doc/man/man8/slapd.8 +++ b/doc/man/man8/slapd.8 @@ -1,8 +1,8 @@ -.TH SLAPD 8C "6 November 1995" "U-M LDAP LDVERSION" +.TH SLAPD 8C "22 September 1998" "OpenLDAP LDVERSION" .SH NAME slapd \- Stand-alone LDAP Daemon .SH SYNOPSIS -.B ETCDIR/slapd [\-d debug\-level] +.B LIBEXECDIR/slapd [\-d debug\-level] .B [\-f slapd\-config\-file] [\-p port\-number] .B [\-s syslog\-level] [\-i] .B @@ -78,7 +78,7 @@ the LDAP databases defined in the default config file, just type: .LP .nf .ft tt - ETCDIR/slapd + LIBEXECDIR/slapd .ft .fi .LP @@ -89,7 +89,7 @@ on voluminous debugging which will be printed on standard error, type: .LP .nf .ft tt - ETCDIR/slapd -f /usr/local/slapd/slapd.conf -d 255 + LIBEXECDIR/slapd -f ETCDIR/slapd.conf -d 255 .ft .fi .LP @@ -102,3 +102,8 @@ on voluminous debugging which will be printed on standard error, type: .SH BUGS When using the LDBM database backend, the Modify RDN operation does not update the attribute values in the entry that are affected by the change. +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. diff --git a/doc/man/man8/slurpd.8 b/doc/man/man8/slurpd.8 index 037584e8a1..d2f7e4945a 100644 --- a/doc/man/man8/slurpd.8 +++ b/doc/man/man8/slurpd.8 @@ -1,8 +1,8 @@ -.TH SLURPD 8C "6 November 1995" "U-M LDAP LDVERSION" +.TH SLURPD 8C "22 September 1998" "OpenLDAP LDVERSION" .SH NAME slurpd \- Standalone LDAP Update Replication Daemon .SH SYNOPSIS -.B ETCDIR/slurpd [\-d debug\-level] +.B LIBEXECDIR/slurpd [\-d debug\-level] .B [\-f slapd\-config\-file] [\-r slapd\-replog\-file] .B [\-t temp\-dir] [\-o] [\-k srvtab\-file] .B @@ -126,7 +126,7 @@ just type: .LP .nf .ft tt - ETCDIR/slurpd + LIBEXECDIR/slurpd .ft .fi .LP @@ -139,7 +139,7 @@ on voluminous debugging which will be printed on standard error, type: .LP .nf .ft tt - ETCDIR/slurpd -f /usr/local/etc/slapd.conf -d 255 + LIBEXECDIR/slurpd -f ETCDIR/slapd.conf -d 255 .ft .fi .LP @@ -149,3 +149,8 @@ on voluminous debugging which will be printed on standard error, type: .BR slapd (8) .LP "The SLAPD and SLURPD Administrator's Guide" +.SH ACKNOWLEDGEMENTS +.B OpenLDAP +is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). +.B OpenLDAP +is derived from University of Michigan LDAP 3.3 Release. From aee4d49032a5c2961ddce798452b9c5578970fd5 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 23 Sep 1998 04:27:57 +0000 Subject: [PATCH 079/148] 3.3 -> 1.0.1 --- build/version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/version b/build/version index eb39e5382f..7dea76edb3 100644 --- a/build/version +++ b/build/version @@ -1 +1 @@ -3.3 +1.0.1 From 84864e55e15615fd56db509f3d41be75922d5c29 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 23 Sep 1998 04:33:15 +0000 Subject: [PATCH 080/148] Added acconfig.h defines. started to clean up -llber. --- INSTALL | 26 +- acconfig.h | 41 +- aclocal.m4 | 12 + configure | 848 +++++++++++++++++++++++++------------ configure.in | 117 ++++- include/bridge.h | 5 + include/portable.h.bot | 1 + include/portable.h.in | 57 ++- libraries/liblber/bprint.c | 27 +- libraries/liblber/decode.c | 29 +- libraries/liblber/dtest.c | 5 +- 11 files changed, 832 insertions(+), 336 deletions(-) diff --git a/INSTALL b/INSTALL index fa2c404b70..191693492b 100644 --- a/INSTALL +++ b/INSTALL @@ -20,7 +20,9 @@ these steps: 2. Type: % ./configure --help - to list available configuration options. + to list available configuration options. A description of + these options is provided in the 'CONFIGURE OPTIONS' section + below. The configure script will also use your environmental variables for determining compiler/linker options. @@ -31,6 +33,9 @@ these steps: CPPFLAGS CPP Flags (-I/path/include -Ddef) LDFLAGS LDFLAGS (-L/path/lib -llib) + A list of defines and other options are noted in the + 'DEFINES and FLAGS' comments below. + 3. edit the file include/ldapconfig.h.edit to configure the software for your site (the files are well-commented): @@ -101,4 +106,23 @@ Follow these steps for each different platform: Note: make depend in VPATH environment is not yet supported. + +CONFIGURE OPTIONS + +Regrettably, this section has not been written (yet). See +"./configure --help" for current list of options. + + +DEFINES and FLAGS + +The configure script will also use your environmental +variables for determining compiler/linker options. This can +be used to manual specify features and compilation options. + +Supported Environmental Variables + CC C Compiler (cc, ecgs) + CFLAGS C Flags (-ansi) + CPPFLAGS CPP Flags (-I/path/include -Ddef) + LDFLAGS LDFLAGS (-L/path/lib -llib) + End of OpenLDAP INSTALL file. diff --git a/acconfig.h b/acconfig.h index b34ceaf659..00babca70b 100644 --- a/acconfig.h +++ b/acconfig.h @@ -8,9 +8,48 @@ /* define this if sys_errlist is not defined in stdio.h or errno.h */ #undef DECL_SYS_ERRLIST -/* define this you have crypt */ +/* define if you have berkeley db */ +#undef HAVE_BERKELEY_DB2 + +/* define if you have berkeley db2 */ +#undef HAVE_BERKELEY_DB2 + +/* define if you have Mach CThreads */ +#undef HAVE_CTHREADS + +/* define if you have crypt */ #undef HAVE_CRYPT +/* define if you have DCE */ +#undef HAVE_DCE + +/* define if you have GDBM */ +#undef HAVE_GDBM + +/* define if you have Kerberos */ +#undef HAVE_KERBEROS + +/* define if you have LinuxThreads */ +#undef HAVE_LINUX_THREADS + +/* define if you have Sun LWP (SunOS style) */ +#undef HAVE_LWP + +/* define if you have Sun LWP (Solaris style) */ +#undef HAVE_LWP_THR + +/* define if you have NDBM */ +#undef HAVE_NDBM + +/* define if you have a preemptive POSIX Threads implementation */ +#undef HAVE_PREEMPTIVE_PTHREADS + +/* define if you have POSIX Threads */ +#undef HAVE_PTHREADS + +/* define if your POSIX Threads implementatin is circa Draft 4 */ +#undef HAVE_PTHREADS_D4 + /* define this for connectionless LDAP support */ #undef LDAP_CONNECTIONLESS diff --git a/aclocal.m4 b/aclocal.m4 index 3492f08721..1df969aa99 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -112,6 +112,9 @@ AC_DEFUN([OL_BERKELEY_DB2], ol_cv_berkeley_db2=yes fi ]) + if test $ol_cv_berkeley_db2 = yes ; then + AC_DEFINE(HAVE_BERKELEY_DB2) + fi ])dnl dnl dnl ==================================================================== @@ -175,6 +178,9 @@ AC_DEFUN([OL_BERKELEY_DB], ol_cv_berkeley_db=yes fi ]) + if test $ol_cv_berkeley_db = yes ; then + AC_DEFINE(HAVE_BERKELEY_DB) + fi ])dnl dnl dnl ==================================================================== @@ -217,6 +223,9 @@ AC_DEFUN([OL_GDBM], ol_cv_gdbm=yes fi ]) + if test $ol_cv_gdbm = yes ; then + AC_DEFINE(HAVE_GDBM) + fi ])dnl dnl dnl ==================================================================== @@ -270,6 +279,9 @@ AC_DEFUN([OL_NDBM], ol_cv_ndbm=yes fi ]) + if test $ol_cv_ndbm = yes ; then + AC_DEFINE(HAVE_NDBM) + fi ])dnl dnl dnl ==================================================================== diff --git a/configure b/configure index dd1ceb1df0..fd5b50eb5c 100755 --- a/configure +++ b/configure @@ -28,6 +28,8 @@ ac_help="$ac_help --with-kerberos use Kerberos (auto)" ac_help="$ac_help --with-threads use threads (auto)" +ac_help="$ac_help + --with-preemptive thread implementation is preemptive (auto)" ac_help="$ac_help --enable-ldapd enable building ldapd (no)" ac_help="$ac_help @@ -585,7 +587,7 @@ ac_config_sub=$ac_aux_dir/config.sub ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. echo $ac_n "checking configure arguments""... $ac_c" 1>&6 -echo "configure:589: checking configure arguments" >&5 +echo "configure:591: checking configure arguments" >&5 # OpenLDAP --enable-debug @@ -751,6 +753,27 @@ else fi # end --with-threads +# OpenLDAP --with-preemptive + # Check whether --with-preemptive or --without-preemptive was given. +if test "${with_preemptive+set}" = set; then + withval="$with_preemptive" + + ol_arg=invalid + for ol_val in auto yes no manual ; do + if test "$withval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $withval for --with-preemptive" 1>&2; exit 1; } + fi + ol_with_preemptive="$ol_arg" + +else + ol_with_preemptive="auto" +fi +# end --with-preemptive + # OpenLDAP --enable-ldapd @@ -1187,7 +1210,7 @@ TERMCAP_LIBS= # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1191: checking for $ac_word" >&5 +echo "configure:1214: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1216,7 +1239,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1220: checking for $ac_word" >&5 +echo "configure:1243: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1264,7 +1287,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1268: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1291: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1274,11 +1297,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1298,12 +1321,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1302: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1325: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1307: checking whether we are using GNU C" >&5 +echo "configure:1330: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1312,7 +1335,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1327,7 +1350,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1331: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1354: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1355,7 +1378,7 @@ else fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1359: checking how to run the C preprocessor" >&5 +echo "configure:1382: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1370,13 +1393,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1380: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1403: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1387,13 +1410,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1397: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1420: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1417,13 +1440,13 @@ echo "$ac_t""$CPP" 1>&6 if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:1421: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:1444: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP @@ -1441,7 +1464,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -1464,7 +1487,7 @@ fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1468: checking whether ln -s works" >&5 +echo "configure:1491: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1495,7 +1518,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1499: checking for a BSD compatible install" >&5 +echo "configure:1522: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1547,7 +1570,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1551: checking for $ac_word" >&5 +echo "configure:1574: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1574,7 +1597,7 @@ else fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1578: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1601: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1604,7 +1627,7 @@ fi # Extract the first word of "sendmail", so it can be a program name with args. set dummy sendmail; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1608: checking for $ac_word" >&5 +echo "configure:1631: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1636,7 +1659,7 @@ fi # Extract the first word of "vi", so it can be a program name with args. set dummy vi; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1640: checking for $ac_word" >&5 +echo "configure:1663: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1668,7 +1691,7 @@ fi # Extract the first word of "finger", so it can be a program name with args. set dummy finger; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1672: checking for $ac_word" >&5 +echo "configure:1695: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1701,12 +1724,12 @@ fi echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:1705: checking for socket" >&5 +echo "configure:1728: checking for socket" >&5 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_socket=yes" else @@ -1748,7 +1771,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 -echo "configure:1752: checking for main in -lsocket" >&5 +echo "configure:1775: checking for main in -lsocket" >&5 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1756,14 +1779,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1791,7 +1814,7 @@ else fi echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6 -echo "configure:1795: checking for main in -lnet" >&5 +echo "configure:1818: checking for main in -lnet" >&5 ac_lib_var=`echo net'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1799,14 +1822,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1834,7 +1857,7 @@ else fi echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6 -echo "configure:1838: checking for main in -lnsl_s" >&5 +echo "configure:1861: checking for main in -lnsl_s" >&5 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1842,14 +1865,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl_s $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1877,7 +1900,7 @@ else fi echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:1881: checking for main in -lnsl" >&5 +echo "configure:1904: checking for main in -lnsl" >&5 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1885,14 +1908,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1920,7 +1943,7 @@ else fi echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6 -echo "configure:1924: checking for socket in -linet" >&5 +echo "configure:1947: checking for socket in -linet" >&5 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1928,7 +1951,7 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1967,7 +1990,7 @@ else fi echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6 -echo "configure:1971: checking for main in -lgen" >&5 +echo "configure:1994: checking for main in -lgen" >&5 ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1975,14 +1998,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2014,7 +2037,7 @@ fi echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6 -echo "configure:2018: checking for sigset in -lV3" >&5 +echo "configure:2041: checking for sigset in -lV3" >&5 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2022,7 +2045,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lV3 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2066,17 +2089,17 @@ if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2070: checking for $ac_hdr" >&5 +echo "configure:2093: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2103: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2105,7 +2128,7 @@ done if test $ac_cv_header_kerberosIV_krb_h = yes ; then echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6 -echo "configure:2109: checking for main in -lkrb4" >&5 +echo "configure:2132: checking for main in -lkrb4" >&5 ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2113,14 +2136,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2146,6 +2169,11 @@ fi ol_with_kerberos=found ol_link_kerberos=yes + cat >> confdefs.h <<\EOF +#define HAVE_KERBEROS 1 +EOF + + KRB_DEFS="-DKERBEROS" KRB_LIBS="-lkrb4 -lkrb5 -ldes425" fi @@ -2156,17 +2184,17 @@ if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2160: checking for $ac_hdr" >&5 +echo "configure:2188: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2195,7 +2223,7 @@ done if test $ac_cv_header_krb_h = yes ; then echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6 -echo "configure:2199: checking for main in -lkrb" >&5 +echo "configure:2227: checking for main in -lkrb" >&5 ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2203,14 +2231,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lkrb -ldes $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2236,6 +2264,11 @@ fi ol_with_kerberos=found ol_link_kerberos=yes + cat >> confdefs.h <<\EOF +#define HAVE_KERBEROS 1 +EOF + + KRB_DEFS="-DKERBEROS" KRB_LIBS="-lkrb -ldes" fi @@ -2249,17 +2282,17 @@ if test $ol_with_threads = auto -o $ol_with_threads = posix ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2253: checking for $ac_hdr" >&5 +echo "configure:2286: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2263: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2288,13 +2321,13 @@ done if test $ac_cv_header_pthread_h = yes ; then echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6 -echo "configure:2292: checking POSIX thread version" >&5 +echo "configure:2325: checking POSIX thread version" >&5 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -2316,7 +2349,7 @@ rm -f conftest* cat > conftest.$ac_ext < @@ -2353,6 +2386,10 @@ echo "$ac_t""$ol_cv_pthread_version" 1>&6 if test $ol_cv_pthread_version = final ; then LTHREAD_DEFS="$LTHREAD_DEFS -DPOSIX_THREADS" elif test $ol_cv_pthread_version = draft4 ; then + cat >> confdefs.h <<\EOF +#define HAVE_PTHREADS_D4 1 +EOF + LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_MIT_PTHREADS" else { echo "configure: error: unknown pthread version" 1>&2; exit 1; } @@ -2363,7 +2400,7 @@ echo "$ac_t""$ol_cv_pthread_version" 1>&6 echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 -echo "configure:2367: checking for LinuxThreads" >&5 +echo "configure:2404: checking for LinuxThreads" >&5 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2381,17 +2418,21 @@ echo "$ac_t""$ol_cv_linux_threads" 1>&6 if test $ol_cv_linux_threads = yes ; then - LTHREAD_DEFS="$LTHREAD_DEFS -DHAVE_LINUX_THREADS" + cat >> confdefs.h <<\EOF +#define HAVE_LINUX_THREADS 1 +EOF + + LTHREAD_DEFS="$LTHREAD_DEFS -DLINUX_THREADS" fi echo $ac_n "checking for pthread_create""... $ac_c" 1>&6 -echo "configure:2390: checking for pthread_create" >&5 +echo "configure:2431: checking for pthread_create" >&5 if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_pthread_create=yes" else @@ -2436,7 +2477,7 @@ fi if test $ol_link_threads = no ; then echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6 -echo "configure:2440: checking for pthread_create with -pthread" >&5 +echo "configure:2481: checking for pthread_create with -pthread" >&5 if eval "test \"`echo '$''{'ol_cv_pthread_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2444,7 +2485,7 @@ else save_LIBS="$LIBS" LIBS="-pthread $LIBS" cat > conftest.$ac_ext < int main() { @@ -2454,7 +2495,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_pthread_flag=yes else @@ -2479,7 +2520,7 @@ echo "$ac_t""$ol_cv_pthread_flag" 1>&6 if test $ol_link_threads = no ; then save_LIBS="$LIBS" echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:2483: checking for pthread_create in -lpthread" >&5 +echo "configure:2524: checking for pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2487,7 +2528,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2526,7 +2567,7 @@ fi if test $ol_link_threads = no ; then save_LIBS="$LIBS" echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:2530: checking for pthread_create in -lc_r" >&5 +echo "configure:2571: checking for pthread_create in -lc_r" >&5 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2534,7 +2575,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2573,15 +2614,18 @@ fi if test $ol_link_threads = no ; then save_LIBS="$LIBS" echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:2577: checking for pthread_create in -lpthread" >&5 +echo "configure:2618: checking for pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lpthread -lmach -lexc -lc $LIBS" +LIBS="-lpthread if test $with_preemptive = auto ; then + ol_with_preemptive=yes + fi + -lmach -lexc -lc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2608,8 +2652,12 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_DCE 1 +EOF + ol_link_threads=posix - LTHREAD_DEFS="$LTHREAD_DEFS -DDEC_THREADS" + LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_DCE_THREADS" LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc" else echo "$ac_t""no" 1>&6 @@ -2619,18 +2667,25 @@ fi fi if test $ol_link_threads != no ; then + cat >> confdefs.h <<\EOF +#define HAVE_PTHREADS 1 +EOF + + + save_CPPFLAGS="$CPPFLAGS" save_LIBS="$LIBS" + CPPFLAGS="$LTHREAD_DEFS $CPPFLAGS" LIBS="$LTHREAD_LIBS $LIBS" for ac_func in sched_yield pthread_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2629: checking for $ac_func" >&5 +echo "configure:2684: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2685,19 +2740,15 @@ done { echo "configure: error: POSIX Threads are not usable" 1>&2; exit 1; } fi - for ac_func in pthread_kill \ - pthread_attr_init pthread_attr_create \ - pthread_attr_destroy pthread_attr_delete \ - pthread_attr_setdetachstate pthread_attr_setdetach_np \ - + for ac_func in pthread_kill do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2696: checking for $ac_func" >&5 +echo "configure:2747: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2745,6 +2796,82 @@ fi done + if test $ol_with_preemptive = auto ; then + echo $ac_n "checking for preemptive Pthread implementation""... $ac_c" 1>&6 +echo "configure:2802: checking for preemptive Pthread implementation" >&5 + if test "$cross_compiling" = yes; then + + { echo "configure: error: crossing compiling: use --with-preemptive=yes|no|manual" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#include +#include +#include +#ifndef NULL +#define NULL 0 +#endif + +int task(arg) + int *arg; +{ + struct timeval tv; + + tv.tv_sec=4; + tv.tv_usec=0; + select(0, NULL, NULL, NULL, &tv); + + tv.tv_sec=6; + tv.tv_usec=0; + select(0, NULL, NULL, NULL, &tv); + + exit(1); /* if we exit here, the select blocked the whole process */ +} + +main(argc, argv) +int argc; char **argv; +{ + pthread_t t; + pthread_create(&t, NULL, (void *) task, NULL); + +#if HAVE_SCHED_YIELD + sched_yield(); /* make sure task runs first */ +#else +#if defined(HAVE_PTHREAD_YIELD) + pthread_yield(); /* make sure task runs first */ +#endif +#endif + exit(0); +} + +EOF +if { (eval echo configure:2852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + ol_pthread_preemptive=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ol_pthread_preemptive=no +fi +rm -fr conftest* +fi + + echo "$ac_t""$ol_pthread_preemptive" 1>&6 + + if test $ol_pthread_preemptive = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_PREEMPTIVE_PTHREADS 1 +EOF + + ol_with_preemptive=yes + fi + fi + + CPPFLAGS="$save_CPPFLAGS" LIBS="$save_LIBS" else { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; } @@ -2761,17 +2888,17 @@ if test $ol_with_threads = auto -o $ol_with_threads = cthreads ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2765: checking for $ac_hdr" >&5 +echo "configure:2892: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2799,7 +2926,7 @@ done if test $ac_cv_header_lwp_lwp_h = yes ; then echo $ac_n "checking for cthread_fork in -llwp""... $ac_c" 1>&6 -echo "configure:2803: checking for cthread_fork in -llwp" >&5 +echo "configure:2930: checking for cthread_fork in -llwp" >&5 ac_lib_var=`echo lwp'_'cthread_fork | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2807,7 +2934,7 @@ else ac_save_LIBS="$LIBS" LIBS="-llwp $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2841,6 +2968,10 @@ fi if test $have_cthreads = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_CTHREADS 1 +EOF + LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_NEXT_CTHREADS" LTHREAD_LIBS="$LTHREAD_LIBS -llwp" fi @@ -2848,21 +2979,21 @@ fi fi if test $ol_with_threads = auto -o $ol_with_threads = lwp ; then - for ac_hdr in lwp/lwp.h + for ac_hdr in thread.h synch.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2856: checking for $ac_hdr" >&5 +echo "configure:2987: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2890,7 +3021,7 @@ done if test $ac_cv_header_lwp_lwp_h = yes ; then echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6 -echo "configure:2894: checking for thr_create in -lthread" >&5 +echo "configure:3025: checking for thr_create in -lthread" >&5 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2898,7 +3029,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2932,26 +3063,34 @@ fi if test $have_lwp = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_LWP 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_LWP_THR 1 +EOF + LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_SUNOS5_LWP" LTHREAD_LIBS="$LTHREAD_LIBS -llwp" fi fi - for ac_hdr in thread.h synch.h + for ac_hdr in lwp/lwp.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2945: checking for $ac_hdr" >&5 +echo "configure:3084: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2979,7 +3118,7 @@ done if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6 -echo "configure:2983: checking for lwp_create in -llwp" >&5 +echo "configure:3122: checking for lwp_create in -llwp" >&5 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2987,7 +3126,7 @@ else ac_save_LIBS="$LIBS" LIBS="-llwp $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3021,12 +3160,24 @@ fi if test $have_lwp = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_LWP 1 +EOF + LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_SUNOS4_LWP" LTHREAD_LIBS="$LTHREAD_LIBS -llwp" + + if test $with_preemptive = auto ; then + with_preemptive=yes + fi fi fi fi +if test $ol_with_preemptive = yes ; then + LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_PREEMPTIVE" +fi + if test $ol_with_threads = manual ; then $ol_link_threads=yes @@ -3036,17 +3187,17 @@ if test $ol_with_threads = manual ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3040: checking for $ac_hdr" >&5 +echo "configure:3191: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3201: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3075,12 +3226,12 @@ done for ac_func in sched_yield pthread_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3079: checking for $ac_func" >&5 +echo "configure:3230: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3129,7 +3280,7 @@ done echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 -echo "configure:3133: checking for LinuxThreads" >&5 +echo "configure:3284: checking for LinuxThreads" >&5 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3145,6 +3296,127 @@ fi echo "$ac_t""$ol_cv_linux_threads" 1>&6 + + for ac_hdr in mach/cthreads.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3305: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + for ac_hdr in lwp/lwp.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3345: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3355: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + for ac_hdr in thread.h synch.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3385: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + fi if test $ol_link_threads = no ; then @@ -3164,13 +3436,13 @@ fi ol_link_ldbm=no if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then echo $ac_n "checking for DB2 library""... $ac_c" 1>&6 -echo "configure:3168: checking for DB2 library" >&5 +echo "configure:3440: checking for DB2 library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6 -echo "configure:3174: checking for db_open in -ldb" >&5 +echo "configure:3446: checking for db_open in -ldb" >&5 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3178,7 +3450,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3220,17 +3492,17 @@ for ac_hdr in db.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3224: checking for $ac_hdr" >&5 +echo "configure:3496: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3258,13 +3530,13 @@ done if test $ac_cv_header_db_h = yes ; then echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6 -echo "configure:3262: checking if db.h is DB2" >&5 +echo "configure:3534: checking if db.h is DB2" >&5 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3296,7 +3568,7 @@ fi echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6 -echo "configure:3300: checking for Berkeley DB2" >&5 +echo "configure:3572: checking for Berkeley DB2" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3310,6 +3582,12 @@ else fi echo "$ac_t""$ol_cv_berkeley_db2" 1>&6 + if test $ol_cv_berkeley_db2 = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_BERKELEY_DB2 1 +EOF + + fi if test $ol_cv_berkeley_db2 = yes ; then @@ -3332,18 +3610,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6 -echo "configure:3336: checking for Berkeley DB library" >&5 +echo "configure:3614: checking for Berkeley DB library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:3342: checking for dbopen" >&5 +echo "configure:3620: checking for dbopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -3385,7 +3663,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:3389: checking for dbopen in -ldb" >&5 +echo "configure:3667: checking for dbopen in -ldb" >&5 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3393,7 +3671,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3439,17 +3717,17 @@ for ac_hdr in db_185.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3443: checking for $ac_hdr" >&5 +echo "configure:3721: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3485,7 +3763,7 @@ fi echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6 -echo "configure:3489: checking for Berkeley DB" >&5 +echo "configure:3767: checking for Berkeley DB" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3499,6 +3777,12 @@ else fi echo "$ac_t""$ol_cv_berkeley_db" 1>&6 + if test $ol_cv_berkeley_db = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_BERKELEY_DB 1 +EOF + + fi if test $ol_cv_berkeley_db = yes ; then @@ -3530,17 +3814,17 @@ if test $ol_with_ldbm_api = manual ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3534: checking for $ac_hdr" >&5 +echo "configure:3818: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3575,18 +3859,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then echo $ac_n "checking for GDBM library""... $ac_c" 1>&6 -echo "configure:3579: checking for GDBM library" >&5 +echo "configure:3863: checking for GDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6 -echo "configure:3585: checking for gdbm_open" >&5 +echo "configure:3869: checking for gdbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gdbm_open=yes" else @@ -3628,7 +3912,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:3632: checking for gdbm_open in -lgdbm" >&5 +echo "configure:3916: checking for gdbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3636,7 +3920,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3682,17 +3966,17 @@ echo "$ac_t""$ol_cv_lib_gdbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3686: checking for $ac_hdr" >&5 +echo "configure:3970: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3719,7 +4003,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:3723: checking for db" >&5 +echo "configure:4007: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3733,6 +4017,12 @@ else fi echo "$ac_t""$ol_cv_gdbm" 1>&6 + if test $ol_cv_gdbm = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_GDBM 1 +EOF + + fi if test $ol_cv_gdbm = yes ; then @@ -3749,18 +4039,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = ndbm ; then echo $ac_n "checking for NDBM library""... $ac_c" 1>&6 -echo "configure:3753: checking for NDBM library" >&5 +echo "configure:4043: checking for NDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:3759: checking for dbm_open" >&5 +echo "configure:4049: checking for dbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -3802,7 +4092,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6 -echo "configure:3806: checking for dbm_open in -lndbm" >&5 +echo "configure:4096: checking for dbm_open in -lndbm" >&5 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3810,7 +4100,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lndbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3841,7 +4131,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:3845: checking for dbm_open in -ldbm" >&5 +echo "configure:4135: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3849,7 +4139,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3897,17 +4187,17 @@ echo "$ac_t""$ol_cv_lib_ndbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3901: checking for $ac_hdr" >&5 +echo "configure:4191: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4201: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3934,7 +4224,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:3938: checking for db" >&5 +echo "configure:4228: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3948,6 +4238,12 @@ else fi echo "$ac_t""$ol_cv_ndbm" 1>&6 + if test $ol_cv_ndbm = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_NDBM 1 +EOF + + fi if test $ol_cv_ndbm = yes ; then @@ -3978,7 +4274,7 @@ fi if test $ol_enable_wrappers = yes ; then echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6 -echo "configure:3982: checking for hosts_access in -lwrap" >&5 +echo "configure:4278: checking for hosts_access in -lwrap" >&5 ac_lib_var=`echo wrap'_'hosts_access | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3986,7 +4282,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lwrap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4041,17 +4337,17 @@ for ac_hdr in termcap.h ncurses.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4045: checking for $ac_hdr" >&5 +echo "configure:4341: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4080,7 +4376,7 @@ done if test $ol_link_termcap = no ; then echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6 -echo "configure:4084: checking for tputs in -ltermcap" >&5 +echo "configure:4380: checking for tputs in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4088,7 +4384,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4128,7 +4424,7 @@ fi if test $ol_link_termcap = no ; then echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 -echo "configure:4132: checking for initscr in -lncurses" >&5 +echo "configure:4428: checking for initscr in -lncurses" >&5 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4136,7 +4432,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4182,12 +4478,12 @@ fi # FreeBSD (and others) have crypt(3) in -lcrypt if test $ol_enable_crypt != no ; then echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:4186: checking for crypt" >&5 +echo "configure:4482: checking for crypt" >&5 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -4229,7 +4525,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:4233: checking for crypt in -lcrypt" >&5 +echo "configure:4529: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4237,7 +4533,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4287,12 +4583,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:4291: checking for ANSI C header files" >&5 +echo "configure:4587: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4300,7 +4596,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4317,7 +4613,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -4335,7 +4631,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -4356,7 +4652,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -4367,7 +4663,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:4371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -4395,12 +4691,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:4399: checking for $ac_hdr that defines DIR" >&5 +echo "configure:4695: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -4408,7 +4704,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:4412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -4433,7 +4729,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:4437: checking for opendir in -ldir" >&5 +echo "configure:4733: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4441,7 +4737,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4474,7 +4770,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:4478: checking for opendir in -lx" >&5 +echo "configure:4774: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4482,7 +4778,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4516,12 +4812,12 @@ fi fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:4520: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:4816: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4537,7 +4833,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:4541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -4574,17 +4870,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4578: checking for $ac_hdr" >&5 +echo "configure:4874: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4612,12 +4908,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:4616: checking for uid_t in sys/types.h" >&5 +echo "configure:4912: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -4646,7 +4942,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:4650: checking type of array argument to getgroups" >&5 +echo "configure:4946: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4654,7 +4950,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -4693,7 +4989,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -4717,12 +5013,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:4721: checking for mode_t" >&5 +echo "configure:5017: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4750,12 +5046,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:4754: checking for off_t" >&5 +echo "configure:5050: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4783,12 +5079,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:4787: checking for pid_t" >&5 +echo "configure:5083: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4816,12 +5112,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:4820: checking return type of signal handlers" >&5 +echo "configure:5116: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4838,7 +5134,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:4842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -4857,12 +5153,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:4861: checking for size_t" >&5 +echo "configure:5157: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4890,12 +5186,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:4894: checking for uid_t in sys/types.h" >&5 +echo "configure:5190: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -4924,12 +5220,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:4928: checking for st_blksize in struct stat" >&5 +echo "configure:5224: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4937,7 +5233,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:4941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -4958,12 +5254,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:4962: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:5258: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4972,7 +5268,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:4976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -4993,12 +5289,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:4997: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:5293: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5006,7 +5302,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:5010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -5028,12 +5324,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:5032: checking for working const" >&5 +echo "configure:5328: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -5104,7 +5400,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:5108: checking for 8-bit clean memcmp" >&5 +echo "configure:5404: 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 @@ -5112,7 +5408,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -5140,12 +5436,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:5144: checking for strftime" >&5 +echo "configure:5440: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -5190,7 +5486,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:5194: checking for strftime in -lintl" >&5 +echo "configure:5490: 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 @@ -5198,7 +5494,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5236,12 +5532,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:5240: checking for vprintf" >&5 +echo "configure:5536: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -5288,12 +5584,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:5292: checking for _doprnt" >&5 +echo "configure:5588: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -5341,7 +5637,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:5345: checking for wait3 that fills in rusage" >&5 +echo "configure:5641: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5349,7 +5645,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -5380,7 +5676,7 @@ main() { } } EOF -if { (eval echo configure:5384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -5428,12 +5724,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5432: checking for $ac_func" >&5 +echo "configure:5728: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5484,12 +5780,12 @@ done for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5488: checking for $ac_func" >&5 +echo "configure:5784: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5542,13 +5838,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:5546: checking declaration of sys_errlist" >&5 +echo "configure:5842: 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 < @@ -5558,7 +5854,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:5562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -5579,20 +5875,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:5583: checking existence of sys_errlist" >&5 +echo "configure:5879: 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 < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:5596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else @@ -5612,8 +5908,8 @@ fi if test $ol_enable_debug != no ; then LDAP_DEFS="$LDAP_DEFS -DLDAP_DEBUG" fi -if test $ol_enable_libui = no ; then - LDAP_DEFS="$LDAP_DEFS -DNO_USERINTERFACE" +if test $ol_enable_libui = yes ; then + LDAP_DEFS="$LDAP_DEFS -DLDAP_LIBUI" fi if test $ol_enable_cache = no ; then LDAP_DEFS="$LDAP_DEFS -DNO_CACHE" diff --git a/configure.in b/configure.in index 91d9b746aa..dc50682c2d 100644 --- a/configure.in +++ b/configure.in @@ -35,6 +35,8 @@ OL_ARG_WITH(kerberos,[ --with-kerberos use Kerberos], auto, [auto k5 k4 afs yes no]) OL_ARG_WITH(threads,[ --with-threads use threads], auto, [auto posix mach lwp yes no manual] ) +OL_ARG_WITH(preemptive,[ --with-preemptive thread implementation is preemptive], + auto, [auto yes no manual] ) dnl Server options @@ -241,6 +243,8 @@ if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then ol_with_kerberos=found ol_link_kerberos=yes + AC_DEFINE(HAVE_KERBEROS) + KRB_DEFS="-DKERBEROS" KRB_LIBS="-lkrb4 -lkrb5 -ldes425" fi @@ -256,6 +260,8 @@ if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then ol_with_kerberos=found ol_link_kerberos=yes + AC_DEFINE(HAVE_KERBEROS) + KRB_DEFS="-DKERBEROS" KRB_LIBS="-lkrb -ldes" fi @@ -273,6 +279,7 @@ if test $ol_with_threads = auto -o $ol_with_threads = posix ; then if test $ol_cv_pthread_version = final ; then LTHREAD_DEFS="$LTHREAD_DEFS -DPOSIX_THREADS" elif test $ol_cv_pthread_version = draft4 ; then + AC_DEFINE(HAVE_PTHREADS_D4) LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_MIT_PTHREADS" else AC_MSG_ERROR([unknown pthread version]) @@ -284,8 +291,8 @@ if test $ol_with_threads = auto -o $ol_with_threads = posix ; then OL_LINUX_THREADS if test $ol_cv_linux_threads = yes ; then -dnl AC_DEFINE(HAVE_LINUX_THREADS,1) - LTHREAD_DEFS="$LTHREAD_DEFS -DHAVE_LINUX_THREADS" + AC_DEFINE(HAVE_LINUX_THREADS,1) + LTHREAD_DEFS="$LTHREAD_DEFS -DLINUX_THREADS" fi dnl Now the hard part, how to link @@ -336,15 +343,24 @@ dnl AC_DEFINE(HAVE_LINUX_THREADS,1) dnl try DEC Threads save_LIBS="$LIBS" AC_CHECK_LIB(pthread, pthread_create, [ + AC_DEFINE(HAVE_DCE) ol_link_threads=posix - LTHREAD_DEFS="$LTHREAD_DEFS -DDEC_THREADS" + LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_DCE_THREADS" LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc"],, + if test $with_preemptive = auto ; then + ol_with_preemptive=yes + fi [-lmach -lexc -lc]) LIBS="$save_LIBS" fi if test $ol_link_threads != no ; then + AC_DEFINE(HAVE_PTHREADS) + + dnl save DEFS/LIBS + save_CPPFLAGS="$CPPFLAGS" save_LIBS="$LIBS" + CPPFLAGS="$LTHREAD_DEFS $CPPFLAGS" LIBS="$LTHREAD_LIBS $LIBS" dnl All POSIX Thread (final) implementations should have @@ -360,12 +376,68 @@ dnl AC_DEFINE(HAVE_LINUX_THREADS,1) fi dnl Check functions for compatibility - AC_CHECK_FUNCS(pthread_kill \ - pthread_attr_init pthread_attr_create \ - pthread_attr_destroy pthread_attr_delete \ - pthread_attr_setdetachstate pthread_attr_setdetach_np \ - ) + AC_CHECK_FUNCS(pthread_kill) +dnl AC_CHECK_FUNCS( +dnl pthread_attr_create pthread_attr_init \ +dnl pthread_attr_destroy pthread_attr_delete \ +dnl pthread_attr_setdetachstate pthread_attr_setdetach_np \ +dnl ) + dnl Check PREEMPTIVE Implementation + if test $ol_with_preemptive = auto ; then + AC_MSG_CHECKING([for preemptive Pthread implementation]) + AC_TRY_RUN([ +#include +#include +#include +#include +#ifndef NULL +#define NULL 0 +#endif + +int task(arg) + int *arg; +{ + struct timeval tv; + + tv.tv_sec=4; + tv.tv_usec=0; + select(0, NULL, NULL, NULL, &tv); + + tv.tv_sec=6; + tv.tv_usec=0; + select(0, NULL, NULL, NULL, &tv); + + exit(1); /* if we exit here, the select blocked the whole process */ +} + +main(argc, argv) +int argc; char **argv; +{ + pthread_t t; + pthread_create(&t, NULL, (void *) task, NULL); + +#if HAVE_SCHED_YIELD + sched_yield(); /* make sure task runs first */ +#else +#if defined(HAVE_PTHREAD_YIELD) + pthread_yield(); /* make sure task runs first */ +#endif +#endif + exit(0); +} + ], [ol_pthread_preemptive=yes], [ol_pthread_preemptive=no], [ + AC_MSG_ERROR([crossing compiling: use --with-preemptive=yes|no|manual])]) + AC_MSG_RESULT($ol_pthread_preemptive) + + if test $ol_pthread_preemptive = yes ; then + AC_DEFINE(HAVE_PREEMPTIVE_PTHREADS) + ol_with_preemptive=yes + fi + fi + + dnl restore DEFS/LIBS + CPPFLAGS="$save_CPPFLAGS" LIBS="$save_LIBS" else AC_MSG_ERROR([could not link with POSIX Threads]) @@ -384,6 +456,7 @@ if test $ol_with_threads = auto -o $ol_with_threads = cthreads ; then AC_CHECK_LIB(lwp, cthread_fork, [have_cthreads=yes], [have_cthreads=no]) if test $have_cthreads = yes ; then + AC_DEFINE(HAVE_CTHREADS) LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_NEXT_CTHREADS" LTHREAD_LIBS="$LTHREAD_LIBS -llwp" fi @@ -392,28 +465,39 @@ fi if test $ol_with_threads = auto -o $ol_with_threads = lwp ; then dnl check for SunOS5 LWP - AC_CHECK_HEADERS(lwp/lwp.h) + AC_CHECK_HEADERS(thread.h synch.h) if test $ac_cv_header_lwp_lwp_h = yes ; then AC_CHECK_LIB(thread, thr_create, [have_lwp=yes], [have_lwp=no]) if test $have_lwp = yes ; then + AC_DEFINE(HAVE_LWP) + AC_DEFINE(HAVE_LWP_THR) LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_SUNOS5_LWP" LTHREAD_LIBS="$LTHREAD_LIBS -llwp" fi fi dnl check for SunOS4 LWP - AC_CHECK_HEADERS(thread.h synch.h) + AC_CHECK_HEADERS(lwp/lwp.h) if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then AC_CHECK_LIB(lwp, lwp_create, [have_lwp=yes], [have_lwp=no]) if test $have_lwp = yes ; then + AC_DEFINE(HAVE_LWP) LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_SUNOS4_LWP" LTHREAD_LIBS="$LTHREAD_LIBS -llwp" + + if test $with_preemptive = auto ; then + with_preemptive=yes + fi fi fi fi +if test $ol_with_preemptive = yes ; then + LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_PREEMPTIVE" +fi + if test $ol_with_threads = manual ; then dnl User thinks he can manually configure threads. $ol_link_threads=yes @@ -423,6 +507,10 @@ if test $ol_with_threads = manual ; then AC_CHECK_HEADERS(pthread.h sched.h) AC_CHECK_FUNCS(sched_yield pthread_yield) OL_LINUX_THREADS + + AC_CHECK_HEADERS(mach/cthreads.h) + AC_CHECK_HEADERS(lwp/lwp.h) + AC_CHECK_HEADERS(thread.h synch.h) fi if test $ol_link_threads = no ; then @@ -551,7 +639,6 @@ if test $ol_enable_wrappers = yes ; then [have_wrappers=yes], [have_wrappers=no]) if test $have_wrappers = yes ; then -dnl LIBTCPD="-lwrap" dnl AC_DEFINE(HAVE_TCPD) SLAPD_DEFS="$SLAPD_DEFS -DTCP_WRAPPERS" SLAPD_LIBS="$SLAPD_LIBS -lwrap" @@ -575,6 +662,7 @@ AC_CHECK_HEADERS(termcap.h ncurses.h) if test $ol_link_termcap = no ; then AC_CHECK_LIB(termcap, tputs, [have_termcap=yes], [have_termcap=no]) if test $have_termcap = yes ; then +dnl AC_DEFINE(HAVE_TERMCAP) ol_link_termcap=yes TERMCAP_LIBS=-ltermcap fi @@ -583,6 +671,7 @@ fi if test $ol_link_termcap = no ; then AC_CHECK_LIB(ncurses, initscr, [have_ncurses=yes], [have_ncurses=no]) if test $have_ncurses = yes ; then +dnl AC_DEFINE(HAVE_NCURSES) ol_link_termcap=yes TERMCAP_LIBS=-lncurses fi @@ -600,7 +689,7 @@ if test $ol_enable_crypt != no ; then have_crypt=yes], [have_crypt=no])]) if test $have_crypt = yes ; then -dnl AC_DEFINE(SLAPD_CRYPT,1) +dnl AC_DEFINE(HAVE_CRYPT) LUTIL_DEFS="$LUTIL_DEFS -DLDAP_CRYPT" else AC_MSG_WARN(could not find crypt) @@ -695,8 +784,8 @@ fi dnl if test $ol_enable_syslog != no ; then dnl LDAP_DEFS="$LDAP_DEFS -DLDAP_SYSLOG" dnl fi -if test $ol_enable_libui = no ; then - LDAP_DEFS="$LDAP_DEFS -DNO_USERINTERFACE" +if test $ol_enable_libui = yes ; then + LDAP_DEFS="$LDAP_DEFS -DLDAP_LIBUI" fi if test $ol_enable_cache = no ; then LDAP_DEFS="$LDAP_DEFS -DNO_CACHE" diff --git a/include/bridge.h b/include/bridge.h index 7adf1cf62d..0476ba9d16 100644 --- a/include/bridge.h +++ b/include/bridge.h @@ -23,6 +23,11 @@ * edit this file. */ +#ifndef LDAP_LIBUI +#ifndef NO_USERINTERFACE +#define NO_USERINTERFACE +#endif +#endif #ifndef SYSV #if defined( hpux ) || defined( sunos5 ) || defined ( sgi ) || defined( SVR4 ) diff --git a/include/portable.h.bot b/include/portable.h.bot index 5e8cb58859..4a45b92795 100644 --- a/include/portable.h.bot +++ b/include/portable.h.bot @@ -4,5 +4,6 @@ #endif #include "bridge.h" +#include "ldap_cdefs.h" #endif /* _LDAP_PORTABLE_H */ diff --git a/include/portable.h.in b/include/portable.h.in index 20edd07584..534d0bb867 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -73,6 +73,45 @@ /* define this if sys_errlist is not defined in stdio.h or errno.h */ #undef DECL_SYS_ERRLIST +/* define if you have berkeley db */ +#undef HAVE_BERKELEY_DB2 + +/* define if you have berkeley db2 */ +#undef HAVE_BERKELEY_DB2 + +/* define if you have Mach CThreads */ +#undef HAVE_CTHREADS + +/* define if you have DCE */ +#undef HAVE_DCE + +/* define if you have GDBM */ +#undef HAVE_GDBM + +/* define if you have Kerberos */ +#undef HAVE_KERBEROS + +/* define if you have LinuxThreads */ +#undef HAVE_LINUX_THREADS + +/* define if you have Sun LWP (SunOS style) */ +#undef HAVE_LWP + +/* define if you have Sun LWP (Solaris style) */ +#undef HAVE_LWP_THR + +/* define if you have NDBM */ +#undef HAVE_NDBM + +/* define if you have a preemptive POSIX Threads implementation */ +#undef HAVE_PREEMPTIVE_PTHREADS + +/* define if you have POSIX Threads */ +#undef HAVE_PTHREADS + +/* define if your POSIX Threads implementatin is circa Draft 4 */ +#undef HAVE_PTHREADS_D4 + /* define this for ACL Group support */ #undef SLAPD_ACLGROUPS @@ -103,24 +142,6 @@ /* Define if you have the mktime function. */ #undef HAVE_MKTIME -/* Define if you have the pthread_attr_create function. */ -#undef HAVE_PTHREAD_ATTR_CREATE - -/* Define if you have the pthread_attr_delete function. */ -#undef HAVE_PTHREAD_ATTR_DELETE - -/* Define if you have the pthread_attr_destroy function. */ -#undef HAVE_PTHREAD_ATTR_DESTROY - -/* Define if you have the pthread_attr_init function. */ -#undef HAVE_PTHREAD_ATTR_INIT - -/* Define if you have the pthread_attr_setdetach_np function. */ -#undef HAVE_PTHREAD_ATTR_SETDETACH_NP - -/* Define if you have the pthread_attr_setdetachstate function. */ -#undef HAVE_PTHREAD_ATTR_SETDETACHSTATE - /* Define if you have the pthread_kill function. */ #undef HAVE_PTHREAD_KILL diff --git a/libraries/liblber/bprint.c b/libraries/liblber/bprint.c index e4b6fd27ea..78af185d2b 100644 --- a/libraries/liblber/bprint.c +++ b/libraries/liblber/bprint.c @@ -1,20 +1,26 @@ + +#define LDAP_BRIDGE /* disable LDAP_BRIDGE code */ +#include "portable.h" + +#if defined( LDAP_DEBUG ) && defined( LDAP_LIBUI ) #include -#include +#include #include +#endif /* LDAP_DEBUG && LDAP_LIBUI */ + #include "lber.h" /* * Print arbitrary stuff, for debugging. */ -#ifdef LDAP_DEBUG - -#ifndef NO_USERINTERFACE -#define BPLEN 48 void lber_bprint( char *data, int len ) { +#if defined( LDAP_DEBUG ) && defined( LDAP_LIBUI ) +#define BPLEN 48 + static char hexdig[] = "0123456789abcdef"; char out[ BPLEN ]; int i = 0; @@ -49,12 +55,7 @@ lber_bprint( char *data, int len ) } out[ i++ ] = ' '; } -} -#else /* NO_USERINTERFACE */ -void -lber_bprint( char *data, int len ) -{ -} -#endif /* NO_USERINTERFACE */ -#endif +#endif /* LDAP_DEBUG && LDAP_LIBUI */ +} + diff --git a/libraries/liblber/decode.c b/libraries/liblber/decode.c index a722c9eb7a..d16ca53756 100644 --- a/libraries/liblber/decode.c +++ b/libraries/liblber/decode.c @@ -11,17 +11,22 @@ * is provided ``as is'' without express or implied warranty. */ +#define LDAP_BRIDGE /* disable LDAP_BRIDGE code */ +#include "portable.h" + #include + #ifdef MACOS #include #include #include "macos.h" #else /* MACOS */ -#if defined(NeXT) || defined(VMS) + +#if defined(NeXT) || defined(VMS) || defined(__FreeBSD__) #include -#else /* next || vms */ +#else /* next || vms || freebsd */ #include -#endif /* next || vms */ +#endif /* next || vms || freebsd */ #if defined(BC31) || defined(_WIN32) #include #else /* BC31 || _WIN32 */ @@ -40,16 +45,14 @@ #endif /* DOS */ #include + #include "lber.h" #ifdef LDAP_DEBUG int lber_debug; #endif -#ifdef NEEDPROTOS -static int ber_getnint( BerElement *ber, long *num, int len ); -#endif /* NEEDPROTOS */ - +static int ber_getnint LDAP_P(( BerElement *ber, long *num, int len )); /* return the tag - LBER_DEFAULT returned means trouble */ unsigned long @@ -155,6 +158,7 @@ ber_getnint( BerElement *ber, long *num, int len ) { int diff, sign, i; long netnum; + char *p; /* * The tag and length have already been stripped off. We should @@ -172,11 +176,12 @@ ber_getnint( BerElement *ber, long *num, int len ) if ( ber_read( ber, ((char *) &netnum) + diff, len ) != len ) return( -1 ); - /* sign extend if necessary */ - sign = ((0x80 << ((len - 1) * 8)) & netnum); - if ( sign && len < sizeof(long) ) { - for ( i = sizeof(long) - 1; i > len - 1; i-- ) { - netnum |= (0xffL << (i * 8)); + /* sign extend if necessary */ + p = (char *) &netnum; + sign = (0x80 & *(p+diff) ); + if ( sign && len < sizeof(long) ) { + for ( i = 0; i < diff; i++ ) { + *(p+i) = 0xff; } } *num = LBER_NTOHL( netnum ); diff --git a/libraries/liblber/dtest.c b/libraries/liblber/dtest.c index cd63b9f89a..62b7ae363d 100644 --- a/libraries/liblber/dtest.c +++ b/libraries/liblber/dtest.c @@ -11,8 +11,11 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include -#include +#include + #ifdef MACOS #include #include From 6949ab31ac7c3e35c1d1c82701550fa3a01e35d4 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 23 Sep 1998 08:13:37 +0000 Subject: [PATCH 081/148] Use ldap_cdefs.h more. Use bridge.h less. --- include/Makefile.in | 1 + include/bridge.h | 8 +- include/disptmpl.h | 144 +++++++++++-------------- include/srchpref.h | 49 ++++----- libraries/liblber/decode.c | 2 +- libraries/liblutil/sha1.c | 4 +- servers/slapd/back-ldbm/dbcache.c | 40 +++++-- servers/slapd/connection.c | 28 ++++- servers/slapd/daemon.c | 169 +++++++++++++++++++++++------- servers/slapd/result.c | 65 +++++++++--- servers/slurpd/fm.c | 63 +++++------ servers/slurpd/ldap_op.c | 46 ++++---- servers/slurpd/re.c | 31 ++++-- servers/slurpd/reject.c | 6 +- servers/slurpd/replog.c | 27 ++--- servers/slurpd/rq.c | 30 ++---- servers/slurpd/st.c | 12 +-- 17 files changed, 435 insertions(+), 290 deletions(-) diff --git a/include/Makefile.in b/include/Makefile.in index a36d6c3bdd..19f3e8620e 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -9,6 +9,7 @@ install-local: FORCE -$(MKDIR) -p $(includedir) $(INSTALL) $(INSTALLFLAGS) -m 644 ldap.h $(includedir) $(INSTALL) $(INSTALLFLAGS) -m 644 lber.h $(includedir) + $(INSTALL) $(INSTALLFLAGS) -m 644 ldap_cdefs.h $(includedir) $(INSTALL) $(INSTALLFLAGS) -m 644 proto-lber.h $(includedir) $(INSTALL) $(INSTALLFLAGS) -m 644 proto-ldap.h $(includedir) $(INSTALL) $(INSTALLFLAGS) -m 644 disptmpl.h $(includedir) diff --git a/include/bridge.h b/include/bridge.h index 0476ba9d16..172fada4fc 100644 --- a/include/bridge.h +++ b/include/bridge.h @@ -12,8 +12,8 @@ /* This file SHOULD go away !!! */ -#ifndef LDAP_BRIDGE -#define LDAP_BRIDGE +#ifndef _LDAP_BRIDGE_H +#define _LDAP_BRIDGE_H /* * portable.h for LDAP -- this is where we define common stuff to make @@ -122,6 +122,7 @@ #endif #endif NOTDEF +#ifndef DISABLE_BRIDGE /* * Are sys_errlist and sys_nerr declared in stdio.h? */ @@ -142,6 +143,7 @@ #define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS))) #define FD_ZERO(p) bzero((char *)(p), sizeof(*(p))) #endif /* FD_SET */ +#endif #if defined( hpux ) && defined( __STDC__ ) /* @@ -209,4 +211,4 @@ extern char *strdup(); #endif /* ultrix || nextstep */ -#endif /* LDAP_BRIDGE */ +#endif /* _LDAP_BRIDGE_H */ diff --git a/include/disptmpl.h b/include/disptmpl.h index c4e06ef2fe..dc39dc39f6 100644 --- a/include/disptmpl.h +++ b/include/disptmpl.h @@ -16,10 +16,9 @@ #ifndef _DISPTMPL_H #define _DISPTMPL_H -#ifdef __cplusplus -extern "C" { -#endif +#include +LDAP_BEGIN_DECL #define LDAP_TEMPLATE_VERSION 1 @@ -221,110 +220,95 @@ struct ldap_disptmpl { #define LDAP_DTMPL_BUFSIZ 8192 -#ifndef NEEDPROTOS +typedef int (*writeptype) LDAP_P(( void *writeparm, char *p, int len )); -typedef int (*writeptype)(); +LDAP_F int +ldap_init_templates LDAP_P(( char *file, struct ldap_disptmpl **tmpllistp )); -int ldap_init_templates(); -int ldap_init_templates_buf(); -void ldap_free_templates(); -struct ldap_disptmpl *ldap_first_disptmpl(); -struct ldap_disptmpl *ldap_next_disptmpl(); -struct ldap_disptmpl *ldap_name2template(); -struct ldap_disptmpl *ldap_oc2template(); -char **ldap_tmplattrs(); -struct ldap_tmplitem *ldap_first_tmplrow(); -struct ldap_tmplitem *ldap_next_tmplrow(); -struct ldap_tmplitem *ldap_first_tmplcol(); -struct ldap_tmplitem *ldap_next_tmplcol(); -int ldap_entry2text_search(); -int ldap_entry2text(); -int ldap_vals2text(); -int ldap_entry2html_search(); -int ldap_entry2html(); -int ldap_vals2html(); +LDAP_F int +ldap_init_templates_buf LDAP_P(( char *buf, + long buflen, + struct ldap_disptmpl **tmpllistp )); -#else /* !NEEDPROTOS */ +LDAP_F void +ldap_free_templates LDAP_P(( struct ldap_disptmpl *tmpllist )); -typedef int (*writeptype)( void *writeparm, char *p, int len ); +LDAP_F struct ldap_disptmpl * +ldap_first_disptmpl LDAP_P(( struct ldap_disptmpl *tmpllist )); -LDAPFUNCDECL int -ldap_init_templates( char *file, struct ldap_disptmpl **tmpllistp ); +LDAP_F struct ldap_disptmpl * +ldap_next_disptmpl LDAP_P(( struct ldap_disptmpl *tmpllist, + struct ldap_disptmpl *tmpl )); -LDAPFUNCDECL int -ldap_init_templates_buf( char *buf, long buflen, - struct ldap_disptmpl **tmpllistp ); +LDAP_F struct ldap_disptmpl * +ldap_name2template LDAP_P(( char *name, + struct ldap_disptmpl *tmpllist )); -LDAPFUNCDECL void -ldap_free_templates( struct ldap_disptmpl *tmpllist ); +LDAP_F struct ldap_disptmpl * +ldap_oc2template LDAP_P(( char **oclist, + struct ldap_disptmpl *tmpllist )); -LDAPFUNCDECL struct ldap_disptmpl * -ldap_first_disptmpl( struct ldap_disptmpl *tmpllist ); +LDAP_F char ** +ldap_tmplattrs LDAP_P(( struct ldap_disptmpl *tmpl, + char **includeattrs, + int exclude, + unsigned long syntaxmask )); -LDAPFUNCDECL struct ldap_disptmpl * -ldap_next_disptmpl( struct ldap_disptmpl *tmpllist, - struct ldap_disptmpl *tmpl ); +LDAP_F struct ldap_tmplitem * +ldap_first_tmplrow LDAP_P(( struct ldap_disptmpl *tmpl )); -LDAPFUNCDECL struct ldap_disptmpl * -ldap_name2template( char *name, struct ldap_disptmpl *tmpllist ); +LDAP_F struct ldap_tmplitem * +ldap_next_tmplrow LDAP_P(( struct ldap_disptmpl *tmpl, + struct ldap_tmplitem *row )); -LDAPFUNCDECL struct ldap_disptmpl * -ldap_oc2template( char **oclist, struct ldap_disptmpl *tmpllist ); +LDAP_F struct ldap_tmplitem * +ldap_first_tmplcol LDAP_P(( struct ldap_disptmpl *tmpl, + struct ldap_tmplitem *row )); -LDAPFUNCDECL char ** -ldap_tmplattrs( struct ldap_disptmpl *tmpl, char **includeattrs, int exclude, - unsigned long syntaxmask ); +LDAP_F struct ldap_tmplitem * +ldap_next_tmplcol LDAP_P(( struct ldap_disptmpl *tmpl, + struct ldap_tmplitem *row, + struct ldap_tmplitem *col )); -LDAPFUNCDECL struct ldap_tmplitem * -ldap_first_tmplrow( struct ldap_disptmpl *tmpl ); - -LDAPFUNCDECL struct ldap_tmplitem * -ldap_next_tmplrow( struct ldap_disptmpl *tmpl, struct ldap_tmplitem *row ); - -LDAPFUNCDECL struct ldap_tmplitem * -ldap_first_tmplcol( struct ldap_disptmpl *tmpl, struct ldap_tmplitem *row ); - -LDAPFUNCDECL struct ldap_tmplitem * -ldap_next_tmplcol( struct ldap_disptmpl *tmpl, struct ldap_tmplitem *row, - struct ldap_tmplitem *col ); - -LDAPFUNCDECL int -ldap_entry2text( LDAP *ld, char *buf, LDAPMessage *entry, +LDAP_F int +ldap_entry2text LDAP_P(( LDAP *ld, + char *buf, LDAPMessage *entry, struct ldap_disptmpl *tmpl, char **defattrs, char ***defvals, writeptype writeproc, void *writeparm, char *eol, int rdncount, - unsigned long opts ); + unsigned long opts )); -LDAPFUNCDECL int -ldap_vals2text( LDAP *ld, char *buf, char **vals, char *label, int labelwidth, +LDAP_F int +ldap_vals2text LDAP_P(( LDAP *ld, + char *buf, char **vals, char *label, int labelwidth, unsigned long syntaxid, writeptype writeproc, void *writeparm, - char *eol, int rdncount ); + char *eol, int rdncount )); -LDAPFUNCDECL int -ldap_entry2text_search( LDAP *ld, char *dn, char *base, LDAPMessage *entry, +LDAP_F int +ldap_entry2text_search LDAP_P(( LDAP *ld, + char *dn, char *base, LDAPMessage *entry, struct ldap_disptmpl *tmpllist, char **defattrs, char ***defvals, writeptype writeproc, void *writeparm, char *eol, int rdncount, - unsigned long opts ); + unsigned long opts )); -LDAPFUNCDECL int -ldap_entry2html( LDAP *ld, char *buf, LDAPMessage *entry, +LDAP_F int +ldap_entry2html LDAP_P(( LDAP *ld, + char *buf, LDAPMessage *entry, struct ldap_disptmpl *tmpl, char **defattrs, char ***defvals, writeptype writeproc, void *writeparm, char *eol, int rdncount, - unsigned long opts, char *urlprefix, char *base ); + unsigned long opts, char *urlprefix, char *base )); -LDAPFUNCDECL int -ldap_vals2html( LDAP *ld, char *buf, char **vals, char *label, int labelwidth, +LDAP_F int +ldap_vals2html LDAP_P(( LDAP *ld, + char *buf, char **vals, char *label, int labelwidth, unsigned long syntaxid, writeptype writeproc, void *writeparm, - char *eol, int rdncount, char *urlprefix ); + char *eol, int rdncount, char *urlprefix )); -LDAPFUNCDECL int -ldap_entry2html_search( LDAP *ld, char *dn, char *base, LDAPMessage *entry, +LDAP_F int +ldap_entry2html_search LDAP_P(( LDAP + *ld, char *dn, char *base, LDAPMessage *entry, struct ldap_disptmpl *tmpllist, char **defattrs, char ***defvals, writeptype writeproc, void *writeparm, char *eol, int rdncount, - unsigned long opts, char *urlprefix ); -#endif /* !NEEDPROTOS */ + unsigned long opts, char *urlprefix )); - -#ifdef __cplusplus -} -#endif +LDAP_END_DECL #endif /* _DISPTMPL_H */ diff --git a/include/srchpref.h b/include/srchpref.h index a1d65cffb0..6b26b06d41 100644 --- a/include/srchpref.h +++ b/include/srchpref.h @@ -17,10 +17,9 @@ #ifndef _SRCHPREF_H #define _SRCHPREF_H -#ifdef __cplusplus -extern "C" { -#endif +#include +LDAP_BEGIN_DECL struct ldap_searchattr { char *sa_attrlabel; @@ -60,7 +59,7 @@ struct ldap_searchobj { #define LDAP_SEARCHOBJ_OPT_INTERNAL 0x00000001 #define LDAP_IS_SEARCHOBJ_OPTION_SET( so, option ) \ - (((so)->so_options & option ) != 0 ) + (((so)->so_options & (option) ) != 0 ) #define LDAP_SEARCHPREF_VERSION_ZERO 0 #define LDAP_SEARCHPREF_VERSION 1 @@ -71,36 +70,26 @@ struct ldap_searchobj { #define LDAP_SEARCHPREF_ERR_FILE 4 -#ifndef NEEDPROTOS -int ldap_init_searchprefs(); -int ldap_init_searchprefs_buf(); -void ldap_free_searchprefs(); -struct ldap_searchobj *ldap_first_searchobj(); -struct ldap_searchobj *ldap_next_searchobj(); +LDAP_F int +ldap_init_searchprefs LDAP_P(( char *file, + struct ldap_searchobj **solistp )); -#else /* !NEEDPROTOS */ +LDAP_F int +ldap_init_searchprefs_buf LDAP_P(( char *buf, + long buflen, + struct ldap_searchobj **solistp )); -LDAPFUNCDECL int -ldap_init_searchprefs( char *file, struct ldap_searchobj **solistp ); +LDAP_F void +ldap_free_searchprefs LDAP_P(( struct ldap_searchobj *solist )); -LDAPFUNCDECL int -ldap_init_searchprefs_buf( char *buf, long buflen, - struct ldap_searchobj **solistp ); +LDAP_F struct ldap_searchobj * +ldap_first_searchobj LDAP_P(( struct ldap_searchobj *solist )); -LDAPFUNCDECL void -ldap_free_searchprefs( struct ldap_searchobj *solist ); - -LDAPFUNCDECL struct ldap_searchobj * -ldap_first_searchobj( struct ldap_searchobj *solist ); - -LDAPFUNCDECL struct ldap_searchobj * -ldap_next_searchobj( struct ldap_searchobj *sollist, - struct ldap_searchobj *so ); - -#endif /* !NEEDPROTOS */ +LDAP_F struct ldap_searchobj * +ldap_next_searchobj LDAP_P(( struct ldap_searchobj *sollist, + struct ldap_searchobj *so )); -#ifdef __cplusplus -} -#endif +LDAP_END_DECL + #endif /* _SRCHPREF_H */ diff --git a/libraries/liblber/decode.c b/libraries/liblber/decode.c index d16ca53756..6a198599c6 100644 --- a/libraries/liblber/decode.c +++ b/libraries/liblber/decode.c @@ -11,7 +11,7 @@ * is provided ``as is'' without express or implied warranty. */ -#define LDAP_BRIDGE /* disable LDAP_BRIDGE code */ +#define DISABLE_BRIDGE /* disable LDAP_BRIDGE code */ #include "portable.h" #include diff --git a/libraries/liblutil/sha1.c b/libraries/liblutil/sha1.c index 870b23b16a..5f08be0b0b 100644 --- a/libraries/liblutil/sha1.c +++ b/libraries/liblutil/sha1.c @@ -15,9 +15,8 @@ * 34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F */ -#define SHA1HANDSOFF /* Copies data before messing with it. */ -#define LDAP_BRIDGE +#define DISABLE_BRIDGE #include "portable.h" #include @@ -25,6 +24,7 @@ #include "lutil_sha1.h" +#define SHA1HANDSOFF /* Copies data before messing with it. */ #define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) /* diff --git a/servers/slapd/back-ldbm/dbcache.c b/servers/slapd/back-ldbm/dbcache.c index c16c8b160d..78b2eb5024 100644 --- a/servers/slapd/back-ldbm/dbcache.c +++ b/servers/slapd/back-ldbm/dbcache.c @@ -1,22 +1,27 @@ /* ldbmcache.c - maintain a cache of open ldbm files */ +#define DISABLE_BRIDGE /* disable LDAP_BRIDGE code */ +#include "portable.h" + #include -#include -#include +#include +#include + #include #include #include #include #include -#include "portable.h" -#include "slap.h" -#include "ldapconfig.h" -#include "back-ldbm.h" -#ifndef SYSERRLIST_IN_STDIO +#include "slap.h" +#include "back-ldbm.h" +#include "ldapconfig.h" + +#ifndef DECL_SYS_ERRLIST extern int sys_nerr; extern char *sys_errlist[]; #endif + extern time_t currenttime; extern pthread_mutex_t currenttime_mutex; @@ -176,6 +181,9 @@ ldbm_cache_fetch( ) { Datum data; +#ifdef LDBM_USE_DB2 + memset( &data, 0, sizeof( data ) ); +#endif pthread_mutex_lock( &db->dbc_mutex ); #ifdef reentrant_database @@ -216,6 +224,24 @@ ldbm_cache_store( } #endif +#ifdef LDBM_DEBUG + Statslog( LDAP_DEBUG_STATS, + "=> ldbm_cache_store(): key.dptr=%s, key.dsize=%d\n", + key.dptr, key.dsize, 0, 0, 0 ); + + Statslog( LDAP_DEBUG_STATS, + "=> ldbm_cache_store(): key.dptr=0x%08x, data.dptr=0x%0 8x\n", + key.dptr, data.dptr, 0, 0, 0 ); + + Statslog( LDAP_DEBUG_STATS, + "=> ldbm_cache_store(): data.dptr=%s, data.dsize=%d\n", + data.dptr, data.dsize, 0, 0, 0 ); + + Statslog( LDAP_DEBUG_STATS, + "=> ldbm_cache_store(): flags=0x%08x\n", + flags, 0, 0, 0, 0 ); +#endif /* LDBM_DEBUG */ + rc = ldbm_store( db->dbc_db, key, data, flags ); pthread_mutex_unlock( &db->dbc_mutex ); diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index 5c3ebdf708..c43192cb64 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -1,11 +1,13 @@ +#define DISABLE_BRIDGE +#include "portable.h" + #include -#include -#include +#include +#include #include #include #include #include -#include "portable.h" #include "slap.h" extern Operation *op_add(); @@ -16,7 +18,8 @@ extern long ops_initiated; extern long ops_completed; extern pthread_mutex_t ops_mutex; extern pthread_t listener_tid; -#ifndef SYSERRLIST_IN_STDIO + +#ifndef DECL_SYS_ERRLIST extern int sys_nerr; extern char *sys_errlist[]; #endif @@ -203,6 +206,22 @@ connection_activity( pthread_attr_init( &attr ); pthread_attr_setdetachstate( &attr, PTHREAD_CREATE_DETACHED ); +#ifndef THREAD_MIT_PTHREADS + /* POSIX_THREADS or compatible + * This is a draft 10 or standard pthreads implementation + */ + if ( pthread_create( &arg->co_op->o_tid, &attr, + (void *) connection_operation, (void *) arg ) != 0 ) { + Debug( LDAP_DEBUG_ANY, "pthread_create failed\n", 0, 0, 0 ); + } else { + pthread_mutex_lock( &active_threads_mutex ); + active_threads++; + pthread_mutex_unlock( &active_threads_mutex ); + } +#else /* !THREAD_MIT_PTHREAD */ + /* + * This is a draft 4 or earlier pthreads implementation + */ if ( pthread_create( &arg->co_op->o_tid, attr, (void *) connection_operation, (void *) arg ) != 0 ) { Debug( LDAP_DEBUG_ANY, "pthread_create failed\n", 0, 0, 0 ); @@ -211,5 +230,6 @@ connection_activity( active_threads++; pthread_mutex_unlock( &active_threads_mutex ); } +#endif /* !THREAD_MIT_PTHREAD */ pthread_attr_destroy( &attr ); } diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index 161fb79cf0..42ab6eaa53 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -1,9 +1,19 @@ + +/* Revision history + * + * 5-Jun-96 hodges + * Added locking of new_conn_mutex when traversing the c[] array. + */ + +#define DISABLE_BRIDGE /* disable bridge code */ +#include "portable.h" + #include -#include +#include #include #include #include -#include +#include #include #include #include @@ -12,7 +22,6 @@ #include #endif #include "slap.h" -#include "portable.h" #include "ldapconfig.h" #ifdef NEED_FILIO #include @@ -23,12 +32,20 @@ #include #endif /* USE_SYSCONF */ +#ifdef TCP_WRAPPERS +#include + +int allow_severity = LOG_INFO; +int deny_severity = LOG_NOTICE; +#endif /* TCP_WRAPPERS */ + extern Operation *op_add(); -#ifndef SYSERRLIST_IN_STDIO +#ifndef DECL_SYS_ERRLIST extern int sys_nerr; extern char *sys_errlist[]; #endif + extern time_t currenttime; extern pthread_mutex_t currenttime_mutex; extern int active_threads; @@ -48,7 +65,7 @@ static void set_shutdown(); static void do_nothing(); void -daemon( +slapd_daemon( int port ) { @@ -64,10 +81,18 @@ daemon( int on = 1; #ifdef USE_SYSCONF - dtblsize = sysconf( _SC_OPEN_MAX ); + dtblsize = sysconf( _SC_OPEN_MAX ); #else /* USE_SYSCONF */ - dtblsize = getdtablesize(); + dtblsize = getdtablesize(); #endif /* USE_SYSCONF */ + /* + * Add greg@greg.rim.or.jp + */ +#ifdef FD_SETSIZE + if(dtblsize > FD_SETSIZE) { + dtblsize = FD_SETSIZE; + } +#endif /* !FD_SETSIZE */ c = (Connection *) ch_calloc( 1, dtblsize * sizeof(Connection) ); @@ -127,9 +152,19 @@ daemon( } (void) SIGNAL( SIGPIPE, SIG_IGN ); +#ifdef linux + /* + * LinuxThreads are implemented using SIGUSR1/USR2, + * so we'll use SIGSTKFLT and SIGUNUSED + */ + (void) SIGNAL( SIGSTKFLT, (void *) do_nothing ); + (void) SIGNAL( SIGUNUSED, (void *) set_shutdown ); +#else /* !linux */ (void) SIGNAL( SIGUSR1, (void *) do_nothing ); (void) SIGNAL( SIGUSR2, (void *) set_shutdown ); +#endif /* !linux */ (void) SIGNAL( SIGTERM, (void *) set_shutdown ); + (void) SIGNAL( SIGINT, (void *) set_shutdown ); (void) SIGNAL( SIGHUP, (void *) set_shutdown ); Debug( LDAP_DEBUG_ANY, "slapd starting\n", 0, 0, 0 ); @@ -156,6 +191,9 @@ daemon( struct timeval *tvp; int len, pid; + char *client_name; + char *client_addr; + FD_ZERO( &writefds ); FD_ZERO( &readfds ); FD_SET( tcps, &readfds ); @@ -164,6 +202,8 @@ daemon( Debug( LDAP_DEBUG_CONNS, "listening for connections on %d, activity on:", tcps, 0, 0 ); + + pthread_mutex_lock( &new_conn_mutex ); for ( i = 0; i < dtblsize; i++ ) { if ( c[i].c_sb.sb_sd != -1 ) { FD_SET( c[i].c_sb.sb_sd, &readfds ); @@ -176,19 +216,20 @@ daemon( } } Debug( LDAP_DEBUG_CONNS, "\n", 0, 0, 0 ); + pthread_mutex_unlock( &new_conn_mutex ); zero.tv_sec = 0; zero.tv_usec = 0; Debug( LDAP_DEBUG_CONNS, "before select active_threads %d\n", active_threads, 0, 0 ); -#ifdef PTHREAD_PREEMPTIVE +#if defined(PTHREAD_PREEMPTIVE) || defined(NO_THREADS) tvp = NULL; #else tvp = active_threads ? &zero : NULL; #endif pthread_mutex_unlock( &active_threads_mutex ); - switch ( select( dtblsize, &readfds, &writefds, 0, tvp ) ) { + switch ( i = select( dtblsize, &readfds, &writefds, 0, tvp ) ) { case -1: /* failure - try again */ Debug( LDAP_DEBUG_CONNS, "select failed errno %d (%s)\n", @@ -203,7 +244,7 @@ daemon( continue; default: /* something happened - deal with it */ - Debug( LDAP_DEBUG_CONNS, "select activity\n", 0, 0, 0 ); + Debug( LDAP_DEBUG_CONNS, "select activity on %d descriptors\n", i, 0, 0 ); ; /* FALL */ } pthread_mutex_lock( ¤ttime_mutex ); @@ -225,8 +266,9 @@ daemon( } if ( ioctl( ns, FIONBIO, (caddr_t) &on ) == -1 ) { Debug( LDAP_DEBUG_ANY, - "FIONBIO ioctl on %d faled\n", ns, 0, 0 ); + "FIONBIO ioctl on %d failed\n", ns, 0, 0 ); } + c[ns].c_sb.sb_sd = ns; Debug( LDAP_DEBUG_CONNS, "new connection on %d\n", ns, 0, 0 ); @@ -234,43 +276,76 @@ daemon( pthread_mutex_lock( &ops_mutex ); c[ns].c_connid = num_conns++; pthread_mutex_unlock( &ops_mutex ); + len = sizeof(from); + if ( getpeername( ns, (struct sockaddr *) &from, &len ) == 0 ) { - char *s; -#ifdef REVERSE_LOOKUP + char *s; + client_addr = inet_ntoa( from.sin_addr ); + +#if defined(REVERSE_LOOKUP) || defined(TCP_WRAPPERS) hp = gethostbyaddr( (char *) &(from.sin_addr.s_addr), sizeof(from.sin_addr.s_addr), AF_INET ); + + if(hp) { + client_name = hp->h_name; + + /* normalize the domain */ + for ( s = client_name; *s; s++ ) { + *s = TOLOWER( *s ); + } + + } else { + client_name = NULL; + } #else - hp = NULL; + client_name = NULL; #endif - Statslog( LDAP_DEBUG_STATS, - "conn=%d fd=%d connection from %s (%s)\n", - c[ns].c_connid, ns, hp == NULL ? "unknown" - : hp->h_name, inet_ntoa( from.sin_addr ), - 0 ); - - if ( c[ns].c_addr != NULL ) { - free( c[ns].c_addr ); - } - c[ns].c_addr = strdup( inet_ntoa( - from.sin_addr ) ); - if ( c[ns].c_domain != NULL ) { - free( c[ns].c_domain ); - } - c[ns].c_domain = strdup( hp == NULL ? "" : - hp->h_name ); - /* normalize the domain */ - for ( s = c[ns].c_domain; *s; s++ ) { - *s = TOLOWER( *s ); - } } else { - Statslog( LDAP_DEBUG_STATS, - "conn=%d fd=%d connection from unknown\n", - c[ns].c_connid, ns, 0, 0, 0 ); + client_name = NULL;; + client_addr = NULL; } + +#ifdef TCP_WRAPPERS + if(!hosts_ctl("slapd", client_name, client_addr, + STRING_UNKNOWN)) + { + /* DENY ACCESS */ + Statslog( LDAP_DEBUG_STATS, + "conn=%d fd=%d connection from %s (%s) denied.\n", + c[ns].c_connid, ns, + client_name == NULL ? "unknown" : client_name, + client_addr == NULL ? "unknown" : client_addr, + 0 ); + + close(ns); + pthread_mutex_unlock( &new_conn_mutex ); + continue; + } +#endif /* TCP_WRAPPERS */ + + Statslog( LDAP_DEBUG_STATS, + "conn=%d fd=%d connection from %s (%s) accepted.\n", + c[ns].c_connid, ns, + client_name == NULL ? "unknown" : client_name, + client_addr == NULL ? "unknown" : client_addr, + 0 ); + + if ( c[ns].c_addr != NULL ) { + free( c[ns].c_addr ); + } + c[ns].c_addr = strdup( client_addr ); + + if ( c[ns].c_domain != NULL ) { + free( c[ns].c_domain ); + } + + c[ns].c_domain = strdup( client_name == NULL + ? "" : client_name ); + pthread_mutex_lock( &c[ns].c_dnmutex ); if ( c[ns].c_dn != NULL ) { free( c[ns].c_dn ); @@ -349,15 +424,33 @@ set_shutdown() { Debug( LDAP_DEBUG_ANY, "slapd got shutdown signal\n", 0, 0, 0 ); slapd_shutdown = 1; +#ifdef linux + /* + * LinuxThreads are implemented using SIGUSR1/USR2, + * so we'll use SIGSTKFLT and SIGUNUSED + */ + pthread_kill( listener_tid, SIGSTKFLT ); + (void) SIGNAL( SIGUNUSED, (void *) set_shutdown ); +#else /* !linux */ pthread_kill( listener_tid, SIGUSR1 ); (void) SIGNAL( SIGUSR2, (void *) set_shutdown ); +#endif /* !linux */ (void) SIGNAL( SIGTERM, (void *) set_shutdown ); + (void) SIGNAL( SIGINT, (void *) set_shutdown ); (void) SIGNAL( SIGHUP, (void *) set_shutdown ); } static void do_nothing() { - Debug( LDAP_DEBUG_TRACE, "slapd got SIGUSR1\n", 0, 0, 0 ); + Debug( LDAP_DEBUG_TRACE, "slapd got do_nothing signal\n", 0, 0, 0 ); +#ifdef linux + /* + * LinuxThreads are implemented using SIGUSR1/USR2, + * so we'll use SIGSTKFLT and SIGUNUSED + */ + (void) SIGNAL( SIGSTKFLT, (void *) do_nothing ); +#else /* !linux */ (void) SIGNAL( SIGUSR1, (void *) do_nothing ); +#endif /* !linux */ } diff --git a/servers/slapd/result.c b/servers/slapd/result.c index 0ef82a7b3e..bd4dec8fee 100644 --- a/servers/slapd/result.c +++ b/servers/slapd/result.c @@ -1,20 +1,23 @@ /* result.c - routines to send ldap results, errors, and referrals */ +#define DISABLE_BRIDGE +#include "portable.h" + #include -#include -#include +#include +#include #include #include #include #include #include -#include "portable.h" #include "slap.h" -#ifndef SYSERRLIST_IN_STDIO +#ifndef DECL_SYS_ERRLIST extern int sys_nerr; extern char *sys_errlist[]; #endif + extern int active_threads; extern pthread_mutex_t active_threads_mutex; extern pthread_mutex_t new_conn_mutex; @@ -121,7 +124,13 @@ send_ldap_result2( pthread_mutex_lock( &active_threads_mutex ); active_threads--; conn->c_writewaiter = 1; + +#ifdef linux + pthread_kill( listener_tid, SIGSTKFLT ); +#else /* !linux */ pthread_kill( listener_tid, SIGUSR1 ); +#endif /* !linux */ + pthread_cond_wait( &conn->c_wcv, &active_threads_mutex ); pthread_mutex_unlock( &active_threads_mutex ); @@ -192,6 +201,7 @@ send_search_entry( Attribute *a; int i, rc, bytes, sd; struct acl *acl; + char *edn; Debug( LDAP_DEBUG_TRACE, "=> send_search_entry (%s)\n", e->e_dn, 0, 0 ); @@ -202,15 +212,19 @@ send_search_entry( return( 1 ); } + edn = dn_normalize_case( strdup( e->e_dn ) ); + #ifdef COMPAT30 if ( (ber = ber_alloc_t( conn->c_version == 30 ? 0 : LBER_USE_DER )) - == NULLBER ) { + == NULLBER ) #else - if ( (ber = der_alloc()) == NULLBER ) { + if ( (ber = der_alloc()) == NULLBER ) #endif + { Debug( LDAP_DEBUG_ANY, "ber_alloc failed\n", 0, 0, 0 ); send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL, - "ber_alloc" ); + "ber_alloc" ); + free(edn); return( 1 ); } @@ -220,26 +234,44 @@ send_search_entry( LDAP_RES_SEARCH_ENTRY, e->e_dn ); } else #endif + { rc = ber_printf( ber, "{it{s{", op->o_msgid, - LDAP_RES_SEARCH_ENTRY, e->e_dn ); + LDAP_RES_SEARCH_ENTRY, e->e_dn ); + } if ( rc == -1 ) { Debug( LDAP_DEBUG_ANY, "ber_printf failed\n", 0, 0, 0 ); ber_free( ber, 1 ); send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL, "ber_printf dn" ); + free(edn); return( 1 ); } for ( a = e->e_attrs; a != NULL; a = a->a_next ) { + regmatch_t matches[MAXREMATCHES]; + if ( attrs != NULL && ! charray_inlist( attrs, a->a_type ) ) { continue; } - acl = acl_get_applicable( be, op, e, a->a_type ); + /* the lastmod attributes are ignored by ACL checking */ + if ( strcasecmp( a->a_type, "modifiersname" ) == 0 || + strcasecmp( a->a_type, "modifytimestamp" ) == 0 || + strcasecmp( a->a_type, "creatorsname" ) == 0 || + strcasecmp( a->a_type, "createtimestamp" ) == 0 ) + { + Debug( LDAP_DEBUG_ACL, "LASTMOD attribute: %s access DEFAULT\n", + a->a_type, 0, 0 ); + acl = NULL; + } else { + acl = acl_get_applicable( be, op, e, a->a_type, edn, + MAXREMATCHES, matches ); + } - if ( ! acl_access_allowed( acl, be, conn, e, NULL, op, - ACL_READ ) ) { + if ( ! acl_access_allowed( acl, be, conn, e, NULL, op, ACL_READ, + edn, matches ) ) + { continue; } @@ -248,14 +280,15 @@ send_search_entry( ber_free( ber, 1 ); send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL, "ber_printf type" ); + free(edn); return( 1 ); } if ( ! attrsonly ) { for ( i = 0; a->a_vals[i] != NULL; i++ ) { - if ( a->a_syntax & SYNTAX_DN && - ! acl_access_allowed( acl, be, conn, e, - a->a_vals[i], op, ACL_READ ) ) + if ( a->a_syntax & SYNTAX_DN && + ! acl_access_allowed( acl, be, conn, e, a->a_vals[i], op, + ACL_READ, edn, matches) ) { continue; } @@ -270,6 +303,7 @@ send_search_entry( send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL, "ber_printf value" ); + free(edn); return( 1 ); } } @@ -280,10 +314,13 @@ send_search_entry( ber_free( ber, 1 ); send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL, "ber_printf type end" ); + free(edn); return( 1 ); } } + free(edn); + #ifdef COMPAT30 if ( conn->c_version == 30 ) { rc = ber_printf( ber, "}}}}" ); diff --git a/servers/slurpd/fm.c b/servers/slurpd/fm.c index 2d36838bb5..04717dd06c 100644 --- a/servers/slurpd/fm.c +++ b/servers/slurpd/fm.c @@ -14,49 +14,36 @@ * fm.c - file management routines. */ +#define DISABLE_BRIDGE +#include "portable.h" + #include -#include -#include +#include +#include #include "slurp.h" #include "globals.h" -extern void do_admin(); - -static void set_shutdown(); -void do_nothing(); /* * Externs */ -#ifdef NEEDPROTOS -extern int file_nonempty( char * ); -extern int acquire_lock(char *, FILE **, FILE ** ); -extern int relinquish_lock(char *, FILE *, FILE * ); -#else /* NEEDPROTOS */ -extern int file_nonempty(); -extern int acquire_lock(); -extern int relinquish_lock(); -#endif /* NEEDPROTOS */ +extern void do_admin LDAP_P((void)); +extern int file_nonempty LDAP_P(( char * )); +extern int acquire_lock LDAP_P((char *, FILE **, FILE ** )); +extern int relinquish_lock LDAP_P((char *, FILE *, FILE * )); /* * Forward references */ -#ifdef NEEDPROTOS -static char *get_record( FILE * ); -static void populate_queue( char *f ); -static void set_shutdown(); -void do_nothing(); -#else /* NEEDPROTOS */ -static char *get_record(); -static void populate_queue(); -static void set_shutdown(); -void do_nothing(); -#endif /* NEEDPROTOS */ +static char *get_record LDAP_P(( FILE * )); +static void populate_queue LDAP_P(( char *f )); +static void set_shutdown LDAP_P((void)); +void do_nothing LDAP_P((void)); -#ifndef SYSERRLIST_IN_STDIO +#ifndef DECL_SYS_ERRLIST extern char *sys_errlist[]; -#endif /* SYSERRLIST_IN_STDIO */ +#endif /* DECL_SYS_ERRLIST */ @@ -77,12 +64,20 @@ fm( /* Set up our signal handlers: * SIG{TERM,INT,HUP} causes a shutdown - * SIGUSR1 - does nothing, used to wake up sleeping threads. - * SIGUSR2 - causes slurpd to read its administrative interface file. + * SIG(STKFLT|USR1) - does nothing, used to wake up sleeping threads. + * SIG(UNUSED|USR2) - causes slurpd to read its administrative interface file. * (not yet implemented). */ +#ifdef SIGSTKFLT + (void) SIGNAL( SIGSTKFLT, (void *) do_nothing ); +#else (void) SIGNAL( SIGUSR1, (void *) do_nothing ); +#endif +#ifdef SIGUNUSED + (void) SIGNAL( SIGUNUSED, (void *) do_admin ); +#else (void) SIGNAL( SIGUSR2, (void *) do_admin ); +#endif (void) SIGNAL( SIGTERM, (void *) set_shutdown ); (void) SIGNAL( SIGINT, (void *) set_shutdown ); (void) SIGNAL( SIGHUP, (void *) set_shutdown ); @@ -160,7 +155,11 @@ set_shutdown() int i; sglob->slurpd_shutdown = 1; /* set flag */ +#ifdef SIGSTKFLT + pthread_kill( sglob->fm_tid, SIGSTKFLT ); /* wake up file mgr */ +#else pthread_kill( sglob->fm_tid, SIGUSR1 ); /* wake up file mgr */ +#endif sglob->rq->rq_lock( sglob->rq ); /* lock queue */ pthread_cond_broadcast( &(sglob->rq->rq_more) ); /* wake repl threads */ for ( i = 0; i < sglob->num_replicas; i++ ) { @@ -181,7 +180,11 @@ set_shutdown() void do_nothing() { +#ifdef SIGSTKFLT + (void) SIGNAL( SIGSTKFLT, (void *) do_nothing ); +#else (void) SIGNAL( SIGUSR1, (void *) do_nothing ); +#endif } diff --git a/servers/slurpd/ldap_op.c b/servers/slurpd/ldap_op.c index 08253921cd..c9bdf7e689 100644 --- a/servers/slurpd/ldap_op.c +++ b/servers/slurpd/ldap_op.c @@ -14,43 +14,49 @@ * ldap_op.c - routines to perform LDAP operations */ +#define DISABLE_BRIDGE +#include "portable.h" + #include -#include +#include +#include #include -#include #ifdef KERBEROS +#ifdef KERBEROS_V +#include +#else #include +#endif /* KERBEROS_V */ #endif /* KERBEROS */ #include #include -#include "portable.h" #include "slurp.h" /* Forward references */ -static int get_changetype( char * ); -static struct berval **make_singlevalued_berval( char *, int ); -static int op_ldap_add( Ri *, Re *, char ** ); -static int op_ldap_modify( Ri *, Re *, char ** ); -static int op_ldap_delete( Ri *, Re *, char ** ); -static int op_ldap_modrdn( Ri *, Re *, char ** ); -static LDAPMod *alloc_ldapmod(); -static void free_ldapmod( LDAPMod * ); -static void free_ldmarr( LDAPMod ** ); -static int getmodtype( char * ); -static void dump_ldm_array( LDAPMod ** ); -static char **read_krbnames( Ri * ); -static void upcase( char * ); -static int do_bind( Ri *, int * ); -static int do_unbind( Ri * ); +static int get_changetype LDAP_P(( char * )); +static struct berval **make_singlevalued_berval LDAP_P(( char *, int )); +static int op_ldap_add LDAP_P(( Ri *, Re *, char ** )); +static int op_ldap_modify LDAP_P(( Ri *, Re *, char ** )); +static int op_ldap_delete LDAP_P(( Ri *, Re *, char ** )); +static int op_ldap_modrdn LDAP_P(( Ri *, Re *, char ** )); +static LDAPMod *alloc_ldapmod LDAP_P(()); +static void free_ldapmod LDAP_P(( LDAPMod * )); +static void free_ldmarr LDAP_P(( LDAPMod ** )); +static int getmodtype LDAP_P(( char * )); +static void dump_ldm_array LDAP_P(( LDAPMod ** )); +static char **read_krbnames LDAP_P(( Ri * )); +static void upcase LDAP_P(( char * )); +static int do_bind LDAP_P(( Ri *, int * )); +static int do_unbind LDAP_P(( Ri * )); /* External references */ -#ifndef SYSERRLIST_IN_STDIO +#ifndef DECL_SYS_ERRLIST extern char *sys_errlist[]; -#endif /* SYSERRLIST_IN_STDIO */ +#endif /* DECL_SYS_ERRLIST */ extern char *ch_malloc( unsigned long ); diff --git a/servers/slurpd/re.c b/servers/slurpd/re.c index 4a6dc38237..a712b63a64 100644 --- a/servers/slurpd/re.c +++ b/servers/slurpd/re.c @@ -18,8 +18,11 @@ */ +#define DISABLE_BRIDGE +#include "portable.h" + #include -#include +#include #include #include @@ -28,18 +31,20 @@ #include "globals.h" /* externs */ -extern char *str_getline( char **next ); -extern void ch_free( char *p ); +extern char *str_getline LDAP_P(( char **next )); +extern void ch_free LDAP_P(( char *p )); +#ifndef DECL_SYS_ERRLIST extern char *sys_errlist[]; +#endif /* DECL_SYS_ERRLIST */ /* Forward references */ -static Rh *get_repl_hosts( char *, int *, char ** ); -static int gettype( char * ); -static int getchangetype( char *); -static int Re_parse( Re *re, char *replbuf ); -static void Re_dump( Re *re, FILE *fp ); -static void warn_unknown_replica( char *, int port ); +static Rh *get_repl_hosts LDAP_P(( char *, int *, char ** )); +static int gettype LDAP_P(( char * )); +static int getchangetype LDAP_P(( char * )); +static int Re_parse LDAP_P(( Re *re, char *replbuf )); +static void Re_dump LDAP_P(( Re *re, FILE *fp )); +static void warn_unknown_replica LDAP_P(( char *, int port )); /* Globals, scoped within this file */ static int nur = 0; /* Number of unknown replicas */ @@ -182,7 +187,9 @@ Re_parse( state |= GOT_TIME; break; case T_DN: - re->re_dn = strdup( value ); + re->re_dn = ch_malloc( len + 1 ); + memcpy( re->re_dn, value, len ); + re->re_dn[ len ]='\0'; state |= GOT_DN; break; default: @@ -222,7 +229,9 @@ Re_parse( sizeof( Mi ) * ( nml + 2 )); re->re_mods[ nml ].mi_type = strdup( type ); if ( value != NULL ) { - re->re_mods[ nml ].mi_val = strdup( value ); + re->re_mods[ nml ].mi_val = ch_malloc( len + 1 ); + memcpy( re->re_mods[ nml ].mi_val, value, len ); + re->re_mods[ nml ].mi_val[ len ] = '\0'; re->re_mods[ nml ].mi_len = len; } else { re->re_mods[ nml ].mi_val = NULL; diff --git a/servers/slurpd/reject.c b/servers/slurpd/reject.c index 8ae0dc6363..b87f55145a 100644 --- a/servers/slurpd/reject.c +++ b/servers/slurpd/reject.c @@ -17,6 +17,8 @@ * to a replica LDAP server. */ +#define DISABLE_BRIDGE +#include "portable.h" #include #include @@ -27,9 +29,9 @@ #include "slurp.h" #include "globals.h" -#ifndef SYSERRLIST_IN_STDIO +#ifndef DECL_SYS_ERRLIST extern char *sys_errlist[]; -#endif /* SYSERRLIST_IN_STDIO */ +#endif /* DECL_SYS_ERRLIST */ /* diff --git a/servers/slurpd/replog.c b/servers/slurpd/replog.c index c3a855cffe..5c145a475b 100644 --- a/servers/slurpd/replog.c +++ b/servers/slurpd/replog.c @@ -15,44 +15,37 @@ * replog.c - routines which read and write replication log files. */ +#define DISABLE_BRIDGE +#include "portable.h" + #include #include #include -#include +#include #include #include #include #include #include -#include +#include -#include "portable.h" #include "slurp.h" #include "globals.h" /* * Externs */ -#ifdef NEEDPROTOS -extern FILE *lock_fopen( char *, char *, FILE ** ); -extern char *ch_malloc( unsigned long ); -#else /* NEEDPROTOS */ -extern FILE *lock_fopen(); -extern char *ch_malloc(); -#endif /* NEEDPROTOS */ +extern FILE *lock_fopen LDAP_P(( char *, char *, FILE ** )); +extern char *ch_malloc LDAP_P(( unsigned long )); /* * Forward declarations */ -#ifdef NEEDPROTOS -int file_nonempty( char * ); -#else /* NEEDPROTOS */ -int file_nonempty(); -#endif /* NEEDPROTOS */ +int file_nonempty LDAP_P(( char * )); -#ifndef SYSERRLIST_IN_STDIO +#ifndef DECL_SYS_ERRLIST extern char *sys_errlist[]; #endif @@ -62,8 +55,6 @@ extern char *sys_errlist[]; static int duplicate_replog( char *, char * ); - - /* * Copy the replication log. Returns 0 on success, 1 if a temporary * error occurs, and -1 if a fatal error occurs. diff --git a/servers/slurpd/rq.c b/servers/slurpd/rq.c index 54adb4da1a..74f2d8ca1f 100644 --- a/servers/slurpd/rq.c +++ b/servers/slurpd/rq.c @@ -31,6 +31,9 @@ * */ +#define DISABLE_BRIDGE +#include "portable.h" + #include #include "slurp.h" @@ -38,15 +41,11 @@ /* externs */ -#ifdef NEEDPROTOS -extern void Re_dump( Re *re ); -#else /* NEEDPROTOS */ -extern void Re_dump(); -#endif /* NEEDPROTOS */ - +extern void Re_dump LDAP_P(( Re *re )); +#ifndef DECL_SYS_ERRLIST extern char *sys_errlist[]; - +#endif /* DECL_SYS_ERRLIST */ /* * Lock the replication queue. @@ -60,9 +59,6 @@ Rq_lock( } - - - /* * Unlock the replication queue. */ @@ -89,8 +85,6 @@ Rq_gethead( } - - /* * Return the next item in the queue. Callers should lock the queue before * calling this routine. @@ -108,8 +102,6 @@ Rq_getnext( } - - /* * Delete the item at the head of the list. The queue should be locked * by the caller before calling this routine. @@ -144,8 +136,6 @@ Rq_delhead( } - - /* * Add an entry to the tail of the replication queue. Locking is handled * internally. When items are added to the queue, this routine wakes @@ -209,8 +199,6 @@ Rq_add( } - - /* * Garbage-collect the replication queue. Locking is handled internally. */ @@ -234,7 +222,6 @@ Rq_gc( } - /* * For debugging: dump the contents of the replication queue to a file. * Locking is handled internally. @@ -268,7 +255,6 @@ Rq_dump( } - /* * Write the contents of a replication queue to a file. Returns zero if * successful, -1 if not. Handles queue locking internally. Callers should @@ -317,8 +303,6 @@ Rq_write( } - - /* * Check to see if the private slurpd replication log needs trimming. * The current criteria are: @@ -391,8 +375,6 @@ Rq_getcount( } - - /* * Allocate and initialize an Rq object. */ diff --git a/servers/slurpd/st.c b/servers/slurpd/st.c index 610b295853..79160720ed 100644 --- a/servers/slurpd/st.c +++ b/servers/slurpd/st.c @@ -16,18 +16,19 @@ * writing status information to disk. */ - +#define DISABLE_BRIDGE +#include "portable.h" #include -#include +#include #include #include "slurp.h" #include "globals.h" -#ifndef SYSERRLIST_IN_STDIO +#ifndef DECL_SYS_ERRLIST extern char *sys_errlist[]; -#endif /* SYSERRLIST_IN_STDIO */ +#endif /* DECL_SYS_ERRLIST */ /* * Add information about replica host specified by Ri to list @@ -56,8 +57,7 @@ St_add( pthread_mutex_unlock( &(st->st_mutex )); return NULL; } - st->st_data[ ind ] = ( Stel * ) ch_malloc( st->st_data, - sizeof( Stel )); + st->st_data[ ind ] = ( Stel * ) ch_malloc( sizeof( Stel ) ); if ( st->st_data[ ind ] == NULL ) { pthread_mutex_unlock( &(st->st_mutex )); return NULL; From 46c3cddad45949774bfeda3461d522c0cb26b93f Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 23 Sep 1998 08:56:54 +0000 Subject: [PATCH 082/148] more ldap_cdefs.h, less bridge.h --- include/ldif.h | 27 +++++++------------- include/lthread.h | 7 ++++++ include/lthread_rdwr.h | 46 +++++++++++++++++++++++++++++++++++ libraries/liblthread/thread.c | 7 ++++-- 4 files changed, 67 insertions(+), 20 deletions(-) create mode 100644 include/lthread_rdwr.h diff --git a/include/ldif.h b/include/ldif.h index dd2b339193..c24bb0a152 100644 --- a/include/ldif.h +++ b/include/ldif.h @@ -13,9 +13,9 @@ #ifndef _LDIF_H #define _LDIF_H -#ifdef __cplusplus -extern "C" { -#endif +#include + +LDAP_BEGIN_DECL #define LINE_WIDTH 76 /* maximum length of LDIF lines */ @@ -34,23 +34,14 @@ extern "C" { */ #define LDIF_SIZE_NEEDED(tlen,vlen) \ ((tlen) + 4 + LDIF_BASE64_LEN(vlen) \ - + ((LDIF_BASE64_LEN(vlen) + tlen + 3) / LINE_WIDTH * 2 )) + + ((LDIF_BASE64_LEN(vlen) + (tlen) + 3) / LINE_WIDTH * 2 )) -#ifdef NEEDPROTOS -int str_parse_line( char *line, char **type, char **value, int *vlen); -char * str_getline( char **next ); -void put_type_and_value( char **out, char *t, char *val, int vlen ); -char *ldif_type_and_value( char *type, char *val, int vlen ); -#else /* NEEDPROTOS */ -int str_parse_line(); -char * str_getline(); -void put_type_and_value(); -char *ldif_type_and_value(); -#endif /* NEEDPROTOS */ +int str_parse_line LDAP_P(( char *line, char **type, char **value, int *vlen)); +char * str_getline LDAP_P(( char **next )); +void put_type_and_value LDAP_P(( char **out, char *t, char *val, int vlen )); +char *ldif_type_and_value LDAP_P(( char *type, char *val, int vlen )); -#ifdef __cplusplus -} -#endif +LDAP_END_DECL #endif /* _LDIF_H */ diff --git a/include/lthread.h b/include/lthread.h index d3fd3d0ec6..e9a4ee4f46 100644 --- a/include/lthread.h +++ b/include/lthread.h @@ -3,6 +3,10 @@ #ifndef _LTHREAD_H #define _LTHREAD_H +#include + +LDAP_BEGIN_DECL + #if defined ( THREAD_NEXT_CTHREADS ) #define _THREAD @@ -222,4 +226,7 @@ typedef int pthread_condattr_t; typedef int pthread_cond_t; #endif /* no threads support */ + +LDAP_END_DECL + #endif /* _LTHREAD_H */ diff --git a/include/lthread_rdwr.h b/include/lthread_rdwr.h new file mode 100644 index 0000000000..1c751f39a6 --- /dev/null +++ b/include/lthread_rdwr.h @@ -0,0 +1,46 @@ +#ifndef _LTHREAD_RDWR_H +#define _LTHREAD_RDWR_H 1 + +/******************************************************** + * An example source module to accompany... + * + * "Using POSIX Threads: Programming with Pthreads" + * by Brad nichols, Dick Buttlar, Jackie Farrell + * O'Reilly & Associates, Inc. + * + ******************************************************** + * + * Include file for reader/writer locks + * + */ + +#include + +LDAP_BEGIN_DECL + +typedef struct rdwr_var { + int readers_reading; + int writer_writing; + pthread_mutex_t mutex; + pthread_cond_t lock_free; +} pthread_rdwr_t; + +typedef void * pthread_rdwrattr_t; + +#define pthread_rdwrattr_default NULL; + +int pthread_rdwr_init_np LDAP_P((pthread_rdwr_t *rdwrp, pthread_rdwrattr_t *attrp)); +int pthread_rdwr_rlock_np LDAP_P((pthread_rdwr_t *rdwrp)); +int pthread_rdwr_runlock_np LDAP_P((pthread_rdwr_t *rdwrp)); +int pthread_rdwr_wlock_np LDAP_P((pthread_rdwr_t *rdwrp)); +int pthread_rdwr_wunlock_np LDAP_P((pthread_rdwr_t *rdwrp)); + +#ifdef LDAP_DEBUG +int pthread_rdwr_rchk_np LDAP_P((pthread_rdwr_t *rdwrp)); +int pthread_rdwr_wchk_np LDAP_P((pthread_rdwr_t *rdwrp)); +int pthread_rdwr_rwchk_np LDAP_P((pthread_rdwr_t *rdwrp)); +#endif /* LDAP_DEBUG */ + +LDAP_END_DECL + +#endif /* _LTHREAD_RDWR_H */ diff --git a/libraries/liblthread/thread.c b/libraries/liblthread/thread.c index d0a62d5a81..d4fea7e477 100644 --- a/libraries/liblthread/thread.c +++ b/libraries/liblthread/thread.c @@ -1,6 +1,9 @@ /* thread.c - glue routines to provide a consistent thread interface */ -#include -#include "lthread.h" + +#define DISABLE_BRIDGE +#include "portable.h" + +#include #if defined( THREAD_NEXT_CTHREADS ) From 0c0f011dc0302348484d0278e2e8f2cbe53d1961 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 25 Sep 1998 19:25:20 +0000 Subject: [PATCH 083/148] Everything compiles.... but tests fail... --- clients/tools/ldapmodify.c | 8 +- configure | 26 +++--- configure.in | 4 +- include/ac/string.h | 35 +++++--- include/avl.h | 47 ++++++++--- include/lber.h | 131 +++++++++++++++++++----------- include/portable.h.in | 7 ++ libraries/libavl/avl.c | 49 +++++------ libraries/libavl/testavl.c | 25 ++---- libraries/liblber/decode.c | 42 +++++----- libraries/liblber/encode.c | 76 ++++++++--------- libraries/liblber/io.c | 51 +++++------- libraries/libldap/cache.c | 60 ++++++-------- libraries/libldap/cldap.c | 22 ++--- libraries/libldap/getdn.c | 8 +- libraries/libldap/getfilter.c | 82 +++++++++++-------- libraries/libldap/os-ip.c | 47 +++++++---- servers/slapd/attr.c | 2 +- servers/slapd/back-ldbm/attr.c | 2 +- servers/slapd/back-ldbm/cache.c | 33 +++++--- servers/slapd/back-ldbm/dbcache.c | 2 +- servers/slapd/back-ldbm/idl.c | 47 +++++++++-- servers/slapd/connection.c | 2 +- servers/slapd/daemon.c | 4 +- servers/slapd/result.c | 2 +- servers/slapd/tools/ldbmtest.c | 30 ++++++- servers/slurpd/fm.c | 2 +- servers/slurpd/ldap_op.c | 2 +- servers/slurpd/re.c | 2 +- servers/slurpd/reject.c | 2 +- servers/slurpd/replog.c | 2 +- servers/slurpd/rq.c | 2 +- servers/slurpd/st.c | 2 +- 33 files changed, 513 insertions(+), 345 deletions(-) diff --git a/clients/tools/ldapmodify.c b/clients/tools/ldapmodify.c index d09b9ad839..056eb2e331 100644 --- a/clients/tools/ldapmodify.c +++ b/clients/tools/ldapmodify.c @@ -1,7 +1,10 @@ /* ldapmodify.c - generic program to modify or add entries using LDAP */ +#define DISABLE_BRIDGE +#include "portable.h" + #include -#include +#include #include #include #include @@ -11,6 +14,7 @@ #ifndef VMS #include #endif /* VMS */ + #include #include #include @@ -19,7 +23,7 @@ static char *prog; static char *binddn = LDAPMODIFY_BINDDN; -static char *passwd = NULL; +static char *passwd = LDAPMODIFY_BIND_CRED; static char *ldaphost = LDAPHOST; static int ldapport = LDAP_PORT; static int new, replace, not, verbose, contoper, force, valsfromfiles; diff --git a/configure b/configure index fd5b50eb5c..5da7ee17ca 100755 --- a/configure +++ b/configure @@ -5700,12 +5700,14 @@ fi for ac_func in \ + bcopy \ flock \ gethostname \ gettimeofday \ getdtablesize \ lockf \ memcpy \ + memmove \ mktime \ select \ setpwfile \ @@ -5724,12 +5726,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5728: checking for $ac_func" >&5 +echo "configure:5730: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5780,12 +5782,12 @@ done for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5784: checking for $ac_func" >&5 +echo "configure:5786: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5838,13 +5840,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:5842: checking declaration of sys_errlist" >&5 +echo "configure:5844: 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 < @@ -5854,7 +5856,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:5858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -5875,20 +5877,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:5879: checking existence of sys_errlist" >&5 +echo "configure:5881: 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 < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:5892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index dc50682c2d..92443567d8 100644 --- a/configure.in +++ b/configure.in @@ -28,7 +28,7 @@ OL_ARG_ENABLE(libui,[ --enable-libui enable library user interface], yes)dnl OL_ARG_ENABLE(cache,[ --enable-cache enable caching], yes)dnl OL_ARG_ENABLE(dns,[ --enable-dns enable dns support], no)dnl OL_ARG_ENABLE(referrals,[ --enable-referrals enable referrals], yes)dnl -OL_ARG_ENABLE(cldap,[ --enable-clapd enable connectionless ldap], no)dnl +OL_ARG_ENABLE(cldap,[ --enable-cldap enable connectionless ldap], no)dnl dnl General "with" options OL_ARG_WITH(kerberos,[ --with-kerberos use Kerberos], @@ -746,12 +746,14 @@ AC_FUNC_VPRINTF AC_FUNC_WAIT3 AC_CHECK_FUNCS( \ + bcopy \ flock \ gethostname \ gettimeofday \ getdtablesize \ lockf \ memcpy \ + memmove \ mktime \ select \ setpwfile \ diff --git a/include/ac/string.h b/include/ac/string.h index 4123f4c9e3..cbe24c190f 100644 --- a/include/ac/string.h +++ b/include/ac/string.h @@ -4,17 +4,32 @@ #define _AC_STRING_H #if STDC_HEADERS -# include +# include #else -# ifndef HAVE_STRCHR -# define strchr index -# define strrchr rindex -# endif -char *strchr (), *strrchr (); -# ifndef HAVE_MEMCPY -# define memcpy(d, s, n) bcopy ((s), (d), (n)) -# define memmove(d, s, n) bcopy ((s), (d), (n)) -# endif +# ifndef HAVE_STRCHR +# define strchr index +# define strrchr rindex +# endif + char *strchr (), *strrchr (); + +# ifndef HAVE_MEMCPY +# define memcpy(d, s, n) bcopy ((s), (d), (n)) +# define memmove(d, s, n) bcopy ((s), (d), (n)) +# endif +#endif + +#ifdef HAVE_MEMMOVE +# define SAFEMEMCPY( d, s, n ) memmove((s), (d), (n)) +#else +# ifdef HAVE_BCOPY +# define SAFEMEMCPY( d, s, n ) bcopy((s), (d), (n)) +# else +# ifdef MACOS +# define SAFEMEMCPY( d, s, n ) BlockMoveData((Ptr)(s), (Ptr)(d), (n)) +# else +# define SAFEMEMCPY( d, s, n ) memmove((s), (d), (n)) +# endif +# endif #endif #endif /* _AC_STRING_H */ diff --git a/include/avl.h b/include/avl.h index 745cc17d61..3281ef863e 100644 --- a/include/avl.h +++ b/include/avl.h @@ -15,13 +15,15 @@ #ifndef _AVL #define _AVL +#include + /* * this structure represents a generic avl tree node. */ typedef struct avlnode { caddr_t avl_data; - char avl_bf; + signed char avl_bf; struct avlnode *avl_left; struct avlnode *avl_right; } Avlnode; @@ -34,15 +36,38 @@ typedef struct avlnode { #define RH 1 /* avl routines */ -#define avl_getone(x) (x == 0 ? 0 : (x)->avl_data) -#define avl_onenode(x) (x == 0 || ((x)->avl_left == 0 && (x)->avl_right == 0)) -extern int avl_insert(); -extern caddr_t avl_delete(); -extern caddr_t avl_find(); -extern caddr_t avl_getfirst(); -extern caddr_t avl_getnext(); -extern int avl_dup_error(); -extern int avl_apply(); +#define avl_getone(x) ((x) == 0 ? 0 : (x)->avl_data) +#define avl_onenode(x) ((x) == 0 || ((x)->avl_left == 0 && (x)->avl_right == 0)) + +/* looks like this function pointer is not used consistently */ +/* typedef int (*IFP)LDAP_P((caddr_t, caddr_t)); */ +typedef int (*IFP)(); + +LDAP_F int +avl_insert LDAP_P((Avlnode **, caddr_t, IFP, IFP)); + +LDAP_F caddr_t +avl_delete LDAP_P((Avlnode **, caddr_t, IFP)); + +LDAP_F caddr_t +avl_find LDAP_P((Avlnode *, caddr_t, IFP)); + +LDAP_F caddr_t +avl_getfirst LDAP_P((Avlnode *)); + +#ifdef AVL_REENTRANT +LDAP_F caddr_t +avl_getnext LDAP_P((Avlnode *, caddr_t )); +#else +LDAP_F caddr_t +avl_getnext LDAP_P((void)); +#endif + +LDAP_F int +avl_dup_error LDAP_P((void)); + +LDAP_F int +avl_apply LDAP_P((Avlnode *, IFP, caddr_t, int, int)); /* apply traversal types */ #define AVL_PREORDER 1 @@ -51,6 +76,4 @@ extern int avl_apply(); /* what apply returns if it ran out of nodes */ #define AVL_NOMORE -6 -typedef int (*IFP)(); - #endif /* _AVL */ diff --git a/include/lber.h b/include/lber.h index 9998f0b000..c6a529e1d2 100644 --- a/include/lber.h +++ b/include/lber.h @@ -13,13 +13,9 @@ #ifndef _LBER_H #define _LBER_H -#ifdef __cplusplus -extern "C" { -#endif +#include -#if !defined( NEEDPROTOS ) && defined(__STDC__) -#define NEEDPROTOS 1 -#endif +LDAP_BEGIN_DECL /* BER classes and mask */ #define LBER_CLASS_UNIVERSAL 0x00 @@ -58,12 +54,9 @@ extern "C" { #define OLD_LBER_SEQUENCE 0x10L /* w/o constructed bit - broken */ #define OLD_LBER_SET 0x11L /* w/o constructed bit - broken */ -#ifdef NEEDPROTOS -typedef int (*BERTranslateProc)( char **bufp, unsigned long *buflenp, - int free_input ); -#else /* NEEDPROTOS */ -typedef int (*BERTranslateProc)(); -#endif /* NEEDPROTOS */ +typedef int (*BERTranslateProc) LDAP_P(( char **bufp, + unsigned long *buflenp, + int free_input )); typedef struct berelement { char *ber_buf; @@ -123,27 +116,85 @@ struct berval { char *bv_val; }; -#ifndef NEEDPROTOS -extern BerElement *ber_alloc(); -extern BerElement *der_alloc(); -extern BerElement *ber_alloc_t(); -extern BerElement *ber_dup(); +#ifdef LDAP_DEBUG extern int lber_debug; -extern void ber_bvfree(); -extern void ber_bvecfree(); -extern struct berval *ber_bvdup(); -extern void ber_dump(); -extern void ber_sos_dump(); -extern void lber_bprint(); -extern void ber_reset(); -extern void ber_init(); -#else /* NEEDPROTOS */ -#if defined(WINSOCK) -#include "proto-lb.h" -#else -#include "proto-lber.h" #endif -#endif /* NEEDPROTOS */ + +/* + * in bprint.c: + */ +LDAP_F void lber_bprint LDAP_P(( char *data, int len )); + +/* + * in decode.c: + */ +LDAP_F unsigned long ber_get_tag LDAP_P(( BerElement *ber )); +LDAP_F unsigned long ber_skip_tag LDAP_P(( BerElement *ber, unsigned long *len )); +LDAP_F unsigned long ber_peek_tag LDAP_P(( BerElement *ber, unsigned long *len )); +LDAP_F unsigned long ber_get_int LDAP_P(( BerElement *ber, long *num )); +LDAP_F unsigned long ber_get_stringb LDAP_P(( BerElement *ber, char *buf, + unsigned long *len )); +LDAP_F unsigned long ber_get_stringa LDAP_P(( BerElement *ber, char **buf )); +LDAP_F unsigned long ber_get_stringal LDAP_P(( BerElement *ber, struct berval **bv )); +LDAP_F unsigned long ber_get_bitstringa LDAP_P(( BerElement *ber, char **buf, + unsigned long *len )); +LDAP_F unsigned long ber_get_null LDAP_P(( BerElement *ber )); +LDAP_F unsigned long ber_get_boolean LDAP_P(( BerElement *ber, int *boolval )); +LDAP_F unsigned long ber_first_element LDAP_P(( BerElement *ber, unsigned long *len, + char **last )); +LDAP_F unsigned long ber_next_element LDAP_P(( BerElement *ber, unsigned long *len, + char *last )); +LDAP_F unsigned long ber_scanf LDAP_P(( BerElement *ber, char *fmt, ... )); +LDAP_F void ber_bvfree LDAP_P(( struct berval *bv )); +LDAP_F void ber_bvecfree LDAP_P(( struct berval **bv )); +LDAP_F struct berval *ber_bvdup LDAP_P(( struct berval *bv )); +#ifdef STR_TRANSLATION +LDAP_F void ber_set_string_translators LDAP_P(( BerElement *ber, + BERTranslateProc encode_proc, BERTranslateProc decode_proc )); +#endif /* STR_TRANSLATION */ + +/* + * in encode.c + */ +LDAP_F int ber_put_enum LDAP_P(( BerElement *ber, long num, unsigned long tag )); +LDAP_F int ber_put_int LDAP_P(( BerElement *ber, long num, unsigned long tag )); +LDAP_F int ber_put_ostring LDAP_P(( BerElement *ber, char *str, unsigned long len, + unsigned long tag )); +LDAP_F int ber_put_string LDAP_P(( BerElement *ber, char *str, unsigned long tag )); +LDAP_F int ber_put_bitstring LDAP_P(( BerElement *ber, char *str, + unsigned long bitlen, unsigned long tag )); +LDAP_F int ber_put_null LDAP_P(( BerElement *ber, unsigned long tag )); +LDAP_F int ber_put_boolean LDAP_P(( BerElement *ber, int boolval, + unsigned long tag )); +LDAP_F int ber_start_seq LDAP_P(( BerElement *ber, unsigned long tag )); +LDAP_F int ber_start_set LDAP_P(( BerElement *ber, unsigned long tag )); +LDAP_F int ber_put_seq LDAP_P(( BerElement *ber )); +LDAP_F int ber_put_set LDAP_P(( BerElement *ber )); + +#ifdef __STDC__ +LDAP_F int ber_printf LDAP_P(( BerElement *ber, char *fmt, ... )); +#else +LDAP_F int ber_printf ( ); +#endif + +/* + * in io.c: + */ +LDAP_F long ber_read LDAP_P(( BerElement *ber, char *buf, unsigned long len )); +LDAP_F long ber_write LDAP_P(( BerElement *ber, char *buf, unsigned long len, + int nosos )); +LDAP_F void ber_free LDAP_P(( BerElement *ber, int freebuf )); +LDAP_F int ber_flush LDAP_P(( Sockbuf *sb, BerElement *ber, int freeit )); +LDAP_F BerElement *ber_alloc LDAP_P(( void )); +LDAP_F BerElement *der_alloc LDAP_P(( void )); +LDAP_F BerElement *ber_alloc_t LDAP_P(( int options )); +LDAP_F BerElement *ber_dup LDAP_P(( BerElement *ber )); +LDAP_F void ber_dump LDAP_P(( BerElement *ber, int inout )); +LDAP_F void ber_sos_dump LDAP_P(( Seqorset *sos )); +LDAP_F unsigned long ber_get_next LDAP_P(( Sockbuf *sb, unsigned long *len, + BerElement *ber )); +LDAP_F void ber_init LDAP_P(( BerElement *ber, int options )); +LDAP_F void ber_reset LDAP_P(( BerElement *ber, int was_writing )); #if !defined(__alpha) || defined(VMS) @@ -163,22 +214,6 @@ extern void ber_init(); | ntohl( ( (l) & 0xFFFFFFFF00000000 ) >> 32 )) #endif /* __alpha */ +LDAP_END_DECL -/* - * SAFEMEMCPY is an overlap-safe copy from s to d of n bytes - */ -#ifdef MACOS -#define SAFEMEMCPY( d, s, n ) BlockMoveData( (Ptr)s, (Ptr)d, n ) -#else /* MACOS */ -#ifdef sunos4 -#define SAFEMEMCPY( d, s, n ) bcopy( s, d, n ) -#else /* sunos4 */ -#define SAFEMEMCPY( d, s, n ) memmove( d, s, n ) -#endif /* sunos4 */ -#endif /* MACOS */ - - -#ifdef __cplusplus -} -#endif #endif /* _LBER_H */ diff --git a/include/portable.h.in b/include/portable.h.in index 534d0bb867..787072fa91 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -121,6 +121,9 @@ /* define this for phonetic support */ #undef SLAPD_PHONETIC +/* Define if you have the bcopy function. */ +#undef HAVE_BCOPY + /* Define if you have the flock function. */ #undef HAVE_FLOCK @@ -139,6 +142,9 @@ /* Define if you have the memcpy function. */ #undef HAVE_MEMCPY +/* Define if you have the memmove function. */ +#undef HAVE_MEMMOVE + /* Define if you have the mktime function. */ #undef HAVE_MKTIME @@ -318,5 +324,6 @@ #endif #include "bridge.h" +#include "ldap_cdefs.h" #endif /* _LDAP_PORTABLE_H */ diff --git a/libraries/libavl/avl.c b/libraries/libavl/avl.c index 2614167709..8eb5275d71 100644 --- a/libraries/libavl/avl.c +++ b/libraries/libavl/avl.c @@ -18,27 +18,28 @@ static char avl_version[] = "AVL library version 1.0\n"; #include #include +#include #include "avl.h" #define ROTATERIGHT(x) { \ Avlnode *tmp;\ - if ( *x == NULL || (*x)->avl_left == NULL ) {\ + if ( *(x) == NULL || (*(x))->avl_left == NULL ) {\ (void) printf("RR error\n"); exit(1); \ }\ - tmp = (*x)->avl_left;\ - (*x)->avl_left = tmp->avl_right;\ - tmp->avl_right = *x;\ - *x = tmp;\ + tmp = (*(x))->avl_left;\ + (*(x))->avl_left = tmp->avl_right;\ + tmp->avl_right = *(x);\ + *(x) = tmp;\ } #define ROTATELEFT(x) { \ Avlnode *tmp;\ - if ( *x == NULL || (*x)->avl_right == NULL ) {\ + if ( *(x) == NULL || (*(x))->avl_right == NULL ) {\ (void) printf("RL error\n"); exit(1); \ }\ - tmp = (*x)->avl_right;\ - (*x)->avl_right = tmp->avl_left;\ + tmp = (*(x))->avl_right;\ + (*(x))->avl_right = tmp->avl_left;\ tmp->avl_left = *x;\ - *x = tmp;\ + *(x) = tmp;\ } /* @@ -47,7 +48,7 @@ static char avl_version[] = "AVL library version 1.0\n"; */ static -ravl_insert( iroot, data, taller, fcmp, fdup, depth ) +int ravl_insert( iroot, data, taller, fcmp, fdup, depth ) Avlnode **iroot; caddr_t data; int *taller; @@ -200,7 +201,7 @@ ravl_insert( iroot, data, taller, fcmp, fdup, depth ) * NOTE: this routine may malloc memory */ -avl_insert( root, data, fcmp, fdup ) +int avl_insert( root, data, fcmp, fdup ) Avlnode **root; caddr_t data; IFP fcmp; @@ -216,11 +217,11 @@ avl_insert( root, data, fcmp, fdup ) * been shortened because of a deletion. */ -static +static int right_balance( root ) Avlnode **root; { - int shorter; + int shorter = -1; Avlnode *r, *l; switch( (*root)->avl_bf ) { @@ -282,10 +283,10 @@ right_balance( root ) */ static -left_balance( root ) +int left_balance( root ) Avlnode **root; { - int shorter; + int shorter = -1; Avlnode *r, *l; switch( (*root)->avl_bf ) { @@ -453,7 +454,7 @@ avl_delete( root, data, fcmp ) } static -avl_inapply( root, fn, arg, stopflag ) +int avl_inapply( root, fn, arg, stopflag ) Avlnode *root; IFP fn; caddr_t arg; @@ -477,7 +478,7 @@ avl_inapply( root, fn, arg, stopflag ) } static -avl_postapply( root, fn, arg, stopflag ) +int avl_postapply( root, fn, arg, stopflag ) Avlnode *root; IFP fn; caddr_t arg; @@ -500,7 +501,7 @@ avl_postapply( root, fn, arg, stopflag ) } static -avl_preapply( root, fn, arg, stopflag ) +int avl_preapply( root, fn, arg, stopflag ) Avlnode *root; IFP fn; caddr_t arg; @@ -531,7 +532,7 @@ avl_preapply( root, fn, arg, stopflag ) * of nodes. */ -avl_apply( root, fn, arg, stopflag, type ) +int avl_apply( root, fn, arg, stopflag, type ) Avlnode *root; IFP fn; caddr_t arg; @@ -564,7 +565,7 @@ avl_apply( root, fn, arg, stopflag, type ) * AVL_NOMORE is returned. */ -avl_prefixapply( root, data, fmatch, marg, fcmp, carg, stopflag ) +int avl_prefixapply( root, data, fmatch, marg, fcmp, carg, stopflag ) Avlnode *root; caddr_t data; IFP fmatch; @@ -613,7 +614,7 @@ avl_prefixapply( root, data, fmatch, marg, fcmp, carg, stopflag ) * number of items actually freed is returned. */ -avl_free( root, dfree ) +int avl_free( root, dfree ) Avlnode *root; IFP dfree; { @@ -700,7 +701,7 @@ static int avl_nextlist; /* ARGSUSED */ static -avl_buildlist( data, arg ) +int avl_buildlist( data, arg ) caddr_t data; int arg; { @@ -767,12 +768,12 @@ avl_getnext() return( avl_list[ avl_nextlist++ ] ); } -avl_dup_error() +int avl_dup_error() { return( -1 ); } -avl_dup_ok() +int avl_dup_ok() { return( 0 ); } diff --git a/libraries/libavl/testavl.c b/libraries/libavl/testavl.c index 71939f4985..9d7b9c7d13 100644 --- a/libraries/libavl/testavl.c +++ b/libraries/libavl/testavl.c @@ -1,21 +1,14 @@ /* testavl.c - Test Tim Howes AVL code */ -#include + +#define DISABLE_BRIDGE +#include "portable.h" + #include +#include +#include + #include "avl.h" -char *strdup( s ) -char *s; -{ - char *new; - - if ( (new = (char *) malloc( strlen( s ) + 1 )) == NULL ) - return( NULL ); - - strcpy( new, s ); - - return( new ); -} - main( argc, argv ) int argc; char **argv; @@ -39,7 +32,7 @@ char **argv; case 't': /* traverse with first, next */ printf( "***\n" ); for ( p = (char * ) avl_getfirst( tree ); - p != NULL; p = (char *) avl_getnext( tree, p ) ) + p != NULL; p = (char *) avl_getnext( /* tree, p */ ) ) printf( "%s\n", p ); printf( "***\n" ); break; @@ -60,7 +53,7 @@ char **argv; exit( 0 ); name[ strlen( name ) - 1 ] = '\0'; if ( avl_insert( &tree, strdup( name ), strcmp, - avl_dup_error ) != OK ) + avl_dup_error ) != 0 ) printf( "\nNot inserted!\n" ); break; case 'd': /* delete */ diff --git a/libraries/liblber/decode.c b/libraries/liblber/decode.c index 6a198599c6..0a3bfc3c90 100644 --- a/libraries/liblber/decode.c +++ b/libraries/liblber/decode.c @@ -16,30 +16,26 @@ #include -#ifdef MACOS +#ifdef STDC_HEADERS #include #include -#include "macos.h" -#else /* MACOS */ - -#if defined(NeXT) || defined(VMS) || defined(__FreeBSD__) -#include -#else /* next || vms || freebsd */ -#include -#endif /* next || vms || freebsd */ -#if defined(BC31) || defined(_WIN32) -#include -#else /* BC31 || _WIN32 */ +#else #include -#endif /* BC31 || _WIN32 */ +#endif + +#include + +#ifdef MACOS +#include "macos.h" +#endif /* MACOS */ + #include #include #include + #ifdef PCNFS #include #endif /* PCNFS */ -#endif /* MACOS */ - #if defined( DOS ) || defined( _WIN32 ) #include "msdos.h" #endif /* DOS */ @@ -387,16 +383,16 @@ ber_next_element( BerElement *ber, unsigned long *len, char *last ) /* VARARGS */ unsigned long -ber_scanf( -#if defined( MACOS ) || defined( BC31 ) || defined( _WIN32 ) - BerElement *ber, char *fmt, ... ) +ber_scanf +#ifdef STDC_HEADERS + ( BerElement *ber, char *fmt, ... ) #else - va_alist ) + ( va_alist ) va_dcl #endif { va_list ap; -#if !defined( MACOS ) && !defined( BC31 ) && !defined( _WIN32 ) +#ifndef STDC_HEADERS BerElement *ber; char *fmt; #endif @@ -407,7 +403,7 @@ va_dcl long *l, rc, tag; unsigned long len; -#if defined( MACOS ) || defined( BC31 ) || defined( _WIN32 ) +#if STDC_HEADERS va_start( ap, fmt ); #else va_start( ap ); @@ -541,9 +537,9 @@ va_dcl break; default: -#ifndef NO_USERINTERFACE +#ifdef LDAP_LIBUI fprintf( stderr, "unknown fmt %c\n", *fmt ); -#endif /* NO_USERINTERFACE */ +#endif /* LDAP_LIBUI */ rc = LBER_DEFAULT; break; } diff --git a/libraries/liblber/encode.c b/libraries/liblber/encode.c index cd95f8932b..26f09fcd6e 100644 --- a/libraries/liblber/encode.c +++ b/libraries/liblber/encode.c @@ -11,45 +11,47 @@ * is provided ``as is'' without express or implied warranty. */ +#define DISABLE_BRIDGE +#include "portable.h" + #include -#ifdef MACOS #include +#include + +#ifdef STDC_HEADERS #include -#include "macos.h" -#else /* MACOS */ -#if defined(NeXT) || defined(VMS) -#include -#else /* next || vms */ -#include -#endif /* next || vms */ -#if defined( BC31 ) || defined( _WIN32 ) -#include -#else /* BC31 || _WIN32 */ +#else #include -#endif /* BC31 || _WIN32 */ +#endif + +#ifdef MACOS +#include "macos.h" +#endif /* MACOS */ + #include #include #include + #ifdef PCNFS #include #endif /* PCNFS */ -#endif /* MACOS */ -#ifndef VMS -#include -#endif -#include -#include "lber.h" #if defined( DOS ) || defined( _WIN32 ) #include "msdos.h" #endif /* DOS */ -#ifdef NEEDPROTOS -static int ber_put_len( BerElement *ber, unsigned long len, int nosos ); -static int ber_start_seqorset( BerElement *ber, unsigned long tag ); -static int ber_put_seqorset( BerElement *ber ); -static int ber_put_int_or_enum( BerElement *ber, long num, unsigned long tag ); -#endif /* NEEDPROTOS */ +#include "lber.h" + +static int ber_put_len LDAP_P(( BerElement *ber, + unsigned long len, int nosos )); + +static int ber_start_seqorset LDAP_P(( BerElement *ber, + unsigned long tag )); + +static int ber_put_seqorset LDAP_P(( BerElement *ber )); + +static int ber_put_int_or_enum LDAP_P(( BerElement *ber, + long num, unsigned long tag )); static int @@ -519,31 +521,31 @@ ber_put_set( BerElement *ber ) /* VARARGS */ int -ber_printf( -#if defined( MACOS ) || defined( _WIN32 ) || defined( BC31 ) - BerElement *ber, char *fmt, ... ) -#else /* MACOS || _WIN32 || BC31 */ - va_alist ) +ber_printf +#ifdef STDC_HEADERS + ( BerElement *ber, char *fmt, ... ) +#else + ( va_alist ) va_dcl -#endif /* MACOS || _WIN32 || BC31 */ +#endif { va_list ap; -#if !defined( MACOS ) && !defined( _WIN32 ) && !defined( BC31 ) +#ifndef STDC_HEADERS BerElement *ber; char *fmt; -#endif /* !MACOS && !_WIN32 && !BC31 */ +#endif char *s, **ss; struct berval **bv; int rc, i; unsigned long len; -#if defined( MACOS ) || defined( _WIN32 ) || defined( BC31 ) +#ifdef STDC_HEADERS va_start( ap, fmt ); -#else /* MACOS || _WIN32 || BC31 */ +#else va_start( ap ); ber = va_arg( ap, BerElement * ); fmt = va_arg( ap, char * ); -#endif /* MACOS || _WIN32 || BC31 */ +#endif for ( rc = 0; *fmt && rc != -1; fmt++ ) { switch ( *fmt ) { @@ -625,9 +627,9 @@ va_dcl break; default: -#ifndef NO_USERINTERFACE +#ifdef LDAP_LIBUI fprintf( stderr, "unknown fmt %c\n", *fmt ); -#endif /* NO_USERINTERFACE */ +#endif /* LDAP_LIBUI */ rc = -1; break; } diff --git a/libraries/liblber/io.c b/libraries/liblber/io.c index 081f386794..2cc10470d9 100644 --- a/libraries/liblber/io.c +++ b/libraries/liblber/io.c @@ -11,22 +11,23 @@ * is provided ``as is'' without express or implied warranty. */ +#define DISABLE_BRIDGE +#include "portable.h" + #include +#include + +#include #include +#include #if defined( DOS ) || defined( _WIN32 ) #include "msdos.h" #endif /* DOS || _WIN32 */ #ifdef MACOS -#include #include "macos.h" #else /* MACOS */ -#if defined(NeXT) || defined(VMS) -#include -#else /* next || vms */ -#include -#endif /* next || vms */ #include #include #include @@ -36,29 +37,19 @@ #endif /* PCNFS */ #endif /* MACOS */ -#ifndef VMS -#include -#endif -#include -#include "lber.h" - #ifdef _WIN32 #include #include #endif /* _WIN32 */ -#ifdef NEEDPROTOS -static int ber_realloc( BerElement *ber, unsigned long len ); -static int ber_filbuf( Sockbuf *sb, long len ); -static long BerRead( Sockbuf *sb, char *buf, long len ); +#include "lber.h" + +static int ber_realloc LDAP_P(( BerElement *ber, unsigned long len )); +static int ber_filbuf LDAP_P(( Sockbuf *sb, long len )); +static long BerRead LDAP_P(( Sockbuf *sb, char *buf, long len )); #ifdef PCNFS -static int BerWrite( Sockbuf *sb, char *buf, long len ); +static int BerWrite LDAP_P(( Sockbuf *sb, char *buf, long len )); #endif /* PCNFS */ -#else -int ber_filbuf(); -long BerRead(); -static int ber_realloc(); -#endif /* NEEDPROTOS */ #define bergetc( sb, len ) ( sb->sb_ber.ber_end > sb->sb_ber.ber_ptr ? \ (unsigned char)*sb->sb_ber.ber_ptr++ : \ @@ -301,7 +292,7 @@ ber_flush( Sockbuf *sb, BerElement *ber, int freeit ) #ifdef LDAP_DEBUG if ( lber_debug ) { fprintf( stderr, "ber_flush: %ld bytes to sd %ld%s\n", towrite, - sb->sb_sd, ber->ber_rwptr != ber->ber_buf ? " (re-flush)" + (long) sb->sb_sd, ber->ber_rwptr != ber->ber_buf ? " (re-flush)" : "" ); if ( lber_debug > 1 ) lber_bprint( ber->ber_rwptr, towrite ); @@ -419,14 +410,16 @@ void ber_dump( BerElement *ber, int inout ) { fprintf( stderr, "ber_dump: buf 0x%lx, ptr 0x%lx, end 0x%lx\n", - ber->ber_buf, ber->ber_ptr, ber->ber_end ); + (long) ber->ber_buf, + (long) ber->ber_ptr, + (long) ber->ber_end ); if ( inout == 1 ) { fprintf( stderr, " current len %ld, contents:\n", - ber->ber_end - ber->ber_ptr ); + (long) (ber->ber_end - ber->ber_ptr) ); lber_bprint( ber->ber_ptr, ber->ber_end - ber->ber_ptr ); } else { fprintf( stderr, " current len %ld, contents:\n", - ber->ber_ptr - ber->ber_buf ); + (long) (ber->ber_ptr - ber->ber_buf) ); lber_bprint( ber->ber_buf, ber->ber_ptr - ber->ber_buf ); } } @@ -437,9 +430,9 @@ ber_sos_dump( Seqorset *sos ) fprintf( stderr, "*** sos dump ***\n" ); while ( sos != NULLSEQORSET ) { fprintf( stderr, "ber_sos_dump: clen %ld first 0x%lx ptr 0x%lx\n", - sos->sos_clen, sos->sos_first, sos->sos_ptr ); + (long) sos->sos_clen, (long) sos->sos_first, (long) sos->sos_ptr ); fprintf( stderr, " current len %ld contents:\n", - sos->sos_ptr - sos->sos_first ); + (long) (sos->sos_ptr - sos->sos_first) ); lber_bprint( sos->sos_first, sos->sos_ptr - sos->sos_first ); sos = sos->sos_next; @@ -487,7 +480,7 @@ get_tag( Sockbuf *sb ) unsigned long ber_get_next( Sockbuf *sb, unsigned long *len, BerElement *ber ) { - unsigned long tag, netlen, toread; + unsigned long tag = 0, netlen, toread; unsigned char lc; long rc; int noctets, diff; diff --git a/libraries/libldap/cache.c b/libraries/libldap/cache.c index 197f4fb9e3..0cc3b48a07 100644 --- a/libraries/libldap/cache.c +++ b/libraries/libldap/cache.c @@ -5,6 +5,9 @@ * cache.c - local caching support for LDAP */ +#define DISABLE_BRIDGE +#include "portable.h" + #ifndef NO_CACHE #ifndef lint @@ -12,9 +15,10 @@ static char copyright[] = "@(#) Copyright (c) 1993 The Regents of the University #endif #include -#include -#ifdef MACOS +#include #include + +#ifdef MACOS #include #include "macos.h" #else /* MACOS */ @@ -32,28 +36,18 @@ static char copyright[] = "@(#) Copyright (c) 1993 The Regents of the University #include #endif /* DOS */ #endif /* MACOS */ + #include "lber.h" #include "ldap.h" #include "ldap-int.h" -#ifdef NEEDPROTOS -static int cache_hash( BerElement *ber ); -static LDAPMessage *msg_dup( LDAPMessage *msg ); -static int request_cmp( BerElement *req1, BerElement *req2 ); -static int chain_contains_dn( LDAPMessage *msg, char *dn ); -static long msg_size( LDAPMessage *msg ); -static void check_cache_memused( LDAPCache *lc ); -static void uncache_entry_or_req( LDAP *ld, char *dn, int msgid ); -#else /* NEEDPROTOS */ -static int cache_hash(); -static LDAPMessage *msg_dup(); -static int request_cmp(); -static int chain_contains_dn(); -static long msg_size(); -static void check_cache_memused(); -static void uncache_entry_or_req(); -#endif /* NEEDPROTOS */ - +static int cache_hash LDAP_P(( BerElement *ber )); +static LDAPMessage *msg_dup LDAP_P(( LDAPMessage *msg )); +static int request_cmp LDAP_P(( BerElement *req1, BerElement *req2 )); +static int chain_contains_dn LDAP_P(( LDAPMessage *msg, char *dn )); +static long msg_size LDAP_P(( LDAPMessage *msg )); +static void check_cache_memused LDAP_P(( LDAPCache *lc )); +static void uncache_entry_or_req LDAP_P(( LDAP *ld, char *dn, int msgid )); int ldap_enable_cache( LDAP *ld, long timeout, long maxmem ) @@ -139,8 +133,8 @@ ldap_flush_cache( LDAP *ld ) void ldap_uncache_request( LDAP *ld, int msgid ) { - Debug( LDAP_DEBUG_TRACE, "ldap_uncache_request %d ld_cache %x\n", - msgid, ld->ld_cache, 0 ); + Debug( LDAP_DEBUG_TRACE, "ldap_uncache_request %d ld_cache %lx\n", + msgid, (long) ld->ld_cache, 0 ); uncache_entry_or_req( ld, NULL, msgid ); } @@ -149,8 +143,8 @@ ldap_uncache_request( LDAP *ld, int msgid ) void ldap_uncache_entry( LDAP *ld, char *dn ) { - Debug( LDAP_DEBUG_TRACE, "ldap_uncache_entry %s ld_cache %x\n", - dn, ld->ld_cache, 0 ); + Debug( LDAP_DEBUG_TRACE, "ldap_uncache_entry %s ld_cache %lx\n", + dn, (long) ld->ld_cache, 0 ); uncache_entry_or_req( ld, dn, 0 ); } @@ -165,8 +159,8 @@ uncache_entry_or_req( LDAP *ld, LDAPMessage *m, *prev, *next; Debug( LDAP_DEBUG_TRACE, - "ldap_uncache_entry_or_req dn %s msgid %d ld_cache %x\n", - dn, msgid, ld->ld_cache ); + "ldap_uncache_entry_or_req dn %s msgid %d ld_cache %lx\n", + dn, msgid, (long) ld->ld_cache ); if ( ld->ld_cache == NULLLDCACHE ) { return; @@ -214,12 +208,12 @@ uncache_entry_or_req( LDAP *ld, void -add_request_to_cache( LDAP *ld, unsigned long msgtype, BerElement *request ) +ldap_add_request_to_cache( LDAP *ld, unsigned long msgtype, BerElement *request ) { LDAPMessage *new; long len; - Debug( LDAP_DEBUG_TRACE, "add_request_to_cache\n", 0, 0, 0 ); + Debug( LDAP_DEBUG_TRACE, "ldap_add_request_to_cache\n", 0, 0, 0 ); ld->ld_errno = LDAP_SUCCESS; if ( ld->ld_cache == NULLLDCACHE || @@ -229,7 +223,7 @@ add_request_to_cache( LDAP *ld, unsigned long msgtype, BerElement *request ) if (( new = (LDAPMessage *) calloc( 1, sizeof(LDAPMessage) )) != NULL ) { - if (( new->lm_ber = alloc_ber_with_options( ld )) == NULLBER ) { + if (( new->lm_ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) { free( (char *)new ); return; } @@ -256,12 +250,12 @@ add_request_to_cache( LDAP *ld, unsigned long msgtype, BerElement *request ) void -add_result_to_cache( LDAP *ld, LDAPMessage *result ) +ldap_add_result_to_cache( LDAP *ld, LDAPMessage *result ) { LDAPMessage *m, **mp, *req, *new, *prev; int err, keep; - Debug( LDAP_DEBUG_TRACE, "add_result_to_cache: id %d, type %d\n", + Debug( LDAP_DEBUG_TRACE, "ldap_add_result_to_cache: id %d, type %d\n", result->lm_msgid, result->lm_msgtype, 0 ); if ( ld->ld_cache == NULLLDCACHE || @@ -369,14 +363,14 @@ add_result_to_cache( LDAP *ld, LDAPMessage *result ) * will find them. */ int -check_cache( LDAP *ld, unsigned long msgtype, BerElement *request ) +ldap_check_cache( LDAP *ld, unsigned long msgtype, BerElement *request ) { LDAPMessage *m, *new, *prev, *next; BerElement reqber; int first, hash; unsigned long validtime; - Debug( LDAP_DEBUG_TRACE, "check_cache\n", 0, 0, 0 ); + Debug( LDAP_DEBUG_TRACE, "ldap_check_cache\n", 0, 0, 0 ); if ( ld->ld_cache == NULLLDCACHE || ( ld->ld_cache->lc_enabled == 0 )) { diff --git a/libraries/libldap/cldap.c b/libraries/libldap/cldap.c index 19782f77d8..8639ee2550 100644 --- a/libraries/libldap/cldap.c +++ b/libraries/libldap/cldap.c @@ -5,6 +5,8 @@ * cldap.c - synchronous, retrying interface to the cldap protocol */ +#define DISABLE_BRIDGE +#include "portable.h" #ifdef CLDAP @@ -13,22 +15,22 @@ static char copyright[] = "@(#) Copyright (c) 1990, 1994 Regents of the Universi #endif #include -#include +#include #include -#ifdef MACOS #include + +#ifdef MACOS #include "macos.h" -#else /* MACOS */ +#endif /* MACOS */ #ifdef DOS #include "msdos.h" -#else /* DOS */ +#endif /* DOS */ + #include #include #include #include #include -#endif /* DOS */ -#endif /* MACOS */ #include "lber.h" #include "ldap.h" @@ -170,7 +172,7 @@ cldap_open( char *host, int port ) if ( ld->ld_sb.sb_addrs == NULL #ifdef LDAP_REFERRALS - || ( ld->ld_defconn = new_connection( ld, NULL, 1,0,0 )) == NULL + || ( ld->ld_defconn = ldap_new_connection( ld, NULL, 1,0,0 )) == NULL #endif /* LDAP_REFERRALS */ ) { free( ld ); @@ -316,7 +318,7 @@ cldap_result( LDAP *ld, int msgid, LDAPMessage **res, "cldap_result waiting up to %d seconds for a response\n", tv.tv_sec, 0, 0 ); ber_init( &ber, 0 ); - set_ber_options( ld, &ber ); + ldap_set_ber_options( ld, &ber ); if ( cldap_getmsg( ld, &tv, &ber ) == -1 ) { ret = ld->ld_errno; @@ -432,7 +434,7 @@ cldap_parsemsg( LDAP *ld, int msgid, BerElement *ber, tag != LBER_DEFAULT && rc != LDAP_SUCCESS; tag = ber_next_element( ber, &len, cookie )) { if (( ldm = (LDAPMessage *)calloc( 1, sizeof(LDAPMessage))) - == NULL || ( ldm->lm_ber = alloc_ber_with_options( ld )) + == NULL || ( ldm->lm_ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) { rc = LDAP_NO_MEMORY; break; /* return w/error*/ @@ -506,7 +508,7 @@ cldap_parsemsg( LDAP *ld, int msgid, BerElement *ber, #ifndef NO_CACHE if ( ld->ld_cache != NULL ) { - add_result_to_cache( ld, ldm ); + ldap_add_result_to_cache( ld, ldm ); } #endif /* NO_CACHE */ diff --git a/libraries/libldap/getdn.c b/libraries/libldap/getdn.c index 2ea0d037c4..bacc1a601c 100644 --- a/libraries/libldap/getdn.c +++ b/libraries/libldap/getdn.c @@ -9,11 +9,15 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n"; #endif +#define DISABLE_BRIDGE +#include "portable.h" + #include #include -#include -#ifdef MACOS +#include #include + +#ifdef MACOS #include "macos.h" #else /* MACOS */ #if defined( DOS ) || defined( _WIN32 ) diff --git a/libraries/libldap/getfilter.c b/libraries/libldap/getfilter.c index e9ebc6aa29..58eccc7670 100644 --- a/libraries/libldap/getfilter.c +++ b/libraries/libldap/getfilter.c @@ -5,18 +5,21 @@ * getfilter.c -- optional add-on to libldap */ +#define DISABLE_BRIDGE +#include "portable.h" + #ifndef lint static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of Michigan.\nAll rights reserved.\n"; #endif #include -#include -#include -#if defined(NeXT) -#include -#endif -#ifdef MACOS #include +#include +#include +#include +#include + +#ifdef MACOS #include "macos.h" #else /* MACOS */ #ifdef DOS @@ -25,7 +28,6 @@ static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of #else /* DOS */ #include #include -#include #include #ifndef VMS #include @@ -35,22 +37,10 @@ static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of #include "lber.h" #include "ldap.h" -#include "regex.h" -#ifdef NEEDPROTOS -static int break_into_words( char *str, char *delims, char ***wordsp ); -int next_line_tokens( char **bufp, long *blenp, char ***toksp ); -void free_strarray( char **sap ); -#else /* NEEDPROTOS */ -static int break_into_words(); -int next_line_tokens(); -void free_strarray(); -#endif /* NEEDPROTOS */ - -#if !defined( MACOS ) && !defined( DOS ) -extern int errno; -extern char *re_comp(); -#endif +static int break_into_words LDAP_P(( char *str, char *delims, char ***wordsp )); +int next_line_tokens LDAP_P(( char **bufp, long *blenp, char ***toksp )); +void free_strarray LDAP_P(( char **sap )); #define FILT_MAX_LINE_LEN 1024 @@ -107,8 +97,10 @@ ldap_init_getfilter_buf( char *buf, long buflen ) LDAPFiltDesc *lfdp; LDAPFiltList *flp, *nextflp; LDAPFiltInfo *fip, *nextfip; - char *tag, **tok; - int tokcnt, i; + char *tag, **tok; + int tokcnt, i; + int rc; + regex_t re; if (( lfdp = (LDAPFiltDesc *)calloc( 1, sizeof( LDAPFiltDesc))) == NULL ) { return( NULL ); @@ -138,11 +130,13 @@ ldap_init_getfilter_buf( char *buf, long buflen ) } nextflp->lfl_tag = strdup( tag ); nextflp->lfl_pattern = tok[ 0 ]; - if ( re_comp( nextflp->lfl_pattern ) != NULL ) { + if ( (rc = regcomp( &re, nextflp->lfl_pattern, 0 )) != 0 ) { #ifndef NO_USERINTERFACE + char error[512]; + regerror(rc, &re, error, sizeof(error)); ldap_getfilter_free( lfdp ); - fprintf( stderr, "bad regular expresssion %s\n", - nextflp->lfl_pattern ); + fprintf( stderr, "bad regular expresssion %s, %s\n", + nextflp->lfl_pattern, error ); #if !defined( MACOS ) && !defined( DOS ) errno = EINVAL; #endif @@ -150,6 +144,7 @@ ldap_init_getfilter_buf( char *buf, long buflen ) free_strarray( tok ); return( NULL ); } + regfree(&re); nextflp->lfl_delims = tok[ 1 ]; nextflp->lfl_ilist = NULL; @@ -247,6 +242,8 @@ LDAPFiltInfo * ldap_getfirstfilter( LDAPFiltDesc *lfdp, char *tagpat, char *value ) { LDAPFiltList *flp; + int rc; + regex_t re; if ( lfdp->lfd_curvalcopy != NULL ) { free( lfdp->lfd_curvalcopy ); @@ -256,13 +253,30 @@ ldap_getfirstfilter( LDAPFiltDesc *lfdp, char *tagpat, char *value ) lfdp->lfd_curval = value; lfdp->lfd_curfip = NULL; - for ( flp = lfdp->lfd_filtlist; flp != NULL; flp = flp->lfl_next ) { - if ( re_comp( tagpat ) == NULL && re_exec( flp->lfl_tag ) == 1 - && re_comp( flp->lfl_pattern ) == NULL - && re_exec( lfdp->lfd_curval ) == 1 ) { - lfdp->lfd_curfip = flp->lfl_ilist; - break; - } + for ( flp = lfdp->lfd_filtlist; flp != NULL; flp = flp->lfl_next ) { + /* compile tagpat, continue if we fail */ + if (regcomp(&re, tagpat, 0) != 0) + continue; + + /* match tagpatern and tag, continue if we fail */ + rc = regexec(&re, flp->lfl_tag, 0, NULL, 0); + regfree(&re); + if (rc != 0) + continue; + + /* compile flp->ifl_pattern, continue if we fail */ + if (regcomp(&re, flp->lfl_pattern, 0) != 0) + continue; + + /* match ifl_pattern and lfd_curval, continue if we fail */ + rc = regexec(&re, lfdp->lfd_curval, 0, NULL, 0); + regfree(&re); + if (rc != 0) + continue; + + /* we successfully compiled both patterns and matched both values */ + lfdp->lfd_curfip = flp->lfl_ilist; + break; } if ( lfdp->lfd_curfip == NULL ) { diff --git a/libraries/libldap/os-ip.c b/libraries/libldap/os-ip.c index ce1ab0e2a8..63fc1373ad 100644 --- a/libraries/libldap/os-ip.c +++ b/libraries/libldap/os-ip.c @@ -9,8 +9,12 @@ static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of Michigan.\nAll rights reserved.\n"; #endif +#define DISABLE_BRIDGE +#include "portable.h" + #include -#include +#include +#include #include #ifdef _WIN32 @@ -21,7 +25,9 @@ static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of #include #include #include +#include #include +#include #endif /* _WIN32 */ #ifdef _AIX #include @@ -29,6 +35,7 @@ static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of #ifdef VMS #include "ucx_select.h" #endif /* VMS */ + #include "portable.h" #include "lber.h" #include "ldap.h" @@ -64,9 +71,10 @@ static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of #endif /* DOS */ #endif /* MACOS */ +#include "ldap-int.h" int -connect_to_host( Sockbuf *sb, char *host, unsigned long address, +ldap_connect_to_host( Sockbuf *sb, char *host, unsigned long address, int port, int async ) /* * if host == NULL, connect using address @@ -76,16 +84,17 @@ connect_to_host( Sockbuf *sb, char *host, unsigned long address, * XXX async is not used yet! */ { - int rc, i, s, connected, use_hp; + int rc, i, s = 0; + int connected, use_hp; struct sockaddr_in sin; - struct hostent *hp; + struct hostent *hp = NULL; #ifdef notyet #ifdef LDAP_REFERRALS int status; /* for ioctl call */ #endif /* LDAP_REFERRALS */ #endif /* notyet */ - Debug( LDAP_DEBUG_TRACE, "connect_to_host: %s:%d\n", + Debug( LDAP_DEBUG_TRACE, "ldap_connect_to_host: %s:%d\n", ( host == NULL ) ? "(by address)" : host, ntohs( port ), 0 ); connected = use_hp = 0; @@ -174,7 +183,7 @@ connect_to_host( Sockbuf *sb, char *host, unsigned long address, void -close_connection( Sockbuf *sb ) +ldap_close_connection( Sockbuf *sb ) { tcp_close( sb->sb_sd ); } @@ -182,7 +191,7 @@ close_connection( Sockbuf *sb ) #ifdef KERBEROS char * -host_connected_to( Sockbuf *sb ) +ldap_host_connected_to( Sockbuf *sb ) { struct hostent *hp; char *p; @@ -223,7 +232,7 @@ struct selectinfo { void -mark_select_write( LDAP *ld, Sockbuf *sb ) +ldap_mark_select_write( LDAP *ld, Sockbuf *sb ) { struct selectinfo *sip; @@ -236,7 +245,7 @@ mark_select_write( LDAP *ld, Sockbuf *sb ) void -mark_select_read( LDAP *ld, Sockbuf *sb ) +ldap_mark_select_read( LDAP *ld, Sockbuf *sb ) { struct selectinfo *sip; @@ -249,7 +258,7 @@ mark_select_read( LDAP *ld, Sockbuf *sb ) void -mark_select_clear( LDAP *ld, Sockbuf *sb ) +ldap_mark_select_clear( LDAP *ld, Sockbuf *sb ) { struct selectinfo *sip; @@ -261,7 +270,7 @@ mark_select_clear( LDAP *ld, Sockbuf *sb ) int -is_write_ready( LDAP *ld, Sockbuf *sb ) +ldap_is_write_ready( LDAP *ld, Sockbuf *sb ) { struct selectinfo *sip; @@ -272,7 +281,7 @@ is_write_ready( LDAP *ld, Sockbuf *sb ) int -is_read_ready( LDAP *ld, Sockbuf *sb ) +ldap_is_read_ready( LDAP *ld, Sockbuf *sb ) { struct selectinfo *sip; @@ -283,7 +292,7 @@ is_read_ready( LDAP *ld, Sockbuf *sb ) void * -new_select_info() +ldap_new_select_info() { struct selectinfo *sip; @@ -298,7 +307,7 @@ new_select_info() void -free_select_info( void *sip ) +ldap_free_select_info( void *sip ) { free( sip ); } @@ -315,9 +324,15 @@ do_ldap_select( LDAP *ld, struct timeval *timeout ) if ( tblsize == 0 ) { #ifdef USE_SYSCONF tblsize = sysconf( _SC_OPEN_MAX ); -#else /* USE_SYSCONF */ +#else /* !USE_SYSCONF */ tblsize = getdtablesize(); -#endif /* USE_SYSCONF */ +#endif /* !USE_SYSCONF */ + +#ifdef FD_SETSIZE + if( tblsize > FD_SETSIZE ) { + tblsize = FD_SETSIZE; + } +#endif /* FD_SETSIZE*/ } sip = (struct selectinfo *)ld->ld_selectinfo; diff --git a/servers/slapd/attr.c b/servers/slapd/attr.c index 7686d94767..fb9add64bc 100644 --- a/servers/slapd/attr.c +++ b/servers/slapd/attr.c @@ -298,7 +298,7 @@ attr_syntax_config( a->asi_names = charray_dup( argv ); argv[lasti] = save; - switch ( avl_insert( &attr_syntaxes, a, attr_syntax_cmp, + switch ( avl_insert( &attr_syntaxes, (caddr_t) a, attr_syntax_cmp, attr_syntax_dup ) ) { case -1: /* duplicate - different syntaxes */ Debug( LDAP_DEBUG_ARGS, "%s: line %d: duplicate attribute\n", diff --git a/servers/slapd/back-ldbm/attr.c b/servers/slapd/back-ldbm/attr.c index d0bb831c26..dfe72f6e2f 100644 --- a/servers/slapd/back-ldbm/attr.c +++ b/servers/slapd/back-ldbm/attr.c @@ -141,7 +141,7 @@ attr_index_config( a->ai_indexmask |= INDEX_FROMINIT; } - switch (avl_insert( &li->li_attrs, a, ainfo_cmp, ainfo_dup )) { + switch (avl_insert( &li->li_attrs, (caddr_t) a, ainfo_cmp, ainfo_dup )) { case 1: /* duplicate - updating init version */ free( a->ai_type ); free( (char *) a ); diff --git a/servers/slapd/back-ldbm/cache.c b/servers/slapd/back-ldbm/cache.c index 49fafb6975..a9248865ef 100644 --- a/servers/slapd/back-ldbm/cache.c +++ b/servers/slapd/back-ldbm/cache.c @@ -110,8 +110,9 @@ cache_add_entry_lock( /* set cache mutex */ pthread_mutex_lock( &cache->c_mutex ); - if ( avl_insert( &cache->c_dntree, e, cache_entrydn_cmp, avl_dup_error ) - != 0 ) { + if ( avl_insert( &cache->c_dntree, (caddr_t) e, + cache_entrydn_cmp, avl_dup_error ) != 0 ) + { Debug( LDAP_DEBUG_TRACE, "entry %20s id %d already in dn cache\n", e->e_dn, e->e_id, 0 ); @@ -122,14 +123,16 @@ cache_add_entry_lock( } /* id tree */ - if ( avl_insert( &cache->c_idtree, e, cache_entryid_cmp, avl_dup_error ) - != 0 ) { + if ( avl_insert( &cache->c_idtree, (caddr_t) e, + cache_entryid_cmp, avl_dup_error ) != 0 ) + { Debug( LDAP_DEBUG_ANY, "entry %20s id %d already in id cache\n", e->e_dn, e->e_id, 0 ); /* delete from dn tree inserted above */ - if ( avl_delete( &cache->c_dntree, e, cache_entrydn_cmp ) - == NULL ) { + if ( avl_delete( &cache->c_dntree, (caddr_t) e, + cache_entrydn_cmp ) == NULL ) + { Debug( LDAP_DEBUG_ANY, "can't delete from dn cache\n", 0, 0, 0 ); } @@ -196,8 +199,9 @@ cache_find_entry_dn( pthread_mutex_lock( &cache->c_mutex ); e.e_dn = dn; - if ( (ep = (Entry *) avl_find( cache->c_dntree, &e, cache_entrydn_cmp )) - != NULL ) { + if ( (ep = (Entry *) avl_find( cache->c_dntree, (caddr_t) &e, + cache_entrydn_cmp )) != NULL ) + { /* * entry is deleted or not fully created yet */ @@ -238,8 +242,9 @@ cache_find_entry_id( pthread_mutex_lock( &cache->c_mutex ); e.e_id = id; - if ( (ep = (Entry *) avl_find( cache->c_idtree, &e, cache_entryid_cmp )) - != NULL ) { + if ( (ep = (Entry *) avl_find( cache->c_idtree, (caddr_t) &e, + cache_entryid_cmp )) != NULL ) + { /* * entry is deleted or not fully created yet */ @@ -299,12 +304,16 @@ cache_delete_entry_internal( ) { /* dn tree */ - if ( avl_delete( &cache->c_dntree, e, cache_entrydn_cmp ) == NULL ) { + if ( avl_delete( &cache->c_dntree, (caddr_t) e, cache_entrydn_cmp ) + == NULL ) + { return( -1 ); } /* id tree */ - if ( avl_delete( &cache->c_idtree, e, cache_entryid_cmp ) == NULL ) { + if ( avl_delete( &cache->c_idtree, (caddr_t) e, cache_entryid_cmp ) + == NULL ) + { return( -1 ); } diff --git a/servers/slapd/back-ldbm/dbcache.c b/servers/slapd/back-ldbm/dbcache.c index 78b2eb5024..269e3d152c 100644 --- a/servers/slapd/back-ldbm/dbcache.c +++ b/servers/slapd/back-ldbm/dbcache.c @@ -17,7 +17,7 @@ #include "back-ldbm.h" #include "ldapconfig.h" -#ifndef DECL_SYS_ERRLIST +#ifdef DECL_SYS_ERRLIST extern int sys_nerr; extern char *sys_errlist[]; #endif diff --git a/servers/slapd/back-ldbm/idl.c b/servers/slapd/back-ldbm/idl.c index 60828a2610..d00b025d52 100644 --- a/servers/slapd/back-ldbm/idl.c +++ b/servers/slapd/back-ldbm/idl.c @@ -1,8 +1,15 @@ /* idl.c - ldap id list handling routines */ +#define DISABLE_BRIDGE +#include "portable.h" + #include +#include + #include +#ifdef CLDAP #include +#endif #include "slap.h" #include "ldapconfig.h" #include "back-ldbm.h" @@ -57,6 +64,11 @@ idl_fetch_one( char *kstr; int i, nids; +#ifdef LDBM_USE_DB2 + memset( &k2, 0, sizeof( k2 ) ); + memset( &data, 0, sizeof( data ) ); +#endif + /* Debug( LDAP_DEBUG_TRACE, "=> idl_fetch_one\n", 0, 0, 0 ); */ data = ldbm_cache_fetch( db, key ); @@ -79,6 +91,11 @@ idl_fetch( char *kstr; int i, nids; +#ifdef LDBM_USE_DB2 + memset( &k2, 0, sizeof( k2 ) ); + memset( &data, 0, sizeof( data ) ); +#endif + /* Debug( LDAP_DEBUG_TRACE, "=> idl_fetch\n", 0, 0, 0 ); */ data = ldbm_cache_fetch( db, key ); @@ -164,15 +181,27 @@ idl_store( IDList *idl ) { - int rc; + int rc, flags; Datum data; + struct ldbminfo *li = (struct ldbminfo *) be->be_private; + +#ifdef LDBM_USE_DB2 + memset( &data, 0, sizeof( data ) ); +#endif /* Debug( LDAP_DEBUG_TRACE, "=> idl_store\n", 0, 0, 0 ); */ data.dptr = (char *) idl; data.dsize = (2 + idl->b_nmax) * sizeof(ID); + +#ifdef LDBM_DEBUG + Statslog( LDAP_DEBUG_STATS, "<= idl_store(): rc=%d\n", + rc, 0, 0, 0, 0 ); +#endif - rc = ldbm_cache_store( db, key, data, LDBM_REPLACE ); + flags = LDBM_REPLACE; + if( li->li_flush_wrt ) flags |= LDBM_SYNC; + rc = ldbm_cache_store( db, key, data, flags ); /* Debug( LDAP_DEBUG_TRACE, "<= idl_store %d\n", rc, 0, 0 ); */ return( rc ); @@ -278,7 +307,16 @@ idl_insert_key( char *kstr; Datum k2; +#ifdef LDBM_USE_DB2 + memset( &k2, 0, sizeof( k2 ) ); +#endif + if ( (idl = idl_fetch_one( be, db, key )) == NULL ) { +#ifdef LDBM_DEBUG + Statslog( LDAP_DEBUG_STATS, "=> idl_insert_key(): no key yet\n", + 0, 0, 0, 0, 0 ); +#endif + idl = idl_alloc( 1 ); idl->b_ids[idl->b_nids++] = id; rc = idl_store( be, db, key, idl ); @@ -726,12 +764,9 @@ idl_notin( if ( a == NULL ) { return( NULL ); } - if ( b == NULL ) { + if ( b == NULL || ALLIDS( b )) { return( idl_dup( a ) ); } - if ( ALLIDS( b ) ) { - return( NULL ); - } if ( ALLIDS( a ) ) { n = idl_alloc( SLAPD_LDBM_MIN_MAXIDS ); diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index c43192cb64..1b2bd41ed7 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -19,7 +19,7 @@ extern long ops_completed; extern pthread_mutex_t ops_mutex; extern pthread_t listener_tid; -#ifndef DECL_SYS_ERRLIST +#ifdef DECL_SYS_ERRLIST extern int sys_nerr; extern char *sys_errlist[]; #endif diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index 42ab6eaa53..59c1d2eaf9 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -41,7 +41,7 @@ int deny_severity = LOG_NOTICE; extern Operation *op_add(); -#ifndef DECL_SYS_ERRLIST +#ifdef DECL_SYS_ERRLIST extern int sys_nerr; extern char *sys_errlist[]; #endif @@ -222,7 +222,7 @@ slapd_daemon( zero.tv_usec = 0; Debug( LDAP_DEBUG_CONNS, "before select active_threads %d\n", active_threads, 0, 0 ); -#if defined(PTHREAD_PREEMPTIVE) || defined(NO_THREADS) +#if defined(THREAD_PREEMPTIVE) || defined(NO_THREADS) tvp = NULL; #else tvp = active_threads ? &zero : NULL; diff --git a/servers/slapd/result.c b/servers/slapd/result.c index bd4dec8fee..cbbf620ada 100644 --- a/servers/slapd/result.c +++ b/servers/slapd/result.c @@ -13,7 +13,7 @@ #include #include "slap.h" -#ifndef DECL_SYS_ERRLIST +#ifdef DECL_SYS_ERRLIST extern int sys_nerr; extern char *sys_errlist[]; #endif diff --git a/servers/slapd/tools/ldbmtest.c b/servers/slapd/tools/ldbmtest.c index 56513ab5b8..b202c7b79f 100644 --- a/servers/slapd/tools/ldbmtest.c +++ b/servers/slapd/tools/ldbmtest.c @@ -1,5 +1,8 @@ +#define DISABLE_BRIDGE +#include "portable.h" + #include -#include +#include #include #include #include @@ -10,7 +13,7 @@ #include #include #include -#include "portable.h" + #include "ldapconfig.h" #include "../slap.h" #include "../back-ldbm/back-ldbm.h" @@ -64,6 +67,10 @@ main( argc, argv ) int i; extern char *optarg; +#ifdef LDBM_USE_DB2 + DBC *cursorp; +#endif + tailorfile = SLAPD_DEFAULT_CONFIGFILE; while ( (i = getopt( argc, argv, "d:f:" )) != EOF ) { switch ( i ) { @@ -151,9 +158,16 @@ main( argc, argv ) } savekey.dptr = NULL; +#ifdef LDBM_USE_DB2 + for ( key = ldbm_firstkey( dbc->dbc_db, &cursorp ); + key.dptr != NULL; + key = ldbm_nextkey( dbc->dbc_db, key, cursorp ) ) +#else for ( key = ldbm_firstkey( dbc->dbc_db ); key.dptr != NULL; - key = ldbm_nextkey( dbc->dbc_db, key ) ) { + key = ldbm_nextkey( dbc->dbc_db, key ) ) +#endif + { if ( savekey.dptr != NULL ) ldbm_datum_free( dbc->dbc_db, savekey ); savekey = key; @@ -313,8 +327,16 @@ main( argc, argv ) } last.dptr = NULL; + +#ifdef LDBM_USE_DB2 + for ( key = ldbm_firstkey( dbp, &cursorp ); + key.dptr != NULL; + key = ldbm_nextkey( dbp, last, cursorp ) ) +#else for ( key = ldbm_firstkey( dbp ); key.dptr != NULL; - key = ldbm_nextkey( dbp, last ) ) { + key = ldbm_nextkey( dbp, last ) ) +#endif + { if ( last.dptr != NULL ) { ldbm_datum_free( dbp, last ); } diff --git a/servers/slurpd/fm.c b/servers/slurpd/fm.c index 04717dd06c..e517cb665a 100644 --- a/servers/slurpd/fm.c +++ b/servers/slurpd/fm.c @@ -41,7 +41,7 @@ static void populate_queue LDAP_P(( char *f )); static void set_shutdown LDAP_P((void)); void do_nothing LDAP_P((void)); -#ifndef DECL_SYS_ERRLIST +#ifdef DECL_SYS_ERRLIST extern char *sys_errlist[]; #endif /* DECL_SYS_ERRLIST */ diff --git a/servers/slurpd/ldap_op.c b/servers/slurpd/ldap_op.c index c9bdf7e689..487f7466cc 100644 --- a/servers/slurpd/ldap_op.c +++ b/servers/slurpd/ldap_op.c @@ -54,7 +54,7 @@ static int do_unbind LDAP_P(( Ri * )); /* External references */ -#ifndef DECL_SYS_ERRLIST +#ifdef DECL_SYS_ERRLIST extern char *sys_errlist[]; #endif /* DECL_SYS_ERRLIST */ diff --git a/servers/slurpd/re.c b/servers/slurpd/re.c index a712b63a64..f8ec36d038 100644 --- a/servers/slurpd/re.c +++ b/servers/slurpd/re.c @@ -34,7 +34,7 @@ extern char *str_getline LDAP_P(( char **next )); extern void ch_free LDAP_P(( char *p )); -#ifndef DECL_SYS_ERRLIST +#ifdef DECL_SYS_ERRLIST extern char *sys_errlist[]; #endif /* DECL_SYS_ERRLIST */ diff --git a/servers/slurpd/reject.c b/servers/slurpd/reject.c index b87f55145a..6ba2c8e34c 100644 --- a/servers/slurpd/reject.c +++ b/servers/slurpd/reject.c @@ -29,7 +29,7 @@ #include "slurp.h" #include "globals.h" -#ifndef DECL_SYS_ERRLIST +#ifdef DECL_SYS_ERRLIST extern char *sys_errlist[]; #endif /* DECL_SYS_ERRLIST */ diff --git a/servers/slurpd/replog.c b/servers/slurpd/replog.c index 5c145a475b..eb53bf1053 100644 --- a/servers/slurpd/replog.c +++ b/servers/slurpd/replog.c @@ -45,7 +45,7 @@ extern char *ch_malloc LDAP_P(( unsigned long )); int file_nonempty LDAP_P(( char * )); -#ifndef DECL_SYS_ERRLIST +#ifdef DECL_SYS_ERRLIST extern char *sys_errlist[]; #endif diff --git a/servers/slurpd/rq.c b/servers/slurpd/rq.c index 74f2d8ca1f..845a7a7d34 100644 --- a/servers/slurpd/rq.c +++ b/servers/slurpd/rq.c @@ -43,7 +43,7 @@ /* externs */ extern void Re_dump LDAP_P(( Re *re )); -#ifndef DECL_SYS_ERRLIST +#ifdef DECL_SYS_ERRLIST extern char *sys_errlist[]; #endif /* DECL_SYS_ERRLIST */ diff --git a/servers/slurpd/st.c b/servers/slurpd/st.c index 79160720ed..a274674f35 100644 --- a/servers/slurpd/st.c +++ b/servers/slurpd/st.c @@ -26,7 +26,7 @@ #include "slurp.h" #include "globals.h" -#ifndef DECL_SYS_ERRLIST +#ifdef DECL_SYS_ERRLIST extern char *sys_errlist[]; #endif /* DECL_SYS_ERRLIST */ From ae21b1ee9404c2c1b2ebe10dc37665669de7205f Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 28 Sep 1998 19:27:53 +0000 Subject: [PATCH 084/148] Clean up sh commands in Makefiles (incorrect use of ';'). Fix make install problems. --- COPYRIGHT | 18 +- build/dir.mk | 6 +- build/top.mk | 1 + clients/rcpt500/Makefile.in | 1 + configure | 1524 ++++++++++++++++--------------- configure.in | 15 +- include/Makefile.in | 2 - include/ac/wait.h | 2 + include/portable.h.in | 17 + include/portable.h.top | 37 +- libraries/libavl/avl.c | 6 +- libraries/liblber/decode.c | 2 - libraries/liblber/dtest.c | 4 +- libraries/liblber/etest.c | 7 +- libraries/liblber/idtest.c | 3 + libraries/liblber/io.c | 2 +- libraries/libldap/Makefile.in | 8 +- servers/slapd/Makefile.in | 2 +- servers/slapd/tools/Makefile.in | 28 +- 19 files changed, 927 insertions(+), 758 deletions(-) diff --git a/COPYRIGHT b/COPYRIGHT index ea961e7c24..e450f67a48 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -1,4 +1,20 @@ -Copyright (c) 1992-1996 Regents of the University of Michigan. +Copyright 1998 The OpenLDAP Foundation, Redwood City, California, USA +All rights reserved. + +Redistribution and use in source and binary forms are permitted only +as authorized by the OpenLDAP Public License. A copy of this +license is available at http://www.OpenLDAP.org/license.html or +in file LICENSE in the top-level directory of the distribution. + +This work is derived from the University of Michigan LDAP v3.3 +distribution. Information concerning is available at + http://www.umich.edu/~dirsvcs/ldap/ldap.html. + +This work also contains materials derived from public sources. + +--- + +Portions Copyright (c) 1992-1996 Regents of the University of Michigan. All rights reserved. Redistribution and use in source and binary forms are permitted diff --git a/build/dir.mk b/build/dir.mk index 659f6d18d7..40d2556842 100644 --- a/build/dir.mk +++ b/build/dir.mk @@ -22,7 +22,7 @@ install-common: install-local FORCE clean-common: clean-local FORCE @echo "Making clean in `$(PWD)`" - @for i in $(SUBDIRS) $(CLEANDIRS); do \ + @for i in $(SUBDIRS) $(CLEANDIRS); do \ echo " Entering subdirectory $$i"; \ ( cd $$i; $(MAKE) $(MFLAGS) clean ); \ echo " "; \ @@ -30,7 +30,7 @@ clean-common: clean-local FORCE veryclean-common: veryclean-local FORCE @echo "Making veryclean in `$(PWD)`" - @for i in $(SUBDIRS) $(CLEANDIRS); do \ + @for i in $(SUBDIRS) $(CLEANDIRS); do \ echo " Entering subdirectory $$i"; \ ( cd $$i; $(MAKE) $(MFLAGS) veryclean ); \ echo " "; \ @@ -38,7 +38,7 @@ veryclean-common: veryclean-local FORCE depend-common: depend-local FORCE @echo "Making depend in `$(PWD)`" - @for i in $(SUBDIRS) $(DEPENDDIRS); do \ + @for i in $(SUBDIRS) $(DEPENDDIRS); do \ echo " Entering subdirectory $$i"; \ ( cd $$i; $(MAKE) $(MFLAGS) depend ); \ echo " "; \ diff --git a/build/top.mk b/build/top.mk index ef83f22680..6d36dc1d6f 100644 --- a/build/top.mk +++ b/build/top.mk @@ -30,6 +30,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ +MV = mv LN = ln LN_S = @LN_S@ RM = rm -f diff --git a/clients/rcpt500/Makefile.in b/clients/rcpt500/Makefile.in index ba6654270a..1744d815c9 100644 --- a/clients/rcpt500/Makefile.in +++ b/clients/rcpt500/Makefile.in @@ -21,4 +21,5 @@ version.c: ${OBJS} $(LDAP_LIBDEPEND) install: $(PROGRAMS) rcpt500.help FORCE -$(MKDIR) -p $(libexecdir) $(sysconfdir) $(INSTALL) $(INSTALLFLAGS) -m 755 rcpt500 $(libexecdir) + -$(MV) $(sysconfdir)/rcpt500.help $(sysconfdir)/rcpt500.help- $(INSTALL) $(INSTALLFLAGS) -m 644 rcpt500.help $(sysconfdir) diff --git a/configure b/configure index 5da7ee17ca..6fa4693272 100755 --- a/configure +++ b/configure @@ -23,7 +23,7 @@ ac_help="$ac_help ac_help="$ac_help --enable-referrals enable referrals (yes)" ac_help="$ac_help - --enable-clapd enable connectionless ldap (no)" + --enable-cldap enable connectionless ldap (no)" ac_help="$ac_help --with-kerberos use Kerberos (auto)" ac_help="$ac_help @@ -1207,287 +1207,8 @@ TERMCAP_DEFS= TERMCAP_LIBS= -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1214: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1243: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - ac_prog_rejected=no - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" - fi -fi -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -fi - -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1291: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no -fi -rm -fr conftest* - -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1325: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1330: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - GCC=yes - ac_test_CFLAGS="${CFLAGS+set}" - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1354: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes -else - ac_cv_prog_cc_g=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 - if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" - elif test $ac_cv_prog_cc_g = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-O2" - fi -else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" -fi - -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1382: checking how to run the C preprocessor" >&5 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1403: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1420: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* -fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" -fi - CPP="$ac_cv_prog_CPP" -else - ac_cv_prog_CPP="$CPP" -fi -echo "$ac_t""$CPP" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:1444: checking whether ${CC-cc} needs -traditional" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_pattern="Autoconf.*'x'" - cat > conftest.$ac_ext < -Autoconf TIOCGETP -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "$ac_pattern" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_prog_gcc_traditional=yes -else - rm -rf conftest* - ac_cv_prog_gcc_traditional=no -fi -rm -f conftest* - - - if test $ac_cv_prog_gcc_traditional = no; then - cat > conftest.$ac_ext < -Autoconf TCGETA -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "$ac_pattern" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_prog_gcc_traditional=yes -fi -rm -f conftest* - - fi -fi - -echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6 - if test $ac_cv_prog_gcc_traditional = yes; then - CC="$CC -traditional" - fi -fi - - echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1491: checking whether ln -s works" >&5 +echo "configure:1212: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1518,7 +1239,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1522: checking for a BSD compatible install" >&5 +echo "configure:1243: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1570,7 +1291,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1574: checking for $ac_word" >&5 +echo "configure:1295: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1597,7 +1318,7 @@ else fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1601: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1322: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1627,7 +1348,7 @@ fi # Extract the first word of "sendmail", so it can be a program name with args. set dummy sendmail; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1631: checking for $ac_word" >&5 +echo "configure:1352: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1659,7 +1380,7 @@ fi # Extract the first word of "vi", so it can be a program name with args. set dummy vi; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1663: checking for $ac_word" >&5 +echo "configure:1384: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1691,7 +1412,7 @@ fi # Extract the first word of "finger", so it can be a program name with args. set dummy finger; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1695: checking for $ac_word" >&5 +echo "configure:1416: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1721,15 +1442,389 @@ else fi +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1449: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1478: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + ac_prog_rejected=no + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:1526: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:1560: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:1565: checking whether we are using GNU C" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + GCC=yes + ac_test_CFLAGS="${CFLAGS+set}" + ac_save_CFLAGS="$CFLAGS" + CFLAGS= + echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:1589: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 + if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" + elif test $ac_cv_prog_cc_g = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-O2" + fi +else + GCC= + test "${CFLAGS+set}" = set || CFLAGS="-g" +fi + +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:1617: checking how to run the C preprocessor" >&5 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +echo "$ac_t""$CPP" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 +echo "configure:1679: checking whether ${CC-cc} needs -traditional" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_pattern="Autoconf.*'x'" + cat > conftest.$ac_ext < +Autoconf TIOCGETP +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "$ac_pattern" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_prog_gcc_traditional=yes +else + rm -rf conftest* + ac_cv_prog_gcc_traditional=no +fi +rm -f conftest* + + + if test $ac_cv_prog_gcc_traditional = no; then + cat > conftest.$ac_ext < +Autoconf TCGETA +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "$ac_pattern" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_prog_gcc_traditional=yes +fi +rm -f conftest* + + fi +fi + +echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6 + if test $ac_cv_prog_gcc_traditional = yes; then + CC="$CC -traditional" + fi +fi + + +echo $ac_n "checking for AIX""... $ac_c" 1>&6 +echo "configure:1726: checking for AIX" >&5 +cat > conftest.$ac_ext <&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF +#define _ALL_SOURCE 1 +EOF + +else + rm -rf conftest* + echo "$ac_t""no" 1>&6 +fi +rm -f conftest* + + +echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 +echo "configure:1750: checking for POSIXized ISC" >&5 +if test -d /etc/conf/kconfig.d && + grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 +then + echo "$ac_t""yes" 1>&6 + ISC=yes # If later tests want to check for ISC. + cat >> confdefs.h <<\EOF +#define _POSIX_SOURCE 1 +EOF + + if test "$GCC" = yes; then + CC="$CC -posix" + else + CC="$CC -Xp" + fi +else + echo "$ac_t""no" 1>&6 + ISC= +fi + +ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 +echo "configure:1772: checking for minix/config.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + MINIX=yes +else + echo "$ac_t""no" 1>&6 +MINIX= +fi + +if test "$MINIX" = yes; then + cat >> confdefs.h <<\EOF +#define _POSIX_SOURCE 1 +EOF + + cat >> confdefs.h <<\EOF +#define _POSIX_1_SOURCE 2 +EOF + + cat >> confdefs.h <<\EOF +#define _MINIX 1 +EOF + +fi + + echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:1728: checking for socket" >&5 +echo "configure:1823: checking for socket" >&5 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_socket=yes" else @@ -1771,7 +1866,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 -echo "configure:1775: checking for main in -lsocket" >&5 +echo "configure:1870: checking for main in -lsocket" >&5 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1779,14 +1874,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1814,7 +1909,7 @@ else fi echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6 -echo "configure:1818: checking for main in -lnet" >&5 +echo "configure:1913: checking for main in -lnet" >&5 ac_lib_var=`echo net'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1822,14 +1917,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1857,7 +1952,7 @@ else fi echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6 -echo "configure:1861: checking for main in -lnsl_s" >&5 +echo "configure:1956: checking for main in -lnsl_s" >&5 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1865,14 +1960,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl_s $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1900,7 +1995,7 @@ else fi echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:1904: checking for main in -lnsl" >&5 +echo "configure:1999: checking for main in -lnsl" >&5 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1908,14 +2003,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1943,7 +2038,7 @@ else fi echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6 -echo "configure:1947: checking for socket in -linet" >&5 +echo "configure:2042: checking for socket in -linet" >&5 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1951,7 +2046,7 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1990,7 +2085,7 @@ else fi echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6 -echo "configure:1994: checking for main in -lgen" >&5 +echo "configure:2089: checking for main in -lgen" >&5 ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1998,14 +2093,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2037,7 +2132,7 @@ fi echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6 -echo "configure:2041: checking for sigset in -lV3" >&5 +echo "configure:2136: checking for sigset in -lV3" >&5 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2045,7 +2140,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lV3 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2089,101 +2184,6 @@ if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2093: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2103: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - - - if test $ac_cv_header_kerberosIV_krb_h = yes ; then - echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6 -echo "configure:2132: checking for main in -lkrb4" >&5 -ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - have_k5=yes -else - echo "$ac_t""no" 1>&6 -have_k5=no -fi - - - if test $have_k5 = yes ; then - ol_with_kerberos=found - ol_link_kerberos=yes - - cat >> confdefs.h <<\EOF -#define HAVE_KERBEROS 1 -EOF - - - KRB_DEFS="-DKERBEROS" - KRB_LIBS="-lkrb4 -lkrb5 -ldes425" - fi - fi -fi -if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then - for ac_hdr in krb.h des.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:2188: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2221,15 +2221,15 @@ fi done - if test $ac_cv_header_krb_h = yes ; then - echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6 -echo "configure:2227: checking for main in -lkrb" >&5 -ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'` + if test $ac_cv_header_kerberosIV_krb_h = yes ; then + echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6 +echo "configure:2227: checking for main in -lkrb4" >&5 +ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lkrb -ldes $LIBS" +LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS" cat > conftest.$ac_ext <&6 + have_k5=yes +else + echo "$ac_t""no" 1>&6 +have_k5=no +fi + + + if test $have_k5 = yes ; then + ol_with_kerberos=found + ol_link_kerberos=yes + + cat >> confdefs.h <<\EOF +#define HAVE_KERBEROS 1 +EOF + + + KRB_DEFS="-DKERBEROS" + KRB_LIBS="-lkrb4 -lkrb5 -ldes425" + fi + fi +fi +if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then + for ac_hdr in krb.h des.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2283: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + + if test $ac_cv_header_krb_h = yes ; then + echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6 +echo "configure:2322: checking for main in -lkrb" >&5 +ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lkrb -ldes $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 @@ -2282,17 +2377,17 @@ if test $ol_with_threads = auto -o $ol_with_threads = posix ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2286: checking for $ac_hdr" >&5 +echo "configure:2381: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2321,13 +2416,13 @@ done if test $ac_cv_header_pthread_h = yes ; then echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6 -echo "configure:2325: checking POSIX thread version" >&5 +echo "configure:2420: checking POSIX thread version" >&5 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -2349,7 +2444,7 @@ rm -f conftest* cat > conftest.$ac_ext < @@ -2400,7 +2495,7 @@ EOF echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 -echo "configure:2404: checking for LinuxThreads" >&5 +echo "configure:2499: checking for LinuxThreads" >&5 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2427,12 +2522,12 @@ EOF echo $ac_n "checking for pthread_create""... $ac_c" 1>&6 -echo "configure:2431: checking for pthread_create" >&5 +echo "configure:2526: checking for pthread_create" >&5 if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_pthread_create=yes" else @@ -2477,7 +2572,7 @@ fi if test $ol_link_threads = no ; then echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6 -echo "configure:2481: checking for pthread_create with -pthread" >&5 +echo "configure:2576: checking for pthread_create with -pthread" >&5 if eval "test \"`echo '$''{'ol_cv_pthread_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2485,7 +2580,7 @@ else save_LIBS="$LIBS" LIBS="-pthread $LIBS" cat > conftest.$ac_ext < int main() { @@ -2495,7 +2590,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_pthread_flag=yes else @@ -2520,7 +2615,7 @@ echo "$ac_t""$ol_cv_pthread_flag" 1>&6 if test $ol_link_threads = no ; then save_LIBS="$LIBS" echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:2524: checking for pthread_create in -lpthread" >&5 +echo "configure:2619: checking for pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2528,7 +2623,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2567,7 +2662,7 @@ fi if test $ol_link_threads = no ; then save_LIBS="$LIBS" echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:2571: checking for pthread_create in -lc_r" >&5 +echo "configure:2666: checking for pthread_create in -lc_r" >&5 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2575,7 +2670,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2614,7 +2709,7 @@ fi if test $ol_link_threads = no ; then save_LIBS="$LIBS" echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:2618: checking for pthread_create in -lpthread" >&5 +echo "configure:2713: checking for pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2625,7 +2720,7 @@ LIBS="-lpthread if test $with_preemptive = auto ; then fi -lmach -lexc -lc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2680,12 +2775,12 @@ EOF for ac_func in sched_yield pthread_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2684: checking for $ac_func" >&5 +echo "configure:2779: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2743,12 +2838,12 @@ done for ac_func in pthread_kill do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2747: checking for $ac_func" >&5 +echo "configure:2842: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2798,13 +2893,13 @@ done if test $ol_with_preemptive = auto ; then echo $ac_n "checking for preemptive Pthread implementation""... $ac_c" 1>&6 -echo "configure:2802: checking for preemptive Pthread implementation" >&5 +echo "configure:2897: checking for preemptive Pthread implementation" >&5 if test "$cross_compiling" = yes; then { echo "configure: error: crossing compiling: use --with-preemptive=yes|no|manual" 1>&2; exit 1; } else cat > conftest.$ac_ext < @@ -2848,7 +2943,7 @@ int argc; char **argv; } EOF -if { (eval echo configure:2852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ol_pthread_preemptive=yes else @@ -2888,101 +2983,6 @@ if test $ol_with_threads = auto -o $ol_with_threads = cthreads ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2892: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - - if test $ac_cv_header_lwp_lwp_h = yes ; then - echo $ac_n "checking for cthread_fork in -llwp""... $ac_c" 1>&6 -echo "configure:2930: checking for cthread_fork in -llwp" >&5 -ac_lib_var=`echo lwp'_'cthread_fork | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-llwp $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - have_cthreads=yes -else - echo "$ac_t""no" 1>&6 -have_cthreads=no -fi - - - if test $have_cthreads = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_CTHREADS 1 -EOF - - LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_NEXT_CTHREADS" - LTHREAD_LIBS="$LTHREAD_LIBS -llwp" - fi - fi -fi - -if test $ol_with_threads = auto -o $ol_with_threads = lwp ; then - for ac_hdr in thread.h synch.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:2987: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3014,6 +3014,101 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then #define $ac_tr_hdr 1 EOF +else + echo "$ac_t""no" 1>&6 +fi +done + + if test $ac_cv_header_lwp_lwp_h = yes ; then + echo $ac_n "checking for cthread_fork in -llwp""... $ac_c" 1>&6 +echo "configure:3025: checking for cthread_fork in -llwp" >&5 +ac_lib_var=`echo lwp'_'cthread_fork | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-llwp $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_cthreads=yes +else + echo "$ac_t""no" 1>&6 +have_cthreads=no +fi + + + if test $have_cthreads = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_CTHREADS 1 +EOF + + LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_NEXT_CTHREADS" + LTHREAD_LIBS="$LTHREAD_LIBS -llwp" + fi + fi +fi + +if test $ol_with_threads = auto -o $ol_with_threads = lwp ; then + for ac_hdr in thread.h synch.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3082: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 fi @@ -3021,7 +3116,7 @@ done if test $ac_cv_header_lwp_lwp_h = yes ; then echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6 -echo "configure:3025: checking for thr_create in -lthread" >&5 +echo "configure:3120: checking for thr_create in -lthread" >&5 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3029,7 +3124,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3080,17 +3175,17 @@ EOF do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3084: checking for $ac_hdr" >&5 +echo "configure:3179: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3118,7 +3213,7 @@ done if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6 -echo "configure:3122: checking for lwp_create in -llwp" >&5 +echo "configure:3217: checking for lwp_create in -llwp" >&5 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3126,7 +3221,7 @@ else ac_save_LIBS="$LIBS" LIBS="-llwp $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3187,17 +3282,17 @@ if test $ol_with_threads = manual ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3191: checking for $ac_hdr" >&5 +echo "configure:3286: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3201: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3226,12 +3321,12 @@ done for ac_func in sched_yield pthread_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3230: checking for $ac_func" >&5 +echo "configure:3325: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3280,7 +3375,7 @@ done echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 -echo "configure:3284: checking for LinuxThreads" >&5 +echo "configure:3379: checking for LinuxThreads" >&5 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3301,17 +3396,17 @@ echo "$ac_t""$ol_cv_linux_threads" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3305: checking for $ac_hdr" >&5 +echo "configure:3400: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3341,17 +3436,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3345: checking for $ac_hdr" >&5 +echo "configure:3440: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3355: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3381,17 +3476,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3385: checking for $ac_hdr" >&5 +echo "configure:3480: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3436,13 +3531,13 @@ fi ol_link_ldbm=no if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then echo $ac_n "checking for DB2 library""... $ac_c" 1>&6 -echo "configure:3440: checking for DB2 library" >&5 +echo "configure:3535: checking for DB2 library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6 -echo "configure:3446: checking for db_open in -ldb" >&5 +echo "configure:3541: checking for db_open in -ldb" >&5 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3450,7 +3545,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3492,17 +3587,17 @@ for ac_hdr in db.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3496: checking for $ac_hdr" >&5 +echo "configure:3591: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3530,13 +3625,13 @@ done if test $ac_cv_header_db_h = yes ; then echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6 -echo "configure:3534: checking if db.h is DB2" >&5 +echo "configure:3629: checking if db.h is DB2" >&5 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3568,7 +3663,7 @@ fi echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6 -echo "configure:3572: checking for Berkeley DB2" >&5 +echo "configure:3667: checking for Berkeley DB2" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3610,18 +3705,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6 -echo "configure:3614: checking for Berkeley DB library" >&5 +echo "configure:3709: checking for Berkeley DB library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:3620: checking for dbopen" >&5 +echo "configure:3715: checking for dbopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -3663,7 +3758,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:3667: checking for dbopen in -ldb" >&5 +echo "configure:3762: checking for dbopen in -ldb" >&5 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3671,7 +3766,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3717,17 +3812,17 @@ for ac_hdr in db_185.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3721: checking for $ac_hdr" >&5 +echo "configure:3816: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3763,7 +3858,7 @@ fi echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6 -echo "configure:3767: checking for Berkeley DB" >&5 +echo "configure:3862: checking for Berkeley DB" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3814,17 +3909,17 @@ if test $ol_with_ldbm_api = manual ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3818: checking for $ac_hdr" >&5 +echo "configure:3913: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3923: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3859,18 +3954,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then echo $ac_n "checking for GDBM library""... $ac_c" 1>&6 -echo "configure:3863: checking for GDBM library" >&5 +echo "configure:3958: checking for GDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6 -echo "configure:3869: checking for gdbm_open" >&5 +echo "configure:3964: checking for gdbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gdbm_open=yes" else @@ -3912,7 +4007,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:3916: checking for gdbm_open in -lgdbm" >&5 +echo "configure:4011: checking for gdbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3920,7 +4015,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3966,17 +4061,17 @@ echo "$ac_t""$ol_cv_lib_gdbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3970: checking for $ac_hdr" >&5 +echo "configure:4065: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4003,7 +4098,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:4007: checking for db" >&5 +echo "configure:4102: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4039,18 +4134,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = ndbm ; then echo $ac_n "checking for NDBM library""... $ac_c" 1>&6 -echo "configure:4043: checking for NDBM library" >&5 +echo "configure:4138: checking for NDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:4049: checking for dbm_open" >&5 +echo "configure:4144: checking for dbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -4092,7 +4187,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6 -echo "configure:4096: checking for dbm_open in -lndbm" >&5 +echo "configure:4191: checking for dbm_open in -lndbm" >&5 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4100,7 +4195,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lndbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4131,7 +4226,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:4135: checking for dbm_open in -ldbm" >&5 +echo "configure:4230: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4139,7 +4234,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4187,17 +4282,17 @@ echo "$ac_t""$ol_cv_lib_ndbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4191: checking for $ac_hdr" >&5 +echo "configure:4286: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4201: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4224,7 +4319,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:4228: checking for db" >&5 +echo "configure:4323: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4274,7 +4369,7 @@ fi if test $ol_enable_wrappers = yes ; then echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6 -echo "configure:4278: checking for hosts_access in -lwrap" >&5 +echo "configure:4373: checking for hosts_access in -lwrap" >&5 ac_lib_var=`echo wrap'_'hosts_access | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4282,7 +4377,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lwrap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4337,17 +4432,17 @@ for ac_hdr in termcap.h ncurses.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4341: checking for $ac_hdr" >&5 +echo "configure:4436: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4446: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4376,7 +4471,7 @@ done if test $ol_link_termcap = no ; then echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6 -echo "configure:4380: checking for tputs in -ltermcap" >&5 +echo "configure:4475: checking for tputs in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4384,7 +4479,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4424,7 +4519,7 @@ fi if test $ol_link_termcap = no ; then echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 -echo "configure:4428: checking for initscr in -lncurses" >&5 +echo "configure:4523: checking for initscr in -lncurses" >&5 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4432,7 +4527,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4478,12 +4573,12 @@ fi # FreeBSD (and others) have crypt(3) in -lcrypt if test $ol_enable_crypt != no ; then echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:4482: checking for crypt" >&5 +echo "configure:4577: checking for crypt" >&5 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -4525,7 +4620,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:4529: checking for crypt in -lcrypt" >&5 +echo "configure:4624: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4533,7 +4628,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4583,12 +4678,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:4587: checking for ANSI C header files" >&5 +echo "configure:4682: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4596,7 +4691,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4613,7 +4708,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -4631,7 +4726,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -4652,7 +4747,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -4663,7 +4758,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:4667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -4691,12 +4786,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:4695: checking for $ac_hdr that defines DIR" >&5 +echo "configure:4790: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -4704,7 +4799,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:4708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -4729,7 +4824,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:4733: checking for opendir in -ldir" >&5 +echo "configure:4828: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4737,7 +4832,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4770,7 +4865,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:4774: checking for opendir in -lx" >&5 +echo "configure:4869: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4778,7 +4873,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4812,12 +4907,12 @@ fi fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:4816: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:4911: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4833,7 +4928,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:4837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -4870,17 +4965,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4874: checking for $ac_hdr" >&5 +echo "configure:4969: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4908,12 +5003,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:4912: checking for uid_t in sys/types.h" >&5 +echo "configure:5007: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -4942,7 +5037,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:4946: checking type of array argument to getgroups" >&5 +echo "configure:5041: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4950,7 +5045,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -4989,7 +5084,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -5013,12 +5108,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:5017: checking for mode_t" >&5 +echo "configure:5112: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5046,12 +5141,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:5050: checking for off_t" >&5 +echo "configure:5145: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5079,12 +5174,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:5083: checking for pid_t" >&5 +echo "configure:5178: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5112,12 +5207,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:5116: checking return type of signal handlers" >&5 +echo "configure:5211: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5134,7 +5229,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:5138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -5153,12 +5248,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:5157: checking for size_t" >&5 +echo "configure:5252: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5186,12 +5281,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5190: checking for uid_t in sys/types.h" >&5 +echo "configure:5285: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -5220,12 +5315,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:5224: checking for st_blksize in struct stat" >&5 +echo "configure:5319: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5233,7 +5328,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:5237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -5254,12 +5349,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:5258: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:5353: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5268,7 +5363,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:5272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -5289,12 +5384,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:5293: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:5388: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5302,7 +5397,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:5306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -5324,12 +5419,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:5328: checking for working const" >&5 +echo "configure:5423: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -5399,8 +5494,9 @@ EOF fi + echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:5404: checking for 8-bit clean memcmp" >&5 +echo "configure:5500: 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 @@ -5408,7 +5504,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -5436,12 +5532,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:5440: checking for strftime" >&5 +echo "configure:5536: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -5486,7 +5582,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:5490: checking for strftime in -lintl" >&5 +echo "configure:5586: 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 @@ -5494,7 +5590,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5532,12 +5628,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:5536: checking for vprintf" >&5 +echo "configure:5632: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -5584,12 +5680,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:5588: checking for _doprnt" >&5 +echo "configure:5684: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -5637,7 +5733,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:5641: checking for wait3 that fills in rusage" >&5 +echo "configure:5737: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5645,7 +5741,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -5676,7 +5772,7 @@ main() { } } EOF -if { (eval echo configure:5680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -5726,12 +5822,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5730: checking for $ac_func" >&5 +echo "configure:5826: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5782,12 +5878,12 @@ done for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5786: checking for $ac_func" >&5 +echo "configure:5882: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5840,13 +5936,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:5844: checking declaration of sys_errlist" >&5 +echo "configure:5940: 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 < @@ -5856,7 +5952,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:5860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -5877,20 +5973,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:5881: checking existence of sys_errlist" >&5 +echo "configure:5977: 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 < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:5894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else @@ -6178,8 +6274,6 @@ s%@includedir@%$includedir%g s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g -s%@CC@%$CC%g -s%@CPP@%$CPP%g s%@LN_S@%$LN_S%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_DATA@%$INSTALL_DATA%g @@ -6188,6 +6282,8 @@ s%@SET_MAKE@%$SET_MAKE%g s%@SENDMAIL@%$SENDMAIL%g s%@EDITOR@%$EDITOR%g s%@FINGER@%$FINGER%g +s%@CC@%$CC%g +s%@CPP@%$CPP%g s%@LIBOBJS@%$LIBOBJS%g s%@BUILD_LDAPD@%$BUILD_LDAPD%g s%@BUILD_SLAPD@%$BUILD_SLAPD%g diff --git a/configure.in b/configure.in index 92443567d8..d1e012e9c3 100644 --- a/configure.in +++ b/configure.in @@ -196,9 +196,6 @@ TERMCAP_LIBS= dnl ---------------------------------------------------------------- dnl Checks for programs -AC_PROG_CC -AC_PROG_GCC_TRADITIONAL - AC_PROG_LN_S AC_PROG_INSTALL AC_PROG_RANLIB @@ -209,6 +206,14 @@ AC_PATH_PROG(SENDMAIL, sendmail, /usr/lib/sendmail, AC_PATH_PROG(EDITOR, vi, /usr/ucb/vi, $PATH:/usr/ucb) AC_PATH_PROG(FINGER, finger, /usr/ucb/finger, $PATH:/usr/ucb) +dnl Checks the compiler and UNIX Variants +AC_PROG_CC +AC_PROG_GCC_TRADITIONAL + +AC_AIX +AC_ISC_POSIX +AC_MINIX + dnl ---------------------------------------------------------------- dnl Checks for libraries @@ -738,6 +743,10 @@ AC_STRUCT_TM dnl AC_C_BIGENDIAN AC_C_CONST +dnl AC_CHECK_SIZEOF(short) +dnl AC_CHECK_SIZEOF(int) +dnl AC_CHECK_SIZEOF(long) + dnl ---------------------------------------------------------------- dnl Checks for library functions. AC_FUNC_MEMCMP diff --git a/include/Makefile.in b/include/Makefile.in index 19f3e8620e..2fc4e8b936 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -10,8 +10,6 @@ install-local: FORCE $(INSTALL) $(INSTALLFLAGS) -m 644 ldap.h $(includedir) $(INSTALL) $(INSTALLFLAGS) -m 644 lber.h $(includedir) $(INSTALL) $(INSTALLFLAGS) -m 644 ldap_cdefs.h $(includedir) - $(INSTALL) $(INSTALLFLAGS) -m 644 proto-lber.h $(includedir) - $(INSTALL) $(INSTALLFLAGS) -m 644 proto-ldap.h $(includedir) $(INSTALL) $(INSTALLFLAGS) -m 644 disptmpl.h $(includedir) $(INSTALL) $(INSTALLFLAGS) -m 644 srchpref.h $(includedir) diff --git a/include/ac/wait.h b/include/ac/wait.h index ab69a883a7..274dddd5f5 100644 --- a/include/ac/wait.h +++ b/include/ac/wait.h @@ -4,9 +4,11 @@ #define _AC_WAIT_H #include + #if HAVE_SYS_WAIT_H # include #endif + #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) #endif diff --git a/include/portable.h.in b/include/portable.h.in index 787072fa91..324f8665a9 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -15,6 +15,13 @@ #define _LDAP_PORTABLE_H +/* Define if on AIX 3. + System headers sometimes define this. + We just want to avoid a redefinition error message. */ +#ifndef _ALL_SOURCE +#undef _ALL_SOURCE +#endif + /* Define to empty if the keyword does not work. */ #undef const @@ -43,6 +50,9 @@ /* Define if you have the wait3 system call. */ #undef HAVE_WAIT3 +/* Define if on MINIX. */ +#undef _MINIX + /* Define to `int' if doesn't define. */ #undef mode_t @@ -52,6 +62,13 @@ /* Define to `int' if doesn't define. */ #undef pid_t +/* Define if the system does not provide POSIX.1 features except + with this defined. */ +#undef _POSIX_1_SOURCE + +/* Define if you need to in order for stat and other things to work. */ +#undef _POSIX_SOURCE + /* Define as the return type of signal handlers (int or void). */ #undef RETSIGTYPE diff --git a/include/portable.h.top b/include/portable.h.top index f6de59afb0..32d793a5c8 100644 --- a/include/portable.h.top +++ b/include/portable.h.top @@ -1,14 +1,31 @@ /* - * Copyright (c) 1994 Regents of the University of Michigan. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that this notice is preserved and that due credit is given - * to the University of Michigan at Ann Arbor. The name of the University - * may not be used to endorse or promote products derived from this - * software without specific prior written permission. This software - * is provided ``as is'' without express or implied warranty. - */ +Copyright 1998 The OpenLDAP Foundation, Redwood City, California, USA +All rights reserved. + +Redistribution and use in source and binary forms are permitted only +as authorized by the OpenLDAP Public License. A copy of this +license is available at http://www.OpenLDAP.org/license.html or +in file LICENSE in the top-level directory of the distribution. + +This work is derived from the University of Michigan LDAP v3.3 +distribution. Information concerning is available at + http://www.umich.edu/~dirsvcs/ldap/ldap.html. + +This work also contains materials derived from public sources. + +--- + +Portions Copyright (c) 1992-1996 Regents of the University of Michigan. +All rights reserved. + +Redistribution and use in source and binary forms are permitted +provided that this notice is preserved and that due credit is given +to the University of Michigan at Ann Arbor. The name of the University +may not be used to endorse or promote products derived from this +software without specific prior written permission. This software +is provided ``as is'' without express or implied warranty. + +*/ #ifndef _LDAP_PORTABLE_H #define _LDAP_PORTABLE_H diff --git a/libraries/libavl/avl.c b/libraries/libavl/avl.c index 8eb5275d71..f90cd3366a 100644 --- a/libraries/libavl/avl.c +++ b/libraries/libavl/avl.c @@ -11,14 +11,18 @@ * is provided ``as is'' without express or implied warranty. */ +#define DISABLE_BRIDGE +#include "portable.h" + #ifndef lint static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of Michigan.\nAll rights reserved.\n"; static char avl_version[] = "AVL library version 1.0\n"; #endif -#include #include #include +#include + #include "avl.h" #define ROTATERIGHT(x) { \ diff --git a/libraries/liblber/decode.c b/libraries/liblber/decode.c index 0a3bfc3c90..1803d93b66 100644 --- a/libraries/liblber/decode.c +++ b/libraries/liblber/decode.c @@ -40,8 +40,6 @@ #include "msdos.h" #endif /* DOS */ -#include - #include "lber.h" #ifdef LDAP_DEBUG diff --git a/libraries/liblber/dtest.c b/libraries/liblber/dtest.c index 62b7ae363d..04cd27d2b2 100644 --- a/libraries/liblber/dtest.c +++ b/libraries/liblber/dtest.c @@ -11,18 +11,20 @@ * is provided ``as is'' without express or implied warranty. */ +#define DISABLE_BRIDGE #include "portable.h" #include +#include #include #ifdef MACOS -#include #include #else /* MACOS */ #include #include #endif /* MACOS */ + #include "lber.h" static usage( char *name ) diff --git a/libraries/liblber/etest.c b/libraries/liblber/etest.c index 50ac00d4bf..71c7ee31cf 100644 --- a/libraries/liblber/etest.c +++ b/libraries/liblber/etest.c @@ -4,8 +4,12 @@ * All rights reserved. */ +#define DISABLE_BRIDGE +#include "portable.h" + #include -#include +#include + #ifdef MACOS #include #include @@ -15,6 +19,7 @@ #include #include #endif /* MACOS */ + #include "lber.h" static usage( char *name ) diff --git a/libraries/liblber/idtest.c b/libraries/liblber/idtest.c index 1ad58fae79..54fa08b29a 100644 --- a/libraries/liblber/idtest.c +++ b/libraries/liblber/idtest.c @@ -11,6 +11,9 @@ * is provided ``as is'' without express or implied warranty. */ +#define DISABLE_BRIDGE +#include "portable.h" + #include #include #include diff --git a/libraries/liblber/io.c b/libraries/liblber/io.c index 2cc10470d9..92c85a90ff 100644 --- a/libraries/liblber/io.c +++ b/libraries/liblber/io.c @@ -19,7 +19,7 @@ #include #include -#include +#include #if defined( DOS ) || defined( _WIN32 ) #include "msdos.h" diff --git a/libraries/libldap/Makefile.in b/libraries/libldap/Makefile.in index 3edc528754..7e57c6f0cb 100644 --- a/libraries/libldap/Makefile.in +++ b/libraries/libldap/Makefile.in @@ -38,8 +38,8 @@ install-local: $(LIBRARY) $(CFFILES) FORCE -$(MKDIR) -p $(sysconfdir) @for i in $(CFFILES); do \ echo "installing $$i in $(sysconfdir)"; \ - if test -f $(sysconfdir)$$i; then \ - $(MV) $(sysconfdir)/$$i $(sysconfdir)/$$i- ; \ - fi ; \ - $(INSTALL) $(INSTALLFLAGS) -m 644 $$i $(sysconfdir) ; \ + if test -f $(sysconfdir)/$$i; then \ + $(MV) $(sysconfdir)/$$i $(sysconfdir)/$$i-; \ + fi; \ + $(INSTALL) $(INSTALLFLAGS) -m 644 $$i $(sysconfdir); \ done diff --git a/servers/slapd/Makefile.in b/servers/slapd/Makefile.in index 776e492ab5..2ac592aad6 100644 --- a/servers/slapd/Makefile.in +++ b/servers/slapd/Makefile.in @@ -84,7 +84,7 @@ version.c: libbackends.a $(OBJS) $(LDAP_LIBDEPEND) \ clean-local: FORCE @for i in back-* tools; do \ - if [ -d $$i ] ; then \ + if [ -d $$i ]; then \ echo; echo " cd $$i; $(MAKE) $(MFLAGS) clean"; \ ( cd $$i; $(MAKE) $(MFLAGS) clean ); \ fi; \ diff --git a/servers/slapd/tools/Makefile.in b/servers/slapd/tools/Makefile.in index 6af0234824..1bfc086302 100644 --- a/servers/slapd/tools/Makefile.in +++ b/servers/slapd/tools/Makefile.in @@ -107,7 +107,7 @@ clean-local: FORCE $(RM) $(PROGRAMS) $(XPROGRAMS) $(XSRCS) edb2-vers.c *.o a.out core depend-local: FORCE - @DEPEND=no ; DEPEND_LDBM= ; DEPEND_ISODE= ;\ + @DEPEND=no ; DEPEND_LDBM= ; DEPEND_ISODE= ; \ if [ "$(BUILD_LDBM)" = "yes" ]; then \ DEPEND_LDBM="$(SRCS)"; \ DEPEND=yes ; \ @@ -117,26 +117,26 @@ depend-local: FORCE DEPEND=yes ; \ fi; \ if [ "$$DEPEND" = "yes" ]; then \ - $(MKDEP) $(DEFS) $(DEFINES) $$DEPEND_ISODE $$DEPEND_LDBM \ + $(MKDEP) $(DEFS) $(DEFINES) $$DEPEND_ISODE $$DEPEND_LDBM; \ else \ - exit 0 ; \ + exit 0; \ fi install-local: install-ldbm install-isode FORCE install-ldbm: FORCE - @-$(MKDIR) -p $(sbindir) + @-$(MKDIR) -p $(sbindir) @if [ "$(BUILD_LDBM)" = "yes" ]; then \ - $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2ldbm $(sbindir) \ - $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2index $(sbindir) \ - $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2id2entry $(sbindir) \ - $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2id2children $(sbindir) \ - $(INSTALL) $(INSTALLFLAGS) -m 755 ldbmcat $(sbindir) \ - $(INSTALL) $(INSTALLFLAGS) -m 755 ldif $(sbindir) \ - $(INSTALL) $(INSTALLFLAGS) -m 755 centipede $(sbindir) \ - $(INSTALL) $(INSTALLFLAGS) -m 755 ldbmtest $(sbindir) \ + $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2ldbm $(sbindir) ; \ + $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2index $(sbindir) ; \ + $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2id2entry $(sbindir) ; \ + $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2id2children $(sbindir) ; \ + $(INSTALL) $(INSTALLFLAGS) -m 755 ldbmcat $(sbindir) ; \ + $(INSTALL) $(INSTALLFLAGS) -m 755 ldif $(sbindir) ; \ + $(INSTALL) $(INSTALLFLAGS) -m 755 centipede $(sbindir) ; \ + $(INSTALL) $(INSTALLFLAGS) -m 755 ldbmtest $(sbindir) ; \ else \ - exit 0; \ + exit 0 ; \ fi install-isode: FORCE @@ -145,7 +145,7 @@ install-isode: FORCE $(INSTALL) $(INSTALLFLAGS) -m 755 edb2ldif $(sbindir); \ $(INSTALL) $(INSTALLFLAGS) -m 755 chlog2replog $(sbindir); \ else \ - exit 0; \ + exit 0 ; \ fi all-common: all-local FORCE From 92eb657cd06b8e4fd92326e5e7f75b1ad5812206 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 28 Sep 1998 20:28:22 +0000 Subject: [PATCH 085/148] Use autoconf headers. --- clients/tools/ldapdelete.c | 9 +++++++-- clients/tools/ldapmodify.c | 5 ++--- clients/tools/ldapmodrdn.c | 9 +++++++-- clients/tools/ldapsearch.c | 9 +++++++-- 4 files changed, 23 insertions(+), 9 deletions(-) diff --git a/clients/tools/ldapdelete.c b/clients/tools/ldapdelete.c index 3054cfb54f..8ce9adf7f1 100644 --- a/clients/tools/ldapdelete.c +++ b/clients/tools/ldapdelete.c @@ -1,17 +1,22 @@ /* ldapdelete.c - simple program to delete an entry using LDAP */ +#define DISABLE_BRIDGE +#include "portable.h" + #include -#include +#include #include #include +#include + #include #include #include "ldapconfig.h" static char *binddn = LDAPDELETE_BINDDN; +static char *passwd = LDAPDELETE_BIND_CRED; static char *base = LDAPDELETE_BASE; -static char *passwd = NULL; static char *ldaphost = LDAPHOST; static int ldapport = LDAP_PORT; static int not, verbose, contoper; diff --git a/clients/tools/ldapmodify.c b/clients/tools/ldapmodify.c index 056eb2e331..a6e3c0ab9e 100644 --- a/clients/tools/ldapmodify.c +++ b/clients/tools/ldapmodify.c @@ -11,9 +11,8 @@ #include #include #include -#ifndef VMS -#include -#endif /* VMS */ + +#include #include #include diff --git a/clients/tools/ldapmodrdn.c b/clients/tools/ldapmodrdn.c index 69d99e7f5a..d5f578f594 100644 --- a/clients/tools/ldapmodrdn.c +++ b/clients/tools/ldapmodrdn.c @@ -1,17 +1,22 @@ /* ldapmodrdn.c - generic program to modify an entry's RDN using LDAP */ +#define DISABLE_BRIDGE +#include "portable.h" + #include -#include +#include #include #include +#include + #include #include #include "ldapconfig.h" static char *binddn = LDAPMODRDN_BINDDN; +static char *passwd = LDAPMODRDN_BIND_CRED; static char *base = LDAPMODRDN_BASE; -static char *passwd = NULL; static char *ldaphost = LDAPHOST; static int ldapport = LDAP_PORT; static int not, verbose, contoper; diff --git a/clients/tools/ldapsearch.c b/clients/tools/ldapsearch.c index d96aff1317..3423aba941 100644 --- a/clients/tools/ldapsearch.c +++ b/clients/tools/ldapsearch.c @@ -1,6 +1,11 @@ +#define DISABLE_BRIDGE +#include "portable.h" + #include -#include +#include #include +#include + #include #include #include @@ -52,7 +57,7 @@ char *s; } static char *binddn = LDAPSEARCH_BINDDN; -static char *passwd = NULL; +static char *passwd = LDAPSEARCH_BIND_CRED; static char *base = LDAPSEARCH_BASE; static char *ldaphost = LDAPHOST; static int ldapport = LDAP_PORT; From 58ea169c92679eb5b0598c2420c95c626ccac27d Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 30 Sep 1998 20:13:59 +0000 Subject: [PATCH 086/148] Minor fixes for Linux --- CHANGES | 577 ++----------------------------------- acconfig.h | 6 + clients/tools/ldapmodify.c | 32 +- clients/ud/util.c | 23 +- configure | 207 ++++++------- configure.in | 7 +- include/bridge.h | 2 +- include/lthread.h | 2 +- include/portable.h.in | 47 ++- 9 files changed, 211 insertions(+), 692 deletions(-) diff --git a/CHANGES b/CHANGES index 924b505e3e..1206b77ddc 100644 --- a/CHANGES +++ b/CHANGES @@ -1,545 +1,32 @@ -Changes since 3.3b1 - -Various Make-template files - update by doing 'make depend' - -include/disptmpl.h - add LDAP_DISP_OPT_HTMLBODYONLY option - -libraries/liblber/io.c - under MacOS, limit tcpwrite() calls to a - maximum of 64K bytes; ber_flush() int/long fix - -libraries/libldap/friendly.c - don't use errno on MacOS or DOS -libraries/libldap/regex.c - fix re_exec() to that ".*" matches "" -libraries/libldap/result.c - eliminate memory leak in wait4msg() -libraries/libldap/request.c - eliminate double-free impurity -libraries/libldap/tmplout.c - add LDAP_DISP_OPT_HTMLBODYONLY option -libraries/libldap/ufn.c - purify: avoid bad frees; plug memory leaks - -libraries/libldif/line64.c - str_parse_line() now 0-terminates base64 vals. - -libraries/macintosh/* - tcpwrite()/OpenTransport bug fixes - - better error checking for MacTCP driver opens - - don't use old routine names any more - -libraries/msdos/winsock/* - various bugs fixes & improvements - -servers/slapd/modify.c - fix bug causing unnormalized attr names -servers/slapd/monitor.c - return new "version" attribute -servers/slapd/regex.c - fix re_exec() to that ".*" matches "" -servers/slapd/tools/ldbmcat.c - make -n option work (don't open file "-n" ) -servers/slapd/tools/ldif2id2entry.c - include ids in stored entries -servers/slapd/schema.c - log some information useful in tracking - down schema-check problems -servers/slapd/dn.c - dn_upcase() was not returning anything (doh!) -servers/slapd/backend.c - pass unbind request to all backends -servers/slapd/unbind.c - pass unbind request to all backends -servers/slapd/Version.c - remove leading spaces from Versionstr[] - -servers/slapd/back-ldbm/unbind.c - make arguments consistent -servers/slapd/back-ldbm/bind.c - fix bug which allowed anyone to bind as - anyone else using kerberos, if there was - at least one krbName in an entry - -servers/slurpd/replog.c - do all replog copying with buffered i/o -servers/slurpd/fm.c - fix inconsistency in arguments -servers/slurpd/main.c - fix inconsistency in arguments - -clients/tools/ldapdelete.c - add -K flag - only does LDAP_AUTH_KRBV41 -clients/tools/ldapmodify.c - add -K flag - only does LDAP_AUTH_KRBV41 -clients/tools/ldapmodrdn.c - add -K flag - only does LDAP_AUTH_KRBV41 -clients/tools/ldapsearch.c - add -K flag - only does LDAP_AUTH_KRBV41 - -doc/man/man1/ldapdelete.1 - add -K flag - only does LDAP_AUTH_KRBV41 -doc/man/man1/ldapmodify.1 - add -K flag - only does LDAP_AUTH_KRBV41 -doc/man/man1/ldapmodrdn.1 - add -K flag - only does LDAP_AUTH_KRBV41 -doc/man/man1/ldapsearch.1 - add -K flag - only does LDAP_AUTH_KRBV41 -doc/man/man3/ldap_entry2text.3 - document LDAP_DISP_OPT_HTMLBODYONLY option -doc/man/man8/slapd.8 - add BUGS section and document modrdn bug - ----------------------------------------------------------------------------- -Changes since 3.2 - -Makefile - added support for IRIX (SGI) - - make depend improvements - -tests/ - all new test scripts -- make test - -include/lber.h - use short include file names #ifdef WINSOCK -include/ldap.h - change LDAPCache struct definition to reduce - cache overhead - - use short include file names #ifdef WINSOCK - - LDAP URL support - - add lr_conn to LDAPRequest (needed by abandon) - - add LDAP_OPT_RESTART for select() restart - - revised Debug() macro #ifdef WINSOCK -include/ldbm.h - under NDBM, use O_RDWR instead of O_CREAT - - in LDBM_WRCREAT and LDBM_NEWDB -include/proto-lber.h - changes for WIN32 -include/proto-ldap.h - changes for WIN32 - - added LDAP URL routines -include/disptmpl.h - changes for WIN32 -include/ldif.h - includes for new libldif library -include/srchpref.h - changes for WIN32 -libraries/liblber/decode.c - vararg changes for WIN32 -libraries/liblber/encode.c - vararg changes for WIN32 -libraries/libldap/abandon.c - make ldap_abandon() work with referrals -libraries/libldap/bind.c - added new ldap_set_rebind_proc() routine -libraries/libldap/cache.c - reduce cache overhead - - fix small cache size infinite loop bug - - clarify debugging messages -libraries/libldap/charset.c - new routines: ldap_translate_from_t61, - ldap_translate_to_t61, - ldap_enable_translation -libraries/libldap/cldap.c - changes to support referral re-bind w/auth -libraries/libldap/getfilter.c - ldap_build_filter: don't use NULL value -libraries/libldap/kbind.c - changes to support referral re-bind w/auth -libraries/libldap/ldap-int.h - changes to support referral re-bind w/auth - - rename do_select() to do_ldap_select() -libraries/libldap/open.c - changes to support referral re-bind w/auth - - ld_options = LDAP_OPT_REFERRALS by default -libraries/libldap/os-ip.c - include to fix HP/UX gcc builds - - rename do_select() to do_ldap_select() -libraries/libldap/result.c - wait4msg debugging now shows timeout values - - changes to support referral re-bind w/auth - - rename do_select() to do_ldap_select() - - buf fix in ldap_msgdelete() -- update prev - - support LDAP_OPT_RESTART option -libraries/libldap/request.c - changes to support referral re-bind w/auth - - initialize new lr_conn field (for abandon) -libraries/libldap/test.c - changes to support referral re-bind w/auth -libraries/libldap/tmplout.c - searchact uses "-dnt" and "-dnb", not "-dn" -libraries/libldap/url.c - new routines: ldap_is_ldap_url, - ldap_parse_url, ldap_url_search - ldap_url_search_s, ldap_url_search_st - -libraries/libldif/ - new library that contains line64 routines - -clients/tools/ldapmodify.c - preferred input format is now slapd.replog -clients/tools/ldapsearch.c - added -L option (output in LDIF format) - - don't print initial blank line when -f used - - support "-f -" for reading filters from stdin -clients/ud/*.c - various bug fixes & auth. streamlining - -doc/man/man3/ldap.3 - add several new routines -doc/man/man3/ldap_bind.3/.links - add new ldap_set_rebind_proc() routine -doc/man/man3/ldap_charset.3/.links - add new routines -doc/man/man3/ldap_disptmpl.3 - added missing *'s in ldap_init... arg. lists -doc/man/man3/ldap_result.3 - add details r.e. timeout parameter -doc/man/man3/ldap_open.3 - document LDAP_OPT_REFERRALS default to on -doc/man/man3/ldap_url.3/.links - document new LDAP URL routines - -Make-common.dist and .um - add LDBMINCLUDE variable - - use ISODEPACKAGE and ICRELEASE in place of - ICR1 and XTISODE defines - - remove LDAP_DNS stuff - -build/Make-append - add LDBMINCLUDE variable - - add NO_SETPROCTITLE to SERVERDEFS - - use ISODEPACKAGE and ICRELEASE in place of - ICR1 and XTISODE defines -build/mkdep - use compiler passed in, not always cc - - remove system dependencies when gcc is used -build/platforms/attsvr4-cc/ - AT&T SVR4 support -build/platforms/irix-cc/ - SGI IRIX support -build/platforms/irix-gcc/ - SGI IRIX support - -servers/ldapd/common.h - add missing extern function declarations -servers/ldapd/association.c - use ISODEPACKAGE test instead of ICR1, etc. -servers/ldapd/certificate.c - add missing extern declaration -servers/ldapd/error.c - use ISODEPACKAGE test instead of ICR1, etc. -servers/ldapd/kerberos.c - use ISODEPACKAGE test instead of ICR1, etc. -servers/ldapd/request.c - use ISODEPACKAGE test instead of ICR1, etc. -servers/ldapd/main.c - set proctitle to calling host (bug fix) - - CLDAP: don't timeout/exit prematurely -servers/ldapd/proctitle.c - don't compile file if NO_SETPROCTITLE is on -servers/ldapd/Make-template - don't try to make depend if don't have isode -servers/ldap - bug fixes, support ICR3 - -servers/slapd/tools/ldif.c - use correct pointer when calling realloc -servers/slapd/tools/edb2ldif.c - properly #ifdef code to handle potential - lack of file_attr_dir and turbo disk stuff - - add RDN attribute values to entries - - don't pre-pend './' to EDB files on cmd. line -servers/slapd/tools/ldapsyntax.c- use static buffer to speed things up -servers/slapd/tools/Make-template - don't try to make depend some tools - - if we don't have isode -servers/slapd - fix acl handling -servers/slapd - fix race condition setting o_dn -servers/slapd - bug fixes - -servers/slurpd - complete re-write - -tests/ - new - test scripts to verify basic - functionality of libraries, slapd, slurpd - ----------------------------------------------------------------------------- -Changes since 3.2b3 - -slapd admin guide - document ldbmtest changes - - clarify quick-start instructions - -include/ldapconfig.h.dist - move likely-to-change things to top - -Make-common.dist - add phonetic algorithm config lines -build/Make-append - add def for phonetic algorithm config lines - -libraries/libldbm/ldbm.c - fix bug with gdbm cache size handling - -libraries/liblber/encode.c - cap lengths at 32-bits for Alpha compatibility - -libraries/libldap/disptmpl.c - recognize both "addact" and "adddnact" -libraries/libldap/getdn.c - handle \ escapes in DNs better - -clients/tools/ldapsearch.c - added -S option to sort results - - print results as they are received (if no -S) - -servers/slapd/* - added function prototypes -servers/slapd/phonetic.c - make phonetic alg settable in Make-common -servers/slapd/tools/ldbmtest.c - fix bugs, use dbcache routines (like slapd) - - add 'b' and 'B' commands -servers/slapd/tools/edb2ldif.c - include quipu/config.h & quipu/entry.h - - this fixes TURBO_DISK problems -servers/ldapd/* - misc. fixes for VMS and OSF/1 - - added function prototypes - ----------------------------------------------------------------------------- -Changes since 3.2b2 - -servers/slapd/* - lots of changes/fixes/improvements -servers/slapd/tools/* - add ldif program - - add centipede program - - numerous fixes/improvements - -clients/tools/ldapmodify.c - add -b option (read binary vals from a file) - - add trailing \ feature for iattr, etc. -clients/tools/ldapsearch.c - add -z sizelimit and -l timelimit options - - add -B (allow non-ascii values_ option - - change /tmp template used with -t - -include/lber.h - add LBER_MAX_INCOMING_SIZE option - -libraries/liblber/io.c - support LBER_MAX_INCOMING_SIZE option - - new ber_init() and ber_reset() routines - -libraries/libldap/* - various improvements to LDAP_REFERRALS code - - minor changes for Mac re-port - -libraries/libldap/disptmpl.c - "addact" is now "adddnact" -libraries/libldap/cache.c - we now cache compare results that have error - of LDAP_NO_SUCH_ATTRIBUTE -libraries/libldap/open.c - support :port on ldap_open() hosts -libraries/libldap/charset.c - new T.61 to ISO-8859 conversion support - - thanks to enrique.silvestre@uv.es - -libraries/libldap/kbind.c - a few changes for MS Windows - -libraries/msdos/winsock/* - a few changes for Kerberos support - -servers/ldapd/modify.c - added support for JPEG non-file attrs. - - added support for octetstring attrs. - -servers/ldapd/syntax.c - DN syntax fixes (OID. and replace {ASN} w/#) - - don't escape '$' in DeliveryMethod attrs. - - added support for JPEG non-file attrs. - - added support for octetstring attrs. - ----------------------------------------------------------------------------- -Changes since 3.2b1 - -servers/slapd/ - add better database concurrency - - remove multiple dn support - - add stats logging - - fix syslogging - - add include config file option - - add dbcachesize option - - add abandon - - add lastmod/creator attrs - - add monitoring capability - - normalize dns properly - - base 64 value encoding support - - add schema checking - - fix various bugs - - add srvtab config option -servers/slapd/tools - whole new set of db creation/conversion tools - -clients/finger/main.c - added -c option & use of FINGER_RDNCOUNT -clients/gopher/go500.c - added -c option & use of GO500_RDNCOUNT -clients/gopher/go500gw.c - added -c option & use of GO500GW_RDNCOUNT - - removed non-functional -s option -clients/rcpt500/main.c - added -c option & use of RCPT500_RDNCOUNT -clients/rcpt500/query.c - use rdncount instead of hard-coded 2 - -include/ldapconfig.h.edit - added _RDNCOUNT #defines - -libraries/libldap/tmplout.c - made rdncount of 0 show all DN components - -libraries/libldap/getdn.c - added ldap_is_dns_dn() routine - -libraries/libldap/* - many #ifndef NO_REFERRALS changes - - new ldap_init() routine - ----------------------------------------------------------------------------- -Changes since 3.1 final - -General/various files - incorporated changes for Borland C 3.1 - -Makefile - added support for NeXTSTEP - -libraries/liblber/io.c - add ability to save ldap session to a file -include/lber.h - add ability to save ldap session to a file - - -build/platforms/nextstep-cc/Make-platform - - added -all_load option for ld -build/platforms/sunos5-cc/Make-platform - - define SYSEXITSPATH as for sunos5-gcc - -build/uname.sh - new replacement uname for NeXTSTEP, etc. - -clients/finger/main.c - don't use fprintf for entry2text -clients/gopher/go500.c - use GO500_HOSTNAME (bug fix) - - don't use fprintf for entry2text -clients/gopher/go500gw.c - use GO500GW_HOSTNAME (bug fix) - - don't use fprintf for entry2text -clients/mail500/main.c - improved error logging - - fixed "errors-to is a group" bug - - don't look in people space for groups - - don't bounce loop messages back to sender - - misc. fixes -clients/tools/ldapdelete.c - add -c option to continue after errors occur -clients/tools/ldapmodify.c - add -c option to continue after errors occur -clients/tools/ldapmodrdn.c - add -c option to continue after errors occur -clients/tools/ldapsearch.c - added -t option to write values to tmp files - - added -A option for "attributes only" -clients/ud/print.c - make sure ldap_count_values() returns > 0 - - before trying to use returned values - -doc/man/man1/ldapdelete.1 - updated to mention new -c option -doc/man/man1/ldapmodify.1 - updated to mention new -c option -doc/man/man1/ldapmodrdn.1 - updated to mention new -c option -doc/man/man1/ldapsearch.1 - updated to mention new -A & -t options -doc/man/man3/ldap_friendly.3 - fixed typo in ldap_free_friendlymap() -doc/man/man5/ldapfilter.conf.5 - add missing part of example config file - -include/disptmpl.h - appended 'L' to long #defined contants - - added entry2html family of routines -include/lber.h - added sb_options to allow copy to file - - added ber_wptr to re-start partial writes -include/ldap.h - added debug levels for sldapd - - added LDAP_SYSLOG to send debug using syslog -include/ldapconfig.h.edit - added GO500GW_HOSTNAME -include/ldapconfig.h.dist - added GO500GW_HOSTNAME -include/portable.h - select() macro fix for HP/UX /bin/cc -include/proto-lber.h - Borland C fixes - - added ber_bvdup() prototype -include/sysexits-compat.h - new file, in case we ever need it - -libraries/libavl/* - new library; used in sldapd -libraries/liblber/decode.c - new 'o' feature for ber_scanf() - - new ber_bvdup() routine - - Borland C fixes -libraries/liblber/encode.c - Borland C fixes -libraries/liblber/io.c - ensure that write size <= 64K under VMS - - use ber_wptr to restart partial writes - - added LBER_TO_FILE/FILE_ONLY option support -libraries/libldap/abandon.c - use correct message id in abandon requests -libraries/libldap/cache.c - use time() in a more portable manner -libraries/libldap/cldap.c - retry correct number of times (off by one) -libraries/libldap/error.c - define empty ldap_perror if NO_USERINTERFACE -libraries/libldap/getdn.c - ldap_dn2ufn() now returns dn if no '=' - - ldap_explode_dn handles DNs without '=' -libraries/libldap/open.c - "host" can now be a space-separated list -libraries/libldap/sort.c - make function declarations more portable -libraries/libldap/srchpref.c - fixed memory leak in options parsing -libraries/libldap/test.c - added -t & -T options for ber output to file - - added 'E' command to explode a DN -libraries/libldap/tmplout.c - added entry2html() - - added entry2html_search() - - added entry2vals() - - remove extraneous ber_free when not using tmpl - - fix non-ASCII core dump bugs -libraries/libldap/ldapfriendly - added EE & RU -libraries/libldap/ldapfilter.conf - - remove '\' inside [] in reg exprs. - - add web500gw to filter tags - - added xax500-auth section -libraries/libldap/ldapsearchprefs.conf - - changed xax500 tags -libraries/libldap/ldaptemplates.conf - - added co to Country template - - add missing types & options to comments - - add "Last Modified" attrs. to all templates - - make "Last Modified" attrs. read-only -libraries/libldbm/* - new library; used in sldapd -libraries/liblthread/* - new library; used in sldapd -libraries/msdos/README.WSA - updated to include Borland C instructions -libraries/vms/README.VMS - fixed pathname typo - -servers/ldapd/add.c - make BER tags unsigned long everywhere -servers/ldapd/certificate.c - make parsing consistent with printing code -servers/ldapd/main.c - moved openlog() after detach() call -servers/ldapd/modify.c - correct tag usage in ber_first/next loop - - output all debugging to stderr - - pass and use Sockbuf * in modify_result() call -servers/ldapd/result.c - change to always use DER encoding -servers/ldapd/search.c - change to always use DER encoding -servers/ldapd/syntax.c - add support for telexNumber -servers/sldapd - all new "standalone LDAP server" - - - ----------------------------------------------------------------------------- -Changes since 3.1b8 - -Make-common - added note r.e. -DNO_USERINTERFACE -servers/ldapd/association.c - don't include filio.h under AIX -build/platforms/aix-cc and -gcc - add _BSD to defines -include/portable.h - define OPENLOG_OPTIONS -clients/*/*.c - use OPENLOG_OPTIONS -servers/ldapd/main.c - use OPENLOG_OPTIONS -servers/ldapd/syntax.c - add iattr support (from craig watkins) - ----------------------------------------------------------------------------- -Changes since 3.1b7 - -Many System V portability fixes.... -A few fixes for VMS.... - -Makefile - support Linux & NetBSD -Make-common - add support for NEXOR version of isode - - add ISODEBASELIBS - -include/Make-template - make ldapconfig.h depend on Makefile -include/ldapconfig.h.edit - add RCPT500_LISTLIMIT, RCPT500_UFN - - add GO500_TIMEOUT, GO500_UFN - - add FINGER_UFN, FINGER_TIMEOUT, - - add GO500GW_UFN - - change *_DEREF to be LDAP_DEREF_FINDING -include/regex.h - use NEED_BSDREGEX -include/portable.h - SYSV changes & general re-vamping -include/disptmpl.h - fix typo in ldap_name2template() prototype - - add LDAP_SYN_RFC822ADDR - -libraries/liblber/io.c - make ber_alloc actually use BER - -libraries/libldap/cldap.c - preserve old log DN if NULL is passed -libraries/libldap/regex.c - use NEED_BSDREGEX -libraries/libldap/disptmpl.c - add support for LDAP_SYN_RFC822ADDR -libraries/libldap/tmplout.c - add support for LDAP_SYN_RFC822ADDR -libraries/libldap/getfilter.c - always #include "regex.h" - -servers/ldapd/main.c - don't check openlog return code -servers/ldapd/request.c - only do syslog if dosyslog is set -servers/ldapd/syntax.c - add support for user certificates (from ER) -servers/ldapd/certificate.c - add support for user certificates (new file) - -clients/finger/main.c - add -t disptmplfile option - - add -p port option - - add ufn support - -clients/gopher/go500.c - add -t disptmplfile option - - add ufn support - -clients/gopher/go500gw.c - add -t disptmplfile option - - add ufn support - -clients/mail500/main.c - add -t disptmplfile option - - add support for mail to -owner - -clients/rcpt500/main.c,query.c - add support for RCPT500_LISTLIMIT - - support -p ldapport option - - add ufn support - -clients/tools/ldapsearch.c - recognize -w option properly -clients/tools/ldapdelete.c - recognize -k option properly -clients/tools/ldapmodrdn.c - new program - -clients/ud/edit.c - use execlp() instead of execle() -clients/ud/main.c - include sys/ioctl.h under NetBSD -clients/ud/print.c - updated time2text() from libldap/tmplout.c - -contrib/saucer - new contributed client from Eric Rosenquist - -build/platforms - added netbsd-cc & netbsd-gcc - - updated sunos5-cc and sunos5-gcc - - added missing CC=gcc in hpux-gcc - - added vms -build/Make-append - change ISODELIBS - -doc/man/man8/rcpt500.8 - new manual page -doc/man/man3/ldap.3 - add (3) to routine names in INDEX section -doc/man/man3/ldap_search.3 - remove reference to ldap_parse(3) -doc/man/man3/ldap_modrdn.3 - new manual page -doc/man/man3/ldap_modrdn.3.links- new links file -doc/man/man3/ldap_disptmpl.3 - re-word ldap_octemplate description - - document LDAP_SYN_RFC822ADDR -doc/man/man5/ldap_searchprefs.5 - fix formatting -doc/man/man5/ldaptemplatesconf.5- document "mail" syntax type -doc/man/* - use ETCDIR everywhere (was %ETCDIR%) - - - -------- -ldap-3.1b7 CHANGES file - summary of major changes to each component -since the last release - -source tree - completely reorganized for your convenience - - makes full use of ansi-style prototypes - - supports non-ansi compilers through unproto utility - -configuration - all client configuration has been moved to ldapconfig.h.edit - (no need to edit multiple source code files) - -build procedure - completely revamped for your convenience - - automaticly figures out your platform/compiler - - supports multiple objects from a single source tree - -liblbdap - added support for display templates - - added support for search preferences - - added ldap_sort routines for sorting entries - - rearranged some routines/source files to allow - better incremental linking to reduce code bloat - - added support for CLDAP - -liblber - added O option to ber_scanf: allocate octet string w/length - - big tags (greater than 31) now supported - - distinguished encoding rules supported (runtime choice - between ber and der) - -in.xfingerd - now uses display template routines - - now uses ldap sorting routines - - editable configuration info moved to ldapconfig.h.edit - -go500 - now uses display template routines - - now uses ldap sorting routines - - editable configuration info moved to ldapconfig.h.edit - -go500gw - now uses display template routines - - now uses ldap sorting routines - - editable configuration info moved to ldapconfig.h.edit - -rcpt500 - now uses display template routines - - now uses ldap sorting routines - - editable configuration info moved to ldapconfig.h.edit - -mail500 - addition of a new "vacation" feature - - editable configuration info moved to ldapconfig.h.edit - -ldap tools - new addition of some shell-based tools - -whois++ g/w - moved to contrib/ directory - -web500 - new addition, in contrib/ directory - -ldapd - lots of bug fixes - - bring CLDAP code in line with latest Internet Draft - -documentation - library man pages have been completely re-done, split - into separate manuals, with new pages for each set of - routines. - - new man pages for most client programs (more on the way) - -windows ldap - support for Win32 (unfinished?) - - added VERSIONINFO resource to dll - - check for > 64K response packet and don't crash - -macintosh ldap - support Apple's new Universal Header files +OpenLDAP Change Log + +Changes included in OpenLDAP Stable + CVS Tag: OPENLDAP_STABLE + +Changes included in OpenLDAP Stable +CVS Tag: OPENLDAP_STABLE_980929 + Fixed gmake RUNDIR not defaulting problem. + +Changes included in OpenLDAP 1.0.1 +CVS Tag: OPENLDAP_STABLE_980907 + Added GNU Make Support + Added OpenBSD Support + Added FreeBSD 2.x vs 3.x detection + Fixed slapd LDAP_TCP_WRAPPER build problem + Fixed slapd NO_THREADS busy loop problem + Fixed slurpd NULL termination problem + Fixed misc build/install problems + Removed junked binary files from repository/distribution + +Changes included in OpenLDAP 1.0 +CVS Tag: OPENLDAP_1-0 + Added TCP Wrapper support to slapd + Added POSIX Threads (final) support + Added ACL enhancements including + Access by Groups + POSIX regex support + platform updates, and + numerous bug fixes and build changes. + +Base Version: University of Michigan LDAP v3.3 +CVS Tag: UMICH_3_3 diff --git a/acconfig.h b/acconfig.h index 00babca70b..cd0780d583 100644 --- a/acconfig.h +++ b/acconfig.h @@ -38,6 +38,9 @@ /* define if you have Sun LWP (Solaris style) */ #undef HAVE_LWP_THR +/* define if you have -lncurses */ +#undef HAVE_NCURSES + /* define if you have NDBM */ #undef HAVE_NDBM @@ -50,6 +53,9 @@ /* define if your POSIX Threads implementatin is circa Draft 4 */ #undef HAVE_PTHREADS_D4 +/* define if you have -ltermcap */ +#undef HAVE_TERMCAP + /* define this for connectionless LDAP support */ #undef LDAP_CONNECTIONLESS diff --git a/clients/tools/ldapmodify.c b/clients/tools/ldapmodify.c index a6e3c0ab9e..31e770cdb3 100644 --- a/clients/tools/ldapmodify.c +++ b/clients/tools/ldapmodify.c @@ -53,28 +53,16 @@ extern int ldap_debug, lber_debug; #define T_DELETEOLDRDNSTR "deleteoldrdn" -#ifdef NEEDPROTOS -static int process_ldapmod_rec( char *rbuf ); -static int process_ldif_rec( char *rbuf ); -static void addmodifyop( LDAPMod ***pmodsp, int modop, char *attr, - char *value, int vlen ); -static int domodify( char *dn, LDAPMod **pmods, int newentry ); -static int dodelete( char *dn ); -static int domodrdn( char *dn, char *newrdn, int deleteoldrdn ); -static void freepmods( LDAPMod **pmods ); -static int fromfile( char *path, struct berval *bv ); -static char *read_one_record( FILE *fp ); -#else /* NEEDPROTOS */ -static int process_ldapmod_rec(); -static int process_ldif_rec(); -static void addmodifyop(); -static int domodify(); -static int dodelete(); -static int domodrdn(); -static void freepmods(); -static int fromfile(); -static char *read_one_record(); -#endif /* NEEDPROTOS */ +static int process_ldapmod_rec LDAP_P(( char *rbuf )); +static int process_ldif_rec LDAP_P(( char *rbuf )); +static void addmodifyop LDAP_P(( LDAPMod ***pmodsp, int modop, char *attr, + char *value, int vlen )); +static int domodify LDAP_P(( char *dn, LDAPMod **pmods, int newentry )); +static int dodelete LDAP_P(( char *dn )); +static int domodrdn LDAP_P(( char *dn, char *newrdn, int deleteoldrdn )); +static void freepmods LDAP_P(( LDAPMod **pmods )); +static int fromfile LDAP_P(( char *path, struct berval *bv )); +static char *read_one_record LDAP_P(( FILE *fp )); main( argc, argv ) diff --git a/clients/ud/util.c b/clients/ud/util.c index 2edb5aa265..0e6dda6ccc 100644 --- a/clients/ud/util.c +++ b/clients/ud/util.c @@ -10,21 +10,29 @@ * is provided ``as is'' without express or implied warranty. */ +#define DISABLE_BRIDGE +#include "portable.h" + #include +#include +#include #include -#include + #ifdef DOS #include #endif #include #if defined( NeXT ) -#include #endif #include +#include #include + #include #include + #include + #if !defined(DOS) && !defined( VMS) #include #endif @@ -34,6 +42,7 @@ #else /* USE_TERMIOS */ #include #endif /* USE_TERMIOS */ + #include "ud.h" #if defined(VMS) @@ -80,7 +89,7 @@ char *prompt; #endif /* * Stolen from the getpass() routine. Can't use the plain - * getpass() for two reasons. One is that X.500 passwords + * getpass() for two reasons. One is that LDAP passwords * can be really, really long - much longer than 8 chars. * The second is that we like to make this client available * out of inetd via a Merit asynch port, and we need to be @@ -226,8 +235,6 @@ FILE *where; fatal(s) char *s; { - void exit(); - if (errno != 0) perror(s); #ifdef KERBEROS @@ -594,13 +601,15 @@ unsigned int size; void Free(ptr) char *ptr; { - extern int free(); - +#ifndef STDC_HEADERS if (free(ptr) < 0) { perror("free"); exit(-1); /*NOTREACHED*/ } +#else + free(ptr); +#endif return; } diff --git a/configure b/configure index 6fa4693272..931c2eefe9 100755 --- a/configure +++ b/configure @@ -4427,22 +4427,21 @@ fi # ud needs termcap (should insert check here) ol_link_termcap=no - for ac_hdr in termcap.h ncurses.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4436: checking for $ac_hdr" >&5 +echo "configure:4435: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4446: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4471,7 +4470,7 @@ done if test $ol_link_termcap = no ; then echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6 -echo "configure:4475: checking for tputs in -ltermcap" >&5 +echo "configure:4474: checking for tputs in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4479,7 +4478,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4512,6 +4511,10 @@ have_termcap=no fi if test $have_termcap = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_TERMCAP 1 +EOF + ol_link_termcap=yes TERMCAP_LIBS=-ltermcap fi @@ -4519,7 +4522,7 @@ fi if test $ol_link_termcap = no ; then echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 -echo "configure:4523: checking for initscr in -lncurses" >&5 +echo "configure:4526: checking for initscr in -lncurses" >&5 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4527,7 +4530,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4560,6 +4563,10 @@ have_ncurses=no fi if test $have_ncurses = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_NCURSES 1 +EOF + ol_link_termcap=yes TERMCAP_LIBS=-lncurses fi @@ -4573,12 +4580,12 @@ fi # FreeBSD (and others) have crypt(3) in -lcrypt if test $ol_enable_crypt != no ; then echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:4577: checking for crypt" >&5 +echo "configure:4584: checking for crypt" >&5 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -4620,7 +4627,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:4624: checking for crypt in -lcrypt" >&5 +echo "configure:4631: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4628,7 +4635,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4678,12 +4685,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:4682: checking for ANSI C header files" >&5 +echo "configure:4689: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4691,7 +4698,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4708,7 +4715,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -4726,7 +4733,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -4747,7 +4754,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -4758,7 +4765,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:4762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -4786,12 +4793,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:4790: checking for $ac_hdr that defines DIR" >&5 +echo "configure:4797: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -4799,7 +4806,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:4803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -4824,7 +4831,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:4828: checking for opendir in -ldir" >&5 +echo "configure:4835: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4832,7 +4839,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4865,7 +4872,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:4869: checking for opendir in -lx" >&5 +echo "configure:4876: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4873,7 +4880,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4907,12 +4914,12 @@ fi fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:4911: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:4918: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4928,7 +4935,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:4932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -4959,23 +4966,23 @@ for ac_hdr in \ sys/ioctl.h \ sys/time.h \ syslog.h \ - termio.h \ + termios.h \ unistd.h \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4969: checking for $ac_hdr" >&5 +echo "configure:4976: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4986: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5003,12 +5010,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5007: checking for uid_t in sys/types.h" >&5 +echo "configure:5014: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -5037,7 +5044,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:5041: checking type of array argument to getgroups" >&5 +echo "configure:5048: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5045,7 +5052,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -5084,7 +5091,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -5108,12 +5115,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:5112: checking for mode_t" >&5 +echo "configure:5119: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5141,12 +5148,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:5145: checking for off_t" >&5 +echo "configure:5152: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5174,12 +5181,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:5178: checking for pid_t" >&5 +echo "configure:5185: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5207,12 +5214,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:5211: checking return type of signal handlers" >&5 +echo "configure:5218: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5229,7 +5236,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:5233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -5248,12 +5255,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:5252: checking for size_t" >&5 +echo "configure:5259: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5281,12 +5288,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5285: checking for uid_t in sys/types.h" >&5 +echo "configure:5292: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -5315,12 +5322,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:5319: checking for st_blksize in struct stat" >&5 +echo "configure:5326: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5328,7 +5335,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:5332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -5349,12 +5356,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:5353: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:5360: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5363,7 +5370,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:5367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -5384,12 +5391,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:5388: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:5395: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5397,7 +5404,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:5401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -5419,12 +5426,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:5423: checking for working const" >&5 +echo "configure:5430: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -5496,7 +5503,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:5500: checking for 8-bit clean memcmp" >&5 +echo "configure:5507: 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 @@ -5504,7 +5511,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -5532,12 +5539,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:5536: checking for strftime" >&5 +echo "configure:5543: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -5582,7 +5589,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:5586: checking for strftime in -lintl" >&5 +echo "configure:5593: 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 @@ -5590,7 +5597,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5628,12 +5635,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:5632: checking for vprintf" >&5 +echo "configure:5639: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -5680,12 +5687,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:5684: checking for _doprnt" >&5 +echo "configure:5691: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -5733,7 +5740,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:5737: checking for wait3 that fills in rusage" >&5 +echo "configure:5744: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5741,7 +5748,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -5772,7 +5779,7 @@ main() { } } EOF -if { (eval echo configure:5776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -5822,12 +5829,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5826: checking for $ac_func" >&5 +echo "configure:5833: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5878,12 +5885,12 @@ done for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5882: checking for $ac_func" >&5 +echo "configure:5889: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5936,13 +5943,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:5940: checking declaration of sys_errlist" >&5 +echo "configure:5947: 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 < @@ -5952,7 +5959,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:5956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -5973,20 +5980,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:5977: checking existence of sys_errlist" >&5 +echo "configure:5984: 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 < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:5990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index d1e012e9c3..c526ca696c 100644 --- a/configure.in +++ b/configure.in @@ -661,13 +661,12 @@ fi # ud needs termcap (should insert check here) ol_link_termcap=no - AC_CHECK_HEADERS(termcap.h ncurses.h) if test $ol_link_termcap = no ; then AC_CHECK_LIB(termcap, tputs, [have_termcap=yes], [have_termcap=no]) if test $have_termcap = yes ; then -dnl AC_DEFINE(HAVE_TERMCAP) + AC_DEFINE(HAVE_TERMCAP) ol_link_termcap=yes TERMCAP_LIBS=-ltermcap fi @@ -676,7 +675,7 @@ fi if test $ol_link_termcap = no ; then AC_CHECK_LIB(ncurses, initscr, [have_ncurses=yes], [have_ncurses=no]) if test $have_ncurses = yes ; then -dnl AC_DEFINE(HAVE_NCURSES) + AC_DEFINE(HAVE_NCURSES) ol_link_termcap=yes TERMCAP_LIBS=-lncurses fi @@ -723,7 +722,7 @@ AC_CHECK_HEADERS( \ sys/ioctl.h \ sys/time.h \ syslog.h \ - termio.h \ + termios.h \ unistd.h \ ) diff --git a/include/bridge.h b/include/bridge.h index 172fada4fc..e25dce3d97 100644 --- a/include/bridge.h +++ b/include/bridge.h @@ -189,7 +189,7 @@ /* * put a cover on the tty-related ioctl calls we need to use */ -#if !defined( HAVE_TERMIOS ) +#if !defined( HAVE_TERMIOS_H ) #define TERMIO_TYPE struct sgttyb #define TERMFLAG_TYPE int #define GETATTR( fd, tiop ) ioctl((fd), TIOCGETP, (caddr_t)(tiop)) diff --git a/include/lthread.h b/include/lthread.h index e9a4ee4f46..de2dd3497f 100644 --- a/include/lthread.h +++ b/include/lthread.h @@ -3,7 +3,7 @@ #ifndef _LTHREAD_H #define _LTHREAD_H -#include +#include "portable.h" LDAP_BEGIN_DECL diff --git a/include/portable.h.in b/include/portable.h.in index 324f8665a9..808e9111bb 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -1,15 +1,32 @@ /* include/portable.h.in. Generated automatically from configure.in by autoheader. */ /* - * Copyright (c) 1994 Regents of the University of Michigan. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that this notice is preserved and that due credit is given - * to the University of Michigan at Ann Arbor. The name of the University - * may not be used to endorse or promote products derived from this - * software without specific prior written permission. This software - * is provided ``as is'' without express or implied warranty. - */ +Copyright 1998 The OpenLDAP Foundation, Redwood City, California, USA +All rights reserved. + +Redistribution and use in source and binary forms are permitted only +as authorized by the OpenLDAP Public License. A copy of this +license is available at http://www.OpenLDAP.org/license.html or +in file LICENSE in the top-level directory of the distribution. + +This work is derived from the University of Michigan LDAP v3.3 +distribution. Information concerning is available at + http://www.umich.edu/~dirsvcs/ldap/ldap.html. + +This work also contains materials derived from public sources. + +--- + +Portions Copyright (c) 1992-1996 Regents of the University of Michigan. +All rights reserved. + +Redistribution and use in source and binary forms are permitted +provided that this notice is preserved and that due credit is given +to the University of Michigan at Ann Arbor. The name of the University +may not be used to endorse or promote products derived from this +software without specific prior written permission. This software +is provided ``as is'' without express or implied warranty. + +*/ #ifndef _LDAP_PORTABLE_H #define _LDAP_PORTABLE_H @@ -117,6 +134,9 @@ /* define if you have Sun LWP (Solaris style) */ #undef HAVE_LWP_THR +/* define if you have -lncurses */ +#undef HAVE_NCURSES + /* define if you have NDBM */ #undef HAVE_NDBM @@ -129,6 +149,9 @@ /* define if your POSIX Threads implementatin is circa Draft 4 */ #undef HAVE_PTHREADS_D4 +/* define if you have -ltermcap */ +#undef HAVE_TERMCAP + /* define this for ACL Group support */ #undef SLAPD_ACLGROUPS @@ -306,8 +329,8 @@ /* Define if you have the header file. */ #undef HAVE_TERMCAP_H -/* Define if you have the header file. */ -#undef HAVE_TERMIO_H +/* Define if you have the header file. */ +#undef HAVE_TERMIOS_H /* Define if you have the header file. */ #undef HAVE_THREAD_H From 76ed17f7942d4e3810fa90b46143e615af311167 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 19 Oct 1998 19:19:48 +0000 Subject: [PATCH 087/148] Merge in latest from -current. --- CHANGES | 12 + INSTALL | 2 +- clients/ud/string_to_key.c | 28 +- libraries/liblthread/Makefile.in | 4 +- libraries/liblthread/rdwr.c | 116 +++++++ libraries/liblthread/thread.c | 1 + servers/slapd/acl.c | 391 +++++++++++++++------- servers/slapd/add.c | 30 +- servers/slapd/back-ldbm/add.c | 97 ++++-- servers/slapd/back-ldbm/bind.c | 71 ++-- servers/slapd/back-ldbm/cache.c | 137 +++++++- servers/slapd/back-ldbm/compare.c | 31 +- servers/slapd/back-ldbm/delete.c | 52 ++- servers/slapd/back-ldbm/dn2id.c | 95 ++++-- servers/slapd/back-ldbm/group.c | 91 +++++ servers/slapd/back-ldbm/id2entry.c | 90 ++++- servers/slapd/back-ldbm/kerberos.c | 7 +- servers/slapd/back-ldbm/modify.c | 49 +-- servers/slapd/back-ldbm/modrdn.c | 41 ++- servers/slapd/back-ldbm/proto-back-ldbm.h | 15 +- servers/slapd/back-ldbm/search.c | 72 ++-- servers/slapd/configinfo.c | 3 + servers/slapd/daemon.c | 5 +- servers/slapd/entry.c | 63 +++- servers/slapd/modify.c | 55 +-- servers/slapd/monitor.c | 49 ++- servers/slapd/proto-slap.h | 15 +- servers/slapd/result.c | 19 +- servers/slapd/slap.h | 22 ++ 29 files changed, 1262 insertions(+), 401 deletions(-) create mode 100644 libraries/liblthread/rdwr.c create mode 100644 servers/slapd/back-ldbm/group.c diff --git a/CHANGES b/CHANGES index 1206b77ddc..22a787a3d9 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,18 @@ OpenLDAP Change Log Changes included in OpenLDAP Stable CVS Tag: OPENLDAP_STABLE + Updated README, INSTALL files + Updated Linux platform defaults + Updated FreeBSD 2 & 3 platform defaults + Added SCHED_YIELD_MISSING flag + Added LDAP_ALLOW_NULL_SEARCH_BASE flag + Added core removal to tests/Make-template + Fixed slapd/acl debug trace problem + Fixed ud/auth.c bound_dn problem + Fixed back-ldbm/idl.c CLDAP include problem. + Fixed Makefile $(CC) problem + Fixed LIBEXEC/SBIN creation problem + Fixed gmake RUNDIR not defaulting problem Changes included in OpenLDAP Stable CVS Tag: OPENLDAP_STABLE_980929 diff --git a/INSTALL b/INSTALL index 191693492b..39eeaef160 100644 --- a/INSTALL +++ b/INSTALL @@ -12,7 +12,7 @@ these steps: 1. untar the distribution and cd to the top: - % tar xfz ldap-stable.tgz + % tar xfz openldap-VERSION.tgz % cd ldap If you are reading this file, you probably have already done this! diff --git a/clients/ud/string_to_key.c b/clients/ud/string_to_key.c index 1d6649c064..f1adfa8f0a 100644 --- a/clients/ud/string_to_key.c +++ b/clients/ud/string_to_key.c @@ -1,7 +1,7 @@ -#ifdef KERBEROS +#if defined(KERBEROS) && !defined(openbsd) /* - * $Source: /usr/local/src/ldap/clients/ud/RCS/string_to_key.c,v $ - * $Author: lsloan $ + * $Source: /repo/OpenLDAP/pkg/ldap/clients/ud/string_to_key.c,v $ + * $Author: kurt $ * * Copyright 1985, 1986, 1987, 1988, 1989 by the Massachusetts Institute * of Technology. @@ -24,18 +24,24 @@ * spm 8/85 MIT project athena */ -#ifndef lint -static char rcsid_string_to_key_c[] = -"$Id: string_to_key.c,v 1.5 1995/11/09 20:29:55 lsloan Exp $"; -#endif - +#ifdef KERBEROS_V +#include +#include +#else #include -#include #include +#endif /* KERBEROS_V */ + +#include + /* #include "des_internal.h" */ #if 1 +#ifdef KERBEROS_V +#include +#else #include -#endif +#endif /* KERBEROS_V */ +#endif /* 1 */ extern int des_debug; extern int des_debug_print(); @@ -46,6 +52,7 @@ extern void des_fixup_key_parity(); #endif #if defined(WORLDPEACEINOURTIME) /* Use original, not ifs version */ +#ifndef KERBEROS_V /* * convert an arbitrary length string to a DES key */ @@ -132,6 +139,7 @@ des_string_to_key(str,key) *((unsigned long *) key+1)); } +#endif /* KERBEROS_V */ #else /* Use ifs version */ #if 0 diff --git a/libraries/liblthread/Makefile.in b/libraries/liblthread/Makefile.in index 47a810bd62..bf75f2db02 100644 --- a/libraries/liblthread/Makefile.in +++ b/libraries/liblthread/Makefile.in @@ -4,8 +4,8 @@ LIBRARY = liblthread.a XSRCS = version.c -SRCS = thread.c stack.c -OBJS = thread.o stack.o +SRCS = rdwr.c thread.c stack.c +OBJS = rdwr.o thread.o stack.o LDAP_INCDIR= ../../include LDAP_LIBDIR= ../../libraries diff --git a/libraries/liblthread/rdwr.c b/libraries/liblthread/rdwr.c new file mode 100644 index 0000000000..137c993435 --- /dev/null +++ b/libraries/liblthread/rdwr.c @@ -0,0 +1,116 @@ +/* +** This basic implementation of Reader/Writer locks does not +** protect writers from starvation. That is, if a writer is +** currently waiting on a reader, any new reader will get +** the lock before the writer. +*/ + +/******************************************************** + * An example source module to accompany... + * + * "Using POSIX Threads: Programming with Pthreads" + * by Brad nichols, Dick Buttlar, Jackie Farrell + * O'Reilly & Associates, Inc. + * + ******************************************************** + * rdwr.c -- + * + * Library of functions implementing reader/writer locks + */ + +#define DISABLE_BRIDGE +#include + +#include +#include +#include + +int pthread_rdwr_init_np(pthread_rdwr_t *rdwrp, pthread_rdwrattr_t *attrp) +{ + rdwrp->readers_reading = 0; + rdwrp->writer_writing = 0; + pthread_mutex_init(&(rdwrp->mutex), NULL); + pthread_cond_init(&(rdwrp->lock_free), NULL); + return 0; +} + +int pthread_rdwr_rlock_np(pthread_rdwr_t *rdwrp){ + pthread_mutex_lock(&(rdwrp->mutex)); + while(rdwrp->writer_writing) { + pthread_cond_wait(&(rdwrp->lock_free), &(rdwrp->mutex)); + } + rdwrp->readers_reading++; + pthread_mutex_unlock(&(rdwrp->mutex)); + return 0; +} + +int pthread_rdwr_runlock_np(pthread_rdwr_t *rdwrp) +{ + pthread_mutex_lock(&(rdwrp->mutex)); + if (rdwrp->readers_reading == 0) { + pthread_mutex_unlock(&(rdwrp->mutex)); + return -1; + } + else { + rdwrp->readers_reading--; + if (rdwrp->readers_reading == 0) { + pthread_cond_signal(&(rdwrp->lock_free)); + } + pthread_mutex_unlock(&(rdwrp->mutex)); + return 0; + } +} + +int pthread_rdwr_wlock_np(pthread_rdwr_t *rdwrp) +{ + pthread_mutex_lock(&(rdwrp->mutex)); + while(rdwrp->writer_writing || rdwrp->readers_reading) { + pthread_cond_wait(&(rdwrp->lock_free), &(rdwrp->mutex)); + } + rdwrp->writer_writing++; + pthread_mutex_unlock(&(rdwrp->mutex)); + return 0; +} + +int pthread_rdwr_wunlock_np(pthread_rdwr_t *rdwrp) +{ + pthread_mutex_lock(&(rdwrp->mutex)); + if (rdwrp->writer_writing == 0) { + pthread_mutex_unlock(&(rdwrp->mutex)); + return -1; + } + else { + rdwrp->writer_writing = 0; + pthread_cond_broadcast(&(rdwrp->lock_free)); + pthread_mutex_unlock(&(rdwrp->mutex)); + return 0; + } +} + +#ifdef LDAP_DEBUG + +/* just for testing, + * return 0 if false, suitable for assert(pthread_rdwr_Xchk(rdwr)) + * + * Currently they don't check if the calling thread is the one + * that has the lock, just that there is a reader or writer. + * + * Basically sufficent for testing that places that should have + * a lock are caught. + */ + +int pthread_rdwr_rchk_np(pthread_rdwr_t *rdwrp) +{ + return(rdwrp->readers_reading!=0); +} + +int pthread_rdwr_wchk_np(pthread_rdwr_t *rdwrp) +{ + return(rdwrp->writer_writing!=0); +} +int pthread_rdwr_rwchk_np(pthread_rdwr_t *rdwrp) +{ + return(pthread_rdwr_rchk_np(rdwrp) || pthread_rdwr_wchk_np(rdwrp)); +} + +#endif /* LDAP_DEBUG */ diff --git a/libraries/liblthread/thread.c b/libraries/liblthread/thread.c index d4fea7e477..8e4e4995be 100644 --- a/libraries/liblthread/thread.c +++ b/libraries/liblthread/thread.c @@ -504,6 +504,7 @@ void pthread_yield( void ) { sched_yield(); } + #endif /* HAVE_SCHED_YIELD */ #endif /* posix threads */ diff --git a/servers/slapd/acl.c b/servers/slapd/acl.c index 6c3b22ee85..a5fd38abbd 100644 --- a/servers/slapd/acl.c +++ b/servers/slapd/acl.c @@ -6,15 +6,11 @@ #include #include #include -#ifdef sunos5 -#include "regexpr.h" -#else -#include "regex.h" -#endif +#include + #include "slap.h" extern Attribute *attr_find(); -extern char *re_comp(); extern struct acl *global_acl; extern int global_default_access; extern char *access2str(); @@ -26,7 +22,9 @@ struct acl *acl_get_applicable(); static int regex_matches(); -extern pthread_mutex_t regex_mutex; +static string_expand(char *newbuf, int bufsiz, char *pattern, + char *match, regmatch_t *matches); + /* * access_allowed - check whether dn is allowed the requested access @@ -51,15 +49,57 @@ access_allowed( int access ) { - int rc; - struct acl *a; + int rc; + struct acl *a; + char *edn; + + regmatch_t matches[MAXREMATCHES]; + int i; + int n; if ( be == NULL ) { return( 0 ); } - a = acl_get_applicable( be, op, e, attr ); - rc = acl_access_allowed( a, be, conn, e, val, op, access ); + edn = dn_normalize_case( strdup( e->e_dn ) ); + Debug( LDAP_DEBUG_ACL, "\n=> access_allowed: entry (%s) attr (%s)\n", + e->e_dn, attr, 0 ); + + /* the lastmod attributes are ignored by ACL checking */ + if ( strcasecmp( attr, "modifiersname" ) == 0 || + strcasecmp( attr, "modifytimestamp" ) == 0 || + strcasecmp( attr, "creatorsname" ) == 0 || + strcasecmp( attr, "createtimestamp" ) == 0 ) + { + Debug( LDAP_DEBUG_ACL, "LASTMOD attribute: %s access allowed\n", + attr, 0, 0 ); + free( edn ); + return(1); + } + + memset(matches, 0, sizeof(matches)); + + a = acl_get_applicable( be, op, e, attr, edn, MAXREMATCHES, matches ); + + if (a) { + for (i = 0; i < MAXREMATCHES && matches[i].rm_so > 0; i++) { + Debug( LDAP_DEBUG_ARGS, "=> match[%d]: %d %d ", + i, matches[i].rm_so, matches[i].rm_eo ); + + if( matches[i].rm_so <= matches[0].rm_eo ) { + for ( n = matches[i].rm_so; n < matches[i].rm_eo; n++) { + Debug( LDAP_DEBUG_ARGS, "%c", edn[n], 0, 0 ); + } + } + Debug( LDAP_DEBUG_ARGS, "\n", 0, 0, 0 ); + } + } + + rc = acl_access_allowed( a, be, conn, e, val, op, access, edn, matches ); + free( edn ); + + Debug( LDAP_DEBUG_ACL, "\n=> access_allowed: exit (%s) attr (%s)\n", + e->e_dn, attr, 0); return( rc ); } @@ -75,15 +115,17 @@ acl_get_applicable( Backend *be, Operation *op, Entry *e, - char *attr + char *attr, + char *edn, + int nmatch, + regmatch_t *matches ) { - int i; + int i, j; struct acl *a; - char *edn; - Debug( LDAP_DEBUG_ACL, "=> acl_get: entry (%s) attr (%s)\n", e->e_dn, - attr, 0 ); + Debug( LDAP_DEBUG_ACL, "\n=> acl_get: entry (%s) attr (%s)\n", + e->e_dn, attr, 0 ); if ( be_isroot( be, op->o_dn ) ) { Debug( LDAP_DEBUG_ACL, @@ -92,55 +134,73 @@ acl_get_applicable( return( NULL ); } + Debug( LDAP_DEBUG_ARGS, "=> acl_get: edn %s\n", edn, 0, 0 ); + /* check for a backend-specific acl that matches the entry */ for ( i = 1, a = be->be_acl; a != NULL; a = a->acl_next, i++ ) { - if ( a->acl_dnpat != NULL ) { - edn = dn_normalize_case( strdup( e->e_dn ) ); - if ( ! regex_matches( a->acl_dnpat, edn ) ) { - free( edn ); + if (a->acl_dnpat != NULL) { + Debug( LDAP_DEBUG_TRACE, "=> dnpat: [%d] %s nsub: %d\n", + i, a->acl_dnpat, a->acl_dnre.re_nsub); + + if (regexec(&a->acl_dnre, edn, nmatch, matches, 0)) continue; - } - free( edn ); + else + Debug( LDAP_DEBUG_TRACE, "=> acl_get:[%d] backend ACL match\n", + i, 0, 0); } + if ( a->acl_filter != NULL ) { - if ( test_filter( NULL, NULL, NULL, e, a->acl_filter ) - != 0 ) { + if ( test_filter( NULL, NULL, NULL, e, a->acl_filter ) != 0 ) { continue; } } + + Debug( LDAP_DEBUG_ARGS, "=> acl_get: [%d] check attr %s\n", i, attr, 0); + if ( attr == NULL || a->acl_attrs == NULL || - charray_inlist( a->acl_attrs, attr ) ) { - Debug( LDAP_DEBUG_ACL, "<= acl_get: backend acl #%d\n", - i, e->e_dn, attr ); + charray_inlist( a->acl_attrs, attr ) ) + { + Debug( LDAP_DEBUG_ACL, "<= acl_get: [%d] backend acl %s attr: %s\n", + i, e->e_dn, attr ); return( a ); } + matches[0].rm_so = matches[0].rm_eo = -1; } /* check for a global acl that matches the entry */ for ( i = 1, a = global_acl; a != NULL; a = a->acl_next, i++ ) { - if ( a->acl_dnpat != NULL ) { - edn = dn_normalize_case( strdup( e->e_dn ) ); - if ( ! regex_matches( a->acl_dnpat, edn ) ) { - free( edn ); + if (a->acl_dnpat != NULL) { + Debug( LDAP_DEBUG_TRACE, "=> dnpat: [%d] %s nsub: %d\n", + i, a->acl_dnpat, a->acl_dnre.re_nsub); + + if (regexec(&a->acl_dnre, edn, nmatch, matches, 0)) { continue; + } else { + Debug( LDAP_DEBUG_TRACE, "=> acl_get: [%d] global ACL match\n", + i, 0, 0); } - free( edn ); } + if ( a->acl_filter != NULL ) { - if ( test_filter( NULL, NULL, NULL, e, a->acl_filter ) - != 0 ) { + if ( test_filter( NULL, NULL, NULL, e, a->acl_filter ) != 0 ) { continue; } } - if ( attr == NULL || a->acl_attrs == NULL || charray_inlist( - a->acl_attrs, attr ) ) { - Debug( LDAP_DEBUG_ACL, "<= acl_get: global acl #%d\n", - i, e->e_dn, attr ); + + Debug( LDAP_DEBUG_ARGS, "=> acl_get: [%d] check attr\n", i, 0, 0); + + if ( attr == NULL || a->acl_attrs == NULL || + charray_inlist( a->acl_attrs, attr ) ) + { + Debug( LDAP_DEBUG_ACL, "<= acl_get: [%d] global acl %s attr: %s\n", + i, e->e_dn, attr ); return( a ); } - } - Debug( LDAP_DEBUG_ACL, "<= acl_get: no match\n", 0, 0, 0 ); + matches[0].rm_so = matches[0].rm_eo = -1; + } + + Debug( LDAP_DEBUG_ACL, "<= acl_get: no match\n", 0, 0, 0 ); return( NULL ); } @@ -161,31 +221,40 @@ acl_access_allowed( Entry *e, struct berval *val, Operation *op, - int access + int access, + char *edn, + regmatch_t *matches ) { int i; - char *edn, *odn; + char *odn; struct access *b; Attribute *at; struct berval bv; int default_access; - Debug( LDAP_DEBUG_ACL, "=> acl: %s access to value \"%s\" by \"%s\"\n", - access2str( access ), val ? val->bv_val : "any", op->o_dn ? - op->o_dn : "" ); + Debug( LDAP_DEBUG_ACL, + "\n=> acl_access_allowed: %s access to entry \"%s\"\n", + access2str( access ), e->e_dn, 0 ); + + Debug( LDAP_DEBUG_ACL, + "\n=> acl_access_allowed: %s access to value \"%s\" by \"%s\"\n", + access2str( access ), + val ? val->bv_val : "any", + op->o_dn ? op->o_dn : "" ); if ( be_isroot( be, op->o_dn ) ) { - Debug( LDAP_DEBUG_ACL, "<= acl: granted to database root\n", + Debug( LDAP_DEBUG_ACL, + "<= acl_access_allowed: granted to database root\n", 0, 0, 0 ); return( 1 ); } - default_access = be->be_dfltaccess ? be->be_dfltaccess : - global_default_access; + default_access = be->be_dfltaccess ? be->be_dfltaccess : global_default_access; + if ( a == NULL ) { Debug( LDAP_DEBUG_ACL, - "<= acl: %s by default (no matching to)\n", + "<= acl_access_allowed: %s by default (no matching to)\n", default_access >= access ? "granted" : "denied", 0, 0 ); return( default_access >= access ); } @@ -198,76 +267,78 @@ acl_access_allowed( } for ( i = 1, b = a->acl_access; b != NULL; b = b->a_next, i++ ) { if ( b->a_dnpat != NULL ) { + Debug( LDAP_DEBUG_TRACE, "<= check a_dnpat: %s\n", + b->a_dnpat, 0, 0); /* * if access applies to the entry itself, and the * user is bound as somebody in the same namespace as * the entry, OR the given dn matches the dn pattern */ - if ( strcasecmp( b->a_dnpat, "self" ) == 0 && op->o_dn - != NULL && *(op->o_dn) && e->e_dn != NULL ) { - edn = dn_normalize_case( strdup( e->e_dn ) ); + if ( strcasecmp( b->a_dnpat, "self" ) == 0 && + op->o_dn != NULL && *(op->o_dn) && e->e_dn != NULL ) + { if ( strcasecmp( edn, op->o_dn ) == 0 ) { - free( edn ); - if ( odn ) free( odn ); Debug( LDAP_DEBUG_ACL, - "<= acl: matched by clause #%d access %s\n", + "<= acl_access_allowed: matched by clause #%d access %s\n", i, (b->a_access & ~ACL_SELF) >= access ? "granted" : "denied", 0 ); - return( (b->a_access & ~ACL_SELF) - >= access ); - } - free( edn ); - } else { - if ( regex_matches( b->a_dnpat, odn ) ) { if ( odn ) free( odn ); + return( (b->a_access & ~ACL_SELF) >= access ); + } + } else { + if ( regex_matches( b->a_dnpat, odn, edn, matches ) ) { Debug( LDAP_DEBUG_ACL, - "<= acl: matched by clause #%d access %s\n", + "<= acl_access_allowed: matched by clause #%d access %s\n", i, (b->a_access & ~ACL_SELF) >= access ? "granted" : "denied", 0 ); - return( (b->a_access & ~ACL_SELF) - >= access ); + if ( odn ) free( odn ); + return( (b->a_access & ~ACL_SELF) >= access ); } } } if ( b->a_addrpat != NULL ) { - if ( regex_matches( b->a_addrpat, conn->c_addr ) ) { - if ( odn ) free( odn ); + if ( regex_matches( b->a_addrpat, conn->c_addr, edn, matches ) ) { Debug( LDAP_DEBUG_ACL, - "<= acl: matched by clause #%d access %s\n", + "<= acl_access_allowed: matched by clause #%d access %s\n", i, (b->a_access & ~ACL_SELF) >= access ? "granted" : "denied", 0 ); + if ( odn ) free( odn ); return( (b->a_access & ~ACL_SELF) >= access ); } } if ( b->a_domainpat != NULL ) { - if ( regex_matches( b->a_domainpat, conn->c_domain ) ) { - if ( odn ) free( odn ); + Debug( LDAP_DEBUG_ARGS, "<= check a_domainpath: %s\n", + b->a_domainpat, 0, 0 ); + if ( regex_matches( b->a_domainpat, conn->c_domain, edn, matches ) ) + { Debug( LDAP_DEBUG_ACL, - "<= acl: matched by clause #%d access %s\n", + "<= acl_access_allowed: matched by clause #%d access %s\n", i, (b->a_access & ~ACL_SELF) >= access ? "granted" : "denied", 0 ); + if ( odn ) free( odn ); return( (b->a_access & ~ACL_SELF) >= access ); } } if ( b->a_dnattr != NULL && op->o_dn != NULL ) { + Debug( LDAP_DEBUG_ARGS, "<= check a_dnattr: %s\n", + b->a_dnattr, 0, 0); /* see if asker is listed in dnattr */ - if ( (at = attr_find( e->e_attrs, b->a_dnattr )) - != NULL && value_find( at->a_vals, &bv, - at->a_syntax, 3 ) == 0 ) + if ( (at = attr_find( e->e_attrs, b->a_dnattr )) != NULL && + value_find( at->a_vals, &bv, at->a_syntax, 3 ) == 0 ) { - if ( (b->a_access & ACL_SELF) && (val == NULL - || value_cmp( &bv, val, at->a_syntax, - 2 )) ) { + if ( (b->a_access & ACL_SELF) && + (val == NULL || value_cmp( &bv, val, at->a_syntax, 2 )) ) + { continue; } if ( odn ) free( odn ); Debug( LDAP_DEBUG_ACL, - "<= acl: matched by clause #%d access %s\n", + "<= acl_acces_allowed: matched by clause #%d access %s\n", i, (b->a_access & ~ACL_SELF) >= access ? "granted" : "denied", 0 ); @@ -276,22 +347,49 @@ acl_access_allowed( /* asker not listed in dnattr - check for self access */ if ( ! (b->a_access & ACL_SELF) || val == NULL || - value_cmp( &bv, val, at->a_syntax, 2 ) != 0 ) { + value_cmp( &bv, val, at->a_syntax, 2 ) != 0 ) + { continue; } if ( odn ) free( odn ); Debug( LDAP_DEBUG_ACL, - "<= acl: matched by clause #%d (self) access %s\n", + "<= acl_access_allowed: matched by clause #%d (self) access %s\n", i, (b->a_access & ~ACL_SELF) >= access ? "granted" : "denied", 0 ); return( (b->a_access & ~ACL_SELF) >= access ); } +#ifdef ACLGROUP + if ( b->a_group != NULL && op->o_dn != NULL ) { + char buf[512]; + + /* b->a_group is an unexpanded entry name, expanded it should be an + * entry with objectclass group* and we test to see if odn is one of + * the values in the attribute uniquegroup + */ + Debug( LDAP_DEBUG_ARGS, "<= check a_group: %s\n", + b->a_group, 0, 0); + Debug( LDAP_DEBUG_ARGS, "<= check a_group: odn: %s\n", + odn, 0, 0); + + /* see if asker is listed in dnattr */ + string_expand(buf, sizeof(buf), b->a_group, edn, matches); + + if (be_group(be, buf, odn) == 0) { + Debug( LDAP_DEBUG_ACL, + "<= acl_access_allowed: matched by clause #%d (group) access granted\n", + i, 0, 0 ); + if ( odn ) free( odn ); + return( (b->a_access & ~ACL_SELF) >= access ); + } + } +#endif /* ACLGROUP */ } if ( odn ) free( odn ); - Debug( LDAP_DEBUG_ACL, "<= acl: %s by default (no matching by)\n", + Debug( LDAP_DEBUG_ACL, + "<= acl_access_allowed: %s by default (no matching by)\n", default_access >= access ? "granted" : "denied", 0, 0 ); return( default_access >= access ); @@ -316,14 +414,26 @@ acl_check_mods( { int i; struct acl *a; + char *edn; + + edn = dn_normalize_case( strdup( e->e_dn ) ); for ( ; mods != NULL; mods = mods->mod_next ) { + regmatch_t matches[MAXREMATCHES]; + + /* the lastmod attributes are ignored by ACL checking */ if ( strcasecmp( mods->mod_type, "modifiersname" ) == 0 || - strcasecmp( mods->mod_type, "modifytimestamp" ) == 0 ) { + strcasecmp( mods->mod_type, "modifytimestamp" ) == 0 || + strcasecmp( mods->mod_type, "creatorsname" ) == 0 || + strcasecmp( mods->mod_type, "createtimestamp" ) == 0 ) + { + Debug( LDAP_DEBUG_ACL, "LASTMOD attribute: %s access allowed\n", + mods->mod_type, 0, 0 ); continue; } - a = acl_get_applicable( be, op, e, mods->mod_type ); + a = acl_get_applicable( be, op, e, mods->mod_type, edn, + MAXREMATCHES, matches ); switch ( mods->mod_op & ~LDAP_MOD_BVALUES ) { case LDAP_MOD_REPLACE: @@ -332,8 +442,10 @@ acl_check_mods( break; } for ( i = 0; mods->mod_bvalues[i] != NULL; i++ ) { - if ( ! acl_access_allowed( a, be, conn, e, - mods->mod_bvalues[i], op, ACL_WRITE ) ) { + if ( ! acl_access_allowed( a, be, conn, e, mods->mod_bvalues[i], + op, ACL_WRITE, edn, matches) ) + { + free(edn); return( LDAP_INSUFFICIENT_ACCESS ); } } @@ -342,14 +454,18 @@ acl_check_mods( case LDAP_MOD_DELETE: if ( mods->mod_bvalues == NULL ) { if ( ! acl_access_allowed( a, be, conn, e, - NULL, op, ACL_WRITE ) ) { + NULL, op, ACL_WRITE, edn, matches) ) + { + free(edn); return( LDAP_INSUFFICIENT_ACCESS ); } break; } for ( i = 0; mods->mod_bvalues[i] != NULL; i++ ) { - if ( ! acl_access_allowed( a, be, conn, e, - mods->mod_bvalues[i], op, ACL_WRITE ) ) { + if ( ! acl_access_allowed( a, be, conn, e, mods->mod_bvalues[i], + op, ACL_WRITE, edn, matches) ) + { + free(edn); return( LDAP_INSUFFICIENT_ACCESS ); } } @@ -357,48 +473,95 @@ acl_check_mods( } } + free(edn); return( LDAP_SUCCESS ); } -#ifdef sunos5 - -static int -regex_matches( char *pat, char *str ) +static string_expand( + char *newbuf, + int bufsiz, + char *pat, + char *match, + regmatch_t *matches) { - char *e; - int rc; + int size; + char *sp; + char *dp; + int flag; - if ( (e = compile( pat, NULL, NULL )) == NULL ) { - Debug( LDAP_DEBUG_ANY, - "compile( \"%s\", \"%s\") failed\n", pat, str, 0 ); - return( 0 ); + size = 0; + newbuf[0] = '\0'; + + flag = 0; + for ( dp = newbuf, sp = pat; size < 512 && *sp ; sp++) { + /* did we previously see a $ */ + if (flag) { + if (*sp == '$') { + *dp++ = '$'; + size++; + } else if (*sp >= '0' && *sp <= '9' ) { + int n; + int i; + char *ep; + int l; + + n = *sp - '0'; + *dp = '\0'; + i = matches[n].rm_so; + l = matches[n].rm_eo; + for ( ; size < 512 && i < l; size++, i++ ) { + *dp++ = match[i]; + size++; + } + *dp = '\0'; + } + flag = 0; + } else { + if (*sp == '$') { + flag = 1; + } else { + *dp++ = *sp; + size++; + } + } } - rc = step( str ? str : "", e ); - free( e ); + *dp = '\0'; - return( rc ); + Debug( LDAP_DEBUG_TRACE, "=> string_expand: pattern: %s\n", pat, 0, 0 ); + Debug( LDAP_DEBUG_TRACE, "=> string_expand: expanded: %s\n", newbuf, 0, 0 ); } -#else /* sunos5 */ - static int -regex_matches( char *pat, char *str ) +regex_matches( + char *pat, /* pattern to expand and match against */ + char *str, /* string to match against pattern */ + char *buf, /* buffer with $N expansion variables */ + regmatch_t *matches /* offsets in buffer for $N expansion variables */ +) { - char *e; + regex_t re; + char newbuf[512]; int rc; - pthread_mutex_lock( ®ex_mutex ); - if ( (e = re_comp( pat )) != NULL ) { - Debug( LDAP_DEBUG_ANY, - "re_comp( \"%s\", \"%s\") failed because (%s)\n", pat, str, - e ); - pthread_mutex_unlock( ®ex_mutex ); + string_expand(newbuf, sizeof(newbuf), pat, buf, matches); + if (( rc = regcomp(&re, newbuf, REG_EXTENDED|REG_ICASE))) { + char error[512]; + regerror(rc, &re, error, sizeof(error)); + + Debug( LDAP_DEBUG_TRACE, + "compile( \"%s\", \"%s\") failed %s\n", + pat, str, error ); return( 0 ); } - rc = re_exec( str ? str : "" ); - pthread_mutex_unlock( ®ex_mutex ); - return( rc == 1 ); + rc = regexec(&re, str, 0, NULL, 0); + regfree( &re ); + + Debug( LDAP_DEBUG_TRACE, + "=> regex_matches: string: %s\n", str, 0, 0 ); + Debug( LDAP_DEBUG_TRACE, + "=> regex_matches: rc: %d %s\n", + rc, !rc ? "matches" : "no matches", 0 ); + return( !rc ); } -#endif /* sunos5 */ diff --git a/servers/slapd/add.c b/servers/slapd/add.c index 027e40a8e4..93cc3cdcd3 100644 --- a/servers/slapd/add.c +++ b/servers/slapd/add.c @@ -53,6 +53,8 @@ do_add( conn, op ) */ e = (Entry *) ch_calloc( 1, sizeof(Entry) ); + /* initialize reader/writer lock */ + entry_rdwr_init(e); /* get the name */ if ( ber_scanf( ber, "{a", &dn ) == LBER_ERROR ) { @@ -117,21 +119,25 @@ do_add( conn, op ) */ if ( be->be_add != NULL ) { /* do the update here */ - if ( be->be_updatedn == NULL || strcasecmp( be->be_updatedn, - op->o_dn ) == 0 ) { - if ( (be->be_lastmod == ON || be->be_lastmod == 0 && - global_lastmod == ON) && be->be_updatedn == NULL ) { + if ( be->be_updatedn == NULL || + strcasecmp( be->be_updatedn, op->o_dn ) == 0 ) { + + if ( (be->be_lastmod == ON || (be->be_lastmod == UNDEFINED && + global_lastmod == ON)) && be->be_updatedn == NULL ) { + add_created_attrs( op, e ); } if ( (*be->be_add)( be, conn, op, e ) == 0 ) { replog( be, LDAP_REQ_ADD, e->e_dn, e, 0 ); } + } else { entry_free( e ); send_ldap_result( conn, op, LDAP_PARTIAL_RESULTS, NULL, default_referral ); } } else { + Debug( LDAP_DEBUG_ARGS, " do_add: HHH\n", 0, 0, 0 ); entry_free( e ); send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM, NULL, "Function not implemented" ); @@ -141,7 +147,7 @@ do_add( conn, op ) static void add_created_attrs( Operation *op, Entry *e ) { - char buf[20]; + char buf[22]; struct berval bv; struct berval *bvals[2]; Attribute **a, **next; @@ -155,8 +161,10 @@ add_created_attrs( Operation *op, Entry *e ) /* remove any attempts by the user to add these attrs */ for ( a = &e->e_attrs; *a != NULL; a = next ) { - if ( strcasecmp( (*a)->a_type, "createtimestamp" ) == 0 - || strcasecmp( (*a)->a_type, "creatorsname" ) == 0 ) { + if ( strcasecmp( (*a)->a_type, "modifiersname" ) == 0 || + strcasecmp( (*a)->a_type, "modifytimestamp" ) == 0 || + strcasecmp( (*a)->a_type, "creatorsname" ) == 0 || + strcasecmp( (*a)->a_type, "createtimestamp" ) == 0 ) { tmp = *a; *a = (*a)->a_next; attr_free( tmp ); @@ -176,8 +184,12 @@ add_created_attrs( Operation *op, Entry *e ) attr_merge( e, "creatorsname", bvals ); pthread_mutex_lock( ¤ttime_mutex ); - ltm = localtime( ¤ttime ); - strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm ); + ltm = localtime( ¤ttime ); +#ifdef LDAP_Y2K + strftime( buf, sizeof(buf), "%Y%m%d%H%M%SZ", ltm ); +#else + strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm ); +#endif pthread_mutex_unlock( ¤ttime_mutex ); bv.bv_val = buf; diff --git a/servers/slapd/back-ldbm/add.c b/servers/slapd/back-ldbm/add.c index 3dacd6da3d..797398ad4b 100644 --- a/servers/slapd/back-ldbm/add.c +++ b/servers/slapd/back-ldbm/add.c @@ -6,11 +6,11 @@ #include #include "slap.h" #include "back-ldbm.h" +#include "proto-back-ldbm.h" extern int global_schemacheck; extern char *dn_parent(); extern char *dn_normalize(); -extern Entry *dn2entry(); int ldbm_back_add( @@ -21,27 +21,30 @@ ldbm_back_add( ) { struct ldbminfo *li = (struct ldbminfo *) be->be_private; - char *matched; char *dn = NULL, *pdn = NULL; - Entry *p; + Entry *p = NULL; + int rc; dn = dn_normalize( strdup( e->e_dn ) ); - matched = NULL; - if ( (p = dn2entry( be, dn, &matched )) != NULL ) { - cache_return_entry( &li->li_cache, p ); + + Debug(LDAP_DEBUG_ARGS, "==> ldbm_back_add: %s\n", dn, 0, 0); + + if ( ( dn2id( be, dn ) ) != NOID ) { entry_free( e ); free( dn ); send_ldap_result( conn, op, LDAP_ALREADY_EXISTS, "", "" ); return( -1 ); } - if ( matched != NULL ) { - free( matched ); - } + /* XXX race condition here til we cache_add_entry_lock below XXX */ if ( global_schemacheck && oc_schema_check( e ) != 0 ) { - Debug( LDAP_DEBUG_TRACE, "entry failed schema check\n", 0, 0, - 0 ); + Debug( LDAP_DEBUG_TRACE, "entry failed schema check\n", + 0, 0, 0 ); + + /* XXX this should be ok, no other thread should have access + * because e hasn't been added to the cache yet + */ entry_free( e ); free( dn ); send_ldap_result( conn, op, LDAP_OBJECT_CLASS_VIOLATION, "", @@ -61,6 +64,10 @@ ldbm_back_add( Debug( LDAP_DEBUG_ANY, "cache_add_entry_lock failed\n", 0, 0, 0 ); next_id_return( be, e->e_id ); + + /* XXX this should be ok, no other thread should have access + * because e hasn't been added to the cache yet + */ entry_free( e ); free( dn ); send_ldap_result( conn, op, LDAP_ALREADY_EXISTS, "", "" ); @@ -74,17 +81,22 @@ ldbm_back_add( */ if ( (pdn = dn_parent( be, dn )) != NULL ) { + char *matched; /* no parent */ matched = NULL; - if ( (p = dn2entry( be, pdn, &matched )) == NULL ) { + + /* get entry with reader lock */ + if ( (p = dn2entry_r( be, pdn, &matched )) == NULL ) { + Debug( LDAP_DEBUG_TRACE, "parent does not exist\n", 0, + 0, 0 ); send_ldap_result( conn, op, LDAP_NO_SUCH_OBJECT, matched, "" ); if ( matched != NULL ) { free( matched ); } - Debug( LDAP_DEBUG_TRACE, "parent does not exist\n", 0, - 0, 0 ); - goto error_return; + + rc = -1; + goto return_results; } if ( matched != NULL ) { free( matched ); @@ -96,7 +108,9 @@ ldbm_back_add( 0, 0 ); send_ldap_result( conn, op, LDAP_INSUFFICIENT_ACCESS, "", "" ); - goto error_return; + + rc = -1; + goto return_results; } } else { if ( ! be_isroot( be, op->o_dn ) ) { @@ -104,9 +118,10 @@ ldbm_back_add( 0, 0 ); send_ldap_result( conn, op, LDAP_INSUFFICIENT_ACCESS, "", "" ); - goto error_return; + + rc = -1; + goto return_results; } - p = NULL; } /* @@ -116,9 +131,10 @@ ldbm_back_add( if ( id2children_add( be, p, e ) != 0 ) { Debug( LDAP_DEBUG_TRACE, "id2children_add failed\n", 0, 0, 0 ); - send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, "", - "" ); - goto error_return; + send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, "", "" ); + + rc = -1; + goto return_results; } /* @@ -131,7 +147,9 @@ ldbm_back_add( Debug( LDAP_DEBUG_TRACE, "index_add_entry failed\n", 0, 0, 0 ); send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, "", "" ); - goto error_return; + + rc = -1; + goto return_results; } /* dn2id index */ @@ -139,35 +157,44 @@ ldbm_back_add( Debug( LDAP_DEBUG_TRACE, "dn2id_add failed\n", 0, 0, 0 ); send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, "", "" ); - goto error_return; + + rc = -1; + goto return_results; } + /* acquire writer lock */ + entry_rdwr_lock(e, 1); + /* id2entry index */ if ( id2entry_add( be, e ) != 0 ) { Debug( LDAP_DEBUG_TRACE, "id2entry_add failed\n", 0, 0, 0 ); (void) dn2id_delete( be, dn ); send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, "", "" ); - goto error_return; + + rc = -1; + goto return_results; } send_ldap_result( conn, op, LDAP_SUCCESS, "", "" ); + rc = 0; + +return_results:; + if ( dn != NULL ) free( dn ); if ( pdn != NULL ) free( pdn ); + cache_set_state( &li->li_cache, e, 0 ); - cache_return_entry( &li->li_cache, e ); - return( 0 ); -error_return:; - if ( dn != NULL ) - free( dn ); - if ( pdn != NULL ) - free( pdn ); - next_id_return( be, e->e_id ); - cache_delete_entry( &li->li_cache, e ); - cache_return_entry( &li->li_cache, e ); + /* free entry and writer lock */ + cache_return_entry_w( &li->li_cache, e ); - return( -1 ); + /* free entry and reader lock */ + if (p != NULL) { + cache_return_entry_r( &li->li_cache, p ); + } + + return( rc ); } diff --git a/servers/slapd/back-ldbm/bind.c b/servers/slapd/back-ldbm/bind.c index be453f8e5d..66dfddbceb 100644 --- a/servers/slapd/back-ldbm/bind.c +++ b/servers/slapd/back-ldbm/bind.c @@ -6,6 +6,7 @@ #include #include "slap.h" #include "back-ldbm.h" +#include "proto-back-ldbm.h" #ifdef KERBEROS #ifdef KERBEROS_V #include @@ -32,7 +33,6 @@ extern char *crypt (char *key, char *salt); #include -extern Entry *dn2entry(); extern Attribute *attr_find(); #ifdef KERBEROS @@ -140,7 +140,10 @@ ldbm_back_bind( AUTH_DAT ad; #endif - if ( (e = dn2entry( be, dn, &matched )) == NULL ) { + Debug(LDAP_DEBUG_ARGS, "==> ldbm_back_bind: dn: %s\n", dn, 0, 0); + + /* get entry with reader lock */ + if ( (e = dn2entry_r( be, dn, &matched )) == NULL ) { /* allow noauth binds */ if ( method == LDAP_AUTH_SIMPLE && cred->bv_len == 0 ) { /* @@ -153,8 +156,7 @@ ldbm_back_bind( /* front end will send result */ rc = 0; } else { - send_ldap_result( conn, op, LDAP_NO_SUCH_OBJECT, - matched, NULL ); + send_ldap_result( conn, op, LDAP_NO_SUCH_OBJECT, matched, NULL ); rc = 1; } if ( matched != NULL ) { @@ -163,25 +165,32 @@ ldbm_back_bind( return( rc ); } + /* check for deleted */ + switch ( method ) { case LDAP_AUTH_SIMPLE: if ( cred->bv_len == 0 ) { send_ldap_result( conn, op, LDAP_SUCCESS, NULL, NULL ); - return( 1 ); + + /* stop front end from sending result */ + rc = 1; + goto return_results; } else if ( be_isroot_pw( be, dn, cred ) ) { /* front end will send result */ - return( 0 ); + rc = 0; + goto return_results; } if ( (a = attr_find( e->e_attrs, "userpassword" )) == NULL ) { if ( be_isroot_pw( be, dn, cred ) ) { /* front end will send result */ - return( 0 ); + rc = 0; + goto return_results; } send_ldap_result( conn, op, LDAP_INAPPROPRIATE_AUTH, NULL, NULL ); - cache_return_entry( &li->li_cache, e ); - return( 1 ); + rc = 1; + goto return_results; } #ifdef LDAP_CRYPT @@ -189,16 +198,18 @@ ldbm_back_bind( #else if ( value_find( a->a_vals, cred, a->a_syntax, 0 ) != 0 ) #endif -{ + { if ( be_isroot_pw( be, dn, cred ) ) { /* front end will send result */ - return( 0 ); + rc = 0; + goto return_results; } send_ldap_result( conn, op, LDAP_INVALID_CREDENTIALS, NULL, NULL ); - cache_return_entry( &li->li_cache, e ); - return( 1 ); + rc = 1; + goto return_results; } + rc = 0; break; #ifdef KERBEROS @@ -206,8 +217,8 @@ ldbm_back_bind( if ( krbv4_ldap_auth( be, cred, &ad ) != LDAP_SUCCESS ) { send_ldap_result( conn, op, LDAP_INVALID_CREDENTIALS, NULL, NULL ); - cache_return_entry( &li->li_cache, e ); - return( 1 ); + rc = 0; + goto return_results; } sprintf( krbname, "%s%s%s@%s", ad.pname, *ad.pinst ? "." : "", ad.pinst, ad.prealm ); @@ -216,43 +227,47 @@ ldbm_back_bind( * no krbName values present: check against DN */ if ( strcasecmp( dn, krbname ) == 0 ) { + rc = 0; /* XXX wild ass guess */ break; } send_ldap_result( conn, op, LDAP_INAPPROPRIATE_AUTH, NULL, NULL ); - cache_return_entry( &li->li_cache, e ); - return( 1 ); + rc = 1; + goto return_results; } else { /* look for krbName match */ struct berval krbval; krbval.bv_val = krbname; krbval.bv_len = strlen( krbname ); - if ( value_find( a->a_vals, &krbval, a->a_syntax, 3 ) - != 0 ) { + if ( value_find( a->a_vals, &krbval, a->a_syntax, 3 ) != 0 ) { send_ldap_result( conn, op, LDAP_INVALID_CREDENTIALS, NULL, NULL ); - cache_return_entry( &li->li_cache, e ); - return( 1 ); + rc = 1; + goto return_results; } } break; case LDAP_AUTH_KRBV42: send_ldap_result( conn, op, LDAP_SUCCESS, NULL, NULL ); - cache_return_entry( &li->li_cache, e ); - return( 1 ); + /* stop front end from sending result */ + rc = 1; + goto return_results; #endif default: send_ldap_result( conn, op, LDAP_STRONG_AUTH_NOT_SUPPORTED, NULL, "auth method not supported" ); - cache_return_entry( &li->li_cache, e ); - return( 1 ); + rc = 1; + goto return_results; } - cache_return_entry( &li->li_cache, e ); +return_results:; + /* free entry and reader lock */ + cache_return_entry_r( &li->li_cache, e ); - /* success: front end will send result */ - return( 0 ); + /* front end with send result on success (rc==0) */ + return( rc ); } + diff --git a/servers/slapd/back-ldbm/cache.c b/servers/slapd/back-ldbm/cache.c index a9248865ef..819b1f2712 100644 --- a/servers/slapd/back-ldbm/cache.c +++ b/servers/slapd/back-ldbm/cache.c @@ -52,7 +52,7 @@ cache_set_state( struct cache *cache, Entry *e, int state ) pthread_mutex_unlock( &cache->c_mutex ); } -void +static void cache_return_entry( struct cache *cache, Entry *e ) { /* set cache mutex */ @@ -66,6 +66,28 @@ cache_return_entry( struct cache *cache, Entry *e ) pthread_mutex_unlock( &cache->c_mutex ); } +static void +cache_return_entry_rw( struct cache *cache, Entry *e, int rw ) +{ + Debug( LDAP_DEBUG_TRACE, "====> cache_return_entry_%s\n", + rw ? "w" : "r", 0, 0); + entry_rdwr_unlock(e, rw);; + cache_return_entry(cache, e); +} + +void +cache_return_entry_r( struct cache *cache, Entry *e ) +{ + cache_return_entry_rw(cache, e, 0); +} + +void +cache_return_entry_w( struct cache *cache, Entry *e ) +{ + cache_return_entry_rw(cache, e, 1); +} + + #define LRU_DELETE( cache, e ) { \ if ( e->e_lruprev != NULL ) { \ e->e_lruprev->e_lrunext = e->e_lrunext; \ @@ -114,8 +136,8 @@ cache_add_entry_lock( cache_entrydn_cmp, avl_dup_error ) != 0 ) { Debug( LDAP_DEBUG_TRACE, - "entry %20s id %d already in dn cache\n", e->e_dn, - e->e_id, 0 ); + "====> cache_add_entry lock: entry %20s id %d already in dn cache\n", + e->e_dn, e->e_id, 0 ); /* free cache mutex */ pthread_mutex_unlock( &cache->c_mutex ); @@ -126,14 +148,15 @@ cache_add_entry_lock( if ( avl_insert( &cache->c_idtree, (caddr_t) e, cache_entryid_cmp, avl_dup_error ) != 0 ) { - Debug( LDAP_DEBUG_ANY, "entry %20s id %d already in id cache\n", + Debug( LDAP_DEBUG_ANY, + "====> entry %20s id %d already in id cache\n", e->e_dn, e->e_id, 0 ); /* delete from dn tree inserted above */ if ( avl_delete( &cache->c_dntree, (caddr_t) e, cache_entrydn_cmp ) == NULL ) { - Debug( LDAP_DEBUG_ANY, "can't delete from dn cache\n", + Debug( LDAP_DEBUG_ANY, "====> can't delete from dn cache\n", 0, 0, 0 ); } @@ -171,6 +194,9 @@ cache_add_entry_lock( == 0 && cache->c_cursize > cache->c_maxsize ) { e = cache->c_lrutail; + /* XXX check for writer lock - should also check no readers pending */ + assert(pthread_rdwr_wchk_np(&e->e_rdwr)); + /* delete from cache and lru q */ rc = cache_delete_entry_internal( cache, e ); @@ -184,45 +210,85 @@ cache_add_entry_lock( } /* - * cache_find_entry_dn - find an entry in the cache, given dn + * cache_find_entry_dn2id - find an entry in the cache, given dn */ -Entry * -cache_find_entry_dn( +ID +cache_find_entry_dn2id( + Backend *be, struct cache *cache, char *dn ) { + struct ldbminfo *li = (struct ldbminfo *) be->be_private; Entry e, *ep; + ID id; /* set cache mutex */ pthread_mutex_lock( &cache->c_mutex ); e.e_dn = dn; + if ( (ep = (Entry *) avl_find( cache->c_dntree, (caddr_t) &e, cache_entrydn_cmp )) != NULL ) { + Debug(LDAP_DEBUG_TRACE, "====> cache_find_entry_dn2id: found dn: %s\n", + dn, 0, 0); + /* * entry is deleted or not fully created yet */ if ( ep->e_state == ENTRY_STATE_DELETED || - ep->e_state == ENTRY_STATE_CREATING ) + ep->e_state == ENTRY_STATE_CREATING ) { /* free cache mutex */ pthread_mutex_unlock( &cache->c_mutex ); - return( NULL ); + return( NOID ); } + + /* XXX is this safe without writer lock? */ ep->e_refcnt++; /* lru */ LRU_DELETE( cache, ep ); LRU_ADD( cache, ep ); + + /* acquire reader lock */ + entry_rdwr_lock(ep, 0); + + /* re-check */ + if ( ep->e_state == ENTRY_STATE_DELETED || + ep->e_state == ENTRY_STATE_CREATING ) + { + /* XXX check that is is required */ + ep->e_refcnt--; + + /* free reader lock */ + entry_rdwr_unlock(ep, 0); + /* free cache mutex */ + pthread_mutex_unlock( &cache->c_mutex ); + + return( NOID ); + } + + /* save id */ + id = ep->e_id; + + /* free reader lock */ + entry_rdwr_unlock(ep, 0); + + /* free cache mutex */ + pthread_mutex_unlock( &cache->c_mutex ); + + cache_return_entry( &li->li_cache, ep ); + + return( id ); } /* free cache mutex */ pthread_mutex_unlock( &cache->c_mutex ); - return( ep ); + return( NOID ); } /* @@ -231,8 +297,9 @@ cache_find_entry_dn( Entry * cache_find_entry_id( - struct cache *cache, - ID id + struct cache *cache, + ID id, + int rw ) { Entry e; @@ -242,30 +309,64 @@ cache_find_entry_id( pthread_mutex_lock( &cache->c_mutex ); e.e_id = id; + if ( (ep = (Entry *) avl_find( cache->c_idtree, (caddr_t) &e, cache_entryid_cmp )) != NULL ) { + Debug(LDAP_DEBUG_TRACE, + "====> cache_find_entry_dn2id: found id: %ld rw: %d\n", + id, rw, 0); + /* * entry is deleted or not fully created yet */ if ( ep->e_state == ENTRY_STATE_DELETED || - ep->e_state == ENTRY_STATE_CREATING ) + ep->e_state == ENTRY_STATE_CREATING ) { /* free cache mutex */ pthread_mutex_unlock( &cache->c_mutex ); return( NULL ); } + /* XXX is this safe without writer lock? */ ep->e_refcnt++; /* lru */ LRU_DELETE( cache, ep ); LRU_ADD( cache, ep ); + + /* acquire reader lock */ + entry_rdwr_lock(ep, 0); + + /* re-check */ + if ( ep->e_state == ENTRY_STATE_DELETED || + ep->e_state == ENTRY_STATE_CREATING ) { + + /* XXX check that is is required */ + ep->e_refcnt--; + + /* free reader lock */ + entry_rdwr_unlock(ep, 0); + + /* free cache mutex */ + pthread_mutex_unlock( &cache->c_mutex ); + return( NULL ); + } + + if ( rw ) { + entry_rdwr_unlock(ep, 0); + entry_rdwr_lock(ep, 1); + } + + /* free cache mutex */ + pthread_mutex_unlock( &cache->c_mutex ); + + return( ep ); } /* free cache mutex */ pthread_mutex_unlock( &cache->c_mutex ); - return( ep ); + return( NULL ); } /* @@ -287,6 +388,11 @@ cache_delete_entry( { int rc; + Debug( LDAP_DEBUG_TRACE, "====> cache_delete_entry:\n", 0, 0, 0 ); + + /* XXX check for writer lock - should also check no readers pending */ + assert(pthread_rdwr_wchk_np(&e->e_rdwr)); + /* set cache mutex */ pthread_mutex_lock( &cache->c_mutex ); @@ -349,3 +455,4 @@ lru_print( struct cache *cache ) } #endif + diff --git a/servers/slapd/back-ldbm/compare.c b/servers/slapd/back-ldbm/compare.c index 4757a29b92..b0974ffdbb 100644 --- a/servers/slapd/back-ldbm/compare.c +++ b/servers/slapd/back-ldbm/compare.c @@ -6,8 +6,8 @@ #include #include "slap.h" #include "back-ldbm.h" +#include "proto-back-ldbm.h" -extern Entry *dn2entry(); extern Attribute *attr_find(); int @@ -23,33 +23,36 @@ ldbm_back_compare( char *matched; Entry *e; Attribute *a; - int i; + int i, rc; - if ( (e = dn2entry( be, dn, &matched )) == NULL ) { + /* get entry with reader lock */ + if ( (e = dn2entry_r( be, dn, &matched )) == NULL ) { send_ldap_result( conn, op, LDAP_NO_SUCH_OBJECT, matched, "" ); return( 1 ); } + /* check for deleted */ if ( ! access_allowed( be, conn, op, e, ava->ava_type, &ava->ava_value, op->o_dn, ACL_COMPARE ) ) { send_ldap_result( conn, op, LDAP_INSUFFICIENT_ACCESS, "", "" ); - cache_return_entry( &li->li_cache, e ); - return( 1 ); + rc = 1; + goto return_results; } if ( (a = attr_find( e->e_attrs, ava->ava_type )) == NULL ) { send_ldap_result( conn, op, LDAP_NO_SUCH_ATTRIBUTE, "", "" ); - cache_return_entry( &li->li_cache, e ); - return( 1 ); + rc = 1; + goto return_results; } - if ( value_find( a->a_vals, &ava->ava_value, a->a_syntax, 1 ) == 0 ) { + if ( value_find( a->a_vals, &ava->ava_value, a->a_syntax, 1 ) == 0 ) send_ldap_result( conn, op, LDAP_COMPARE_TRUE, "", "" ); - cache_return_entry( &li->li_cache, e ); - return( 0 ); - } + else + send_ldap_result( conn, op, LDAP_COMPARE_FALSE, "", "" ); - send_ldap_result( conn, op, LDAP_COMPARE_FALSE, "", "" ); - cache_return_entry( &li->li_cache, e ); - return( 0 ); + rc = 0; + +return_results:; + cache_return_entry_r( &li->li_cache, e ); + return( rc ); } diff --git a/servers/slapd/back-ldbm/delete.c b/servers/slapd/back-ldbm/delete.c index c773929ffb..b6ffa79e0e 100644 --- a/servers/slapd/back-ldbm/delete.c +++ b/servers/slapd/back-ldbm/delete.c @@ -6,8 +6,8 @@ #include #include "slap.h" #include "back-ldbm.h" +#include "proto-back-ldbm.h" -extern Entry *dn2entry(); extern Attribute *attr_find(); int @@ -22,7 +22,12 @@ ldbm_back_delete( char *matched = NULL; Entry *e; - if ( (e = dn2entry( be, dn, &matched )) == NULL ) { + Debug(LDAP_DEBUG_ARGS, "==> ldbm_back_delete: %s\n", dn, 0, 0); + + /* get entry with writer lock */ + if ( (e = dn2entry_w( be, dn, &matched )) == NULL ) { + Debug(LDAP_DEBUG_ARGS, "<=- ldbm_back_delete: no such object %s\n", + dn, 0, 0); send_ldap_result( conn, op, LDAP_NO_SUCH_OBJECT, matched, "" ); if ( matched != NULL ) { free( matched ); @@ -30,38 +35,63 @@ ldbm_back_delete( return( -1 ); } + Debug (LDAP_DEBUG_TRACE, + "rdwr_Xchk: readers_reading: %d writer_writing: %d\n", + e->e_rdwr.readers_reading, e->e_rdwr.writer_writing, 0); + + /* check for deleted */ + if ( has_children( be, e ) ) { + Debug(LDAP_DEBUG_ARGS, "<=- ldbm_back_delete: non leaf %s\n", + dn, 0, 0); send_ldap_result( conn, op, LDAP_NOT_ALLOWED_ON_NONLEAF, "", "" ); - cache_return_entry( &li->li_cache, e ); - return( -1 ); + goto error_return; } if ( ! access_allowed( be, conn, op, e, "entry", NULL, op->o_dn, ACL_WRITE ) ) { + Debug(LDAP_DEBUG_ARGS, + "<=- ldbm_back_delete: insufficient access %s\n", + dn, 0, 0); send_ldap_result( conn, op, LDAP_INSUFFICIENT_ACCESS, "", "" ); - cache_return_entry( &li->li_cache, e ); - return( -1 ); + goto error_return; } + Debug (LDAP_DEBUG_TRACE, + "rdwr_Xchk: readers_reading: %d writer_writing: %d\n", + e->e_rdwr.readers_reading, e->e_rdwr.writer_writing, 0); + /* XXX delete from parent's id2children entry XXX */ /* delete from dn2id mapping */ if ( dn2id_delete( be, e->e_dn ) != 0 ) { + Debug(LDAP_DEBUG_ARGS, + "<=- ldbm_back_delete: operations error %s\n", + dn, 0, 0); send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, "", "" ); - cache_return_entry( &li->li_cache, e ); - return( -1 ); + goto error_return; } /* delete from disk and cache */ if ( id2entry_delete( be, e ) != 0 ) { + Debug(LDAP_DEBUG_ARGS, + "<=- ldbm_back_delete: operations error %s\n", + dn, 0, 0); send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, "", "" ); - cache_return_entry( &li->li_cache, e ); - return( -1 ); + goto error_return; } - cache_return_entry( &li->li_cache, e ); + + /* free entry and writer lock */ + cache_return_entry_w( &li->li_cache, e ); send_ldap_result( conn, op, LDAP_SUCCESS, "", "" ); return( 0 ); + +error_return:; + /* free entry and writer lock */ + cache_return_entry_w( &li->li_cache, e ); + + return( -1 ); } diff --git a/servers/slapd/back-ldbm/dn2id.c b/servers/slapd/back-ldbm/dn2id.c index c4116086b0..0a7edac280 100644 --- a/servers/slapd/back-ldbm/dn2id.c +++ b/servers/slapd/back-ldbm/dn2id.c @@ -6,10 +6,9 @@ #include #include "slap.h" #include "back-ldbm.h" +#include "proto-back-ldbm.h" extern struct dbcache *ldbm_cache_open(); -extern Entry *cache_find_entry_dn(); -extern Entry *id2entry(); extern char *dn_parent(); extern Datum ldbm_cache_fetch(); @@ -20,9 +19,15 @@ dn2id_add( ID id ) { - int rc; + int rc, flags; struct dbcache *db; Datum key, data; + struct ldbminfo *li = (struct ldbminfo *) be->be_private; + +#ifdef LDBM_USE_DB2 + memset( &key, 0, sizeof( key ) ); + memset( &data, 0, sizeof( data ) ); +#endif Debug( LDAP_DEBUG_TRACE, "=> dn2id_add( \"%s\", %ld )\n", dn, id, 0 ); @@ -41,7 +46,10 @@ dn2id_add( data.dptr = (char *) &id; data.dsize = sizeof(ID); - rc = ldbm_cache_store( db, key, data, LDBM_INSERT ); + flags = LDBM_INSERT; + if ( li->li_flush_wrt ) flags |= LDBM_SYNC; + + rc = ldbm_cache_store( db, key, data, flags ); free( dn ); ldbm_cache_close( be, db ); @@ -58,31 +66,31 @@ dn2id( { struct ldbminfo *li = (struct ldbminfo *) be->be_private; struct dbcache *db; - Entry *e; ID id; Datum key, data; - Debug( LDAP_DEBUG_TRACE, "=> dn2id( \"%s\" )\n", dn, 0, 0 ); +#ifdef LDBM_USE_DB2 + memset( &key, 0, sizeof( key ) ); + memset( &data, 0, sizeof( data ) ); +#endif dn = strdup( dn ); + Debug( LDAP_DEBUG_TRACE, "=> dn2id( \"%s\" )\n", dn, 0, 0 ); dn_normalize_case( dn ); /* first check the cache */ - if ( (e = cache_find_entry_dn( &li->li_cache, dn )) != NULL ) { - id = e->e_id; + if ( (id = cache_find_entry_dn2id( be, &li->li_cache, dn )) != NOID ) { free( dn ); - Debug( LDAP_DEBUG_TRACE, "<= dn2id %d (in cache)\n", e->e_id, - 0, 0 ); - cache_return_entry( &li->li_cache, e ); - + Debug( LDAP_DEBUG_TRACE, "<= dn2id %d (in cache)\n", id, + 0, 0 ); return( id ); } if ( (db = ldbm_cache_open( be, "dn2id", LDBM_SUFFIX, LDBM_WRCREAT )) - == NULL ) { + == NULL ) { free( dn ); Debug( LDAP_DEBUG_ANY, "<= dn2id could not open dn2id%s\n", - LDBM_SUFFIX, 0, 0 ); + LDBM_SUFFIX, 0, 0 ); return( NOID ); } @@ -118,6 +126,10 @@ dn2id_delete( Datum key; int rc; +#ifdef LDBM_USE_DB2 + memset( &key, 0, sizeof( key ) ); +#endif + Debug( LDAP_DEBUG_TRACE, "=> dn2id_delete( \"%s\" )\n", dn, 0, 0 ); if ( (db = ldbm_cache_open( be, "dn2id", LDBM_SUFFIX, LDBM_WRCREAT )) @@ -145,11 +157,12 @@ dn2id_delete( * entry. */ -Entry * +static Entry * dn2entry( Backend *be, char *dn, - char **matched + char **matched, + int rw ) { struct ldbminfo *li = (struct ldbminfo *) be->be_private; @@ -157,8 +170,12 @@ dn2entry( Entry *e; char *pdn; - if ( (id = dn2id( be, dn )) != NOID && (e = id2entry( be, id )) - != NULL ) { + Debug(LDAP_DEBUG_TRACE, "dn2entry_%s: dn: %s\n", + rw ? "w" : "r", dn, 0); + + if ( (id = dn2id( be, dn )) != NOID && + (e = id2entry( be, id, rw )) != NULL ) + { return( e ); } *matched = NULL; @@ -170,9 +187,11 @@ dn2entry( /* entry does not exist - see how much of the dn does exist */ if ( (pdn = dn_parent( be, dn )) != NULL ) { - if ( (e = dn2entry( be, pdn, matched )) != NULL ) { + /* get entry with reader lock */ + if ( (e = dn2entry_r( be, pdn, matched )) != NULL ) { *matched = pdn; - cache_return_entry( &li->li_cache, e ); + /* free entry with reader lock */ + cache_return_entry_r( &li->li_cache, e ); } else { free( pdn ); } @@ -180,3 +199,39 @@ dn2entry( return( NULL ); } + +#if 0 + if (e->e_state == ENTRY_STATE_DELETED) + continue; + + if (strcmp(dn, e->e_dn) != 0) + continue; + + /* return locked entry entry */ + return(e); + } +} +#endif + +Entry * +dn2entry_r( + Backend *be, + char *dn, + char **matched +) +{ + return( dn2entry( be, dn, matched, 0 ) ); +} + +Entry * +dn2entry_w( + Backend *be, + char *dn, + char **matched +) +{ + return( dn2entry( be, dn, matched, 1 ) ); +} + + + diff --git a/servers/slapd/back-ldbm/group.c b/servers/slapd/back-ldbm/group.c new file mode 100644 index 0000000000..8ada479ea4 --- /dev/null +++ b/servers/slapd/back-ldbm/group.c @@ -0,0 +1,91 @@ +/* compare.c - ldbm backend compare routine */ + +#include +#include +#include +#include +#include "slap.h" +#include "back-ldbm.h" +#include "proto-back-ldbm.h" + +extern Attribute *attr_find(); + + +#ifdef ACLGROUP +/* return 0 IFF edn is a value in uniqueMember attribute + * of entry with bdn AND that entry has an objectClass + * value of groupOfUniqueNames + */ +int +ldbm_back_group( + Backend *be, + char *bdn, + char *edn +) +{ + struct ldbminfo *li = (struct ldbminfo *) be->be_private; + Entry *e; + char *matched; + Attribute *objectClass; + Attribute *uniqueMember; + int rc; + + Debug( LDAP_DEBUG_TRACE, "=> ldbm_back_group: bdn: %s\n", bdn, 0, 0 ); + Debug( LDAP_DEBUG_TRACE, "=> ldbm_back_group: edn: %s\n", edn, 0, 0 ); + + /* can we find bdn entry with reader lock */ + if ((e = dn2entry_r(be, bdn, &matched )) == NULL) { + Debug( LDAP_DEBUG_TRACE, "=> ldbm_back_group: cannot find bdn: %s matched: %x\n", bdn, matched, 0 ); + if (matched != NULL) + free(matched); + return( 1 ); + } + Debug( LDAP_DEBUG_ARGS, "=> ldbm_back_group: found bdn: %s matched: %x\n", bdn, matched, 0 ); + + /* check for deleted */ + + /* find it's objectClass and uniqueMember attribute values + * make sure this is a group entry + * finally test if we can find edn in the uniqueMember attribute value list * + */ + + rc = 1; + if ((objectClass = attr_find(e->e_attrs, "objectclass")) == NULL) { + Debug( LDAP_DEBUG_TRACE, "<= ldbm_back_group: failed to find objectClass\n", 0, 0, 0 ); + } + else if ((uniqueMember = attr_find(e->e_attrs, "uniquemember")) == NULL) { + Debug( LDAP_DEBUG_TRACE, "<= ldbm_back_group: failed to find uniqueMember\n", 0, 0, 0 ); + } + else { + struct berval bvObjectClass; + struct berval bvUniqueMembers; + + Debug( LDAP_DEBUG_ARGS, "<= ldbm_back_group: found objectClass and uniqueMembers\n", 0, 0, 0 ); + + bvObjectClass.bv_val = "groupofuniquenames"; + bvObjectClass.bv_len = strlen( bvObjectClass.bv_val ); + bvUniqueMembers.bv_val = edn; + bvUniqueMembers.bv_len = strlen( edn ); + + if (value_find(objectClass->a_vals, &bvObjectClass, SYNTAX_CIS, 1) != 0) { + Debug( LDAP_DEBUG_TRACE, "<= ldbm_back_group: failed to find objectClass in groupOfUniqueNames\n", + 0, 0, 0 ); + } + else if (value_find(uniqueMember->a_vals, &bvUniqueMembers, SYNTAX_CIS, 1) != 0) { + Debug( LDAP_DEBUG_ACL, "<= ldbm_back_group: %s not in %s: groupOfUniqueNames\n", + edn, bdn, 0 ); + } + else { + Debug( LDAP_DEBUG_ACL, "<= ldbm_back_group: %s is in %s: groupOfUniqueNames\n", + edn, bdn, 0 ); + rc = 0; + } + } + + /* free entry and reader lock */ + cache_return_entry_r( &li->li_cache, e ); + Debug( LDAP_DEBUG_ARGS, "ldbm_back_group: rc: %d\n", rc, 0, 0 ); + return(rc); +} +#endif + diff --git a/servers/slapd/back-ldbm/id2entry.c b/servers/slapd/back-ldbm/id2entry.c index fbda3c9952..38522cb54a 100644 --- a/servers/slapd/back-ldbm/id2entry.c +++ b/servers/slapd/back-ldbm/id2entry.c @@ -10,7 +10,6 @@ extern struct dbcache *ldbm_cache_open(); extern Datum ldbm_cache_fetch(); extern char *dn_parent(); extern Entry *str2entry(); -extern Entry *cache_find_entry_id(); extern char *entry2str(); extern pthread_mutex_t entry2str_mutex; @@ -20,7 +19,12 @@ id2entry_add( Backend *be, Entry *e ) struct ldbminfo *li = (struct ldbminfo *) be->be_private; struct dbcache *db; Datum key, data; - int len, rc; + int len, rc, flags; + +#ifdef LDBM_USE_DB2 + memset( &key, 0, sizeof( key ) ); + memset( &data, 0, sizeof( data ) ); +#endif Debug( LDAP_DEBUG_TRACE, "=> id2entry_add( %d, \"%s\" )\n", e->e_id, e->e_dn, 0 ); @@ -39,8 +43,10 @@ id2entry_add( Backend *be, Entry *e ) data.dptr = entry2str( e, &len, 1 ); data.dsize = len + 1; - /* store it - LDBM_SYNC ensures id2entry is always consistent */ - rc = ldbm_cache_store( db, key, data, LDBM_REPLACE|LDBM_SYNC ); + /* store it */ + flags = LDBM_REPLACE; + if ( li->li_flush_wrt ) flags != LDBM_SYNC; + rc = ldbm_cache_store( db, key, data, flags ); pthread_mutex_unlock( &entry2str_mutex ); @@ -48,6 +54,8 @@ id2entry_add( Backend *be, Entry *e ) (void) cache_add_entry_lock( &li->li_cache, e, 0 ); Debug( LDAP_DEBUG_TRACE, "<= id2entry_add %d\n", rc, 0, 0 ); + + /* XXX should entries be born locked, i.e. apply writer lock here? */ return( rc ); } @@ -62,8 +70,20 @@ id2entry_delete( Backend *be, Entry *e ) Debug( LDAP_DEBUG_TRACE, "=> id2entry_delete( %d, \"%s\" )\n", e->e_id, e->e_dn, 0 ); + /* XXX - check for writer lock - should also check no reader pending */ + assert(pthread_rdwr_wchk_np(&e->e_rdwr)); + +#ifdef LDBM_USE_DB2 + memset( &key, 0, sizeof( key ) ); +#endif + + /* XXX - check for writer lock - should also check no reader pending */ + Debug (LDAP_DEBUG_TRACE, + "rdwr_Xchk: readers_reading: %d writer_writing: %d\n", + e->e_rdwr.readers_reading, e->e_rdwr.writer_writing, 0); + if ( (db = ldbm_cache_open( be, "id2entry", LDBM_SUFFIX, LDBM_WRCREAT )) - == NULL ) { + == NULL ) { Debug( LDAP_DEBUG_ANY, "Could not open/create id2entry%s\n", LDBM_SUFFIX, 0, 0 ); return( -1 ); @@ -85,24 +105,31 @@ id2entry_delete( Backend *be, Entry *e ) return( rc ); } +/* XXX returns entry with reader/writer lock */ Entry * -id2entry( Backend *be, ID id ) +id2entry( Backend *be, ID id, int rw ) { struct ldbminfo *li = (struct ldbminfo *) be->be_private; struct dbcache *db; Datum key, data; Entry *e; - Debug( LDAP_DEBUG_TRACE, "=> id2entry( %ld )\n", id, 0, 0 ); +#ifdef LDBM_USE_DB2 + memset( &key, 0, sizeof( key ) ); + memset( &data, 0, sizeof( data ) ); +#endif - if ( (e = cache_find_entry_id( &li->li_cache, id )) != NULL ) { - Debug( LDAP_DEBUG_TRACE, "<= id2entry 0x%x (cache)\n", e, 0, - 0 ); + Debug( LDAP_DEBUG_TRACE, "=> id2entry_%s( %ld )\n", + rw ? "w" : "r", id, 0 ); + + if ( (e = cache_find_entry_id( &li->li_cache, id, rw )) != NULL ) { + Debug( LDAP_DEBUG_TRACE, "<= id2entry_%s 0x%x (cache)\n", + rw ? "w" : "r", e, 0 ); return( e ); } if ( (db = ldbm_cache_open( be, "id2entry", LDBM_SUFFIX, LDBM_WRCREAT )) - == NULL ) { + == NULL ) { Debug( LDAP_DEBUG_ANY, "Could not open id2entry%s\n", LDBM_SUFFIX, 0, 0 ); return( NULL ); @@ -114,20 +141,47 @@ id2entry( Backend *be, ID id ) data = ldbm_cache_fetch( db, key ); if ( data.dptr == NULL ) { - Debug( LDAP_DEBUG_TRACE, "<= id2entry( %ld ) not found\n", id, - 0, 0 ); + Debug( LDAP_DEBUG_TRACE, "<= id2entry_%s( %ld ) not found\n", + rw ? "w" : "r", id, 0 ); ldbm_cache_close( be, db ); return( NULL ); } - if ( (e = str2entry( data.dptr )) != NULL ) { - e->e_id = id; - (void) cache_add_entry_lock( &li->li_cache, e, 0 ); - } + e = str2entry( data.dptr ); ldbm_datum_free( db->dbc_db, data ); ldbm_cache_close( be, db ); - Debug( LDAP_DEBUG_TRACE, "<= id2entry( %ld ) 0x%x (disk)\n", id, e, 0 ); + if ( e == NULL ) { + Debug( LDAP_DEBUG_TRACE, "<= id2entry_%s( %ld ) (failed)\n", + rw ? "w" : "r", id, 0 ); + return( NULL ); + } + + /* acquire required reader/writer lock */ + if (entry_rdwr_lock(e, rw)) { + /* XXX set DELETE flag?? */ + entry_free(e); + return(NULL); + } + + e->e_id = id; + (void) cache_add_entry_lock( &li->li_cache, e, 0 ); + + Debug( LDAP_DEBUG_TRACE, "<= id2entry_%s( %ld ) (disk)\n", + rw ? "w" : "r", id, 0 ); return( e ); } + +Entry * +id2entry_r( Backend *be, ID id ) +{ + return( id2entry( be, id, 0 ) ); +} + +Entry * +id2entry_2( Backend *be, ID id ) +{ + return( id2entry( be, id, 1 ) ); +} + diff --git a/servers/slapd/back-ldbm/kerberos.c b/servers/slapd/back-ldbm/kerberos.c index d22553c659..d07138bed7 100644 --- a/servers/slapd/back-ldbm/kerberos.c +++ b/servers/slapd/back-ldbm/kerberos.c @@ -8,12 +8,15 @@ #include "back-ldbm.h" #ifdef KERBEROS -#include "krb.h" +#ifdef KERBEROS_V +#include +#else +#include +#endif /* KERBEROS_V */ #define LDAP_KRB_PRINCIPAL "ldapserver" extern char *ldap_srvtab; -extern Entry *dn2entry(); extern Attribute *attr_find(); krbv4_ldap_auth( diff --git a/servers/slapd/back-ldbm/modify.c b/servers/slapd/back-ldbm/modify.c index 3fa6c61a92..df94146736 100644 --- a/servers/slapd/back-ldbm/modify.c +++ b/servers/slapd/back-ldbm/modify.c @@ -6,9 +6,9 @@ #include #include "slap.h" #include "back-ldbm.h" +#include "proto-back-ldbm.h" extern int global_schemacheck; -extern Entry *dn2entry(); extern Attribute *attr_find(); static int add_values(); @@ -30,7 +30,9 @@ ldbm_back_modify( int i, err, modtype; LDAPMod *mod; - if ( (e = dn2entry( be, dn, &matched )) == NULL ) { + Debug(LDAP_DEBUG_ARGS, "ldbm_back_modify:\n", 0, 0, 0); + + if ( (e = dn2entry_w( be, dn, &matched )) == NULL ) { send_ldap_result( conn, op, LDAP_NO_SUCH_OBJECT, matched, NULL ); if ( matched != NULL ) { @@ -38,12 +40,14 @@ ldbm_back_modify( } return( -1 ); } + + /* check for deleted */ + /* lock entry */ if ( (err = acl_check_mods( be, conn, op, e, mods )) != LDAP_SUCCESS ) { send_ldap_result( conn, op, err, NULL, NULL ); - cache_return_entry( &li->li_cache, e ); - return( -1 ); + goto error_return; } for ( mod = mods; mod != NULL; mod = mod->mod_next ) { @@ -64,55 +68,52 @@ ldbm_back_modify( if ( err != LDAP_SUCCESS ) { /* unlock entry, delete from cache */ send_ldap_result( conn, op, err, NULL, NULL ); - cache_return_entry( &li->li_cache, e ); - return( -1 ); + goto error_return; } } + /* check that the entry still obeys the schema */ + if ( global_schemacheck && oc_schema_check( e ) != 0 ) { + Debug( LDAP_DEBUG_ANY, "entry failed schema check\n", 0, 0, 0 ); + send_ldap_result( conn, op, LDAP_OBJECT_CLASS_VIOLATION, NULL, NULL ); + goto error_return; + } + /* check for abandon */ pthread_mutex_lock( &op->o_abandonmutex ); if ( op->o_abandon ) { pthread_mutex_unlock( &op->o_abandonmutex ); - cache_return_entry( &li->li_cache, e ); - return( -1 ); + goto error_return; } pthread_mutex_unlock( &op->o_abandonmutex ); - /* check that the entry still obeys the schema */ - if ( global_schemacheck && oc_schema_check( e ) != 0 ) { - send_ldap_result( conn, op, LDAP_OBJECT_CLASS_VIOLATION, NULL, - NULL ); - cache_return_entry( &li->li_cache, e ); - return( -1 ); - } - /* modify indexes */ if ( index_add_mods( be, mods, e->e_id ) != 0 ) { send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL, NULL ); - cache_return_entry( &li->li_cache, e ); - return( -1 ); + goto error_return; } /* check for abandon */ pthread_mutex_lock( &op->o_abandonmutex ); if ( op->o_abandon ) { pthread_mutex_unlock( &op->o_abandonmutex ); - cache_return_entry( &li->li_cache, e ); - return( -1 ); + goto error_return; } pthread_mutex_unlock( &op->o_abandonmutex ); /* change the entry itself */ if ( id2entry_add( be, e ) != 0 ) { send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL, NULL ); - cache_return_entry( &li->li_cache, e ); - return( -1 ); + goto error_return; } send_ldap_result( conn, op, LDAP_SUCCESS, NULL, NULL ); - cache_return_entry( &li->li_cache, e ); - + cache_return_entry_w( &li->li_cache, e ); return( 0 ); + +error_return:; + cache_return_entry_w( &li->li_cache, e ); + return( -1 ); } static int diff --git a/servers/slapd/back-ldbm/modrdn.c b/servers/slapd/back-ldbm/modrdn.c index fcd9fcc35a..26c96709ae 100644 --- a/servers/slapd/back-ldbm/modrdn.c +++ b/servers/slapd/back-ldbm/modrdn.c @@ -6,8 +6,8 @@ #include #include "slap.h" #include "back-ldbm.h" +#include "proto-back-ldbm.h" -extern Entry *dn2entry(); extern char *dn_parent(); int @@ -24,10 +24,12 @@ ldbm_back_modrdn( char *matched; char *pdn, *newdn, *p; char sep[2]; - Entry *e, *e2; + Entry *e; matched = NULL; - if ( (e = dn2entry( be, dn, &matched )) == NULL ) { + + /* get entry with writer lock */ + if ( (e = dn2entry_w( be, dn, &matched )) == NULL ) { send_ldap_result( conn, op, LDAP_NO_SUCH_OBJECT, matched, "" ); if ( matched != NULL ) { free( matched ); @@ -61,17 +63,12 @@ ldbm_back_modrdn( } (void) dn_normalize( newdn ); - matched = NULL; - if ( (e2 = dn2entry( be, newdn, &matched )) != NULL ) { + /* get entry with writer lock */ + if ( (dn2id ( be, newdn ) ) != NOID ) { free( newdn ); free( pdn ); send_ldap_result( conn, op, LDAP_ALREADY_EXISTS, NULL, NULL ); - cache_return_entry( &li->li_cache, e2 ); - cache_return_entry( &li->li_cache, e ); - return( -1 ); - } - if ( matched != NULL ) { - free( matched ); + goto error_return; } /* check for abandon */ @@ -80,9 +77,7 @@ ldbm_back_modrdn( pthread_mutex_unlock( &op->o_abandonmutex ); free( newdn ); free( pdn ); - cache_return_entry( &li->li_cache, e2 ); - cache_return_entry( &li->li_cache, e ); - return( -1 ); + goto error_return; } pthread_mutex_unlock( &op->o_abandonmutex ); @@ -91,8 +86,7 @@ ldbm_back_modrdn( free( newdn ); free( pdn ); send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL, NULL ); - cache_return_entry( &li->li_cache, e ); - return( -1 ); + goto error_return; } /* delete old one */ @@ -100,8 +94,7 @@ ldbm_back_modrdn( free( newdn ); free( pdn ); send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL, NULL ); - cache_return_entry( &li->li_cache, e ); - return( -1 ); + goto error_return; } (void) cache_delete_entry( &li->li_cache, e ); @@ -120,13 +113,19 @@ ldbm_back_modrdn( /* id2entry index */ if ( id2entry_add( be, e ) != 0 ) { entry_free( e ); - send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, "", "" ); - return( -1 ); + goto error_return; } free( pdn ); - cache_return_entry( &li->li_cache, e ); + + /* free entry and writer lock */ + cache_return_entry_w( &li->li_cache, e ); send_ldap_result( conn, op, LDAP_SUCCESS, NULL, NULL ); return( 0 ); + +error_return: + /* free entry and writer lock */ + cache_return_entry_w( &li->li_cache, e ); + return( -1 ); } diff --git a/servers/slapd/back-ldbm/proto-back-ldbm.h b/servers/slapd/back-ldbm/proto-back-ldbm.h index acc69ca33c..1bc9fdd0e1 100644 --- a/servers/slapd/back-ldbm/proto-back-ldbm.h +++ b/servers/slapd/back-ldbm/proto-back-ldbm.h @@ -15,10 +15,11 @@ void attr_index_config( struct ldbminfo *li, char *fname, int lineno, */ void cache_set_state( struct cache *cache, Entry *e, int state ); -void cache_return_entry( struct cache *cache, Entry *e ); +void cache_return_entry_r( struct cache *cache, Entry *e ); +void cache_return_entry_w( struct cache *cache, Entry *e ); int cache_add_entry_lock( struct cache *cache, Entry *e, int state ); -Entry * cache_find_entry_dn( struct cache *cache, char *dn ); -Entry * cache_find_entry_id( struct cache *cache, ID id ); +ID cache_find_entry_dn2id( Backend *be, struct cache *cache, char *dn ); +Entry * cache_find_entry_id( struct cache *cache, ID id, int rw ); int cache_delete_entry( struct cache *cache, Entry *e ); /* @@ -40,7 +41,9 @@ int ldbm_cache_delete( struct dbcache *db, Datum key ); int dn2id_add( Backend *be, char *dn, ID id ); ID dn2id( Backend *be, char *dn ); int dn2id_delete( Backend *be, char *dn ); -Entry * dn2entry( Backend *be, char *dn, char **matched ); +/*Entry * dn2entry( Backend *be, char *dn, char **matched );*/ +Entry * dn2entry_r( Backend *be, char *dn, char **matched ); +Entry * dn2entry_w( Backend *be, char *dn, char **matched ); /* * filterindex.c @@ -61,7 +64,9 @@ int has_children( Backend *be, Entry *p ); int id2entry_add( Backend *be, Entry *e ); int id2entry_delete( Backend *be, Entry *e ); -Entry * id2entry( Backend *be, ID id ); +Entry * id2entry( Backend *be, ID id, int rw ); +Entry * id2entry_r( Backend *be, ID id ); +Entry * id2entry_w( Backend *be, ID id ); /* * idl.c diff --git a/servers/slapd/back-ldbm/search.c b/servers/slapd/back-ldbm/search.c index 6a53be4f11..19dafe4c01 100644 --- a/servers/slapd/back-ldbm/search.c +++ b/servers/slapd/back-ldbm/search.c @@ -6,14 +6,12 @@ #include #include "slap.h" #include "back-ldbm.h" +#include "proto-back-ldbm.h" extern time_t currenttime; extern pthread_mutex_t currenttime_mutex; -extern ID dn2id(); extern IDList *idl_alloc(); -extern Entry *id2entry(); -extern Entry *dn2entry(); extern Attribute *attr_find(); extern IDList *filter_candidates(); extern char *ch_realloc(); @@ -62,6 +60,8 @@ ldbm_back_search( char *rbuf, *rcur, *r; int nentries = 0; + Debug(LDAP_DEBUG_ARGS, "=> ldbm_back_search\n", 0, 0, 0); + if ( tlimit == 0 && be_isroot( be, op->o_dn ) ) { tlimit = -1; /* allow root to set no limit */ } else { @@ -139,10 +139,9 @@ ldbm_back_search( } pthread_mutex_unlock( ¤ttime_mutex ); - /* get the entry */ - if ( (e = id2entry( be, id )) == NULL ) { - Debug( LDAP_DEBUG_ARGS, "candidate %d not found\n", id, - 0, 0 ); + /* get the entry with reader lock */ + if ( (e = id2entry_r( be, id )) == NULL ) { + Debug( LDAP_DEBUG_ARGS, "candidate %d not found\n", id, 0, 0 ); continue; } @@ -152,14 +151,14 @@ ldbm_back_search( * here since it's only a candidate anyway. */ if ( e->e_dn != NULL && strncasecmp( e->e_dn, "ref=", 4 ) - == 0 && (ref = attr_find( e->e_attrs, "ref" )) != NULL && - scope == LDAP_SCOPE_SUBTREE ) + == 0 && (ref = attr_find( e->e_attrs, "ref" )) != NULL && + scope == LDAP_SCOPE_SUBTREE ) { int i, len; if ( ref->a_vals == NULL ) { Debug( LDAP_DEBUG_ANY, "null ref in (%s)\n", 0, - 0, 0 ); + 0, 0 ); } else { for ( i = 0; ref->a_vals[i] != NULL; i++ ) { /* referral + newline + null */ @@ -200,7 +199,7 @@ ldbm_back_search( if ( scopeok ) { /* check size limit */ if ( --slimit == -1 ) { - cache_return_entry( &li->li_cache, e ); + cache_return_entry_r( &li->li_cache, e ); send_ldap_search_result( conn, op, LDAP_SIZELIMIT_EXCEEDED, NULL, nrefs > 0 ? rbuf : NULL, nentries ); @@ -217,7 +216,7 @@ ldbm_back_search( case 1: /* entry not sent */ break; case -1: /* connection closed */ - cache_return_entry( &li->li_cache, e ); + cache_return_entry_r( &li->li_cache, e ); idl_free( candidates ); free( rbuf ); return( 0 ); @@ -226,7 +225,10 @@ ldbm_back_search( } } - cache_return_entry( &li->li_cache, e ); + if( e == NULL ) { + /* free reader lock */ + cache_return_entry_r( &li->li_cache, e ); + } pthread_yield(); } @@ -262,16 +264,24 @@ base_candidates( IDList *idl; Entry *e; + Debug(LDAP_DEBUG_TRACE, "base_candidates: base: %s\n", base, 0, 0); + *err = LDAP_SUCCESS; - if ( (e = dn2entry( be, base, matched )) == NULL ) { + + /* get entry with reader lock */ + if ( (e = dn2entry_r( be, base, matched )) == NULL ) { *err = LDAP_NO_SUCH_OBJECT; return( NULL ); } + /* check for deleted */ + idl = idl_alloc( 1 ); idl_insert( &idl, e->e_id, 1 ); - cache_return_entry( &li->li_cache, e ); + + /* free reader lock */ + cache_return_entry_r( &li->li_cache, e ); return( idl ); } @@ -295,11 +305,14 @@ onelevel_candidates( char buf[20]; IDList *candidates; + Debug(LDAP_DEBUG_TRACE, "onelevel_candidates: base: %s\n", base, 0, 0); + *err = LDAP_SUCCESS; e = NULL; - /* get the base object */ - if ( base != NULL && *base != '\0' && (e = dn2entry( be, base, - matched )) == NULL ) { + /* get the base object with reader lock */ + if ( base != NULL && *base != '\0' && + (e = dn2entry_r( be, base, matched )) == NULL ) + { *err = LDAP_NO_SUCH_OBJECT; return( NULL ); } @@ -329,6 +342,8 @@ onelevel_candidates( f->f_and->f_next = NULL; filter_free( f ); + /* free entry and reader lock */ + cache_return_entry_r( &li->li_cache, e ); return( candidates ); } @@ -351,6 +366,9 @@ subtree_candidates( Filter *f; IDList *candidates; + Debug(LDAP_DEBUG_TRACE, "subtree_candidates: base: %s\n", + base ? base : "NULL", 0, 0); + /* * get the base object - unless we already have it (from one-level). * also, unless this is a one-level search or a subtree search @@ -365,20 +383,26 @@ subtree_candidates( *err = LDAP_SUCCESS; f = NULL; if ( lookupbase ) { - if ( base != NULL && *base != '\0' && (e = dn2entry( be, base, - matched )) == NULL ) { + if ( base != NULL && *base != '\0' && + (e = dn2entry_r( be, base, matched )) == NULL ) + { *err = LDAP_NO_SUCH_OBJECT; return( NULL ); } + if (e) { + cache_return_entry_r( &li->li_cache, e ); + } + f = (Filter *) ch_malloc( sizeof(Filter) ); f->f_next = NULL; f->f_choice = LDAP_FILTER_OR; f->f_or = (Filter *) ch_malloc( sizeof(Filter) ); f->f_or->f_choice = LDAP_FILTER_EQUALITY; f->f_or->f_avtype = strdup( "objectclass" ); - f->f_or->f_avvalue.bv_val = strdup( "referral" ); - f->f_or->f_avvalue.bv_len = strlen( "referral" ); + /* Patch to use normalized uppercase */ + f->f_or->f_avvalue.bv_val = strdup( "REFERRAL" ); + f->f_or->f_avvalue.bv_len = strlen( "REFERRAL" ); f->f_or->f_next = filter; filter = f; @@ -406,9 +430,5 @@ subtree_candidates( filter_free( f ); } - if ( e != NULL ) { - cache_return_entry( &li->li_cache, e ); - } - return( candidates ); } diff --git a/servers/slapd/configinfo.c b/servers/slapd/configinfo.c index 5599193006..c1719efde8 100644 --- a/servers/slapd/configinfo.c +++ b/servers/slapd/configinfo.c @@ -40,6 +40,9 @@ config_info( Connection *conn, Operation *op ) vals[1] = NULL; e = (Entry *) ch_calloc( 1, sizeof(Entry) ); + /* initialize reader/writer lock */ + entry_rdwr_init(e); + e->e_attrs = NULL; e->e_dn = strdup( SLAPD_CONFIG_DN ); diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index 59c1d2eaf9..c15c58b24a 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -198,6 +198,9 @@ slapd_daemon( FD_ZERO( &readfds ); FD_SET( tcps, &readfds ); + zero.tv_sec = 0; + zero.tv_usec = 0; + pthread_mutex_lock( &active_threads_mutex ); Debug( LDAP_DEBUG_CONNS, "listening for connections on %d, activity on:", @@ -218,8 +221,6 @@ slapd_daemon( Debug( LDAP_DEBUG_CONNS, "\n", 0, 0, 0 ); pthread_mutex_unlock( &new_conn_mutex ); - zero.tv_sec = 0; - zero.tv_usec = 0; Debug( LDAP_DEBUG_CONNS, "before select active_threads %d\n", active_threads, 0, 0 ); #if defined(THREAD_PREEMPTIVE) || defined(NO_THREADS) diff --git a/servers/slapd/entry.c b/servers/slapd/entry.c index d5ee966b57..72ef4b1684 100644 --- a/servers/slapd/entry.c +++ b/servers/slapd/entry.c @@ -43,9 +43,12 @@ str2entry( char *s ) * or newline. */ - Debug( LDAP_DEBUG_TRACE, "=> str2entry\n", s, 0, 0 ); + Debug( LDAP_DEBUG_TRACE, "=> str2entry\n", + s ? s : "NULL", 0, 0 ); e = (Entry *) ch_calloc( 1, sizeof(Entry) ); + /* initialize reader/writer lock */ + entry_rdwr_init(e); /* check to see if there's an id included */ next = s; @@ -112,6 +115,7 @@ str2entry( char *s ) } Debug( LDAP_DEBUG_TRACE, "<= str2entry 0x%x\n", e, 0, 0 ); + return( e ); } @@ -187,6 +191,10 @@ entry_free( Entry *e ) int i; Attribute *a, *next; + /* XXX check that no reader/writer locks exist */ + assert( !pthread_rdwr_wchk_np(&e->e_rdwr) && + !pthread_rdwr_rchk_np(&e->e_rdwr) ); + if ( e->e_dn != NULL ) { free( e->e_dn ); } @@ -196,3 +204,56 @@ entry_free( Entry *e ) } free( e ); } + +int +entry_rdwr_lock(Entry *e, int rw) +{ + Debug( LDAP_DEBUG_ARGS, "entry_rdwr_%slock: ID: %ld\n", + rw ? "w" : "r", e->e_id, 0); + if (rw) + return pthread_rdwr_wlock_np(&e->e_rdwr); + else + return pthread_rdwr_rlock_np(&e->e_rdwr); +} + +int +entry_rdwr_rlock(Entry *e) +{ + return entry_rdwr_lock( e, 0 ); +} + +int +entry_rdwr_wlock(Entry *e) +{ + return entry_rdwr_lock( e, 1 ); +} + +int +entry_rdwr_unlock(Entry *e, int rw) +{ + Debug( LDAP_DEBUG_ARGS, "entry_rdwr_%sunlock: ID: %ld\n", + rw ? "w" : "r", e->e_id, 0); + if (rw) + return pthread_rdwr_wunlock_np(&e->e_rdwr); + else + return pthread_rdwr_runlock_np(&e->e_rdwr); +} + +int +entry_rdwr_runlock(Entry *e) +{ + return entry_rdwr_unlock( e, 0 ); +} + +int +entry_rdwr_wunlock(Entry *e) +{ + return entry_rdwr_unlock( e, 1 ); +} + +int +entry_rdwr_init(Entry *e) +{ + return pthread_rdwr_init_np(&e->e_rdwr, NULL); +} + diff --git a/servers/slapd/modify.c b/servers/slapd/modify.c index 6575fe36ad..dd7689cfaf 100644 --- a/servers/slapd/modify.c +++ b/servers/slapd/modify.c @@ -155,14 +155,14 @@ do_modify( */ if ( be->be_modify != NULL ) { /* do the update here */ - if ( be->be_updatedn == NULL || strcasecmp( be->be_updatedn, - op->o_dn ) == 0 ) { - if ( (be->be_lastmod == ON || be->be_lastmod == 0 && - global_lastmod == ON) && be->be_updatedn == NULL ) { + if ( be->be_updatedn == NULL || + strcasecmp( be->be_updatedn, op->o_dn ) == 0 ) { + + if ( (be->be_lastmod == ON || ( be->be_lastmod == UNDEFINED && + global_lastmod == ON ) ) && be->be_updatedn == NULL ) { add_lastmods( op, &mods ); } - if ( (*be->be_modify)( be, conn, op, odn, mods ) - == 0 ) { + if ( (*be->be_modify)( be, conn, op, odn, mods ) == 0 ) { replog( be, LDAP_REQ_MODIFY, dn, mods, 0 ); } @@ -200,7 +200,7 @@ modlist_free( static void add_lastmods( Operation *op, LDAPMod **mods ) { - char buf[20]; + char buf[22]; struct berval bv; struct berval *bvals[2]; LDAPMod **m; @@ -214,17 +214,25 @@ add_lastmods( Operation *op, LDAPMod **mods ) /* remove any attempts by the user to modify these attrs */ for ( m = mods; *m != NULL; m = &(*m)->mod_next ) { - if ( strcasecmp( (*m)->mod_type, "modifytimestamp" ) == 0 - || strcasecmp( (*m)->mod_type, "modifiersname" ) == 0 ) { - tmp = *m; - *m = (*m)->mod_next; - free( tmp->mod_type ); - if ( tmp->mod_bvalues != NULL ) { - ber_bvecfree( tmp->mod_bvalues ); - } - free( tmp ); - } - } + if ( strcasecmp( (*m)->mod_type, "modifytimestamp" ) == 0 || + strcasecmp( (*m)->mod_type, "modifiersname" ) == 0 || + strcasecmp( (*m)->mod_type, "createtimestamp" ) == 0 || + strcasecmp( (*m)->mod_type, "creatorsname" ) == 0 ) { + + Debug( LDAP_DEBUG_TRACE, + "add_lastmods: found lastmod attr: %s\n", + (*m)->mod_type, 0, 0 ); + tmp = *m; + *m = (*m)->mod_next; + free( tmp->mod_type ); + if ( tmp->mod_bvalues != NULL ) { + ber_bvecfree( tmp->mod_bvalues ); + } + free( tmp ); + if (!*m) + break; + } + } if ( op->o_dn == NULL || op->o_dn[0] == '\0' ) { bv.bv_val = "NULLDN"; @@ -243,16 +251,19 @@ add_lastmods( Operation *op, LDAPMod **mods ) *mods = tmp; pthread_mutex_lock( ¤ttime_mutex ); - ltm = localtime( ¤ttime ); - strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm ); + ltm = localtime( ¤ttime ); +#ifdef LDAP_Y2K + strftime( buf, sizeof(buf), "%Y%m%d%H%M%SZ", ltm ); +#else + strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm ); +#endif pthread_mutex_unlock( ¤ttime_mutex ); bv.bv_val = buf; bv.bv_len = strlen( bv.bv_val ); tmp = (LDAPMod *) ch_calloc( 1, sizeof(LDAPMod) ); tmp->mod_type = strdup( "modifytimestamp" ); tmp->mod_op = LDAP_MOD_REPLACE; - tmp->mod_bvalues = (struct berval **) ch_calloc( 1, - 2 * sizeof(struct berval *) ); + tmp->mod_bvalues = (struct berval **) ch_calloc( 1, 2 * sizeof(struct berval *) ); tmp->mod_bvalues[0] = ber_bvdup( &bv ); tmp->mod_next = *mods; *mods = tmp; diff --git a/servers/slapd/monitor.c b/servers/slapd/monitor.c index 7dbabc9377..a7311989ef 100644 --- a/servers/slapd/monitor.c +++ b/servers/slapd/monitor.c @@ -10,8 +10,16 @@ * is provided ``as is'' without express or implied warranty. */ +/* Revision history + * + * 5-Jun-96 jeff.hodges@stanford.edu + * Added locking of new_conn_mutex when traversing the c[] array. + * Added locking of currenttime_mutex to protect call(s) to localtime(). + */ + #include #include +#include #include #include #include "slap.h" @@ -32,18 +40,16 @@ extern time_t currenttime; extern time_t starttime; extern int num_conns; +extern pthread_mutex_t new_conn_mutex; +extern pthread_mutex_t currenttime_mutex; extern char Versionstr[]; -/* - * no mutex protection in here - take our chances! - */ - void monitor_info( Connection *conn, Operation *op ) { Entry *e; - char buf[BUFSIZ], buf2[20]; + char buf[BUFSIZ], buf2[22]; struct berval val; struct berval *vals[2]; int i, nconns, nwritewaiters, nreadwaiters; @@ -54,6 +60,8 @@ monitor_info( Connection *conn, Operation *op ) vals[1] = NULL; e = (Entry *) ch_calloc( 1, sizeof(Entry) ); + /* initialize reader/writer lock */ + entry_rdwr_init(e); e->e_attrs = NULL; e->e_dn = strdup( SLAPD_MONITOR_DN ); @@ -73,6 +81,8 @@ monitor_info( Connection *conn, Operation *op ) nconns = 0; nwritewaiters = 0; nreadwaiters = 0; + + pthread_mutex_lock( &new_conn_mutex ); for ( i = 0; i < dtblsize; i++ ) { if ( c[i].c_sb.sb_sd != -1 ) { nconns++; @@ -82,8 +92,15 @@ monitor_info( Connection *conn, Operation *op ) if ( c[i].c_gettingber ) { nreadwaiters++; } + pthread_mutex_lock( ¤ttime_mutex ); ltm = localtime( &c[i].c_starttime ); +#ifdef LDAP_Y2K + strftime( buf2, sizeof(buf2), "%Y%m%d%H%M%SZ", ltm ); +#else strftime( buf2, sizeof(buf2), "%y%m%d%H%M%SZ", ltm ); +#endif + pthread_mutex_unlock( ¤ttime_mutex ); + pthread_mutex_lock( &c[i].c_dnmutex ); sprintf( buf, "%d : %s : %ld : %ld : %s : %s%s", i, buf2, c[i].c_opsinitiated, c[i].c_opscompleted, @@ -96,6 +113,8 @@ monitor_info( Connection *conn, Operation *op ) attr_merge( e, "connection", vals ); } } + pthread_mutex_unlock( &new_conn_mutex ); + sprintf( buf, "%d", nconns ); val.bv_val = buf; val.bv_len = strlen( buf ); @@ -141,14 +160,26 @@ monitor_info( Connection *conn, Operation *op ) val.bv_len = strlen( buf ); attr_merge( e, "bytessent", vals ); - ltm = localtime( ¤ttime ); - strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm ); + pthread_mutex_lock( ¤ttime_mutex ); + ltm = localtime( ¤ttime ); +#ifdef LDAP_Y2K + strftime( buf, sizeof(buf), "%Y%m%d%H%M%SZ", ltm ); +#else + strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm ); +#endif + pthread_mutex_unlock( ¤ttime_mutex ); val.bv_val = buf; val.bv_len = strlen( buf ); attr_merge( e, "currenttime", vals ); - ltm = localtime( &starttime ); - strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm ); + pthread_mutex_lock( ¤ttime_mutex ); + ltm = localtime( &starttime ); +#ifdef LDAP_Y2K + strftime( buf, sizeof(buf), "%Y%m%d%H%M%SZ", ltm ); +#else + strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm ); +#endif + pthread_mutex_unlock( ¤ttime_mutex ); val.bv_val = buf; val.bv_len = strlen( buf ); attr_merge( e, "starttime", vals ); diff --git a/servers/slapd/proto-slap.h b/servers/slapd/proto-slap.h index a1ff6e5e75..83e4872d15 100644 --- a/servers/slapd/proto-slap.h +++ b/servers/slapd/proto-slap.h @@ -7,10 +7,13 @@ int access_allowed( Backend *be, Connection *conn, Operation *op, Entry *e, char *attr, struct berval *val, char *dn, int access ); + struct acl * acl_get_applicable( Backend *be, Operation *op, Entry *e, - char *attr ); + char *attr, char *edn, int nmatches, regmatch_t *matches ); int acl_access_allowed( struct acl *a, Backend *be, Connection *conn, Entry *e, - struct berval *val, Operation *op, int access ); + struct berval *val, Operation *op, int access, char *edn, + regmatch_t *matches ); + int acl_check_mods( Backend *be, Connection *conn, Operation *op, Entry *e, LDAPMod *mods ); @@ -104,6 +107,14 @@ Entry * str2entry( char *s ); char * entry2str( Entry *e, int *len, int printid ); void entry_free( Entry *e ); +int entry_rdwr_lock( Entry *e, int rw ); +int entry_rdwr_rlock( Entry *e ); +int entry_rdwr_wlock( Entry *e ); +int entry_rdwr_unlock( Entry *e, int rw ); +int entry_rdwr_runlock( Entry *e ); +int entry_rdwr_wunlock( Entry *e ); +int entry_rdwr_init( Entry *e ); + /* * filter.c */ diff --git a/servers/slapd/result.c b/servers/slapd/result.c index cbbf620ada..620c7ef13c 100644 --- a/servers/slapd/result.c +++ b/servers/slapd/result.c @@ -224,8 +224,7 @@ send_search_entry( Debug( LDAP_DEBUG_ANY, "ber_alloc failed\n", 0, 0, 0 ); send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL, "ber_alloc" ); - free(edn); - return( 1 ); + goto error_return; } #ifdef COMPAT30 @@ -244,8 +243,7 @@ send_search_entry( ber_free( ber, 1 ); send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL, "ber_printf dn" ); - free(edn); - return( 1 ); + goto error_return; } for ( a = e->e_attrs; a != NULL; a = a->a_next ) { @@ -280,8 +278,7 @@ send_search_entry( ber_free( ber, 1 ); send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL, "ber_printf type" ); - free(edn); - return( 1 ); + goto error_return; } if ( ! attrsonly ) { @@ -303,8 +300,7 @@ send_search_entry( send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL, "ber_printf value" ); - free(edn); - return( 1 ); + goto error_return; } } } @@ -314,8 +310,7 @@ send_search_entry( ber_free( ber, 1 ); send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL, "ber_printf type end" ); - free(edn); - return( 1 ); + goto error_return; } } @@ -393,6 +388,10 @@ send_search_entry( Debug( LDAP_DEBUG_TRACE, "<= send_search_entry\n", 0, 0, 0 ); return( rc ); + +error_return:; + free(edn); + return( 1 ); } int diff --git a/servers/slapd/slap.h b/servers/slapd/slap.h index bf0c9c8297..43f1eae8d1 100644 --- a/servers/slapd/slap.h +++ b/servers/slapd/slap.h @@ -6,10 +6,16 @@ #define LDAP_SYSLOG #include +#include +#include +#undef NDEBUG +#include + #include "avl.h" #include "lber.h" #include "ldap.h" #include "lthread.h" +#include "lthread_rdwr.h" #include "ldif.h" #define DN_DNS 0 @@ -17,6 +23,9 @@ #define ON 1 #define OFF (-1) +#define UNDEFINED 0 + +#define MAXREMATCHES 10 /* * represents an attribute value assertion (i.e., attr=value) @@ -103,6 +112,9 @@ typedef struct entry { ID e_id; /* id of this entry - this should */ /* really be private to back-ldbm */ char e_state; /* for the cache */ + + pthread_rdwr_t e_rdwr; /* reader/writer lock */ + #define ENTRY_STATE_DELETED 1 #define ENTRY_STATE_CREATING 2 int e_refcnt; /* # threads ref'ing this entry */ @@ -121,6 +133,11 @@ struct access { char *a_domainpat; char *a_dnattr; long a_access; + +#ifdef ACLGROUP + char *a_group; +#endif + #define ACL_NONE 0x01 #define ACL_COMPARE 0x02 #define ACL_SEARCH 0x04 @@ -134,6 +151,7 @@ struct access { struct acl { /* "to" part: the entries this acl applies to */ Filter *acl_filter; + regex_t acl_dnre; char *acl_dnpat; char **acl_attrs; @@ -187,6 +205,10 @@ typedef struct backend { IFP be_config; /* backend config routine */ IFP be_init; /* backend init routine */ IFP be_close; /* backend close routine */ + +#ifdef ACLGROUP + IFP be_group; /* backend group member test */ +#endif } Backend; /* From 490bb72f82606c6872ec61d035467a0a912b4de7 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 19 Oct 1998 23:51:45 +0000 Subject: [PATCH 088/148] Remove DEFS variables from Makefiles, remove bridge.h. Rely on portable.h. --- acconfig.h | 66 ++- build/top.mk | 6 +- clients/ud/Makefile.in | 1 - configure | 723 +++++++++++++------------- configure.in | 97 +--- include/avl.h | 4 + include/bridge.h | 214 -------- include/lber.h | 27 - include/ldap.h | 346 ++++++++---- include/lthread_rdwr.h | 16 +- include/portable.h.bot | 1 - include/portable.h.in | 68 ++- include/proto-lber.h | 102 ---- include/proto-ldap.h | 276 ---------- libraries/libldap/url.c | 19 +- libraries/libldbm/Makefile.in | 1 - libraries/liblthread/Makefile.in | 1 - libraries/liblutil/Makefile.in | 1 - servers/ldapd/Makefile.in | 1 - servers/slapd/Makefile.in | 1 - servers/slapd/back-ldbm/Makefile.in | 1 - servers/slapd/back-passwd/Makefile.in | 1 - servers/slapd/back-shell/Makefile.in | 1 - servers/slapd/tools/Makefile.in | 1 - servers/slurpd/Makefile.in | 1 - 25 files changed, 787 insertions(+), 1189 deletions(-) delete mode 100644 include/bridge.h delete mode 100644 include/proto-lber.h delete mode 100644 include/proto-ldap.h diff --git a/acconfig.h b/acconfig.h index cd0780d583..2e363ba7fa 100644 --- a/acconfig.h +++ b/acconfig.h @@ -9,14 +9,11 @@ #undef DECL_SYS_ERRLIST /* define if you have berkeley db */ -#undef HAVE_BERKELEY_DB2 +#undef HAVE_BERKELEY_DB /* define if you have berkeley db2 */ #undef HAVE_BERKELEY_DB2 -/* define if you have Mach CThreads */ -#undef HAVE_CTHREADS - /* define if you have crypt */ #undef HAVE_CRYPT @@ -44,6 +41,9 @@ /* define if you have NDBM */ #undef HAVE_NDBM +/* define if you have Mach CThreads */ +#undef HAVE_MACH_CTHREADS + /* define if you have a preemptive POSIX Threads implementation */ #undef HAVE_PREEMPTIVE_PTHREADS @@ -56,44 +56,80 @@ /* define if you have -ltermcap */ #undef HAVE_TERMCAP +/* define if you have -lwrap */ +#undef HAVE_TCPD + /* define this for connectionless LDAP support */ #undef LDAP_CONNECTIONLESS +/* define this to add debugging code */ +#undef LDAP_DEBUG + +/* define this for LDAP DNS support */ +#undef LDAP_DNS + /* define this to remove -lldap cache support */ #undef LDAP_NOCACHE /* define this for LDAP referrals support */ #undef LDAP_REFERRALS +/* define this for LDAP User Interface support */ +#undef LDAP_LIBUI + /* define this for ACL Group support */ #undef SLAPD_ACLGROUPS -/* define this for Reverse Lookup support */ -#undef SLAPD_RLOOKUPS +/* define this for crypt(3) password support */ +#undef SLAPD_CRYPT + +/* define this to use SLAPD LDBM backend */ +#undef SLAPD_LDBM + +/* define this for MD5 password support */ +#undef SLAPD_MD5 + +/* define this to use SLAPD passwd backend */ +#undef SLAPD_PASSWD /* define this for phonetic support */ #undef SLAPD_PHONETIC +/* define this for Reverse Lookup support */ +#undef SLAPD_RLOOKUPS + +/* define this for SHA1 password support */ +#undef SLAPD_SHA1 + /* define this to use SLAPD shell backend */ -/* #undef SLAPD_SHELL */ +#undef SLAPD_SHELL -/* define this to use SLAPD passwd backend */ -/* #undef SLAPD_PASSWD */ +/* define this to use DB2 in native mode */ +#undef LDBM_USE_DB2 -/* define this to use SLAPD LDBM backend */ -/* #undef SLAPD_LDBM */ +/* define this to use DB2 in compat185 mode */ +#undef LDBM_USE_DB2_COMPAT185 /* define this to use DBBTREE w/ LDBM backend */ -/* #undef LDBM_USE_DBBTREE */ +#undef LDBM_USE_DBBTREE /* define this to use DBHASH w/ LDBM backend */ -/* #undef LDBM_USE_DBHASH */ +#undef LDBM_USE_DBHASH /* define this to use GDBM w/ LDBM backend */ -/* #undef LDBM_USE_GDBM */ +#undef LDBM_USE_GDBM /* define this to use NDBM w/ LDBM backend */ -/* #undef LDBM_USE_NDBM */ +#undef LDBM_USE_NDBM + +/* define this if you want no termcap support */ +#undef NO_TERMCAP + +/* define this if you want no thread support */ +#undef NO_THREADS + +/* define this if the thread package is preemptive */ +#undef THREAD_PREEMPTIVE /* Leave that blank line there!! Autoheader needs it. */ diff --git a/build/top.mk b/build/top.mk index 6d36dc1d6f..a94504895f 100644 --- a/build/top.mk +++ b/build/top.mk @@ -69,19 +69,17 @@ LDAP_LIBDEPEND = $(LDAP_LIBDIR)/libldif.a $(LDAP_LIBDIR)/libldap.a $(LDAP_LIBDIR # AutoConfig generated AC_CC = @CC@ -AC_DEFS = @CPPFLAGS@ @DEFS@ @LDAP_DEFS@ +AC_DEFS = @CPPFLAGS@ @DEFS@ AC_LIBS = @LDFLAGS@ @LIBS@ AC_CFLAGS = @CFLAGS@ AC_LDFLAGS = -KRB_DEFS = @KRB_DEFS@ KRB_LIBS = @KRB_LIBS@ -TERMCAP_DEFS = @TERMCAP_DEFS@ TERMCAP_LIBS = @TERMCAP_LIBS@ # Our Defaults CC = $(AC_CC) -DEFS = $(LDAP_DEFS) $(LDAP_INCPATH) $(XINCPATH) $(XDEFS) $(AC_DEFS) +DEFS = $(LDAP_INCPATH) $(XINCPATH) $(XDEFS) $(AC_DEFS) LIBS = $(LDAP_LIBS) $(XLIBS) $(AC_LIBS) CFLAGS = $(AC_CFLAGS) $(DEFS) $(DEFINES) diff --git a/clients/ud/Makefile.in b/clients/ud/Makefile.in index 3af751457c..1c72cf0e22 100644 --- a/clients/ud/Makefile.in +++ b/clients/ud/Makefile.in @@ -9,7 +9,6 @@ PROGRAMS= ud LDAP_INCDIR= ../../include LDAP_LIBDIR= ../../libraries -XDEFS = $(TERMCAP_DEFS) XLIBS = $(TERMCAP_LIBS) ud : version.o diff --git a/configure b/configure index 931c2eefe9..afdc7fe1f5 100755 --- a/configure +++ b/configure @@ -1177,20 +1177,13 @@ fi echo "$ac_t""done" 1>&6 ## Initialize vars -LDAP_DEFS= LDAP_LIBS= -LDBM_DEFS= LDBM_LIBS= -LTHREAD_DEFS= LTHREAD_LIBS= -LUTIL_DEFS= LUTIL_LIBS= -LDAPD_DEFS= LDAPD_LIBS= -SLAPD_DEFS= SLAPD_LIBS= -SLURPD_DEFS= SLURPD_LIBS= BUILD_LDAPD=no @@ -1201,14 +1194,12 @@ BUILD_LDBM=no BUILD_PASSWD=no BUILD_SHELL=no -KRB_DEFS= KRB_LIBS= -TERMCAP_DEFS= TERMCAP_LIBS= echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1212: checking whether ln -s works" >&5 +echo "configure:1203: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1239,7 +1230,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1243: checking for a BSD compatible install" >&5 +echo "configure:1234: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1291,7 +1282,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1295: checking for $ac_word" >&5 +echo "configure:1286: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1318,7 +1309,7 @@ else fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1322: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1313: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1348,7 +1339,7 @@ fi # Extract the first word of "sendmail", so it can be a program name with args. set dummy sendmail; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1352: checking for $ac_word" >&5 +echo "configure:1343: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1380,7 +1371,7 @@ fi # Extract the first word of "vi", so it can be a program name with args. set dummy vi; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1384: checking for $ac_word" >&5 +echo "configure:1375: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1412,7 +1403,7 @@ fi # Extract the first word of "finger", so it can be a program name with args. set dummy finger; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1416: checking for $ac_word" >&5 +echo "configure:1407: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1445,7 +1436,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1449: checking for $ac_word" >&5 +echo "configure:1440: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1474,7 +1465,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1478: checking for $ac_word" >&5 +echo "configure:1469: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1522,7 +1513,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1526: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1517: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1532,11 +1523,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1556,12 +1547,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1560: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1551: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1565: checking whether we are using GNU C" >&5 +echo "configure:1556: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1570,7 +1561,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1565: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1585,7 +1576,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1589: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1580: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1613,7 +1604,7 @@ else fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1617: checking how to run the C preprocessor" >&5 +echo "configure:1608: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1628,13 +1619,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1645,13 +1636,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1675,13 +1666,13 @@ echo "$ac_t""$CPP" 1>&6 if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:1679: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:1670: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP @@ -1699,7 +1690,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -1722,9 +1713,9 @@ fi echo $ac_n "checking for AIX""... $ac_c" 1>&6 -echo "configure:1726: checking for AIX" >&5 +echo "configure:1717: checking for AIX" >&5 cat > conftest.$ac_ext <&6 -echo "configure:1750: checking for POSIXized ISC" >&5 +echo "configure:1741: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -1768,17 +1759,17 @@ fi ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 -echo "configure:1772: checking for minix/config.h" >&5 +echo "configure:1763: checking for minix/config.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1819,12 +1810,12 @@ fi echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:1823: checking for socket" >&5 +echo "configure:1814: checking for socket" >&5 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_socket=yes" else @@ -1866,7 +1857,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 -echo "configure:1870: checking for main in -lsocket" >&5 +echo "configure:1861: checking for main in -lsocket" >&5 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1874,14 +1865,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1909,7 +1900,7 @@ else fi echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6 -echo "configure:1913: checking for main in -lnet" >&5 +echo "configure:1904: checking for main in -lnet" >&5 ac_lib_var=`echo net'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1917,14 +1908,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1952,7 +1943,7 @@ else fi echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6 -echo "configure:1956: checking for main in -lnsl_s" >&5 +echo "configure:1947: checking for main in -lnsl_s" >&5 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1960,14 +1951,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl_s $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1995,7 +1986,7 @@ else fi echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:1999: checking for main in -lnsl" >&5 +echo "configure:1990: checking for main in -lnsl" >&5 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2003,14 +1994,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2038,7 +2029,7 @@ else fi echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6 -echo "configure:2042: checking for socket in -linet" >&5 +echo "configure:2033: checking for socket in -linet" >&5 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2046,7 +2037,7 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2085,7 +2076,7 @@ else fi echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6 -echo "configure:2089: checking for main in -lgen" >&5 +echo "configure:2080: checking for main in -lgen" >&5 ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2093,14 +2084,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2132,7 +2123,7 @@ fi echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6 -echo "configure:2136: checking for sigset in -lV3" >&5 +echo "configure:2127: checking for sigset in -lV3" >&5 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2140,7 +2131,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lV3 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2184,17 +2175,17 @@ if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2188: checking for $ac_hdr" >&5 +echo "configure:2179: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2223,7 +2214,7 @@ done if test $ac_cv_header_kerberosIV_krb_h = yes ; then echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6 -echo "configure:2227: checking for main in -lkrb4" >&5 +echo "configure:2218: checking for main in -lkrb4" >&5 ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2231,14 +2222,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2269,7 +2260,6 @@ fi EOF - KRB_DEFS="-DKERBEROS" KRB_LIBS="-lkrb4 -lkrb5 -ldes425" fi fi @@ -2279,17 +2269,17 @@ if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2283: checking for $ac_hdr" >&5 +echo "configure:2273: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2318,7 +2308,7 @@ done if test $ac_cv_header_krb_h = yes ; then echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6 -echo "configure:2322: checking for main in -lkrb" >&5 +echo "configure:2312: checking for main in -lkrb" >&5 ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2326,14 +2316,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lkrb -ldes $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2364,7 +2354,6 @@ fi EOF - KRB_DEFS="-DKERBEROS" KRB_LIBS="-lkrb -ldes" fi fi @@ -2377,17 +2366,17 @@ if test $ol_with_threads = auto -o $ol_with_threads = posix ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2381: checking for $ac_hdr" >&5 +echo "configure:2370: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2380: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2416,13 +2405,13 @@ done if test $ac_cv_header_pthread_h = yes ; then echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6 -echo "configure:2420: checking POSIX thread version" >&5 +echo "configure:2409: checking POSIX thread version" >&5 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -2444,7 +2433,7 @@ rm -f conftest* cat > conftest.$ac_ext < @@ -2479,13 +2468,11 @@ echo "$ac_t""$ol_cv_pthread_version" 1>&6 if test $ol_cv_pthread_version = final ; then - LTHREAD_DEFS="$LTHREAD_DEFS -DPOSIX_THREADS" - elif test $ol_cv_pthread_version = draft4 ; then + elif test $ol_cv_pthread_version = draft4 ; then cat >> confdefs.h <<\EOF #define HAVE_PTHREADS_D4 1 EOF - LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_MIT_PTHREADS" else { echo "configure: error: unknown pthread version" 1>&2; exit 1; } fi @@ -2495,7 +2482,7 @@ EOF echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 -echo "configure:2499: checking for LinuxThreads" >&5 +echo "configure:2486: checking for LinuxThreads" >&5 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2517,17 +2504,16 @@ echo "$ac_t""$ol_cv_linux_threads" 1>&6 #define HAVE_LINUX_THREADS 1 EOF - LTHREAD_DEFS="$LTHREAD_DEFS -DLINUX_THREADS" fi echo $ac_n "checking for pthread_create""... $ac_c" 1>&6 -echo "configure:2526: checking for pthread_create" >&5 +echo "configure:2512: checking for pthread_create" >&5 if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_pthread_create=yes" else @@ -2572,7 +2558,7 @@ fi if test $ol_link_threads = no ; then echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6 -echo "configure:2576: checking for pthread_create with -pthread" >&5 +echo "configure:2562: checking for pthread_create with -pthread" >&5 if eval "test \"`echo '$''{'ol_cv_pthread_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2580,7 +2566,7 @@ else save_LIBS="$LIBS" LIBS="-pthread $LIBS" cat > conftest.$ac_ext < int main() { @@ -2590,7 +2576,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_pthread_flag=yes else @@ -2615,7 +2601,7 @@ echo "$ac_t""$ol_cv_pthread_flag" 1>&6 if test $ol_link_threads = no ; then save_LIBS="$LIBS" echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:2619: checking for pthread_create in -lpthread" >&5 +echo "configure:2605: checking for pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2623,7 +2609,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2662,7 +2648,7 @@ fi if test $ol_link_threads = no ; then save_LIBS="$LIBS" echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:2666: checking for pthread_create in -lc_r" >&5 +echo "configure:2652: checking for pthread_create in -lc_r" >&5 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2670,7 +2656,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2709,7 +2695,7 @@ fi if test $ol_link_threads = no ; then save_LIBS="$LIBS" echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:2713: checking for pthread_create in -lpthread" >&5 +echo "configure:2699: checking for pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2720,7 +2706,7 @@ LIBS="-lpthread if test $with_preemptive = auto ; then fi -lmach -lexc -lc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2752,7 +2738,6 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then EOF ol_link_threads=posix - LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_DCE_THREADS" LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc" else echo "$ac_t""no" 1>&6 @@ -2769,18 +2754,17 @@ EOF save_CPPFLAGS="$CPPFLAGS" save_LIBS="$LIBS" - CPPFLAGS="$LTHREAD_DEFS $CPPFLAGS" LIBS="$LTHREAD_LIBS $LIBS" for ac_func in sched_yield pthread_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2779: checking for $ac_func" >&5 +echo "configure:2763: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2838,12 +2822,12 @@ done for ac_func in pthread_kill do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2842: checking for $ac_func" >&5 +echo "configure:2826: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2893,13 +2877,13 @@ done if test $ol_with_preemptive = auto ; then echo $ac_n "checking for preemptive Pthread implementation""... $ac_c" 1>&6 -echo "configure:2897: checking for preemptive Pthread implementation" >&5 +echo "configure:2881: checking for preemptive Pthread implementation" >&5 if test "$cross_compiling" = yes; then { echo "configure: error: crossing compiling: use --with-preemptive=yes|no|manual" 1>&2; exit 1; } else cat > conftest.$ac_ext < @@ -2943,7 +2927,7 @@ int argc; char **argv; } EOF -if { (eval echo configure:2947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ol_pthread_preemptive=yes else @@ -2983,17 +2967,17 @@ if test $ol_with_threads = auto -o $ol_with_threads = cthreads ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2987: checking for $ac_hdr" >&5 +echo "configure:2971: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3021,7 +3005,7 @@ done if test $ac_cv_header_lwp_lwp_h = yes ; then echo $ac_n "checking for cthread_fork in -llwp""... $ac_c" 1>&6 -echo "configure:3025: checking for cthread_fork in -llwp" >&5 +echo "configure:3009: checking for cthread_fork in -llwp" >&5 ac_lib_var=`echo lwp'_'cthread_fork | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3029,7 +3013,7 @@ else ac_save_LIBS="$LIBS" LIBS="-llwp $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3064,10 +3048,9 @@ fi if test $have_cthreads = yes ; then cat >> confdefs.h <<\EOF -#define HAVE_CTHREADS 1 +#define HAVE_MACH_CTHREADS 1 EOF - LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_NEXT_CTHREADS" LTHREAD_LIBS="$LTHREAD_LIBS -llwp" fi fi @@ -3078,17 +3061,17 @@ if test $ol_with_threads = auto -o $ol_with_threads = lwp ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3082: checking for $ac_hdr" >&5 +echo "configure:3065: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3116,7 +3099,7 @@ done if test $ac_cv_header_lwp_lwp_h = yes ; then echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6 -echo "configure:3120: checking for thr_create in -lthread" >&5 +echo "configure:3103: checking for thr_create in -lthread" >&5 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3124,7 +3107,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3166,7 +3149,6 @@ EOF #define HAVE_LWP_THR 1 EOF - LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_SUNOS5_LWP" LTHREAD_LIBS="$LTHREAD_LIBS -llwp" fi fi @@ -3175,17 +3157,17 @@ EOF do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3179: checking for $ac_hdr" >&5 +echo "configure:3161: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3213,7 +3195,7 @@ done if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6 -echo "configure:3217: checking for lwp_create in -llwp" >&5 +echo "configure:3199: checking for lwp_create in -llwp" >&5 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3221,7 +3203,7 @@ else ac_save_LIBS="$LIBS" LIBS="-llwp $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3259,7 +3241,6 @@ fi #define HAVE_LWP 1 EOF - LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_SUNOS4_LWP" LTHREAD_LIBS="$LTHREAD_LIBS -llwp" if test $with_preemptive = auto ; then @@ -3270,7 +3251,10 @@ EOF fi if test $ol_with_preemptive = yes ; then - LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_PREEMPTIVE" + cat >> confdefs.h <<\EOF +#define THREAD_PREEMPTIVE 1 +EOF + fi if test $ol_with_threads = manual ; then @@ -3282,17 +3266,17 @@ if test $ol_with_threads = manual ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3286: checking for $ac_hdr" >&5 +echo "configure:3270: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3280: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3321,12 +3305,12 @@ done for ac_func in sched_yield pthread_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3325: checking for $ac_func" >&5 +echo "configure:3309: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3375,7 +3359,7 @@ done echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 -echo "configure:3379: checking for LinuxThreads" >&5 +echo "configure:3363: checking for LinuxThreads" >&5 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3396,17 +3380,17 @@ echo "$ac_t""$ol_cv_linux_threads" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3400: checking for $ac_hdr" >&5 +echo "configure:3384: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3436,17 +3420,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3440: checking for $ac_hdr" >&5 +echo "configure:3424: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3476,17 +3460,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3480: checking for $ac_hdr" >&5 +echo "configure:3464: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3524,20 +3508,23 @@ if test $ol_link_threads = no ; then $ol_with_threads = no fi - LTHREAD_DEFS="-DNO_THREADS" + cat >> confdefs.h <<\EOF +#define NO_THREADS 1 +EOF + LTHREAD_LIBS="" fi ol_link_ldbm=no if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then echo $ac_n "checking for DB2 library""... $ac_c" 1>&6 -echo "configure:3535: checking for DB2 library" >&5 +echo "configure:3522: checking for DB2 library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6 -echo "configure:3541: checking for db_open in -ldb" >&5 +echo "configure:3528: checking for db_open in -ldb" >&5 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3545,7 +3532,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3587,17 +3574,17 @@ for ac_hdr in db.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3591: checking for $ac_hdr" >&5 +echo "configure:3578: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3625,13 +3612,13 @@ done if test $ac_cv_header_db_h = yes ; then echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6 -echo "configure:3629: checking if db.h is DB2" >&5 +echo "configure:3616: checking if db.h is DB2" >&5 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3663,7 +3650,7 @@ fi echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6 -echo "configure:3667: checking for Berkeley DB2" >&5 +echo "configure:3654: checking for Berkeley DB2" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3689,12 +3676,16 @@ EOF ol_link_ldbm=db2 ol_with_ldbm_api=db2 - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2" - if test $ol_with_ldbm_type = hash ; then - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBHASH" + cat >> confdefs.h <<\EOF +#define LDBM_USE_DBHASH 1 +EOF + else - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBBTREE" + cat >> confdefs.h <<\EOF +#define LDBM_USE_DBBTREE 1 +EOF + fi if test $ol_cv_lib_db2 != yes ; then @@ -3705,18 +3696,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6 -echo "configure:3709: checking for Berkeley DB library" >&5 +echo "configure:3700: checking for Berkeley DB library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:3715: checking for dbopen" >&5 +echo "configure:3706: checking for dbopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -3758,7 +3749,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:3762: checking for dbopen in -ldb" >&5 +echo "configure:3753: checking for dbopen in -ldb" >&5 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3766,7 +3757,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3812,17 +3803,17 @@ for ac_hdr in db_185.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3816: checking for $ac_hdr" >&5 +echo "configure:3807: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3858,7 +3849,7 @@ fi echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6 -echo "configure:3862: checking for Berkeley DB" >&5 +echo "configure:3853: checking for Berkeley DB" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3884,14 +3875,16 @@ EOF ol_link_ldbm=db ol_with_ldbm_api=db - if test $ac_cv_header_db_185_h = yes ; then - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2_COMPAT185" - fi - if test $ol_with_ldbm_type = hash ; then - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBHASH" + cat >> confdefs.h <<\EOF +#define LDBM_USE_DBHASH 1 +EOF + else - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBBTREE" + cat >> confdefs.h <<\EOF +#define LDBM_USE_DBBTREE 1 +EOF + fi if test $ol_cv_lib_db != yes ; then @@ -3909,17 +3902,17 @@ if test $ol_with_ldbm_api = manual ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3913: checking for $ac_hdr" >&5 +echo "configure:3906: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3923: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3954,18 +3947,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then echo $ac_n "checking for GDBM library""... $ac_c" 1>&6 -echo "configure:3958: checking for GDBM library" >&5 +echo "configure:3951: checking for GDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6 -echo "configure:3964: checking for gdbm_open" >&5 +echo "configure:3957: checking for gdbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gdbm_open=yes" else @@ -4007,7 +4000,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:4011: checking for gdbm_open in -lgdbm" >&5 +echo "configure:4004: checking for gdbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4015,7 +4008,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4061,17 +4054,17 @@ echo "$ac_t""$ol_cv_lib_gdbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4065: checking for $ac_hdr" >&5 +echo "configure:4058: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4098,7 +4091,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:4102: checking for db" >&5 +echo "configure:4095: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4124,8 +4117,6 @@ EOF ol_link_ldbm=gdbm ol_with_ldbm_api=gdbm - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_GDBM" - if test $ol_cv_lib_gdbm != yes ; then LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm" fi @@ -4134,18 +4125,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = ndbm ; then echo $ac_n "checking for NDBM library""... $ac_c" 1>&6 -echo "configure:4138: checking for NDBM library" >&5 +echo "configure:4129: checking for NDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:4144: checking for dbm_open" >&5 +echo "configure:4135: checking for dbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -4187,7 +4178,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6 -echo "configure:4191: checking for dbm_open in -lndbm" >&5 +echo "configure:4182: checking for dbm_open in -lndbm" >&5 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4195,7 +4186,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lndbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4226,7 +4217,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:4230: checking for dbm_open in -ldbm" >&5 +echo "configure:4221: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4234,7 +4225,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4282,17 +4273,17 @@ echo "$ac_t""$ol_cv_lib_ndbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4286: checking for $ac_hdr" >&5 +echo "configure:4277: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4319,7 +4310,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:4323: checking for db" >&5 +echo "configure:4314: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4349,8 +4340,6 @@ EOF echo "configure: warning: Attempting to use NDBM. Functionality will be limited." 1>&2 fi - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_NDBM" - if test $ol_cv_lib_ndbm != yes ; then LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm" fi @@ -4369,7 +4358,7 @@ fi if test $ol_enable_wrappers = yes ; then echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6 -echo "configure:4373: checking for hosts_access in -lwrap" >&5 +echo "configure:4362: checking for hosts_access in -lwrap" >&5 ac_lib_var=`echo wrap'_'hosts_access | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4377,7 +4366,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lwrap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4411,7 +4400,10 @@ fi if test $have_wrappers = yes ; then - SLAPD_DEFS="$SLAPD_DEFS -DTCP_WRAPPERS" + cat >> confdefs.h <<\EOF +#define HAVE_TCPD 1 +EOF + SLAPD_LIBS="$SLAPD_LIBS -lwrap" else echo "configure: warning: could not find -lwrap" 1>&2 @@ -4431,17 +4423,17 @@ for ac_hdr in termcap.h ncurses.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4435: checking for $ac_hdr" >&5 +echo "configure:4427: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4437: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4470,7 +4462,7 @@ done if test $ol_link_termcap = no ; then echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6 -echo "configure:4474: checking for tputs in -ltermcap" >&5 +echo "configure:4466: checking for tputs in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4478,7 +4470,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4522,7 +4514,7 @@ fi if test $ol_link_termcap = no ; then echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 -echo "configure:4526: checking for initscr in -lncurses" >&5 +echo "configure:4518: checking for initscr in -lncurses" >&5 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4530,7 +4522,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4573,19 +4565,22 @@ EOF fi if test $ol_link_termcap = no ; then - TERMCAP_DEFS="-DNOTERMCAP" + cat >> confdefs.h <<\EOF +#define NO_TERMCAP 1 +EOF + TERMCAP_LIBS= fi # FreeBSD (and others) have crypt(3) in -lcrypt if test $ol_enable_crypt != no ; then echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:4584: checking for crypt" >&5 +echo "configure:4579: checking for crypt" >&5 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -4627,7 +4622,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:4631: checking for crypt in -lcrypt" >&5 +echo "configure:4626: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4635,7 +4630,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4672,7 +4667,10 @@ fi if test $have_crypt = yes ; then - LUTIL_DEFS="$LUTIL_DEFS -DLDAP_CRYPT" + cat >> confdefs.h <<\EOF +#define HAVE_CRYPT 1 +EOF + else echo "configure: warning: could not find crypt" 1>&2 if test $ol_enable_crypt = yes ; then @@ -4685,12 +4683,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:4689: checking for ANSI C header files" >&5 +echo "configure:4687: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4698,7 +4696,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4715,7 +4713,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -4733,7 +4731,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -4754,7 +4752,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -4765,7 +4763,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:4769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -4793,12 +4791,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:4797: checking for $ac_hdr that defines DIR" >&5 +echo "configure:4795: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -4806,7 +4804,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:4810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -4831,7 +4829,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:4835: checking for opendir in -ldir" >&5 +echo "configure:4833: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4839,7 +4837,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4872,7 +4870,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:4876: checking for opendir in -lx" >&5 +echo "configure:4874: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4880,7 +4878,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4914,12 +4912,12 @@ fi fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:4918: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:4916: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4935,7 +4933,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:4939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -4972,17 +4970,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4976: checking for $ac_hdr" >&5 +echo "configure:4974: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4986: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5010,12 +5008,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5014: checking for uid_t in sys/types.h" >&5 +echo "configure:5012: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -5044,7 +5042,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:5048: checking type of array argument to getgroups" >&5 +echo "configure:5046: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5052,7 +5050,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -5091,7 +5089,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -5115,12 +5113,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:5119: checking for mode_t" >&5 +echo "configure:5117: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5148,12 +5146,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:5152: checking for off_t" >&5 +echo "configure:5150: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5181,12 +5179,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:5185: checking for pid_t" >&5 +echo "configure:5183: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5214,12 +5212,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:5218: checking return type of signal handlers" >&5 +echo "configure:5216: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5236,7 +5234,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:5240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -5255,12 +5253,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:5259: checking for size_t" >&5 +echo "configure:5257: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5288,12 +5286,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5292: checking for uid_t in sys/types.h" >&5 +echo "configure:5290: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -5322,12 +5320,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:5326: checking for st_blksize in struct stat" >&5 +echo "configure:5324: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5335,7 +5333,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:5339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -5356,12 +5354,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:5360: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:5358: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5370,7 +5368,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:5374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -5391,12 +5389,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:5395: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:5393: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5404,7 +5402,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:5408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -5426,12 +5424,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:5430: checking for working const" >&5 +echo "configure:5428: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -5503,7 +5501,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:5507: checking for 8-bit clean memcmp" >&5 +echo "configure:5505: 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 @@ -5511,7 +5509,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -5539,12 +5537,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:5543: checking for strftime" >&5 +echo "configure:5541: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -5589,7 +5587,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:5593: checking for strftime in -lintl" >&5 +echo "configure:5591: 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 @@ -5597,7 +5595,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5635,12 +5633,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:5639: checking for vprintf" >&5 +echo "configure:5637: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -5687,12 +5685,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:5691: checking for _doprnt" >&5 +echo "configure:5689: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -5740,7 +5738,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:5744: checking for wait3 that fills in rusage" >&5 +echo "configure:5742: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5748,7 +5746,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -5779,7 +5777,7 @@ main() { } } EOF -if { (eval echo configure:5783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -5829,12 +5827,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5833: checking for $ac_func" >&5 +echo "configure:5831: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5885,12 +5883,12 @@ done for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5889: checking for $ac_func" >&5 +echo "configure:5887: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5943,13 +5941,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:5947: checking declaration of sys_errlist" >&5 +echo "configure:5945: 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 < @@ -5959,7 +5957,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:5963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -5980,20 +5978,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:5984: checking existence of sys_errlist" >&5 +echo "configure:5982: 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 < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:5997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else @@ -6011,22 +6009,40 @@ fi if test $ol_enable_debug != no ; then - LDAP_DEFS="$LDAP_DEFS -DLDAP_DEBUG" + cat >> confdefs.h <<\EOF +#define LDAP_DEBUG 1 +EOF + fi if test $ol_enable_libui = yes ; then - LDAP_DEFS="$LDAP_DEFS -DLDAP_LIBUI" + cat >> confdefs.h <<\EOF +#define LDAP_LIBUI 1 +EOF + fi if test $ol_enable_cache = no ; then - LDAP_DEFS="$LDAP_DEFS -DNO_CACHE" + cat >> confdefs.h <<\EOF +#define LDAP_NOCACHE 1 +EOF + fi if test $ol_enable_dns != no ; then - LDAP_DEFS="$LDAP_DEFS -DLDAP_DNS" + cat >> confdefs.h <<\EOF +#define LDAP_DNS 1 +EOF + fi if test $ol_enable_referrals != no ; then - LDAP_DEFS="$LDAP_DEFS -DLDAP_REFERRALS" + cat >> confdefs.h <<\EOF +#define LDAP_REFERRALS 1 +EOF + fi if test $ol_enable_cldap != no ; then - LDAP_DEFS="$LDAP_DEFS -DCLDAP" + cat >> confdefs.h <<\EOF +#define LDAP_CONNECTIONLESS 1 +EOF + fi if test $ol_enable_aclgroup != no ; then @@ -6034,15 +6050,27 @@ if test $ol_enable_aclgroup != no ; then #define SLAPD_ACLGROUP 1 EOF - SLAPD_DEFS="$SLAPD_DEFS -DACLGROUP" +fi + +if test $ol_enable_crypt != no ; then + cat >> confdefs.h <<\EOF +#define SLAPD_CRYPT 1 +EOF + fi if test $ol_enable_md5 != no ; then - LUTIL_DEFS="$LUTIL_DEFS -DLDAP_MD5" + cat >> confdefs.h <<\EOF +#define SLAPD_MD5 1 +EOF + fi if test $ol_enable_sha1 != no ; then - LUTIL_DEFS="$LUTIL_DEFS -DLDAP_SHA1" + cat >> confdefs.h <<\EOF +#define SLAPD_SHA1 1 +EOF + fi if test $ol_enable_phonetic != no ; then @@ -6050,7 +6078,6 @@ if test $ol_enable_phonetic != no ; then #define SLAPD_PHONETIC 1 EOF - SLAPD_DEFS="$SLAPD_DEFS -DSOUNDEX" fi if test $ol_enable_rlookups != no ; then @@ -6058,25 +6085,33 @@ if test $ol_enable_rlookups != no ; then #define SLAPD_RLOOKUPS 1 EOF - SLAPD_DEFS="$SLAPD_DEFS -DREVERSE_LOOKUPS" fi if test $ol_link_ldbm != no ; then + cat >> confdefs.h <<\EOF +#define SLAPD_LDBM 1 +EOF + BUILD_SLAPD=yes BUILD_LDBM=yes - LDBM_DEFS="-DLDAP_LDBM $LDBM_DEFS" fi if test $ol_enable_passwd != no ; then + cat >> confdefs.h <<\EOF +#define SLAPD_PASSWD 1 +EOF + BUILD_SLAPD=yes BUILD_PASSWD=yes - SLAPD_DEFS="-DLDAP_PASSWD $SLAPD_DEFS" fi if test $ol_enable_shell != no ; then + cat >> confdefs.h <<\EOF +#define SLAPD_SHELL 1 +EOF + BUILD_SLAPD=yes BUILD_SHELL=yes - SLAPD_DEFS="-DLDAP_SHELL $SLAPD_DEFS" fi if test $ol_enable_slurpd != no -a $ol_link_threads != no -a \ @@ -6096,15 +6131,6 @@ fi - - - - - - - - - @@ -6298,23 +6324,14 @@ s%@BUILD_LDBM@%$BUILD_LDBM%g s%@BUILD_PASSWD@%$BUILD_PASSWD%g s%@BUILD_SHELL@%$BUILD_SHELL%g s%@BUILD_SLURPD@%$BUILD_SLURPD%g -s%@LDAP_DEFS@%$LDAP_DEFS%g s%@LDAP_LIBS@%$LDAP_LIBS%g -s%@LDAPD_DEFS@%$LDAPD_DEFS%g s%@LDAPD_LIBS@%$LDAPD_LIBS%g -s%@SLAPD_DEFS@%$SLAPD_DEFS%g s%@SLAPD_LIBS@%$SLAPD_LIBS%g -s%@SLURPD_DEFS@%$SLURPD_DEFS%g s%@SLURPD_LIBS@%$SLURPD_LIBS%g -s%@LDBM_DEFS@%$LDBM_DEFS%g s%@LDBM_LIBS@%$LDBM_LIBS%g -s%@LTHREAD_DEFS@%$LTHREAD_DEFS%g s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g -s%@LUTIL_DEFS@%$LUTIL_DEFS%g s%@LUTIL_LIBS@%$LUTIL_LIBS%g -s%@KRB_DEFS@%$KRB_DEFS%g s%@KRB_LIBS@%$KRB_LIBS%g -s%@TERMCAP_DEFS@%$TERMCAP_DEFS%g s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g CEOF diff --git a/configure.in b/configure.in index c526ca696c..586fe693e3 100644 --- a/configure.in +++ b/configure.in @@ -164,20 +164,13 @@ fi AC_MSG_RESULT(done) ## Initialize vars -LDAP_DEFS= LDAP_LIBS= -LDBM_DEFS= LDBM_LIBS= -LTHREAD_DEFS= LTHREAD_LIBS= -LUTIL_DEFS= LUTIL_LIBS= -LDAPD_DEFS= LDAPD_LIBS= -SLAPD_DEFS= SLAPD_LIBS= -SLURPD_DEFS= SLURPD_LIBS= BUILD_LDAPD=no @@ -188,9 +181,7 @@ BUILD_LDBM=no BUILD_PASSWD=no BUILD_SHELL=no -KRB_DEFS= KRB_LIBS= -TERMCAP_DEFS= TERMCAP_LIBS= dnl ---------------------------------------------------------------- @@ -250,7 +241,6 @@ if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then AC_DEFINE(HAVE_KERBEROS) - KRB_DEFS="-DKERBEROS" KRB_LIBS="-lkrb4 -lkrb5 -ldes425" fi fi @@ -267,7 +257,6 @@ if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then AC_DEFINE(HAVE_KERBEROS) - KRB_DEFS="-DKERBEROS" KRB_LIBS="-lkrb -ldes" fi fi @@ -282,10 +271,9 @@ if test $ol_with_threads = auto -o $ol_with_threads = posix ; then OL_POSIX_THREAD_VERSION if test $ol_cv_pthread_version = final ; then - LTHREAD_DEFS="$LTHREAD_DEFS -DPOSIX_THREADS" + dnl AC_DEFINE(HAVE_PTHREADS_FINAL) elif test $ol_cv_pthread_version = draft4 ; then AC_DEFINE(HAVE_PTHREADS_D4) - LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_MIT_PTHREADS" else AC_MSG_ERROR([unknown pthread version]) fi @@ -297,7 +285,6 @@ if test $ol_with_threads = auto -o $ol_with_threads = posix ; then if test $ol_cv_linux_threads = yes ; then AC_DEFINE(HAVE_LINUX_THREADS,1) - LTHREAD_DEFS="$LTHREAD_DEFS -DLINUX_THREADS" fi dnl Now the hard part, how to link @@ -350,7 +337,6 @@ if test $ol_with_threads = auto -o $ol_with_threads = posix ; then AC_CHECK_LIB(pthread, pthread_create, [ AC_DEFINE(HAVE_DCE) ol_link_threads=posix - LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_DCE_THREADS" LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc"],, if test $with_preemptive = auto ; then ol_with_preemptive=yes @@ -365,7 +351,6 @@ if test $ol_with_threads = auto -o $ol_with_threads = posix ; then dnl save DEFS/LIBS save_CPPFLAGS="$CPPFLAGS" save_LIBS="$LIBS" - CPPFLAGS="$LTHREAD_DEFS $CPPFLAGS" LIBS="$LTHREAD_LIBS $LIBS" dnl All POSIX Thread (final) implementations should have @@ -461,8 +446,7 @@ if test $ol_with_threads = auto -o $ol_with_threads = cthreads ; then AC_CHECK_LIB(lwp, cthread_fork, [have_cthreads=yes], [have_cthreads=no]) if test $have_cthreads = yes ; then - AC_DEFINE(HAVE_CTHREADS) - LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_NEXT_CTHREADS" + AC_DEFINE(HAVE_MACH_CTHREADS) LTHREAD_LIBS="$LTHREAD_LIBS -llwp" fi fi @@ -477,7 +461,6 @@ if test $ol_with_threads = auto -o $ol_with_threads = lwp ; then if test $have_lwp = yes ; then AC_DEFINE(HAVE_LWP) AC_DEFINE(HAVE_LWP_THR) - LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_SUNOS5_LWP" LTHREAD_LIBS="$LTHREAD_LIBS -llwp" fi fi @@ -489,7 +472,6 @@ if test $ol_with_threads = auto -o $ol_with_threads = lwp ; then if test $have_lwp = yes ; then AC_DEFINE(HAVE_LWP) - LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_SUNOS4_LWP" LTHREAD_LIBS="$LTHREAD_LIBS -llwp" if test $with_preemptive = auto ; then @@ -500,7 +482,7 @@ if test $ol_with_threads = auto -o $ol_with_threads = lwp ; then fi if test $ol_with_preemptive = yes ; then - LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_PREEMPTIVE" + AC_DEFINE(THREAD_PREEMPTIVE,1) fi if test $ol_with_threads = manual ; then @@ -528,7 +510,7 @@ if test $ol_link_threads = no ; then $ol_with_threads = no fi - LTHREAD_DEFS="-DNO_THREADS" + AC_DEFINE(NO_THREADS,1) LTHREAD_LIBS="" fi @@ -540,12 +522,10 @@ if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then ol_link_ldbm=db2 ol_with_ldbm_api=db2 - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2" - if test $ol_with_ldbm_type = hash ; then - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBHASH" + AC_DEFINE(LDBM_USE_DBHASH,1) else - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBBTREE" + AC_DEFINE(LDBM_USE_DBBTREE,1) fi dnl $ol_cv_lib_db2 should be yes or -ldb @@ -563,14 +543,10 @@ if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then ol_link_ldbm=db ol_with_ldbm_api=db - if test $ac_cv_header_db_185_h = yes ; then - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2_COMPAT185" - fi - if test $ol_with_ldbm_type = hash ; then - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBHASH" + AC_DEFINE(LDBM_USE_DBHASH,1) else - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBBTREE" + AC_DEFINE(LDBM_USE_DBBTREE,1) fi dnl $ol_cv_lib_db should be yes or -ldb @@ -602,8 +578,6 @@ if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then ol_link_ldbm=gdbm ol_with_ldbm_api=gdbm - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_GDBM" - if test $ol_cv_lib_gdbm != yes ; then LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm" fi @@ -621,8 +595,6 @@ if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = ndbm ; then AC_WARN([Attempting to use NDBM. Functionality will be limited.]) fi - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_NDBM" - if test $ol_cv_lib_ndbm != yes ; then LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm" fi @@ -644,8 +616,7 @@ if test $ol_enable_wrappers = yes ; then [have_wrappers=yes], [have_wrappers=no]) if test $have_wrappers = yes ; then -dnl AC_DEFINE(HAVE_TCPD) - SLAPD_DEFS="$SLAPD_DEFS -DTCP_WRAPPERS" + AC_DEFINE(HAVE_TCPD) SLAPD_LIBS="$SLAPD_LIBS -lwrap" else AC_MSG_WARN(could not find -lwrap) @@ -682,7 +653,7 @@ if test $ol_link_termcap = no ; then fi if test $ol_link_termcap = no ; then - TERMCAP_DEFS="-DNOTERMCAP" + AC_DEFINE(NO_TERMCAP,1) TERMCAP_LIBS= fi @@ -693,8 +664,7 @@ if test $ol_enable_crypt != no ; then have_crypt=yes], [have_crypt=no])]) if test $have_crypt = yes ; then -dnl AC_DEFINE(HAVE_CRYPT) - LUTIL_DEFS="$LUTIL_DEFS -DLDAP_CRYPT" + AC_DEFINE(HAVE_CRYPT) else AC_MSG_WARN(could not find crypt) if test $ol_enable_crypt = yes ; then @@ -789,71 +759,67 @@ dnl ---------------------------------------------------------------- dnl Sort out defines if test $ol_enable_debug != no ; then - LDAP_DEFS="$LDAP_DEFS -DLDAP_DEBUG" + AC_DEFINE(LDAP_DEBUG,1) fi dnl if test $ol_enable_syslog != no ; then -dnl LDAP_DEFS="$LDAP_DEFS -DLDAP_SYSLOG" +dnl AC_DEFINE(LDAP_SYSLOG,1) dnl fi if test $ol_enable_libui = yes ; then - LDAP_DEFS="$LDAP_DEFS -DLDAP_LIBUI" + AC_DEFINE(LDAP_LIBUI,1) fi if test $ol_enable_cache = no ; then - LDAP_DEFS="$LDAP_DEFS -DNO_CACHE" + AC_DEFINE(LDAP_NOCACHE,1) fi if test $ol_enable_dns != no ; then - LDAP_DEFS="$LDAP_DEFS -DLDAP_DNS" + AC_DEFINE(LDAP_DNS,1) fi if test $ol_enable_referrals != no ; then - LDAP_DEFS="$LDAP_DEFS -DLDAP_REFERRALS" + AC_DEFINE(LDAP_REFERRALS,1) fi if test $ol_enable_cldap != no ; then - LDAP_DEFS="$LDAP_DEFS -DCLDAP" + AC_DEFINE(LDAP_CONNECTIONLESS,1) fi if test $ol_enable_aclgroup != no ; then AC_DEFINE(SLAPD_ACLGROUP,1) - SLAPD_DEFS="$SLAPD_DEFS -DACLGROUP" +fi + +if test $ol_enable_crypt != no ; then + AC_DEFINE(SLAPD_CRYPT,1) fi if test $ol_enable_md5 != no ; then -dnl AC_DEFINE(SLAPD_MD5,1) - LUTIL_DEFS="$LUTIL_DEFS -DLDAP_MD5" + AC_DEFINE(SLAPD_MD5,1) fi if test $ol_enable_sha1 != no ; then -dnl AC_DEFINE(SLAPD_SHA1,1) - LUTIL_DEFS="$LUTIL_DEFS -DLDAP_SHA1" + AC_DEFINE(SLAPD_SHA1,1) fi if test $ol_enable_phonetic != no ; then AC_DEFINE(SLAPD_PHONETIC,1) - SLAPD_DEFS="$SLAPD_DEFS -DSOUNDEX" fi if test $ol_enable_rlookups != no ; then AC_DEFINE(SLAPD_RLOOKUPS,1) - SLAPD_DEFS="$SLAPD_DEFS -DREVERSE_LOOKUPS" fi if test $ol_link_ldbm != no ; then -dnl AC_DEFINE(SLAPD_LDBM,1) + AC_DEFINE(SLAPD_LDBM,1) BUILD_SLAPD=yes BUILD_LDBM=yes - LDBM_DEFS="-DLDAP_LDBM $LDBM_DEFS" fi if test $ol_enable_passwd != no ; then -dnl AC_DEFINE(SLAPD_PASSWD,1) + AC_DEFINE(SLAPD_PASSWD,1) BUILD_SLAPD=yes BUILD_PASSWD=yes - SLAPD_DEFS="-DLDAP_PASSWD $SLAPD_DEFS" fi if test $ol_enable_shell != no ; then -dnl AC_DEFINE(SLAPD_SHELL,1) + AC_DEFINE(SLAPD_SHELL,1) BUILD_SLAPD=yes BUILD_SHELL=yes - SLAPD_DEFS="-DLDAP_SHELL $SLAPD_DEFS" fi if test $ol_enable_slurpd != no -a $ol_link_threads != no -a \ @@ -871,24 +837,15 @@ AC_SUBST(BUILD_SLAPD) AC_SUBST(BUILD_SLURPD) -AC_SUBST(LDAP_DEFS) AC_SUBST(LDAP_LIBS) -AC_SUBST(LDAPD_DEFS) AC_SUBST(LDAPD_LIBS) -AC_SUBST(SLAPD_DEFS) AC_SUBST(SLAPD_LIBS) -AC_SUBST(SLURPD_DEFS) AC_SUBST(SLURPD_LIBS) -AC_SUBST(LDBM_DEFS) AC_SUBST(LDBM_LIBS) -AC_SUBST(LTHREAD_DEFS) AC_SUBST(LTHREAD_LIBS) -AC_SUBST(LUTIL_DEFS) AC_SUBST(LUTIL_LIBS) -AC_SUBST(KRB_DEFS) AC_SUBST(KRB_LIBS) -AC_SUBST(TERMCAP_DEFS) AC_SUBST(TERMCAP_LIBS) dnl ---------------------------------------------------------------- diff --git a/include/avl.h b/include/avl.h index 3281ef863e..1239a61238 100644 --- a/include/avl.h +++ b/include/avl.h @@ -21,6 +21,8 @@ * this structure represents a generic avl tree node. */ +LDAP_BEGIN_DECL + typedef struct avlnode { caddr_t avl_data; signed char avl_bf; @@ -76,4 +78,6 @@ avl_apply LDAP_P((Avlnode *, IFP, caddr_t, int, int)); /* what apply returns if it ran out of nodes */ #define AVL_NOMORE -6 +LDAP_END_DECL + #endif /* _AVL */ diff --git a/include/bridge.h b/include/bridge.h deleted file mode 100644 index e25dce3d97..0000000000 --- a/include/bridge.h +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Copyright (c) 1994 Regents of the University of Michigan. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that this notice is preserved and that due credit is given - * to the University of Michigan at Ann Arbor. The name of the University - * may not be used to endorse or promote products derived from this - * software without specific prior written permission. This software - * is provided ``as is'' without express or implied warranty. - */ - -/* This file SHOULD go away !!! */ - -#ifndef _LDAP_BRIDGE_H -#define _LDAP_BRIDGE_H - -/* - * portable.h for LDAP -- this is where we define common stuff to make - * life easier on various Unix systems. - * - * Unless you are porting LDAP to a new platform, you should not need to - * edit this file. - */ - -#ifndef LDAP_LIBUI -#ifndef NO_USERINTERFACE -#define NO_USERINTERFACE -#endif -#endif - -#ifndef SYSV -#if defined( hpux ) || defined( sunos5 ) || defined ( sgi ) || defined( SVR4 ) -# define SYSV -#endif -#endif - - -/* - * under System V, use sysconf() instead of getdtablesize - */ -#if defined( HAVE_SYSCONF ) && !defined( HAVE_GETDTABLESIZE ) -#define USE_SYSCONF -#endif - - -/* - * under System V, daemons should use setsid() instead of detaching from their - * tty themselves - */ -#if defined( HAVE_SETSID ) -#define USE_SETSID -#endif - - -/* - * System V has socket options in filio.h - */ -#if defined( HAVE_FILIO_H ) -#define NEED_FILIO -#endif - -/* - * use lockf() under System V - */ -#if !defined( HAVE_LOCKF ) && !defined( HAVE_FLOCK ) -#define USE_LOCKF -#endif - -/* - * on most systems, we should use waitpid() instead of waitN() - */ -#if defined( HAVE_WAITPID ) && !defined( nextstep ) -#define USE_WAITPID -#endif - - -/* - * define the wait status argument type - */ -#if !defined( WAITSTATUSTYPE ) -#if !defined( HAVE_SYS_WAIT_H ) -#define WAITSTATUSTYPE union wait -#else -#define WAITSTATUSTYPE int -#endif -#endif - -/* - * define the flags for wait - */ -#if !defined( WAIT_FLAGS ) -#ifdef sunos5 -#define WAIT_FLAGS ( WNOHANG | WUNTRACED | WCONTINUED ) -#else -#define WAIT_FLAGS ( WNOHANG | WUNTRACED ) -#endif -#endif - - -/* - * defined the options for openlog (syslog) - */ -#if !defined( OPENLOG_OPTIONS ) -#ifdef ultrix -#define OPENLOG_OPTIONS LOG_PID -#else -#define OPENLOG_OPTIONS ( LOG_PID | LOG_NOWAIT ) -#endif -#endif - - -/* - * many systems do not have the setpwfile() library routine... we just - * enable use for those systems we know have it. - */ -#ifdef NOTDEF -#ifndef HAVE_SETPWFILE -#if defined( sunos4 ) || defined( ultrix ) || defined( __osf__ ) -#define HAVE_SETPWFILE -#endif -#endif -#endif NOTDEF - -#ifndef DISABLE_BRIDGE -/* - * Are sys_errlist and sys_nerr declared in stdio.h? - */ -#ifndef SYSERRLIST_IN_STDIO -#if !defined( DECL_SYS_ERRLIST ) -#define SYSERRLIST_IN_STDIO -#endif -#endif - -/* - * for select() - */ -#if !defined(FD_SET) && !defined(WINSOCK) -#define NFDBITS 32 -#define FD_SETSIZE 32 -#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS))) -#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS))) -#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS))) -#define FD_ZERO(p) bzero((char *)(p), sizeof(*(p))) -#endif /* FD_SET */ -#endif - -#if defined( hpux ) && defined( __STDC__ ) -/* - * Under HP/UX, select seems to want (int *) instead of fd_set. Non-ANSI - * compilers don't like recursive macros, so ignore the problem if __STDC__ - * is not defined. - */ -#define select(a,b,c,d,e) select(a, (int *)b, (int *)c, (int *)d, e) -#endif /* hpux && __STDC__ */ - - -/* - * for signal() -- what do signal handling functions return? - */ -#ifdef RETSIGTYPE -#define SIG_FN RETSIGTYPE -#endif - - -/* - * call signal or sigset (signal does not block the signal while - * in the handler on sys v and sigset does not exist on bsd) - */ -#ifndef SIGNAL -#ifdef HAVE_SIGSET -#define SIGNAL sigset -#else -#define SIGNAL signal -#endif -#endif - -/* - * toupper and tolower macros are different under bsd and sys v - */ -#if defined( SYSV ) && !defined( hpux ) -#define TOUPPER(c) (isascii(c) && islower(c) ? _toupper(c) : c) -#define TOLOWER(c) (isascii(c) && isupper(c) ? _tolower(c) : c) -#else -#define TOUPPER(c) (isascii(c) && islower(c) ? toupper(c) : c) -#define TOLOWER(c) (isascii(c) && isupper(c) ? tolower(c) : c) -#endif - -/* - * put a cover on the tty-related ioctl calls we need to use - */ -#if !defined( HAVE_TERMIOS_H ) -#define TERMIO_TYPE struct sgttyb -#define TERMFLAG_TYPE int -#define GETATTR( fd, tiop ) ioctl((fd), TIOCGETP, (caddr_t)(tiop)) -#define SETATTR( fd, tiop ) ioctl((fd), TIOCSETP, (caddr_t)(tiop)) -#define GETFLAGS( tio ) (tio).sg_flags -#define SETFLAGS( tio, flags ) (tio).sg_flags = (flags) -#else -#define USE_TERMIOS -#define TERMIO_TYPE struct termios -#define TERMFLAG_TYPE tcflag_t -#define GETATTR( fd, tiop ) tcgetattr((fd), (tiop)) -#define SETATTR( fd, tiop ) tcsetattr((fd), TCSANOW /* 0 */, (tiop)) -#define GETFLAGS( tio ) (tio).c_lflag -#define SETFLAGS( tio, flags ) (tio).c_lflag = (flags) -#endif - - -#if defined( ultrix ) || defined( nextstep ) -extern char *strdup(); -#endif /* ultrix || nextstep */ - -#endif /* _LDAP_BRIDGE_H */ diff --git a/include/lber.h b/include/lber.h index c6a529e1d2..2617c86979 100644 --- a/include/lber.h +++ b/include/lber.h @@ -116,9 +116,7 @@ struct berval { char *bv_val; }; -#ifdef LDAP_DEBUG extern int lber_debug; -#endif /* * in bprint.c: @@ -148,10 +146,8 @@ LDAP_F unsigned long ber_scanf LDAP_P(( BerElement *ber, char *fmt, ... )); LDAP_F void ber_bvfree LDAP_P(( struct berval *bv )); LDAP_F void ber_bvecfree LDAP_P(( struct berval **bv )); LDAP_F struct berval *ber_bvdup LDAP_P(( struct berval *bv )); -#ifdef STR_TRANSLATION LDAP_F void ber_set_string_translators LDAP_P(( BerElement *ber, BERTranslateProc encode_proc, BERTranslateProc decode_proc )); -#endif /* STR_TRANSLATION */ /* * in encode.c @@ -170,12 +166,7 @@ LDAP_F int ber_start_seq LDAP_P(( BerElement *ber, unsigned long tag )); LDAP_F int ber_start_set LDAP_P(( BerElement *ber, unsigned long tag )); LDAP_F int ber_put_seq LDAP_P(( BerElement *ber )); LDAP_F int ber_put_set LDAP_P(( BerElement *ber )); - -#ifdef __STDC__ LDAP_F int ber_printf LDAP_P(( BerElement *ber, char *fmt, ... )); -#else -LDAP_F int ber_printf ( ); -#endif /* * in io.c: @@ -196,24 +187,6 @@ LDAP_F unsigned long ber_get_next LDAP_P(( Sockbuf *sb, unsigned long *len, LDAP_F void ber_init LDAP_P(( BerElement *ber, int options )); LDAP_F void ber_reset LDAP_P(( BerElement *ber, int was_writing )); -#if !defined(__alpha) || defined(VMS) - -#define LBER_HTONL( l ) htonl( l ) -#define LBER_NTOHL( l ) ntohl( l ) - -#else /* __alpha */ -/* - * htonl and ntohl on the DEC Alpha under OSF 1 seem to only swap the - * lower-order 32-bits of a (64-bit) long, so we define correct versions - * here. - */ -#define LBER_HTONL( l ) (((long)htonl( (l) & 0x00000000FFFFFFFF )) << 32 \ - | htonl( ( (l) & 0xFFFFFFFF00000000 ) >> 32 )) - -#define LBER_NTOHL( l ) (((long)ntohl( (l) & 0x00000000FFFFFFFF )) << 32 \ - | ntohl( ( (l) & 0xFFFFFFFF00000000 ) >> 32 )) -#endif /* __alpha */ - LDAP_END_DECL #endif /* _LBER_H */ diff --git a/include/ldap.h b/include/ldap.h index 1eab5bda62..c98bcf75e0 100644 --- a/include/ldap.h +++ b/include/ldap.h @@ -13,19 +13,9 @@ #ifndef _LDAP_H #define _LDAP_H -#ifdef __cplusplus -extern "C" { -#endif +#include - -#ifdef WINSOCK -#include "msdos.h" -#include -#endif - -#if !defined( NEEDPROTOS ) && defined(__STDC__) -#define NEEDPROTOS 1 -#endif +LDAP_BEGIN_DECL #define LDAP_PORT 389 #define LDAP_VERSION1 1 @@ -46,7 +36,8 @@ extern int ldap_debug; #ifdef LDAP_SYSLOG extern int ldap_syslog; extern int ldap_syslog_level; -#endif +#endif /* LDAP_SYSLOG */ + #define LDAP_DEBUG_TRACE 0x001 #define LDAP_DEBUG_PACKETS 0x002 #define LDAP_DEBUG_ARGS 0x004 @@ -61,6 +52,7 @@ extern int ldap_syslog_level; #define LDAP_DEBUG_PARSE 0x800 #define LDAP_DEBUG_ANY 0xffff +/* this doesn't below as part of ldap.h */ #ifdef LDAP_SYSLOG #define Debug( level, fmt, arg1, arg2, arg3 ) \ { \ @@ -221,6 +213,8 @@ typedef struct ldapmod { struct ldapmod *mod_next; } LDAPMod; +typedef struct timeval * LDAP_timeval_p; + /* * possible error codes we can return */ @@ -295,7 +289,7 @@ typedef struct ldapmsg { BerElement *lm_ber; /* the ber encoded message contents */ struct ldapmsg *lm_chain; /* for search - next msg in the resp */ struct ldapmsg *lm_next; /* next response */ - unsigned long lm_time; /* used to maintain cache */ + unsigned int lm_time; /* used to maintain cache */ } LDAPMessage; #define NULLMSG ((LDAPMessage *) NULL) @@ -318,7 +312,7 @@ typedef struct ldap_server { typedef struct ldap_conn { Sockbuf *lconn_sb; int lconn_refcnt; - unsigned long lconn_lastused; /* time */ + time_t lconn_lastused; /* time */ int lconn_status; #define LDAP_CONNST_NEEDSOCKET 1 #define LDAP_CONNST_CONNECTING 2 @@ -453,12 +447,8 @@ typedef struct ldap { int ld_cldaptimeout;/* time between retries */ int ld_refhoplimit; /* limit on referral nesting */ unsigned long ld_options; /* boolean options */ -#ifdef LDAP_DNS #define LDAP_OPT_DNS 0x00000001 /* use DN & DNS */ -#endif /* LDAP_DNS */ -#ifdef LDAP_REFERRALS #define LDAP_OPT_REFERRALS 0x00000002 /* chase referrals */ -#endif /* LDAP_REFERRALS */ #define LDAP_OPT_RESTART 0x00000004 /* restart if EINTR occurs */ /* do not mess with the rest though */ @@ -512,81 +502,259 @@ typedef struct ldap_url_desc { #define LDAP_URL_ERR_BADSCOPE 3 /* URL scope string is invalid */ #define LDAP_URL_ERR_MEM 4 /* can't allocate memory space */ +/* + * in abandon.c: + */ +LDAP_F int ldap_abandon LDAP_P(( LDAP *ld, int msgid )); -#ifndef NEEDPROTOS -extern LDAP *ldap_open(); -extern LDAP *ldap_init(); -#ifdef STR_TRANSLATION -extern void ldap_set_string_translators(); -#ifdef LDAP_CHARSET_8859 -extern int ldap_t61_to_8859(); -extern int ldap_8859_to_t61(); -#endif /* LDAP_CHARSET_8859 */ -#endif /* STR_TRANSLATION */ -extern LDAPMessage *ldap_first_entry(); -extern LDAPMessage *ldap_next_entry(); -extern char *ldap_get_dn(); -extern char *ldap_dn2ufn(); -extern char **ldap_explode_dn(); -extern char *ldap_first_attribute(); -extern char *ldap_next_attribute(); -extern char **ldap_get_values(); -extern struct berval **ldap_get_values_len(); -extern void ldap_value_free(); -extern void ldap_value_free_len(); -extern int ldap_count_values(); -extern int ldap_count_values_len(); -extern char *ldap_err2string(); -extern void ldap_getfilter_free(); -extern LDAPFiltDesc *ldap_init_getfilter(); -extern LDAPFiltDesc *ldap_init_getfilter_buf(); -extern LDAPFiltInfo *ldap_getfirstfilter(); -extern LDAPFiltInfo *ldap_getnextfilter(); -extern void ldap_setfilteraffixes(); -extern void ldap_build_filter(); -extern void ldap_flush_cache(); -extern void ldap_set_cache_options(); -extern void ldap_uncache_entry(); -extern void ldap_uncache_request(); -extern char *ldap_friendly_name(); -extern void ldap_free_friendlymap(); -extern LDAP *cldap_open(); -extern void cldap_setretryinfo(); -extern void cldap_close(); -extern LDAPFiltDesc *ldap_ufn_setfilter(); -extern int ldap_ufn_timeout(); -extern int ldap_sort_entries(); -extern int ldap_sort_values(); -extern int ldap_sort_strcasecmp(); -void ldap_free_urldesc(); -void ldap_set_rebind_proc(); -void ldap_enable_translation(); +/* + * in add.c: + */ +LDAP_F int ldap_add LDAP_P(( LDAP *ld, char *dn, LDAPMod **attrs )); +LDAP_F int ldap_add_s LDAP_P(( LDAP *ld, char *dn, LDAPMod **attrs )); + +/* + * in bind.c: + */ +LDAP_F int ldap_bind LDAP_P(( LDAP *ld, char *who, char *passwd, int authmethod )); +LDAP_F int ldap_bind_s LDAP_P(( LDAP *ld, char *who, char *cred, int method )); +LDAP_F void ldap_set_rebind_proc LDAP_P(( LDAP *ld, + int (*rebindproc) LDAP_P(( LDAP *ld, char **dnp, char **passwdp, int *authmethodp, int freeit )) +)); + +/* + * in sbind.c: + */ +LDAP_F int ldap_simple_bind LDAP_P(( LDAP *ld, char *who, char *passwd )); +LDAP_F int ldap_simple_bind_s LDAP_P(( LDAP *ld, char *who, char *passwd )); + +/* + * in kbind.c: + */ +LDAP_F int ldap_kerberos_bind_s LDAP_P(( LDAP *ld, char *who )); +LDAP_F int ldap_kerberos_bind1 LDAP_P(( LDAP *ld, char *who )); +LDAP_F int ldap_kerberos_bind1_s LDAP_P(( LDAP *ld, char *who )); +LDAP_F int ldap_kerberos_bind2 LDAP_P(( LDAP *ld, char *who )); +LDAP_F int ldap_kerberos_bind2_s LDAP_P(( LDAP *ld, char *who )); + + +/* + * in cache.c + */ +LDAP_F int ldap_enable_cache LDAP_P(( LDAP *ld, long timeout, long maxmem )); +LDAP_F void ldap_disable_cache LDAP_P(( LDAP *ld )); +LDAP_F void ldap_set_cache_options LDAP_P(( LDAP *ld, unsigned long opts )); +LDAP_F void ldap_destroy_cache LDAP_P(( LDAP *ld )); +LDAP_F void ldap_flush_cache LDAP_P(( LDAP *ld )); +LDAP_F void ldap_uncache_entry LDAP_P(( LDAP *ld, char *dn )); +LDAP_F void ldap_uncache_request LDAP_P(( LDAP *ld, int msgid )); + +/* + * in compare.c: + */ +LDAP_F int ldap_compare LDAP_P(( LDAP *ld, char *dn, char *attr, char *value )); +LDAP_F int ldap_compare_s LDAP_P(( LDAP *ld, char *dn, char *attr, char *value )); + +/* + * in delete.c: + */ +LDAP_F int ldap_delete LDAP_P(( LDAP *ld, char *dn )); +LDAP_F int ldap_delete_s LDAP_P(( LDAP *ld, char *dn )); + +/* + * in error.c: + */ +LDAP_F int ldap_result2error LDAP_P(( LDAP *ld, LDAPMessage *r, int freeit )); +LDAP_F char *ldap_err2string LDAP_P(( int err )); +LDAP_F void ldap_perror LDAP_P(( LDAP *ld, char *s )); + +/* + * in modify.c: + */ +LDAP_F int ldap_modify LDAP_P(( LDAP *ld, char *dn, LDAPMod **mods )); +LDAP_F int ldap_modify_s LDAP_P(( LDAP *ld, char *dn, LDAPMod **mods )); + +/* + * in modrdn.c: + */ +LDAP_F int ldap_modrdn LDAP_P(( LDAP *ld, char *dn, char *newrdn )); +LDAP_F int ldap_modrdn_s LDAP_P(( LDAP *ld, char *dn, char *newrdn )); +LDAP_F int ldap_modrdn2 LDAP_P(( LDAP *ld, char *dn, char *newrdn, + int deleteoldrdn )); +LDAP_F int ldap_modrdn2_s LDAP_P(( LDAP *ld, char *dn, char *newrdn, + int deleteoldrdn)); + +/* + * in open.c: + */ +LDAP_F LDAP *ldap_open LDAP_P(( char *host, int port )); +LDAP_F LDAP *ldap_init LDAP_P(( char *defhost, int defport )); + +/* + * in getentry.c: + */ +LDAP_F LDAPMessage *ldap_first_entry LDAP_P(( LDAP *ld, LDAPMessage *chain )); +LDAP_F LDAPMessage *ldap_next_entry LDAP_P(( LDAP *ld, LDAPMessage *entry )); +LDAP_F int ldap_count_entries LDAP_P(( LDAP *ld, LDAPMessage *chain )); + +/* + * in addentry.c + */ +LDAP_F LDAPMessage *ldap_delete_result_entry LDAP_P(( LDAPMessage **list, + LDAPMessage *e )); +LDAP_F void ldap_add_result_entry LDAP_P(( LDAPMessage **list, LDAPMessage *e )); + +/* + * in getdn.c + */ +LDAP_F char *ldap_get_dn LDAP_P(( LDAP *ld, LDAPMessage *entry )); +LDAP_F char *ldap_dn2ufn LDAP_P(( char *dn )); +LDAP_F char **ldap_explode_dn LDAP_P(( char *dn, int notypes )); +LDAP_F char **ldap_explode_dns LDAP_P(( char *dn )); +LDAP_F int ldap_is_dns_dn LDAP_P(( char *dn )); + +/* + * in getattr.c + */ +LDAP_F char *ldap_first_attribute LDAP_P(( LDAP *ld, LDAPMessage *entry, + BerElement **ber )); +LDAP_F char *ldap_next_attribute LDAP_P(( LDAP *ld, LDAPMessage *entry, + BerElement *ber )); + +/* + * in getvalues.c + */ +LDAP_F char **ldap_get_values LDAP_P(( LDAP *ld, LDAPMessage *entry, char *target )); +LDAP_F struct berval **ldap_get_values_len LDAP_P(( LDAP *ld, LDAPMessage *entry, + char *target )); +LDAP_F int ldap_count_values LDAP_P(( char **vals )); +LDAP_F int ldap_count_values_len LDAP_P(( struct berval **vals )); +LDAP_F void ldap_value_free LDAP_P(( char **vals )); +LDAP_F void ldap_value_free_len LDAP_P(( struct berval **vals )); + +/* + * in result.c: + */ +LDAP_F int ldap_result LDAP_P(( LDAP *ld, int msgid, int all, + LDAP_timeval_p timeout, LDAPMessage **result )); +LDAP_F int ldap_msgfree LDAP_P(( LDAPMessage *lm )); +LDAP_F int ldap_msgdelete LDAP_P(( LDAP *ld, int msgid )); + +/* + * in search.c: + */ +LDAP_F int ldap_search LDAP_P(( LDAP *ld, char *base, int scope, char *filter, + char **attrs, int attrsonly )); +LDAP_F int ldap_search_s LDAP_P(( LDAP *ld, char *base, int scope, char *filter, + char **attrs, int attrsonly, LDAPMessage **res )); +LDAP_F int ldap_search_st LDAP_P(( LDAP *ld, char *base, int scope, char *filter, + char **attrs, int attrsonly, struct timeval *timeout, LDAPMessage **res )); + +/* + * in ufn.c + */ +LDAP_F int ldap_ufn_search_c LDAP_P(( LDAP *ld, char *ufn, char **attrs, + int attrsonly, LDAPMessage **res, int (*cancelproc)( void *cl ), + void *cancelparm )); +LDAP_F int ldap_ufn_search_ct LDAP_P(( LDAP *ld, char *ufn, char **attrs, + int attrsonly, LDAPMessage **res, int (*cancelproc)( void *cl ), + void *cancelparm, char *tag1, char *tag2, char *tag3 )); +LDAP_F int ldap_ufn_search_s LDAP_P(( LDAP *ld, char *ufn, char **attrs, + int attrsonly, LDAPMessage **res )); +LDAP_F LDAPFiltDesc *ldap_ufn_setfilter LDAP_P(( LDAP *ld, char *fname )); +LDAP_F void ldap_ufn_setprefix LDAP_P(( LDAP *ld, char *prefix )); +LDAP_F int ldap_ufn_timeout LDAP_P(( void *tvparam )); -#if defined(ultrix) || defined(VMS) || defined( nextstep ) -extern char *strdup(); -#endif +/* + * in unbind.c + */ +LDAP_F int ldap_unbind LDAP_P(( LDAP *ld )); +LDAP_F int ldap_unbind_s LDAP_P(( LDAP *ld )); -#else /* NEEDPROTOS */ -#if !defined(MACOS) && !defined(DOS) && !defined(_WIN32) && !defined(WINSOCK) -#include -#endif -#if defined(WINSOCK) -#include "proto-ld.h" -#else -#include "proto-ldap.h" -#endif -#ifdef VMS -extern char *strdup( const char *s ); -#endif -#if defined(ultrix) || defined( nextstep ) -extern char *strdup(); -#endif +/* + * in getfilter.c + */ +LDAP_F LDAPFiltDesc *ldap_init_getfilter LDAP_P(( char *fname )); +LDAP_F LDAPFiltDesc *ldap_init_getfilter_buf LDAP_P(( char *buf, long buflen )); +LDAP_F LDAPFiltInfo *ldap_getfirstfilter LDAP_P(( LDAPFiltDesc *lfdp, char *tagpat, + char *value )); +LDAP_F LDAPFiltInfo *ldap_getnextfilter LDAP_P(( LDAPFiltDesc *lfdp )); +LDAP_F void ldap_setfilteraffixes LDAP_P(( LDAPFiltDesc *lfdp, char *prefix, char *suffix )); +LDAP_F void ldap_build_filter LDAP_P(( char *buf, unsigned long buflen, + char *pattern, char *prefix, char *suffix, char *attr, + char *value, char **valwords )); -#endif /* NEEDPROTOS */ +/* + * in free.c + */ +LDAP_F void ldap_getfilter_free LDAP_P(( LDAPFiltDesc *lfdp )); +LDAP_F void ldap_mods_free LDAP_P(( LDAPMod **mods, int freemods )); + +/* + * in friendly.c + */ +LDAP_F char *ldap_friendly_name LDAP_P(( char *filename, char *uname, + FriendlyMap **map )); +LDAP_F void ldap_free_friendlymap LDAP_P(( FriendlyMap **map )); + + +/* + * in cldap.c + */ +LDAP_F LDAP *cldap_open LDAP_P(( char *host, int port )); +LDAP_F void cldap_close LDAP_P(( LDAP *ld )); +LDAP_F int cldap_search_s LDAP_P(( LDAP *ld, char *base, int scope, char *filter, + char **attrs, int attrsonly, LDAPMessage **res, char *logdn )); +LDAP_F void cldap_setretryinfo LDAP_P(( LDAP *ld, int tries, int timeout )); + + +/* + * in sort.c + */ +LDAP_F int ldap_sort_entries LDAP_P(( LDAP *ld, LDAPMessage **chain, char *attr, + int (*cmp)() )); +LDAP_F int ldap_sort_values LDAP_P(( LDAP *ld, char **vals, int (*cmp)() )); +LDAP_F int ldap_sort_strcasecmp LDAP_P(( char **a, char **b )); + + +/* + * in url.c + */ +LDAP_F int ldap_is_ldap_url LDAP_P(( char *url )); +LDAP_F int ldap_url_parse LDAP_P(( char *url, LDAPURLDesc **ludpp )); +LDAP_F void ldap_free_urldesc LDAP_P(( LDAPURLDesc *ludp )); +LDAP_F int ldap_url_search LDAP_P(( LDAP *ld, char *url, int attrsonly )); +LDAP_F int ldap_url_search_s LDAP_P(( LDAP *ld, char *url, int attrsonly, + LDAPMessage **res )); +LDAP_F int ldap_url_search_st LDAP_P(( LDAP *ld, char *url, int attrsonly, + struct timeval *timeout, LDAPMessage **res )); + + +/* + * in charset.c + */ +LDAP_F void ldap_set_string_translators LDAP_P(( LDAP *ld, + BERTranslateProc encode_proc, BERTranslateProc decode_proc )); +LDAP_F int ldap_translate_from_t61 LDAP_P(( LDAP *ld, char **bufp, + unsigned long *lenp, int free_input )); +LDAP_F int ldap_translate_to_t61 LDAP_P(( LDAP *ld, char **bufp, + unsigned long *lenp, int free_input )); +LDAP_F void ldap_enable_translation LDAP_P(( LDAP *ld, LDAPMessage *entry, + int enable )); + +LDAP_F int ldap_t61_to_8859 LDAP_P(( char **bufp, unsigned long *buflenp, + int free_input )); +LDAP_F int ldap_8859_to_t61 LDAP_P(( char **bufp, unsigned long *buflenp, + int free_input )); + + +/* + * in msdos/winsock/wsa.c + */ +LDAP_F void ldap_memfree LDAP_P(( void *p )); + +LDAP_END_DECL -#ifdef __cplusplus -} -#endif #endif /* _LDAP_H */ diff --git a/include/lthread_rdwr.h b/include/lthread_rdwr.h index 1c751f39a6..100e9b62d2 100644 --- a/include/lthread_rdwr.h +++ b/include/lthread_rdwr.h @@ -29,16 +29,16 @@ typedef void * pthread_rdwrattr_t; #define pthread_rdwrattr_default NULL; -int pthread_rdwr_init_np LDAP_P((pthread_rdwr_t *rdwrp, pthread_rdwrattr_t *attrp)); -int pthread_rdwr_rlock_np LDAP_P((pthread_rdwr_t *rdwrp)); -int pthread_rdwr_runlock_np LDAP_P((pthread_rdwr_t *rdwrp)); -int pthread_rdwr_wlock_np LDAP_P((pthread_rdwr_t *rdwrp)); -int pthread_rdwr_wunlock_np LDAP_P((pthread_rdwr_t *rdwrp)); +LDAP_F int pthread_rdwr_init_np LDAP_P((pthread_rdwr_t *rdwrp, pthread_rdwrattr_t *attrp)); +LDAP_F int pthread_rdwr_rlock_np LDAP_P((pthread_rdwr_t *rdwrp)); +LDAP_F int pthread_rdwr_runlock_np LDAP_P((pthread_rdwr_t *rdwrp)); +LDAP_F int pthread_rdwr_wlock_np LDAP_P((pthread_rdwr_t *rdwrp)); +LDAP_F int pthread_rdwr_wunlock_np LDAP_P((pthread_rdwr_t *rdwrp)); #ifdef LDAP_DEBUG -int pthread_rdwr_rchk_np LDAP_P((pthread_rdwr_t *rdwrp)); -int pthread_rdwr_wchk_np LDAP_P((pthread_rdwr_t *rdwrp)); -int pthread_rdwr_rwchk_np LDAP_P((pthread_rdwr_t *rdwrp)); +LDAP_F int pthread_rdwr_rchk_np LDAP_P((pthread_rdwr_t *rdwrp)); +LDAP_F int pthread_rdwr_wchk_np LDAP_P((pthread_rdwr_t *rdwrp)); +LDAP_F int pthread_rdwr_rwchk_np LDAP_P((pthread_rdwr_t *rdwrp)); #endif /* LDAP_DEBUG */ LDAP_END_DECL diff --git a/include/portable.h.bot b/include/portable.h.bot index 4a45b92795..26034fd832 100644 --- a/include/portable.h.bot +++ b/include/portable.h.bot @@ -3,7 +3,6 @@ # include #endif -#include "bridge.h" #include "ldap_cdefs.h" #endif /* _LDAP_PORTABLE_H */ diff --git a/include/portable.h.in b/include/portable.h.in index 808e9111bb..f68de6de3c 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -108,13 +108,13 @@ is provided ``as is'' without express or implied warranty. #undef DECL_SYS_ERRLIST /* define if you have berkeley db */ -#undef HAVE_BERKELEY_DB2 +#undef HAVE_BERKELEY_DB /* define if you have berkeley db2 */ #undef HAVE_BERKELEY_DB2 -/* define if you have Mach CThreads */ -#undef HAVE_CTHREADS +/* define if you have crypt */ +#undef HAVE_CRYPT /* define if you have DCE */ #undef HAVE_DCE @@ -140,6 +140,9 @@ is provided ``as is'' without express or implied warranty. /* define if you have NDBM */ #undef HAVE_NDBM +/* define if you have Mach CThreads */ +#undef HAVE_MACH_CTHREADS + /* define if you have a preemptive POSIX Threads implementation */ #undef HAVE_PREEMPTIVE_PTHREADS @@ -152,14 +155,68 @@ is provided ``as is'' without express or implied warranty. /* define if you have -ltermcap */ #undef HAVE_TERMCAP +/* define if you have -lwrap */ +#undef HAVE_TCPD + +/* define this for connectionless LDAP support */ +#undef LDAP_CONNECTIONLESS + +/* define this to add debugging code */ +#undef LDAP_DEBUG + +/* define this for LDAP DNS support */ +#undef LDAP_DNS + +/* define this to remove -lldap cache support */ +#undef LDAP_NOCACHE + +/* define this for LDAP referrals support */ +#undef LDAP_REFERRALS + +/* define this for LDAP User Interface support */ +#undef LDAP_LIBUI + /* define this for ACL Group support */ #undef SLAPD_ACLGROUPS +/* define this for crypt(3) password support */ +#undef SLAPD_CRYPT + +/* define this to use SLAPD LDBM backend */ +#undef SLAPD_LDBM + +/* define this for MD5 password support */ +#undef SLAPD_MD5 + +/* define this to use SLAPD passwd backend */ +#undef SLAPD_PASSWD + +/* define this for phonetic support */ +#undef SLAPD_PHONETIC + /* define this for Reverse Lookup support */ #undef SLAPD_RLOOKUPS -/* define this for phonetic support */ -#undef SLAPD_PHONETIC +/* define this for SHA1 password support */ +#undef SLAPD_SHA1 + +/* define this to use SLAPD shell backend */ +#undef SLAPD_SHELL + +/* define this to use DBBTREE w/ LDBM backend */ +#undef LDBM_USE_DBBTREE + +/* define this to use DBHASH w/ LDBM backend */ +#undef LDBM_USE_DBHASH + +/* define this if you want no termcap support */ +#undef NO_TERMCAP + +/* define this if you want no thread support */ +#undef NO_THREADS + +/* define this if the thread package is preemptive */ +#undef THREAD_PREEMPTIVE /* Define if you have the bcopy function. */ #undef HAVE_BCOPY @@ -363,7 +420,6 @@ is provided ``as is'' without express or implied warranty. # include #endif -#include "bridge.h" #include "ldap_cdefs.h" #endif /* _LDAP_PORTABLE_H */ diff --git a/include/proto-lber.h b/include/proto-lber.h deleted file mode 100644 index c84687200b..0000000000 --- a/include/proto-lber.h +++ /dev/null @@ -1,102 +0,0 @@ -/* - * lber-proto.h - * function prototypes for lber library - */ - -#ifdef LDAP_DEBUG -extern int lber_debug; -#endif - -#ifndef LDAPFUNCDECL -#ifdef _WIN32 -#define LDAPFUNCDECL __declspec( dllexport ) -#else /* _WIN32 */ -#define LDAPFUNCDECL -#endif /* _WIN32 */ -#endif /* LDAPFUNCDECL */ - -/* - * in bprint.c: - */ -LDAPFUNCDECL void lber_bprint( char *data, int len ); - -/* - * in decode.c: - */ -LDAPFUNCDECL unsigned long ber_get_tag( BerElement *ber ); -LDAPFUNCDECL unsigned long ber_skip_tag( BerElement *ber, unsigned long *len ); -LDAPFUNCDECL unsigned long ber_peek_tag( BerElement *ber, unsigned long *len ); -LDAPFUNCDECL unsigned long ber_get_int( BerElement *ber, long *num ); -LDAPFUNCDECL unsigned long ber_get_stringb( BerElement *ber, char *buf, - unsigned long *len ); -LDAPFUNCDECL unsigned long ber_get_stringa( BerElement *ber, char **buf ); -LDAPFUNCDECL unsigned long ber_get_stringal( BerElement *ber, struct berval **bv ); -LDAPFUNCDECL unsigned long ber_get_bitstringa( BerElement *ber, char **buf, - unsigned long *len ); -LDAPFUNCDECL unsigned long ber_get_null( BerElement *ber ); -LDAPFUNCDECL unsigned long ber_get_boolean( BerElement *ber, int *boolval ); -LDAPFUNCDECL unsigned long ber_first_element( BerElement *ber, unsigned long *len, - char **last ); -LDAPFUNCDECL unsigned long ber_next_element( BerElement *ber, unsigned long *len, - char *last ); -#if defined( MACOS ) || defined( BC31 ) || defined( _WIN32 ) -LDAPFUNCDECL unsigned long ber_scanf( BerElement *ber, char *fmt, ... ); -#else -LDAPFUNCDECL unsigned long ber_scanf(); -#endif -LDAPFUNCDECL void ber_bvfree( struct berval *bv ); -LDAPFUNCDECL void ber_bvecfree( struct berval **bv ); -LDAPFUNCDECL struct berval *ber_bvdup( struct berval *bv ); -#ifdef STR_TRANSLATION -LDAPFUNCDECL void ber_set_string_translators( BerElement *ber, - BERTranslateProc encode_proc, BERTranslateProc decode_proc ); -#endif /* STR_TRANSLATION */ - -/* - * in encode.c - */ -LDAPFUNCDECL int ber_put_enum( BerElement *ber, long num, unsigned long tag ); -LDAPFUNCDECL int ber_put_int( BerElement *ber, long num, unsigned long tag ); -LDAPFUNCDECL int ber_put_ostring( BerElement *ber, char *str, unsigned long len, - unsigned long tag ); -LDAPFUNCDECL int ber_put_string( BerElement *ber, char *str, unsigned long tag ); -LDAPFUNCDECL int ber_put_bitstring( BerElement *ber, char *str, - unsigned long bitlen, unsigned long tag ); -LDAPFUNCDECL int ber_put_null( BerElement *ber, unsigned long tag ); -LDAPFUNCDECL int ber_put_boolean( BerElement *ber, int boolval, - unsigned long tag ); -LDAPFUNCDECL int ber_start_seq( BerElement *ber, unsigned long tag ); -LDAPFUNCDECL int ber_start_set( BerElement *ber, unsigned long tag ); -LDAPFUNCDECL int ber_put_seq( BerElement *ber ); -LDAPFUNCDECL int ber_put_set( BerElement *ber ); -#if defined( MACOS ) || defined( BC31 ) || defined( _WIN32 ) -LDAPFUNCDECL int ber_printf( BerElement *ber, char *fmt, ... ); -#else -LDAPFUNCDECL int ber_printf(); -#endif - -/* - * in io.c: - */ -LDAPFUNCDECL long ber_read( BerElement *ber, char *buf, unsigned long len ); -LDAPFUNCDECL long ber_write( BerElement *ber, char *buf, unsigned long len, - int nosos ); -LDAPFUNCDECL void ber_free( BerElement *ber, int freebuf ); -LDAPFUNCDECL int ber_flush( Sockbuf *sb, BerElement *ber, int freeit ); -LDAPFUNCDECL BerElement *ber_alloc( void ); -LDAPFUNCDECL BerElement *der_alloc( void ); -LDAPFUNCDECL BerElement *ber_alloc_t( int options ); -LDAPFUNCDECL BerElement *ber_dup( BerElement *ber ); -LDAPFUNCDECL void ber_dump( BerElement *ber, int inout ); -LDAPFUNCDECL void ber_sos_dump( Seqorset *sos ); -LDAPFUNCDECL unsigned long ber_get_next( Sockbuf *sb, unsigned long *len, - BerElement *ber ); -LDAPFUNCDECL void ber_init( BerElement *ber, int options ); -LDAPFUNCDECL void ber_reset( BerElement *ber, int was_writing ); - -#ifdef NEEDGETOPT -/* - * in getopt.c - */ -int getopt( int nargc, char **nargv, char *ostr ); -#endif /* NEEDGETOPT */ diff --git a/include/proto-ldap.h b/include/proto-ldap.h deleted file mode 100644 index 971ab5b34e..0000000000 --- a/include/proto-ldap.h +++ /dev/null @@ -1,276 +0,0 @@ -/* - * proto-ldap.h - * function prototypes for ldap library - */ - - -#ifndef LDAPFUNCDECL -#ifdef _WIN32 -#define LDAPFUNCDECL __declspec( dllexport ) -#else /* _WIN32 */ -#define LDAPFUNCDECL -#endif /* _WIN32 */ -#endif /* LDAPFUNCDECL */ - - -/* - * in abandon.c: - */ -LDAPFUNCDECL int ldap_abandon( LDAP *ld, int msgid ); - -/* - * in add.c: - */ -LDAPFUNCDECL int ldap_add( LDAP *ld, char *dn, LDAPMod **attrs ); -LDAPFUNCDECL int ldap_add_s( LDAP *ld, char *dn, LDAPMod **attrs ); - -/* - * in bind.c: - */ -LDAPFUNCDECL int ldap_bind( LDAP *ld, char *who, char *passwd, int authmethod ); -LDAPFUNCDECL int ldap_bind_s( LDAP *ld, char *who, char *cred, int method ); -#ifdef LDAP_REFERRALS -LDAPFUNCDECL void ldap_set_rebind_proc( LDAP *ld, int (*rebindproc)( LDAP *ld, - char **dnp, char **passwdp, int *authmethodp, int freeit )); -#endif /* LDAP_REFERRALS */ - -/* - * in sbind.c: - */ -LDAPFUNCDECL int ldap_simple_bind( LDAP *ld, char *who, char *passwd ); -LDAPFUNCDECL int ldap_simple_bind_s( LDAP *ld, char *who, char *passwd ); - -/* - * in kbind.c: - */ -LDAPFUNCDECL int ldap_kerberos_bind_s( LDAP *ld, char *who ); -LDAPFUNCDECL int ldap_kerberos_bind1( LDAP *ld, char *who ); -LDAPFUNCDECL int ldap_kerberos_bind1_s( LDAP *ld, char *who ); -LDAPFUNCDECL int ldap_kerberos_bind2( LDAP *ld, char *who ); -LDAPFUNCDECL int ldap_kerberos_bind2_s( LDAP *ld, char *who ); - - -#ifndef NO_CACHE -/* - * in cache.c - */ -LDAPFUNCDECL int ldap_enable_cache( LDAP *ld, long timeout, long maxmem ); -LDAPFUNCDECL void ldap_disable_cache( LDAP *ld ); -LDAPFUNCDECL void ldap_set_cache_options( LDAP *ld, unsigned long opts ); -LDAPFUNCDECL void ldap_destroy_cache( LDAP *ld ); -LDAPFUNCDECL void ldap_flush_cache( LDAP *ld ); -LDAPFUNCDECL void ldap_uncache_entry( LDAP *ld, char *dn ); -LDAPFUNCDECL void ldap_uncache_request( LDAP *ld, int msgid ); -#endif /* !NO_CACHE */ - -/* - * in compare.c: - */ -LDAPFUNCDECL int ldap_compare( LDAP *ld, char *dn, char *attr, char *value ); -LDAPFUNCDECL int ldap_compare_s( LDAP *ld, char *dn, char *attr, char *value ); - -/* - * in delete.c: - */ -LDAPFUNCDECL int ldap_delete( LDAP *ld, char *dn ); -LDAPFUNCDECL int ldap_delete_s( LDAP *ld, char *dn ); - -/* - * in error.c: - */ -LDAPFUNCDECL int ldap_result2error( LDAP *ld, LDAPMessage *r, int freeit ); -LDAPFUNCDECL char *ldap_err2string( int err ); -LDAPFUNCDECL void ldap_perror( LDAP *ld, char *s ); - -/* - * in modify.c: - */ -LDAPFUNCDECL int ldap_modify( LDAP *ld, char *dn, LDAPMod **mods ); -LDAPFUNCDECL int ldap_modify_s( LDAP *ld, char *dn, LDAPMod **mods ); - -/* - * in modrdn.c: - */ -LDAPFUNCDECL int ldap_modrdn( LDAP *ld, char *dn, char *newrdn ); -LDAPFUNCDECL int ldap_modrdn_s( LDAP *ld, char *dn, char *newrdn ); -LDAPFUNCDECL int ldap_modrdn2( LDAP *ld, char *dn, char *newrdn, - int deleteoldrdn ); -LDAPFUNCDECL int ldap_modrdn2_s( LDAP *ld, char *dn, char *newrdn, - int deleteoldrdn); - -/* - * in open.c: - */ -LDAPFUNCDECL LDAP *ldap_open( char *host, int port ); -LDAPFUNCDECL LDAP *ldap_init( char *defhost, int defport ); - -/* - * in getentry.c: - */ -LDAPFUNCDECL LDAPMessage *ldap_first_entry( LDAP *ld, LDAPMessage *chain ); -LDAPFUNCDECL LDAPMessage *ldap_next_entry( LDAP *ld, LDAPMessage *entry ); -LDAPFUNCDECL int ldap_count_entries( LDAP *ld, LDAPMessage *chain ); - -/* - * in addentry.c - */ -LDAPFUNCDECL LDAPMessage *ldap_delete_result_entry( LDAPMessage **list, - LDAPMessage *e ); -LDAPFUNCDECL void ldap_add_result_entry( LDAPMessage **list, LDAPMessage *e ); - -/* - * in getdn.c - */ -LDAPFUNCDECL char *ldap_get_dn( LDAP *ld, LDAPMessage *entry ); -LDAPFUNCDECL char *ldap_dn2ufn( char *dn ); -LDAPFUNCDECL char **ldap_explode_dn( char *dn, int notypes ); -LDAPFUNCDECL char **ldap_explode_dns( char *dn ); -LDAPFUNCDECL int ldap_is_dns_dn( char *dn ); - -/* - * in getattr.c - */ -LDAPFUNCDECL char *ldap_first_attribute( LDAP *ld, LDAPMessage *entry, - BerElement **ber ); -LDAPFUNCDECL char *ldap_next_attribute( LDAP *ld, LDAPMessage *entry, - BerElement *ber ); - -/* - * in getvalues.c - */ -LDAPFUNCDECL char **ldap_get_values( LDAP *ld, LDAPMessage *entry, char *target ); -LDAPFUNCDECL struct berval **ldap_get_values_len( LDAP *ld, LDAPMessage *entry, - char *target ); -LDAPFUNCDECL int ldap_count_values( char **vals ); -LDAPFUNCDECL int ldap_count_values_len( struct berval **vals ); -LDAPFUNCDECL void ldap_value_free( char **vals ); -LDAPFUNCDECL void ldap_value_free_len( struct berval **vals ); - -/* - * in result.c: - */ -LDAPFUNCDECL int ldap_result( LDAP *ld, int msgid, int all, - struct timeval *timeout, LDAPMessage **result ); -LDAPFUNCDECL int ldap_msgfree( LDAPMessage *lm ); -LDAPFUNCDECL int ldap_msgdelete( LDAP *ld, int msgid ); - -/* - * in search.c: - */ -LDAPFUNCDECL int ldap_search( LDAP *ld, char *base, int scope, char *filter, - char **attrs, int attrsonly ); -LDAPFUNCDECL int ldap_search_s( LDAP *ld, char *base, int scope, char *filter, - char **attrs, int attrsonly, LDAPMessage **res ); -LDAPFUNCDECL int ldap_search_st( LDAP *ld, char *base, int scope, char *filter, - char **attrs, int attrsonly, struct timeval *timeout, LDAPMessage **res ); - -/* - * in ufn.c - */ -LDAPFUNCDECL int ldap_ufn_search_c( LDAP *ld, char *ufn, char **attrs, - int attrsonly, LDAPMessage **res, int (*cancelproc)( void *cl ), - void *cancelparm ); -LDAPFUNCDECL int ldap_ufn_search_ct( LDAP *ld, char *ufn, char **attrs, - int attrsonly, LDAPMessage **res, int (*cancelproc)( void *cl ), - void *cancelparm, char *tag1, char *tag2, char *tag3 ); -LDAPFUNCDECL int ldap_ufn_search_s( LDAP *ld, char *ufn, char **attrs, - int attrsonly, LDAPMessage **res ); -LDAPFUNCDECL LDAPFiltDesc *ldap_ufn_setfilter( LDAP *ld, char *fname ); -LDAPFUNCDECL void ldap_ufn_setprefix( LDAP *ld, char *prefix ); -LDAPFUNCDECL int ldap_ufn_timeout( void *tvparam ); - - -/* - * in unbind.c - */ -LDAPFUNCDECL int ldap_unbind( LDAP *ld ); -LDAPFUNCDECL int ldap_unbind_s( LDAP *ld ); - - -/* - * in getfilter.c - */ -LDAPFUNCDECL LDAPFiltDesc *ldap_init_getfilter( char *fname ); -LDAPFUNCDECL LDAPFiltDesc *ldap_init_getfilter_buf( char *buf, long buflen ); -LDAPFUNCDECL LDAPFiltInfo *ldap_getfirstfilter( LDAPFiltDesc *lfdp, char *tagpat, - char *value ); -LDAPFUNCDECL LDAPFiltInfo *ldap_getnextfilter( LDAPFiltDesc *lfdp ); -LDAPFUNCDECL void ldap_setfilteraffixes( LDAPFiltDesc *lfdp, char *prefix, char *suffix ); -LDAPFUNCDECL void ldap_build_filter( char *buf, unsigned long buflen, - char *pattern, char *prefix, char *suffix, char *attr, - char *value, char **valwords ); - -/* - * in free.c - */ -LDAPFUNCDECL void ldap_getfilter_free( LDAPFiltDesc *lfdp ); -LDAPFUNCDECL void ldap_mods_free( LDAPMod **mods, int freemods ); - -/* - * in friendly.c - */ -LDAPFUNCDECL char *ldap_friendly_name( char *filename, char *uname, - FriendlyMap **map ); -LDAPFUNCDECL void ldap_free_friendlymap( FriendlyMap **map ); - - -/* - * in cldap.c - */ -LDAPFUNCDECL LDAP *cldap_open( char *host, int port ); -LDAPFUNCDECL void cldap_close( LDAP *ld ); -LDAPFUNCDECL int cldap_search_s( LDAP *ld, char *base, int scope, char *filter, - char **attrs, int attrsonly, LDAPMessage **res, char *logdn ); -LDAPFUNCDECL void cldap_setretryinfo( LDAP *ld, int tries, int timeout ); - - -/* - * in sort.c - */ -LDAPFUNCDECL int ldap_sort_entries( LDAP *ld, LDAPMessage **chain, char *attr, - int (*cmp)() ); -LDAPFUNCDECL int ldap_sort_values( LDAP *ld, char **vals, int (*cmp)() ); -LDAPFUNCDECL int ldap_sort_strcasecmp( char **a, char **b ); - - -/* - * in url.c - */ -LDAPFUNCDECL int ldap_is_ldap_url( char *url ); -LDAPFUNCDECL int ldap_url_parse( char *url, LDAPURLDesc **ludpp ); -LDAPFUNCDECL void ldap_free_urldesc( LDAPURLDesc *ludp ); -LDAPFUNCDECL int ldap_url_search( LDAP *ld, char *url, int attrsonly ); -LDAPFUNCDECL int ldap_url_search_s( LDAP *ld, char *url, int attrsonly, - LDAPMessage **res ); -LDAPFUNCDECL int ldap_url_search_st( LDAP *ld, char *url, int attrsonly, - struct timeval *timeout, LDAPMessage **res ); - - -/* - * in charset.c - */ -#ifdef STR_TRANSLATION -LDAPFUNCDECL void ldap_set_string_translators( LDAP *ld, - BERTranslateProc encode_proc, BERTranslateProc decode_proc ); -LDAPFUNCDECL int ldap_translate_from_t61( LDAP *ld, char **bufp, - unsigned long *lenp, int free_input ); -LDAPFUNCDECL int ldap_translate_to_t61( LDAP *ld, char **bufp, - unsigned long *lenp, int free_input ); -LDAPFUNCDECL void ldap_enable_translation( LDAP *ld, LDAPMessage *entry, - int enable ); - -#ifdef LDAP_CHARSET_8859 -LDAPFUNCDECL int ldap_t61_to_8859( char **bufp, unsigned long *buflenp, - int free_input ); -LDAPFUNCDECL int ldap_8859_to_t61( char **bufp, unsigned long *buflenp, - int free_input ); -#endif /* LDAP_CHARSET_8859 */ -#endif /* STR_TRANSLATION */ - - -#ifdef WINSOCK -/* - * in msdos/winsock/wsa.c - */ -LDAPFUNCDECL void ldap_memfree( void *p ); -#endif /* WINSOCK */ diff --git a/libraries/libldap/url.c b/libraries/libldap/url.c index 08b47efd6b..adf62b805f 100644 --- a/libraries/libldap/url.c +++ b/libraries/libldap/url.c @@ -24,14 +24,13 @@ static char copyright[] = "@(#) Copyright (c) 1996 Regents of the University of #include #include #include +#include #ifdef MACOS -#include #include "macos.h" #endif /* MACOS */ #if defined( DOS ) || defined( _WIN32 ) -#include #include #include "msdos.h" #endif /* DOS || _WIN32 */ @@ -47,15 +46,9 @@ static char copyright[] = "@(#) Copyright (c) 1996 Regents of the University of #include "ldap-int.h" -#ifdef NEEDPROTOS -static int skip_url_prefix( char **urlp, int *enclosedp ); -static void hex_unescape( char *s ); -static int unhex( char c ); -#else /* NEEDPROTOS */ -static int skip_url_prefix(); -static void hex_unescape(); -static int unhex(); -#endif /* NEEDPROTOS */ +static int skip_url_prefix LDAP_P(( char **urlp, int *enclosedp )); +static void hex_unescape LDAP_P(( char *s )); +static int unhex LDAP_P(( char c )); int @@ -305,10 +298,10 @@ ldap_url_search( LDAP *ld, char *url, int attrsonly ) ber_free( ber, 1 ); } else { #ifdef LDAP_REFERRALS - err = send_server_request( ld, ber, ld->ld_msgid, NULL, srv, + err = ldap_send_server_request( ld, ber, ld->ld_msgid, NULL, srv, NULL, 1 ); #else /* LDAP_REFERRALS */ - err = send_initial_request( ld, LDAP_REQ_SEARCH, + err = ldap_send_initial_request( ld, LDAP_REQ_SEARCH, ludp->lud_dn, ber ); #endif /* LDAP_REFERRALS */ } diff --git a/libraries/libldbm/Makefile.in b/libraries/libldbm/Makefile.in index 34cead14cc..dd1c842bba 100644 --- a/libraries/libldbm/Makefile.in +++ b/libraries/libldbm/Makefile.in @@ -10,7 +10,6 @@ OBJS = ldbm.o LDAP_INCDIR= ../../include LDAP_LIBDIR= ../../libraries -XDEFS = @LDBM_DEFS@ XLIBS = @LDBM_LIBS@ -lavl testldbm: libldbm.a testldbm.o diff --git a/libraries/liblthread/Makefile.in b/libraries/liblthread/Makefile.in index bf75f2db02..a76fb6c315 100644 --- a/libraries/liblthread/Makefile.in +++ b/libraries/liblthread/Makefile.in @@ -10,7 +10,6 @@ OBJS = rdwr.o thread.o stack.o LDAP_INCDIR= ../../include LDAP_LIBDIR= ../../libraries -XDEFS = @LTHREAD_DEFS@ XLIBS = @LTHREAD_LIBS@ diff --git a/libraries/liblutil/Makefile.in b/libraries/liblutil/Makefile.in index e4cd68314c..d5911abe54 100644 --- a/libraries/liblutil/Makefile.in +++ b/libraries/liblutil/Makefile.in @@ -9,4 +9,3 @@ OBJS = base64.o md5.o sha1.o LDAP_INCDIR= ../../include LDAP_LIBDIR= ../../libraries -XDEFS = @LUTIL_DEFS@ diff --git a/servers/ldapd/Makefile.in b/servers/ldapd/Makefile.in index 79610e878f..fc2db5a5cf 100644 --- a/servers/ldapd/Makefile.in +++ b/servers/ldapd/Makefile.in @@ -17,7 +17,6 @@ LDAP_LIBDIR= ../../libraries BUILD_OPT = "--enable-ldapd" BUILD_SRV = @BUILD_LDAPD@ -XDEFS= @LDAPD_DEFS@ XLIBS= @LDAPD_LIBS@ all-local: $(PROGRAMS) diff --git a/servers/slapd/Makefile.in b/servers/slapd/Makefile.in index 2ac592aad6..c75bf99eb1 100644 --- a/servers/slapd/Makefile.in +++ b/servers/slapd/Makefile.in @@ -29,7 +29,6 @@ all-local: FORCE $(MAKE) $(MFLAGS) slapd (cd tools; $(MAKE) $(MFLAGS) all) -XDEFS = @SLAPD_DEFS@ @LDBM_DEFS@ @LTHREAD_DEFS@ @LUTIL_DEFS@ XLIBS = @SLAPD_LIBS@ libbackends.a \ -lavl -llutil -lldbm @LDBM_LIBS@ -llthread @LTHREAD_LIBS@ @LUTIL_LIBS@ diff --git a/servers/slapd/back-ldbm/Makefile.in b/servers/slapd/back-ldbm/Makefile.in index 00a29c73ce..0e2d15b61e 100644 --- a/servers/slapd/back-ldbm/Makefile.in +++ b/servers/slapd/back-ldbm/Makefile.in @@ -14,7 +14,6 @@ BUILD_OPT = "--enable-ldbm" BUILD_SRV = @BUILD_LDBM@ XINCPATH = -I.. -I$(srcdir)/.. -XDEFS = @SLAPD_DEFS@ @LDBM_DEFS@ @LTHREAD_DEFS@ @LUTIL_DEFS@ PROGRAMS = libback-ldbm.a diff --git a/servers/slapd/back-passwd/Makefile.in b/servers/slapd/back-passwd/Makefile.in index 577f50daf7..47b4a782fe 100644 --- a/servers/slapd/back-passwd/Makefile.in +++ b/servers/slapd/back-passwd/Makefile.in @@ -10,7 +10,6 @@ BUILD_SRV = @BUILD_PASSWD@ PROGRAMS= libback-passwd.a XINCPATH = -I.. -I$(srcdir)/.. -XDEFS = @LTHREAD_DEFS@ all-local: FORCE $(MAKE) $(MFLAGS) libback-passwd.a diff --git a/servers/slapd/back-shell/Makefile.in b/servers/slapd/back-shell/Makefile.in index f3e1f3e53b..0ae8b98180 100644 --- a/servers/slapd/back-shell/Makefile.in +++ b/servers/slapd/back-shell/Makefile.in @@ -12,7 +12,6 @@ BUILD_SRV = @BUILD_SHELL@ PROGRAMS = libback-shell.a XINCPATH = -I.. -I$(srcdir)/.. -XDEFS = @LTHREAD_DEFS@ all-local: FORCE $(MAKE) $(MFLAGS) libback-shell.a diff --git a/servers/slapd/tools/Makefile.in b/servers/slapd/tools/Makefile.in index 1bfc086302..7b76fb9346 100644 --- a/servers/slapd/tools/Makefile.in +++ b/servers/slapd/tools/Makefile.in @@ -44,7 +44,6 @@ build-ldbm: FORCE ldbm-tools: $(PROGRAMS) -XDEFS = @SLAPD_DEFS@ @LDBM_DEFS@ @LTHREAD_DEFS@ XLIBS = @SLAPD_LIBS@ -lavl -lldbm @LDBM_LIBS@ -llthread @LTHREAD_LIBS@ -llutil @LUTIL_LIBS@ build-edb2ldif: FORCE diff --git a/servers/slurpd/Makefile.in b/servers/slurpd/Makefile.in index 591efe24a6..30940db12f 100644 --- a/servers/slurpd/Makefile.in +++ b/servers/slurpd/Makefile.in @@ -20,7 +20,6 @@ BUILD_SRV = @BUILD_SLURPD@ all-local: slurpd -XDEFS = @SLURPD_DEFS@ @LTHREAD_DEFS@ XLIBS = @SLURPD_LIBS@ -llthread @LTHREAD_LIBS@ slurpd: version.o From 047f7b08f251fcb0f653fa8c6a25146202d09a0d Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 20 Oct 1998 04:00:50 +0000 Subject: [PATCH 089/148] VC++ Port: round 1 --- include/ac/errno.h | 14 ++ include/ac/regex.h | 15 ++ include/ac/socket.h | 72 +++++++ include/ldap.h | 9 +- include/ldapconfig.h.edit | 2 +- include/ldapconfig.h.nt | 302 ++++++++++++++++++++++++++ include/portable.h.bot | 1 + include/portable.h.nt | 440 ++++++++++++++++++++++++++++++++++++++ 8 files changed, 849 insertions(+), 6 deletions(-) create mode 100644 include/ac/errno.h create mode 100644 include/ac/regex.h create mode 100644 include/ac/socket.h create mode 100644 include/ldapconfig.h.nt create mode 100644 include/portable.h.nt diff --git a/include/ac/errno.h b/include/ac/errno.h new file mode 100644 index 0000000000..edeb90764e --- /dev/null +++ b/include/ac/errno.h @@ -0,0 +1,14 @@ +/* Generic errno.h */ + +#ifndef _AC_ERRNO_H +#define _AC_ERRNO_H + +#if defined( HAVE_SYS_ERRNO_H ) +# include +#elif defined( HAVE_ERRNO_H ) +# include +#endif + +/* use _POSIX_VERSION for POSIX.1 code */ + +#endif /* _AC_ERRNO_H */ diff --git a/include/ac/regex.h b/include/ac/regex.h new file mode 100644 index 0000000000..a98ee78998 --- /dev/null +++ b/include/ac/regex.h @@ -0,0 +1,15 @@ +/* + * Generic Regex + */ +#ifndef _AC_REGEX_H_ +#define _AC_REGEX_H_ + +#ifdef HAVE_REGEX_H + /* have regex.h, assume it's POSIX compliant */ +# include +#else + /* no regex.h, use compatibility library */ +# include +#endif /* ! regex.h */ + +#endif /* _AC_REGEX_H_ */ \ No newline at end of file diff --git a/include/ac/socket.h b/include/ac/socket.h new file mode 100644 index 0000000000..dde8c62cdf --- /dev/null +++ b/include/ac/socket.h @@ -0,0 +1,72 @@ +/* + * Generic socket.h + */ + +#ifndef _AC_SOCKET_H_ +#define _AC_SOCKET_H_ + +#ifdef HAVE_SYS_SOCKET_H +#include +#include + +#include +#include +#include +#include +#include +#endif + +#ifdef HAVE_WINSOCK2 +#include +#include +#endif + +#ifdef HAVE_WINSOCK +#include +#endif + +#ifdef HAVE_PCNFS +#include +#endif /* HAVE_PCNFS */ + +#ifndef INADDR_LOOPBACK +#define INADDR_LOOPBACK ((unsigned long) 0x7f000001) +#endif + +#ifdef MACOS +#define tcp_close( s ) tcpclose( s ) +#else /* MACOS */ +#ifdef DOS +#ifdef PCNFS +#define tcp_close( s ) close( s ) +#endif /* PCNFS */ +#ifdef NCSA +#define tcp_close( s ) netclose( s ); netshut() +#endif /* NCSA */ +#ifdef WINSOCK +#define tcp_close( s ) closesocket( s ); WSACleanup(); +#endif /* WINSOCK */ +#else /* DOS */ +#define tcp_close( s ) close( s ) +#endif /* DOS */ +#endif /* MACOS */ + +#if !defined(__alpha) || defined(VMS) +#define HTONL( l ) htonl( l ) +#define NTOHL( l ) ntohl( l ) +#else /* __alpha && !VMS */ +/* + * htonl and ntohl on the DEC Alpha under OSF 1 seem to only swap the + * lower-order 32-bits of a (64-bit) long, so we define correct versions + * here. + */ +#define HTONL( l ) (((long)htonl( (l) & 0x00000000FFFFFFFF )) << 32 \ + | htonl( ( (l) & 0xFFFFFFFF00000000 ) >> 32 )) + +#define NTOHL( l ) (((long)ntohl( (l) & 0x00000000FFFFFFFF )) << 32 \ + | ntohl( ( (l) & 0xFFFFFFFF00000000 ) >> 32 )) + +#endif /* __alpha && !VMS */ + + +#endif /* _AC_SOCKET_H_ */ \ No newline at end of file diff --git a/include/ldap.h b/include/ldap.h index c98bcf75e0..9b67d5d623 100644 --- a/include/ldap.h +++ b/include/ldap.h @@ -213,8 +213,6 @@ typedef struct ldapmod { struct ldapmod *mod_next; } LDAPMod; -typedef struct timeval * LDAP_timeval_p; - /* * possible error codes we can return */ @@ -713,9 +711,10 @@ LDAP_F void cldap_setretryinfo LDAP_P(( LDAP *ld, int tries, int timeout )); /* * in sort.c */ -LDAP_F int ldap_sort_entries LDAP_P(( LDAP *ld, LDAPMessage **chain, char *attr, - int (*cmp)() )); -LDAP_F int ldap_sort_values LDAP_P(( LDAP *ld, char **vals, int (*cmp)() )); +LDAP_F int ldap_sort_entries LDAP_P(( LDAP *ld, + LDAPMessage **chain, char *attr, int (*cmp) () )); +LDAP_F int ldap_sort_values LDAP_P(( LDAP *ld, + char **vals, int (*cmp) LDAP_P((const void *, const void *)) )); LDAP_F int ldap_sort_strcasecmp LDAP_P(( char **a, char **b )); diff --git a/include/ldapconfig.h.edit b/include/ldapconfig.h.edit index bb63e69e5c..ac0a858a51 100644 --- a/include/ldapconfig.h.edit +++ b/include/ldapconfig.h.edit @@ -16,7 +16,7 @@ /* * config.h for LDAP -- edit this file to customize LDAP client behavior. * NO platform-specific definitions should be placed in this file. - * Note that this is NOT used by the LDAP or LBER libraries. + * Note that this IS USED by the LDAP or LBER libraries. */ /* diff --git a/include/ldapconfig.h.nt b/include/ldapconfig.h.nt new file mode 100644 index 0000000000..d3ba09123b --- /dev/null +++ b/include/ldapconfig.h.nt @@ -0,0 +1,302 @@ +/* + * Copyright (c) 1994 Regents of the University of Michigan. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that this notice is preserved and that due credit is given + * to the University of Michigan at Ann Arbor. The name of the University + * may not be used to endorse or promote products derived from this + * software without specific prior written permission. This software + * is provided ``as is'' without express or implied warranty. + */ + +#ifndef _LDAP_CONFIG_H +#define _LDAP_CONFIG_H + +/* + * config.h for LDAP -- edit this file to customize LDAP client behavior. + * NO platform-specific definitions should be placed in this file. + * Note that this is NOT used by the LDAP or LBER libraries. + */ + +/* + * SHARED DEFINITIONS - things you should change + */ +#define DEFAULT_BINDIR "C:\\OpenLDAP\\bin" +#define DEFAULT_SBINDIR "C:\\OpenLDAP\\sbin" +#define DEFAULT_ETCDIR "C:\\OpenLDAP\\etc" +#define DEFAULT_LIBEXECDIR "C:\\OpenLDAP\\execdir" + +/* default ldap host */ +#define LDAPHOST "localhost" + +#define DEFAULT_LDAPHOST_FILE "C:\\OpenLDAP\\etc\\ldaphost" +/* default place to start searching */ +#define DEFAULT_BASE "o=Your Organization Name, c=US" +#define DEFAULT_BASE_FILE "C:\\OpenLDAP\\etc\\ldapbase" + +/* + * default binddn and creditials + * use files, make sure they are not generally readable + */ +#define DEFAULT_BINDDN NULL +#define DEFAULT_BINDDN_FILE "C:\\OpenLDAP\\etc\\ldapbinddn" + +#define DEFAULT_BIND_CRED NULL +#define DEFAULT_BIND_CRED_FILE "C:\\OpenLDAP\\etc\\ldapbindcred" + +/********************************************************************* + * * + * You probably do not need to edit anything below this point * + * * + *********************************************************************/ + +/* + * SHARED DEFINITIONS - other things you can change + */ + /* default attribute to use when sorting entries, NULL => sort by DN */ +#define SORT_ATTR NULL + /* default count of DN components to show in entry displays */ +#define DEFAULT_RDNCOUNT 2 + /* default config file locations */ +#define FILTERFILE "C:\\OpenLDAP\\etc\\ldapfilter.conf" +#define TEMPLATEFILE "C:\\OpenLDAP\\etc\\ldaptemplates.conf" +#define SEARCHFILE "C:\\OpenLDAP\\etc\\ldapsearchprefs.conf" +#define FRIENDLYFILE "C:\\OpenLDAP\\etc\\ldapfriendly" + +/* + * FINGER DEFINITIONS + */ + /* who to bind as */ +#define FINGER_BINDDN NULL +#define FINGER_BIND_CRED NULL + /* where to search */ +#define FINGER_BASE DEFAULT_BASE + /* banner to print */ +#define FINGER_BANNER "X.500 Finger Service...\r\n" + /* who to report errors to */ +#define FINGER_ERRORS "System Administrator" + /* what to say if no matches are found */ +#define FINGER_NOMATCH "Search failed to find anything.\r\n" + /* what to say if the service may be unavailable */ +#define FINGER_UNAVAILABLE \ +"The directory service may be temporarily unavailable.\r\n\ +Please try again later.\r\n" + /* printed if a match has no email address - for disptmp default */ +#define FINGER_NOEMAIL1 "None registered in this service." +#define FINGER_NOEMAIL2 NULL +#define FINGER_NOEMAIL { FINGER_NOEMAIL1, FINGER_NOEMAIL2, NULL } + /* maximum number of matches returned */ +#define FINGER_SIZELIMIT 50 + /* max number of hits displayed in full before a list is presented */ +#define FINGER_LISTLIMIT 1 + /* what to exec for "finger @host" */ +#define FINGER_CMD "%FINGER%" + /* how to treat aliases when searching */ +#define FINGER_DEREF LDAP_DEREF_FINDING + /* attribute to use when sorting results */ +#define FINGER_SORT_ATTR SORT_ATTR + /* enable ufn support */ +#define FINGER_UFN + /* timeout for searches */ +#define FINGER_TIMEOUT 60 + /* number of DN components to show in entry displays */ +#define FINGER_RDNCOUNT DEFAULT_RDNCOUNT + +/* + * GO500 GOPHER GATEWAY DEFINITIONS + */ + /* who to bind as */ +#define GO500_BINDDN NULL +#define GO500_BIND_CRED NULL + /* where to search */ +#define GO500_BASE DEFAULT_BASE + /* port on which to listen */ +#define GO500_PORT 5555 + /* how to handle aliases */ +#define GO500_DEREF LDAP_DEREF_FINDING + /* attribute to use when sorting results */ +#define GO500_SORT_ATTR SORT_ATTR + /* timeout for searches */ +#define GO500_TIMEOUT 180 + /* enable ufn support */ +#define GO500_UFN + /* + * only set and uncomment this if your hostname() does not return + * a fully qualified hostname + */ +/* #define GO500_HOSTNAME "fully.qualified.hostname.here" */ + /* number of DN components to show in entry displays */ +#define GO500_RDNCOUNT DEFAULT_RDNCOUNT + +/* + * GO500GW GOPHER GATEWAY DEFINITIONS + */ + /* who to bind as */ +#define GO500GW_BINDDN NULL +#define GO500GW_BIND_CRED NULL + /* where the helpfile lives */ +#define GO500GW_HELPFILE "C:\\OpenLDAP\\etc\\go500gw.help" + /* port on which to listen */ +#define GO500GW_PORT 7777 + /* timeout on all searches */ +#define GO500GW_TIMEOUT 180 + /* enable ufn support */ +#define GO500GW_UFN + /* attribute to use when sorting results */ +#define GO500GW_SORT_ATTR SORT_ATTR + /* + * only set and uncomment this if your hostname() does not return + * a fully qualified hostname + */ +/* #define GO500GW_HOSTNAME "fully.qualified.hostname.here" */ + /* number of DN components to show in entry displays */ +#define GO500GW_RDNCOUNT DEFAULT_RDNCOUNT + +/* + * RCPT500 MAIL RESPONDER GATEWAY DEFINITIONS + */ + /* who to bind as */ +#define RCPT500_BINDDN NULL +#define RCPT500_BIND_CRED NULL + /* where the helpfile lives */ +#define RCPT500_HELPFILE "C:\\OpenLDAP\\etc\\rcpt500.help" + /* maximum number of matches returned */ +#define RCPT500_SIZELIMIT 50 + /* address replies will appear to come from */ +#define RCPT500_FROM "\"Directory Query Program\" " + /* command that will accept an RFC822 message text on standard + input, and send it. sendmail -t does this nicely. */ +#define RCPT500_PIPEMAILCMD "%SENDMAIL% -t" + /* where to search */ +#define RCPT500_BASE DEFAULT_BASE + /* attribute to use when sorting results */ +#define RCPT500_SORT_ATTR SORT_ATTR + /* max number of hits displayed in full before a list is presented */ +#define RCPT500_LISTLIMIT 1 + /* enable ufn support */ +#define RCPT500_UFN + /* number of DN components to show in entry displays */ +#define RCPT500_RDNCOUNT DEFAULT_RDNCOUNT + +/* + * LDAPSEARCH TOOL + */ + /* who to bind as */ +#define LDAPSEARCH_BINDDN NULL +#define LDAPSEARCH_BIND_CRED NULL + /* search base */ +#define LDAPSEARCH_BASE DEFAULT_BASE + +/* + * LDAPMODIFY TOOL + */ + /* who to bind as */ +#define LDAPMODIFY_BINDDN NULL +#define LDAPMODIFY_BIND_CRED NULL + /* search base */ +#define LDAPMODIFY_BASE DEFAULT_BASE + +/* + * LDAPDELETE TOOL + */ + /* who to bind as */ +#define LDAPDELETE_BINDDN NULL +#define LDAPDELETE_BIND_CRED NULL + /* search base */ +#define LDAPDELETE_BASE DEFAULT_BASE + +/* + * LDAPMODRDN TOOL + */ + /* who to bind as */ +#define LDAPMODRDN_BINDDN NULL +#define LDAPMODRDN_BIND_CRED NULL + /* search base */ +#define LDAPMODRDN_BASE DEFAULT_BASE + +/* + * MAIL500 MAILER DEFINITIONS + */ + /* who to bind as */ +#define MAIL500_BINDDN NULL +#define MAIL500_BIND_CRED NULL + /* max number of ambiguous matches reported */ +#define MAIL500_MAXAMBIGUOUS 10 + /* max subscribers allowed (size limit when searching for them ) */ +#define MAIL500_MAXGROUPMEMBERS LDAP_NO_LIMIT + /* timeout for all searches */ +#define MAIL500_TIMEOUT 180 + /* sendmail location - mail500 needs to exec this */ +#define MAIL500_SENDMAIL "%SENDMAIL%" + +/* + * UD DEFINITIONS + */ + /* ud configuration file */ +#define UD_CONFIG_FILE "C:\\OpenLDAP\\etc\\ud.conf" + /* default editor */ +#define UD_DEFAULT_EDITOR "C:\\OpenLDAP\\etc" + /* default bbasename of user config file */ +#define UD_USER_CONFIG_FILE ".udrc" + /* default user to bind as */ +#define UD_BINDDN NULL + /* default password to bind with */ +#define UD_BIND_CRED NULL + /* default search base */ +#define UD_BASE DEFAULT_BASE + /* default base where groups are created */ +#define UD_WHERE_GROUPS_ARE_CREATED "" + /* default base below which all groups live */ +#define UD_WHERE_ALL_GROUPS_LIVE "" + +/* + * FAX500 DEFINITIONS + */ + /* what to bind as */ +#define FAX_BINDDN NULL +#define FAX_BIND_CRED NULL + /* default search base */ +#define FAX_BASE DEFAULT_BASE + /* how long to wait for searches */ +#define FAX_TIMEOUT 180 + /* maximum number of ambiguous matches reported */ +#define FAX_MAXAMBIGUOUS 10 + /* maximum number of members allowed */ +#define FAX_MAXMEMBERS LDAP_NO_LIMIT + /* program to send mail */ +#define FAX_SENDMAIL "%SENDMAIL%" + +/* + * RP500 DEFINITIONS + */ + /* what to bind as */ +#define RP_BINDDN NULL +#define RP_BIND_CRED NULL + /* default search base */ +#define RP_BASE DEFAULT_BASE + + /* prefix to add to non-fully-qualified numbers */ +#define RP_PHONEPREFIX "" + +/* + * SLAPD DEFINITIONS + */ + /* location of the default slapd config file */ +#define SLAPD_DEFAULT_CONFIGFILE "C:\\OpenLDAP\\etc\\slapd.conf" + /* default sizelimit on number of entries from a search */ +#define SLAPD_DEFAULT_SIZELIMIT 500 + /* default timelimit to spend on a search */ +#define SLAPD_DEFAULT_TIMELIMIT 3600 + /* location of the slapd pid file */ +#define SLAPD_PIDFILE "C:\\OpenLDAP\\run\\slapd.pid" + /* location of the slapd args file */ +#define SLAPD_ARGSFILE "C:\\OpenLDAP\\run\\slapd.args" + /* dn of the special "monitor" entry */ +#define SLAPD_MONITOR_DN "cn=monitor" + /* dn of the special "config" entry */ +#define SLAPD_CONFIG_DN "cn=config" + /* minimum max ids that a single index entry can map to in ldbm */ +#define SLAPD_LDBM_MIN_MAXIDS 4000 + +#endif /* _LDAP_CONFIG_H */ diff --git a/include/portable.h.bot b/include/portable.h.bot index 26034fd832..4a45b92795 100644 --- a/include/portable.h.bot +++ b/include/portable.h.bot @@ -3,6 +3,7 @@ # include #endif +#include "bridge.h" #include "ldap_cdefs.h" #endif /* _LDAP_PORTABLE_H */ diff --git a/include/portable.h.nt b/include/portable.h.nt new file mode 100644 index 0000000000..1c76193dd7 --- /dev/null +++ b/include/portable.h.nt @@ -0,0 +1,440 @@ +/* include/portable.h.in. Generated automatically from configure.in by autoheader. */ +/* +Copyright 1998 The OpenLDAP Foundation, Redwood City, California, USA +All rights reserved. + +Redistribution and use in source and binary forms are permitted only +as authorized by the OpenLDAP Public License. A copy of this +license is available at http://www.OpenLDAP.org/license.html or +in file LICENSE in the top-level directory of the distribution. + +This work is derived from the University of Michigan LDAP v3.3 +distribution. Information concerning is available at + http://www.umich.edu/~dirsvcs/ldap/ldap.html. + +This work also contains materials derived from public sources. + +--- + +Portions Copyright (c) 1992-1996 Regents of the University of Michigan. +All rights reserved. + +Redistribution and use in source and binary forms are permitted +provided that this notice is preserved and that due credit is given +to the University of Michigan at Ann Arbor. The name of the University +may not be used to endorse or promote products derived from this +software without specific prior written permission. This software +is provided ``as is'' without express or implied warranty. + +*/ + +#ifndef _LDAP_PORTABLE_H +#define _LDAP_PORTABLE_H + +/* win32 specific stuff */ +#define strcasecmp stricmp +#define strncasecmp strnicmp +#define strdup _strdup + +#define stat _stat + +/* define type for caddr_t */ +typedef char * caddr_t; + +/* we have winsock2 */ +#define HAVE_WINSOCK2 1 + +/* we have */ +#define HAVE_IO_H 1 + +/* Define if on AIX 3. + System headers sometimes define this. + We just want to avoid a redefinition error message. */ +#ifndef _ALL_SOURCE +#undef _ALL_SOURCE +#endif + +/* Define to empty if the keyword does not work. */ +#undef const + +/* Define to the type of elements in the array set by `getgroups'. + Usually this is either `int' or `gid_t'. */ +#undef GETGROUPS_T + +/* Define to `int' if doesn't define. */ +#define gid_t long + +/* Define if you don't have vprintf but do have _doprnt. */ +#undef HAVE_DOPRNT + +/* Define if your struct stat has st_blksize. */ +#undef HAVE_ST_BLKSIZE + +/* Define if you have the strftime function. */ +#define HAVE_STRFTIME 1 + +/* Define if you have that is POSIX.1 compatible. */ +#undef HAVE_SYS_WAIT_H + +/* Define if you have the vprintf function. */ +#define HAVE_VPRINTF 1 + +/* Define if you have the wait3 system call. */ +#undef HAVE_WAIT3 + +/* Define if on MINIX. */ +#undef _MINIX + +/* Define to `int' if doesn't define. */ +#undef mode_t int + +/* Define to `long' if doesn't define. */ +#undef off_t + +/* Define to `int' if doesn't define. */ +#undef pid_t int + +/* Define if the system does not provide POSIX.1 features except + with this defined. */ +#undef _POSIX_1_SOURCE + +/* Define if you need to in order for stat and other things to work. */ +#undef _POSIX_SOURCE + +/* Define as the return type of signal handlers (int or void). */ +#undef RETSIGTYPE void + +/* Define to `unsigned' if doesn't define. */ +#undef size_t + +/* Define if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define if you can safely include both and . */ +#undef TIME_WITH_SYS_TIME + +/* Define if your declares struct tm. */ +#undef TM_IN_SYS_TIME + +/* Define to `int' if doesn't define. */ +#undef uid_t long + +/* define this if sys_errlist is not defined in stdio.h or errno.h */ +#undef DECL_SYS_ERRLIST + +/* define if you have berkeley db */ +#undef HAVE_BERKELEY_DB + +/* define if you have berkeley db2 */ +#undef HAVE_BERKELEY_DB2 + +/* define if you have crypt */ +#undef HAVE_CRYPT + +/* define if you have DCE */ +#undef HAVE_DCE + +/* define if you have GDBM */ +#undef HAVE_GDBM + +/* define if you have Kerberos */ +#undef HAVE_KERBEROS + +/* define if you have LinuxThreads */ +#undef HAVE_LINUX_THREADS + +/* define if you have Sun LWP (SunOS style) */ +#undef HAVE_LWP + +/* define if you have Sun LWP (Solaris style) */ +#undef HAVE_LWP_THR + +/* define if you have -lncurses */ +#undef HAVE_NCURSES + +/* define if you have NDBM */ +#undef HAVE_NDBM + +/* define if you have Mach CThreads */ +#undef HAVE_MACH_CTHREADS + +/* define if you have a preemptive POSIX Threads implementation */ +#undef HAVE_PREEMPTIVE_PTHREADS + +/* define if you have POSIX Threads */ +#undef HAVE_PTHREADS + +/* define if your POSIX Threads implementatin is circa Draft 4 */ +#undef HAVE_PTHREADS_D4 + +/* define if you have -ltermcap */ +#undef HAVE_TERMCAP + +/* define if you have -lwrap */ +#undef HAVE_TCPD + +/* define this for connectionless LDAP support */ +#define LDAP_CONNECTIONLESS + +/* define this to add debugging code */ +#define LDAP_DEBUG + +/* define this for LDAP DNS support */ +#undef LDAP_DNS + +/* define this to remove -lldap cache support */ +#undef LDAP_NOCACHE + +/* define this for LDAP referrals support */ +#define LDAP_REFERRALS + +/* define this for LDAP User Interface support */ +#undef LDAP_LIBUI + +/* define this for ACL Group support */ +#define SLAPD_ACLGROUPS + +/* define this for crypt(3) password support */ +#undef SLAPD_CRYPT + +/* define this to use SLAPD LDBM backend */ +#undef SLAPD_LDBM + +/* define this for MD5 password support */ +#define SLAPD_MD5 + +/* define this to use SLAPD passwd backend */ +#undef SLAPD_PASSWD + +/* define this for phonetic support */ +#undef SLAPD_PHONETIC + +/* define this for Reverse Lookup support */ +#define SLAPD_RLOOKUPS + +/* define this for SHA1 password support */ +#define SLAPD_SHA1 + +/* define this to use SLAPD shell backend */ +#undef SLAPD_SHELL + +/* define this to use DBBTREE w/ LDBM backend */ +#undef LDBM_USE_DBBTREE + +/* define this to use DBHASH w/ LDBM backend */ +#undef LDBM_USE_DBHASH + +/* define this if you want no termcap support */ +#define NO_TERMCAP 1 + +/* define this if you want no thread support */ +#define NO_THREADS 1 + +/* define this if the thread package is preemptive */ +#undef THREAD_PREEMPTIVE + +/* Define if you have the bcopy function. */ +#undef HAVE_BCOPY + +/* Define if you have the flock function. */ +#undef HAVE_FLOCK + +/* Define if you have the getdtablesize function. */ +#undef HAVE_GETDTABLESIZE + +/* Define if you have the gethostname function. */ +#define HAVE_GETHOSTNAME 1 + +/* Define if you have the gettimeofday function. */ +#undef HAVE_GETTIMEOFDAY + +/* Define if you have the lockf function. */ +#undef HAVE_LOCKF + +/* Define if you have the memcpy function. */ +#define HAVE_MEMCPY 1 + +/* Define if you have the memmove function. */ +#define HAVE_MEMMOVE 1 + +/* Define if you have the mktime function. */ +#define HAVE_MKTIME 1 + +/* Define if you have the pthread_kill function. */ +#undef HAVE_PTHREAD_KILL + +/* Define if you have the pthread_yield function. */ +#undef HAVE_PTHREAD_YIELD + +/* Define if you have the sched_yield function. */ +#undef HAVE_SCHED_YIELD + +/* Define if you have the select function. */ +#define HAVE_SELECT 1 + +/* Define if you have the setpwfile function. */ +#undef HAVE_SETPWFILE + +/* Define if you have the setsid function. */ +#undef HAVE_SETSID + +/* Define if you have the signal function. */ +#define HAVE_SIGNAL 1 + +/* Define if you have the sigset function. */ +#undef HAVE_SIGSET + +/* Define if you have the socket function. */ +#define HAVE_SOCKET 1 + +/* Define if you have the strdup function. */ +#define HAVE_STRDUP 1 + +/* Define if you have the strerror function. */ +#define HAVE_STRERROR 1 + +/* Define if you have the strrchr function. */ +#define HAVE_STRRCHR 1 + +/* Define if you have the strsep function. */ +#undef HAVE_STRSEP + +/* Define if you have the strstr function. */ +#define HAVE_STRSTR 1 + +/* Define if you have the strtod function. */ +#define HAVE_STRTOD 1 + +/* Define if you have the strtol function. */ +#define HAVE_STRTOL 1 + +/* Define if you have the strtoul function. */ +#define HAVE_STRTOUL 1 + +/* Define if you have the sysconf function. */ +#undef HAVE_SYSCONF + +/* Define if you have the header file. */ +#undef HAVE_DB_H + +/* Define if you have the header file. */ +#undef HAVE_DB_185_H + +/* Define if you have the header file. */ +#undef HAVE_DES_H + +/* Define if you have the header file. */ +#undef HAVE_DIRENT_H + +/* Define if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define if you have the header file. */ +#undef HAVE_FILIO_H + +/* Define if you have the header file. */ +#undef HAVE_GDBM_H + +/* Define if you have the header file. */ +#undef HAVE_KERBEROSIV_DES_H + +/* Define if you have the header file. */ +#undef HAVE_KERBEROSIV_KRB_H + +/* Define if you have the header file. */ +#undef HAVE_KRB_H + +/* Define if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define if you have the header file. */ +#undef HAVE_LWP_LWP_H + +/* Define if you have the header file. */ +#undef HAVE_MACH_CTHREADS_H + +/* Define if you have the header file. */ +#define HAVE_MALLOC_H 1 + +/* Define if you have the header file. */ +#undef HAVE_NCURSES_H + +/* Define if you have the header file. */ +#undef HAVE_NDBM_H + +/* Define if you have the header file. */ +#undef HAVE_NDIR_H + +/* Define if you have the header file. */ +#undef HAVE_PTHREAD_H + +/* Define if you have the header file. */ +#undef HAVE_SCHED_H + +/* Define if you have the header file. */ +#undef HAVE_SGTTY_H + +/* Define if you have the header file. */ +#define HAVE_STDDEF_H 1 + +/* Define if you have the header file. */ +#undef HAVE_SYNCH_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_DIR_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_FILE_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_IOCTL_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_NDIR_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_TIME_H + +/* Define if you have the header file. */ +#undef HAVE_SYSLOG_H + +/* Define if you have the header file. */ +#undef HAVE_TERMCAP_H + +/* Define if you have the header file. */ +#undef HAVE_TERMIOS_H + +/* Define if you have the header file. */ +#undef HAVE_THREAD_H + +/* Define if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define if you have the V3 library (-lV3). */ +#undef HAVE_LIBV3 + +/* Define if you have the gen library (-lgen). */ +#undef HAVE_LIBGEN + +/* Define if you have the inet library (-linet). */ +#undef HAVE_LIBINET + +/* Define if you have the net library (-lnet). */ +#undef HAVE_LIBNET + +/* Define if you have the nsl library (-lnsl). */ +#undef HAVE_LIBNSL + +/* Define if you have the nsl_s library (-lnsl_s). */ +#undef HAVE_LIBNSL_S + +/* Define if you have the socket library (-lsocket). */ +#undef HAVE_LIBSOCKET + +#ifdef HAVE_STDDEF_H +# include +#endif + +#include "ldap_cdefs.h" + +#endif /* _LDAP_PORTABLE_H */ From 13bd786abf3248e39428a8edac67c27772cb8dc0 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 20 Oct 1998 04:13:34 +0000 Subject: [PATCH 090/148] VC++ Port: round 1 --- libraries/libavl/avl.c | 1 - libraries/libavl/libavl.dsp | 86 ++++++++ libraries/libavl/libavl.dsw | 29 +++ libraries/liblber/bprint.c | 4 +- libraries/liblber/decode.c | 32 +-- libraries/liblber/encode.c | 36 ++-- libraries/liblber/io.c | 28 +-- libraries/liblber/liblber.dsp | 98 +++++++++ libraries/liblber/liblber.dsw | 29 +++ libraries/libldap/abandon.c | 33 +-- libraries/libldap/add.c | 24 +-- libraries/libldap/addentry.c | 19 +- libraries/libldap/bind.c | 20 +- libraries/libldap/cache.c | 27 +-- libraries/libldap/charset.c | 39 +--- libraries/libldap/cldap.c | 17 +- libraries/libldap/compare.c | 21 +- libraries/libldap/delete.c | 21 +- libraries/libldap/disptmpl.c | 51 ++--- libraries/libldap/dsparse.c | 37 ++-- libraries/libldap/error.c | 111 +++++----- libraries/libldap/free.c | 20 +- libraries/libldap/friendly.c | 21 +- libraries/libldap/getattr.c | 21 +- libraries/libldap/getdn.c | 21 +- libraries/libldap/getdxbyname.c | 44 ++-- libraries/libldap/getentry.c | 19 +- libraries/libldap/getfilter.c | 34 ++- libraries/libldap/getvalues.c | 19 +- libraries/libldap/kbind.c | 44 ++-- libraries/libldap/ldap-int.h | 145 ++++--------- libraries/libldap/libldap.dsp | 218 +++++++++++++++++++ libraries/libldap/libldap.dsw | 29 +++ libraries/libldap/modify.c | 17 +- libraries/libldap/modrdn.c | 17 +- libraries/libldap/open.c | 43 ++-- libraries/libldap/os-ip.c | 82 ++----- libraries/libldap/request.c | 166 +++++++-------- libraries/libldap/result.c | 131 +++++------- libraries/libldap/sbind.c | 17 +- libraries/libldap/search.c | 48 ++--- libraries/libldap/sort.c | 31 ++- libraries/libldap/srchpref.c | 44 ++-- libraries/libldap/ufn.c | 52 ++--- libraries/libldap/unbind.c | 36 ++-- libraries/libldap/url.c | 21 +- libraries/libldbm/libldbm.dsp | 82 +++++++ libraries/libldbm/libldbm.dsw | 29 +++ libraries/libldif/libldif.dsp | 82 +++++++ libraries/libldif/libldif.dsw | 29 +++ libraries/libldif/line64.c | 9 +- libraries/liblthread/liblthread.dsp | 90 ++++++++ libraries/liblthread/liblthread.dsw | 29 +++ libraries/liblutil/base64.c | 319 ++++++++++++++++++++++++++++ libraries/liblutil/liblutil.dsp | 102 +++++++++ libraries/liblutil/liblutil.dsw | 29 +++ libraries/liblutil/md5.c | 3 + libraries/liblutil/sha1.c | 32 ++- 58 files changed, 1878 insertions(+), 1060 deletions(-) create mode 100644 libraries/libavl/libavl.dsp create mode 100644 libraries/libavl/libavl.dsw create mode 100644 libraries/liblber/liblber.dsp create mode 100644 libraries/liblber/liblber.dsw create mode 100644 libraries/libldap/libldap.dsp create mode 100644 libraries/libldap/libldap.dsw create mode 100644 libraries/libldbm/libldbm.dsp create mode 100644 libraries/libldbm/libldbm.dsw create mode 100644 libraries/libldif/libldif.dsp create mode 100644 libraries/libldif/libldif.dsw create mode 100644 libraries/liblthread/liblthread.dsp create mode 100644 libraries/liblthread/liblthread.dsw create mode 100644 libraries/liblutil/base64.c create mode 100644 libraries/liblutil/liblutil.dsp create mode 100644 libraries/liblutil/liblutil.dsw diff --git a/libraries/libavl/avl.c b/libraries/libavl/avl.c index f90cd3366a..30938263d1 100644 --- a/libraries/libavl/avl.c +++ b/libraries/libavl/avl.c @@ -11,7 +11,6 @@ * is provided ``as is'' without express or implied warranty. */ -#define DISABLE_BRIDGE #include "portable.h" #ifndef lint diff --git a/libraries/libavl/libavl.dsp b/libraries/libavl/libavl.dsp new file mode 100644 index 0000000000..384cfaca53 --- /dev/null +++ b/libraries/libavl/libavl.dsp @@ -0,0 +1,86 @@ +# Microsoft Developer Studio Project File - Name="libavl" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=libavl - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "libavl.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "libavl.mak" CFG="libavl - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "libavl - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "libavl - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe + +!IF "$(CFG)" == "libavl - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "libavl - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /Z7 /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\Debug\libavl.lib" + +!ENDIF + +# Begin Target + +# Name "libavl - Win32 Release" +# Name "libavl - Win32 Debug" +# Begin Source File + +SOURCE=.\avl.c +# End Source File +# Begin Source File + +SOURCE=..\..\include\avl.h +# End Source File +# End Target +# End Project diff --git a/libraries/libavl/libavl.dsw b/libraries/libavl/libavl.dsw new file mode 100644 index 0000000000..a3ea4fd280 --- /dev/null +++ b/libraries/libavl/libavl.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "libavl"=.\libavl.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libraries/liblber/bprint.c b/libraries/liblber/bprint.c index 78af185d2b..1dbc833b99 100644 --- a/libraries/liblber/bprint.c +++ b/libraries/liblber/bprint.c @@ -1,11 +1,11 @@ -#define LDAP_BRIDGE /* disable LDAP_BRIDGE code */ #include "portable.h" #if defined( LDAP_DEBUG ) && defined( LDAP_LIBUI ) #include -#include #include + +#include #endif /* LDAP_DEBUG && LDAP_LIBUI */ #include "lber.h" diff --git a/libraries/liblber/decode.c b/libraries/liblber/decode.c index 1803d93b66..26bf40c54b 100644 --- a/libraries/liblber/decode.c +++ b/libraries/liblber/decode.c @@ -11,7 +11,6 @@ * is provided ``as is'' without express or implied warranty. */ -#define DISABLE_BRIDGE /* disable LDAP_BRIDGE code */ #include "portable.h" #include @@ -24,21 +23,8 @@ #endif #include - -#ifdef MACOS -#include "macos.h" -#endif /* MACOS */ - #include -#include -#include - -#ifdef PCNFS -#include -#endif /* PCNFS */ -#if defined( DOS ) || defined( _WIN32 ) -#include "msdos.h" -#endif /* DOS */ +#include #include "lber.h" @@ -126,7 +112,7 @@ ber_skip_tag( BerElement *ber, unsigned long *len ) if ( ber_read( ber, (char *) &netlen + diff, noctets ) != noctets ) return( LBER_DEFAULT ); - *len = LBER_NTOHL( netlen ); + *len = NTOHL( netlen ); } else { *len = lc; } @@ -175,10 +161,10 @@ ber_getnint( BerElement *ber, long *num, int len ) sign = (0x80 & *(p+diff) ); if ( sign && len < sizeof(long) ) { for ( i = 0; i < diff; i++ ) { - *(p+i) = 0xff; + *(p+i) = (char) 0xff; } } - *num = LBER_NTOHL( netnum ); + *num = NTOHL( netnum ); return( len ); } @@ -191,7 +177,7 @@ ber_get_int( BerElement *ber, long *num ) if ( (tag = ber_skip_tag( ber, &len )) == LBER_DEFAULT ) return( LBER_DEFAULT ); - if ( ber_getnint( ber, num, (int)len ) != len ) + if ( (unsigned long) ber_getnint( ber, num, (int)len ) != len ) return( LBER_DEFAULT ); else return( tag ); @@ -210,7 +196,7 @@ ber_get_stringb( BerElement *ber, char *buf, unsigned long *len ) if ( datalen > (*len - 1) ) return( LBER_DEFAULT ); - if ( ber_read( ber, buf, datalen ) != datalen ) + if ( (unsigned long) ber_read( ber, buf, datalen ) != datalen ) return( LBER_DEFAULT ); buf[datalen] = '\0'; @@ -249,7 +235,7 @@ ber_get_stringa( BerElement *ber, char **buf ) if ( (*buf = (char *) malloc( (size_t)datalen + 1 )) == NULL ) return( LBER_DEFAULT ); - if ( ber_read( ber, *buf, datalen ) != datalen ) + if ( (unsigned long) ber_read( ber, *buf, datalen ) != datalen ) return( LBER_DEFAULT ); (*buf)[datalen] = '\0'; @@ -282,7 +268,7 @@ ber_get_stringal( BerElement *ber, struct berval **bv ) if ( ((*bv)->bv_val = (char *) malloc( (size_t)len + 1 )) == NULL ) return( LBER_DEFAULT ); - if ( ber_read( ber, (*bv)->bv_val, len ) != len ) + if ( (unsigned long) ber_read( ber, (*bv)->bv_val, len ) != len ) return( LBER_DEFAULT ); ((*bv)->bv_val)[len] = '\0'; (*bv)->bv_len = len; @@ -319,7 +305,7 @@ ber_get_bitstringa( BerElement *ber, char **buf, unsigned long *blen ) if ( ber_read( ber, (char *)&unusedbits, 1 ) != 1 ) return( LBER_DEFAULT ); - if ( ber_read( ber, *buf, datalen ) != datalen ) + if ( (unsigned long) ber_read( ber, *buf, datalen ) != datalen ) return( LBER_DEFAULT ); *blen = datalen * 8 - unusedbits; diff --git a/libraries/liblber/encode.c b/libraries/liblber/encode.c index 26f09fcd6e..4933b2ff62 100644 --- a/libraries/liblber/encode.c +++ b/libraries/liblber/encode.c @@ -11,7 +11,6 @@ * is provided ``as is'' without express or implied warranty. */ -#define DISABLE_BRIDGE #include "portable.h" #include @@ -24,21 +23,8 @@ #include #endif -#ifdef MACOS -#include "macos.h" -#endif /* MACOS */ - #include -#include -#include - -#ifdef PCNFS -#include -#endif /* PCNFS */ - -#if defined( DOS ) || defined( _WIN32 ) -#include "msdos.h" -#endif /* DOS */ +#include #include "lber.h" @@ -79,7 +65,7 @@ ber_put_tag( BerElement *ber, unsigned long tag, int nosos ) taglen = ber_calc_taglen( tag ); - ntag = LBER_HTONL( tag ); + ntag = HTONL( tag ); return( ber_write( ber, ((char *) &ntag) + sizeof(long) - taglen, taglen, nosos ) ); @@ -125,7 +111,7 @@ ber_put_len( BerElement *ber, unsigned long len, int nosos ) */ if ( len <= 127 ) { - netlen = LBER_HTONL( len ); + netlen = HTONL( len ); return( ber_write( ber, (char *) &netlen + sizeof(long) - 1, 1, nosos ) ); } @@ -152,7 +138,7 @@ ber_put_len( BerElement *ber, unsigned long len, int nosos ) return( -1 ); /* write the length itself */ - netlen = LBER_HTONL( len ); + netlen = HTONL( len ); if ( ber_write( ber, (char *) &netlen + (sizeof(long) - i), i, nosos ) != i ) return( -1 ); @@ -203,7 +189,7 @@ ber_put_int_or_enum( BerElement *ber, long num, unsigned long tag ) if ( (lenlen = ber_put_len( ber, len, 0 )) == -1 ) return( -1 ); i++; - netnum = LBER_HTONL( num ); + netnum = HTONL( num ); if ( ber_write( ber, (char *) &netnum + (sizeof(long) - i), i, 0 ) != i ) return( -1 ); @@ -259,7 +245,7 @@ ber_put_ostring( BerElement *ber, char *str, unsigned long len, #endif /* STR_TRANSLATION */ if ( (lenlen = ber_put_len( ber, len, 0 )) == -1 || - ber_write( ber, str, len, 0 ) != len ) { + (unsigned long) ber_write( ber, str, len, 0 ) != len ) { rc = -1; } else { /* return length of tag + length + contents */ @@ -295,7 +281,7 @@ ber_put_bitstring( BerElement *ber, char *str, return( -1 ); len = ( blen + 7 ) / 8; - unusedbits = len * 8 - blen; + unusedbits = (unsigned char) ((len * 8) - blen); if ( (lenlen = ber_put_len( ber, len + 1, 0 )) == -1 ) return( -1 ); @@ -411,7 +397,7 @@ ber_put_seqorset( BerElement *ber ) */ len = (*sos)->sos_clen; - netlen = LBER_HTONL( len ); + netlen = HTONL( len ); if ( sizeof(long) > 4 && len > 0xFFFFFFFFL ) return( -1 ); @@ -460,12 +446,14 @@ ber_put_seqorset( BerElement *ber ) /* the tag */ taglen = ber_calc_taglen( (*sos)->sos_tag ); - ntag = LBER_HTONL( (*sos)->sos_tag ); + ntag = HTONL( (*sos)->sos_tag ); SAFEMEMCPY( (*sos)->sos_first, (char *) &ntag + sizeof(long) - taglen, taglen ); if ( ber->ber_options & LBER_USE_DER ) { - ltag = (lenlen == 1) ? len : 0x80 + (lenlen - 1); + ltag = (lenlen == 1) + ? (unsigned char) len + : 0x80 + (lenlen - 1); } /* one byte of length length */ diff --git a/libraries/liblber/io.c b/libraries/liblber/io.c index 92c85a90ff..282d25fb45 100644 --- a/libraries/liblber/io.c +++ b/libraries/liblber/io.c @@ -11,7 +11,6 @@ * is provided ``as is'' without express or implied warranty. */ -#define DISABLE_BRIDGE #include "portable.h" #include @@ -21,26 +20,13 @@ #include #include -#if defined( DOS ) || defined( _WIN32 ) -#include "msdos.h" -#endif /* DOS || _WIN32 */ - -#ifdef MACOS -#include "macos.h" -#else /* MACOS */ #include #include -#include -#include -#ifdef PCNFS -#include -#endif /* PCNFS */ -#endif /* MACOS */ +#include -#ifdef _WIN32 -#include +#ifdef HAVE_IO_H #include -#endif /* _WIN32 */ +#endif #include "lber.h" @@ -320,8 +306,8 @@ ber_flush( Sockbuf *sb, BerElement *ber, int freeit ) return( -1 ); /* fake error if write was not atomic */ if (rc < towrite) { -#if !defined( MACOS ) && !defined( DOS ) - errno = EMSGSIZE; +#if defined( WSAEMSGSIZE ) + errno = WSAEMSGSIZE; #endif return( -1 ); } @@ -538,7 +524,7 @@ ber_get_next( Sockbuf *sb, unsigned long *len, BerElement *ber ) noctets ) { return( LBER_DEFAULT ); } - *len = LBER_NTOHL( netlen ); + *len = NTOHL( netlen ); } else { *len = lc; } @@ -557,7 +543,7 @@ ber_get_next( Sockbuf *sb, unsigned long *len, BerElement *ber ) #endif /* DOS && !_WIN32 */ if ( ( sb->sb_options & LBER_MAX_INCOMING_SIZE ) && - *len > sb->sb_max_incoming ) { + *len > (unsigned long) sb->sb_max_incoming ) { return( LBER_DEFAULT ); } diff --git a/libraries/liblber/liblber.dsp b/libraries/liblber/liblber.dsp new file mode 100644 index 0000000000..eb47093cc0 --- /dev/null +++ b/libraries/liblber/liblber.dsp @@ -0,0 +1,98 @@ +# Microsoft Developer Studio Project File - Name="liblber" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=liblber - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "liblber.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "liblber.mak" CFG="liblber - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "liblber - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "liblber - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe + +!IF "$(CFG)" == "liblber - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "liblber - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /Z7 /Od /I "..\..\include" /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\Debug\liblber.lib" + +!ENDIF + +# Begin Target + +# Name "liblber - Win32 Release" +# Name "liblber - Win32 Debug" +# Begin Source File + +SOURCE=.\bprint.c +# End Source File +# Begin Source File + +SOURCE=.\decode.c +# End Source File +# Begin Source File + +SOURCE=.\encode.c +# End Source File +# Begin Source File + +SOURCE=.\io.c +# End Source File +# Begin Source File + +SOURCE=..\..\include\lber.h +# End Source File +# End Target +# End Project diff --git a/libraries/liblber/liblber.dsw b/libraries/liblber/liblber.dsw new file mode 100644 index 0000000000..a3ac447307 --- /dev/null +++ b/libraries/liblber/liblber.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "liblber"=.\liblber.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libraries/libldap/abandon.c b/libraries/libldap/abandon.c index 18324260bd..a5e93798c1 100644 --- a/libraries/libldap/abandon.c +++ b/libraries/libldap/abandon.c @@ -5,37 +5,24 @@ * abandon.c */ +#include "portable.h" + #ifndef lint static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n"; #endif #include -#include - -#if !defined( MACOS ) && !defined( DOS ) -#include -#include -#endif - -#if defined( DOS ) || defined( _WIN32 ) -#include -#include "msdos.h" -#endif /* DOS */ - -#ifdef MACOS #include -#include "macos.h" -#endif /* MACOS */ + +#include +#include #include "lber.h" #include "ldap.h" #include "ldap-int.h" -#ifdef NEEDPROTOS -static int do_abandon( LDAP *ld, int origid, int msgid ); -#else /* NEEDPROTOS */ -static int do_abandon(); -#endif /* NEEDPROTOS */ +static int do_abandon LDAP_P(( LDAP *ld, int origid, int msgid )); + /* * ldap_abandon - perform an ldap (and X.500) abandon operation. Parameters: * @@ -107,7 +94,7 @@ do_abandon( LDAP *ld, int origid, int msgid ) err = 0; if ( sendabandon ) { /* create a message to send */ - if ( (ber = alloc_ber_with_options( ld )) == NULLBER ) { + if ( (ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) { err = -1; ld->ld_errno = LDAP_NO_MEMORY; } else { @@ -151,10 +138,10 @@ do_abandon( LDAP *ld, int origid, int msgid ) #ifdef LDAP_REFERRALS if ( lr != NULL ) { if ( sendabandon ) { - free_connection( ld, lr->lr_conn, 0, 1 ); + ldap_free_connection( ld, lr->lr_conn, 0, 1 ); } if ( origid == msgid ) { - free_request( ld, lr ); + ldap_free_request( ld, lr ); } } #endif /* LDAP_REFERRALS */ diff --git a/libraries/libldap/add.c b/libraries/libldap/add.c index b79cd09b9d..901658bef3 100644 --- a/libraries/libldap/add.c +++ b/libraries/libldap/add.c @@ -5,26 +5,16 @@ * add.c */ -#ifndef lint +#include "portable.h" + +#ifndef lint static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n"; #endif #include -#include -#ifdef MACOS -#include "macos.h" -#endif /* MACOS */ - -#if defined( DOS ) || defined( _WIN32 ) -#include -#include "msdos.h" -#endif /* DOS */ - -#if !defined( MACOS ) && !defined( DOS ) -#include -#include -#endif /* !MACOS && !DOS */ +#include +#include #include "lber.h" #include "ldap.h" @@ -69,7 +59,7 @@ ldap_add( LDAP *ld, char *dn, LDAPMod **attrs ) Debug( LDAP_DEBUG_TRACE, "ldap_add\n", 0, 0, 0 ); /* create a message to send */ - if ( (ber = alloc_ber_with_options( ld )) == NULLBER ) { + if ( (ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) { return( -1 ); } @@ -103,7 +93,7 @@ ldap_add( LDAP *ld, char *dn, LDAPMod **attrs ) } /* send the message */ - return( send_initial_request( ld, LDAP_REQ_ADD, dn, ber )); + return( ldap_send_initial_request( ld, LDAP_REQ_ADD, dn, ber )); } int diff --git a/libraries/libldap/addentry.c b/libraries/libldap/addentry.c index a0fc4174e6..ff8e5635ca 100644 --- a/libraries/libldap/addentry.c +++ b/libraries/libldap/addentry.c @@ -5,25 +5,18 @@ * addentry.c */ +#include "portable.h" + #ifndef lint static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n"; #endif #include -#include -#include -#ifdef MACOS #include -#include "macos.h" -#else /* MACOS */ -#if defined( DOS ) || defined( _WIN32 ) -#include -#include "msdos.h" -#else /* DOS */ -#include -#include -#endif /* DOS */ -#endif /* MACOS */ +#include + +#include +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/bind.c b/libraries/libldap/bind.c index 0a0487349e..050d72a596 100644 --- a/libraries/libldap/bind.c +++ b/libraries/libldap/bind.c @@ -5,27 +5,17 @@ * bind.c */ +#include "portable.h" + #ifndef lint static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n"; #endif #include -#include -#ifdef MACOS #include -#include "macos.h" -#else /* MACOS */ -#ifdef DOS -#include "msdos.h" -#ifdef NCSA -#include "externs.h" -#endif /* NCSA */ -#else /* DOS */ -#include -#include -#include -#endif /* DOS */ -#endif /* MACOS */ + +#include +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/cache.c b/libraries/libldap/cache.c index 0cc3b48a07..f851f6bb09 100644 --- a/libraries/libldap/cache.c +++ b/libraries/libldap/cache.c @@ -5,7 +5,6 @@ * cache.c - local caching support for LDAP */ -#define DISABLE_BRIDGE #include "portable.h" #ifndef NO_CACHE @@ -15,27 +14,11 @@ static char copyright[] = "@(#) Copyright (c) 1993 The Regents of the University #endif #include -#include #include -#ifdef MACOS -#include -#include "macos.h" -#else /* MACOS */ -#if defined( DOS ) || defined( _WIN32 ) -#include -#include "msdos.h" -#ifdef NCSA -#include "externs.h" -#endif /* NCSA */ -#ifdef WINSOCK -#include -#endif /* WINSOCK */ -#else /* DOS */ -#include -#include -#endif /* DOS */ -#endif /* MACOS */ +#include +#include +#include #include "lber.h" #include "ldap.h" @@ -518,7 +501,9 @@ request_cmp( BerElement *req1, BerElement *req2 ) /* * check remaining length and bytes if necessary */ - if (( len = r1.ber_end - r1.ber_ptr ) != r2.ber_end - r2.ber_ptr ) { + if (( len = r1.ber_end - r1.ber_ptr ) != + (unsigned long) (r2.ber_end - r2.ber_ptr) ) + { return( -1 ); /* different lengths */ } return( memcmp( r1.ber_ptr, r2.ber_ptr, (size_t)len )); diff --git a/libraries/libldap/charset.c b/libraries/libldap/charset.c index d5b74006f5..6c821c81c5 100644 --- a/libraries/libldap/charset.c +++ b/libraries/libldap/charset.c @@ -5,13 +5,7 @@ * charset.c */ -#if defined( DOS ) || defined( _WIN32 ) -/* - * This MUST precede "#ifdef STR_TRANSLATION" - * because STR_TRANSLATION and friends are defined in msdos.h. - */ -#include "msdos.h" -#endif /* DOS */ +#include "portable.h" #ifdef STR_TRANSLATION @@ -20,19 +14,15 @@ static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of #endif #include -#include - -#ifdef MACOS #include -#include "macos.h" -#endif /* MACOS */ -#if !defined(MACOS) && !defined(DOS) && !defined( _WIN32 ) && !defined(VMS) -#include -#include -#include +#include +#include + +#ifdef HAVE_SYS_PARAM_H #include #endif + #include "lber.h" #include "ldap.h" #include "ldap-int.h" @@ -159,7 +149,7 @@ ldap_translate_to_t61( LDAP *ld, char **bufp, unsigned long *lenp, #include #include -#include +#include /* Character set used: ISO 8859-1, ISO 8859-2, ISO 8859-3, ... */ /* #define ISO_8859 1 */ @@ -171,17 +161,10 @@ ldap_translate_to_t61( LDAP *ld, char **bufp, unsigned long *lenp, typedef unsigned char Byte; typedef struct { Byte a, b; } Couple; -#ifdef NEEDPROTOS -static Byte *c_to_hh( Byte *o, Byte c ); -static Byte *c_to_cc( Byte *o, Couple *cc, Byte c ); -static int hh_to_c( Byte *h ); -static Byte *cc_to_t61( Byte *o, Byte *s ); -#else /* NEEDPROTOS */ -static Byte *c_to_hh(); -static Byte *c_to_cc(); -static int hh_to_c(); -static Byte *cc_to_t61(); -#endif /* NEEDPROTOS */ +static Byte *c_to_hh LDAP_P(( Byte *o, Byte c )); +static Byte *c_to_cc LDAP_P(( Byte *o, Couple *cc, Byte c )); +static int hh_to_c LDAP_P(( Byte *h )); +static Byte *cc_to_t61 LDAP_P(( Byte *o, Byte *s )); /* Character choosed as base in diacritics alone: NO-BREAK SPACE. diff --git a/libraries/libldap/cldap.c b/libraries/libldap/cldap.c index 8639ee2550..c037927de8 100644 --- a/libraries/libldap/cldap.c +++ b/libraries/libldap/cldap.c @@ -5,7 +5,6 @@ * cldap.c - synchronous, retrying interface to the cldap protocol */ -#define DISABLE_BRIDGE #include "portable.h" #ifdef CLDAP @@ -15,22 +14,12 @@ static char copyright[] = "@(#) Copyright (c) 1990, 1994 Regents of the Universi #endif #include -#include -#include #include -#ifdef MACOS -#include "macos.h" -#endif /* MACOS */ -#ifdef DOS -#include "msdos.h" -#endif /* DOS */ -#include -#include -#include -#include -#include +#include +#include +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/compare.c b/libraries/libldap/compare.c index 74388f1cea..2e2e243b96 100644 --- a/libraries/libldap/compare.c +++ b/libraries/libldap/compare.c @@ -5,21 +5,16 @@ * compare.c */ +#include "portable.h" + #ifndef lint static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n"; #endif #include -#include -#ifdef MACOS -#include "macos.h" -#endif /* MACOS */ - -#if !defined( MACOS ) && !defined( DOS ) -#include -#include -#endif +#include +#include #include "lber.h" #include "ldap.h" @@ -52,7 +47,7 @@ ldap_compare( LDAP *ld, char *dn, char *attr, char *value ) Debug( LDAP_DEBUG_TRACE, "ldap_compare\n", 0, 0, 0 ); /* create a message to send */ - if ( (ber = alloc_ber_with_options( ld )) == NULLBER ) { + if ( (ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) { return( -1 ); } @@ -65,17 +60,17 @@ ldap_compare( LDAP *ld, char *dn, char *attr, char *value ) #ifndef NO_CACHE if ( ld->ld_cache != NULL ) { - if ( check_cache( ld, LDAP_REQ_COMPARE, ber ) == 0 ) { + if ( ldap_check_cache( ld, LDAP_REQ_COMPARE, ber ) == 0 ) { ber_free( ber, 1 ); ld->ld_errno = LDAP_SUCCESS; return( ld->ld_msgid ); } - add_request_to_cache( ld, LDAP_REQ_COMPARE, ber ); + ldap_add_request_to_cache( ld, LDAP_REQ_COMPARE, ber ); } #endif /* NO_CACHE */ /* send the message */ - return ( send_initial_request( ld, LDAP_REQ_COMPARE, dn, ber )); + return ( ldap_send_initial_request( ld, LDAP_REQ_COMPARE, dn, ber )); } int diff --git a/libraries/libldap/delete.c b/libraries/libldap/delete.c index 47e240ea6a..a6ebfecd50 100644 --- a/libraries/libldap/delete.c +++ b/libraries/libldap/delete.c @@ -5,25 +5,16 @@ * delete.c */ +#include "portable.h" + #ifndef lint static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n"; #endif #include -#include -#ifdef MACOS -#include "macos.h" -#endif /* MACOS */ - -#if defined( DOS ) || defined( _WIN32 ) -#include "msdos.h" -#endif /* DOS */ - -#if !defined( MACOS ) && !defined( DOS ) -#include -#include -#endif +#include +#include #include "lber.h" #include "ldap.h" @@ -51,7 +42,7 @@ ldap_delete( LDAP *ld, char *dn ) Debug( LDAP_DEBUG_TRACE, "ldap_delete\n", 0, 0, 0 ); /* create a message to send */ - if ( (ber = alloc_ber_with_options( ld )) == NULLBER ) { + if ( (ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) { return( -1 ); } @@ -63,7 +54,7 @@ ldap_delete( LDAP *ld, char *dn ) } /* send the message */ - return ( send_initial_request( ld, LDAP_REQ_DELETE, dn, ber )); + return ( ldap_send_initial_request( ld, LDAP_REQ_DELETE, dn, ber )); } diff --git a/libraries/libldap/disptmpl.c b/libraries/libldap/disptmpl.c index be418309e9..291316dcb6 100644 --- a/libraries/libldap/disptmpl.c +++ b/libraries/libldap/disptmpl.c @@ -13,41 +13,30 @@ * 7 March 1994 by Mark C Smith */ +#include "portable.h" + #include -#include -#include #include -#ifdef MACOS -#include "macos.h" -#else /* MACOS */ -#ifdef DOS -#include -#include "msdos.h" -#else /* DOS */ -#include +#include + +#include +#include + +#ifdef HAVE_SYS_FILE_H #include -#ifndef VMS -#include -#endif /* VMS */ -#endif /* DOS */ -#endif /* MACOS */ +#endif + +#include #include "lber.h" #include "ldap.h" #include "disptmpl.h" -#ifndef NEEDPROTOS -static void free_disptmpl(); -static int read_next_tmpl(); -int next_line_tokens(); -void free_strarray(); -#else /* !NEEDPROTOS */ -static void free_disptmpl( struct ldap_disptmpl *tmpl ); -static int read_next_tmpl( char **bufp, long *blenp, - struct ldap_disptmpl **tmplp, int dtversion ); -int next_line_tokens( char **bufp, long *blenp, char ***toksp ); -void free_strarray( char **sap ); -#endif /* !NEEDPROTOS */ +static void free_disptmpl LDAP_P(( struct ldap_disptmpl *tmpl )); +static int read_next_tmpl LDAP_P(( char **bufp, long *blenp, + struct ldap_disptmpl **tmplp, int dtversion )); +int next_line_tokens LDAP_P(( char **bufp, long *blenp, char ***toksp )); +void free_strarray LDAP_P(( char **sap )); static char *tmploptions[] = { "addable", "modrdn", @@ -152,7 +141,7 @@ int ldap_init_templates_buf( char *buf, long buflen, struct ldap_disptmpl **tmpllistp ) { - int rc, version; + int rc=-1, version; char **toks; struct ldap_disptmpl *prevtmpl, *tmpl; @@ -457,9 +446,9 @@ read_next_tmpl( char **bufp, long *blenp, struct ldap_disptmpl **tmplp, int i, j, tokcnt, samerow, adsource; char **toks, *itemopts; struct ldap_disptmpl *tmpl; - struct ldap_oclist *ocp, *prevocp; - struct ldap_adddeflist *adp, *prevadp; - struct ldap_tmplitem *rowp, *ip, *previp; + struct ldap_oclist *ocp, *prevocp = NULL; + struct ldap_adddeflist *adp, *prevadp = NULL; + struct ldap_tmplitem *rowp = NULL, *ip, *previp = NULL; *tmplp = NULL; diff --git a/libraries/libldap/dsparse.c b/libraries/libldap/dsparse.c index 1771d7283e..6fc1e6e296 100644 --- a/libraries/libldap/dsparse.c +++ b/libraries/libldap/dsparse.c @@ -15,37 +15,26 @@ * 7 March 1994 by Mark C Smith */ +#include "portable.h" + #include +#include #include -#include -#ifdef MACOS -#include -#include "macos.h" -#else /* MACOS */ -#ifdef DOS -#include -#include "msdos.h" -#else /* DOS */ -#include + +#include +#include + +#ifdef HAVE_SYS_FILE_H #include -#include -#endif /* DOS */ -#endif /* MACOS */ +#endif #include "lber.h" #include "ldap.h" -#ifndef NEEDPROTOS -int next_line_tokens(); -void free_strarray(); -static int next_line(); -static char *next_token(); -#else /* !NEEDPROTOS */ -int next_line_tokens( char **bufp, long *blenp, char ***toksp ); -void free_strarray( char **sap ); -static int next_line( char **bufp, long *blenp, char **linep ); -static char *next_token( char ** sp ); -#endif /* !NEEDPROTOS */ +int next_line_tokens LDAP_P(( char **bufp, long *blenp, char ***toksp )); +void free_strarray LDAP_P(( char **sap )); +static int next_line LDAP_P(( char **bufp, long *blenp, char **linep )); +static char *next_token LDAP_P(( char ** sp )); diff --git a/libraries/libldap/error.c b/libraries/libldap/error.c index b59563ef88..9827bfc5f2 100644 --- a/libraries/libldap/error.c +++ b/libraries/libldap/error.c @@ -1,16 +1,11 @@ +#include "portable.h" + #include -#include -#ifdef MACOS #include -#else /* MACOS */ -#if defined( DOS ) || defined( _WIN32 ) -#include -#include "msdos.h" -#else /* DOS */ -#include -#include -#endif /* DOS */ -#endif /* MACOS */ + +#include +#include + #include "lber.h" #include "ldap.h" @@ -20,53 +15,53 @@ struct ldaperror { }; static struct ldaperror ldap_errlist[] = { - LDAP_SUCCESS, "Success", - LDAP_OPERATIONS_ERROR, "Operations error", - LDAP_PROTOCOL_ERROR, "Protocol error", - LDAP_TIMELIMIT_EXCEEDED, "Timelimit exceeded", - LDAP_SIZELIMIT_EXCEEDED, "Sizelimit exceeded", - LDAP_COMPARE_FALSE, "Compare false", - LDAP_COMPARE_TRUE, "Compare true", - LDAP_STRONG_AUTH_NOT_SUPPORTED, "Strong authentication not supported", - LDAP_STRONG_AUTH_REQUIRED, "Strong authentication required", - LDAP_PARTIAL_RESULTS, "Partial results and referral received", - LDAP_NO_SUCH_ATTRIBUTE, "No such attribute", - LDAP_UNDEFINED_TYPE, "Undefined attribute type", - LDAP_INAPPROPRIATE_MATCHING, "Inappropriate matching", - LDAP_CONSTRAINT_VIOLATION, "Constraint violation", - LDAP_TYPE_OR_VALUE_EXISTS, "Type or value exists", - LDAP_INVALID_SYNTAX, "Invalid syntax", - LDAP_NO_SUCH_OBJECT, "No such object", - LDAP_ALIAS_PROBLEM, "Alias problem", - LDAP_INVALID_DN_SYNTAX, "Invalid DN syntax", - LDAP_IS_LEAF, "Object is a leaf", - LDAP_ALIAS_DEREF_PROBLEM, "Alias dereferencing problem", - LDAP_INAPPROPRIATE_AUTH, "Inappropriate authentication", - LDAP_INVALID_CREDENTIALS, "Invalid credentials", - LDAP_INSUFFICIENT_ACCESS, "Insufficient access", - LDAP_BUSY, "DSA is busy", - LDAP_UNAVAILABLE, "DSA is unavailable", - LDAP_UNWILLING_TO_PERFORM, "DSA is unwilling to perform", - LDAP_LOOP_DETECT, "Loop detected", - LDAP_NAMING_VIOLATION, "Naming violation", - LDAP_OBJECT_CLASS_VIOLATION, "Object class violation", - LDAP_NOT_ALLOWED_ON_NONLEAF, "Operation not allowed on nonleaf", - LDAP_NOT_ALLOWED_ON_RDN, "Operation not allowed on RDN", - LDAP_ALREADY_EXISTS, "Already exists", - LDAP_NO_OBJECT_CLASS_MODS, "Cannot modify object class", - LDAP_RESULTS_TOO_LARGE, "Results too large", - LDAP_OTHER, "Unknown error", - LDAP_SERVER_DOWN, "Can't contact LDAP server", - LDAP_LOCAL_ERROR, "Local error", - LDAP_ENCODING_ERROR, "Encoding error", - LDAP_DECODING_ERROR, "Decoding error", - LDAP_TIMEOUT, "Timed out", - LDAP_AUTH_UNKNOWN, "Unknown authentication method", - LDAP_FILTER_ERROR, "Bad search filter", - LDAP_USER_CANCELLED, "User cancelled operation", - LDAP_PARAM_ERROR, "Bad parameter to an ldap routine", - LDAP_NO_MEMORY, "Out of memory", - -1, 0 + {LDAP_SUCCESS, "Success" }, + {LDAP_OPERATIONS_ERROR, "Operations error" }, + {LDAP_PROTOCOL_ERROR, "Protocol error" }, + {LDAP_TIMELIMIT_EXCEEDED, "Timelimit exceeded" }, + {LDAP_SIZELIMIT_EXCEEDED, "Sizelimit exceeded" }, + {LDAP_COMPARE_FALSE, "Compare false" }, + {LDAP_COMPARE_TRUE, "Compare true" }, + {LDAP_STRONG_AUTH_NOT_SUPPORTED, "Strong authentication not supported" }, + {LDAP_STRONG_AUTH_REQUIRED, "Strong authentication required" }, + {LDAP_PARTIAL_RESULTS, "Partial results and referral received" }, + {LDAP_NO_SUCH_ATTRIBUTE, "No such attribute" }, + {LDAP_UNDEFINED_TYPE, "Undefined attribute type" }, + {LDAP_INAPPROPRIATE_MATCHING, "Inappropriate matching" }, + {LDAP_CONSTRAINT_VIOLATION, "Constraint violation" }, + {LDAP_TYPE_OR_VALUE_EXISTS, "Type or value exists" }, + {LDAP_INVALID_SYNTAX, "Invalid syntax" }, + {LDAP_NO_SUCH_OBJECT, "No such object" }, + {LDAP_ALIAS_PROBLEM, "Alias problem" }, + {LDAP_INVALID_DN_SYNTAX, "Invalid DN syntax" }, + {LDAP_IS_LEAF, "Object is a leaf" }, + {LDAP_ALIAS_DEREF_PROBLEM, "Alias dereferencing problem" }, + {LDAP_INAPPROPRIATE_AUTH, "Inappropriate authentication" }, + {LDAP_INVALID_CREDENTIALS, "Invalid credentials" }, + {LDAP_INSUFFICIENT_ACCESS, "Insufficient access" }, + {LDAP_BUSY, "DSA is busy" }, + {LDAP_UNAVAILABLE, "DSA is unavailable" }, + {LDAP_UNWILLING_TO_PERFORM, "DSA is unwilling to perform" }, + {LDAP_LOOP_DETECT, "Loop detected" }, + {LDAP_NAMING_VIOLATION, "Naming violation" }, + {LDAP_OBJECT_CLASS_VIOLATION, "Object class violation" }, + {LDAP_NOT_ALLOWED_ON_NONLEAF, "Operation not allowed on nonleaf" }, + {LDAP_NOT_ALLOWED_ON_RDN, "Operation not allowed on RDN" }, + {LDAP_ALREADY_EXISTS, "Already exists" }, + {LDAP_NO_OBJECT_CLASS_MODS, "Cannot modify object class" }, + {LDAP_RESULTS_TOO_LARGE, "Results too large" }, + {LDAP_OTHER, "Unknown error" }, + {LDAP_SERVER_DOWN, "Can't contact LDAP server" }, + {LDAP_LOCAL_ERROR, "Local error" }, + {LDAP_ENCODING_ERROR, "Encoding error" }, + {LDAP_DECODING_ERROR, "Decoding error" }, + {LDAP_TIMEOUT, "Timed out" }, + {LDAP_AUTH_UNKNOWN, "Unknown authentication method" }, + {LDAP_FILTER_ERROR, "Bad search filter" }, + {LDAP_USER_CANCELLED, "User cancelled operation" }, + {LDAP_PARAM_ERROR, "Bad parameter to an ldap routine" }, + {LDAP_NO_MEMORY, "Out of memory" }, + {-1, 0 } }; char * diff --git a/libraries/libldap/free.c b/libraries/libldap/free.c index d7a13228e6..adf1d7b3c9 100644 --- a/libraries/libldap/free.c +++ b/libraries/libldap/free.c @@ -6,26 +6,18 @@ * link in lots of extra code when not using certain features */ +#include "portable.h" + #ifndef lint static char copyright[] = "@(#) Copyright (c) 1994 The Regents of the University of Michigan.\nAll rights reserved.\n"; #endif - #include -#include +#include #include -#ifdef MACOS -#include -#include "macos.h" -#else /* MACOS */ -#ifdef DOS -#include -#include "msdos.h" -#else /* DOS */ -#include -#include -#endif /* DOS */ -#endif /* MACOS */ + +#include +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/friendly.c b/libraries/libldap/friendly.c index 5d77f0be1c..1bf6c44033 100644 --- a/libraries/libldap/friendly.c +++ b/libraries/libldap/friendly.c @@ -5,28 +5,19 @@ * friendly.c */ +#include "portable.h" + #ifndef lint static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of Michigan.\nAll rights reserved.\n"; #endif #include -#include -#include -#ifdef MACOS #include -#include "macos.h" -#endif /* MACOS */ +#include -#if defined( DOS ) || defined( _WIN32 ) -#include -#include "msdos.h" -#endif /* DOS */ - -#if !defined( MACOS ) && !defined( DOS ) -#include -#include -#include -#endif +#include +#include +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/getattr.c b/libraries/libldap/getattr.c index 50caa774c5..24f6d08509 100644 --- a/libraries/libldap/getattr.c +++ b/libraries/libldap/getattr.c @@ -5,25 +5,18 @@ * getattr.c */ +#include "portable.h" + #ifndef lint static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n"; #endif #include -#include -#include -#ifdef MACOS #include -#include "macos.h" -#else /* MACOS */ -#if defined( DOS ) || defined( _WIN32 ) -#include -#include "msdos.h" -#else /* DOS */ -#include -#include -#endif /* DOS */ -#endif /* MACOS */ +#include + +#include +#include #include "lber.h" #include "ldap.h" @@ -36,7 +29,7 @@ ldap_first_attribute( LDAP *ld, LDAPMessage *entry, BerElement **ber ) Debug( LDAP_DEBUG_TRACE, "ldap_first_attribute\n", 0, 0, 0 ); - if ( (*ber = alloc_ber_with_options( ld )) == NULLBER ) { + if ( (*ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) { return( NULL ); } diff --git a/libraries/libldap/getdn.c b/libraries/libldap/getdn.c index bacc1a601c..5467b82c3e 100644 --- a/libraries/libldap/getdn.c +++ b/libraries/libldap/getdn.c @@ -5,29 +5,18 @@ * getdn.c */ +#include "portable.h" + #ifndef lint static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n"; #endif -#define DISABLE_BRIDGE -#include "portable.h" - #include -#include -#include #include +#include -#ifdef MACOS -#include "macos.h" -#else /* MACOS */ -#if defined( DOS ) || defined( _WIN32 ) -#include -#include "msdos.h" -#else /* DOS */ -#include -#include -#endif /* DOS */ -#endif /* MACOS */ +#include +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/getdxbyname.c b/libraries/libldap/getdxbyname.c index 50683f6c37..97548e218c 100644 --- a/libraries/libldap/getdxbyname.c +++ b/libraries/libldap/getdxbyname.c @@ -1,43 +1,25 @@ +#include "portable.h" + #ifdef LDAP_DNS /* * Copyright (c) 1995 Regents of the University of Michigan. * All rights reserved. * - * getdxbyname - retrieve DX records from the DNS (from TXT records for now) + * ldap_getdxbyname - retrieve DX records from the DNS (from TXT records for now) */ + #include -#include +#include #include -#ifdef MACOS -#include -#include "macos.h" -#endif /* MACOS */ +#include +#include -#if !defined(MACOS) && !defined(DOS) && !defined( _WIN32 ) -#include -#include -#include -#include -#include -#include -#include -#include -#endif #include "lber.h" #include "ldap.h" #include "ldap-int.h" -#if defined( DOS ) || defined( _WIN32 ) -#include "msdos.h" -#endif /* DOS */ - - -#ifdef NEEDPROTOS -static char ** decode_answer( unsigned char *answer, int len ); -#else /* NEEDPROTOS */ -static char **decode_answer(); -#endif /* NEEDPROTOS */ +static char ** decode_answer LDAP_P(( unsigned char *answer, int len )); extern int h_errno; extern char *h_errlist[]; @@ -47,17 +29,17 @@ extern char *h_errlist[]; /* - * getdxbyname - lookup DNS DX records for domain and return an ordered + * ldap_getdxbyname - lookup DNS DX records for domain and return an ordered * array. */ char ** -getdxbyname( char *domain ) +ldap_getdxbyname( char *domain ) { unsigned char buf[ PACKETSZ ]; char **dxs; int rc; - Debug( LDAP_DEBUG_TRACE, "getdxbyname( %s )\n", domain, 0, 0 ); + Debug( LDAP_DEBUG_TRACE, "ldap_getdxbyname( %s )\n", domain, 0, 0 ); memset( buf, 0, sizeof( buf )); @@ -91,9 +73,11 @@ decode_answer( unsigned char *answer, int len ) int dx_pref[ MAX_TO_SORT ]; #ifdef LDAP_DEBUG +#ifdef notdef if ( ldap_debug & LDAP_DEBUG_PACKETS ) { -/* __p_query( answer ); /* */ + __p_query( answer ); } +#endif #endif /* LDAP_DEBUG */ dxs = NULL; diff --git a/libraries/libldap/getentry.c b/libraries/libldap/getentry.c index f3f896e7b8..f4f523ea3d 100644 --- a/libraries/libldap/getentry.c +++ b/libraries/libldap/getentry.c @@ -5,25 +5,18 @@ * getentry.c */ +#include "portable.h" + #ifndef lint static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n"; #endif #include -#include -#include -#ifdef MACOS #include -#include "macos.h" -#else /* MACOS */ -#if defined( DOS ) || defined( _WIN32 ) -#include -#include "msdos.h" -#else /* DOS */ -#include -#include -#endif /* DOS */ -#endif /* MACOS */ +#include + +#include +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/getfilter.c b/libraries/libldap/getfilter.c index 58eccc7670..5f9bffbe47 100644 --- a/libraries/libldap/getfilter.c +++ b/libraries/libldap/getfilter.c @@ -5,7 +5,6 @@ * getfilter.c -- optional add-on to libldap */ -#define DISABLE_BRIDGE #include "portable.h" #ifndef lint @@ -14,26 +13,17 @@ static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of #include #include -#include #include -#include -#include -#ifdef MACOS -#include "macos.h" -#else /* MACOS */ -#ifdef DOS -#include -#include "msdos.h" -#else /* DOS */ +#include +#include +#include +#include + #include +#ifdef HAVE_SYS_FILE_H #include -#include -#ifndef VMS -#include -#endif /* VMS */ -#endif /* DOS */ -#endif /* MACOS */ +#endif #include "lber.h" #include "ldap.h" @@ -131,7 +121,7 @@ ldap_init_getfilter_buf( char *buf, long buflen ) nextflp->lfl_tag = strdup( tag ); nextflp->lfl_pattern = tok[ 0 ]; if ( (rc = regcomp( &re, nextflp->lfl_pattern, 0 )) != 0 ) { -#ifndef NO_USERINTERFACE +#ifdef LDAP_LIBUI char error[512]; regerror(rc, &re, error, sizeof(error)); ldap_getfilter_free( lfdp ); @@ -140,7 +130,7 @@ ldap_init_getfilter_buf( char *buf, long buflen ) #if !defined( MACOS ) && !defined( DOS ) errno = EINVAL; #endif -#endif /* NO_USERINTERFACE */ +#endif /* LDAP_LIBUI */ free_strarray( tok ); return( NULL ); } @@ -402,14 +392,16 @@ ldap_build_filter( char *filtbuf, unsigned long buflen, char *pattern, *f++ = *p; } - if ( f - filtbuf > buflen ) { + if ( (unsigned long) (f - filtbuf) > buflen ) { /* sanity check */ --f; break; } } - if ( suffix != NULL && ( f - filtbuf ) < buflen ) { + if ( suffix != NULL && ( + (unsigned long) ( f - filtbuf ) < buflen ) ) + { strcpy( f, suffix ); } else { *f = '\0'; diff --git a/libraries/libldap/getvalues.c b/libraries/libldap/getvalues.c index 55102be8ab..41efe9adf4 100644 --- a/libraries/libldap/getvalues.c +++ b/libraries/libldap/getvalues.c @@ -5,25 +5,18 @@ * getvalues.c */ +#include "portable.h" + #ifndef lint static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n"; #endif #include -#include -#include -#ifdef MACOS #include -#include "macos.h" -#else /* MACOS */ -#if defined( DOS ) || defined( _WIN32 ) -#include -#include "msdos.h" -#else /* DOS */ -#include -#include -#endif /* DOS */ -#endif /* MACOS */ +#include + +#include +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/kbind.c b/libraries/libldap/kbind.c index ce4a8a7f6d..e900cc881f 100644 --- a/libraries/libldap/kbind.c +++ b/libraries/libldap/kbind.c @@ -5,6 +5,8 @@ * kbind.c */ +#include "portable.h" + #ifndef lint static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of Michigan.\nAll rights reserved.\n"; #endif @@ -12,23 +14,11 @@ static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of #ifdef KERBEROS #include -#include +#include -#ifdef MACOS -#include -#include "macos.h" -#else /* MACOS */ -#ifdef DOS -#include "msdos.h" -#endif /* DOS */ -#include -#include -#if !defined(DOS) && !defined( _WIN32 ) -#include -#endif /* !DOS && !_WIN32 */ -#include -#include -#endif /* MACOS */ +#include +#include +#include #include "lber.h" #include "ldap.h" @@ -52,7 +42,7 @@ ldap_kerberos_bind1( LDAP *ld, char *dn ) BerElement *ber; char *cred; int rc, credlen; - char *get_kerberosv4_credentials(); + char *ldap_get_kerberosv4_credentials(); #ifdef STR_TRANSLATION int str_translation_on; #endif /* STR_TRANSLATION */ @@ -75,13 +65,13 @@ ldap_kerberos_bind1( LDAP *ld, char *dn ) if ( dn == NULL ) dn = ""; - if ( (cred = get_kerberosv4_credentials( ld, dn, "ldapserver", + if ( (cred = ldap_get_kerberosv4_credentials( ld, dn, "ldapserver", &credlen )) == NULL ) { return( -1 ); /* ld_errno should already be set */ } /* create a message to send */ - if ( (ber = alloc_ber_with_options( ld )) == NULLBER ) { + if ( (ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) { free( cred ); return( -1 ); } @@ -119,7 +109,7 @@ ldap_kerberos_bind1( LDAP *ld, char *dn ) #endif /* !NO_CACHE */ /* send the message */ - return ( send_initial_request( ld, LDAP_REQ_BIND, dn, ber )); + return ( ldap_send_initial_request( ld, LDAP_REQ_BIND, dn, ber )); } int @@ -159,7 +149,7 @@ ldap_kerberos_bind2( LDAP *ld, char *dn ) BerElement *ber; char *cred; int rc, credlen; - char *get_kerberosv4_credentials(); + char *ldap_get_kerberosv4_credentials(); #ifdef STR_TRANSLATION int str_translation_on; #endif /* STR_TRANSLATION */ @@ -169,13 +159,13 @@ ldap_kerberos_bind2( LDAP *ld, char *dn ) if ( dn == NULL ) dn = ""; - if ( (cred = get_kerberosv4_credentials( ld, dn, "x500dsa", &credlen )) + if ( (cred = ldap_get_kerberosv4_credentials( ld, dn, "x500dsa", &credlen )) == NULL ) { return( -1 ); /* ld_errno should already be set */ } /* create a message to send */ - if ( (ber = alloc_ber_with_options( ld )) == NULLBER ) { + if ( (ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) { free( cred ); return( -1 ); } @@ -207,7 +197,7 @@ ldap_kerberos_bind2( LDAP *ld, char *dn ) } /* send the message */ - return ( send_initial_request( ld, LDAP_REQ_BIND, dn, ber )); + return ( ldap_send_initial_request( ld, LDAP_REQ_BIND, dn, ber )); } /* synchronous bind to DSA using kerberos */ @@ -249,19 +239,19 @@ ldap_kerberos_bind_s( LDAP *ld, char *dn ) #ifndef AUTHMAN /* - * get_kerberosv4_credentials - obtain kerberos v4 credentials for ldap. + * ldap_get_kerberosv4_credentials - obtain kerberos v4 credentials for ldap. * The dn of the entry to which to bind is supplied. It's assumed the * user already has a tgt. */ char * -get_kerberosv4_credentials( LDAP *ld, char *who, char *service, int *len ) +ldap_get_kerberosv4_credentials( LDAP *ld, char *who, char *service, int *len ) { KTEXT_ST ktxt; int err; char realm[REALM_SZ], *cred, *krbinstance; - Debug( LDAP_DEBUG_TRACE, "get_kerberosv4_credentials\n", 0, 0, 0 ); + Debug( LDAP_DEBUG_TRACE, "ldap_get_kerberosv4_credentials\n", 0, 0, 0 ); if ( (err = krb_get_tf_realm( tkt_string(), realm )) != KSUCCESS ) { #ifndef NO_USERINTERFACE diff --git a/libraries/libldap/ldap-int.h b/libraries/libldap/ldap-int.h index 10adbe91ff..45d1eaf7ae 100644 --- a/libraries/libldap/ldap-int.h +++ b/libraries/libldap/ldap-int.h @@ -26,28 +26,18 @@ /* * in cache.c */ -#ifdef NEEDPROTOS -void add_request_to_cache( LDAP *ld, unsigned long msgtype, - BerElement *request ); -void add_result_to_cache( LDAP *ld, LDAPMessage *result ); -int check_cache( LDAP *ld, unsigned long msgtype, BerElement *request ); -#else /* NEEDPROTOS */ -void add_request_to_cache(); -void add_result_to_cache(); -int check_cache(); -#endif /* NEEDPROTOS */ +void ldap_add_request_to_cache LDAP_P(( LDAP *ld, unsigned long msgtype, + BerElement *request )); +void ldap_add_result_to_cache LDAP_P(( LDAP *ld, LDAPMessage *result )); +int ldap_check_cache LDAP_P(( LDAP *ld, unsigned long msgtype, BerElement *request )); #ifdef KERBEROS /* * in kerberos.c */ -#ifdef NEEDPROTOS -char *get_kerberosv4_credentials( LDAP *ld, char *who, char *service, - int *len ); -#else /* NEEDPROTOS */ -char *get_kerberosv4_credentials(); -#endif /* NEEDPROTOS */ +char *ldap_get_kerberosv4_credentials LDAP_P(( LDAP *ld, char *who, char *service, + int *len )); #endif /* KERBEROS */ @@ -55,135 +45,92 @@ char *get_kerberosv4_credentials(); /* * in open.c */ -#ifdef NEEDPROTOS int open_ldap_connection( LDAP *ld, Sockbuf *sb, char *host, int defport, char **krbinstancep, int async ); -#else /* NEEDPROTOS */ -int open_ldap_connection(); -#endif /* NEEDPROTOS */ /* * in os-ip.c */ -#ifdef NEEDPROTOS -int connect_to_host( Sockbuf *sb, char *host, unsigned long address, int port, +int ldap_connect_to_host( Sockbuf *sb, char *host, unsigned long address, int port, int async ); -void close_connection( Sockbuf *sb ); -#else /* NEEDPROTOS */ -int connect_to_host(); -void close_connection(); -#endif /* NEEDPROTOS */ +void ldap_close_connection( Sockbuf *sb ); #ifdef KERBEROS -#ifdef NEEDPROTOS -char *host_connected_to( Sockbuf *sb ); -#else /* NEEDPROTOS */ -char *host_connected_to(); -#endif /* NEEDPROTOS */ +char *ldap_host_connected_to( Sockbuf *sb ); #endif /* KERBEROS */ #ifdef LDAP_REFERRALS -#ifdef NEEDPROTOS int do_ldap_select( LDAP *ld, struct timeval *timeout ); -void *new_select_info( void ); -void free_select_info( void *sip ); -void mark_select_write( LDAP *ld, Sockbuf *sb ); -void mark_select_read( LDAP *ld, Sockbuf *sb ); -void mark_select_clear( LDAP *ld, Sockbuf *sb ); -int is_read_ready( LDAP *ld, Sockbuf *sb ); -int is_write_ready( LDAP *ld, Sockbuf *sb ); -#else /* NEEDPROTOS */ -int do_ldap_select(); -void *new_select_info(); -void free_select_info(); -void mark_select_write(); -void mark_select_read(); -void mark_select_clear(); -int is_read_ready(); -int is_write_ready(); -#endif /* NEEDPROTOS */ +void *ldap_new_select_info( void ); +void ldap_free_select_info( void *sip ); +void ldap_mark_select_write( LDAP *ld, Sockbuf *sb ); +void ldap_mark_select_read( LDAP *ld, Sockbuf *sb ); +void ldap_mark_select_clear( LDAP *ld, Sockbuf *sb ); +int ldap_is_read_ready( LDAP *ld, Sockbuf *sb ); +int ldap_is_write_ready( LDAP *ld, Sockbuf *sb ); #endif /* LDAP_REFERRALS */ /* * in request.c */ -#ifdef NEEDPROTOS -int send_initial_request( LDAP *ld, unsigned long msgtype, +int ldap_send_initial_request( LDAP *ld, unsigned long msgtype, char *dn, BerElement *ber ); -BerElement *alloc_ber_with_options( LDAP *ld ); -void set_ber_options( LDAP *ld, BerElement *ber ); -#else /* NEEDPROTOS */ -int send_initial_request(); -BerElement *alloc_ber_with_options(); -void set_ber_options(); -#endif /* NEEDPROTOS */ +BerElement *ldap_alloc_ber_with_options( LDAP *ld ); +void ldap_set_ber_options( LDAP *ld, BerElement *ber ); #if defined( LDAP_REFERRALS ) || defined( LDAP_DNS ) -#ifdef NEEDPROTOS -int send_server_request( LDAP *ld, BerElement *ber, int msgid, +int ldap_send_server_request( LDAP *ld, BerElement *ber, int msgid, LDAPRequest *parentreq, LDAPServer *srvlist, LDAPConn *lc, int bind ); -LDAPConn *new_connection( LDAP *ld, LDAPServer **srvlistp, int use_ldsb, +LDAPConn *ldap_new_connection( LDAP *ld, LDAPServer **srvlistp, int use_ldsb, int connect, int bind ); -LDAPRequest *find_request_by_msgid( LDAP *ld, int msgid ); -void free_request( LDAP *ld, LDAPRequest *lr ); -void free_connection( LDAP *ld, LDAPConn *lc, int force, int unbind ); -void dump_connection( LDAP *ld, LDAPConn *lconns, int all ); -void dump_requests_and_responses( LDAP *ld ); -#else /* NEEDPROTOS */ -int send_server_request(); -LDAPConn *new_connection(); -LDAPRequest *find_request_by_msgid(); -void free_request(); -void free_connection(); -void dump_connection(); -void dump_requests_and_responses(); -#endif /* NEEDPROTOS */ +LDAPRequest *ldap_find_request_by_msgid( LDAP *ld, int msgid ); +void ldap_free_request( LDAP *ld, LDAPRequest *lr ); +void ldap_free_connection( LDAP *ld, LDAPConn *lc, int force, int unbind ); +void ldap_dump_connection( LDAP *ld, LDAPConn *lconns, int all ); +void ldap_dump_requests_and_responses( LDAP *ld ); #endif /* LDAP_REFERRALS || LDAP_DNS */ #ifdef LDAP_REFERRALS -#ifdef NEEDPROTOS -int chase_referrals( LDAP *ld, LDAPRequest *lr, char **errstrp, int *hadrefp ); -int append_referral( LDAP *ld, char **referralsp, char *s ); -#else /* NEEDPROTOS */ -int chase_referrals(); -int append_referral(); -#endif /* NEEDPROTOS */ +int ldap_chase_referrals( LDAP *ld, LDAPRequest *lr, char **errstrp, int *hadrefp ); +int ldap_append_referral( LDAP *ld, char **referralsp, char *s ); #endif /* LDAP_REFERRALS */ /* * in search.c */ -#ifdef NEEDPROTOS BerElement *ldap_build_search_req( LDAP *ld, char *base, int scope, char *filter, char **attrs, int attrsonly ); -#else /* NEEDPROTOS */ -BerElement *ldap_build_search_req(); -#endif /* NEEDPROTOS */ /* * in unbind.c */ -#ifdef NEEDPROTOS int ldap_ld_free( LDAP *ld, int close ); -int send_unbind( LDAP *ld, Sockbuf *sb ); -#else /* NEEDPROTOS */ -int ldap_ld_free(); -int send_unbind(); -#endif /* NEEDPROTOS */ - +int ldap_send_unbind( LDAP *ld, Sockbuf *sb ); #ifdef LDAP_DNS /* * in getdxbyname.c */ -#ifdef NEEDPROTOS -char **getdxbyname( char *domain ); -#else /* NEEDPROTOS */ -char **getdxbyname(); -#endif /* NEEDPROTOS */ +char **ldap_getdxbyname( char *domain ); #endif /* LDAP_DNS */ + +#if defined( STR_TRANSLATION ) && defined( LDAP_DEFAULT_CHARSET ) +/* + * in charset.c + * + * added-in this stuff so that libldap.a would build, i.e. refs to + * these routines from open.c would resolve. + * hodges@stanford.edu 5-Feb-96 + */ +#if LDAP_CHARSET_8859 == LDAP_DEFAULT_CHARSET +extern +int ldap_t61_to_8859( char **bufp, unsigned long *buflenp, int free_input ); +extern +int ldap_8859_to_t61( char **bufp, unsigned long *buflenp, int free_input ); +#endif /* LDAP_CHARSET_8859 == LDAP_DEFAULT_CHARSET */ +#endif /* STR_TRANSLATION && LDAP_DEFAULT_CHARSET */ diff --git a/libraries/libldap/libldap.dsp b/libraries/libldap/libldap.dsp new file mode 100644 index 0000000000..367008fde8 --- /dev/null +++ b/libraries/libldap/libldap.dsp @@ -0,0 +1,218 @@ +# Microsoft Developer Studio Project File - Name="libldap" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=libldap - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "libldap.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "libldap.mak" CFG="libldap - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "libldap - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "libldap - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe + +!IF "$(CFG)" == "libldap - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "libldap - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /Z7 /Od /I "..\..\include" /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\Debug\libldap.lib" + +!ENDIF + +# Begin Target + +# Name "libldap - Win32 Release" +# Name "libldap - Win32 Debug" +# Begin Source File + +SOURCE=.\abandon.c +# End Source File +# Begin Source File + +SOURCE=.\add.c +# End Source File +# Begin Source File + +SOURCE=.\addentry.c +# End Source File +# Begin Source File + +SOURCE=.\bind.c +# End Source File +# Begin Source File + +SOURCE=.\cache.c +# End Source File +# Begin Source File + +SOURCE=.\charset.c +# End Source File +# Begin Source File + +SOURCE=.\cldap.c +# End Source File +# Begin Source File + +SOURCE=.\compare.c +# End Source File +# Begin Source File + +SOURCE=.\delete.c +# End Source File +# Begin Source File + +SOURCE=.\disptmpl.c +# End Source File +# Begin Source File + +SOURCE=.\dsparse.c +# End Source File +# Begin Source File + +SOURCE=.\error.c +# End Source File +# Begin Source File + +SOURCE=.\free.c +# End Source File +# Begin Source File + +SOURCE=.\friendly.c +# End Source File +# Begin Source File + +SOURCE=.\getattr.c +# End Source File +# Begin Source File + +SOURCE=.\getdn.c +# End Source File +# Begin Source File + +SOURCE=.\getdxbyname.c +# End Source File +# Begin Source File + +SOURCE=.\getentry.c +# End Source File +# Begin Source File + +SOURCE=.\getfilter.c +# End Source File +# Begin Source File + +SOURCE=.\getvalues.c +# End Source File +# Begin Source File + +SOURCE=.\kbind.c +# End Source File +# Begin Source File + +SOURCE=".\ldap-int.h" +# End Source File +# Begin Source File + +SOURCE=.\modify.c +# End Source File +# Begin Source File + +SOURCE=.\modrdn.c +# End Source File +# Begin Source File + +SOURCE=.\open.c +# End Source File +# Begin Source File + +SOURCE=".\os-ip.c" +# End Source File +# Begin Source File + +SOURCE=.\request.c +# End Source File +# Begin Source File + +SOURCE=.\result.c +# End Source File +# Begin Source File + +SOURCE=.\sbind.c +# End Source File +# Begin Source File + +SOURCE=.\search.c +# End Source File +# Begin Source File + +SOURCE=.\sort.c +# End Source File +# Begin Source File + +SOURCE=.\srchpref.c +# End Source File +# Begin Source File + +SOURCE=.\ufn.c +# End Source File +# Begin Source File + +SOURCE=.\unbind.c +# End Source File +# Begin Source File + +SOURCE=.\url.c +# End Source File +# End Target +# End Project diff --git a/libraries/libldap/libldap.dsw b/libraries/libldap/libldap.dsw new file mode 100644 index 0000000000..067d25e554 --- /dev/null +++ b/libraries/libldap/libldap.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "libldap"=.\libldap.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libraries/libldap/modify.c b/libraries/libldap/modify.c index 316dde787f..1766f8a26b 100644 --- a/libraries/libldap/modify.c +++ b/libraries/libldap/modify.c @@ -5,21 +5,16 @@ * modify.c */ +#include "portable.h" + #ifndef lint static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n"; #endif #include -#include -#ifdef MACOS -#include "macos.h" -#endif /* MACOS */ - -#if !defined( MACOS ) && !defined( DOS ) -#include -#include -#endif +#include +#include #include "lber.h" #include "ldap.h" @@ -69,7 +64,7 @@ ldap_modify( LDAP *ld, char *dn, LDAPMod **mods ) Debug( LDAP_DEBUG_TRACE, "ldap_modify\n", 0, 0, 0 ); /* create a message to send */ - if ( (ber = alloc_ber_with_options( ld )) == NULLBER ) { + if ( (ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) { return( -1 ); } @@ -105,7 +100,7 @@ ldap_modify( LDAP *ld, char *dn, LDAPMod **mods ) } /* send the message */ - return( send_initial_request( ld, LDAP_REQ_MODIFY, dn, ber )); + return( ldap_send_initial_request( ld, LDAP_REQ_MODIFY, dn, ber )); } int diff --git a/libraries/libldap/modrdn.c b/libraries/libldap/modrdn.c index f4624a919a..491fc97add 100644 --- a/libraries/libldap/modrdn.c +++ b/libraries/libldap/modrdn.c @@ -5,21 +5,16 @@ * modrdn.c */ +#include "portable.h" + #ifndef lint static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n"; #endif #include -#include -#ifdef MACOS -#include "macos.h" -#endif /* MACOS */ - -#if !defined( MACOS ) && !defined( DOS ) -#include -#include -#endif +#include +#include #include "lber.h" #include "ldap.h" @@ -53,7 +48,7 @@ ldap_modrdn2( LDAP *ld, char *dn, char *newrdn, int deleteoldrdn ) Debug( LDAP_DEBUG_TRACE, "ldap_modrdn\n", 0, 0, 0 ); /* create a message to send */ - if ( (ber = alloc_ber_with_options( ld )) == NULLBER ) { + if ( (ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) { return( -1 ); } @@ -65,7 +60,7 @@ ldap_modrdn2( LDAP *ld, char *dn, char *newrdn, int deleteoldrdn ) } /* send the message */ - return ( send_initial_request( ld, LDAP_REQ_MODRDN, dn, ber )); + return ( ldap_send_initial_request( ld, LDAP_REQ_MODRDN, dn, ber )); } int diff --git a/libraries/libldap/open.c b/libraries/libldap/open.c index 22cd98e377..30b48bafb5 100644 --- a/libraries/libldap/open.c +++ b/libraries/libldap/open.c @@ -5,32 +5,22 @@ * open.c */ +#include "portable.h" + #ifndef lint static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of Michigan.\nAll rights reserved.\n"; #endif #include -#include - -#ifdef MACOS #include -#include "macos.h" -#endif /* MACOS */ -#if defined( DOS ) || defined( _WIN32 ) -#include "msdos.h" -#include -#endif /* DOS */ +#include +#include -#if !defined(MACOS) && !defined(DOS) && !defined( _WIN32 ) -#include -#include -#include -#ifndef VMS +#ifdef HAVE_SYS_PARAM_H #include #endif -#include -#endif + #include "lber.h" #include "ldap.h" #include "ldap-int.h" @@ -81,7 +71,7 @@ ldap_open( char *host, int port ) } srv->lsrv_port = ld->ld_defport; - if (( ld->ld_defconn = new_connection( ld, &srv, 1,1,0 )) == NULL ) { + if (( ld->ld_defconn = ldap_new_connection( ld, &srv, 1,1,0 )) == NULL ) { if ( ld->ld_defhost != NULL ) free( srv->lsrv_host ); free( (char *)srv ); ldap_ld_free( ld, 0 ); @@ -126,7 +116,7 @@ ldap_init( char *defhost, int defport ) } #ifdef LDAP_REFERRALS - if (( ld->ld_selectinfo = new_select_info()) == NULL ) { + if (( ld->ld_selectinfo = ldap_new_select_info()) == NULL ) { free( (char*)ld ); return( NULL ); } @@ -136,7 +126,7 @@ ldap_init( char *defhost, int defport ) if ( defhost != NULL && ( ld->ld_defhost = strdup( defhost )) == NULL ) { #ifdef LDAP_REFERRALS - free_select_info( ld->ld_selectinfo ); + ldap_free_select_info( ld->ld_selectinfo ); #endif /* LDAP_REFERRALS */ free( (char*)ld ); return( NULL ); @@ -148,6 +138,10 @@ ldap_init( char *defhost, int defport ) ld->ld_lberoptions = LBER_USE_DER; ld->ld_refhoplimit = LDAP_DEFAULT_REFHOPLIMIT; +#ifdef LDAP_REFERRALS + ld->ld_options |= LDAP_OPT_REFERRALS; +#endif /* LDAP_REFERRALS */ + #if defined( STR_TRANSLATION ) && defined( LDAP_DEFAULT_CHARSET ) ld->ld_lberoptions |= LBER_TRANSLATE_STRINGS; #if LDAP_CHARSET_8859 == LDAP_DEFAULT_CHARSET @@ -163,13 +157,14 @@ int open_ldap_connection( LDAP *ld, Sockbuf *sb, char *host, int defport, char **krbinstancep, int async ) { - int rc, port; + int rc = -1; + int port; char *p, *q, *r; char *curhost, hostname[ 2*MAXHOSTNAMELEN ]; Debug( LDAP_DEBUG_TRACE, "open_ldap_connection\n", 0, 0, 0 ); - defport = htons( defport ); + defport = htons( (short) defport ); if ( host != NULL ) { for ( p = host; p != NULL && *p != '\0'; p = q ) { @@ -197,13 +192,13 @@ open_ldap_connection( LDAP *ld, Sockbuf *sb, char *host, int defport, port = defport; } - if (( rc = connect_to_host( sb, curhost, 0L, + if (( rc = ldap_connect_to_host( sb, curhost, 0L, port, async )) != -1 ) { break; } } } else { - rc = connect_to_host( sb, NULL, htonl( INADDR_LOOPBACK ), + rc = ldap_connect_to_host( sb, NULL, htonl( INADDR_LOOPBACK ), defport, async ); } @@ -213,7 +208,7 @@ open_ldap_connection( LDAP *ld, Sockbuf *sb, char *host, int defport, if ( krbinstancep != NULL ) { #ifdef KERBEROS - if (( *krbinstancep = host_connected_to( sb )) != NULL && + if (( *krbinstancep = ldap_host_connected_to( sb )) != NULL && ( p = strchr( *krbinstancep, '.' )) != NULL ) { *p = '\0'; } diff --git a/libraries/libldap/os-ip.c b/libraries/libldap/os-ip.c index 63fc1373ad..b1c8d64c9b 100644 --- a/libraries/libldap/os-ip.c +++ b/libraries/libldap/os-ip.c @@ -5,72 +5,28 @@ * os-ip.c -- platform-specific TCP & UDP related code */ -#ifndef lint -static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of Michigan.\nAll rights reserved.\n"; -#endif - -#define DISABLE_BRIDGE #include "portable.h" #include #include + +#include +#include #include -#include +#include -#ifdef _WIN32 +#ifdef HAVE_IO_H #include -#include "msdos.h" -#else /* _WIN32 */ -#include -#include -#include -#include -#include -#include -#include -#endif /* _WIN32 */ -#ifdef _AIX -#include -#endif /* _AIX */ -#ifdef VMS -#include "ucx_select.h" -#endif /* VMS */ +#endif /* HAVE_IO_H */ + +#if defined( HAVE_SYS_FILIO_H ) +#include +#elif defined( HAVE_SYS_IOCTL_H ) +#include +#endif -#include "portable.h" #include "lber.h" #include "ldap.h" - -#ifdef LDAP_REFERRALS -#ifdef USE_SYSCONF -#include -#endif /* USE_SYSCONF */ -#ifdef notyet -#ifdef NEED_FILIO -#include -#else /* NEED_FILIO */ -#include -#endif /* NEED_FILIO */ -#endif /* notyet */ -#endif /* LDAP_REFERRALS */ - -#ifdef MACOS -#define tcp_close( s ) tcpclose( s ) -#else /* MACOS */ -#ifdef DOS -#ifdef PCNFS -#define tcp_close( s ) close( s ) -#endif /* PCNFS */ -#ifdef NCSA -#define tcp_close( s ) netclose( s ); netshut() -#endif /* NCSA */ -#ifdef WINSOCK -#define tcp_close( s ) closesocket( s ); WSACleanup(); -#endif /* WINSOCK */ -#else /* DOS */ -#define tcp_close( s ) close( s ) -#endif /* DOS */ -#endif /* MACOS */ - #include "ldap-int.h" int @@ -95,7 +51,7 @@ ldap_connect_to_host( Sockbuf *sb, char *host, unsigned long address, #endif /* notyet */ Debug( LDAP_DEBUG_TRACE, "ldap_connect_to_host: %s:%d\n", - ( host == NULL ) ? "(by address)" : host, ntohs( port ), 0 ); + ( host == NULL ) ? "(by address)" : host, (int) ntohs( (short) port ), 0 ); connected = use_hp = 0; @@ -239,7 +195,7 @@ ldap_mark_select_write( LDAP *ld, Sockbuf *sb ) sip = (struct selectinfo *)ld->ld_selectinfo; if ( !FD_ISSET( sb->sb_sd, &sip->si_writefds )) { - FD_SET( sb->sb_sd, &sip->si_writefds ); + FD_SET( (u_int) sb->sb_sd, &sip->si_writefds ); } } @@ -252,7 +208,7 @@ ldap_mark_select_read( LDAP *ld, Sockbuf *sb ) sip = (struct selectinfo *)ld->ld_selectinfo; if ( !FD_ISSET( sb->sb_sd, &sip->si_readfds )) { - FD_SET( sb->sb_sd, &sip->si_readfds ); + FD_SET( (u_int) sb->sb_sd, &sip->si_readfds ); } } @@ -264,8 +220,8 @@ ldap_mark_select_clear( LDAP *ld, Sockbuf *sb ) sip = (struct selectinfo *)ld->ld_selectinfo; - FD_CLR( sb->sb_sd, &sip->si_writefds ); - FD_CLR( sb->sb_sd, &sip->si_readfds ); + FD_CLR( (u_int) sb->sb_sd, &sip->si_writefds ); + FD_CLR( (u_int) sb->sb_sd, &sip->si_readfds ); } @@ -322,9 +278,9 @@ do_ldap_select( LDAP *ld, struct timeval *timeout ) Debug( LDAP_DEBUG_TRACE, "do_ldap_select\n", 0, 0, 0 ); if ( tblsize == 0 ) { -#ifdef USE_SYSCONF +#if defined( HAVE_SYSCONF ) tblsize = sysconf( _SC_OPEN_MAX ); -#else /* !USE_SYSCONF */ +#elif defined( HAVE_GETDTABLESIZE ) tblsize = getdtablesize(); #endif /* !USE_SYSCONF */ diff --git a/libraries/libldap/request.c b/libraries/libldap/request.c index b8b50eac7b..da782a8e72 100644 --- a/libraries/libldap/request.c +++ b/libraries/libldap/request.c @@ -5,85 +5,44 @@ * request.c - sending of ldap requests; handling of referrals */ +#include "portable.h" + #ifndef lint static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of Michigan.\nAll rights reserved.\n"; #endif #include -#include -#ifdef MACOS #include -#include -#include "macos.h" -#else /* MACOS */ -#if defined( DOS ) || defined( _WIN32 ) -#include "msdos.h" -#include -#include -#ifdef PCNFS -#include -#include -#include -#endif /* PCNFS */ -#ifdef NCSA -#include "externs.h" -#endif /* NCSA */ -#else /* DOS */ -#include -#include -#include -#include -#ifdef _AIX -#include -#endif /* _AIX */ -#include "portable.h" -#endif /* DOS */ -#endif /* MACOS */ -#ifdef VMS -#include "ucx_select.h" -#endif + +#include +#include +#include +#include +#include + #include "lber.h" #include "ldap.h" #include "ldap-int.h" -#ifdef USE_SYSCONF -#include -#endif /* USE_SYSCONF */ - - #if defined( LDAP_REFERRALS ) || defined( LDAP_DNS ) -#ifdef NEEDPROTOS -static LDAPConn *find_connection( LDAP *ld, LDAPServer *srv, int any ); -static void use_connection( LDAP *ld, LDAPConn *lc ); -static void free_servers( LDAPServer *srvlist ); -#else /* NEEDPROTOS */ -static LDAPConn *find_connection(); -static void use_connection(); -static void free_servers(); -#endif /* NEEDPROTOS */ +static LDAPConn *find_connection LDAP_P(( LDAP *ld, LDAPServer *srv, int any )); +static void use_connection LDAP_P(( LDAP *ld, LDAPConn *lc )); +static void free_servers LDAP_P(( LDAPServer *srvlist )); #endif /* LDAP_REFERRALS || LDAP_DNS */ #ifdef LDAP_DNS -#ifdef NEEDPROTOS -static LDAPServer *dn2servers( LDAP *ld, char *dn ); -#else /* NEEDPROTOS */ -static LDAPServer *dn2servers(); -#endif /* NEEDPROTOS */ +#tatic LDAPServer *dn2servers LDAP_P(( LDAP *ld, char *dn )); #endif /* LDAP_DNS */ #ifdef LDAP_REFERRALS -#ifdef NEEDPROTOS -static BerElement *re_encode_request( LDAP *ld, BerElement *origber, - int msgid, char **dnp ); -#else /* NEEDPROTOS */ -static BerElement *re_encode_request(); -#endif /* NEEDPROTOS */ +static BerElement *re_encode_request LDAP_P(( LDAP *ld, BerElement *origber, + int msgid, char **dnp )); #endif /* LDAP_REFERRALS */ BerElement * -alloc_ber_with_options( LDAP *ld ) +ldap_alloc_ber_with_options( LDAP *ld ) { BerElement *ber; @@ -91,7 +50,7 @@ alloc_ber_with_options( LDAP *ld ) ld->ld_errno = LDAP_NO_MEMORY; #ifdef STR_TRANSLATION } else { - set_ber_options( ld, ber ); + ldap_set_ber_options( ld, ber ); #endif /* STR_TRANSLATION */ } @@ -100,7 +59,7 @@ alloc_ber_with_options( LDAP *ld ) void -set_ber_options( LDAP *ld, BerElement *ber ) +ldap_set_ber_options( LDAP *ld, BerElement *ber ) { ber->ber_options = ld->ld_lberoptions; #ifdef STR_TRANSLATION @@ -114,14 +73,14 @@ set_ber_options( LDAP *ld, BerElement *ber ) int -send_initial_request( LDAP *ld, unsigned long msgtype, char *dn, +ldap_send_initial_request( LDAP *ld, unsigned long msgtype, char *dn, BerElement *ber ) { #if defined( LDAP_REFERRALS ) || defined( LDAP_DNS ) LDAPServer *servers; #endif /* LDAP_REFERRALS || LDAP_DNS */ - Debug( LDAP_DEBUG_TRACE, "send_initial_request\n", 0, 0, 0 ); + Debug( LDAP_DEBUG_TRACE, "ldap_send_initial_request\n", 0, 0, 0 ); #if !defined( LDAP_REFERRALS ) && !defined( LDAP_DNS ) if ( ber_flush( &ld->ld_sb, ber, 1 ) != 0 ) { @@ -165,7 +124,7 @@ send_initial_request( LDAP *ld, unsigned long msgtype, char *dn, } #endif /* LDAP_DNS */ - return( send_server_request( ld, ber, ld->ld_msgid, NULL, servers, + return( ldap_send_server_request( ld, ber, ld->ld_msgid, NULL, servers, NULL, 0 )); #endif /* !LDAP_REFERRALS && !LDAP_DNS */ } @@ -174,13 +133,15 @@ send_initial_request( LDAP *ld, unsigned long msgtype, char *dn, #if defined( LDAP_REFERRALS ) || defined( LDAP_DNS ) int -send_server_request( LDAP *ld, BerElement *ber, int msgid, LDAPRequest +ldap_send_server_request( LDAP *ld, BerElement *ber, int msgid, LDAPRequest *parentreq, LDAPServer *srvlist, LDAPConn *lc, int bind ) { LDAPRequest *lr; + int incparent; - Debug( LDAP_DEBUG_TRACE, "send_server_request\n", 0, 0, 0 ); + Debug( LDAP_DEBUG_TRACE, "ldap_send_server_request\n", 0, 0, 0 ); + incparent = 0; ld->ld_errno = LDAP_SUCCESS; /* optimistic */ if ( lc == NULL ) { @@ -189,7 +150,12 @@ send_server_request( LDAP *ld, BerElement *ber, int msgid, LDAPRequest } else { if (( lc = find_connection( ld, srvlist, 1 )) == NULL ) { - lc = new_connection( ld, &srvlist, 0, 1, bind ); + if ( bind && (parentreq != NULL) ) { + /* Remember the bind in the parent */ + incparent = 1; + ++parentreq->lr_outrefcnt; + } + lc = ldap_new_connection( ld, &srvlist, 0, 1, bind ); } free_servers( srvlist ); } @@ -200,6 +166,10 @@ send_server_request( LDAP *ld, BerElement *ber, int msgid, LDAPRequest if ( ld->ld_errno == LDAP_SUCCESS ) { ld->ld_errno = LDAP_SERVER_DOWN; } + if ( incparent ) { + /* Forget about the bind */ + --parentreq->lr_outrefcnt; + } return( -1 ); } @@ -207,8 +177,12 @@ send_server_request( LDAP *ld, BerElement *ber, int msgid, LDAPRequest if (( lr = (LDAPRequest *)calloc( 1, sizeof( LDAPRequest ))) == NULL ) { ld->ld_errno = LDAP_NO_MEMORY; - free_connection( ld, lc, 0, 0 ); + ldap_free_connection( ld, lc, 0, 0 ); ber_free( ber, 1 ); + if ( incparent ) { + /* Forget about the bind */ + --parentreq->lr_outrefcnt; + } return( -1 ); } lr->lr_msgid = msgid; @@ -217,7 +191,10 @@ send_server_request( LDAP *ld, BerElement *ber, int msgid, LDAPRequest lr->lr_ber = ber; lr->lr_conn = lc; if ( parentreq != NULL ) { /* sub-request */ - ++parentreq->lr_outrefcnt; + if ( !incparent ) { + /* Increment if we didn't do it before the bind */ + ++parentreq->lr_outrefcnt; + } lr->lr_origid = parentreq->lr_origid; lr->lr_parentcnt = parentreq->lr_parentcnt + 1; lr->lr_parent = parentreq; @@ -240,12 +217,12 @@ send_server_request( LDAP *ld, BerElement *ber, int msgid, LDAPRequest if ( errno == EWOULDBLOCK ) { /* need to continue write later */ lr->lr_status = LDAP_REQST_WRITING; - mark_select_write( ld, lc->lconn_sb ); + ldap_mark_select_write( ld, lc->lconn_sb ); } else { #else /* notyet */ ld->ld_errno = LDAP_SERVER_DOWN; - free_request( ld, lr ); - free_connection( ld, lc, 0, 0 ); + ldap_free_request( ld, lr ); + ldap_free_connection( ld, lc, 0, 0 ); return( -1 ); #endif /* notyet */ #ifdef notyet @@ -258,7 +235,7 @@ send_server_request( LDAP *ld, BerElement *ber, int msgid, LDAPRequest } /* sent -- waiting for a response */ - mark_select_read( ld, lc->lconn_sb ); + ldap_mark_select_read( ld, lc->lconn_sb ); } ld->ld_errno = LDAP_SUCCESS; @@ -267,7 +244,7 @@ send_server_request( LDAP *ld, BerElement *ber, int msgid, LDAPRequest LDAPConn * -new_connection( LDAP *ld, LDAPServer **srvlistp, int use_ldsb, +ldap_new_connection( LDAP *ld, LDAPServer **srvlistp, int use_ldsb, int connect, int bind ) { LDAPConn *lc; @@ -367,7 +344,7 @@ new_connection( LDAP *ld, LDAPServer **srvlistp, int use_ldsb, } if ( err != 0 ) { - free_connection( ld, lc, 1, 0 ); + ldap_free_connection( ld, lc, 1, 0 ); lc = NULL; } } @@ -414,19 +391,19 @@ use_connection( LDAP *ld, LDAPConn *lc ) void -free_connection( LDAP *ld, LDAPConn *lc, int force, int unbind ) +ldap_free_connection( LDAP *ld, LDAPConn *lc, int force, int unbind ) { LDAPConn *tmplc, *prevlc; - Debug( LDAP_DEBUG_TRACE, "free_connection\n", 0, 0, 0 ); + Debug( LDAP_DEBUG_TRACE, "ldap_free_connection\n", 0, 0, 0 ); if ( force || --lc->lconn_refcnt <= 0 ) { if ( lc->lconn_status == LDAP_CONNST_CONNECTED ) { - mark_select_clear( ld, lc->lconn_sb ); + ldap_mark_select_clear( ld, lc->lconn_sb ); if ( unbind ) { - send_unbind( ld, lc->lconn_sb ); + ldap_send_unbind( ld, lc->lconn_sb ); } - close_connection( lc->lconn_sb ); + ldap_close_connection( lc->lconn_sb ); if ( lc->lconn_sb->sb_ber.ber_buf != NULL ) { free( lc->lconn_sb->sb_ber.ber_buf ); } @@ -442,6 +419,7 @@ free_connection( LDAP *ld, LDAPConn *lc, int force, int unbind ) } break; } + prevlc = tmplc; } free_servers( lc->lconn_server ); if ( lc->lconn_krbinstance != NULL ) { @@ -451,11 +429,11 @@ free_connection( LDAP *ld, LDAPConn *lc, int force, int unbind ) free( (char *)lc->lconn_sb ); } free( lc ); - Debug( LDAP_DEBUG_TRACE, "free_connection: actually freed\n", + Debug( LDAP_DEBUG_TRACE, "ldap_free_connection: actually freed\n", 0, 0, 0 ); } else { lc->lconn_lastused = time( 0 ); - Debug( LDAP_DEBUG_TRACE, "free_connection: refcnt %d\n", + Debug( LDAP_DEBUG_TRACE, "ldap_free_connection: refcnt %d\n", lc->lconn_refcnt, 0, 0 ); } } @@ -463,7 +441,7 @@ free_connection( LDAP *ld, LDAPConn *lc, int force, int unbind ) #ifdef LDAP_DEBUG void -dump_connection( LDAP *ld, LDAPConn *lconns, int all ) +ldap_dump_connection( LDAP *ld, LDAPConn *lconns, int all ) { LDAPConn *lc; @@ -490,7 +468,7 @@ dump_connection( LDAP *ld, LDAPConn *lconns, int all ) void -dump_requests_and_responses( LDAP *ld ) +ldap_dump_requests_and_responses( LDAP *ld ) { LDAPRequest *lr; LDAPMessage *lm, *l; @@ -531,11 +509,11 @@ dump_requests_and_responses( LDAP *ld ) void -free_request( LDAP *ld, LDAPRequest *lr ) +ldap_free_request( LDAP *ld, LDAPRequest *lr ) { LDAPRequest *tmplr, *nextlr; - Debug( LDAP_DEBUG_TRACE, "free_request (origid %d, msgid %d)\n", + Debug( LDAP_DEBUG_TRACE, "ldap_free_request (origid %d, msgid %d)\n", lr->lr_origid, lr->lr_msgid, 0 ); if ( lr->lr_parent != NULL ) { @@ -544,7 +522,7 @@ free_request( LDAP *ld, LDAPRequest *lr ) /* free all referrals (child requests) */ for ( tmplr = lr->lr_refnext; tmplr != NULL; tmplr = nextlr ) { nextlr = tmplr->lr_refnext; - free_request( ld, tmplr ); + ldap_free_request( ld, tmplr ); } } @@ -599,7 +577,7 @@ free_servers( LDAPServer *srvlist ) * XXX merging of errors in this routine needs to be improved */ int -chase_referrals( LDAP *ld, LDAPRequest *lr, char **errstrp, int *hadrefp ) +ldap_chase_referrals( LDAP *ld, LDAPRequest *lr, char **errstrp, int *hadrefp ) { int rc, count, len, newdn; #ifdef LDAP_DNS @@ -610,7 +588,7 @@ chase_referrals( LDAP *ld, LDAPRequest *lr, char **errstrp, int *hadrefp ) LDAPServer *srv; BerElement *ber; - Debug( LDAP_DEBUG_TRACE, "chase_referrals\n", 0, 0, 0 ); + Debug( LDAP_DEBUG_TRACE, "ldap_chase_referrals\n", 0, 0, 0 ); ld->ld_errno = LDAP_SUCCESS; /* optimistic */ *hadrefp = 0; @@ -681,7 +659,7 @@ chase_referrals( LDAP *ld, LDAPRequest *lr, char **errstrp, int *hadrefp ) } else { Debug( LDAP_DEBUG_TRACE, "ignoring unknown referral <%s>\n", ref, 0, 0 ); - rc = append_referral( ld, &unfollowed, ref ); + rc = ldap_append_referral( ld, &unfollowed, ref ); *hadrefp = 1; continue; } @@ -728,14 +706,14 @@ chase_referrals( LDAP *ld, LDAPRequest *lr, char **errstrp, int *hadrefp ) } #endif /* LDAP_DNS */ - if ( srv != NULL && send_server_request( ld, ber, ld->ld_msgid, + if ( srv != NULL && ldap_send_server_request( ld, ber, ld->ld_msgid, lr, srv, NULL, 1 ) >= 0 ) { ++count; } else { Debug( LDAP_DEBUG_ANY, "Unable to chase referral (%s)\n", ldap_err2string( ld->ld_errno ), 0, 0 ); - rc = append_referral( ld, &unfollowed, ref ); + rc = ldap_append_referral( ld, &unfollowed, ref ); } if ( !newdn && refdn != NULL ) { @@ -751,7 +729,7 @@ chase_referrals( LDAP *ld, LDAPRequest *lr, char **errstrp, int *hadrefp ) int -append_referral( LDAP *ld, char **referralsp, char *s ) +ldap_append_referral( LDAP *ld, char **referralsp, char *s ) { int first; @@ -810,7 +788,7 @@ re_encode_request( LDAP *ld, BerElement *origber, int msgid, char **dnp ) return( NULL ); } - if (( ber = alloc_ber_with_options( ld )) == NULLBER ) { + if (( ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) { return( NULL ); } @@ -866,7 +844,7 @@ re_encode_request( LDAP *ld, BerElement *origber, int msgid, char **dnp ) LDAPRequest * -find_request_by_msgid( LDAP *ld, int msgid ) +ldap_find_request_by_msgid( LDAP *ld, int msgid ) { LDAPRequest *lr; @@ -895,7 +873,7 @@ dn2servers( LDAP *ld, char *dn ) /* dn can also be a domain.... */ domain = dn; } - if (( dxs = getdxbyname( domain )) == NULL ) { + if (( dxs = ldap_getdxbyname( domain )) == NULL ) { ld->ld_errno = LDAP_NO_MEMORY; return( NULL ); } diff --git a/libraries/libldap/result.c b/libraries/libldap/result.c index 3f8408df18..7dafad5e8b 100644 --- a/libraries/libldap/result.c +++ b/libraries/libldap/result.c @@ -5,83 +5,41 @@ * result.c - wait for an ldap result */ +#include "portable.h" + #ifndef lint static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n"; #endif #include -#include -#ifdef MACOS #include -#include -#include "macos.h" -#else /* MACOS */ -#if defined( DOS ) || defined( _WIN32 ) -#include -#include "msdos.h" -#ifdef PCNFS -#include -#include -#include -#endif /* PCNFS */ -#ifdef NCSA -#include "externs.h" -#endif /* NCSA */ -#else /* DOS */ -#include -#include -#include -#include -#ifdef _AIX -#include -#endif /* _AIX */ -#include "portable.h" -#endif /* DOS */ -#endif /* MACOS */ -#ifdef VMS -#include "ucx_select.h" -#endif + +#include +#include +#include +#include +#include + #include "lber.h" #include "ldap.h" #include "ldap-int.h" -#ifdef USE_SYSCONF -#include -#endif /* USE_SYSCONF */ -#ifdef NEEDPROTOS -static int ldap_abandoned( LDAP *ld, int msgid ); -static int ldap_mark_abandoned( LDAP *ld, int msgid ); -static int wait4msg( LDAP *ld, int msgid, int all, struct timeval *timeout, - LDAPMessage **result ); +static int ldap_abandoned LDAP_P(( LDAP *ld, int msgid )); +static int ldap_mark_abandoned LDAP_P(( LDAP *ld, int msgid )); +static int wait4msg LDAP_P(( LDAP *ld, int msgid, int all, struct timeval *timeout, + LDAPMessage **result )); #ifdef LDAP_REFERRALS -static int read1msg( LDAP *ld, int msgid, int all, Sockbuf *sb, LDAPConn *lc, - LDAPMessage **result ); -static int build_result_ber( LDAP *ld, BerElement *ber, LDAPRequest *lr ); -static void merge_error_info( LDAP *ld, LDAPRequest *parentr, LDAPRequest *lr ); +static int read1msg LDAP_P(( LDAP *ld, int msgid, int all, Sockbuf *sb, LDAPConn *lc, + LDAPMessage **result )); +static int build_result_ber LDAP_P(( LDAP *ld, BerElement *ber, LDAPRequest *lr )); +static void merge_error_info LDAP_P(( LDAP *ld, LDAPRequest *parentr, LDAPRequest *lr )); #else /* LDAP_REFERRALS */ -static int read1msg( LDAP *ld, int msgid, int all, Sockbuf *sb, - LDAPMessage **result ); +static int read1msg LDAP_P(( LDAP *ld, int msgid, int all, Sockbuf *sb, + LDAPMessage **result )); #endif /* LDAP_REFERRALS */ #if defined( CLDAP ) || !defined( LDAP_REFERRALS ) -static int ldap_select1( LDAP *ld, struct timeval *timeout ); -#endif -#else /* NEEDPROTOS */ -static int ldap_abandoned(); -static int ldap_mark_abandoned(); -static int wait4msg(); -static int read1msg(); -#ifdef LDAP_REFERRALS -static int build_result_ber(); -static void merge_error_info(); -#endif /* LDAP_REFERRALS */ -#if defined( CLDAP ) || !defined( LDAP_REFERRALS ) -static int ldap_select1(); -#endif -#endif /* NEEDPROTOS */ - -#if !defined( MACOS ) && !defined( DOS ) -extern int errno; +static int ldap_select1 LDAP_P(( LDAP *ld, struct timeval *timeout )); #endif @@ -181,7 +139,8 @@ wait4msg( LDAP *ld, int msgid, int all, struct timeval *timeout, { int rc; struct timeval tv, *tvp; - long start_time, tmp_time; + time_t start_time = 0; + time_t tmp_time; #ifdef LDAP_REFERRALS LDAPConn *lc, *nextlc; #endif /* LDAP_REFERRALS */ @@ -201,7 +160,7 @@ wait4msg( LDAP *ld, int msgid, int all, struct timeval *timeout, } else { tv = *timeout; tvp = &tv; - start_time = (long)time( NULL ); + start_time = time( NULL ); } rc = -2; @@ -231,8 +190,8 @@ wait4msg( LDAP *ld, int msgid, int all, struct timeval *timeout, #else /* !LDAP_REFERRALS */ #ifdef LDAP_DEBUG if ( ldap_debug & LDAP_DEBUG_TRACE ) { - dump_connection( ld, ld->ld_conns, 1 ); - dump_requests_and_responses( ld ); + ldap_dump_connection( ld, ld->ld_conns, 1 ); + ldap_dump_requests_and_responses( ld ); } #endif /* LDAP_DEBUG */ for ( lc = ld->ld_conns; lc != NULL; lc = lc->lconn_next ) { @@ -276,7 +235,7 @@ wait4msg( LDAP *ld, int msgid, int all, struct timeval *timeout, nextlc = lc->lconn_next; if ( lc->lconn_status == LDAP_CONNST_CONNECTED && - is_read_ready( ld, + ldap_is_read_ready( ld, lc->lconn_sb )) { rc = read1msg( ld, msgid, all, lc->lconn_sb, lc, result ); @@ -287,7 +246,7 @@ wait4msg( LDAP *ld, int msgid, int all, struct timeval *timeout, #endif /* !LDAP_REFERRALS */ if ( rc == -2 && tvp != NULL ) { - tmp_time = (long)time( NULL ); + tmp_time = time( NULL ); if (( tv.tv_sec -= ( tmp_time - start_time )) <= 0 ) { rc = 0; /* timed out */ ld->ld_errno = LDAP_TIMEOUT; @@ -326,7 +285,7 @@ read1msg( LDAP *ld, int msgid, int all, Sockbuf *sb, Debug( LDAP_DEBUG_TRACE, "read1msg\n", 0, 0, 0 ); ber_init( &ber, 0 ); - set_ber_options( ld, &ber ); + ldap_set_ber_options( ld, &ber ); /* get the next message */ if ( (tag = ber_get_next( sb, &len, &ber )) @@ -349,7 +308,7 @@ read1msg( LDAP *ld, int msgid, int all, Sockbuf *sb, } #ifdef LDAP_REFERRALS - if (( lr = find_request_by_msgid( ld, id )) == NULL ) { + if (( lr = ldap_find_request_by_msgid( ld, id )) == NULL ) { Debug( LDAP_DEBUG_ANY, "no request for response with msgid %ld (tossing)\n", id, 0, 0 ); @@ -384,7 +343,7 @@ read1msg( LDAP *ld, int msgid, int all, Sockbuf *sb, != LBER_ERROR ) { if ( lderr != LDAP_SUCCESS ) { /* referrals are in error string */ - refer_cnt = chase_referrals( ld, lr, + refer_cnt = ldap_chase_referrals( ld, lr, &lr->lr_res_error, &hadref ); } @@ -455,11 +414,11 @@ lr->lr_res_matched ? lr->lr_res_matched : "" ); } } - free_request( ld, lr ); + ldap_free_request( ld, lr ); } if ( lc != NULL ) { - free_connection( ld, lc, 0, 1 ); + ldap_free_connection( ld, lc, 0, 1 ); } } } @@ -481,7 +440,7 @@ lr->lr_res_matched ? lr->lr_res_matched : "" ); #ifndef NO_CACHE if ( ld->ld_cache != NULL ) { - add_result_to_cache( ld, new ); + ldap_add_result_to_cache( ld, new ); } #endif /* NO_CACHE */ @@ -542,7 +501,18 @@ lr->lr_res_matched ? lr->lr_res_matched : "" ); prev->lm_next = l->lm_next; *result = l; ld->ld_errno = LDAP_SUCCESS; +#ifdef LDAP_WORLD_P16 + /* + * XXX questionable fix; see text for [P16] on + * http://www.critical-angle.com/ldapworld/patch/ + * + * inclusion of this patch causes searchs to hang on + * multiple platforms + */ + return( l->lm_msgtype ); +#else /* LDAP_WORLD_P16 */ return( tag ); +#endif /* !LDAP_WORLD_P16 */ } return( -2 ); /* continue looking */ @@ -557,7 +527,7 @@ build_result_ber( LDAP *ld, BerElement *ber, LDAPRequest *lr ) long along; ber_init( ber, 0 ); - set_ber_options( ld, ber ); + ldap_set_ber_options( ld, ber ); if ( ber_printf( ber, "{it{ess}}", lr->lr_msgid, (long)lr->lr_res_msgtype, lr->lr_res_errno, lr->lr_res_matched ? lr->lr_res_matched : "", @@ -587,7 +557,7 @@ merge_error_info( LDAP *ld, LDAPRequest *parentr, LDAPRequest *lr ) if ( lr->lr_res_errno == LDAP_PARTIAL_RESULTS ) { parentr->lr_res_errno = lr->lr_res_errno; if ( lr->lr_res_error != NULL ) { - (void)append_referral( ld, &parentr->lr_res_error, + (void)ldap_append_referral( ld, &parentr->lr_res_error, lr->lr_res_error ); } } else if ( lr->lr_res_errno != LDAP_SUCCESS && @@ -629,9 +599,14 @@ ldap_select1( LDAP *ld, struct timeval *timeout ) if ( tblsize == 0 ) { #ifdef USE_SYSCONF tblsize = sysconf( _SC_OPEN_MAX ); -#else /* USE_SYSCONF */ +#else /* !USE_SYSCONF */ tblsize = getdtablesize(); -#endif /* USE_SYSCONF */ +#endif /* !USE_SYSCONF */ +#ifdef FD_SETSIZE + if ( tblsize > FD_SETSIZE ) { + tblsize = FD_SETSIZE; + } +#endif /* FD_SETSIZE */ } FD_ZERO( &readfds ); diff --git a/libraries/libldap/sbind.c b/libraries/libldap/sbind.c index 656c722f15..e8a5b2731f 100644 --- a/libraries/libldap/sbind.c +++ b/libraries/libldap/sbind.c @@ -5,21 +5,16 @@ * sbind.c */ +#include "portable.h" + #ifndef lint static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of Michigan.\nAll rights reserved.\n"; #endif #include -#include -#ifdef MACOS -#include "macos.h" -#endif /* MACOS */ - -#if !defined( MACOS ) && !defined( DOS ) -#include -#include -#endif +#include +#include #include "lber.h" #include "ldap.h" @@ -61,7 +56,7 @@ ldap_simple_bind( LDAP *ld, char *dn, char *passwd ) passwd = ""; /* create a message to send */ - if ( (ber = alloc_ber_with_options( ld )) == NULLBER ) { + if ( (ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) { return( -1 ); } @@ -80,7 +75,7 @@ ldap_simple_bind( LDAP *ld, char *dn, char *passwd ) #endif /* !NO_CACHE */ /* send the message */ - return( send_initial_request( ld, LDAP_REQ_BIND, dn, ber )); + return( ldap_send_initial_request( ld, LDAP_REQ_BIND, dn, ber )); } /* diff --git a/libraries/libldap/search.c b/libraries/libldap/search.c index 2b73ddd07e..3b53fc93ee 100644 --- a/libraries/libldap/search.c +++ b/libraries/libldap/search.c @@ -5,48 +5,30 @@ * search.c */ +#include "portable.h" + #ifndef lint static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n"; #endif #include -#include #include - -#ifdef MACOS #include -#include "macos.h" -#endif /* MACOS */ -#if defined( DOS ) || defined( _WIN32 ) -#include "msdos.h" -#endif /* DOS */ +#include +#include -#if !defined(MACOS) && !defined(DOS) && !defined( _WIN32 ) -#include -#include -#include -#endif #include "lber.h" #include "ldap.h" #include "ldap-int.h" -#ifdef NEEDPROTOS -static char *find_right_paren( char *s ); -static char *put_complex_filter( BerElement *ber, char *str, - unsigned long tag, int not ); -static int put_filter( BerElement *ber, char *str ); -static int put_simple_filter( BerElement *ber, char *str ); -static int put_substring_filter( BerElement *ber, char *type, char *str ); -static int put_filter_list( BerElement *ber, char *str ); -#else -static char *find_right_paren(); -static char *put_complex_filter(); -static int put_filter(); -static int put_simple_filter(); -static int put_substring_filter(); -static int put_filter_list(); -#endif /* NEEDPROTOS */ +static char *find_right_paren LDAP_P(( char *s )); +static char *put_complex_filter LDAP_P(( BerElement *ber, char *str, + unsigned long tag, int not )); +static int put_filter LDAP_P(( BerElement *ber, char *str )); +static int put_simple_filter LDAP_P(( BerElement *ber, char *str )); +static int put_substring_filter LDAP_P(( BerElement *ber, char *type, char *str )); +static int put_filter_list LDAP_P(( BerElement *ber, char *str )); /* * ldap_search - initiate an ldap (and X.500) search operation. Parameters: @@ -80,17 +62,17 @@ ldap_search( LDAP *ld, char *base, int scope, char *filter, #ifndef NO_CACHE if ( ld->ld_cache != NULL ) { - if ( check_cache( ld, LDAP_REQ_SEARCH, ber ) == 0 ) { + if ( ldap_check_cache( ld, LDAP_REQ_SEARCH, ber ) == 0 ) { ber_free( ber, 1 ); ld->ld_errno = LDAP_SUCCESS; return( ld->ld_msgid ); } - add_request_to_cache( ld, LDAP_REQ_SEARCH, ber ); + ldap_add_request_to_cache( ld, LDAP_REQ_SEARCH, ber ); } #endif /* NO_CACHE */ /* send the message */ - return ( send_initial_request( ld, LDAP_REQ_SEARCH, base, ber )); + return ( ldap_send_initial_request( ld, LDAP_REQ_SEARCH, base, ber )); } @@ -126,7 +108,7 @@ ldap_build_search_req( LDAP *ld, char *base, int scope, char *filter, */ /* create a message to send */ - if ( (ber = alloc_ber_with_options( ld )) == NULLBER ) { + if ( (ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) { return( NULLBER ); } diff --git a/libraries/libldap/sort.c b/libraries/libldap/sort.c index ee5d549c89..fbf1dd4be3 100644 --- a/libraries/libldap/sort.c +++ b/libraries/libldap/sort.c @@ -12,34 +12,27 @@ * sort.c: LDAP library entry and value sort routines */ +#include "portable.h" + #include -#include -#include #include -#ifdef MACOS -#include "macos.h" -#else /* MACOS */ -#ifdef DOS -#include -#include "msdos.h" -#endif /* DOS */ -#endif /* MACOS */ +#include + +#include +#include #include "lber.h" #include "ldap.h" + struct entrything { char **et_vals; LDAPMessage *et_msg; }; -#ifndef NEEDPROTOS -static int (*et_cmp_fn)(); -static int et_cmp(); -#else /* !NEEDPROTOS */ -static int (*et_cmp_fn)( char *a, char *b ); -static int et_cmp( void *aa, void *bb); -#endif /* !NEEDPROTOS */ +static int (*et_cmp_fn) LDAP_P(( char *a, char *b )); +static int et_cmp LDAP_P(( void *aa, void *bb)); + int ldap_sort_strcasecmp( @@ -139,7 +132,7 @@ int ldap_sort_values( LDAP *ld, char **vals, - int (*cmp)() + int (*cmp) LDAP_P((const void *, const void *)) ) { int nel; @@ -147,7 +140,7 @@ ldap_sort_values( for ( nel = 0; vals[nel] != NULL; nel++ ) ; /* NULL */ - qsort( vals, nel, sizeof(char *), cmp ); + qsort( vals, nel, sizeof(char *), (void *) cmp ); return( 0 ); } diff --git a/libraries/libldap/srchpref.c b/libraries/libldap/srchpref.c index 88c094ce76..8e6fd26e30 100644 --- a/libraries/libldap/srchpref.c +++ b/libraries/libldap/srchpref.c @@ -13,41 +13,29 @@ * 17 May 1994 by Gordon Good */ +#include "portable.h" + #include -#include -#include #include -#ifdef MACOS -#include "macos.h" -#else /* MACOS */ -#ifdef DOS -#include -#include "msdos.h" -#else /* DOS */ -#include +#include + +#include +#include +#include + +#ifdef HAVE_SYS_FILE_H #include -#ifndef VMS -#include -#endif /* VMS */ -#endif /* DOS */ -#endif /* MACOS */ +#endif #include "lber.h" #include "ldap.h" #include "srchpref.h" -#ifndef NEEDPROTOS -int next_line_tokens(); -void free_strarray(); -static void free_searchobj(); -static int read_next_searchobj(); -#else /* !NEEDPROTOS */ -int next_line_tokens( char **bufp, long *blenp, char ***toksp ); -void free_strarray( char **sap ); -static void free_searchobj( struct ldap_searchobj *so ); -static int read_next_searchobj( char **bufp, long *blenp, - struct ldap_searchobj **sop, int soversion ); -#endif /* !NEEDPROTOS */ +int next_line_tokens LDAP_P(( char **bufp, long *blenp, char ***toksp )); +void free_strarray LDAP_P(( char **sap )); +static void free_searchobj LDAP_P(( struct ldap_searchobj *so )); +static int read_next_searchobj LDAP_P(( char **bufp, long *blenp, + struct ldap_searchobj **sop, int soversion )); static char *sobjoptions[] = { @@ -110,7 +98,7 @@ int ldap_init_searchprefs_buf( char *buf, long buflen, struct ldap_searchobj **solistp ) { - int rc, version; + int rc = -1, version; char **toks; struct ldap_searchobj *prevso, *so; diff --git a/libraries/libldap/ufn.c b/libraries/libldap/ufn.c index 9596adf131..f87af4d87a 100644 --- a/libraries/libldap/ufn.c +++ b/libraries/libldap/ufn.c @@ -5,51 +5,35 @@ * ufn.c */ +#include "portable.h" + #ifndef lint static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of Michigan.\nAll rights reserved.\n"; #endif #include -#include +#include #include - -#ifdef MACOS #include -#include "macos.h" -#else /* MACOS */ -#if defined( DOS ) || defined( _WIN32 ) -#include "msdos.h" -#else /* DOS */ -#include -#include -#include -#endif /* DOS */ -#endif /* MACOS */ + +#include #include "lber.h" #include "ldap.h" -#ifdef NEEDPROTOS -typedef int (*cancelptype)( void *cancelparm ); -#else /* NEEDPROTOS */ -typedef int (*cancelptype)(); -#endif /* NEEDPROTOS */ +#include "ldapconfig.h" -#ifdef NEEDPROTOS -static int ldap_ufn_search_ctx( LDAP *ld, char **ufncomp, int ncomp, +typedef int (*cancelptype) LDAP_P(( void *cancelparm )); + +static int ldap_ufn_search_ctx LDAP_P(( LDAP *ld, char **ufncomp, int ncomp, char *prefix, char **attrs, int attrsonly, LDAPMessage **res, cancelptype cancelproc, void *cancelparm, char *tag1, char *tag2, - char *tag3 ); -static LDAPMessage *ldap_msg_merge( LDAP *ld, LDAPMessage *a, LDAPMessage *b ); -static LDAPMessage *ldap_ufn_expand( LDAP *ld, cancelptype cancelproc, + char *tag3 )); +static LDAPMessage *ldap_msg_merge LDAP_P(( LDAP *ld, LDAPMessage *a, LDAPMessage *b )); +static LDAPMessage *ldap_ufn_expand LDAP_P(( LDAP *ld, cancelptype cancelproc, void *cancelparm, char **dns, char *filter, int scope, - char **attrs, int aonly, int *err ); -LDAPFiltDesc *ldap_ufn_setfilter( LDAP *ld, char *fname ); -#else /* NEEDPROTOS */ -static LDAPMessage *ldap_msg_merge(); -static LDAPMessage *ldap_ufn_expand(); -LDAPFiltDesc *ldap_ufn_setfilter(); -#endif /* NEEDPROTOS */ + char **attrs, int aonly, int *err )); +LDAPFiltDesc *ldap_ufn_setfilter LDAP_P(( LDAP *ld, char *fname )); /* * ldap_ufn_search_ctx - do user friendly searching; provide cancel feature; @@ -83,9 +67,9 @@ ldap_ufn_search_ctx( LDAP *ld, char **ufncomp, int ncomp, char *prefix, char **attrs, int attrsonly, LDAPMessage **res, cancelptype cancelproc, void *cancelparm, char *tag1, char *tag2, char *tag3 ) { - char *dn, *ftag; - char **dns; - int max, i, err, scope, phase, tries; + char *dn, *ftag = NULL; + char **dns = NULL; + int max, i, err, scope = 0, phase, tries; LDAPFiltInfo *fi; LDAPMessage *tmpcand; LDAPMessage *candidates; @@ -240,7 +224,7 @@ ldap_ufn_search_ct( LDAP *ld, char *ufn, char **attrs, int attrsonly, { char **ufncomp, **prefixcomp; char *pbuf; - int ncomp, pcomp, i, err; + int ncomp, pcomp, i, err = 0; /* initialize the getfilter stuff if it's not already */ if ( ld->ld_filtd == NULL && ldap_ufn_setfilter( ld, FILTERFILE ) diff --git a/libraries/libldap/unbind.c b/libraries/libldap/unbind.c index e7b5c401e6..a555d46f72 100644 --- a/libraries/libldap/unbind.c +++ b/libraries/libldap/unbind.c @@ -5,27 +5,17 @@ * unbind.c */ +#include "portable.h" + #ifndef lint static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n"; #endif #include -#include -#ifdef MACOS #include -#include "macos.h" -#else /* MACOS */ -#if defined( DOS ) || defined( _WIN32 ) -#include "msdos.h" -#ifdef NCSA -#include "externs.h" -#endif /* NCSA */ -#else /* DOS */ -#include -#include -#include -#endif /* DOS */ -#endif /* MACOS */ + +#include +#include #include "lber.h" #include "ldap.h" @@ -55,17 +45,17 @@ ldap_ld_free( LDAP *ld, int close ) /* free LDAP structure and outstanding requests/responses */ for ( lr = ld->ld_requests; lr != NULL; lr = nextlr ) { nextlr = lr->lr_next; - free_request( ld, lr ); + ldap_free_request( ld, lr ); } /* free and unbind from all open connections */ while ( ld->ld_conns != NULL ) { - free_connection( ld, ld->ld_conns, 1, close ); + ldap_free_connection( ld, ld->ld_conns, 1, close ); } #else /* LDAP_REFERRALS */ if ( close ) { - err = send_unbind( ld, &ld->ld_sb ); - close_connection( &ld->ld_sb ); + err = ldap_send_unbind( ld, &ld->ld_sb ); + ldap_close_connection( &ld->ld_sb ); } #endif /* LDAP_REFERRALS */ } else { @@ -106,7 +96,7 @@ ldap_ld_free( LDAP *ld, int close ) #ifdef LDAP_REFERRALS if ( ld->ld_selectinfo != NULL ) - free_select_info( ld->ld_selectinfo ); + ldap_free_select_info( ld->ld_selectinfo ); #endif /* LDAP_REFERRALS */ if ( ld->ld_defhost != NULL ) @@ -125,14 +115,14 @@ ldap_unbind_s( LDAP *ld ) int -send_unbind( LDAP *ld, Sockbuf *sb ) +ldap_send_unbind( LDAP *ld, Sockbuf *sb ) { BerElement *ber; - Debug( LDAP_DEBUG_TRACE, "send_unbind\n", 0, 0, 0 ); + Debug( LDAP_DEBUG_TRACE, "ldap_send_unbind\n", 0, 0, 0 ); /* create a message to send */ - if ( (ber = alloc_ber_with_options( ld )) == NULLBER ) { + if ( (ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) { return( ld->ld_errno ); } diff --git a/libraries/libldap/url.c b/libraries/libldap/url.c index adf62b805f..f15e64b2cf 100644 --- a/libraries/libldap/url.c +++ b/libraries/libldap/url.c @@ -17,29 +17,18 @@ * We also tolerate URLs that look like: and */ +#include "portable.h" + #ifndef lint static char copyright[] = "@(#) Copyright (c) 1996 Regents of the University of Michigan.\nAll rights reserved.\n"; #endif #include -#include -#include #include +#include -#ifdef MACOS -#include "macos.h" -#endif /* MACOS */ - -#if defined( DOS ) || defined( _WIN32 ) -#include -#include "msdos.h" -#endif /* DOS || _WIN32 */ - -#if !defined(MACOS) && !defined(DOS) && !defined( _WIN32 ) -#include -#include -#include -#endif /* !MACOS && !DOS && !_WIN32 */ +#include +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/libldbm/libldbm.dsp b/libraries/libldbm/libldbm.dsp new file mode 100644 index 0000000000..8e91550d61 --- /dev/null +++ b/libraries/libldbm/libldbm.dsp @@ -0,0 +1,82 @@ +# Microsoft Developer Studio Project File - Name="libldbm" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=libldbm - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "libldbm.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "libldbm.mak" CFG="libldbm - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "libldbm - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "libldbm - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe + +!IF "$(CFG)" == "libldbm - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "libldbm - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /Z7 /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\Debug\libldbm.lib" + +!ENDIF + +# Begin Target + +# Name "libldbm - Win32 Release" +# Name "libldbm - Win32 Debug" +# Begin Source File + +SOURCE=.\ldbm.c +# End Source File +# End Target +# End Project diff --git a/libraries/libldbm/libldbm.dsw b/libraries/libldbm/libldbm.dsw new file mode 100644 index 0000000000..82412f233e --- /dev/null +++ b/libraries/libldbm/libldbm.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "libldbm"=.\libldbm.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libraries/libldif/libldif.dsp b/libraries/libldif/libldif.dsp new file mode 100644 index 0000000000..e9fb0c2b97 --- /dev/null +++ b/libraries/libldif/libldif.dsp @@ -0,0 +1,82 @@ +# Microsoft Developer Studio Project File - Name="libldif" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=libldif - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "libldif.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "libldif.mak" CFG="libldif - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "libldif - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "libldif - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe + +!IF "$(CFG)" == "libldif - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "libldif - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /Z7 /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\Debug\libldif.lib" + +!ENDIF + +# Begin Target + +# Name "libldif - Win32 Release" +# Name "libldif - Win32 Debug" +# Begin Source File + +SOURCE=.\line64.c +# End Source File +# End Target +# End Project diff --git a/libraries/libldif/libldif.dsw b/libraries/libldif/libldif.dsw new file mode 100644 index 0000000000..d692d5b4fd --- /dev/null +++ b/libraries/libldif/libldif.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "libldif"=.\libldif.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libraries/libldif/line64.c b/libraries/libldif/line64.c index 54832f21a7..9ca7594148 100644 --- a/libraries/libldif/line64.c +++ b/libraries/libldif/line64.c @@ -1,10 +1,13 @@ /* line64.c - routines for dealing with the slapd line format */ +#include "portable.h" + #include -#include #include -#include -#include + +#include +#include + #include "lber.h" #include "ldap.h" #include "ldif.h" diff --git a/libraries/liblthread/liblthread.dsp b/libraries/liblthread/liblthread.dsp new file mode 100644 index 0000000000..8a5f3445b0 --- /dev/null +++ b/libraries/liblthread/liblthread.dsp @@ -0,0 +1,90 @@ +# Microsoft Developer Studio Project File - Name="liblthread" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=liblthread - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "liblthread.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "liblthread.mak" CFG="liblthread - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "liblthread - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "liblthread - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe + +!IF "$(CFG)" == "liblthread - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "liblthread - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /Z7 /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\Debug\liblthread.lib" + +!ENDIF + +# Begin Target + +# Name "liblthread - Win32 Release" +# Name "liblthread - Win32 Debug" +# Begin Source File + +SOURCE=.\rdwr.c +# End Source File +# Begin Source File + +SOURCE=.\stack.c +# End Source File +# Begin Source File + +SOURCE=.\thread.c +# End Source File +# End Target +# End Project diff --git a/libraries/liblthread/liblthread.dsw b/libraries/liblthread/liblthread.dsw new file mode 100644 index 0000000000..ee14c84283 --- /dev/null +++ b/libraries/liblthread/liblthread.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "liblthread"=.\liblthread.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libraries/liblutil/base64.c b/libraries/liblutil/base64.c new file mode 100644 index 0000000000..6f4b88fe8d --- /dev/null +++ b/libraries/liblutil/base64.c @@ -0,0 +1,319 @@ +/* + * Modified by Kurt D. Zeilenga for inclusion into OpenLDAP + */ + +/* + * Copyright (c) 1996, 1998 by Internet Software Consortium. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS + * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE + * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS + * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + */ + +/* + * Portions Copyright (c) 1995 by International Business Machines, Inc. + * + * International Business Machines, Inc. (hereinafter called IBM) grants + * permission under its copyrights to use, copy, modify, and distribute this + * Software with or without fee, provided that the above copyright notice and + * all paragraphs of this notice appear in all copies, and that the name of IBM + * not be used in connection with the marketing of any product incorporating + * the Software or modifications thereof, without specific, written prior + * permission. + * + * To the extent it has a right to do so, IBM grants an immunity from suit + * under its patents, if any, for the use, sale or manufacture of products to + * the extent that such products are used for performing Domain Name System + * dynamic updates in TCP/IP networks by means of the Software. No immunity is + * granted for any product per se or for any other function of any product. + * + * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, + * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN + * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include "portable.h" + +#include +#include + +#include + +/* include socket.h to get sys/types.h and/or winsock2.h */ +#include + +#include "lutil.h" + +#define Assert(Cond) if (!(Cond)) abort() + +static const char Base64[] = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; +static const char Pad64 = '='; + +/* (From RFC1521 and draft-ietf-dnssec-secext-03.txt) + The following encoding technique is taken from RFC 1521 by Borenstein + and Freed. It is reproduced here in a slightly edited form for + convenience. + + A 65-character subset of US-ASCII is used, enabling 6 bits to be + represented per printable character. (The extra 65th character, "=", + is used to signify a special processing function.) + + The encoding process represents 24-bit groups of input bits as output + strings of 4 encoded characters. Proceeding from left to right, a + 24-bit input group is formed by concatenating 3 8-bit input groups. + These 24 bits are then treated as 4 concatenated 6-bit groups, each + of which is translated into a single digit in the base64 alphabet. + + Each 6-bit group is used as an index into an array of 64 printable + characters. The character referenced by the index is placed in the + output string. + + Table 1: The Base64 Alphabet + + Value Encoding Value Encoding Value Encoding Value Encoding + 0 A 17 R 34 i 51 z + 1 B 18 S 35 j 52 0 + 2 C 19 T 36 k 53 1 + 3 D 20 U 37 l 54 2 + 4 E 21 V 38 m 55 3 + 5 F 22 W 39 n 56 4 + 6 G 23 X 40 o 57 5 + 7 H 24 Y 41 p 58 6 + 8 I 25 Z 42 q 59 7 + 9 J 26 a 43 r 60 8 + 10 K 27 b 44 s 61 9 + 11 L 28 c 45 t 62 + + 12 M 29 d 46 u 63 / + 13 N 30 e 47 v + 14 O 31 f 48 w (pad) = + 15 P 32 g 49 x + 16 Q 33 h 50 y + + Special processing is performed if fewer than 24 bits are available + at the end of the data being encoded. A full encoding quantum is + always completed at the end of a quantity. When fewer than 24 input + bits are available in an input group, zero bits are added (on the + right) to form an integral number of 6-bit groups. Padding at the + end of the data is performed using the '=' character. + + Since all base64 input is an integral number of octets, only the + ------------------------------------------------- + following cases can arise: + + (1) the final quantum of encoding input is an integral + multiple of 24 bits; here, the final unit of encoded + output will be an integral multiple of 4 characters + with no "=" padding, + (2) the final quantum of encoding input is exactly 8 bits; + here, the final unit of encoded output will be two + characters followed by two "=" padding characters, or + (3) the final quantum of encoding input is exactly 16 bits; + here, the final unit of encoded output will be three + characters followed by one "=" padding character. + */ + +int +b64_ntop( + u_char const *src, + size_t srclength, + char *target, + size_t targsize) +{ + size_t datalength = 0; + u_char input[3]; + u_char output[4]; + size_t i; + + while (2 < srclength) { + input[0] = *src++; + input[1] = *src++; + input[2] = *src++; + srclength -= 3; + + output[0] = input[0] >> 2; + output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4); + output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6); + output[3] = input[2] & 0x3f; + Assert(output[0] < 64); + Assert(output[1] < 64); + Assert(output[2] < 64); + Assert(output[3] < 64); + + if (datalength + 4 > targsize) + return (-1); + target[datalength++] = Base64[output[0]]; + target[datalength++] = Base64[output[1]]; + target[datalength++] = Base64[output[2]]; + target[datalength++] = Base64[output[3]]; + } + + /* Now we worry about padding. */ + if (0 != srclength) { + /* Get what's left. */ + input[0] = input[1] = input[2] = '\0'; + for (i = 0; i < srclength; i++) + input[i] = *src++; + + output[0] = input[0] >> 2; + output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4); + output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6); + Assert(output[0] < 64); + Assert(output[1] < 64); + Assert(output[2] < 64); + + if (datalength + 4 > targsize) + return (-1); + target[datalength++] = Base64[output[0]]; + target[datalength++] = Base64[output[1]]; + if (srclength == 1) + target[datalength++] = Pad64; + else + target[datalength++] = Base64[output[2]]; + target[datalength++] = Pad64; + } + if (datalength >= targsize) + return (-1); + target[datalength] = '\0'; /* Returned value doesn't count \0. */ + return (datalength); +} + +/* skips all whitespace anywhere. + converts characters, four at a time, starting at (or after) + src from base - 64 numbers into three 8 bit bytes in the target area. + it returns the number of data bytes stored at the target, or -1 on error. + */ + +int +b64_pton( + char const *src, + u_char *target, + size_t targsize) +{ + int tarindex, state, ch; + char *pos; + + state = 0; + tarindex = 0; + + while ((ch = *src++) != '\0') { + if (isspace(ch)) /* Skip whitespace anywhere. */ + continue; + + if (ch == Pad64) + break; + + pos = strchr(Base64, ch); + if (pos == 0) /* A non-base64 character. */ + return (-1); + + switch (state) { + case 0: + if (target) { + if ((size_t)tarindex >= targsize) + return (-1); + target[tarindex] = (pos - Base64) << 2; + } + state = 1; + break; + case 1: + if (target) { + if ((size_t)tarindex + 1 >= targsize) + return (-1); + target[tarindex] |= (pos - Base64) >> 4; + target[tarindex+1] = ((pos - Base64) & 0x0f) + << 4 ; + } + tarindex++; + state = 2; + break; + case 2: + if (target) { + if ((size_t)tarindex + 1 >= targsize) + return (-1); + target[tarindex] |= (pos - Base64) >> 2; + target[tarindex+1] = ((pos - Base64) & 0x03) + << 6; + } + tarindex++; + state = 3; + break; + case 3: + if (target) { + if ((size_t)tarindex >= targsize) + return (-1); + target[tarindex] |= (pos - Base64); + } + tarindex++; + state = 0; + break; + default: + abort(); + } + } + + /* + * We are done decoding Base-64 chars. Let's see if we ended + * on a byte boundary, and/or with erroneous trailing characters. + */ + + if (ch == Pad64) { /* We got a pad char. */ + ch = *src++; /* Skip it, get next. */ + switch (state) { + case 0: /* Invalid = in first position */ + case 1: /* Invalid = in second position */ + return (-1); + + case 2: /* Valid, means one byte of info */ + /* Skip any number of spaces. */ + for ((void)NULL; ch != '\0'; ch = *src++) + if (!isspace(ch)) + break; + /* Make sure there is another trailing = sign. */ + if (ch != Pad64) + return (-1); + ch = *src++; /* Skip the = */ + /* Fall through to "single trailing =" case. */ + /* FALLTHROUGH */ + + case 3: /* Valid, means two bytes of info */ + /* + * We know this char is an =. Is there anything but + * whitespace after it? + */ + for ((void)NULL; ch != '\0'; ch = *src++) + if (!isspace(ch)) + return (-1); + + /* + * Now make sure for cases 2 and 3 that the "extra" + * bits that slopped past the last full byte were + * zeros. If we don't check them, they become a + * subliminal channel. + */ + if (target && target[tarindex] != 0) + return (-1); + } + } else { + /* + * We ended by seeing the end of the string. Make sure we + * have no partial bytes lying around. + */ + if (state != 0) + return (-1); + } + + return (tarindex); +} diff --git a/libraries/liblutil/liblutil.dsp b/libraries/liblutil/liblutil.dsp new file mode 100644 index 0000000000..9ee414604c --- /dev/null +++ b/libraries/liblutil/liblutil.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="liblutil" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=liblutil - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "liblutil.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "liblutil.mak" CFG="liblutil - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "liblutil - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "liblutil - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe + +!IF "$(CFG)" == "liblutil - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "liblutil - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /Z7 /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\Debug\liblutil.lib" + +!ENDIF + +# Begin Target + +# Name "liblutil - Win32 Release" +# Name "liblutil - Win32 Debug" +# Begin Source File + +SOURCE=.\base64.c +# End Source File +# Begin Source File + +SOURCE=..\..\include\lutil.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\lutil_md5.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\lutil_sha1.h +# End Source File +# Begin Source File + +SOURCE=.\md5.c +# End Source File +# Begin Source File + +SOURCE=.\sha1.c +# End Source File +# End Target +# End Project diff --git a/libraries/liblutil/liblutil.dsw b/libraries/liblutil/liblutil.dsw new file mode 100644 index 0000000000..2aaef3b026 --- /dev/null +++ b/libraries/liblutil/liblutil.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "liblutil"=.\liblutil.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libraries/liblutil/md5.c b/libraries/liblutil/md5.c index 46857666ec..122495cf3e 100644 --- a/libraries/liblutil/md5.c +++ b/libraries/liblutil/md5.c @@ -33,6 +33,9 @@ #include +/* include socket.h to get sys/types.h and/or winsock2.h */ +#include + #include /* Little-endian byte-swapping routines. Note that these do not diff --git a/libraries/liblutil/sha1.c b/libraries/liblutil/sha1.c index 5f08be0b0b..a6153f1f8a 100644 --- a/libraries/liblutil/sha1.c +++ b/libraries/liblutil/sha1.c @@ -16,12 +16,16 @@ */ -#define DISABLE_BRIDGE #include "portable.h" - -#include #include +/* include socket.h to get sys/types.h and/or winsock2.h */ +#include + +#if defined(HAVE_SYS_PARAM_H) +#include +#endif + #include "lutil_sha1.h" #define SHA1HANDSOFF /* Copies data before messing with it. */ @@ -197,13 +201,27 @@ void ldap_SHA1Final(digest, context) static char rcsid[] = "$OpenBSD: sha1hl.c,v 1.1 1997/07/12 20:06:03 millert Exp $"; #endif /* LIBC_SCCS and not lint */ -#include #include -#include +#include + +#include +#include + +#ifdef HAVE_SYS_FILE_H #include -#include +#endif +#ifdef HAVE_SYS_UIO_H #include -#include +#endif + +#ifdef HAVE_IO_H +#include +#endif + +#ifdef HAVE_FCNTL_H +#include +#endif + /* ARGSUSED */ char * From 27faaf1ce11eb0ac42ce6fb2cee66a226b0a4ddc Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 20 Oct 1998 04:17:33 +0000 Subject: [PATCH 091/148] update to NT port for UNIX testing --- acconfig.h | 54 ++++++++--------- configure | 131 +++++++++++++++++++++--------------------- configure.in | 3 + include/portable.h.in | 40 ++++++++----- 4 files changed, 122 insertions(+), 106 deletions(-) diff --git a/acconfig.h b/acconfig.h index 2e363ba7fa..545db86416 100644 --- a/acconfig.h +++ b/acconfig.h @@ -53,12 +53,12 @@ /* define if your POSIX Threads implementatin is circa Draft 4 */ #undef HAVE_PTHREADS_D4 -/* define if you have -ltermcap */ -#undef HAVE_TERMCAP - /* define if you have -lwrap */ #undef HAVE_TCPD +/* define if you have -ltermcap */ +#undef HAVE_TERMCAP + /* define this for connectionless LDAP support */ #undef LDAP_CONNECTIONLESS @@ -77,6 +77,30 @@ /* define this for LDAP User Interface support */ #undef LDAP_LIBUI +/* define this to use DB2 in native mode */ +#undef LDBM_USE_DB2 + +/* define this to use DB2 in compat185 mode */ +#undef LDBM_USE_DB2_COMPAT185 + +/* define this to use DBBTREE w/ LDBM backend */ +#undef LDBM_USE_DBBTREE + +/* define this to use DBHASH w/ LDBM backend */ +#undef LDBM_USE_DBHASH + +/* define this to use GDBM w/ LDBM backend */ +#undef LDBM_USE_GDBM + +/* define this to use NDBM w/ LDBM backend */ +#undef LDBM_USE_NDBM + +/* define this if you want no termcap support */ +#undef NO_TERMCAP + +/* define this if you want no thread support */ +#undef NO_THREADS + /* define this for ACL Group support */ #undef SLAPD_ACLGROUPS @@ -104,30 +128,6 @@ /* define this to use SLAPD shell backend */ #undef SLAPD_SHELL -/* define this to use DB2 in native mode */ -#undef LDBM_USE_DB2 - -/* define this to use DB2 in compat185 mode */ -#undef LDBM_USE_DB2_COMPAT185 - -/* define this to use DBBTREE w/ LDBM backend */ -#undef LDBM_USE_DBBTREE - -/* define this to use DBHASH w/ LDBM backend */ -#undef LDBM_USE_DBHASH - -/* define this to use GDBM w/ LDBM backend */ -#undef LDBM_USE_GDBM - -/* define this to use NDBM w/ LDBM backend */ -#undef LDBM_USE_NDBM - -/* define this if you want no termcap support */ -#undef NO_TERMCAP - -/* define this if you want no thread support */ -#undef NO_THREADS - /* define this if the thread package is preemptive */ #undef THREAD_PREEMPTIVE diff --git a/configure b/configure index afdc7fe1f5..bbf7761518 100755 --- a/configure +++ b/configure @@ -4955,13 +4955,16 @@ fi for ac_hdr in \ stddef.h \ + errno.h \ fcntl.h \ filio.h \ limits.h \ malloc.h \ sgtty.h \ sys/file.h \ + sys/errno.h \ sys/ioctl.h \ + sys/param.h \ sys/time.h \ syslog.h \ termios.h \ @@ -4970,17 +4973,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4974: checking for $ac_hdr" >&5 +echo "configure:4977: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4987: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5008,12 +5011,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5012: checking for uid_t in sys/types.h" >&5 +echo "configure:5015: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -5042,7 +5045,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:5046: checking type of array argument to getgroups" >&5 +echo "configure:5049: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5050,7 +5053,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -5089,7 +5092,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -5113,12 +5116,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:5117: checking for mode_t" >&5 +echo "configure:5120: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5146,12 +5149,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:5150: checking for off_t" >&5 +echo "configure:5153: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5179,12 +5182,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:5183: checking for pid_t" >&5 +echo "configure:5186: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5212,12 +5215,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:5216: checking return type of signal handlers" >&5 +echo "configure:5219: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5234,7 +5237,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:5238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -5253,12 +5256,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:5257: checking for size_t" >&5 +echo "configure:5260: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5286,12 +5289,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5290: checking for uid_t in sys/types.h" >&5 +echo "configure:5293: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -5320,12 +5323,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:5324: checking for st_blksize in struct stat" >&5 +echo "configure:5327: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5333,7 +5336,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:5337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -5354,12 +5357,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:5358: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:5361: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5368,7 +5371,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:5372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -5389,12 +5392,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:5393: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:5396: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5402,7 +5405,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:5406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5409: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -5424,12 +5427,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:5428: checking for working const" >&5 +echo "configure:5431: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -5501,7 +5504,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:5505: checking for 8-bit clean memcmp" >&5 +echo "configure:5508: 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 @@ -5509,7 +5512,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -5537,12 +5540,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:5541: checking for strftime" >&5 +echo "configure:5544: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -5587,7 +5590,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:5591: checking for strftime in -lintl" >&5 +echo "configure:5594: 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 @@ -5595,7 +5598,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5633,12 +5636,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:5637: checking for vprintf" >&5 +echo "configure:5640: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -5685,12 +5688,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:5689: checking for _doprnt" >&5 +echo "configure:5692: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -5738,7 +5741,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:5742: checking for wait3 that fills in rusage" >&5 +echo "configure:5745: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5746,7 +5749,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -5777,7 +5780,7 @@ main() { } } EOF -if { (eval echo configure:5781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -5827,12 +5830,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5831: checking for $ac_func" >&5 +echo "configure:5834: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5883,12 +5886,12 @@ done for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5887: checking for $ac_func" >&5 +echo "configure:5890: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5941,13 +5944,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:5945: checking declaration of sys_errlist" >&5 +echo "configure:5948: 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 < @@ -5957,7 +5960,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:5961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -5978,20 +5981,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:5982: checking existence of sys_errlist" >&5 +echo "configure:5985: 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 < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:5995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index 586fe693e3..f7d7bb54ae 100644 --- a/configure.in +++ b/configure.in @@ -683,13 +683,16 @@ AC_HEADER_DIRENT AC_HEADER_SYS_WAIT AC_CHECK_HEADERS( \ stddef.h \ + errno.h \ fcntl.h \ filio.h \ limits.h \ malloc.h \ sgtty.h \ sys/file.h \ + sys/errno.h \ sys/ioctl.h \ + sys/param.h \ sys/time.h \ syslog.h \ termios.h \ diff --git a/include/portable.h.in b/include/portable.h.in index f68de6de3c..c87347f45b 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -152,12 +152,12 @@ is provided ``as is'' without express or implied warranty. /* define if your POSIX Threads implementatin is circa Draft 4 */ #undef HAVE_PTHREADS_D4 -/* define if you have -ltermcap */ -#undef HAVE_TERMCAP - /* define if you have -lwrap */ #undef HAVE_TCPD +/* define if you have -ltermcap */ +#undef HAVE_TERMCAP + /* define this for connectionless LDAP support */ #undef LDAP_CONNECTIONLESS @@ -176,6 +176,18 @@ is provided ``as is'' without express or implied warranty. /* define this for LDAP User Interface support */ #undef LDAP_LIBUI +/* define this to use DBBTREE w/ LDBM backend */ +#undef LDBM_USE_DBBTREE + +/* define this to use DBHASH w/ LDBM backend */ +#undef LDBM_USE_DBHASH + +/* define this if you want no termcap support */ +#undef NO_TERMCAP + +/* define this if you want no thread support */ +#undef NO_THREADS + /* define this for ACL Group support */ #undef SLAPD_ACLGROUPS @@ -203,18 +215,6 @@ is provided ``as is'' without express or implied warranty. /* define this to use SLAPD shell backend */ #undef SLAPD_SHELL -/* define this to use DBBTREE w/ LDBM backend */ -#undef LDBM_USE_DBBTREE - -/* define this to use DBHASH w/ LDBM backend */ -#undef LDBM_USE_DBHASH - -/* define this if you want no termcap support */ -#undef NO_TERMCAP - -/* define this if you want no thread support */ -#undef NO_THREADS - /* define this if the thread package is preemptive */ #undef THREAD_PREEMPTIVE @@ -311,6 +311,9 @@ is provided ``as is'' without express or implied warranty. /* Define if you have the header file. */ #undef HAVE_DIRENT_H +/* Define if you have the header file. */ +#undef HAVE_ERRNO_H + /* Define if you have the header file. */ #undef HAVE_FCNTL_H @@ -368,6 +371,9 @@ is provided ``as is'' without express or implied warranty. /* Define if you have the header file. */ #undef HAVE_SYS_DIR_H +/* Define if you have the header file. */ +#undef HAVE_SYS_ERRNO_H + /* Define if you have the header file. */ #undef HAVE_SYS_FILE_H @@ -377,6 +383,9 @@ is provided ``as is'' without express or implied warranty. /* Define if you have the header file. */ #undef HAVE_SYS_NDIR_H +/* Define if you have the header file. */ +#undef HAVE_SYS_PARAM_H + /* Define if you have the header file. */ #undef HAVE_SYS_TIME_H @@ -420,6 +429,7 @@ is provided ``as is'' without express or implied warranty. # include #endif +#include "bridge.h" #include "ldap_cdefs.h" #endif /* _LDAP_PORTABLE_H */ From 701996aae84a8077a1950231f13eb1704a7f50b6 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 20 Oct 1998 04:18:39 +0000 Subject: [PATCH 092/148] Remove bridge --- include/portable.h.bot | 1 - 1 file changed, 1 deletion(-) diff --git a/include/portable.h.bot b/include/portable.h.bot index 4a45b92795..26034fd832 100644 --- a/include/portable.h.bot +++ b/include/portable.h.bot @@ -3,7 +3,6 @@ # include #endif -#include "bridge.h" #include "ldap_cdefs.h" #endif /* _LDAP_PORTABLE_H */ From 14a817f2de2966e1f90ad09c0ddd62badd3e9808 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 20 Oct 1998 04:24:09 +0000 Subject: [PATCH 093/148] fix up make depend (only) --- configure | 129 +++++++++++++++++++++--------------------- configure.in | 1 + include/ac/socket.h | 10 ++-- include/portable.h.in | 4 +- 4 files changed, 74 insertions(+), 70 deletions(-) diff --git a/configure b/configure index bbf7761518..77fd8bad46 100755 --- a/configure +++ b/configure @@ -4960,6 +4960,7 @@ for ac_hdr in \ filio.h \ limits.h \ malloc.h \ + regex.h \ sgtty.h \ sys/file.h \ sys/errno.h \ @@ -4973,17 +4974,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4977: checking for $ac_hdr" >&5 +echo "configure:4978: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4987: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5011,12 +5012,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5015: checking for uid_t in sys/types.h" >&5 +echo "configure:5016: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -5045,7 +5046,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:5049: checking type of array argument to getgroups" >&5 +echo "configure:5050: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5053,7 +5054,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -5092,7 +5093,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -5116,12 +5117,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:5120: checking for mode_t" >&5 +echo "configure:5121: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5149,12 +5150,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:5153: checking for off_t" >&5 +echo "configure:5154: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5182,12 +5183,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:5186: checking for pid_t" >&5 +echo "configure:5187: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5215,12 +5216,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:5219: checking return type of signal handlers" >&5 +echo "configure:5220: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5237,7 +5238,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:5241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -5256,12 +5257,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:5260: checking for size_t" >&5 +echo "configure:5261: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5289,12 +5290,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5293: checking for uid_t in sys/types.h" >&5 +echo "configure:5294: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -5323,12 +5324,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:5327: checking for st_blksize in struct stat" >&5 +echo "configure:5328: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5336,7 +5337,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:5340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -5357,12 +5358,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:5361: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:5362: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5371,7 +5372,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:5375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -5392,12 +5393,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:5396: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:5397: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5405,7 +5406,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:5409: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -5427,12 +5428,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:5431: checking for working const" >&5 +echo "configure:5432: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -5504,7 +5505,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:5508: checking for 8-bit clean memcmp" >&5 +echo "configure:5509: 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 @@ -5512,7 +5513,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -5540,12 +5541,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:5544: checking for strftime" >&5 +echo "configure:5545: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -5590,7 +5591,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:5594: checking for strftime in -lintl" >&5 +echo "configure:5595: 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 @@ -5598,7 +5599,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5636,12 +5637,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:5640: checking for vprintf" >&5 +echo "configure:5641: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -5688,12 +5689,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:5692: checking for _doprnt" >&5 +echo "configure:5693: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -5741,7 +5742,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:5745: checking for wait3 that fills in rusage" >&5 +echo "configure:5746: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5749,7 +5750,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -5780,7 +5781,7 @@ main() { } } EOF -if { (eval echo configure:5784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -5830,12 +5831,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5834: checking for $ac_func" >&5 +echo "configure:5835: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5886,12 +5887,12 @@ done for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5890: checking for $ac_func" >&5 +echo "configure:5891: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5944,13 +5945,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:5948: checking declaration of sys_errlist" >&5 +echo "configure:5949: 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 < @@ -5960,7 +5961,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:5964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -5981,20 +5982,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:5985: checking existence of sys_errlist" >&5 +echo "configure:5986: 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 < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:5998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index f7d7bb54ae..b13be3e154 100644 --- a/configure.in +++ b/configure.in @@ -688,6 +688,7 @@ AC_CHECK_HEADERS( \ filio.h \ limits.h \ malloc.h \ + regex.h \ sgtty.h \ sys/file.h \ sys/errno.h \ diff --git a/include/ac/socket.h b/include/ac/socket.h index dde8c62cdf..1cb39b6537 100644 --- a/include/ac/socket.h +++ b/include/ac/socket.h @@ -52,21 +52,21 @@ #endif /* MACOS */ #if !defined(__alpha) || defined(VMS) -#define HTONL( l ) htonl( l ) -#define NTOHL( l ) ntohl( l ) +#define AC_HTONL( l ) htonl( l ) +#define AC_NTOHL( l ) ntohl( l ) #else /* __alpha && !VMS */ /* * htonl and ntohl on the DEC Alpha under OSF 1 seem to only swap the * lower-order 32-bits of a (64-bit) long, so we define correct versions * here. */ -#define HTONL( l ) (((long)htonl( (l) & 0x00000000FFFFFFFF )) << 32 \ +#define AC_HTONL( l ) (((long)htonl( (l) & 0x00000000FFFFFFFF )) << 32 \ | htonl( ( (l) & 0xFFFFFFFF00000000 ) >> 32 )) -#define NTOHL( l ) (((long)ntohl( (l) & 0x00000000FFFFFFFF )) << 32 \ +#define AC_NTOHL( l ) (((long)ntohl( (l) & 0x00000000FFFFFFFF )) << 32 \ | ntohl( ( (l) & 0xFFFFFFFF00000000 ) >> 32 )) #endif /* __alpha && !VMS */ -#endif /* _AC_SOCKET_H_ */ \ No newline at end of file +#endif /* _AC_SOCKET_H_ */ diff --git a/include/portable.h.in b/include/portable.h.in index c87347f45b..09ae8735d5 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -356,6 +356,9 @@ is provided ``as is'' without express or implied warranty. /* Define if you have the header file. */ #undef HAVE_PTHREAD_H +/* Define if you have the header file. */ +#undef HAVE_REGEX_H + /* Define if you have the header file. */ #undef HAVE_SCHED_H @@ -429,7 +432,6 @@ is provided ``as is'' without express or implied warranty. # include #endif -#include "bridge.h" #include "ldap_cdefs.h" #endif /* _LDAP_PORTABLE_H */ From 7018dd1eb5e8dbdc57dfb881ea618807be630938 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 20 Oct 1998 04:41:28 +0000 Subject: [PATCH 094/148] HTONL -> AC_HTONL --- libraries/liblber/decode.c | 4 ++-- libraries/liblber/encode.c | 12 ++++++------ libraries/liblber/io.c | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/libraries/liblber/decode.c b/libraries/liblber/decode.c index 26bf40c54b..03a5c74d85 100644 --- a/libraries/liblber/decode.c +++ b/libraries/liblber/decode.c @@ -112,7 +112,7 @@ ber_skip_tag( BerElement *ber, unsigned long *len ) if ( ber_read( ber, (char *) &netlen + diff, noctets ) != noctets ) return( LBER_DEFAULT ); - *len = NTOHL( netlen ); + *len = AC_NTOHL( netlen ); } else { *len = lc; } @@ -164,7 +164,7 @@ ber_getnint( BerElement *ber, long *num, int len ) *(p+i) = (char) 0xff; } } - *num = NTOHL( netnum ); + *num = AC_NTOHL( netnum ); return( len ); } diff --git a/libraries/liblber/encode.c b/libraries/liblber/encode.c index 4933b2ff62..561e0f162d 100644 --- a/libraries/liblber/encode.c +++ b/libraries/liblber/encode.c @@ -65,7 +65,7 @@ ber_put_tag( BerElement *ber, unsigned long tag, int nosos ) taglen = ber_calc_taglen( tag ); - ntag = HTONL( tag ); + ntag = AC_HTONL( tag ); return( ber_write( ber, ((char *) &ntag) + sizeof(long) - taglen, taglen, nosos ) ); @@ -111,7 +111,7 @@ ber_put_len( BerElement *ber, unsigned long len, int nosos ) */ if ( len <= 127 ) { - netlen = HTONL( len ); + netlen = AC_HTONL( len ); return( ber_write( ber, (char *) &netlen + sizeof(long) - 1, 1, nosos ) ); } @@ -138,7 +138,7 @@ ber_put_len( BerElement *ber, unsigned long len, int nosos ) return( -1 ); /* write the length itself */ - netlen = HTONL( len ); + netlen = AC_HTONL( len ); if ( ber_write( ber, (char *) &netlen + (sizeof(long) - i), i, nosos ) != i ) return( -1 ); @@ -189,7 +189,7 @@ ber_put_int_or_enum( BerElement *ber, long num, unsigned long tag ) if ( (lenlen = ber_put_len( ber, len, 0 )) == -1 ) return( -1 ); i++; - netnum = HTONL( num ); + netnum = AC_HTONL( num ); if ( ber_write( ber, (char *) &netnum + (sizeof(long) - i), i, 0 ) != i ) return( -1 ); @@ -397,7 +397,7 @@ ber_put_seqorset( BerElement *ber ) */ len = (*sos)->sos_clen; - netlen = HTONL( len ); + netlen = AC_HTONL( len ); if ( sizeof(long) > 4 && len > 0xFFFFFFFFL ) return( -1 ); @@ -446,7 +446,7 @@ ber_put_seqorset( BerElement *ber ) /* the tag */ taglen = ber_calc_taglen( (*sos)->sos_tag ); - ntag = HTONL( (*sos)->sos_tag ); + ntag = AC_HTONL( (*sos)->sos_tag ); SAFEMEMCPY( (*sos)->sos_first, (char *) &ntag + sizeof(long) - taglen, taglen ); diff --git a/libraries/liblber/io.c b/libraries/liblber/io.c index 282d25fb45..6c4d8dbc1e 100644 --- a/libraries/liblber/io.c +++ b/libraries/liblber/io.c @@ -524,7 +524,7 @@ ber_get_next( Sockbuf *sb, unsigned long *len, BerElement *ber ) noctets ) { return( LBER_DEFAULT ); } - *len = NTOHL( netlen ); + *len = AC_NTOHL( netlen ); } else { *len = lc; } From 30eb9ed76f5b1cdc834ff531f449e1d9ee3badf3 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 20 Oct 1998 17:47:51 +0000 Subject: [PATCH 095/148] Modified NT changes to work under UNIX. --- configure | 130 ++++++++++++++++---------------- configure.in | 2 + include/ac/regex.h | 6 +- include/ac/socket.h | 10 +-- include/ldap.h | 2 +- include/portable.h.in | 6 ++ libraries/liblber/etest.c | 5 +- libraries/liblber/io.c | 21 +++--- libraries/libldap/abandon.c | 1 + libraries/libldap/add.c | 1 + libraries/libldap/addentry.c | 1 + libraries/libldap/bind.c | 1 + libraries/libldap/charset.c | 1 + libraries/libldap/cldap.c | 2 +- libraries/libldap/compare.c | 1 + libraries/libldap/delete.c | 1 + libraries/libldap/error.c | 1 + libraries/libldap/friendly.c | 1 + libraries/libldap/getattr.c | 1 + libraries/libldap/getdn.c | 1 + libraries/libldap/getdxbyname.c | 1 + libraries/libldap/getentry.c | 1 + libraries/libldap/getfilter.c | 2 +- libraries/libldap/getvalues.c | 1 + libraries/libldap/kbind.c | 1 + libraries/libldap/modify.c | 1 + libraries/libldap/modrdn.c | 1 + libraries/libldap/open.c | 1 + libraries/libldap/os-ip.c | 1 + libraries/libldap/sbind.c | 1 + libraries/libldap/search.c | 1 + libraries/libldap/tmpltest.c | 28 ++++--- libraries/libldap/ufn.c | 1 + libraries/libldap/unbind.c | 1 + libraries/libldap/url.c | 1 + libraries/libldif/line64.c | 1 + libraries/liblthread/stack.c | 6 ++ 37 files changed, 144 insertions(+), 101 deletions(-) diff --git a/configure b/configure index 77fd8bad46..7f02f21e88 100755 --- a/configure +++ b/configure @@ -4966,7 +4966,9 @@ for ac_hdr in \ sys/errno.h \ sys/ioctl.h \ sys/param.h \ + sys/socket.h\ sys/time.h \ + sys/types.h \ syslog.h \ termios.h \ unistd.h \ @@ -4974,17 +4976,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4978: checking for $ac_hdr" >&5 +echo "configure:4980: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5012,12 +5014,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5016: checking for uid_t in sys/types.h" >&5 +echo "configure:5018: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -5046,7 +5048,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:5050: checking type of array argument to getgroups" >&5 +echo "configure:5052: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5054,7 +5056,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -5093,7 +5095,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -5117,12 +5119,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:5121: checking for mode_t" >&5 +echo "configure:5123: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5150,12 +5152,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:5154: checking for off_t" >&5 +echo "configure:5156: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5183,12 +5185,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:5187: checking for pid_t" >&5 +echo "configure:5189: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5216,12 +5218,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:5220: checking return type of signal handlers" >&5 +echo "configure:5222: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5238,7 +5240,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:5242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -5257,12 +5259,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:5261: checking for size_t" >&5 +echo "configure:5263: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5290,12 +5292,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5294: checking for uid_t in sys/types.h" >&5 +echo "configure:5296: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -5324,12 +5326,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:5328: checking for st_blksize in struct stat" >&5 +echo "configure:5330: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5337,7 +5339,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:5341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -5358,12 +5360,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:5362: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:5364: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5372,7 +5374,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:5376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -5393,12 +5395,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:5397: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:5399: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5406,7 +5408,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:5410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -5428,12 +5430,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:5432: checking for working const" >&5 +echo "configure:5434: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -5505,7 +5507,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:5509: checking for 8-bit clean memcmp" >&5 +echo "configure:5511: 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 @@ -5513,7 +5515,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -5541,12 +5543,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:5545: checking for strftime" >&5 +echo "configure:5547: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -5591,7 +5593,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:5595: checking for strftime in -lintl" >&5 +echo "configure:5597: 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 @@ -5599,7 +5601,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5637,12 +5639,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:5641: checking for vprintf" >&5 +echo "configure:5643: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -5689,12 +5691,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:5693: checking for _doprnt" >&5 +echo "configure:5695: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -5742,7 +5744,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:5746: checking for wait3 that fills in rusage" >&5 +echo "configure:5748: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5750,7 +5752,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -5781,7 +5783,7 @@ main() { } } EOF -if { (eval echo configure:5785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -5831,12 +5833,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5835: checking for $ac_func" >&5 +echo "configure:5837: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5887,12 +5889,12 @@ done for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5891: checking for $ac_func" >&5 +echo "configure:5893: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5945,13 +5947,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:5949: checking declaration of sys_errlist" >&5 +echo "configure:5951: 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 < @@ -5961,7 +5963,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:5965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -5982,20 +5984,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:5986: checking existence of sys_errlist" >&5 +echo "configure:5988: 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 < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:5999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index b13be3e154..890aa41c05 100644 --- a/configure.in +++ b/configure.in @@ -694,7 +694,9 @@ AC_CHECK_HEADERS( \ sys/errno.h \ sys/ioctl.h \ sys/param.h \ + sys/socket.h\ sys/time.h \ + sys/types.h \ syslog.h \ termios.h \ unistd.h \ diff --git a/include/ac/regex.h b/include/ac/regex.h index a98ee78998..c646a08d93 100644 --- a/include/ac/regex.h +++ b/include/ac/regex.h @@ -4,6 +4,10 @@ #ifndef _AC_REGEX_H_ #define _AC_REGEX_H_ +#ifdef HAVE_SYS_TYPES_H +#include +#endif + #ifdef HAVE_REGEX_H /* have regex.h, assume it's POSIX compliant */ # include @@ -12,4 +16,4 @@ # include #endif /* ! regex.h */ -#endif /* _AC_REGEX_H_ */ \ No newline at end of file +#endif /* _AC_REGEX_H_ */ diff --git a/include/ac/socket.h b/include/ac/socket.h index 1cb39b6537..70e044aa47 100644 --- a/include/ac/socket.h +++ b/include/ac/socket.h @@ -5,8 +5,11 @@ #ifndef _AC_SOCKET_H_ #define _AC_SOCKET_H_ -#ifdef HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_TYPES_H #include +#endif + +#ifdef HAVE_SYS_SOCKET_H #include #include @@ -17,11 +20,8 @@ #endif #ifdef HAVE_WINSOCK2 -#include #include -#endif - -#ifdef HAVE_WINSOCK +#elif HAVE_WINSOCK #include #endif diff --git a/include/ldap.h b/include/ldap.h index 9b67d5d623..65b2d87b79 100644 --- a/include/ldap.h +++ b/include/ldap.h @@ -634,7 +634,7 @@ LDAP_F void ldap_value_free_len LDAP_P(( struct berval **vals )); * in result.c: */ LDAP_F int ldap_result LDAP_P(( LDAP *ld, int msgid, int all, - LDAP_timeval_p timeout, LDAPMessage **result )); + struct timeval *timeout, LDAPMessage **result )); LDAP_F int ldap_msgfree LDAP_P(( LDAPMessage *lm )); LDAP_F int ldap_msgdelete LDAP_P(( LDAP *ld, int msgid )); diff --git a/include/portable.h.in b/include/portable.h.in index 09ae8735d5..6c782517ea 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -389,9 +389,15 @@ is provided ``as is'' without express or implied warranty. /* Define if you have the header file. */ #undef HAVE_SYS_PARAM_H +/* Define if you have the header file. */ +#undef HAVE_SYS_SOCKET_H + /* Define if you have the header file. */ #undef HAVE_SYS_TIME_H +/* Define if you have the header file. */ +#undef HAVE_SYS_TYPES_H + /* Define if you have the header file. */ #undef HAVE_SYSLOG_H diff --git a/libraries/liblber/etest.c b/libraries/liblber/etest.c index 71c7ee31cf..eca656730e 100644 --- a/libraries/liblber/etest.c +++ b/libraries/liblber/etest.c @@ -4,7 +4,6 @@ * All rights reserved. */ -#define DISABLE_BRIDGE #include "portable.h" #include @@ -156,9 +155,9 @@ main( int argc, char **argv ) break; default: -#ifndef NO_USERINTERFACE +#ifdef LDAP_LIBUI fprintf( stderr, "unknown fmt %c\n", *fmt ); -#endif /* NO_USERINTERFACE */ +#endif /* LDAP_LIBUI */ rc = -1; break; } diff --git a/libraries/liblber/io.c b/libraries/liblber/io.c index 6c4d8dbc1e..cbf1837a91 100644 --- a/libraries/liblber/io.c +++ b/libraries/liblber/io.c @@ -111,9 +111,9 @@ int ber_filbuf( Sockbuf *sb, long len ) { short rc; -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS int addrlen; -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ if ( sb->sb_ber.ber_buf == NULL ) { if ( (sb->sb_ber.ber_buf = (char *) malloc( READBUFSIZ )) == @@ -124,7 +124,7 @@ ber_filbuf( Sockbuf *sb, long len ) } if ( sb->sb_naddr > 0 ) { -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS rc = udp_read(sb, sb->sb_ber.ber_buf, READBUFSIZ, addrlen ); #ifdef LDAP_DEBUG if ( lber_debug ) { @@ -134,9 +134,9 @@ ber_filbuf( Sockbuf *sb, long len ) lber_bprint( sb->sb_ber.ber_buf, rc ); } #endif /* LDAP_DEBUG */ -#else /* CLDAP */ +#else /* LDAP_CONNECTIONLESS */ rc = -1; -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ } else { rc = read( sb->sb_sd, sb->sb_ber.ber_buf, ((sb->sb_options & LBER_NO_READ_AHEAD) && @@ -296,18 +296,19 @@ ber_flush( Sockbuf *sb, BerElement *ber, int freeit ) nwritten = 0; do { if (sb->sb_naddr > 0) { -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS rc = udp_write( sb, ber->ber_buf + nwritten, (size_t)towrite ); -#else /* CLDAP */ +#else /* LDAP_CONNECTIONLESS */ rc = -1; -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ if ( rc <= 0 ) return( -1 ); + /* fake error if write was not atomic */ if (rc < towrite) { -#if defined( WSAEMSGSIZE ) - errno = WSAEMSGSIZE; +#if !defined(MACOS) && !defined(DOS) + errno = EMSGSIZE; #endif return( -1 ); } diff --git a/libraries/libldap/abandon.c b/libraries/libldap/abandon.c index a5e93798c1..e9d718c99d 100644 --- a/libraries/libldap/abandon.c +++ b/libraries/libldap/abandon.c @@ -16,6 +16,7 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #include #include +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/add.c b/libraries/libldap/add.c index 901658bef3..73e84964c1 100644 --- a/libraries/libldap/add.c +++ b/libraries/libldap/add.c @@ -15,6 +15,7 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #include #include +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/addentry.c b/libraries/libldap/addentry.c index ff8e5635ca..3b5c752a88 100644 --- a/libraries/libldap/addentry.c +++ b/libraries/libldap/addentry.c @@ -17,6 +17,7 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #include #include +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/bind.c b/libraries/libldap/bind.c index 050d72a596..be796f1920 100644 --- a/libraries/libldap/bind.c +++ b/libraries/libldap/bind.c @@ -16,6 +16,7 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #include #include +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/charset.c b/libraries/libldap/charset.c index 6c821c81c5..8371c62e3b 100644 --- a/libraries/libldap/charset.c +++ b/libraries/libldap/charset.c @@ -18,6 +18,7 @@ static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of #include #include +#include #ifdef HAVE_SYS_PARAM_H #include diff --git a/libraries/libldap/cldap.c b/libraries/libldap/cldap.c index c037927de8..dc4794cb3d 100644 --- a/libraries/libldap/cldap.c +++ b/libraries/libldap/cldap.c @@ -16,10 +16,10 @@ static char copyright[] = "@(#) Copyright (c) 1990, 1994 Regents of the Universi #include #include - #include #include #include +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/compare.c b/libraries/libldap/compare.c index 2e2e243b96..e9f78cbfae 100644 --- a/libraries/libldap/compare.c +++ b/libraries/libldap/compare.c @@ -15,6 +15,7 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #include #include +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/delete.c b/libraries/libldap/delete.c index a6ebfecd50..eb8f589198 100644 --- a/libraries/libldap/delete.c +++ b/libraries/libldap/delete.c @@ -15,6 +15,7 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #include #include +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/error.c b/libraries/libldap/error.c index 9827bfc5f2..80dcd809fa 100644 --- a/libraries/libldap/error.c +++ b/libraries/libldap/error.c @@ -5,6 +5,7 @@ #include #include +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/friendly.c b/libraries/libldap/friendly.c index 1bf6c44033..fc90fc9cdc 100644 --- a/libraries/libldap/friendly.c +++ b/libraries/libldap/friendly.c @@ -18,6 +18,7 @@ static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of #include #include #include +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/getattr.c b/libraries/libldap/getattr.c index 24f6d08509..6e95b7d5f3 100644 --- a/libraries/libldap/getattr.c +++ b/libraries/libldap/getattr.c @@ -17,6 +17,7 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #include #include +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/getdn.c b/libraries/libldap/getdn.c index 5467b82c3e..54b8e8a92c 100644 --- a/libraries/libldap/getdn.c +++ b/libraries/libldap/getdn.c @@ -17,6 +17,7 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #include #include +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/getdxbyname.c b/libraries/libldap/getdxbyname.c index 97548e218c..153b111963 100644 --- a/libraries/libldap/getdxbyname.c +++ b/libraries/libldap/getdxbyname.c @@ -14,6 +14,7 @@ #include #include +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/getentry.c b/libraries/libldap/getentry.c index f4f523ea3d..df25d7a3ab 100644 --- a/libraries/libldap/getentry.c +++ b/libraries/libldap/getentry.c @@ -17,6 +17,7 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #include #include +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/getfilter.c b/libraries/libldap/getfilter.c index 5f9bffbe47..68bd3fd26a 100644 --- a/libraries/libldap/getfilter.c +++ b/libraries/libldap/getfilter.c @@ -18,9 +18,9 @@ static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of #include #include #include +#include #include -#include #ifdef HAVE_SYS_FILE_H #include #endif diff --git a/libraries/libldap/getvalues.c b/libraries/libldap/getvalues.c index 41efe9adf4..3abd28560a 100644 --- a/libraries/libldap/getvalues.c +++ b/libraries/libldap/getvalues.c @@ -17,6 +17,7 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #include #include +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/kbind.c b/libraries/libldap/kbind.c index e900cc881f..a9cd60b99a 100644 --- a/libraries/libldap/kbind.c +++ b/libraries/libldap/kbind.c @@ -19,6 +19,7 @@ static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of #include #include #include +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/modify.c b/libraries/libldap/modify.c index 1766f8a26b..42ffde0f2f 100644 --- a/libraries/libldap/modify.c +++ b/libraries/libldap/modify.c @@ -15,6 +15,7 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #include #include +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/modrdn.c b/libraries/libldap/modrdn.c index 491fc97add..434ecb5d0b 100644 --- a/libraries/libldap/modrdn.c +++ b/libraries/libldap/modrdn.c @@ -15,6 +15,7 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #include #include +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/open.c b/libraries/libldap/open.c index 30b48bafb5..a851939586 100644 --- a/libraries/libldap/open.c +++ b/libraries/libldap/open.c @@ -16,6 +16,7 @@ static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of #include #include +#include #ifdef HAVE_SYS_PARAM_H #include diff --git a/libraries/libldap/os-ip.c b/libraries/libldap/os-ip.c index b1c8d64c9b..9c16fa9215 100644 --- a/libraries/libldap/os-ip.c +++ b/libraries/libldap/os-ip.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #ifdef HAVE_IO_H diff --git a/libraries/libldap/sbind.c b/libraries/libldap/sbind.c index e8a5b2731f..a64d0ff778 100644 --- a/libraries/libldap/sbind.c +++ b/libraries/libldap/sbind.c @@ -15,6 +15,7 @@ static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of #include #include +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/search.c b/libraries/libldap/search.c index 3b53fc93ee..da6e7d3763 100644 --- a/libraries/libldap/search.c +++ b/libraries/libldap/search.c @@ -17,6 +17,7 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #include #include +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/tmpltest.c b/libraries/libldap/tmpltest.c index d108375790..aa860b9a37 100644 --- a/libraries/libldap/tmpltest.c +++ b/libraries/libldap/tmpltest.c @@ -1,27 +1,25 @@ +#include "portable.h" + #include -#include +#include + +#include +#include + +#ifdef MACOS +#include +#endif /* MACOS */ + #include "lber.h" #include "ldap.h" #include "disptmpl.h" #include "srchpref.h" -#ifdef MACOS -#include -#include -#endif /* MACOS */ - -#ifdef NEEDPROTOS -void dump_tmpl( struct ldap_disptmpl *tmpl ); -void dump_srchpref( struct ldap_searchobj *sp ); -#else /* NEEDPROTOS */ -void dump_tmpl(); -void dump_srchpref(); -#endif /* NEEDPROTOS */ - +void dump_tmpl LDAP_P(( struct ldap_disptmpl *tmpl )); +void dump_srchpref LDAP_P(( struct ldap_searchobj *sp )); #define NULLSTRINGIFNULL( s ) ( s == NULL ? "(null)" : s ) - int main( int argc, char **argv ) { diff --git a/libraries/libldap/ufn.c b/libraries/libldap/ufn.c index f87af4d87a..f623c28525 100644 --- a/libraries/libldap/ufn.c +++ b/libraries/libldap/ufn.c @@ -17,6 +17,7 @@ static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of #include #include +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/unbind.c b/libraries/libldap/unbind.c index a555d46f72..239ee81d75 100644 --- a/libraries/libldap/unbind.c +++ b/libraries/libldap/unbind.c @@ -16,6 +16,7 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #include #include +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/url.c b/libraries/libldap/url.c index f15e64b2cf..badf882110 100644 --- a/libraries/libldap/url.c +++ b/libraries/libldap/url.c @@ -29,6 +29,7 @@ static char copyright[] = "@(#) Copyright (c) 1996 Regents of the University of #include #include +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/libldif/line64.c b/libraries/libldif/line64.c index 9ca7594148..2a3a1708f1 100644 --- a/libraries/libldif/line64.c +++ b/libraries/libldif/line64.c @@ -7,6 +7,7 @@ #include #include +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/liblthread/stack.c b/libraries/liblthread/stack.c index e57b44b25f..ad16bfd945 100644 --- a/libraries/liblthread/stack.c +++ b/libraries/liblthread/stack.c @@ -1,6 +1,12 @@ /* stack.c - stack handling routines */ +#include "portable.h" + #include + +#include +#include + #include "lber.h" #include "ldap.h" From ba001f59933732c5636bbd5a576cc633323e232d Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 20 Oct 1998 17:59:36 +0000 Subject: [PATCH 096/148] Update NT version of Portable.h.nt --- include/portable.h.nt | 48 +++++++++++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/include/portable.h.nt b/include/portable.h.nt index 1c76193dd7..40b474f4ea 100644 --- a/include/portable.h.nt +++ b/include/portable.h.nt @@ -167,12 +167,12 @@ typedef char * caddr_t; /* define if your POSIX Threads implementatin is circa Draft 4 */ #undef HAVE_PTHREADS_D4 -/* define if you have -ltermcap */ -#undef HAVE_TERMCAP - /* define if you have -lwrap */ #undef HAVE_TCPD +/* define if you have -ltermcap */ +#undef HAVE_TERMCAP + /* define this for connectionless LDAP support */ #define LDAP_CONNECTIONLESS @@ -191,6 +191,18 @@ typedef char * caddr_t; /* define this for LDAP User Interface support */ #undef LDAP_LIBUI +/* define this to use DBBTREE w/ LDBM backend */ +#undef LDBM_USE_DBBTREE + +/* define this to use DBHASH w/ LDBM backend */ +#undef LDBM_USE_DBHASH + +/* define this if you want no termcap support */ +#define NO_TERMCAP 1 + +/* define this if you want no thread support */ +#define NO_THREADS 1 + /* define this for ACL Group support */ #define SLAPD_ACLGROUPS @@ -218,18 +230,6 @@ typedef char * caddr_t; /* define this to use SLAPD shell backend */ #undef SLAPD_SHELL -/* define this to use DBBTREE w/ LDBM backend */ -#undef LDBM_USE_DBBTREE - -/* define this to use DBHASH w/ LDBM backend */ -#undef LDBM_USE_DBHASH - -/* define this if you want no termcap support */ -#define NO_TERMCAP 1 - -/* define this if you want no thread support */ -#define NO_THREADS 1 - /* define this if the thread package is preemptive */ #undef THREAD_PREEMPTIVE @@ -326,6 +326,9 @@ typedef char * caddr_t; /* Define if you have the header file. */ #undef HAVE_DIRENT_H +/* Define if you have the header file. */ +#define HAVE_ERRNO_H 1 + /* Define if you have the header file. */ #define HAVE_FCNTL_H 1 @@ -368,6 +371,9 @@ typedef char * caddr_t; /* Define if you have the header file. */ #undef HAVE_PTHREAD_H +/* Define if you have the header file. */ +#undef HAVE_REGEX_H + /* Define if you have the header file. */ #undef HAVE_SCHED_H @@ -383,6 +389,9 @@ typedef char * caddr_t; /* Define if you have the header file. */ #undef HAVE_SYS_DIR_H +/* Define if you have the header file. */ +#undef HAVE_SYS_ERRNO_H + /* Define if you have the header file. */ #undef HAVE_SYS_FILE_H @@ -392,9 +401,18 @@ typedef char * caddr_t; /* Define if you have the header file. */ #undef HAVE_SYS_NDIR_H +/* Define if you have the header file. */ +#undef HAVE_SYS_PARAM_H + +/* Define if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + /* Define if you have the header file. */ #undef HAVE_SYS_TIME_H +/* Define if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + /* Define if you have the header file. */ #undef HAVE_SYSLOG_H From da4256f9c393deed9b497f8651a872bab5b3f9b0 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 20 Oct 1998 18:06:06 +0000 Subject: [PATCH 097/148] Left some defines as undefs. --- include/portable.h.nt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/portable.h.nt b/include/portable.h.nt index 40b474f4ea..20d1c73e27 100644 --- a/include/portable.h.nt +++ b/include/portable.h.nt @@ -86,13 +86,13 @@ typedef char * caddr_t; #undef _MINIX /* Define to `int' if doesn't define. */ -#undef mode_t int +#define mode_t int /* Define to `long' if doesn't define. */ #undef off_t /* Define to `int' if doesn't define. */ -#undef pid_t int +#define pid_t int /* Define if the system does not provide POSIX.1 features except with this defined. */ @@ -102,7 +102,7 @@ typedef char * caddr_t; #undef _POSIX_SOURCE /* Define as the return type of signal handlers (int or void). */ -#undef RETSIGTYPE void +#define RETSIGTYPE void /* Define to `unsigned' if doesn't define. */ #undef size_t @@ -117,7 +117,7 @@ typedef char * caddr_t; #undef TM_IN_SYS_TIME /* Define to `int' if doesn't define. */ -#undef uid_t long +#define uid_t long /* define this if sys_errlist is not defined in stdio.h or errno.h */ #undef DECL_SYS_ERRLIST @@ -213,7 +213,7 @@ typedef char * caddr_t; #undef SLAPD_LDBM /* define this for MD5 password support */ -#define SLAPD_MD5 +#define SLAPD_MD5 1 /* define this to use SLAPD passwd backend */ #undef SLAPD_PASSWD @@ -222,10 +222,10 @@ typedef char * caddr_t; #undef SLAPD_PHONETIC /* define this for Reverse Lookup support */ -#define SLAPD_RLOOKUPS +#define SLAPD_RLOOKUPS 1 /* define this for SHA1 password support */ -#define SLAPD_SHA1 +#define SLAPD_SHA1 1 /* define this to use SLAPD shell backend */ #undef SLAPD_SHELL From 1cae09c09a4ae6d908d99c51ec17dc34854bb62a Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 20 Oct 1998 18:10:53 +0000 Subject: [PATCH 098/148] NT does have STD C headers.... --- include/portable.h.nt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/portable.h.nt b/include/portable.h.nt index 20d1c73e27..641fdb6854 100644 --- a/include/portable.h.nt +++ b/include/portable.h.nt @@ -108,7 +108,7 @@ typedef char * caddr_t; #undef size_t /* Define if you have the ANSI C header files. */ -#undef STDC_HEADERS +#define STDC_HEADERS 1 /* Define if you can safely include both and . */ #undef TIME_WITH_SYS_TIME @@ -285,7 +285,7 @@ typedef char * caddr_t; #undef HAVE_SIGSET /* Define if you have the socket function. */ -#define HAVE_SOCKET 1 +#undef HAVE_SOCKET /* Define if you have the strdup function. */ #define HAVE_STRDUP 1 From a582cfbf31f81fd69178be69502b13c4ad2e6db2 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 20 Oct 1998 18:38:10 +0000 Subject: [PATCH 099/148] Fix up socket.h --- include/ac/socket.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/ac/socket.h b/include/ac/socket.h index 70e044aa47..573601ea60 100644 --- a/include/ac/socket.h +++ b/include/ac/socket.h @@ -21,6 +21,8 @@ #ifdef HAVE_WINSOCK2 #include +#define EMSGSIZE WSAEMSGSIZE +#define EHOSTUNREACH WSAEHOSTUNREACH #elif HAVE_WINSOCK #include #endif From eb94d0d6086f23d30638be86e5e75196d6c85dab Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 20 Oct 1998 18:38:59 +0000 Subject: [PATCH 100/148] Fix fake error generation. --- libraries/liblber/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/liblber/io.c b/libraries/liblber/io.c index cbf1837a91..bbe6c82dd1 100644 --- a/libraries/liblber/io.c +++ b/libraries/liblber/io.c @@ -307,7 +307,7 @@ ber_flush( Sockbuf *sb, BerElement *ber, int freeit ) /* fake error if write was not atomic */ if (rc < towrite) { -#if !defined(MACOS) && !defined(DOS) +#ifdef EMSGSIZE errno = EMSGSIZE; #endif return( -1 ); From 8a0a7fe367f16fbad6740472fb6fa311f0482c5d Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 20 Oct 1998 18:59:12 +0000 Subject: [PATCH 101/148] VC++ round 2 --- clients/tools/ldapdelete.c | 18 ++++--- clients/tools/ldapdelete.dsp | 91 ++++++++++++++++++++++++++++++++++ clients/tools/ldapdelete.dsw | 29 +++++++++++ clients/tools/ldapmodify.c | 21 +++++--- clients/tools/ldapmodify.dsp | 94 ++++++++++++++++++++++++++++++++++++ clients/tools/ldapmodify.dsw | 29 +++++++++++ clients/tools/ldapmodrdn.c | 21 +++++--- clients/tools/ldapmodrdn.dsp | 85 ++++++++++++++++++++++++++++++++ clients/tools/ldapmodrdn.dsw | 29 +++++++++++ clients/tools/ldapsearch.c | 54 ++++++++++++++------- clients/tools/ldapsearch.dsp | 91 ++++++++++++++++++++++++++++++++++ clients/tools/ldapsearch.dsw | 29 +++++++++++ 12 files changed, 551 insertions(+), 40 deletions(-) create mode 100644 clients/tools/ldapdelete.dsp create mode 100644 clients/tools/ldapdelete.dsw create mode 100644 clients/tools/ldapmodify.dsp create mode 100644 clients/tools/ldapmodify.dsw create mode 100644 clients/tools/ldapmodrdn.dsp create mode 100644 clients/tools/ldapmodrdn.dsw create mode 100644 clients/tools/ldapsearch.dsp create mode 100644 clients/tools/ldapsearch.dsw diff --git a/clients/tools/ldapdelete.c b/clients/tools/ldapdelete.c index 8ce9adf7f1..49c1763e12 100644 --- a/clients/tools/ldapdelete.c +++ b/clients/tools/ldapdelete.c @@ -1,12 +1,13 @@ /* ldapdelete.c - simple program to delete an entry using LDAP */ -#define DISABLE_BRIDGE #include "portable.h" #include -#include #include #include + +#include +#include #include #include @@ -29,15 +30,18 @@ extern int ldap_debug, lber_debug; #define safe_realloc( ptr, size ) ( ptr == NULL ? malloc( size ) : \ realloc( ptr, size )) +static int dodelete LDAP_P(( + LDAP *ld, + char *dn)); main( argc, argv ) int argc; char **argv; { char *usage = "usage: %s [-n] [-v] [-k] [-d debug-level] [-f file] [-h ldaphost] [-p ldapport] [-D binddn] [-w passwd] [dn]...\n"; - char *p, buf[ 4096 ]; + char buf[ 4096 ]; FILE *fp; - int i, rc, kerberos, linenum, authmethod; + int i, rc, kerberos, authmethod; extern char *optarg; extern int optind; @@ -138,9 +142,9 @@ main( argc, argv ) } -dodelete( ld, dn ) - LDAP *ld; - char *dn; +static int dodelete( + LDAP *ld, + char *dn) { int rc; diff --git a/clients/tools/ldapdelete.dsp b/clients/tools/ldapdelete.dsp new file mode 100644 index 0000000000..1cc7da7efb --- /dev/null +++ b/clients/tools/ldapdelete.dsp @@ -0,0 +1,91 @@ +# Microsoft Developer Studio Project File - Name="ldapdelete" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=ldapdelete - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ldapdelete.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ldapdelete.mak" CFG="ldapdelete - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ldapdelete - Win32 Release" (based on\ + "Win32 (x86) Console Application") +!MESSAGE "ldapdelete - Win32 Debug" (based on\ + "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ldapdelete - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release\ldapdelete" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "ldapdelete - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug\ldapdelete" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "ldapdelete - Win32 Release" +# Name "ldapdelete - Win32 Debug" +# Begin Source File + +SOURCE=.\ldapdelete.c +# End Source File +# End Target +# End Project diff --git a/clients/tools/ldapdelete.dsw b/clients/tools/ldapdelete.dsw new file mode 100644 index 0000000000..a80886b827 --- /dev/null +++ b/clients/tools/ldapdelete.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ldapdelete"=.\ldapdelete.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/clients/tools/ldapmodify.c b/clients/tools/ldapmodify.c index 31e770cdb3..9f5d127381 100644 --- a/clients/tools/ldapmodify.c +++ b/clients/tools/ldapmodify.c @@ -1,19 +1,24 @@ /* ldapmodify.c - generic program to modify or add entries using LDAP */ -#define DISABLE_BRIDGE #include "portable.h" #include -#include #include #include -#include -#include -#include -#include +#include +#include #include +#include + +#ifdef HAVE_SYS_FILE_H +#include +#endif +#ifdef HAVE_FCNTL_H +#include +#endif + #include #include #include @@ -603,7 +608,7 @@ domodify( char *dn, LDAPMod **pmods, int newentry ) for ( j = 0; pmods[ i ]->mod_bvalues[ j ] != NULL; ++j ) { bvp = pmods[ i ]->mod_bvalues[ j ]; notascii = 0; - for ( k = 0; k < bvp->bv_len; ++k ) { + for ( k = 0; (unsigned long) k < bvp->bv_len; ++k ) { if ( !isascii( bvp->bv_val[ k ] )) { notascii = 1; break; @@ -751,7 +756,7 @@ fromfile( char *path, struct berval *bv ) eof = feof( fp ); fclose( fp ); - if ( rlen != bv->bv_len ) { + if ( (unsigned long) rlen != bv->bv_len ) { perror( path ); free( bv->bv_val ); return( -1 ); diff --git a/clients/tools/ldapmodify.dsp b/clients/tools/ldapmodify.dsp new file mode 100644 index 0000000000..e0f35fdf7f --- /dev/null +++ b/clients/tools/ldapmodify.dsp @@ -0,0 +1,94 @@ +# Microsoft Developer Studio Project File - Name="ldapmodify" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ldapmodify - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ldapmodify.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ldapmodify.mak" CFG="ldapmodify - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ldapmodify - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ldapmodify - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ldapmodify - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release\ldapmodify" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 libldap.lib liblber.lib liblutil.lib /nologo /subsystem:windows /machine:I386 + +!ELSEIF "$(CFG)" == "ldapmodify - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "ldapmodi" +# PROP BASE Intermediate_Dir "ldapmodi" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug\ldapmodify" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 libldap.lib liblber.lib liblutil.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "ldapmodify - Win32 Release" +# Name "ldapmodify - Win32 Debug" +# Begin Source File + +SOURCE=.\ldapmodify.c +# End Source File +# End Target +# End Project diff --git a/clients/tools/ldapmodify.dsw b/clients/tools/ldapmodify.dsw new file mode 100644 index 0000000000..6bd7b7ff98 --- /dev/null +++ b/clients/tools/ldapmodify.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ldapmodify"=.\ldapmodify.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/clients/tools/ldapmodrdn.c b/clients/tools/ldapmodrdn.c index d5f578f594..8eae7ff01f 100644 --- a/clients/tools/ldapmodrdn.c +++ b/clients/tools/ldapmodrdn.c @@ -4,9 +4,10 @@ #include "portable.h" #include -#include #include #include + +#include #include #include @@ -29,16 +30,20 @@ extern int ldap_debug, lber_debug; #define safe_realloc( ptr, size ) ( ptr == NULL ? malloc( size ) : \ realloc( ptr, size )) +static int domodrdn LDAP_P(( + LDAP *ld, + char *dn, + char *rdn, + int remove)); /* flag: remove old RDN */ main( argc, argv ) int argc; char **argv; { char *usage = "usage: %s [-nvkc] [-d debug-level] [-h ldaphost] [-p ldapport] [-D binddn] [-w passwd] [ -f file | < entryfile | dn newrdn ]\n"; - char *myname,*infile, *p, *entrydn, *rdn, buf[ 4096 ]; + char *myname,*infile, *entrydn, *rdn, buf[ 4096 ]; FILE *fp; int rc, i, kerberos, remove, havedn, authmethod; - LDAPMod **pmods; extern char *optarg; extern int optind; @@ -170,11 +175,11 @@ main( argc, argv ) exit( rc ); } -domodrdn( ld, dn, rdn, remove ) - LDAP *ld; - char *dn; - char *rdn; - int remove; /* flag: remove old RDN */ +static int domodrdn( + LDAP *ld, + char *dn, + char *rdn, + int remove) /* flag: remove old RDN */ { int i; diff --git a/clients/tools/ldapmodrdn.dsp b/clients/tools/ldapmodrdn.dsp new file mode 100644 index 0000000000..22a3a8acf3 --- /dev/null +++ b/clients/tools/ldapmodrdn.dsp @@ -0,0 +1,85 @@ +# Microsoft Developer Studio Project File - Name="ldapmodrdn" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=ldapmodrdn - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ldapmodrdn.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ldapmodrdn.mak" CFG="ldapmodrdn - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ldapmodrdn - Win32 Release" (based on\ + "Win32 (x86) Console Application") +!MESSAGE "ldapmodrdn - Win32 Debug" (based on\ + "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ldapmodrdn - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "ldapmodrdn - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "ldapmodrdn - Win32 Release" +# Name "ldapmodrdn - Win32 Debug" +# End Target +# End Project diff --git a/clients/tools/ldapmodrdn.dsw b/clients/tools/ldapmodrdn.dsw new file mode 100644 index 0000000000..d3518543a8 --- /dev/null +++ b/clients/tools/ldapmodrdn.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ldapmodrdn"=.\ldapmodrdn.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/clients/tools/ldapsearch.c b/clients/tools/ldapsearch.c index 3423aba941..5418a4dd8b 100644 --- a/clients/tools/ldapsearch.c +++ b/clients/tools/ldapsearch.c @@ -1,9 +1,10 @@ -#define DISABLE_BRIDGE #include "portable.h" #include -#include #include + +#include +#include #include #include @@ -19,7 +20,7 @@ extern int ldap_debug, lber_debug; #endif /* LDAP_DEBUG */ -usage( s ) +static void usage( s ) char *s; { fprintf( stderr, "usage: %s [options] filter [attributes...]\nwhere:\n", s ); @@ -56,6 +57,25 @@ char *s; exit( 1 ); } +static void print_entry LDAP_P(( + LDAP *ld, + LDAPMessage *entry, + int attrsonly)); + +static int write_ldif_value LDAP_P(( + char *type, + char *value, + unsigned long vallen )); + +static int dosearch LDAP_P(( + LDAP *ld, + char *base, + int scope, + char **attrs, + int attrsonly, + char *filtpatt, + char *value)); + static char *binddn = LDAPSEARCH_BINDDN; static char *passwd = LDAPSEARCH_BIND_CRED; static char *base = LDAPSEARCH_BASE; @@ -299,16 +319,16 @@ char **argv; } -dosearch( ld, base, scope, attrs, attrsonly, filtpatt, value ) - LDAP *ld; - char *base; - int scope; - char **attrs; - int attrsonly; - char *filtpatt; - char *value; +static int dosearch( + LDAP *ld, + char *base, + int scope, + char **attrs, + int attrsonly, + char *filtpatt, + char *value) { - char filter[ BUFSIZ ], **val; + char filter[ BUFSIZ ]; int rc, first, matches; LDAPMessage *res, *e; @@ -376,10 +396,10 @@ dosearch( ld, base, scope, attrs, attrsonly, filtpatt, value ) } -print_entry( ld, entry, attrsonly ) - LDAP *ld; - LDAPMessage *entry; - int attrsonly; +void print_entry( + LDAP *ld, + LDAPMessage *entry, + int attrsonly) { char *a, *dn, *ufn, tmpfname[ 64 ]; int i, j, notascii; @@ -441,7 +461,7 @@ print_entry( ld, entry, attrsonly ) } else { notascii = 0; if ( !allow_binary ) { - for ( j = 0; j < bvals[ i ]->bv_len; ++j ) { + for ( j = 0; (unsigned long) j < bvals[ i ]->bv_len; ++j ) { if ( !isascii( bvals[ i ]->bv_val[ j ] )) { notascii = 1; break; diff --git a/clients/tools/ldapsearch.dsp b/clients/tools/ldapsearch.dsp new file mode 100644 index 0000000000..ed1096e93e --- /dev/null +++ b/clients/tools/ldapsearch.dsp @@ -0,0 +1,91 @@ +# Microsoft Developer Studio Project File - Name="ldapsearch" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=ldapsearch - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ldapsearch.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ldapsearch.mak" CFG="ldapsearch - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ldapsearch - Win32 Release" (based on\ + "Win32 (x86) Console Application") +!MESSAGE "ldapsearch - Win32 Debug" (based on\ + "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ldapsearch - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release\ldapsearch" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 libldap.lib liblber.lib liblutil.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "ldapsearch - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug\ldapsearch" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 libldap.lib liblber.lib liblutil.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "ldapsearch - Win32 Release" +# Name "ldapsearch - Win32 Debug" +# Begin Source File + +SOURCE=.\ldapsearch.c +# End Source File +# End Target +# End Project diff --git a/clients/tools/ldapsearch.dsw b/clients/tools/ldapsearch.dsw new file mode 100644 index 0000000000..97a9e5c53e --- /dev/null +++ b/clients/tools/ldapsearch.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ldapsearch"=.\ldapsearch.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + From 46dbdb861d46d11d861f7cf2970556af113f9280 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 20 Oct 1998 19:29:57 +0000 Subject: [PATCH 102/148] Removed stat -> _stat define --- include/portable.h.nt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/portable.h.nt b/include/portable.h.nt index 641fdb6854..cbbbfde51b 100644 --- a/include/portable.h.nt +++ b/include/portable.h.nt @@ -174,10 +174,10 @@ typedef char * caddr_t; #undef HAVE_TERMCAP /* define this for connectionless LDAP support */ -#define LDAP_CONNECTIONLESS +#undef LDAP_CONNECTIONLESS /* define this to add debugging code */ -#define LDAP_DEBUG +#define LDAP_DEBUG 1 /* define this for LDAP DNS support */ #undef LDAP_DNS @@ -186,10 +186,10 @@ typedef char * caddr_t; #undef LDAP_NOCACHE /* define this for LDAP referrals support */ -#define LDAP_REFERRALS +#define LDAP_REFERRALS 1 /* define this for LDAP User Interface support */ -#undef LDAP_LIBUI +#define LDAP_LIBUI 1 /* define this to use DBBTREE w/ LDBM backend */ #undef LDBM_USE_DBBTREE From b2ccd693a3f622ec0cec49d73753316c2a7ccc09 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 20 Oct 1998 19:48:10 +0000 Subject: [PATCH 103/148] add public domain getopt(3) --- libraries/liblutil/getopt.c | 108 ++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 libraries/liblutil/getopt.c diff --git a/libraries/liblutil/getopt.c b/libraries/liblutil/getopt.c new file mode 100644 index 0000000000..a19d9ba2c9 --- /dev/null +++ b/libraries/liblutil/getopt.c @@ -0,0 +1,108 @@ +/* + getopt.c + + modified public-domain AT&T getopt(3) +*/ + +#include +#include + +#ifdef _POSIX_SOURCE +# include +#else +# define STDERR_FILENO 2 +# ifdef __STDC__ + extern int write (int fildes, char * buf, unsigned nbyte); +# else + extern int write (); +# endif +#endif + +int opterr = 1; +int optind = 1; +int optopt; +char * optarg; + +#ifdef __STDC__ + static void ERR (char ** argv, char * s, char c) +#else + static void ERR (argv, s, c) + char ** argv, * s, c; +#endif +{ + char errbuf[2]; + +#ifdef DF_TRACE_DEBUG +printf("DF_TRACE_DEBUG: static void ERR () in getopt.c\n"); +#endif + if (opterr) + { + errbuf[0] = c; + errbuf[1] = '\n'; + (void) write(STDERR_FILENO,argv[0],strlen(argv[0])); + (void) write(STDERR_FILENO,s,strlen(s)); + (void) write(STDERR_FILENO,errbuf,sizeof errbuf); + } +} + +#ifdef __STDC__ + int getopt (int argc, char ** argv, char * opts) +#else + int getopt (argc, argv, opts) + int argc; + char ** argv, * opts; +#endif +{ + static int sp = 1, error = (int) '?'; + static char sw = '-', eos = '\0', arg = ':'; + register char c, * cp; + +#ifdef DF_TRACE_DEBUG +printf("DF_TRACE_DEBUG: int getopt () in getopt.c\n"); +#endif + if (sp == 1) + if (optind >= argc || argv[optind][0] != sw + || argv[optind][1] == eos) + return EOF; + else if (strcmp(argv[optind],"--") == 0) + { + optind++; + return EOF; + } + c = argv[optind][sp]; + optopt = (int) c; + if (c == arg || (cp = strchr(opts,c)) == NULL) + { + ERR(argv,": illegal option--",c); + if (argv[optind][++sp] == eos) + { + optind++; + sp = 1; + } + return error; + } + else if (*++cp == arg) + { + if (argv[optind][sp + 1] != eos) + optarg = &argv[optind++][sp + 1]; + else if (++optind >= argc) + { + ERR(argv,": option requires an argument--",c); + sp = 1; + return error; + } + else + optarg = argv[optind++]; + sp = 1; + } + else + { + if (argv[optind][++sp] == eos) + { + sp = 1; + optind++; + } + optarg = NULL; + } + return (int) c; +} From 6880f37fdc5a133b07c2efb15b6128aceaa5c55a Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 20 Oct 1998 19:51:08 +0000 Subject: [PATCH 104/148] modified for OpenLDAP --- libraries/liblutil/getopt.c | 36 +++++++++++------------------------- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/libraries/liblutil/getopt.c b/libraries/liblutil/getopt.c index a19d9ba2c9..112616fdce 100644 --- a/libraries/liblutil/getopt.c +++ b/libraries/liblutil/getopt.c @@ -2,33 +2,24 @@ getopt.c modified public-domain AT&T getopt(3) + modified by Kurt Zeilenga for inclusion into OpenLDAP */ -#include -#include +#include "portable.h" -#ifdef _POSIX_SOURCE -# include -#else -# define STDERR_FILENO 2 -# ifdef __STDC__ - extern int write (int fildes, char * buf, unsigned nbyte); -# else - extern int write (); -# endif -#endif +#ifndef HAVE_GETOPT + +#include + +#include +#include int opterr = 1; int optind = 1; int optopt; char * optarg; -#ifdef __STDC__ - static void ERR (char ** argv, char * s, char c) -#else - static void ERR (argv, s, c) - char ** argv, * s, c; -#endif +static void ERR (char ** argv, char * s, char c) { char errbuf[2]; @@ -45,13 +36,7 @@ printf("DF_TRACE_DEBUG: static void ERR () in getopt.c\n"); } } -#ifdef __STDC__ - int getopt (int argc, char ** argv, char * opts) -#else - int getopt (argc, argv, opts) - int argc; - char ** argv, * opts; -#endif +int getopt (int argc, char ** argv, char * opts) { static int sp = 1, error = (int) '?'; static char sw = '-', eos = '\0', arg = ':'; @@ -106,3 +91,4 @@ printf("DF_TRACE_DEBUG: int getopt () in getopt.c\n"); } return (int) c; } +#endif /* HAVE_GETOPT */ From f6598a69e721e0257721ca39246a23ad9bd63e98 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 20 Oct 1998 20:30:33 +0000 Subject: [PATCH 105/148] Add getopt detection. --- include/ac/unistd.h | 15 ++++++++++++++- include/portable.h.in | 6 ++++++ include/portable.h.nt | 10 ++++++++-- 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/include/ac/unistd.h b/include/ac/unistd.h index f524f99b2f..5e4501f589 100644 --- a/include/ac/unistd.h +++ b/include/ac/unistd.h @@ -3,11 +3,24 @@ #ifndef _AC_UNISTD_H #define _AC_UNISTD_H -#if HAVE_UNISTD_H +#if HAVE_SYS_TYPES_H # include +#endif + +#if HAVE_UNISTD_H # include #endif +/* getopt() defines may be in separate include file */ +#if HAVE_GETOPT_H +# include +#endif + +#ifndef HAVE_GETOPT +/* no getopt, assume we need getopt-compat.h */ +# include +#endif + /* use _POSIX_VERSION for POSIX.1 code */ #endif /* _AC_UNISTD_H */ diff --git a/include/portable.h.in b/include/portable.h.in index 6c782517ea..6b0abe55f8 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -230,6 +230,9 @@ is provided ``as is'' without express or implied warranty. /* Define if you have the gethostname function. */ #undef HAVE_GETHOSTNAME +/* Define if you have the getopt function. */ +#undef HAVE_GETOPT + /* Define if you have the gettimeofday function. */ #undef HAVE_GETTIMEOFDAY @@ -323,6 +326,9 @@ is provided ``as is'' without express or implied warranty. /* Define if you have the header file. */ #undef HAVE_GDBM_H +/* Define if you have the header file. */ +#undef HAVE_GETOPT_H + /* Define if you have the header file. */ #undef HAVE_KERBEROSIV_DES_H diff --git a/include/portable.h.nt b/include/portable.h.nt index cbbbfde51b..fff5c3f210 100644 --- a/include/portable.h.nt +++ b/include/portable.h.nt @@ -245,6 +245,9 @@ typedef char * caddr_t; /* Define if you have the gethostname function. */ #define HAVE_GETHOSTNAME 1 +/* define if you have the getopt function */ +#undef HAVE_GETOPT + /* Define if you have the gettimeofday function. */ #undef HAVE_GETTIMEOFDAY @@ -285,7 +288,7 @@ typedef char * caddr_t; #undef HAVE_SIGSET /* Define if you have the socket function. */ -#undef HAVE_SOCKET +#define HAVE_SOCKET 1 /* Define if you have the strdup function. */ #define HAVE_STRDUP 1 @@ -338,6 +341,9 @@ typedef char * caddr_t; /* Define if you have the header file. */ #undef HAVE_GDBM_H +/* Define if you have the header file. */ +#undef HAVE_GETOPT_H + /* Define if you have the header file. */ #undef HAVE_KERBEROSIV_DES_H @@ -405,7 +411,7 @@ typedef char * caddr_t; #undef HAVE_SYS_PARAM_H /* Define if you have the header file. */ -#define HAVE_SYS_SOCKET_H 1 +#undef HAVE_SYS_SOCKET_H /* Define if you have the header file. */ #undef HAVE_SYS_TIME_H From 9c58b13dd4ed7adf93a3e134ade2e75867bd3a20 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 20 Oct 1998 20:34:55 +0000 Subject: [PATCH 106/148] Add getopt-compat.h --- include/getopt-compat.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 include/getopt-compat.h diff --git a/include/getopt-compat.h b/include/getopt-compat.h new file mode 100644 index 0000000000..b82dc9fd8c --- /dev/null +++ b/include/getopt-compat.h @@ -0,0 +1,14 @@ +/* + * getopt(3) declarations + */ +#ifndef _GETOPT_COMPAT_H +#define _GETOPT_COMPAT_H + +#include + +extern char *optarg; +extern int optind, opterr, optopt; + +LDAP_F int getopt LDAP_P((int, char * const [], const char *)); + +#endif /* _GETOPT_COMPAT_H */ From 20c065370433231982b92221f43d7a9e3882239c Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 20 Oct 1998 20:38:21 +0000 Subject: [PATCH 107/148] really remove the #define stat. --- include/portable.h.nt | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/portable.h.nt b/include/portable.h.nt index fff5c3f210..5ee18255ed 100644 --- a/include/portable.h.nt +++ b/include/portable.h.nt @@ -36,8 +36,6 @@ is provided ``as is'' without express or implied warranty. #define strncasecmp strnicmp #define strdup _strdup -#define stat _stat - /* define type for caddr_t */ typedef char * caddr_t; From 3ff769c67a011a8460e6e6f504ccf9c13368e28e Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 20 Oct 1998 21:06:29 +0000 Subject: [PATCH 108/148] comment away #undefs --- include/portable.h.nt | 198 +++++++++++++++++++++--------------------- 1 file changed, 101 insertions(+), 97 deletions(-) diff --git a/include/portable.h.nt b/include/portable.h.nt index 5ee18255ed..0dc0aac5de 100644 --- a/include/portable.h.nt +++ b/include/portable.h.nt @@ -49,139 +49,143 @@ typedef char * caddr_t; System headers sometimes define this. We just want to avoid a redefinition error message. */ #ifndef _ALL_SOURCE -#undef _ALL_SOURCE +/* #undef _ALL_SOURCE */ #endif /* Define to empty if the keyword does not work. */ -#undef const +/* #undef const */ /* Define to the type of elements in the array set by `getgroups'. Usually this is either `int' or `gid_t'. */ -#undef GETGROUPS_T +/* #undef GETGROUPS_T */ /* Define to `int' if doesn't define. */ #define gid_t long /* Define if you don't have vprintf but do have _doprnt. */ -#undef HAVE_DOPRNT +/* #undef HAVE_DOPRNT */ /* Define if your struct stat has st_blksize. */ -#undef HAVE_ST_BLKSIZE +/* #undef HAVE_ST_BLKSIZE */ /* Define if you have the strftime function. */ #define HAVE_STRFTIME 1 /* Define if you have that is POSIX.1 compatible. */ -#undef HAVE_SYS_WAIT_H +/* #undef HAVE_SYS_WAIT_H */ /* Define if you have the vprintf function. */ #define HAVE_VPRINTF 1 /* Define if you have the wait3 system call. */ -#undef HAVE_WAIT3 +/* #undef HAVE_WAIT3 */ /* Define if on MINIX. */ -#undef _MINIX +/* #undef _MINIX */ /* Define to `int' if doesn't define. */ #define mode_t int /* Define to `long' if doesn't define. */ -#undef off_t +/* #undef off_t */ /* Define to `int' if doesn't define. */ #define pid_t int /* Define if the system does not provide POSIX.1 features except with this defined. */ -#undef _POSIX_1_SOURCE +/* #undef _POSIX_1_SOURCE */ /* Define if you need to in order for stat and other things to work. */ -#undef _POSIX_SOURCE +/* #undef _POSIX_SOURCE */ /* Define as the return type of signal handlers (int or void). */ #define RETSIGTYPE void /* Define to `unsigned' if doesn't define. */ -#undef size_t +/* #undef size_t */ /* Define if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Define if you can safely include both and . */ -#undef TIME_WITH_SYS_TIME +/* #undef TIME_WITH_SYS_TIME */ /* Define if your declares struct tm. */ -#undef TM_IN_SYS_TIME +/* #undef TM_IN_SYS_TIME */ /* Define to `int' if doesn't define. */ #define uid_t long +/* Define if your processor stores words with the most significant + byte first (like Motorola and SPARC, unlike Intel and VAX). */ +/* #undef WORDS_BIGENDIAN */ + /* define this if sys_errlist is not defined in stdio.h or errno.h */ -#undef DECL_SYS_ERRLIST +/* #undef DECL_SYS_ERRLIST */ /* define if you have berkeley db */ -#undef HAVE_BERKELEY_DB +/* #undef HAVE_BERKELEY_DB */ /* define if you have berkeley db2 */ -#undef HAVE_BERKELEY_DB2 +/* #undef HAVE_BERKELEY_DB2 */ /* define if you have crypt */ -#undef HAVE_CRYPT +/* #undef HAVE_CRYPT */ /* define if you have DCE */ -#undef HAVE_DCE +/* #undef HAVE_DCE */ /* define if you have GDBM */ -#undef HAVE_GDBM +/* #undef HAVE_GDBM */ /* define if you have Kerberos */ -#undef HAVE_KERBEROS +/* #undef HAVE_KERBEROS */ /* define if you have LinuxThreads */ -#undef HAVE_LINUX_THREADS +/* #undef HAVE_LINUX_THREADS */ /* define if you have Sun LWP (SunOS style) */ -#undef HAVE_LWP +/* #undef HAVE_LWP */ /* define if you have Sun LWP (Solaris style) */ -#undef HAVE_LWP_THR +/* #undef HAVE_LWP_THR */ /* define if you have -lncurses */ -#undef HAVE_NCURSES +/* #undef HAVE_NCURSES */ /* define if you have NDBM */ -#undef HAVE_NDBM +/* #undef HAVE_NDBM */ /* define if you have Mach CThreads */ -#undef HAVE_MACH_CTHREADS +/* #undef HAVE_MACH_CTHREADS */ /* define if you have a preemptive POSIX Threads implementation */ -#undef HAVE_PREEMPTIVE_PTHREADS +/* #undef HAVE_PREEMPTIVE_PTHREADS */ /* define if you have POSIX Threads */ -#undef HAVE_PTHREADS +/* #undef HAVE_PTHREADS */ /* define if your POSIX Threads implementatin is circa Draft 4 */ -#undef HAVE_PTHREADS_D4 +/* #undef HAVE_PTHREADS_D4 */ /* define if you have -lwrap */ -#undef HAVE_TCPD +/* #undef HAVE_TCPD */ /* define if you have -ltermcap */ -#undef HAVE_TERMCAP +/* #undef HAVE_TERMCAP */ /* define this for connectionless LDAP support */ -#undef LDAP_CONNECTIONLESS +/* #undef LDAP_CONNECTIONLESS */ /* define this to add debugging code */ #define LDAP_DEBUG 1 /* define this for LDAP DNS support */ -#undef LDAP_DNS +/* #undef LDAP_DNS */ /* define this to remove -lldap cache support */ -#undef LDAP_NOCACHE +/* #undef LDAP_NOCACHE */ /* define this for LDAP referrals support */ #define LDAP_REFERRALS 1 @@ -190,10 +194,10 @@ typedef char * caddr_t; #define LDAP_LIBUI 1 /* define this to use DBBTREE w/ LDBM backend */ -#undef LDBM_USE_DBBTREE +/* #undef LDBM_USE_DBBTREE */ /* define this to use DBHASH w/ LDBM backend */ -#undef LDBM_USE_DBHASH +/* #undef LDBM_USE_DBHASH */ /* define this if you want no termcap support */ #define NO_TERMCAP 1 @@ -205,19 +209,19 @@ typedef char * caddr_t; #define SLAPD_ACLGROUPS /* define this for crypt(3) password support */ -#undef SLAPD_CRYPT +/* #undef SLAPD_CRYPT */ /* define this to use SLAPD LDBM backend */ -#undef SLAPD_LDBM +/* #undef SLAPD_LDBM */ /* define this for MD5 password support */ #define SLAPD_MD5 1 /* define this to use SLAPD passwd backend */ -#undef SLAPD_PASSWD +/* #undef SLAPD_PASSWD */ /* define this for phonetic support */ -#undef SLAPD_PHONETIC +/* #undef SLAPD_PHONETIC */ /* define this for Reverse Lookup support */ #define SLAPD_RLOOKUPS 1 @@ -226,31 +230,31 @@ typedef char * caddr_t; #define SLAPD_SHA1 1 /* define this to use SLAPD shell backend */ -#undef SLAPD_SHELL +/* #undef SLAPD_SHELL */ /* define this if the thread package is preemptive */ -#undef THREAD_PREEMPTIVE +/* #undef THREAD_PREEMPTIVE */ /* Define if you have the bcopy function. */ -#undef HAVE_BCOPY +/* #undef HAVE_BCOPY */ /* Define if you have the flock function. */ -#undef HAVE_FLOCK +/* #undef HAVE_FLOCK */ /* Define if you have the getdtablesize function. */ -#undef HAVE_GETDTABLESIZE +/* #undef HAVE_GETDTABLESIZE */ /* Define if you have the gethostname function. */ #define HAVE_GETHOSTNAME 1 /* define if you have the getopt function */ -#undef HAVE_GETOPT +/* #undef HAVE_GETOPT */ /* Define if you have the gettimeofday function. */ -#undef HAVE_GETTIMEOFDAY +/* #undef HAVE_GETTIMEOFDAY */ /* Define if you have the lockf function. */ -#undef HAVE_LOCKF +/* #undef HAVE_LOCKF */ /* Define if you have the memcpy function. */ #define HAVE_MEMCPY 1 @@ -262,28 +266,28 @@ typedef char * caddr_t; #define HAVE_MKTIME 1 /* Define if you have the pthread_kill function. */ -#undef HAVE_PTHREAD_KILL +/* #undef HAVE_PTHREAD_KILL */ /* Define if you have the pthread_yield function. */ -#undef HAVE_PTHREAD_YIELD +/* #undef HAVE_PTHREAD_YIELD */ /* Define if you have the sched_yield function. */ -#undef HAVE_SCHED_YIELD +/* #undef HAVE_SCHED_YIELD */ /* Define if you have the select function. */ #define HAVE_SELECT 1 /* Define if you have the setpwfile function. */ -#undef HAVE_SETPWFILE +/* #undef HAVE_SETPWFILE */ /* Define if you have the setsid function. */ -#undef HAVE_SETSID +/* #undef HAVE_SETSID */ /* Define if you have the signal function. */ #define HAVE_SIGNAL 1 /* Define if you have the sigset function. */ -#undef HAVE_SIGSET +/* #undef HAVE_SIGSET */ /* Define if you have the socket function. */ #define HAVE_SOCKET 1 @@ -298,7 +302,7 @@ typedef char * caddr_t; #define HAVE_STRRCHR 1 /* Define if you have the strsep function. */ -#undef HAVE_STRSEP +/* #undef HAVE_STRSEP */ /* Define if you have the strstr function. */ #define HAVE_STRSTR 1 @@ -313,19 +317,19 @@ typedef char * caddr_t; #define HAVE_STRTOUL 1 /* Define if you have the sysconf function. */ -#undef HAVE_SYSCONF +/* #undef HAVE_SYSCONF */ /* Define if you have the header file. */ -#undef HAVE_DB_H +/* #undef HAVE_DB_H */ /* Define if you have the header file. */ -#undef HAVE_DB_185_H +/* #undef HAVE_DB_185_H */ /* Define if you have the header file. */ -#undef HAVE_DES_H +/* #undef HAVE_DES_H */ /* Define if you have the header file. */ -#undef HAVE_DIRENT_H +/* #undef HAVE_DIRENT_H */ /* Define if you have the header file. */ #define HAVE_ERRNO_H 1 @@ -334,124 +338,124 @@ typedef char * caddr_t; #define HAVE_FCNTL_H 1 /* Define if you have the header file. */ -#undef HAVE_FILIO_H +/* #undef HAVE_FILIO_H */ /* Define if you have the header file. */ -#undef HAVE_GDBM_H +/* #undef HAVE_GDBM_H */ /* Define if you have the header file. */ -#undef HAVE_GETOPT_H +/* #undef HAVE_GETOPT_H */ /* Define if you have the header file. */ -#undef HAVE_KERBEROSIV_DES_H +/* #undef HAVE_KERBEROSIV_DES_H */ /* Define if you have the header file. */ -#undef HAVE_KERBEROSIV_KRB_H +/* #undef HAVE_KERBEROSIV_KRB_H */ /* Define if you have the header file. */ -#undef HAVE_KRB_H +/* #undef HAVE_KRB_H */ /* Define if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define if you have the header file. */ -#undef HAVE_LWP_LWP_H +/* #undef HAVE_LWP_LWP_H */ /* Define if you have the header file. */ -#undef HAVE_MACH_CTHREADS_H +/* #undef HAVE_MACH_CTHREADS_H */ /* Define if you have the header file. */ #define HAVE_MALLOC_H 1 /* Define if you have the header file. */ -#undef HAVE_NCURSES_H +/* #undef HAVE_NCURSES_H */ /* Define if you have the header file. */ -#undef HAVE_NDBM_H +/* #undef HAVE_NDBM_H */ /* Define if you have the header file. */ -#undef HAVE_NDIR_H +/* #undef HAVE_NDIR_H */ /* Define if you have the header file. */ -#undef HAVE_PTHREAD_H +/* #undef HAVE_PTHREAD_H */ /* Define if you have the header file. */ -#undef HAVE_REGEX_H +/* #undef HAVE_REGEX_H */ /* Define if you have the header file. */ -#undef HAVE_SCHED_H +/* #undef HAVE_SCHED_H */ /* Define if you have the header file. */ -#undef HAVE_SGTTY_H +/* #undef HAVE_SGTTY_H */ /* Define if you have the header file. */ #define HAVE_STDDEF_H 1 /* Define if you have the header file. */ -#undef HAVE_SYNCH_H +/* #undef HAVE_SYNCH_H */ /* Define if you have the header file. */ -#undef HAVE_SYS_DIR_H +/* #undef HAVE_SYS_DIR_H */ /* Define if you have the header file. */ -#undef HAVE_SYS_ERRNO_H +/* #undef HAVE_SYS_ERRNO_H */ /* Define if you have the header file. */ -#undef HAVE_SYS_FILE_H +/* #undef HAVE_SYS_FILE_H */ /* Define if you have the header file. */ -#undef HAVE_SYS_IOCTL_H +/* #undef HAVE_SYS_IOCTL_H */ /* Define if you have the header file. */ -#undef HAVE_SYS_NDIR_H +/* #undef HAVE_SYS_NDIR_H */ /* Define if you have the header file. */ -#undef HAVE_SYS_PARAM_H +/* #undef HAVE_SYS_PARAM_H */ /* Define if you have the header file. */ -#undef HAVE_SYS_SOCKET_H +/* #undef HAVE_SYS_SOCKET_H */ /* Define if you have the header file. */ -#undef HAVE_SYS_TIME_H +/* #undef HAVE_SYS_TIME_H */ /* Define if you have the header file. */ #define HAVE_SYS_TYPES_H 1 /* Define if you have the header file. */ -#undef HAVE_SYSLOG_H +/* #undef HAVE_SYSLOG_H */ /* Define if you have the header file. */ -#undef HAVE_TERMCAP_H +/* #undef HAVE_TERMCAP_H */ /* Define if you have the header file. */ -#undef HAVE_TERMIOS_H +/* #undef HAVE_TERMIOS_H */ /* Define if you have the header file. */ -#undef HAVE_THREAD_H +/* #undef HAVE_THREAD_H */ /* Define if you have the header file. */ -#undef HAVE_UNISTD_H +/* #undef HAVE_UNISTD_H */ /* Define if you have the V3 library (-lV3). */ -#undef HAVE_LIBV3 +/* #undef HAVE_LIBV3 */ /* Define if you have the gen library (-lgen). */ -#undef HAVE_LIBGEN +/* #undef HAVE_LIBGEN */ /* Define if you have the inet library (-linet). */ -#undef HAVE_LIBINET +/* #undef HAVE_LIBINET */ /* Define if you have the net library (-lnet). */ -#undef HAVE_LIBNET +/* #undef HAVE_LIBNET */ /* Define if you have the nsl library (-lnsl). */ -#undef HAVE_LIBNSL +/* #undef HAVE_LIBNSL */ /* Define if you have the nsl_s library (-lnsl_s). */ -#undef HAVE_LIBNSL_S +/* #undef HAVE_LIBNSL_S */ /* Define if you have the socket library (-lsocket). */ -#undef HAVE_LIBSOCKET +/* #undef HAVE_LIBSOCKET */ #ifdef HAVE_STDDEF_H # include From 99fb0a7916309063e0944ec37c0290c6e9153b5c Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 20 Oct 1998 21:07:09 +0000 Subject: [PATCH 109/148] prefix defines with LDAP_ and use ac defs --- include/ldap.h | 9 +++--- include/ldbm.h | 73 +++++++++++++++++++++++++++++++++---------- include/portable.h.in | 4 +++ 3 files changed, 66 insertions(+), 20 deletions(-) diff --git a/include/ldap.h b/include/ldap.h index 65b2d87b79..acb1d50ae7 100644 --- a/include/ldap.h +++ b/include/ldap.h @@ -20,12 +20,13 @@ LDAP_BEGIN_DECL #define LDAP_PORT 389 #define LDAP_VERSION1 1 #define LDAP_VERSION2 2 +#define LDAP_VERSION3 3 #define LDAP_VERSION LDAP_VERSION2 -#define COMPAT20 -#define COMPAT30 -#if defined(COMPAT20) || defined(COMPAT30) -#define COMPAT +#define LDAP_COMPAT20 +#define LDAP_COMPAT30 +#if defined(LDAP_COMPAT20) || defined(LDAP_COMPAT30) +#define LDAP_COMPAT #endif #define LDAP_MAX_ATTR_LEN 100 diff --git a/include/ldbm.h b/include/ldbm.h index 95bd55ffa7..e9788fcbbf 100644 --- a/include/ldbm.h +++ b/include/ldbm.h @@ -46,7 +46,16 @@ extern gdbm_error gdbm_errno; #include #include #include -#include + +#ifdef LDBM_USE_DB2_COMPAT185 +# include +#else +# include +# ifdef LDBM_USE_DB2 +# define R_NOOVERWRITE DB_NOOVERWRITE +# define DEFAULT_DB_PAGE_SIZE 1024 +# endif +#endif typedef DBT Datum; #define dsize size @@ -57,11 +66,18 @@ typedef DB *LDBM; #define DB_TYPE DB_HASH /* for ldbm_open */ -#define LDBM_READER O_RDONLY -#define LDBM_WRITER O_RDWR -#define LDBM_WRCREAT (O_RDWR|O_CREAT) -#define LDBM_NEWDB (O_RDWR|O_TRUNC|O_CREAT) -#define LDBM_FAST 0 +#ifdef LDBM_USE_DB2 +# define LDBM_READER DB_RDONLY +# define LDBM_WRITER 0x00000 /* hopefully */ +# define LDBM_WRCREAT (DB_NOMMAP|DB_CREATE|DB_THREAD) +# define LDBM_NEWDB (DB_TRUNCATE|DB_CREATE|DB_THREAD) +#else +# define LDBM_READER O_RDONLY +# define LDBM_WRITER O_RDWR +# define LDBM_WRCREAT (O_RDWR|O_CREAT) +# define LDBM_NEWDB (O_RDWR|O_TRUNC|O_CREAT) +# define LDBM_FAST 0 +#endif #define LDBM_SUFFIX ".dbh" @@ -85,7 +101,17 @@ extern int errno; #include #include #include -#include + +#ifdef LDBM_USE_DB2_COMPAT185 +# include +#else +# include +# ifdef LDBM_USE_DB2 +# define R_NOOVERWRITE DB_NOOVERWRITE +# define DEFAULT_DB_PAGE_SIZE 1024 +# endif +#endif + typedef DBT Datum; #define dsize size @@ -96,11 +122,19 @@ typedef DB *LDBM; #define DB_TYPE DB_BTREE /* for ldbm_open */ -#define LDBM_READER O_RDONLY -#define LDBM_WRITER O_RDWR -#define LDBM_WRCREAT (O_RDWR|O_CREAT) -#define LDBM_NEWDB (O_RDWR|O_TRUNC|O_CREAT) -#define LDBM_FAST 0 +#ifdef LDBM_USE_DB2 +# define LDBM_READER DB_RDONLY +# define LDBM_WRITER 0x00000 /* hopefully */ +# define LDBM_WRCREAT (DB_NOMMAP|DB_CREATE|DB_THREAD) +# define LDBM_NEWDB (DB_TRUNCATE|DB_CREATE|DB_THREAD) +#else +# define LDBM_READER O_RDONLY +# define LDBM_WRITER O_RDWR +# define LDBM_WRCREAT (O_RDWR|O_CREAT) +# define LDBM_NEWDB (O_RDWR|O_TRUNC|O_CREAT) +#endif + +# define LDBM_FAST 0 #define LDBM_SUFFIX ".dbb" #define LDBM_ORDERED 1 @@ -123,7 +157,7 @@ extern int errno; *****************************************************************/ #include -#ifndef O_RDONLY +#ifdef HAVE_FCNTL_H #include #endif @@ -150,6 +184,7 @@ typedef DBM *LDBM; #endif /* db btree */ #endif /* gdbm */ +int ldbm_errno( LDBM ldbm ); LDBM ldbm_open( char *name, int rw, int mode, int dbcachesize ); void ldbm_close( LDBM ldbm ); void ldbm_sync( LDBM ldbm ); @@ -158,8 +193,14 @@ Datum ldbm_datum_dup( LDBM ldbm, Datum data ); Datum ldbm_fetch( LDBM ldbm, Datum key ); int ldbm_store( LDBM ldbm, Datum key, Datum data, int flags ); int ldbm_delete( LDBM ldbm, Datum key ); -Datum ldbm_firstkey( LDBM ldbm ); -Datum ldbm_nextkey( LDBM ldbm, Datum key ); -int ldbm_errno( LDBM ldbm ); + +#if LDBM_USE_DB2 + void *ldbm_malloc( size_t size ); + Datum ldbm_firstkey( LDBM ldbm, DBC **dbch ); + Datum ldbm_nextkey( LDBM ldbm, Datum key, DBC *dbcp ); +#else + Datum ldbm_firstkey( LDBM ldbm ); + Datum ldbm_nextkey( LDBM ldbm, Datum key ); +#endif #endif /* _ldbm_h_ */ diff --git a/include/portable.h.in b/include/portable.h.in index 6b0abe55f8..dd1f58b804 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -104,6 +104,10 @@ is provided ``as is'' without express or implied warranty. /* Define to `int' if doesn't define. */ #undef uid_t +/* Define if your processor stores words with the most significant + byte first (like Motorola and SPARC, unlike Intel and VAX). */ +#undef WORDS_BIGENDIAN + /* define this if sys_errlist is not defined in stdio.h or errno.h */ #undef DECL_SYS_ERRLIST From 98dd3e9b2f6f421b0ecad284a773fe7d5fcd9a3d Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 20 Oct 1998 21:08:08 +0000 Subject: [PATCH 110/148] Add test for little/big endian. --- configure | 222 +++++++++++++++++++++++++++----------- configure.in | 6 +- libraries/liblutil/sha1.c | 6 +- 3 files changed, 164 insertions(+), 70 deletions(-) diff --git a/configure b/configure index 7f02f21e88..c4f6d6b700 100755 --- a/configure +++ b/configure @@ -4958,6 +4958,7 @@ for ac_hdr in \ errno.h \ fcntl.h \ filio.h \ + getopt.h \ limits.h \ malloc.h \ regex.h \ @@ -4976,17 +4977,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4980: checking for $ac_hdr" >&5 +echo "configure:4981: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5014,12 +5015,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5018: checking for uid_t in sys/types.h" >&5 +echo "configure:5019: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -5048,7 +5049,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:5052: checking type of array argument to getgroups" >&5 +echo "configure:5053: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5056,7 +5057,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -5095,7 +5096,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -5119,12 +5120,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:5123: checking for mode_t" >&5 +echo "configure:5124: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5152,12 +5153,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:5156: checking for off_t" >&5 +echo "configure:5157: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5185,12 +5186,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:5189: checking for pid_t" >&5 +echo "configure:5190: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5218,12 +5219,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:5222: checking return type of signal handlers" >&5 +echo "configure:5223: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5240,7 +5241,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:5244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -5259,12 +5260,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:5263: checking for size_t" >&5 +echo "configure:5264: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5292,12 +5293,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5296: checking for uid_t in sys/types.h" >&5 +echo "configure:5297: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -5326,12 +5327,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:5330: checking for st_blksize in struct stat" >&5 +echo "configure:5331: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5339,7 +5340,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:5343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -5360,12 +5361,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:5364: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:5365: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5374,7 +5375,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:5378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -5395,12 +5396,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:5399: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:5400: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5408,7 +5409,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:5412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -5429,13 +5430,103 @@ EOF fi +echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 +echo "configure:5435: 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 < +#include +int main() { + +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN + bogus endian macros +#endif +; return 0; } +EOF +if { (eval echo configure:5453: \"$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 < +#include +int main() { + +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif +; return 0; } +EOF +if { (eval echo configure:5468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_bigendian=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_c_bigendian=no +fi +rm -f conftest* +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +if test $ac_cv_c_bigendian = unknown; then +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 <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + ac_cv_c_bigendian=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_c_bigendian=yes +fi +rm -fr conftest* +fi + +fi +fi + +echo "$ac_t""$ac_cv_c_bigendian" 1>&6 +if test $ac_cv_c_bigendian = yes; then + cat >> confdefs.h <<\EOF +#define WORDS_BIGENDIAN 1 +EOF + +fi + echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:5434: checking for working const" >&5 +echo "configure:5525: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -5507,7 +5598,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:5511: checking for 8-bit clean memcmp" >&5 +echo "configure:5602: 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 @@ -5515,7 +5606,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -5543,12 +5634,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:5547: checking for strftime" >&5 +echo "configure:5638: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -5593,7 +5684,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:5597: checking for strftime in -lintl" >&5 +echo "configure:5688: 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 @@ -5601,7 +5692,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5639,12 +5730,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:5643: checking for vprintf" >&5 +echo "configure:5734: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -5691,12 +5782,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:5695: checking for _doprnt" >&5 +echo "configure:5786: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -5744,7 +5835,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:5748: checking for wait3 that fills in rusage" >&5 +echo "configure:5839: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5752,7 +5843,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -5783,7 +5874,7 @@ main() { } } EOF -if { (eval echo configure:5787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -5808,6 +5899,7 @@ fi for ac_func in \ bcopy \ + getopt \ flock \ gethostname \ gettimeofday \ @@ -5833,12 +5925,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5837: checking for $ac_func" >&5 +echo "configure:5929: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5886,15 +5978,15 @@ fi done -for ac_func in strdup +for ac_func in getopt strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5893: checking for $ac_func" >&5 +echo "configure:5985: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5947,13 +6039,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:5951: checking declaration of sys_errlist" >&5 +echo "configure:6043: 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 < @@ -5963,7 +6055,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:5967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -5984,20 +6076,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:5988: checking existence of sys_errlist" >&5 +echo "configure:6080: 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 < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:6001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index 890aa41c05..0b5967cc63 100644 --- a/configure.in +++ b/configure.in @@ -686,6 +686,7 @@ AC_CHECK_HEADERS( \ errno.h \ fcntl.h \ filio.h \ + getopt.h \ limits.h \ malloc.h \ regex.h \ @@ -715,7 +716,7 @@ AC_STRUCT_ST_BLKSIZE AC_HEADER_TIME AC_STRUCT_TM -dnl AC_C_BIGENDIAN +AC_C_BIGENDIAN AC_C_CONST dnl AC_CHECK_SIZEOF(short) @@ -731,6 +732,7 @@ AC_FUNC_WAIT3 AC_CHECK_FUNCS( \ bcopy \ + getopt \ flock \ gethostname \ gettimeofday \ @@ -755,7 +757,7 @@ AC_CHECK_FUNCS( \ sysconf \ ) -AC_REPLACE_FUNCS(strdup) +AC_REPLACE_FUNCS(getopt strdup) dnl ---------------------------------------------------------------- # Check Configuration diff --git a/libraries/liblutil/sha1.c b/libraries/liblutil/sha1.c index a6153f1f8a..1104cec709 100644 --- a/libraries/liblutil/sha1.c +++ b/libraries/liblutil/sha1.c @@ -35,11 +35,11 @@ * blk0() and blk() perform the initial expand. * I got the idea of expanding during the round function from SSLeay */ -#if BYTE_ORDER == LITTLE_ENDIAN +#if WORDS_BIGENDIAN +# define blk0(i) block->l[i] +#else # define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \ |(rol(block->l[i],8)&0x00FF00FF)) -#else -# define blk0(i) block->l[i] #endif #define blk(i) (block->l[i&15] = rol(block->l[(i+13)&15]^block->l[(i+8)&15] \ ^block->l[(i+2)&15]^block->l[i&15],1)) From 4bce7aa748e22351b44b5752cce979812bea8ad1 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 20 Oct 1998 21:14:19 +0000 Subject: [PATCH 111/148] VC++ update... tools now link! --- clients/tools/ldapdelete.dsp | 4 +-- clients/tools/ldapdelete.dsw | 45 +++++++++++++++++++++++++ clients/tools/ldapmodify.c | 4 +-- clients/tools/ldapmodify.dsp | 35 +++++++++---------- clients/tools/ldapmodify.dsw | 60 +++++++++++++++++++++++++++++++++ clients/tools/ldapmodrdn.dsp | 16 ++++++--- clients/tools/ldapmodrdn.dsw | 45 +++++++++++++++++++++++++ clients/tools/ldapsearch.c | 1 + clients/tools/ldapsearch.dsp | 4 +-- clients/tools/ldapsearch.dsw | 60 +++++++++++++++++++++++++++++++++ libraries/liblber/liblber.dsp | 4 +-- libraries/libldap/libldap.dsp | 4 +-- libraries/liblutil/getopt.c | 8 +++++ libraries/liblutil/liblutil.dsp | 8 +++-- 14 files changed, 261 insertions(+), 37 deletions(-) diff --git a/clients/tools/ldapdelete.dsp b/clients/tools/ldapdelete.dsp index 1cc7da7efb..2cdee1025d 100644 --- a/clients/tools/ldapdelete.dsp +++ b/clients/tools/ldapdelete.dsp @@ -51,7 +51,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 /nologo /subsystem:console /machine:I386 +# ADD LINK32 libldap.lib liblber.lib liblutil.lib ws2_32.lib /nologo /subsystem:console /machine:I386 !ELSEIF "$(CFG)" == "ldapdelete - Win32 Debug" @@ -75,7 +75,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 libldap.lib liblber.lib liblutil.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\libraries\Debug" !ENDIF diff --git a/clients/tools/ldapdelete.dsw b/clients/tools/ldapdelete.dsw index a80886b827..48462a373e 100644 --- a/clients/tools/ldapdelete.dsw +++ b/clients/tools/ldapdelete.dsw @@ -9,6 +9,51 @@ Package=<5> {{{ }}} +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name liblber + End Project Dependency + Begin Project Dependency + Project_Dep_Name libldap + End Project Dependency + Begin Project Dependency + Project_Dep_Name liblutil + End Project Dependency +}}} + +############################################################################### + +Project: "liblber"=..\..\libraries\liblber\liblber.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "libldap"=..\..\libraries\libldap\libldap.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "liblutil"=..\..\libraries\liblutil\liblutil.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + Package=<4> {{{ }}} diff --git a/clients/tools/ldapmodify.c b/clients/tools/ldapmodify.c index 9f5d127381..9734ab674e 100644 --- a/clients/tools/ldapmodify.c +++ b/clients/tools/ldapmodify.c @@ -70,9 +70,7 @@ static int fromfile LDAP_P(( char *path, struct berval *bv )); static char *read_one_record LDAP_P(( FILE *fp )); -main( argc, argv ) - int argc; - char **argv; +main( int argc, char **argv ) { char *infile, *rbuf, *start, *p, *q; FILE *fp; diff --git a/clients/tools/ldapmodify.dsp b/clients/tools/ldapmodify.dsp index e0f35fdf7f..e50f69b266 100644 --- a/clients/tools/ldapmodify.dsp +++ b/clients/tools/ldapmodify.dsp @@ -2,7 +2,7 @@ # Microsoft Developer Studio Generated Build File, Format Version 5.00 # ** DO NOT EDIT ** -# TARGTYPE "Win32 (x86) Application" 0x0101 +# TARGTYPE "Win32 (x86) Console Application" 0x0103 CFG=ldapmodify - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, @@ -17,15 +17,16 @@ CFG=ldapmodify - Win32 Debug !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE -!MESSAGE "ldapmodify - Win32 Release" (based on "Win32 (x86) Application") -!MESSAGE "ldapmodify - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ldapmodify - Win32 Release" (based on\ + "Win32 (x86) Console Application") +!MESSAGE "ldapmodify - Win32 Debug" (based on\ + "Win32 (x86) Console Application") !MESSAGE # Begin Project # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe -MTL=midl.exe RSC=rc.exe !IF "$(CFG)" == "ldapmodify - Win32 Release" @@ -38,28 +39,26 @@ RSC=rc.exe # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release\ldapmodify" +# PROP Intermediate_Dir "Release" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 libldap.lib liblber.lib liblutil.lib /nologo /subsystem:windows /machine:I386 +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 libldap.lib liblber.lib libldif.lib liblutil.lib ws2_32.lib /nologo /subsystem:console /machine:I386 !ELSEIF "$(CFG)" == "ldapmodify - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "ldapmodi" -# PROP BASE Intermediate_Dir "ldapmodi" +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 @@ -67,18 +66,16 @@ LINK32=link.exe # PROP Intermediate_Dir "Debug\ldapmodify" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 libldap.lib liblber.lib liblutil.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 libldap.lib liblber.lib libldif.lib liblutil.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\libraries\Debug" !ENDIF diff --git a/clients/tools/ldapmodify.dsw b/clients/tools/ldapmodify.dsw index 6bd7b7ff98..64470316b9 100644 --- a/clients/tools/ldapmodify.dsw +++ b/clients/tools/ldapmodify.dsw @@ -9,6 +9,66 @@ Package=<5> {{{ }}} +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name liblber + End Project Dependency + Begin Project Dependency + Project_Dep_Name libldap + End Project Dependency + Begin Project Dependency + Project_Dep_Name liblutil + End Project Dependency + Begin Project Dependency + Project_Dep_Name libldif + End Project Dependency +}}} + +############################################################################### + +Project: "liblber"=..\..\libraries\liblber\liblber.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "libldap"=..\..\libraries\libldap\libldap.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "libldif"=..\..\libraries\libldif\libldif.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "liblutil"=..\..\libraries\liblutil\liblutil.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + Package=<4> {{{ }}} diff --git a/clients/tools/ldapmodrdn.dsp b/clients/tools/ldapmodrdn.dsp index 22a3a8acf3..013f8b682a 100644 --- a/clients/tools/ldapmodrdn.dsp +++ b/clients/tools/ldapmodrdn.dsp @@ -40,9 +40,10 @@ RSC=rc.exe # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe @@ -50,7 +51,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 libldap.lib liblber.lib liblutil.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\libraries\Release" !ELSEIF "$(CFG)" == "ldapmodrdn - Win32 Debug" @@ -62,10 +63,11 @@ LINK32=link.exe # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" +# PROP Intermediate_Dir "Debug\ldapmodrdn" +# PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe @@ -73,7 +75,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 libldap.lib liblber.lib liblutil.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\libraries\Debug" !ENDIF @@ -81,5 +83,9 @@ LINK32=link.exe # Name "ldapmodrdn - Win32 Release" # Name "ldapmodrdn - Win32 Debug" +# Begin Source File + +SOURCE=.\ldapmodrdn.c +# End Source File # End Target # End Project diff --git a/clients/tools/ldapmodrdn.dsw b/clients/tools/ldapmodrdn.dsw index d3518543a8..8514026638 100644 --- a/clients/tools/ldapmodrdn.dsw +++ b/clients/tools/ldapmodrdn.dsw @@ -9,6 +9,51 @@ Package=<5> {{{ }}} +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name liblber + End Project Dependency + Begin Project Dependency + Project_Dep_Name libldap + End Project Dependency + Begin Project Dependency + Project_Dep_Name liblutil + End Project Dependency +}}} + +############################################################################### + +Project: "liblber"=..\..\libraries\liblber\liblber.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "libldap"=..\..\libraries\libldap\libldap.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "liblutil"=..\..\libraries\liblutil\liblutil.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + Package=<4> {{{ }}} diff --git a/clients/tools/ldapsearch.c b/clients/tools/ldapsearch.c index 5418a4dd8b..bd1b568cf9 100644 --- a/clients/tools/ldapsearch.c +++ b/clients/tools/ldapsearch.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include diff --git a/clients/tools/ldapsearch.dsp b/clients/tools/ldapsearch.dsp index ed1096e93e..9927479c89 100644 --- a/clients/tools/ldapsearch.dsp +++ b/clients/tools/ldapsearch.dsp @@ -51,7 +51,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 libldap.lib liblber.lib liblutil.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 libldap.lib liblber.lib liblutil.lib ws2_32.lib /nologo /subsystem:console /machine:I386 !ELSEIF "$(CFG)" == "ldapsearch - Win32 Debug" @@ -75,7 +75,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 libldap.lib liblber.lib liblutil.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 libldap.lib liblber.lib libldif.lib liblutil.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\libraries\Debug" !ENDIF diff --git a/clients/tools/ldapsearch.dsw b/clients/tools/ldapsearch.dsw index 97a9e5c53e..7790a0bfcc 100644 --- a/clients/tools/ldapsearch.dsw +++ b/clients/tools/ldapsearch.dsw @@ -9,6 +9,66 @@ Package=<5> {{{ }}} +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name liblber + End Project Dependency + Begin Project Dependency + Project_Dep_Name libldap + End Project Dependency + Begin Project Dependency + Project_Dep_Name libldif + End Project Dependency + Begin Project Dependency + Project_Dep_Name liblutil + End Project Dependency +}}} + +############################################################################### + +Project: "liblber"=..\..\libraries\liblber\liblber.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "libldap"=..\..\libraries\libldap\libldap.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "libldif"=..\..\libraries\libldif\libldif.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "liblutil"=..\..\libraries\liblutil\liblutil.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + Package=<4> {{{ }}} diff --git a/libraries/liblber/liblber.dsp b/libraries/liblber/liblber.dsp index eb47093cc0..d4321a73d6 100644 --- a/libraries/liblber/liblber.dsp +++ b/libraries/liblber/liblber.dsp @@ -56,7 +56,7 @@ LIB32=link.exe -lib # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" +# PROP Output_Dir "..\Debug" # PROP Intermediate_Dir "Debug" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c @@ -66,7 +66,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\Debug\liblber.lib" +# ADD LIB32 /nologo !ENDIF diff --git a/libraries/libldap/libldap.dsp b/libraries/libldap/libldap.dsp index 367008fde8..c26a3a985f 100644 --- a/libraries/libldap/libldap.dsp +++ b/libraries/libldap/libldap.dsp @@ -56,7 +56,7 @@ LIB32=link.exe -lib # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" +# PROP Output_Dir "..\Debug" # PROP Intermediate_Dir "Debug" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c @@ -66,7 +66,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\Debug\libldap.lib" +# ADD LIB32 /nologo !ENDIF diff --git a/libraries/liblutil/getopt.c b/libraries/liblutil/getopt.c index 112616fdce..d1d1345a64 100644 --- a/libraries/liblutil/getopt.c +++ b/libraries/liblutil/getopt.c @@ -14,6 +14,14 @@ #include #include +#ifdef HAVE_IO_H +#include +#endif + +#ifndef STDERR_FILENO +#define STDERR_FILENO 2 +#endif + int opterr = 1; int optind = 1; int optopt; diff --git a/libraries/liblutil/liblutil.dsp b/libraries/liblutil/liblutil.dsp index 9ee414604c..59de922e50 100644 --- a/libraries/liblutil/liblutil.dsp +++ b/libraries/liblutil/liblutil.dsp @@ -56,7 +56,7 @@ LIB32=link.exe -lib # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" +# PROP Output_Dir "..\Debug" # PROP Intermediate_Dir "Debug" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c @@ -66,7 +66,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\Debug\liblutil.lib" +# ADD LIB32 /nologo !ENDIF @@ -80,6 +80,10 @@ SOURCE=.\base64.c # End Source File # Begin Source File +SOURCE=.\getopt.c +# End Source File +# Begin Source File + SOURCE=..\..\include\lutil.h # End Source File # Begin Source File From 727f6aa131b05c94108442856f04d11ecf508d03 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 20 Oct 1998 23:31:56 +0000 Subject: [PATCH 112/148] clients build under FreeBSD --- clients/fax500/faxtotpc.c | 10 ++--- clients/fax500/main.c | 31 +++++++------ clients/fax500/rp500.c | 32 ++++++------- clients/finger/main.c | 46 ++++++++++--------- clients/gopher/detach.c | 25 +++++++---- clients/gopher/go500.c | 68 +++++++++++++++------------- clients/gopher/go500gw.c | 84 ++++++++++++++++++++--------------- clients/gopher/setproctitle.c | 2 + clients/mail500/main.c | 39 +++++++++------- clients/rcpt500/cmds.c | 4 +- clients/rcpt500/help.c | 15 ++++--- clients/rcpt500/main.c | 27 +++++------ clients/rcpt500/query.c | 13 +++--- clients/rcpt500/rcpt500.h | 14 ++++-- clients/tools/ldapdelete.c | 1 - clients/ud/auth.c | 54 +++++++++++----------- clients/ud/edit.c | 14 +++--- clients/ud/find.c | 13 +++--- clients/ud/globals.c | 2 + clients/ud/group.c | 15 ++++--- clients/ud/help.c | 18 +++++--- clients/ud/main.c | 58 +++++++++++------------- clients/ud/mod.c | 16 ++++--- clients/ud/print.c | 2 + clients/ud/string_to_key.c | 2 + clients/ud/util.c | 32 +++---------- configure | 25 ++++++----- configure.in | 1 + include/ac/socket.h | 4 ++ include/ac/wait.h | 6 +++ include/ldap.h | 4 ++ include/portable.h.in | 3 ++ include/portable.h.nt | 3 ++ 33 files changed, 382 insertions(+), 301 deletions(-) diff --git a/clients/fax500/faxtotpc.c b/clients/fax500/faxtotpc.c index d4631b43e6..10d3ce2411 100644 --- a/clients/fax500/faxtotpc.c +++ b/clients/fax500/faxtotpc.c @@ -19,15 +19,13 @@ * faxtotpc() returns a pointer to a string allocated with malloc(3). */ +#include "portable.h" + #include -#include #include + #include - -#ifdef ultrix -extern char *strdup(); -#endif - +#include #define TPCDOMAIN "tpc.int" diff --git a/clients/fax500/main.c b/clients/fax500/main.c index 7481d4980e..cb458ccb3a 100644 --- a/clients/fax500/main.c +++ b/clients/fax500/main.c @@ -10,24 +10,27 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" #include -#include #include -#include -#include -#include -#include + +#include +#include +#include +#include +#include + +#ifdef HAVE_SYS_PARAM_H #include +#endif + #include -#include -#include #include -#include -#include "portable.h" #include "lber.h" #include "ldap.h" +#include #define USER 0 #define GROUP_ERRORS 1 @@ -308,7 +311,7 @@ connect_to_x500() ld->ld_sizelimit = FAX_MAXAMBIGUOUS; ld->ld_deref = LDAP_DEREF_ALWAYS; - if ( ldap_simple_bind_s( ld, FAX_BINDDN, NULL ) != LDAP_SUCCESS ) { + if ( ldap_simple_bind_s( ld, FAX_BINDDN, FAX_BIND_CRED ) != LDAP_SUCCESS ) { syslog( LOG_ALERT, "ldap_simple_bind_s failed" ); return( -1 ); } @@ -921,14 +924,14 @@ send_message( to ) char **to; { int pid; -#ifndef USE_WAITPID +#ifndef HAVE_WAITPID WAITSTATUSTYPE status; #endif /* parent */ if ( pid = fork() ) { -#ifdef USE_WAITPID +#ifdef HAVE_WAITPID waitpid( pid, (int *) NULL, 0 ); #else wait4( pid, &status, WAIT_FLAGS, 0 ); @@ -953,7 +956,7 @@ send_group( group, ngroup ) char **argv; int argc; char *iargv[7]; -#ifndef USE_WAITPID +#ifndef HAVE_WAITPID WAITSTATUSTYPE status; #endif @@ -976,7 +979,7 @@ send_group( group, ngroup ) /* parent */ if ( pid = fork() ) { -#ifdef USE_WAITPID +#ifdef HAVE_WAITPID waitpid( pid, (int *) NULL, 0 ); #else wait4( pid, &status, WAIT_FLAGS, 0 ); diff --git a/clients/fax500/rp500.c b/clients/fax500/rp500.c index 25eece609d..540554cfba 100644 --- a/clients/fax500/rp500.c +++ b/clients/fax500/rp500.c @@ -10,28 +10,30 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include + +#include +#include +#include +#include +#include + +#include + +#include +#include + #include -#include "lber.h" -#include "ldap.h" #define DEFAULT_PORT 79 #define DEFAULT_SIZELIMIT 50 int debug; -char *ldaphost = LDAPHOST; -char *base = DEFAULT_BASE; +char *ldaphost = LDAPHOST; +char *base = RP_BASE; int deref; int sizelimit; LDAPFiltDesc *filtd; @@ -114,7 +116,7 @@ main (argc, argv) ld->ld_sizelimit = sizelimit ? sizelimit : DEFAULT_SIZELIMIT; ld->ld_deref = deref; - if ( ldap_simple_bind_s( ld, RP_BINDDN, NULL ) != LDAP_SUCCESS ) { + if ( ldap_simple_bind_s( ld, RP_BINDDN, RP_BIND_CRED ) != LDAP_SUCCESS ) { fprintf( stderr, "X.500 is temporarily unavailable.\n" ); ldap_perror( ld, "ldap_simple_bind_s" ); exit( -1 ); diff --git a/clients/finger/main.c b/clients/finger/main.c index 38c8dfc769..d9ce474fdb 100644 --- a/clients/finger/main.c +++ b/clients/finger/main.c @@ -10,31 +10,27 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + #include "lber.h" #include "ldap.h" #include "disptmpl.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef aix -#include -#endif /* aix */ -#include -#include "portable.h" + #include "ldapconfig.h" -#ifdef USE_SYSCONF -#include -#endif /* USE_SYSCONF */ int dosyslog = 1; char *ldaphost = LDAPHOST; @@ -166,7 +162,9 @@ static do_query() ld->ld_sizelimit = FINGER_SIZELIMIT; ld->ld_deref = deref; - if ( ldap_simple_bind_s( ld, FINGER_BINDDN, NULL ) != LDAP_SUCCESS ) { + if ( ldap_simple_bind_s( ld, FINGER_BINDDN, FINGER_BIND_CRED ) + != LDAP_SUCCESS ) + { fprintf( stderr, FINGER_UNAVAILABLE ); ldap_perror( ld, "ldap_simple_bind_s" ); exit( 1 ); @@ -178,6 +176,12 @@ static do_query() tblsize = getdtablesize(); #endif /* USE_SYSCONF */ +#ifdef FD_SETSIZE + if (tblsize > FD_SETSIZE) { + tblsize = FD_SETSIZE; + } +#endif /* FD_SETSIZE*/ + timeout.tv_sec = FINGER_TIMEOUT; timeout.tv_usec = 0; FD_ZERO( &readfds ); diff --git a/clients/gopher/detach.c b/clients/gopher/detach.c index f543cc3060..ce327fef20 100644 --- a/clients/gopher/detach.c +++ b/clients/gopher/detach.c @@ -10,28 +10,35 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include -#include +#include + #include #include #include -#include -#include "portable.h" -#ifdef USE_SYSCONF -#include -#endif /* USE_SYSCONF */ +#include detach( debug ) int debug; { int i, sd, nbits; -#ifdef USE_SYSCONF +#if defined( HAVE_SYSCONF ) nbits = sysconf( _SC_OPEN_MAX ); -#else /* USE_SYSCONF */ +#elif defined( HAVE_GETDTABLESIZE ) nbits = getdtablesize(); -#endif /* USE_SYSCONF */ +#else + nbits = 32; +#endif + +#ifdef FD_SETSIZE + if (nbits > FD_SETSIZE) { + nbits = FD_SETSIZE; + } +#endif /* FD_SETSIZE*/ if ( debug == 0 || !(isatty( 1 )) ) { for ( i = 0; i < 5; i++ ) { diff --git a/clients/gopher/go500.c b/clients/gopher/go500.c index 333787677a..aef3ea376d 100644 --- a/clients/gopher/go500.c +++ b/clients/gopher/go500.c @@ -10,33 +10,30 @@ * is provided ``as is'' without express or implied warranty. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef aix -#include -#endif /* aix */ -#include #include "portable.h" + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#ifdef HAVE_SYS_PARAM_H +#include +#endif + +#include + #include "ldapconfig.h" #include "lber.h" #include "ldap.h" #include "disptmpl.h" -#ifdef USE_SYSCONF -#include -#endif /* USE_SYSCONF */ - int debug; int dosyslog; int inetd; @@ -52,7 +49,7 @@ char myhost[MAXHOSTNAMELEN]; int myport; static set_socket(); -static SIG_FN wait4child(); +static RETSIGTYPE wait4child(); static do_queries(); static do_error(); static do_search(); @@ -78,7 +75,7 @@ char **argv; struct hostent *hp; struct sockaddr_in from; int fromlen; - SIG_FN wait4child(); + RETSIGTYPE wait4child(); extern char *optarg; extern char **Argv; extern int Argc; @@ -146,6 +143,13 @@ char **argv; dtblsize = getdtablesize(); #endif /* USE_SYSCONF */ +#ifdef FD_SETSIZE + if (dtblsize > FD_SETSIZE) { + dtblsize = FD_SETSIZE; + } +#endif /* FD_SETSIZE*/ + + /* detach if stderr is redirected or no debugging */ if ( inetd == 0 ) (void) detach( debug ); @@ -292,18 +296,22 @@ int port; return( s ); } -static SIG_FN +static RETSIGTYPE wait4child() { +#ifndef HAVE_WAITPID WAITSTATUSTYPE status; +#endif if ( debug ) printf( "parent: catching child status\n" ); -#ifdef USE_WAITPID + +#ifdef HAVE_WAITPID while (waitpid ((pid_t) -1, 0, WAIT_FLAGS) > 0) -#else /* USE_WAITPID */ - while ( wait3( &status, WAIT_FLAGS, 0 ) > 0 ) -#endif /* USE_WAITPID */ - ; /* NULL */ + ; /* NULL */ +#else + while ( wait3( &status, WAIT_FLAGS, 0 ) > 0 ) + ; /* NULL */ +#endif (void) signal( SIGCHLD, (void *) wait4child ); } @@ -372,7 +380,7 @@ int s; } ld->ld_deref = GO500_DEREF; - if ( (rc = ldap_simple_bind_s( ld, GO500_BINDDN, NULL )) + if ( (rc = ldap_simple_bind_s( ld, GO500_BINDDN, GO500_BIND_CRED )) != LDAP_SUCCESS ) { fprintf(fp, "0An error occurred (explanation)\t@%d\t%s\t%d\r\n", diff --git a/clients/gopher/go500gw.c b/clients/gopher/go500gw.c index 7f74fbf57c..725d2b1c53 100644 --- a/clients/gopher/go500gw.c +++ b/clients/gopher/go500gw.c @@ -10,32 +10,30 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +#ifdef HAVE_SYS_PARAM_H +#include +#endif + #include "lber.h" #include "ldap.h" #include "disptmpl.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef aix -#include -#endif /* aix */ -#include "portable.h" -#include "ldapconfig.h" -#ifdef USE_SYSCONF -#include -#endif /* USE_SYSCONF */ +#include "ldapconfig.h" int debug; int dosyslog; @@ -52,7 +50,7 @@ char *friendlyfile = FRIENDLYFILE; int rdncount = GO500GW_RDNCOUNT; static set_socket(); -static SIG_FN wait4child(); +static RETSIGTYPE wait4child(); static do_queries(); static do_menu(); static do_list(); @@ -85,7 +83,7 @@ char **argv; struct hostent *hp; struct sockaddr_in from; int fromlen; - SIG_FN wait4child(); + RETSIGTYPE wait4child(); extern char *optarg; extern char **Argv; extern int Argc; @@ -150,11 +148,21 @@ char **argv; } } -#ifdef USE_SYSCONF +#ifdef HAVE_SYSCONF dtblsize = sysconf( _SC_OPEN_MAX ); -#else /* USE_SYSCONF */ +#elif HAVE_GETDTABLESIZE dtblsize = getdtablesize(); -#endif /* USE_SYSCONF */ +#else + dtblsize = 32; +#endif + +#ifdef FD_SETSIZE + if ( dtblsize > FD_SETSIZE ) { + dtblsize = FD_SETSIZE; + } +#endif /* FD_SETSIZE*/ + + #ifdef GO500GW_HOSTNAME strcpy( myhost, GO500GW_HOSTNAME ); @@ -314,18 +322,22 @@ int port; return( s ); } -static SIG_FN +static RETSIGTYPE wait4child() { - WAITSTATUSTYPE status; +#ifndef HAVE_WAITPID + WAITSTATUSTYPE status; +#endif - if ( debug ) printf( "parent: catching child status\n" ); -#ifdef USE_WAITPID - while (waitpid ((pid_t) -1, 0, WAIT_FLAGS) > 0) -#else /* USE_WAITPID */ - while ( wait3( &status, WAIT_FLAGS, 0 ) > 0 ) -#endif /* USE_WAITPID */ - ; /* NULL */ + if ( debug ) printf( "parent: catching child status\n" ); + +#ifdef HAVE_WAITPID + while (waitpid ((pid_t) -1, NULL, WAIT_FLAGS) > 0) + ; /* NULL */ +#else + while (wait3( &status, WAIT_FLAGS, 0 ) > 0 ) + ; /* NULL */ +#endif (void) signal( SIGCHLD, (void *) wait4child ); } diff --git a/clients/gopher/setproctitle.c b/clients/gopher/setproctitle.c index 26b42c0cee..1d1ae3b6d2 100644 --- a/clients/gopher/setproctitle.c +++ b/clients/gopher/setproctitle.c @@ -10,6 +10,8 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + char **Argv; /* pointer to original (main's) argv */ int Argc; /* original argc */ diff --git a/clients/mail500/main.c b/clients/mail500/main.c index 5fdea96201..534eb0111d 100644 --- a/clients/mail500/main.c +++ b/clients/mail500/main.c @@ -10,19 +10,24 @@ * is provided ``as is'' without express or implied warranty. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include "portable.h" +#include +#include + +#include +#include +#include +#include + +#ifdef HAVE_SYS_PARAM_H +#include +#endif + +#include + +#include + #include "lber.h" #include "ldap.h" #include "ldapconfig.h" @@ -1029,7 +1034,7 @@ send_message( to ) char **to; { int pid; -#ifndef USE_WAITPID +#ifndef HAVE_WAITPID WAITSTATUSTYPE status; #endif @@ -1048,7 +1053,7 @@ send_message( to ) /* parent */ if ( pid = fork() ) { -#ifdef USE_WAITPID +#ifdef HAVE_WAITPID waitpid( pid, (int *) NULL, 0 ); #else wait4( pid, &status, WAIT_FLAGS, 0 ); @@ -1073,7 +1078,7 @@ send_group( group, ngroup ) char **argv; int argc; char *iargv[7]; -#ifndef USE_WAITPID +#ifndef HAVE_WAITPID WAITSTATUSTYPE status; #endif @@ -1108,7 +1113,7 @@ send_group( group, ngroup ) /* parent */ if ( pid = fork() ) { -#ifdef USE_WAITPID +#ifdef HAVE_WAITPID waitpid( pid, (int *) NULL, 0 ); #else wait4( pid, &status, WAIT_FLAGS, 0 ); @@ -1136,7 +1141,7 @@ send_errors( err, nerr ) int fd[2]; char *argv[8]; char buf[1024]; -#ifndef USE_WAITPID +#ifndef HAVE_WAITPID WAITSTATUSTYPE status; #endif @@ -1255,7 +1260,7 @@ send_errors( err, nerr ) } fclose( fp ); -#ifdef USE_WAITPID +#ifdef HAVE_WAITPID waitpid( pid, (int *) NULL, 0 ); #else wait4( pid, &status, WAIT_FLAGS, 0 ); diff --git a/clients/rcpt500/cmds.c b/clients/rcpt500/cmds.c index fe89309567..8b5a938f2e 100644 --- a/clients/rcpt500/cmds.c +++ b/clients/rcpt500/cmds.c @@ -6,7 +6,9 @@ * All Rights Reserved */ -#include +#include "portable.h" + +#include #include "rcpt500.h" struct command cmds[] = { diff --git a/clients/rcpt500/help.c b/clients/rcpt500/help.c index 0f541ab9be..b789da2343 100644 --- a/clients/rcpt500/help.c +++ b/clients/rcpt500/help.c @@ -6,12 +6,17 @@ * All Rights Reserved */ -#include -#include -#include -#include - #include "portable.h" + +#include + +#include +#include + +#ifdef HAVE_FCNTL_H +#include +#endif + #include "ldapconfig.h" #include "rcpt500.h" diff --git a/clients/rcpt500/main.c b/clients/rcpt500/main.c index 3e65ac233b..b29920ff40 100644 --- a/clients/rcpt500/main.c +++ b/clients/rcpt500/main.c @@ -6,24 +6,24 @@ * All Rights Reserved */ +#include "portable.h" + #include #include -#include -#include #include -#include "portable.h" +#include +#include + + #include "ldapconfig.h" #include "rcpt500.h" -#ifdef ultrix -extern char *strdup(); -#endif - int dosyslog = 0; -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS int do_cldap = 0; -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ + int derefaliases = 1; int sizelimit = RCPT500_SIZELIMIT; int rdncount = RCPT500_RDNCOUNT; @@ -78,11 +78,12 @@ main( argc, argv ) dosyslog = 1; break; case 'U': -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS do_cldap = 1; -#else /* CLDAP */ - fprintf( stderr, "Compile with -DCLDAP for -U support\n" ); -#endif /* CLDAP */ +#else /* LDAP_CONNECTIONLESS */ + fprintf( stderr, + "Compile with -DLDAP_CONNECTIONLESS for -U support\n" ); +#endif /* LDAP_CONNECTIONLESS */ break; case 'b': searchbase = optarg; diff --git a/clients/rcpt500/query.c b/clients/rcpt500/query.c index 1ac78c17c9..4ba778a1bd 100644 --- a/clients/rcpt500/query.c +++ b/clients/rcpt500/query.c @@ -6,18 +6,21 @@ * All Rights Reserved */ +#include "portable.h" + #include -#include -#include #include -#include + +#include +#include +#include #include "lber.h" #include "ldap.h" -#include "portable.h" -#include "ldapconfig.h" #include "disptmpl.h" + #include "rcpt500.h" +#include "ldapconfig.h" extern int dosyslog; extern int do_cldap; diff --git a/clients/rcpt500/rcpt500.h b/clients/rcpt500/rcpt500.h index 537f92c1c4..8b3a5ea17d 100644 --- a/clients/rcpt500/rcpt500.h +++ b/clients/rcpt500/rcpt500.h @@ -6,6 +6,10 @@ * All Rights Reserved */ +#include + +LDAP_BEGIN_DECL + struct msginfo { char *msg_subject; char *msg_replyto; /* actually could be from From: line */ @@ -16,8 +20,8 @@ struct msginfo { }; struct command { - char *cmd_text; /* text for command, e.g. "HELP" */ - int (*cmd_handler)(); /* pointer to handler function */ + char *cmd_text; /* text for command, e.g. "HELP" */ + int (*cmd_handler)LDAP_P(()); /* pointer to handler function */ }; @@ -27,10 +31,12 @@ struct command { /* * functions */ -int help_cmd(); -int query_cmd(); +int help_cmd LDAP_P(()); +int query_cmd LDAP_P(()); /* * externs */ extern struct command cmds[]; + +LDAP_END_DECL diff --git a/clients/tools/ldapdelete.c b/clients/tools/ldapdelete.c index 49c1763e12..36a325c850 100644 --- a/clients/tools/ldapdelete.c +++ b/clients/tools/ldapdelete.c @@ -8,7 +8,6 @@ #include #include -#include #include #include diff --git a/clients/ud/auth.c b/clients/ud/auth.c index be4727695b..a245a05f13 100644 --- a/clients/ud/auth.c +++ b/clients/ud/auth.c @@ -10,18 +10,21 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include #include -#include +#include #include + +#include +#include + #include #include #include + #include "ud.h" -#ifdef KERBEROS -#include -#include -#endif extern LDAP *ld; /* our LDAP descriptor */ extern int verbose; /* verbosity indicator */ @@ -48,7 +51,7 @@ int implicit; int name_provided; /* was a name passed in? */ struct passwd *pw; /* for getting user id */ char uidname[20]; -#ifdef KERBEROS +#ifdef HAVE_KERBEROS char **krbnames; /* for kerberos names */ int kinited, ikrb; char buf[5]; @@ -130,7 +133,7 @@ int implicit; rdns = ldap_explode_dn(Entry.DN, TRUE); printf(" Authenticating to the directory as \"%s\"...\n", *rdns ); -#ifdef KERBEROS +#ifdef HAVE_KERBEROS /* * First, if the user has a choice of auth methods, ask which * one they want to use. if they want kerberos, ask which @@ -155,7 +158,7 @@ int implicit; if ( hassimple && !kinited ) { printf(" Which password would you like to use?\n"); - printf(" 1 -> X.500 password\n"); + printf(" 1 -> LDAP password\n"); #ifdef UOFM printf(" 2 -> UMICH password (aka Uniqname or Kerberos password)\n"); #else @@ -221,7 +224,7 @@ int implicit; } else { #endif authmethod = LDAP_AUTH_SIMPLE; - sprintf(prompt, " Enter your X.500 password: "); + sprintf(prompt, " Enter your LDAP password: "); do { passwd = mygetpass(prompt); } while (passwd != NULL && *passwd == '\0'); @@ -229,7 +232,7 @@ int implicit; (void) ldap_value_free(rdns); return(0); } -#ifdef KERBEROS +#ifdef HAVE_KERBEROS } (void) ldap_value_free(krbnames); #endif @@ -239,19 +242,19 @@ int implicit; if (ld->ld_errno == LDAP_NO_SUCH_ATTRIBUTE) fprintf(stderr, " Entry has no password\n"); else if (ld->ld_errno == LDAP_INVALID_CREDENTIALS) -#ifdef KERBEROS +#ifdef HAVE_KERBEROS if ( authmethod == LDAP_AUTH_KRBV4 ) { fprintf(stderr, " The Kerberos credentials are invalid.\n"); } else { #endif fprintf(stderr, " The password you provided is incorrect.\n"); -#ifdef KERBEROS +#ifdef HAVE_KERBEROS } #endif else ldap_perror(ld, "ldap_bind_s" ); (void) ldap_bind_s(ld, default_bind_object, - (char *) UD_PASSWD, LDAP_AUTH_SIMPLE); + (char *) UD_BIND_CRED, LDAP_AUTH_SIMPLE); if (default_bind_object == NULL) set_bound_dn(NULL); else @@ -274,12 +277,12 @@ int implicit; return(0); } -#ifdef KERBEROS +#ifdef HAVE_KERBEROS #define FIVEMINS ( 5 * 60 ) #define TGT "krbtgt" -str2upper( s ) +static void str2upper( s ) char *s; { char *p; @@ -307,12 +310,12 @@ static valid_tgt( names ) return( 0 ); } -#ifdef AFSKERBEROS +#ifdef HAVE_AFS_KERBEROS /* * realm must be uppercase for krb_ routines */ str2upper( realm ); -#endif /* AFSKERBEROS */ +#endif /* HAVE_AFS_KERBEROS */ /* * check ticket file for a valid ticket granting ticket @@ -351,7 +354,7 @@ krbgetpass( user, inst, realm, pw, key ) return(-1); } -#ifdef AFSKERBEROS +#ifdef HAVE_AFS_KERBEROS strcpy( lcrealm, realm ); for ( p = lcrealm; *p != '\0'; ++p ) { if ( isupper( *p )) { @@ -360,9 +363,9 @@ krbgetpass( user, inst, realm, pw, key ) } ka_StringToKey( passwd, lcrealm, key ); -#else /* AFSKERBEROS */ +#else /* HAVE_AFS_KERBEROS */ string_to_key( passwd, key ); -#endif /* AFSKERBEROS */ +#endif /* HAVE_AFS_KERBEROS */ return( 0 ); } @@ -382,12 +385,12 @@ static kinit( kname ) return( -1 ); } -#ifdef AFSKERBEROS +#ifdef HAVE_AFS_KERBEROS /* * realm must be uppercase for krb_ routines */ str2upper( realm ); -#endif /* AFSKERBEROS */ +#endif /* HAVE_AFS_KERBEROS */ rc = krb_get_in_tkt( name, inst, realm, TGT, realm, DEFAULT_TKT_LIFE, krbgetpass, NULL, NULL ); @@ -407,7 +410,7 @@ static kinit( kname ) return( 0 ); } -destroy_tickets() +void destroy_tickets(void) { if ( *tktpath != '\0' ) { unlink( tktpath ); @@ -415,13 +418,12 @@ destroy_tickets() } #endif -static void set_bound_dn(s) -char *s; +static void set_bound_dn(char *s) { extern void Free(); extern char *bound_dn; if (bound_dn != NULL) Free(bound_dn); - bound_dn = strdup(s); + bound_dn = (s == NULL) ? NULL : strdup(s); } diff --git a/clients/ud/edit.c b/clients/ud/edit.c index eb8969c533..d9458e0db2 100644 --- a/clients/ud/edit.c +++ b/clients/ud/edit.c @@ -10,14 +10,18 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include #include -#include -#include -#include -#include -#include #include + +#include +#include +#include + +#include + #include #include #include diff --git a/clients/ud/find.c b/clients/ud/find.c index 3551c1af6d..960fa0f337 100644 --- a/clients/ud/find.c +++ b/clients/ud/find.c @@ -10,14 +10,17 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include -#include #include -#ifndef __STDC__ -#include -#endif + +#include +#include + #include #include + #include "ud.h" extern char *search_base; /* search base */ @@ -224,7 +227,7 @@ int quiet; } else if (matches == 1) { if (ldap_search_s(ld, ldap_get_dn(ld, ldap_first_entry(ld, res)), LDAP_SCOPE_BASE, "objectClass=*", read_attrs, FALSE, &res) != LDAP_SUCCESS) { if (ld->ld_errno == LDAP_UNAVAILABLE) - printf(" Could not contact the X.500 server to find \"%s\".\n", who); + printf(" Could not contact the LDAP server to find \"%s\".\n", who); else ldap_perror(ld, "ldap_search_s"); return(NULL); diff --git a/clients/ud/globals.c b/clients/ud/globals.c index 121f36be21..cbde607652 100644 --- a/clients/ud/globals.c +++ b/clients/ud/globals.c @@ -10,6 +10,8 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include #include "ud.h" diff --git a/clients/ud/group.c b/clients/ud/group.c index 64006170eb..c628e94083 100644 --- a/clients/ud/group.c +++ b/clients/ud/group.c @@ -11,10 +11,15 @@ * */ +#include "portable.h" + #include #include +#include + #include #include + #include #include "ud.h" @@ -175,7 +180,7 @@ char *name; #endif /* - * Now add this to the X.500 Directory. + * Now add this to the LDAP Directory. */ if (ldap_add_s(ld, dn, attrs) != 0) { ldap_perror(ld, " ldap_add_s"); @@ -225,7 +230,7 @@ char *name; return; /* - * Now remove this from the X.500 Directory. + * Now remove this from the LDAP Directory. */ if (ldap_delete_s(ld, dn) != 0) { if (ld->ld_errno == LDAP_INSUFFICIENT_ACCESS) @@ -452,7 +457,7 @@ char *group; } /* - * Add the X.500 style names. + * Add the LDAP style names. */ if (count_x500 > 0) { mods[0] = &mod; @@ -562,7 +567,7 @@ char *group; vp = Entry.attrs[attr_to_index("member")].values; if (vp == NULL) { if (verbose) - printf(" \"%s\" has no X.500 members. There is nothing to purge.\n", group); + printf(" \"%s\" has no LDAP members. There is nothing to purge.\n", group); return; } for (; *vp != NULL; vp++) { @@ -805,7 +810,7 @@ int offset; } if (verbose) { printf("\n"); - format("Values may be specified as a name (which is then looked up in the X.500 Directory) or as a domain-style (i.e., user@domain) e-mail address. Simply hit the RETURN key at the prompt when finished.\n", 75, 2); + format("Values may be specified as a name (which is then looked up in the LDAP Directory) or as a domain-style (i.e., user@domain) e-mail address. Simply hit the RETURN key at the prompt when finished.\n", 75, 2); printf("\n"); } diff --git a/clients/ud/help.c b/clients/ud/help.c index 5a1ff231e0..381a8958b7 100644 --- a/clients/ud/help.c +++ b/clients/ud/help.c @@ -10,11 +10,17 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include #include -#include + +#include +#include + #include #include + #include "ud.h" #ifdef DEBUG @@ -88,7 +94,7 @@ char *s; format("should be specified as a ordinary name (e.g., 'Friends of maX500').", 75, 15); printf("\n"); printf(" [where] A place in the Directory needs to be specified. This name\n"); - format("should be specified as an X.500-style name (e.g., 'ou=people, o=University of Michigan, c=United States of America'). In most cases, it is easier to omit the [where] and allow the program to guide you.", 75, 15); + format("should be specified as an LDAP-style name (e.g., 'ou=people, o=University of Michigan, c=United States of America'). In most cases, it is easier to omit the [where] and allow the program to guide you.", 75, 15); printf("\n"); printf(" [who] A person in the Directory needs to be specified. This name\n"); format("can be specified as either a ordinary name (e.g., 'Jane Doe'), or as some other identifying characteristic (e.g., 'uid=babs').", 75, 15); @@ -111,7 +117,7 @@ char *s; } else if (!strncasecmp("groupbase", s, len)) { printf(" groupbase [where]\n\n"); - format("The syntax and use of this command is identical to the more commonly used 'cb' command. This command sets the base which is used to create groups in the X.500 Directory. Setting the base to a certain value does not necessarily grant the person write-access to that part of the Directory in order to successfully create a group.", 75, 2); + format("The syntax and use of this command is identical to the more commonly used 'cb' command. This command sets the base which is used to create groups in the LDAP Directory. Setting the base to a certain value does not necessarily grant the person write-access to that part of the Directory in order to successfully create a group.", 75, 2); } else if (!strncasecmp("cd", s, len) || !strncasecmp("cb", s,len)) { printf(" cb [where]\n"); @@ -125,7 +131,7 @@ char *s; printf("\n * cb default\n\n"); format("sets the search base to its original default value.", 75, 2); printf("\n * cb o=Merit Computer Network, c=US\n\n"); - format("sets the search base to organization given, the Merit Computer Network in this case. This comamnd checks the validity of the specified search base, and rejects it if it is not a valid Distinguished Name (DN). A DN uniquely identifies a portion of the global X.500 namespace.", 75, 2); + format("sets the search base to organization given, the Merit Computer Network in this case. This comamnd checks the validity of the specified search base, and rejects it if it is not a valid Distinguished Name (DN). A DN uniquely identifies a portion of the global LDAP namespace.", 75, 2); } else if (!strncasecmp("quit", s, len) || !strncasecmp("stop",s, len)) { printf(" quit\n"); @@ -145,7 +151,7 @@ char *s; else if (!strncasecmp("modify", s, len) || !strncasecmp("change", s, len)) { printf(" modify [entry]\n"); printf(" change [entry]\n\n"); - format("Changes information associated with an entry in the X.500 Directory. 'change' is an alias for 'modify'.", 75, 2); + format("Changes information associated with an entry in the LDAP Directory. 'change' is an alias for 'modify'.", 75, 2); } else if (!strncasecmp("verbose", s, len)) { printf(" verbose\n\n"); @@ -182,7 +188,7 @@ char *s; } else if (!strncasecmp("tidy", s, len)) { printf(" tidy\n\n"); - format("Unsubscribes you from non-existent groups. Useful when you cannot resign from a group because, while your X.500 entry still contains a pointer to it, someone has removed a group of which you were a subscriber.", 75, 2); + format("Unsubscribes you from non-existent groups. Useful when you cannot resign from a group because, while your LDAP entry still contains a pointer to it, someone has removed a group of which you were a subscriber.", 75, 2); } else if (*s == '?') { format("Prints out a brief description of each command. Same as typing 'help help'.", 75, 2); diff --git a/clients/ud/main.c b/clients/ud/main.c index cb2030c283..3bab4f83b9 100644 --- a/clients/ud/main.c +++ b/clients/ud/main.c @@ -16,34 +16,26 @@ * Simon Fraser University, Academic Computing Services */ +#include "portable.h" + #include -#include -#if defined(NeXT) #include -#include -#else NeXT -#include -#endif NeXT -#include -#include -#ifndef DOS -#if defined( NeXT ) || defined( ultrix ) || defined( osf1 ) || (defined(SunOS) && SunOS < 40) -#include -#else /* defined( NeXT ) || defined( ultrix ) etc. */ -#include -#endif /* defined( NeXT ) || defined( ultrix ) etc. */ -#endif /* !DOS */ -#if defined( aix ) || defined( __NetBSD__ ) -#include -#endif /* aix || __NetBSD__ */ -#include #include #include -#include +#include + +#include +#include +#include +#include + +#ifdef HAVE_SYS_FILE_H +#include +#endif + #include #include #include -#include "portable.h" #include "ud.h" #ifndef lint @@ -68,8 +60,8 @@ static int dereference = TRUE; char *default_bind_object = UD_BINDDN; char *bound_dn; /* bound user's Distinguished Name */ -char *group_base; /* place in X.500 tree where groups are */ -char *search_base; /* place in X.500 tree where searches start */ +char *group_base; /* place in LDAP tree where groups are */ +char *search_base; /* place in LDAP tree where searches start */ static jmp_buf env; /* spot to jump to on an interrupt */ @@ -374,7 +366,7 @@ char **base, *s; } /* - * User wants to ascend one level in the X.500 tree. + * User wants to ascend one level in the LDAP tree. * Easy: Just strip off the first element of the * current search base, unless it's the root, in * which case we just do nothing. @@ -540,7 +532,7 @@ initialize_client() char *term; /* for tty set-up */ char *config; /* config file to use */ static char bp[1024]; /* for tty set-up */ - extern SIG_FN attn(); /* ^C signal handler */ + extern RETSIGTYPE attn(); /* ^C signal handler */ extern char *getenv(); extern void Free(); @@ -627,13 +619,13 @@ initialize_client() * because we want to be sure to use TCP, not UDP. */ if ((ld = ldap_open(server, ldap_port)) == NULL) { - fprintf(stderr, " The X.500 Directory is temporarily unavailable. Please try again later.\n"); + fprintf(stderr, " The LDAP Directory is temporarily unavailable. Please try again later.\n"); exit(0); /* NOTREACHED */ } - if (ldap_bind_s(ld, (char *) default_bind_object, (char *) UD_PASSWD, + if (ldap_bind_s(ld, (char *) default_bind_object, (char *) UD_BIND_CRED, LDAP_AUTH_SIMPLE) != LDAP_SUCCESS) { - fprintf(stderr, " The X.500 Directory is temporarily unavailable. Please try again later.\n"); + fprintf(stderr, " The LDAP Directory is temporarily unavailable. Please try again later.\n"); if (ld->ld_errno != LDAP_UNAVAILABLE) ldap_perror(ld, " ldap_bind_s"); exit(0); @@ -667,10 +659,10 @@ initialize_client() (void) signal(SIGINT, attn); -#if !defined(DOS) && !defined(NOTERMCAP) +#ifndef NO_TERMCAP { struct winsize win; /* for tty set-up */ - extern SIG_FN chwinsz(); /* WINSZ signal handler */ + extern RETSIGTYPE chwinsz(); /* WINSZ signal handler */ if (((term = getenv("TERM")) == NULL) || (tgetent(bp, term) <= 0)) return; @@ -696,7 +688,7 @@ initialize_client() #endif } -SIG_FN attn() +RETSIGTYPE attn() { fflush(stderr); fflush(stdout); @@ -707,8 +699,8 @@ SIG_FN attn() longjmp(env, 1); } -#if !defined(DOS) && !defined(NOTERMCAP) -SIG_FN chwinsz() +#ifndef NO_TERMCAP +RETSIGTYPE chwinsz() { struct winsize win; diff --git a/clients/ud/mod.c b/clients/ud/mod.c index ef7099e948..551941800d 100644 --- a/clients/ud/mod.c +++ b/clients/ud/mod.c @@ -10,15 +10,19 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include #include #include -#include -#include +#include #ifndef __STDC__ #include #endif #include + +#include +#include #include "ud.h" extern struct entry Entry; @@ -109,7 +113,7 @@ char *who; if (verbose && !printed_warning && (ld->ld_errno == LDAP_NO_SUCH_ATTRIBUTE)) { printed_warning = 1; printf("\n WARNING!\n"); - printf(" You are about to make a modification to an X.500 entry\n"); + printf(" You are about to make a modification to an LDAP entry\n"); printf(" that has its \"automatic updates\" field set to ON.\n"); printf(" This means that the entry will be automatically updated\n"); printf(" each month from official University sources like the\n"); @@ -481,7 +485,7 @@ mail_is_good: if (lmp == (LDAPMessage *) NULL) { printf(" Could not find \"%s\" in the Directory\n", line); if (verbose) - format("Owners of groups must be valid entries in the X.500 Directory. The name you have typed above could not be found in the X.500 Directory.", 72, 2); + format("Owners of groups must be valid entries in the LDAP Directory. The name you have typed above could not be found in the LDAP Directory.", 72, 2); return(NULL); } elmp = ldap_first_entry(ld, lmp); @@ -620,9 +624,9 @@ char *who; if (verbose) { printf("\n By default, updates that are received from the Personnel\n"); printf(" Office and the Office of the Registrar are applied to all\n"); - printf(" entries in the X.500 database each month. Sometimes this\n"); + printf(" entries in the LDAP database each month. Sometimes this\n"); printf(" feature is undesirable. For example, if you maintain your\n"); - printf(" entry in the X.500 database manually, you may not want to\n"); + printf(" entry in the LDAP database manually, you may not want to\n"); printf(" have these updates applied to your entry, possibly overwriting\n"); printf(" correct information with out-dated information.\n\n"); } diff --git a/clients/ud/print.c b/clients/ud/print.c index 4185bdaef3..7eafd315b5 100644 --- a/clients/ud/print.c +++ b/clients/ud/print.c @@ -10,6 +10,8 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include #include #include diff --git a/clients/ud/string_to_key.c b/clients/ud/string_to_key.c index f1adfa8f0a..cea78a7a6c 100644 --- a/clients/ud/string_to_key.c +++ b/clients/ud/string_to_key.c @@ -1,3 +1,5 @@ +#include "portable.h" + #if defined(KERBEROS) && !defined(openbsd) /* * $Source: /repo/OpenLDAP/pkg/ldap/clients/ud/string_to_key.c,v $ diff --git a/clients/ud/util.c b/clients/ud/util.c index 0e6dda6ccc..c7fc697dbd 100644 --- a/clients/ud/util.c +++ b/clients/ud/util.c @@ -10,45 +10,25 @@ * is provided ``as is'' without express or implied warranty. */ -#define DISABLE_BRIDGE #include "portable.h" #include #include -#include +#include #include -#ifdef DOS -#include -#endif -#include -#if defined( NeXT ) -#endif -#include +#include +#include #include -#include +#include +#include #include #include - #include -#if !defined(DOS) && !defined( VMS) -#include -#endif -#include "portable.h" -#ifdef USE_TERMIOS -#include -#else /* USE_TERMIOS */ -#include -#endif /* USE_TERMIOS */ - #include "ud.h" -#if defined(VMS) -#define getch getchar -#endif - #ifdef DEBUG extern int debug; #endif @@ -81,7 +61,7 @@ char *prompt; register char *p; register int c; FILE *fi; - SIG_FN (*sig)(); + RETSIGTYPE (*sig)(); #ifdef DEBUG if (debug & D_TRACE) diff --git a/configure b/configure index c4f6d6b700..2cd35bfb9a 100755 --- a/configure +++ b/configure @@ -5922,15 +5922,16 @@ for ac_func in \ strtol \ strtoul \ sysconf \ + waitpid \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5929: checking for $ac_func" >&5 +echo "configure:5930: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5981,12 +5982,12 @@ done for ac_func in getopt strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5985: checking for $ac_func" >&5 +echo "configure:5986: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6039,13 +6040,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:6043: checking declaration of sys_errlist" >&5 +echo "configure:6044: 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 < @@ -6055,7 +6056,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:6059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -6076,20 +6077,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:6080: checking existence of sys_errlist" >&5 +echo "configure:6081: 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 < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:6093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index 0b5967cc63..725008a5e8 100644 --- a/configure.in +++ b/configure.in @@ -755,6 +755,7 @@ AC_CHECK_FUNCS( \ strtol \ strtoul \ sysconf \ + waitpid \ ) AC_REPLACE_FUNCS(getopt strdup) diff --git a/include/ac/socket.h b/include/ac/socket.h index 573601ea60..d6a3405702 100644 --- a/include/ac/socket.h +++ b/include/ac/socket.h @@ -12,6 +12,10 @@ #ifdef HAVE_SYS_SOCKET_H #include +#ifdef HAVE_SYS_SELECT_H +#include +#endif + #include #include #include diff --git a/include/ac/wait.h b/include/ac/wait.h index 274dddd5f5..af2eb5b18a 100644 --- a/include/ac/wait.h +++ b/include/ac/wait.h @@ -16,4 +16,10 @@ # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif +#ifdef WCONTINUED +# define WAIT_FLAGS ( WNOHANG | WUNTRACED | WCONTINUED ) +#else +# define WAIT_FLAGS ( WNOHANG | WUNTRACED ) +#endif + #endif /* _AC_WAIT_H */ diff --git a/include/ldap.h b/include/ldap.h index acb1d50ae7..605356408d 100644 --- a/include/ldap.h +++ b/include/ldap.h @@ -501,6 +501,10 @@ typedef struct ldap_url_desc { #define LDAP_URL_ERR_BADSCOPE 3 /* URL scope string is invalid */ #define LDAP_URL_ERR_MEM 4 /* can't allocate memory space */ +/* this typedef is never used, only exists to rid of declaration + in function param list warning */ +typedef struct timeval LDAPtv; + /* * in abandon.c: */ diff --git a/include/portable.h.in b/include/portable.h.in index dd1f58b804..67a861f055 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -306,6 +306,9 @@ is provided ``as is'' without express or implied warranty. /* Define if you have the sysconf function. */ #undef HAVE_SYSCONF +/* Define if you have the waitpid function. */ +#undef HAVE_WAITPID + /* Define if you have the header file. */ #undef HAVE_DB_H diff --git a/include/portable.h.nt b/include/portable.h.nt index 0dc0aac5de..b81d8d1656 100644 --- a/include/portable.h.nt +++ b/include/portable.h.nt @@ -319,6 +319,9 @@ typedef char * caddr_t; /* Define if you have the sysconf function. */ /* #undef HAVE_SYSCONF */ +/* Define if you have the waitpid function. */ +#define HAVE_WAITPID 1 + /* Define if you have the header file. */ /* #undef HAVE_DB_H */ From 23f5d115de92232e0b69e3df5dc4b4227a250b2a Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 20 Oct 1998 23:40:36 +0000 Subject: [PATCH 113/148] Add generic headers --- include/ac/krb.h | 21 +++++++++++++++++++++ include/ac/syslog.h | 20 ++++++++++++++++++++ include/ac/termios.h | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 include/ac/krb.h create mode 100644 include/ac/syslog.h create mode 100644 include/ac/termios.h diff --git a/include/ac/krb.h b/include/ac/krb.h new file mode 100644 index 0000000000..d371350354 --- /dev/null +++ b/include/ac/krb.h @@ -0,0 +1,21 @@ +/* Generic krb.h */ + +#ifndef _AC_KRB_H +#define _AC_KRB_H + +#if defined( HAVE_KERBEROS ) + +#if defined( HAVE_KERBEROSIV_KRB_H ) +#include +#elif defined( HAVE_KRB_H ) +#include +#endif + +#if defined( HAVE_KERBEROSIV_DES_H ) +#include +#elif defined( HAVE_DES_H ) +#include +#endif + +#endif /* HAVE_KERBEROS */ +#endif /* _AC_KRB_H */ diff --git a/include/ac/syslog.h b/include/ac/syslog.h new file mode 100644 index 0000000000..76f8b35828 --- /dev/null +++ b/include/ac/syslog.h @@ -0,0 +1,20 @@ +/* + * Generic syslog.h + */ +#ifndef _AC_SYSLOG_H_ +#define _AC_SYSLOG_H_ + +#ifdef HAVE_SYSLOG_H +#include + +#if defined( LOG_NDELAY ) +# define OPENLOG_OPTIONS ( LOG_PID | LOG_NDELAY ) +#elif defined( LOG_NOWAIT ) +# define OPENLOG_OPTIONS ( LOG_PID | LOG_NOWAIT ) +#else +# define OPENLOG_OPTIONS ( LOG_PID ) +#endif + +#endif /* syslog.h */ + +#endif /* _AC_SYSLOG_H_ */ diff --git a/include/ac/termios.h b/include/ac/termios.h new file mode 100644 index 0000000000..f1d2118a1d --- /dev/null +++ b/include/ac/termios.h @@ -0,0 +1,32 @@ +/* Generic termios.h */ + +#ifndef _AC_TERMIOS_H +#define _AC_TERMIOS_H + +#ifdef HAVE_SGTTY_H +#include + +#ifdef HAVE_SYS_IOCTL_H +#include +#endif + +#define TERMIO_TYPE struct sgttyb +#define TERMFLAG_TYPE int +#define GETATTR( fd, tiop ) ioctl((fd), TIOCGETP, (caddr_t)(tiop)) +#define SETATTR( fd, tiop ) ioctl((fd), TIOCSETP, (caddr_t)(tiop)) +#define GETFLAGS( tio ) ((tio).sg_flags) +#define SETFLAGS( tio, flags ) ((tio).sg_flags = (flags)) + +#elif HAVE_TERMIOS_H +#include + +#define TERMIO_TYPE struct termios +#define TERMFLAG_TYPE tcflag_t +#define GETATTR( fd, tiop ) tcgetattr((fd), (tiop)) +#define SETATTR( fd, tiop ) tcsetattr((fd), TCSANOW /* 0 */, (tiop)) +#define GETFLAGS( tio ) ((tio).c_lflag) +#define SETFLAGS( tio, flags ) ((tio).c_lflag = (flags)) + +#endif /* HAVE_TERMIOS_H */ + +#endif /* _AC_TERMIOS_H */ From c7fe14a9160424bd1f01c3d8b1c34ec624041137 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 21 Oct 1998 01:23:00 +0000 Subject: [PATCH 114/148] Have code use BYTE_ORDER as before. --- libraries/liblutil/sha1.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/liblutil/sha1.c b/libraries/liblutil/sha1.c index 1104cec709..833317d708 100644 --- a/libraries/liblutil/sha1.c +++ b/libraries/liblutil/sha1.c @@ -35,12 +35,12 @@ * blk0() and blk() perform the initial expand. * I got the idea of expanding during the round function from SSLeay */ -#if WORDS_BIGENDIAN -# define blk0(i) block->l[i] -#else +#if BYTE_ORDER = LITTLE_ENDIAN # define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \ |(rol(block->l[i],8)&0x00FF00FF)) #endif +#else +# define blk0(i) block->l[i] #define blk(i) (block->l[i&15] = rol(block->l[(i+13)&15]^block->l[(i+8)&15] \ ^block->l[(i+2)&15]^block->l[i&15],1)) From b76c56ba3f45576b9c418ea9fe7f7b3440052904 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 21 Oct 1998 01:24:26 +0000 Subject: [PATCH 115/148] include portable.h --- acconfig.h | 3 + aclocal.m4 | 34 +++- configure | 157 ++++++----------- configure.in | 2 +- include/portable.h.in | 5 +- servers/slapd/abandon.c | 6 +- servers/slapd/acl.c | 2 + servers/slapd/aclparse.c | 134 ++++++++++---- servers/slapd/add.c | 2 + servers/slapd/attr.c | 2 + servers/slapd/ava.c | 2 + servers/slapd/back-ldbm/abandon.c | 2 + servers/slapd/back-ldbm/add.c | 2 + servers/slapd/back-ldbm/attr.c | 2 + servers/slapd/back-ldbm/back-ldbm.h | 15 +- servers/slapd/back-ldbm/bind.c | 2 + servers/slapd/back-ldbm/cache.c | 2 + servers/slapd/back-ldbm/close.c | 2 + servers/slapd/back-ldbm/compare.c | 2 + servers/slapd/back-ldbm/config.c | 6 + servers/slapd/back-ldbm/dbcache.c | 1 - servers/slapd/back-ldbm/delete.c | 2 + servers/slapd/back-ldbm/dn2id.c | 2 + servers/slapd/back-ldbm/filterindex.c | 2 + servers/slapd/back-ldbm/group.c | 2 + servers/slapd/back-ldbm/id2children.c | 11 ++ servers/slapd/back-ldbm/id2entry.c | 2 + servers/slapd/back-ldbm/idl.c | 1 - servers/slapd/back-ldbm/index.c | 33 ++-- servers/slapd/back-ldbm/init.c | 9 + servers/slapd/back-ldbm/kerberos.c | 2 + servers/slapd/back-ldbm/modify.c | 2 + servers/slapd/back-ldbm/modrdn.c | 2 + servers/slapd/back-ldbm/nextid.c | 2 + servers/slapd/back-ldbm/proto-back-ldbm.h | 109 ++++++------ servers/slapd/back-ldbm/search.c | 2 + servers/slapd/back-ldbm/unbind.c | 2 + servers/slapd/back-passwd/config.c | 2 + servers/slapd/back-passwd/search.c | 2 + servers/slapd/back-shell/abandon.c | 2 + servers/slapd/back-shell/add.c | 2 + servers/slapd/back-shell/bind.c | 2 + servers/slapd/back-shell/compare.c | 2 + servers/slapd/back-shell/config.c | 2 + servers/slapd/back-shell/delete.c | 2 + servers/slapd/back-shell/fork.c | 2 + servers/slapd/back-shell/init.c | 2 + servers/slapd/back-shell/modify.c | 2 + servers/slapd/back-shell/modrdn.c | 2 + servers/slapd/back-shell/result.c | 2 + servers/slapd/back-shell/search.c | 2 + servers/slapd/back-shell/shell.h | 11 ++ servers/slapd/back-shell/unbind.c | 2 + servers/slapd/backend.c | 38 +++- servers/slapd/bind.c | 2 + servers/slapd/ch_malloc.c | 2 + servers/slapd/charray.c | 6 + servers/slapd/compare.c | 2 + servers/slapd/config.c | 2 + servers/slapd/configinfo.c | 2 + servers/slapd/connection.c | 1 - servers/slapd/daemon.c | 1 - servers/slapd/delete.c | 2 + servers/slapd/detach.c | 8 + servers/slapd/dn.c | 5 +- servers/slapd/entry.c | 2 + servers/slapd/filter.c | 5 + servers/slapd/filterentry.c | 55 ++---- servers/slapd/init.c | 8 +- servers/slapd/lock.c | 2 + servers/slapd/main.c | 39 +++-- servers/slapd/modify.c | 2 + servers/slapd/modrdn.c | 2 + servers/slapd/monitor.c | 2 + servers/slapd/operation.c | 2 + servers/slapd/phonetic.c | 2 + servers/slapd/proto-slap.h | 182 ++++++++++---------- servers/slapd/repl.c | 2 + servers/slapd/result.c | 1 - servers/slapd/schema.c | 13 +- servers/slapd/schemaparse.c | 2 + servers/slapd/search.c | 2 + servers/slapd/shell-backends/passwd-shell.c | 2 + servers/slapd/shell-backends/shellutil.c | 2 + servers/slapd/shell-backends/shellutil.h | 9 + servers/slapd/slap.h | 21 ++- servers/slapd/str2filter.c | 2 + servers/slapd/strdup.c | 3 +- servers/slapd/tempnam.c | 2 + servers/slapd/tools/centipede.c | 64 ++++++- servers/slapd/tools/chlog2replog.c | 2 + servers/slapd/tools/edb2ldif.c | 2 + servers/slapd/tools/ldapsyntax.c | 2 + servers/slapd/tools/ldapsyntax.h | 16 +- servers/slapd/tools/ldbmcat.c | 15 +- servers/slapd/tools/ldbmtest.c | 1 - servers/slapd/tools/ldif.c | 8 +- servers/slapd/tools/ldif2id2children.c | 2 + servers/slapd/tools/ldif2id2entry.c | 2 + servers/slapd/tools/ldif2index.c | 9 +- servers/slapd/tools/ldif2ldbm.c | 34 ++-- servers/slapd/tools/sizecount.c | 2 + servers/slapd/unbind.c | 2 + servers/slapd/value.c | 1 + servers/slurpd/admin.c | 1 + servers/slurpd/args.c | 3 + servers/slurpd/ch_malloc.c | 2 + servers/slurpd/config.c | 2 + servers/slurpd/detach.c | 8 + servers/slurpd/fm.c | 1 - servers/slurpd/globals.c | 2 + servers/slurpd/globals.h | 14 +- servers/slurpd/ldap_op.c | 1 - servers/slurpd/lock.c | 2 + servers/slurpd/main.c | 26 +++ servers/slurpd/re.c | 1 - servers/slurpd/reject.c | 1 - servers/slurpd/replica.c | 20 +++ servers/slurpd/replog.c | 2 - servers/slurpd/ri.c | 13 +- servers/slurpd/rq.c | 1 - servers/slurpd/sanity.c | 2 + servers/slurpd/slurp.h | 18 +- servers/slurpd/st.c | 1 - servers/slurpd/tsleep.c | 1 + 125 files changed, 898 insertions(+), 432 deletions(-) diff --git a/acconfig.h b/acconfig.h index 545db86416..ec41bf6bd8 100644 --- a/acconfig.h +++ b/acconfig.h @@ -5,6 +5,9 @@ Leave the following blank line there!! Autoheader needs it. */ +/* define this if toupper() requires tolower() check */ +#undef C_UPPER_LOWER + /* define this if sys_errlist is not defined in stdio.h or errno.h */ #undef DECL_SYS_ERRLIST diff --git a/aclocal.m4 b/aclocal.m4 index 1df969aa99..b6e6ca9700 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -113,7 +113,7 @@ AC_DEFUN([OL_BERKELEY_DB2], fi ]) if test $ol_cv_berkeley_db2 = yes ; then - AC_DEFINE(HAVE_BERKELEY_DB2) + AC_DEFINE(HAVE_BERKELEY_DB2,1) fi ])dnl dnl @@ -179,7 +179,7 @@ AC_DEFUN([OL_BERKELEY_DB], fi ]) if test $ol_cv_berkeley_db = yes ; then - AC_DEFINE(HAVE_BERKELEY_DB) + AC_DEFINE(HAVE_BERKELEY_DB,1) fi ])dnl dnl @@ -224,7 +224,7 @@ AC_DEFUN([OL_GDBM], fi ]) if test $ol_cv_gdbm = yes ; then - AC_DEFINE(HAVE_GDBM) + AC_DEFINE(HAVE_GDBM,1) fi ])dnl dnl @@ -280,7 +280,7 @@ AC_DEFUN([OL_NDBM], fi ]) if test $ol_cv_ndbm = yes ; then - AC_DEFINE(HAVE_NDBM) + AC_DEFINE(HAVE_NDBM,1) fi ])dnl dnl @@ -340,6 +340,30 @@ AC_CACHE_CHECK([for LinuxThreads], [ol_cv_linux_threads], [ ]) ])dnl dnl +dnl ==================================================================== +dnl Check if toupper() requires islower() to be called first +AC_DEFUN([OL_C_UPPER_LOWER], +[ +AC_MSG_CHECKING([if toupper() requires islower()]) +AC_CACHE_VAL(ol_cv_c_upper_lower,[ + AC_TRY_RUN([ +#include +main() +{ + if ('C' == toupper('C')) + exit 0; + else + exit 1; +}], + [ol_cv_c_upper_lower=no], + [ol_cv_c_upper_lower=yes], + [ol_cv_c_upper_lower=safe])]) +AC_MSG_RESULT($ol_cv_c_upper_lower) +if test $ol_cv_c_upper_lower != no ; then + AC_DEFINE(C_UPPER_LOWER,1) +fi +]) + dnl ==================================================================== dnl Check for declaration of sys_errlist in one of stdio.h and errno.h. dnl Declaration of sys_errlist on BSD4.4 interferes with our declaration. @@ -359,7 +383,7 @@ AC_MSG_RESULT($ol_cv_dcl_sys_errlist) # It's possible (for near-UNIX clones) that sys_errlist doesn't exist if test $ol_cv_dcl_sys_errlist = no ; then - AC_DEFINE(DECL_SYS_ERRLIST) + AC_DEFINE(DECL_SYS_ERRLIST,1) AC_MSG_CHECKING([existence of sys_errlist]) AC_CACHE_VAL(ol_cv_have_sys_errlist,[ AC_TRY_LINK([#include ], diff --git a/configure b/configure index 2cd35bfb9a..516047020c 100755 --- a/configure +++ b/configure @@ -5430,103 +5430,58 @@ EOF fi -echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:5435: checking whether byte ordering is bigendian" >&5 -if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then + +echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6 +echo "configure:5436: checking if toupper() requires islower()" >&5 +if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+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 < -#include -int main() { - -#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN - bogus endian macros -#endif -; return 0; } -EOF -if { (eval echo configure:5453: \"$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 < -#include -int main() { - -#if BYTE_ORDER != BIG_ENDIAN - not big endian -#endif -; return 0; } -EOF -if { (eval echo configure:5468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_bigendian=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_c_bigendian=no -fi -rm -f conftest* -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -if test $ac_cv_c_bigendian = unknown; then -if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + + if test "$cross_compiling" = yes; then + ol_cv_c_upper_lower=safe else cat > conftest.$ac_ext < +main() +{ + if ('C' == toupper('C')) + exit 0; + else + exit 1; } EOF -if { (eval echo configure:5501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then - ac_cv_c_bigendian=no + ol_cv_c_upper_lower=no else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* - ac_cv_c_bigendian=yes + ol_cv_c_upper_lower=yes fi rm -fr conftest* fi -fi fi -echo "$ac_t""$ac_cv_c_bigendian" 1>&6 -if test $ac_cv_c_bigendian = yes; then - cat >> confdefs.h <<\EOF -#define WORDS_BIGENDIAN 1 +echo "$ac_t""$ol_cv_c_upper_lower" 1>&6 +if test $ol_cv_c_upper_lower != no ; then + cat >> confdefs.h <<\EOF +#define C_UPPER_LOWER 1 EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:5525: checking for working const" >&5 +echo "configure:5480: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -5598,7 +5553,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:5602: checking for 8-bit clean memcmp" >&5 +echo "configure:5557: 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 @@ -5606,7 +5561,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -5634,12 +5589,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:5638: checking for strftime" >&5 +echo "configure:5593: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -5684,7 +5639,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:5688: checking for strftime in -lintl" >&5 +echo "configure:5643: 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 @@ -5692,7 +5647,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5730,12 +5685,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:5734: checking for vprintf" >&5 +echo "configure:5689: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -5782,12 +5737,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:5786: checking for _doprnt" >&5 +echo "configure:5741: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -5835,7 +5790,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:5839: checking for wait3 that fills in rusage" >&5 +echo "configure:5794: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5843,7 +5798,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -5874,7 +5829,7 @@ main() { } } EOF -if { (eval echo configure:5878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -5926,12 +5881,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5930: checking for $ac_func" >&5 +echo "configure:5885: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5982,12 +5937,12 @@ done for ac_func in getopt strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5986: checking for $ac_func" >&5 +echo "configure:5941: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6040,13 +5995,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:6044: checking declaration of sys_errlist" >&5 +echo "configure:5999: 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 < @@ -6056,7 +6011,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:6060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -6077,20 +6032,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:6081: checking existence of sys_errlist" >&5 +echo "configure:6036: 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 < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:6094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index 725008a5e8..e112c59a52 100644 --- a/configure.in +++ b/configure.in @@ -716,7 +716,7 @@ AC_STRUCT_ST_BLKSIZE AC_HEADER_TIME AC_STRUCT_TM -AC_C_BIGENDIAN +OL_C_UPPER_LOWER AC_C_CONST dnl AC_CHECK_SIZEOF(short) diff --git a/include/portable.h.in b/include/portable.h.in index 67a861f055..3b8fd80dac 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -104,9 +104,8 @@ is provided ``as is'' without express or implied warranty. /* Define to `int' if doesn't define. */ #undef uid_t -/* Define if your processor stores words with the most significant - byte first (like Motorola and SPARC, unlike Intel and VAX). */ -#undef WORDS_BIGENDIAN +/* define this if toupper() requires tolower() check */ +#undef C_UPPER_LOWER /* define this if sys_errlist is not defined in stdio.h or errno.h */ #undef DECL_SYS_ERRLIST diff --git a/servers/slapd/abandon.c b/servers/slapd/abandon.c index d6f7291c78..fb9d1be4b2 100644 --- a/servers/slapd/abandon.c +++ b/servers/slapd/abandon.c @@ -12,9 +12,11 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include -#include -#include +#include + #include "slap.h" extern Backend *select_backend(); diff --git a/servers/slapd/acl.c b/servers/slapd/acl.c index a5fd38abbd..1098553319 100644 --- a/servers/slapd/acl.c +++ b/servers/slapd/acl.c @@ -1,5 +1,7 @@ /* acl.c - routines to parse and check acl's */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/aclparse.c b/servers/slapd/aclparse.c index 10fa6a0721..a8ba951089 100644 --- a/servers/slapd/aclparse.c +++ b/servers/slapd/aclparse.c @@ -1,5 +1,6 @@ /* acl.c - routines to parse and check acl's */ +#include "portable.h" #include #include @@ -7,12 +8,13 @@ #include #include #include -#include "regex.h" +#include +#include + #include "slap.h" #include "portable.h" extern Filter *str2filter(); -extern char *re_comp(); extern struct acl *global_acl; extern char **str2charray(); extern char *dn_upcase(); @@ -26,6 +28,62 @@ static void print_acl(); static void print_access(); #endif +int +regtest(char *fname, int lineno, char *pat) { + int e; + regex_t re; + + char buf[512]; + int size; + + char *sp; + char *dp; + int flag; + + sp = pat; + dp = buf; + size = 0; + buf[0] = '\0'; + + for (size = 0, flag = 0; (size < sizeof(buf)) && *sp; sp++) { + if (flag) { + if (*sp == '$'|| (*sp >= '0' && *sp <= '9')) { + *dp++ = *sp; + size++; + } + flag = 0; + + } else { + if (*sp == '$') { + flag = 1; + } else { + *dp++ = *sp; + size++; + } + } + } + + *dp = '\0'; + if ( size >= (sizeof(buf)-1) ) { + fprintf( stderr, + "%s: line %d: regular expression \"%s\" too large\n", + fname, lineno, pat, 0 ); + acl_usage(); + } + + if ((e = regcomp(&re, buf, REG_EXTENDED|REG_ICASE))) { + char error[512]; + regerror(e, &re, error, sizeof(error)); + fprintf( stderr, + "%s: line %d: regular expression \"%s\" bad because of %s\n", + fname, lineno, pat, error ); + acl_usage(); + return(0); + } + regfree(&re); + return(1); +} + void parse_acl( Backend *be, @@ -58,6 +116,17 @@ parse_acl( } if ( strcasecmp( argv[i], "*" ) == 0 ) { + int e; + if ((e = regcomp( &a->acl_dnre, ".*", + REG_EXTENDED|REG_ICASE))) + { + char buf[512]; + regerror(e, &a->acl_dnre, buf, sizeof(buf)); + fprintf( stderr, + "%s: line %d: regular expression \"%s\" bad because of %s\n", + fname, lineno, right, buf ); + acl_usage(); + } a->acl_dnpat = strdup( ".*" ); continue; } @@ -79,14 +148,19 @@ parse_acl( acl_usage(); } } else if ( strcasecmp( left, "dn" ) == 0 ) { - if ( (e = re_comp( right )) != NULL ) { + int e; + if ((e = regcomp(&a->acl_dnre, right, + REG_EXTENDED|REG_ICASE))) { + char buf[512]; + regerror(e, &a->acl_dnre, buf, sizeof(buf)); fprintf( stderr, - "%s: line %d: regular expression \"%s\" bad because of %s\n", - fname, lineno, right, e ); + "%s: line %d: regular expression \"%s\" bad because of %s\n", + fname, lineno, right, buf ); acl_usage(); + + } else { + a->acl_dnpat = dn_upcase(strdup( right )); } - a->acl_dnpat = dn_upcase( strdup( - right ) ); } else if ( strncasecmp( left, "attr", 4 ) == 0 ) { char **alist; @@ -96,7 +170,7 @@ parse_acl( free( alist ); } else { fprintf( stderr, - "%s: line %d: expecting got \"%s\"\n", + "%s: line %d: expecting got \"%s\"\n", fname, lineno, left ); acl_usage(); } @@ -106,7 +180,7 @@ parse_acl( } else if ( strcasecmp( argv[i], "by" ) == 0 ) { if ( a == NULL ) { fprintf( stderr, - "%s: line %d: to clause required before by clause in access line\n", + "%s: line %d: to clause required before by clause in access line\n", fname, lineno ); acl_usage(); } @@ -131,38 +205,27 @@ parse_acl( } else if ( strcasecmp( argv[i], "self" ) == 0 ) { b->a_dnpat = strdup( "self" ); } else if ( strcasecmp( left, "dn" ) == 0 ) { - if ( (e = re_comp( right )) != NULL ) { - fprintf( stderr, - "%s: line %d: regular expression \"%s\" bad: %s\n", - fname, lineno, right, e ); - acl_usage(); - } + regtest(fname, lineno, right); b->a_dnpat = dn_upcase( strdup( right ) ); - } else if ( strcasecmp( left, "dnattr" ) - == 0 ) { + } else if ( strcasecmp( left, "dnattr" ) == 0 ) { b->a_dnattr = strdup( right ); - } else if ( strcasecmp( left, "domain" ) - == 0 ) { - char *s; - if ( (e = re_comp( right )) != NULL ) { - fprintf( stderr, - "%s: line %d: regular expression \"%s\" bad: %s\n", - fname, lineno, right, e ); - acl_usage(); - } +#ifdef ACLGROUP + } else if ( strcasecmp( left, "group" ) == 0 ) { + regtest(fname, lineno, right); + b->a_group = dn_upcase(strdup( right )); +#endif /* ACLGROUP */ + } else if ( strcasecmp( left, "domain" ) == 0 ) { + char *s; + regtest(fname, lineno, right); b->a_domainpat = strdup( right ); + /* normalize the domain */ for ( s = b->a_domainpat; *s; s++ ) { *s = TOLOWER( *s ); } } else if ( strcasecmp( left, "addr" ) == 0 ) { - if ( (e = re_comp( right )) != NULL ) { - fprintf( stderr, - "%s: line %d: regular expression \"%s\" bad: %s\n", - fname, lineno, right, e ); - acl_usage(); - } + regtest(fname, lineno, right); b->a_addrpat = strdup( right ); } else { fprintf( stderr, @@ -198,16 +261,15 @@ parse_acl( /* if we have no real access clause, complain and do nothing */ if ( a == NULL ) { - fprintf( stderr, - "%s: line %d: warning: no access clause(s) specified in access line\n", + "%s: line %d: warning: no access clause(s) specified in access line\n", fname, lineno ); } else { if ( a->acl_access == NULL ) { fprintf( stderr, - "%s: line %d: warning: no by clause(s) specified in access line\n", + "%s: line %d: warning: no by clause(s) specified in access line\n", fname, lineno ); } @@ -373,4 +435,4 @@ print_acl( struct acl *a ) } } -#endif +#endif /* LDAP_DEBUG */ diff --git a/servers/slapd/add.c b/servers/slapd/add.c index 93cc3cdcd3..feecf522b5 100644 --- a/servers/slapd/add.c +++ b/servers/slapd/add.c @@ -10,6 +10,8 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/attr.c b/servers/slapd/attr.c index fb9add64bc..5842813b96 100644 --- a/servers/slapd/attr.c +++ b/servers/slapd/attr.c @@ -1,5 +1,7 @@ /* attr.c - routines for dealing with attributes */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/ava.c b/servers/slapd/ava.c index ef0487c7aa..12ef18cbf4 100644 --- a/servers/slapd/ava.c +++ b/servers/slapd/ava.c @@ -1,5 +1,7 @@ /* ava.c - routines for dealing with attribute value assertions */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/back-ldbm/abandon.c b/servers/slapd/back-ldbm/abandon.c index 8ed2dfd5cb..8f1ca0e040 100644 --- a/servers/slapd/back-ldbm/abandon.c +++ b/servers/slapd/back-ldbm/abandon.c @@ -1,5 +1,7 @@ /* abandon.c - ldbm backend abandon routine */ +#include "portable.h" + ldbm_back_abandon() { } diff --git a/servers/slapd/back-ldbm/add.c b/servers/slapd/back-ldbm/add.c index 797398ad4b..37b6a40635 100644 --- a/servers/slapd/back-ldbm/add.c +++ b/servers/slapd/back-ldbm/add.c @@ -1,5 +1,7 @@ /* add.c - ldap ldbm back-end add routine */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/back-ldbm/attr.c b/servers/slapd/back-ldbm/attr.c index dfe72f6e2f..ca59ba3090 100644 --- a/servers/slapd/back-ldbm/attr.c +++ b/servers/slapd/back-ldbm/attr.c @@ -1,5 +1,7 @@ /* attr.c - backend routines for dealing with attributes */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/back-ldbm/back-ldbm.h b/servers/slapd/back-ldbm/back-ldbm.h index 2824330190..3d656f4dd9 100644 --- a/servers/slapd/back-ldbm/back-ldbm.h +++ b/servers/slapd/back-ldbm/back-ldbm.h @@ -5,8 +5,16 @@ #include "ldbm.h" +LDAP_BEGIN_DECL + #define DEFAULT_CACHE_SIZE 1000 -#define DEFAULT_DBCACHE_SIZE 100000 + +#ifdef LDBM_USE_DB2 +# define DEFAULT_DBCACHE_SIZE (100 * DEFAULT_DB_PAGE_SIZE) +#else +# define DEFAULT_DBCACHE_SIZE 100000 +#endif + #define DEFAULT_DB_DIRECTORY "/usr/tmp" #define DEFAULT_MODE 0600 @@ -102,13 +110,14 @@ struct ldbminfo { struct cache li_cache; Avlnode *li_attrs; int li_dbcachesize; + int li_flush_wrt; struct dbcache li_dbcache[MAXDBCACHE]; pthread_mutex_t li_dbcache_mutex; pthread_cond_t li_dbcache_cv; }; -#ifdef NEEDPROTOS #include "proto-back-ldbm.h" -#endif + +LDAP_END_DECL #endif /* _back_ldbm_h_ */ diff --git a/servers/slapd/back-ldbm/bind.c b/servers/slapd/back-ldbm/bind.c index 66dfddbceb..90aa228f08 100644 --- a/servers/slapd/back-ldbm/bind.c +++ b/servers/slapd/back-ldbm/bind.c @@ -1,5 +1,7 @@ /* bind.c - ldbm backend bind and unbind routines */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/back-ldbm/cache.c b/servers/slapd/back-ldbm/cache.c index 819b1f2712..4c5e7c3203 100644 --- a/servers/slapd/back-ldbm/cache.c +++ b/servers/slapd/back-ldbm/cache.c @@ -1,5 +1,7 @@ /* cache.c - routines to maintain an in-core cache of entries */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/back-ldbm/close.c b/servers/slapd/back-ldbm/close.c index d6758e143b..66ef3e8606 100644 --- a/servers/slapd/back-ldbm/close.c +++ b/servers/slapd/back-ldbm/close.c @@ -1,5 +1,7 @@ /* close.c - close ldbm backend */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/back-ldbm/compare.c b/servers/slapd/back-ldbm/compare.c index b0974ffdbb..714923e177 100644 --- a/servers/slapd/back-ldbm/compare.c +++ b/servers/slapd/back-ldbm/compare.c @@ -1,5 +1,7 @@ /* compare.c - ldbm backend compare routine */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/back-ldbm/config.c b/servers/slapd/back-ldbm/config.c index d6aca2c413..5cbfd6e924 100644 --- a/servers/slapd/back-ldbm/config.c +++ b/servers/slapd/back-ldbm/config.c @@ -1,5 +1,7 @@ /* config.c - ldbm backend configuration file routine */ +#include "portable.h" + #include #include #include @@ -77,6 +79,10 @@ ldbm_back_config( } li->li_dbcachesize = atoi( argv[1] ); + /* flush on writes */ + } else if ( strcasecmp( argv[0], "flushwrites" ) == 0 ) { + li->li_flush_wrt = 1; + /* anything else */ } else { fprintf( stderr, diff --git a/servers/slapd/back-ldbm/dbcache.c b/servers/slapd/back-ldbm/dbcache.c index 269e3d152c..bef299be86 100644 --- a/servers/slapd/back-ldbm/dbcache.c +++ b/servers/slapd/back-ldbm/dbcache.c @@ -1,6 +1,5 @@ /* ldbmcache.c - maintain a cache of open ldbm files */ -#define DISABLE_BRIDGE /* disable LDAP_BRIDGE code */ #include "portable.h" #include diff --git a/servers/slapd/back-ldbm/delete.c b/servers/slapd/back-ldbm/delete.c index b6ffa79e0e..ee5fbabca6 100644 --- a/servers/slapd/back-ldbm/delete.c +++ b/servers/slapd/back-ldbm/delete.c @@ -1,5 +1,7 @@ /* delete.c - ldbm backend delete routine */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/back-ldbm/dn2id.c b/servers/slapd/back-ldbm/dn2id.c index 0a7edac280..89a5ea13ea 100644 --- a/servers/slapd/back-ldbm/dn2id.c +++ b/servers/slapd/back-ldbm/dn2id.c @@ -1,5 +1,7 @@ /* dn2id.c - routines to deal with the dn2id index */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/back-ldbm/filterindex.c b/servers/slapd/back-ldbm/filterindex.c index 55aada54e4..b65b841e24 100644 --- a/servers/slapd/back-ldbm/filterindex.c +++ b/servers/slapd/back-ldbm/filterindex.c @@ -1,5 +1,7 @@ /* filterindex.c - generate the list of candidate entries from a filter */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/back-ldbm/group.c b/servers/slapd/back-ldbm/group.c index 8ada479ea4..e3e3436ceb 100644 --- a/servers/slapd/back-ldbm/group.c +++ b/servers/slapd/back-ldbm/group.c @@ -1,5 +1,7 @@ /* compare.c - ldbm backend compare routine */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/back-ldbm/id2children.c b/servers/slapd/back-ldbm/id2children.c index 3b2c55d202..2906c5b2cb 100644 --- a/servers/slapd/back-ldbm/id2children.c +++ b/servers/slapd/back-ldbm/id2children.c @@ -1,5 +1,7 @@ /* id2children.c - routines to deal with the id2children index */ +#include "portable.h" + #include #include #include @@ -23,6 +25,11 @@ id2children_add( IDList *idl; char buf[20]; +#ifdef LDBM_USE_DB2 + memset( &key, 0, sizeof( key ) ); + memset( &data, 0, sizeof( data ) ); +#endif + Debug( LDAP_DEBUG_TRACE, "=> id2children_add( %d, %d )\n", p ? p->e_id : 0, e->e_id, 0 ); @@ -63,6 +70,10 @@ has_children( IDList *idl; char buf[20]; +#ifdef LDBM_USE_DB2 + memset( &key, 0, sizeof( key ) ); +#endif + Debug( LDAP_DEBUG_TRACE, "=> has_children( %d )\n", p->e_id , 0, 0 ); if ( (db = ldbm_cache_open( be, "id2children", LDBM_SUFFIX, diff --git a/servers/slapd/back-ldbm/id2entry.c b/servers/slapd/back-ldbm/id2entry.c index 38522cb54a..140555c0c3 100644 --- a/servers/slapd/back-ldbm/id2entry.c +++ b/servers/slapd/back-ldbm/id2entry.c @@ -1,5 +1,7 @@ /* id2entry.c - routines to deal with the id2entry index */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/back-ldbm/idl.c b/servers/slapd/back-ldbm/idl.c index d00b025d52..d68c7b834b 100644 --- a/servers/slapd/back-ldbm/idl.c +++ b/servers/slapd/back-ldbm/idl.c @@ -1,6 +1,5 @@ /* idl.c - ldap id list handling routines */ -#define DISABLE_BRIDGE #include "portable.h" #include diff --git a/servers/slapd/back-ldbm/index.c b/servers/slapd/back-ldbm/index.c index 3d75a091d3..1e58ab8c91 100644 --- a/servers/slapd/back-ldbm/index.c +++ b/servers/slapd/back-ldbm/index.c @@ -1,5 +1,7 @@ /* index.c - routines for dealing with attribute indexes */ +#include "portable.h" + #include #include #include @@ -105,6 +107,10 @@ index_read( char *realval, *tmpval; char buf[BUFSIZ]; +#ifdef LDBM_USE_DB2 + memset( &key, 0, sizeof( key ) ); +#endif + prefix = index2prefix( indextype ); Debug( LDAP_DEBUG_TRACE, "=> index_read( \"%s\" \"%c\" \"%s\" )\n", type, prefix, val ); @@ -130,25 +136,26 @@ index_read( realval = val; tmpval = NULL; if ( prefix != '\0' ) { - int len; + int len = strlen( val ); - if ( (len = strlen( val )) < sizeof(buf) ) { - buf[0] = prefix; - strcpy( &buf[1], val ); + if ( (len + 2) < sizeof(buf) ) { realval = buf; } else { /* value + prefix + null */ tmpval = (char *) ch_malloc( len + 2 ); - tmpval[0] = prefix; - strcat( &tmpval[1], val ); realval = tmpval; } + realval[0] = prefix; + strcpy( &realval[1], val ); } key.dptr = realval; key.dsize = strlen( realval ) + 1; idl = idl_fetch( be, db, key ); + if ( tmpval != NULL ) { + free( tmpval ); + } ldbm_cache_close( be, db ); @@ -174,6 +181,10 @@ add_value( char *realval, *tmpval, *s; char buf[BUFSIZ]; +#ifdef LDBM_USE_DB2 + memset( &key, 0, sizeof( key ) ); +#endif + prefix = index2prefix( indextype ); Debug( LDAP_DEBUG_TRACE, "=> add_value( \"%c%s\" )\n", prefix, val, 0 ); @@ -181,19 +192,17 @@ add_value( tmpval = NULL; idl = NULL; if ( prefix != '\0' ) { - int len; + int len = strlen( val ); - if ( (len = strlen( val )) < sizeof(buf) ) { - buf[0] = prefix; - strcpy( &buf[1], val ); + if ( (len + 2) < sizeof(buf) ) { realval = buf; } else { /* value + prefix + null */ tmpval = (char *) ch_malloc( len + 2 ); - tmpval[0] = prefix; - strcat( &tmpval[1], val ); realval = tmpval; } + realval[0] = prefix; + strcpy( &realval[1], val ); } key.dptr = realval; diff --git a/servers/slapd/back-ldbm/init.c b/servers/slapd/back-ldbm/init.c index b9c5c2f3fa..eaf886baf8 100644 --- a/servers/slapd/back-ldbm/init.c +++ b/servers/slapd/back-ldbm/init.c @@ -1,5 +1,7 @@ /* init.c - initialize ldbm backend */ +#include "portable.h" + #include #include #include @@ -15,6 +17,10 @@ ldbm_back_init( char *argv[ 4 ]; int i; +#ifdef LDAP_CRYPT + extern pthread_mutex_t crypt_mutex; +#endif /* LDAP_CRYPT */ + /* allocate backend-specific stuff */ li = (struct ldbminfo *) ch_calloc( 1, sizeof(struct ldbminfo) ); @@ -59,6 +65,9 @@ ldbm_back_init( pthread_mutex_init( &li->li_cache.c_mutex, pthread_mutexattr_default ); pthread_mutex_init( &li->li_nextid_mutex, pthread_mutexattr_default ); pthread_mutex_init( &li->li_dbcache_mutex, pthread_mutexattr_default ); +#ifdef LDAP_CRYPT + pthread_mutex_init( &crypt_mutex, pthread_mutexattr_default ); +#endif /* LDAP_CRYPT */ pthread_cond_init( &li->li_dbcache_cv, pthread_condattr_default ); for ( i = 0; i < MAXDBCACHE; i++ ) { pthread_mutex_init( &li->li_dbcache[i].dbc_mutex, diff --git a/servers/slapd/back-ldbm/kerberos.c b/servers/slapd/back-ldbm/kerberos.c index d07138bed7..c369c2bc13 100644 --- a/servers/slapd/back-ldbm/kerberos.c +++ b/servers/slapd/back-ldbm/kerberos.c @@ -1,5 +1,7 @@ /* kerberos.c - ldbm backend kerberos bind routines */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/back-ldbm/modify.c b/servers/slapd/back-ldbm/modify.c index df94146736..455dd8c175 100644 --- a/servers/slapd/back-ldbm/modify.c +++ b/servers/slapd/back-ldbm/modify.c @@ -1,5 +1,7 @@ /* modify.c - ldbm backend modify routine */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/back-ldbm/modrdn.c b/servers/slapd/back-ldbm/modrdn.c index 26c96709ae..62a2acd18b 100644 --- a/servers/slapd/back-ldbm/modrdn.c +++ b/servers/slapd/back-ldbm/modrdn.c @@ -1,5 +1,7 @@ /* modrdn.c - ldbm backend modrdn routine */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/back-ldbm/nextid.c b/servers/slapd/back-ldbm/nextid.c index e51f4d84e7..b680890a79 100644 --- a/servers/slapd/back-ldbm/nextid.c +++ b/servers/slapd/back-ldbm/nextid.c @@ -1,5 +1,7 @@ /* id.c - keep track of the next id to be given out */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/back-ldbm/proto-back-ldbm.h b/servers/slapd/back-ldbm/proto-back-ldbm.h index 1bc9fdd0e1..371e8bf9c2 100644 --- a/servers/slapd/back-ldbm/proto-back-ldbm.h +++ b/servers/slapd/back-ldbm/proto-back-ldbm.h @@ -1,112 +1,117 @@ #ifndef _PROTO_BACK_LDBM #define _PROTO_BACK_LDBM +#include + +LDAP_BEGIN_DECL + /* * attr.c */ -void attr_masks( struct ldbminfo *li, char *type, int *indexmask, - int *syntaxmask ); -void attr_index_config( struct ldbminfo *li, char *fname, int lineno, - int argc, char **argv, int init ); +void attr_masks LDAP_P(( struct ldbminfo *li, char *type, int *indexmask, + int *syntaxmask )); +void attr_index_config LDAP_P(( struct ldbminfo *li, char *fname, int lineno, + int argc, char **argv, int init )); /* * cache.c */ -void cache_set_state( struct cache *cache, Entry *e, int state ); -void cache_return_entry_r( struct cache *cache, Entry *e ); -void cache_return_entry_w( struct cache *cache, Entry *e ); -int cache_add_entry_lock( struct cache *cache, Entry *e, int state ); -ID cache_find_entry_dn2id( Backend *be, struct cache *cache, char *dn ); -Entry * cache_find_entry_id( struct cache *cache, ID id, int rw ); -int cache_delete_entry( struct cache *cache, Entry *e ); +void cache_set_state LDAP_P(( struct cache *cache, Entry *e, int state )); +void cache_return_entry_r LDAP_P(( struct cache *cache, Entry *e )); +void cache_return_entry_w LDAP_P(( struct cache *cache, Entry *e )); +int cache_add_entry_lock LDAP_P(( struct cache *cache, Entry *e, int state )); +ID cache_find_entry_dn2id LDAP_P(( Backend *be, struct cache *cache, char *dn )); +Entry * cache_find_entry_id LDAP_P(( struct cache *cache, ID id, int rw )); +int cache_delete_entry LDAP_P(( struct cache *cache, Entry *e )); /* * dbcache.c */ -struct dbcache * ldbm_cache_open( Backend *be, char *name, char *suffix, - int flags ); -void ldbm_cache_close( Backend *be, struct dbcache *db ); -void ldbm_cache_flush_all( Backend *be ); -Datum ldbm_cache_fetch( struct dbcache *db, Datum key ); -int ldbm_cache_store( struct dbcache *db, Datum key, Datum data, int flags ); -int ldbm_cache_delete( struct dbcache *db, Datum key ); +struct dbcache * ldbm_cache_open LDAP_P(( Backend *be, char *name, char *suffix, + int flags )); +void ldbm_cache_close LDAP_P(( Backend *be, struct dbcache *db )); +void ldbm_cache_flush_all LDAP_P(( Backend *be )); +Datum ldbm_cache_fetch LDAP_P(( struct dbcache *db, Datum key )); +int ldbm_cache_store LDAP_P(( struct dbcache *db, Datum key, Datum data, int flags )); +int ldbm_cache_delete LDAP_P(( struct dbcache *db, Datum key )); /* * dn2id.c */ -int dn2id_add( Backend *be, char *dn, ID id ); -ID dn2id( Backend *be, char *dn ); -int dn2id_delete( Backend *be, char *dn ); -/*Entry * dn2entry( Backend *be, char *dn, char **matched );*/ -Entry * dn2entry_r( Backend *be, char *dn, char **matched ); -Entry * dn2entry_w( Backend *be, char *dn, char **matched ); +int dn2id_add LDAP_P(( Backend *be, char *dn, ID id )); +ID dn2id LDAP_P(( Backend *be, char *dn )); +int dn2id_delete LDAP_P(( Backend *be, char *dn )); +/*Entry * dn2entry LDAP_P(( Backend *be, char *dn, char **matched ));*/ +Entry * dn2entry_r LDAP_P(( Backend *be, char *dn, char **matched )); +Entry * dn2entry_w LDAP_P(( Backend *be, char *dn, char **matched )); /* * filterindex.c */ -IDList * filter_candidates( Backend *be, Filter *f ); +IDList * filter_candidates LDAP_P(( Backend *be, Filter *f )); /* * id2children.c */ -int id2children_add( Backend *be, Entry *p, Entry *e ); -int has_children( Backend *be, Entry *p ); +int id2children_add LDAP_P(( Backend *be, Entry *p, Entry *e )); +int has_children LDAP_P(( Backend *be, Entry *p )); /* * id2entry.c */ -int id2entry_add( Backend *be, Entry *e ); -int id2entry_delete( Backend *be, Entry *e ); -Entry * id2entry( Backend *be, ID id, int rw ); -Entry * id2entry_r( Backend *be, ID id ); -Entry * id2entry_w( Backend *be, ID id ); +int id2entry_add LDAP_P(( Backend *be, Entry *e )); +int id2entry_delete LDAP_P(( Backend *be, Entry *e )); +Entry * id2entry LDAP_P(( Backend *be, ID id, int rw )); +Entry * id2entry_r LDAP_P(( Backend *be, ID id )); +Entry * id2entry_w LDAP_P(( Backend *be, ID id )); /* * idl.c */ -IDList * idl_alloc( int nids ); -IDList * idl_allids( Backend *be ); -void idl_free( IDList *idl ); -IDList * idl_fetch( Backend *be, struct dbcache *db, Datum key ); -int idl_insert_key( Backend *be, struct dbcache *db, Datum key, ID id ); -int idl_insert( IDList **idl, ID id, int maxids ); -IDList * idl_intersection( Backend *be, IDList *a, IDList *b ); -IDList * idl_union( Backend *be, IDList *a, IDList *b ); -IDList * idl_notin( Backend *be, IDList *a, IDList *b ); -ID idl_firstid( IDList *idl ); -ID idl_nextid( IDList *idl, ID id ); +IDList * idl_alloc LDAP_P(( int nids )); +IDList * idl_allids LDAP_P(( Backend *be )); +void idl_free LDAP_P(( IDList *idl )); +IDList * idl_fetch LDAP_P(( Backend *be, struct dbcache *db, Datum key )); +int idl_insert_key LDAP_P(( Backend *be, struct dbcache *db, Datum key, ID id )); +int idl_insert LDAP_P(( IDList **idl, ID id, int maxids )); +IDList * idl_intersection LDAP_P(( Backend *be, IDList *a, IDList *b )); +IDList * idl_union LDAP_P(( Backend *be, IDList *a, IDList *b )); +IDList * idl_notin LDAP_P(( Backend *be, IDList *a, IDList *b )); +ID idl_firstid LDAP_P(( IDList *idl )); +ID idl_nextid LDAP_P(( IDList *idl, ID id )); /* * index.c */ -int index_add_entry( Backend *be, Entry *e ); -int index_add_mods( Backend *be, LDAPMod *mods, ID id ); -IDList * index_read( Backend *be, char *type, int indextype, char *val ); -int index_add_values( Backend *be, char *type, struct berval **vals, ID id ); +int index_add_entry LDAP_P(( Backend *be, Entry *e )); +int index_add_mods LDAP_P(( Backend *be, LDAPMod *mods, ID id )); +IDList * index_read LDAP_P(( Backend *be, char *type, int indextype, char *val )); +int index_add_values LDAP_P(( Backend *be, char *type, struct berval **vals, ID id )); /* * kerberos.c */ -#ifdef KERBEROS -/* krbv4_ldap_auth( Backend *be, struct berval *cred, AUTH_DAT *ad ); */ +#ifdef HAVE_KERBEROS +/* krbv4_ldap_auth LDAP_P(( Backend *be, struct berval *cred, AUTH_DAT *ad )); */ #endif /* * nextid.c */ -ID next_id( Backend *be ); -void next_id_return( Backend *be, ID id ); -ID next_id_get( Backend *be ); +ID next_id LDAP_P(( Backend *be )); +void next_id_return LDAP_P(( Backend *be, ID id )); +ID next_id_get LDAP_P(( Backend *be )); +LDAP_END_DECL #endif diff --git a/servers/slapd/back-ldbm/search.c b/servers/slapd/back-ldbm/search.c index 19dafe4c01..2bf35034bf 100644 --- a/servers/slapd/back-ldbm/search.c +++ b/servers/slapd/back-ldbm/search.c @@ -1,5 +1,7 @@ /* search.c - ldbm backend search function */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/back-ldbm/unbind.c b/servers/slapd/back-ldbm/unbind.c index 9f3421d5ee..56e3e426a4 100644 --- a/servers/slapd/back-ldbm/unbind.c +++ b/servers/slapd/back-ldbm/unbind.c @@ -1,5 +1,7 @@ /* unbind.c - handle an ldap unbind operation */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/back-passwd/config.c b/servers/slapd/back-passwd/config.c index 5a26ff0fb6..252717ab73 100644 --- a/servers/slapd/back-passwd/config.c +++ b/servers/slapd/back-passwd/config.c @@ -1,5 +1,7 @@ /* config.c - passwd backend configuration file routine */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/back-passwd/search.c b/servers/slapd/back-passwd/search.c index 11c1d8e719..3e9a0f9a8c 100644 --- a/servers/slapd/back-passwd/search.c +++ b/servers/slapd/back-passwd/search.c @@ -1,5 +1,7 @@ /* search.c - /etc/passwd backend search function */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/back-shell/abandon.c b/servers/slapd/back-shell/abandon.c index fc9d6a40b6..090ba26a4b 100644 --- a/servers/slapd/back-shell/abandon.c +++ b/servers/slapd/back-shell/abandon.c @@ -1,5 +1,7 @@ /* abandon.c - shell backend abandon function */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/back-shell/add.c b/servers/slapd/back-shell/add.c index 89f054cc9c..e9840e9eaa 100644 --- a/servers/slapd/back-shell/add.c +++ b/servers/slapd/back-shell/add.c @@ -1,5 +1,7 @@ /* add.c - shell backend add function */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/back-shell/bind.c b/servers/slapd/back-shell/bind.c index dea149e410..2d8e5a0a13 100644 --- a/servers/slapd/back-shell/bind.c +++ b/servers/slapd/back-shell/bind.c @@ -1,5 +1,7 @@ /* bind.c - shell backend bind function */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/back-shell/compare.c b/servers/slapd/back-shell/compare.c index 48dfbb553b..642524f04d 100644 --- a/servers/slapd/back-shell/compare.c +++ b/servers/slapd/back-shell/compare.c @@ -1,5 +1,7 @@ /* compare.c - shell backend compare function */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/back-shell/config.c b/servers/slapd/back-shell/config.c index 5d2fa1c19a..fc22aac49a 100644 --- a/servers/slapd/back-shell/config.c +++ b/servers/slapd/back-shell/config.c @@ -1,5 +1,7 @@ /* config.c - shell backend configuration file routine */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/back-shell/delete.c b/servers/slapd/back-shell/delete.c index 0dc3439c00..e794a23a62 100644 --- a/servers/slapd/back-shell/delete.c +++ b/servers/slapd/back-shell/delete.c @@ -1,5 +1,7 @@ /* delete.c - shell backend delete function */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/back-shell/fork.c b/servers/slapd/back-shell/fork.c index aff0e5bbe4..1b25031cbb 100644 --- a/servers/slapd/back-shell/fork.c +++ b/servers/slapd/back-shell/fork.c @@ -1,5 +1,7 @@ /* fork.c - fork and exec a process, connecting stdin/out w/pipes */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/back-shell/init.c b/servers/slapd/back-shell/init.c index 1df9c4b265..b4087cb8a8 100644 --- a/servers/slapd/back-shell/init.c +++ b/servers/slapd/back-shell/init.c @@ -1,5 +1,7 @@ /* init.c - initialize shell backend */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/back-shell/modify.c b/servers/slapd/back-shell/modify.c index d05b79639d..b61dc8234d 100644 --- a/servers/slapd/back-shell/modify.c +++ b/servers/slapd/back-shell/modify.c @@ -1,5 +1,7 @@ /* modify.c - shell backend modify function */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/back-shell/modrdn.c b/servers/slapd/back-shell/modrdn.c index 9fd793317d..a4735164d0 100644 --- a/servers/slapd/back-shell/modrdn.c +++ b/servers/slapd/back-shell/modrdn.c @@ -1,5 +1,7 @@ /* modrdn.c - shell backend modrdn function */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/back-shell/result.c b/servers/slapd/back-shell/result.c index 675aa1f144..f1ac898526 100644 --- a/servers/slapd/back-shell/result.c +++ b/servers/slapd/back-shell/result.c @@ -1,5 +1,7 @@ /* result.c - shell backend result reading function */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/back-shell/search.c b/servers/slapd/back-shell/search.c index 749b112a94..cbc3243d21 100644 --- a/servers/slapd/back-shell/search.c +++ b/servers/slapd/back-shell/search.c @@ -1,5 +1,7 @@ /* search.c - shell backend search function */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/back-shell/shell.h b/servers/slapd/back-shell/shell.h index 5ef493c045..6228b6408e 100644 --- a/servers/slapd/back-shell/shell.h +++ b/servers/slapd/back-shell/shell.h @@ -1,5 +1,12 @@ /* shell.h - shell backend header file */ +#ifndef SLAPD_SHELL_H +#define SLAPD_SHELL_H + +#include + +LDAP_BEGIN_DECL + struct shellinfo { char **si_bind; /* cmd + args to exec for bind */ char **si_unbind; /* cmd + args to exec for unbind */ @@ -11,3 +18,7 @@ struct shellinfo { char **si_delete; /* cmd + args to exec for delete */ char **si_abandon; /* cmd + args to exec for abandon */ }; + +LDAP_END_DECL + +#endif diff --git a/servers/slapd/back-shell/unbind.c b/servers/slapd/back-shell/unbind.c index 649fe96c13..df836f3e8f 100644 --- a/servers/slapd/back-shell/unbind.c +++ b/servers/slapd/back-shell/unbind.c @@ -1,5 +1,7 @@ /* unbind.c - shell backend unbind function */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/backend.c b/servers/slapd/backend.c index 998bfa8c6a..93675af31b 100644 --- a/servers/slapd/backend.c +++ b/servers/slapd/backend.c @@ -1,6 +1,8 @@ /* backend.c - routines for dealing with back-end databases */ +#include "portable.h" + #include #include #include @@ -21,6 +23,7 @@ extern int ldbm_back_abandon(); extern int ldbm_back_config(); extern int ldbm_back_init(); extern int ldbm_back_close(); +extern int ldbm_back_group(); #endif #ifdef LDAP_PASSWD @@ -86,6 +89,9 @@ new_backend( be->be_config = ldbm_back_config; be->be_init = ldbm_back_init; be->be_close = ldbm_back_close; +#ifdef ACLGROUP + be->be_group = ldbm_back_group; +#endif be->be_type = "ldbm"; foundit = 1; } @@ -105,6 +111,9 @@ new_backend( be->be_config = passwd_back_config; be->be_init = NULL; be->be_close = NULL; +#ifdef ACLGROUP + be->be_group = NULL; +#endif be->be_type = "passwd"; foundit = 1; } @@ -124,6 +133,9 @@ new_backend( be->be_config = shell_back_config; be->be_init = shell_back_init; be->be_close = NULL; +#ifdef ACLGROUP + be->be_group = NULL; +#endif be->be_type = "shell"; foundit = 1; } @@ -149,7 +161,20 @@ select_backend( char * dn ) dnlen = strlen( dn ); for ( i = 0; i < nbackends; i++ ) { for ( j = 0; backends[i].be_suffix != NULL && - backends[i].be_suffix[j] != NULL; j++ ) { + backends[i].be_suffix[j] != NULL; j++ ) + { +#ifdef LDAP_ALLOW_NULL_SEARCH_BASE + /* Add greg@greg.rim.or.jp + * It's quick hack for cheap client + * Some browser offer a NULL base at ldap_search + */ + if(dnlen == 0) { + Debug( LDAP_DEBUG_TRACE, + "select_backend: use default backend\n", 0, 0, 0 ); + return (&backends[i]); + } +#endif /* LDAP_ALLOW_NULL_SEARCH_BASE */ + len = strlen( backends[i].be_suffix[j] ); if ( len > dnlen ) { @@ -231,3 +256,14 @@ be_unbind( } } } + +#ifdef ACLGROUP +int +be_group(Backend *be, char *bdn, char *edn) +{ + if (be->be_group) + return(be->be_group(be, bdn, edn)); + else + return(1); +} +#endif diff --git a/servers/slapd/bind.c b/servers/slapd/bind.c index 562ce5b54a..4fa8478535 100644 --- a/servers/slapd/bind.c +++ b/servers/slapd/bind.c @@ -12,6 +12,8 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/ch_malloc.c b/servers/slapd/ch_malloc.c index 43ec4c9adb..9f5cf56073 100644 --- a/servers/slapd/ch_malloc.c +++ b/servers/slapd/ch_malloc.c @@ -1,5 +1,7 @@ /* ch_malloc.c - malloc routines that test returns from malloc and friends */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/charray.c b/servers/slapd/charray.c index b731cf1e90..71ef9e6345 100644 --- a/servers/slapd/charray.c +++ b/servers/slapd/charray.c @@ -1,5 +1,7 @@ /* charray.c - routines for dealing with char * arrays */ +#include "portable.h" + #include #include #include @@ -113,6 +115,9 @@ str2charray( char *str, char *brkstr ) char *s; int i; + /* protect the input string from strtok */ + str = strdup( str ); + i = 1; for ( s = str; *s; s++ ) { if ( strchr( brkstr, *s ) != NULL ) { @@ -128,5 +133,6 @@ str2charray( char *str, char *brkstr ) } res[i] = NULL; + free( str ); return( res ); } diff --git a/servers/slapd/compare.c b/servers/slapd/compare.c index 248c8b1ec7..d836a43365 100644 --- a/servers/slapd/compare.c +++ b/servers/slapd/compare.c @@ -10,6 +10,8 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/config.c b/servers/slapd/config.c index 66050586ab..55660182c6 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -1,5 +1,7 @@ /* config.c - configuration file handling routines */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/configinfo.c b/servers/slapd/configinfo.c index c1719efde8..f6dcfe9d5f 100644 --- a/servers/slapd/configinfo.c +++ b/servers/slapd/configinfo.c @@ -10,6 +10,8 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index 1b2bd41ed7..bbfdd4344e 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -1,4 +1,3 @@ -#define DISABLE_BRIDGE #include "portable.h" #include diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index c15c58b24a..1dfc8682b1 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -5,7 +5,6 @@ * Added locking of new_conn_mutex when traversing the c[] array. */ -#define DISABLE_BRIDGE /* disable bridge code */ #include "portable.h" #include diff --git a/servers/slapd/delete.c b/servers/slapd/delete.c index bbab47806c..bab22d924f 100644 --- a/servers/slapd/delete.c +++ b/servers/slapd/delete.c @@ -10,6 +10,8 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/detach.c b/servers/slapd/detach.c index 7b3fdab57a..bb28bc96a2 100644 --- a/servers/slapd/detach.c +++ b/servers/slapd/detach.c @@ -10,6 +10,8 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include #include #ifdef SVR4 @@ -39,6 +41,12 @@ detach() nbits = getdtablesize(); #endif /* USE_SYSCONF */ +#ifdef FD_SETSIZE + if ( nbits > FD_SETSIZE ) { + nbits = FD_SETSIZE; + } +#endif /* FD_SETSIZE */ + #ifdef LDAP_DEBUG if ( ldap_debug == 0 ) { #endif diff --git a/servers/slapd/dn.c b/servers/slapd/dn.c index 226937efa9..de10e368c7 100644 --- a/servers/slapd/dn.c +++ b/servers/slapd/dn.c @@ -1,12 +1,13 @@ /* dn.c - routines for dealing with distinguished names */ +#include "portable.h" + #include #include #include #include #include #include -#include "portable.h" #include "slap.h" static char **dn_explode(); @@ -206,7 +207,7 @@ dn_parent( } } - return( NULL ); + return( strdup("") ); } /* diff --git a/servers/slapd/entry.c b/servers/slapd/entry.c index 72ef4b1684..562cc47b68 100644 --- a/servers/slapd/entry.c +++ b/servers/slapd/entry.c @@ -1,5 +1,7 @@ /* entry.c - routines for dealing with entries */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/filter.c b/servers/slapd/filter.c index 8d990b361d..49f8166f2b 100644 --- a/servers/slapd/filter.c +++ b/servers/slapd/filter.c @@ -1,5 +1,7 @@ /* filter.c - routines for parsing and dealing with filters */ +#include "portable.h" + #include #include #include @@ -135,6 +137,7 @@ get_filter( Connection *conn, BerElement *ber, Filter **filt, char **fstr ) Debug( LDAP_DEBUG_FILTER, "AND\n", 0, 0, 0 ); if ( (err = get_filter_list( conn, ber, &f->f_and, &ftmp )) == 0 ) { + if (ftmp == NULL) ftmp = strdup(""); *fstr = ch_malloc( 4 + strlen( ftmp ) ); sprintf( *fstr, "(&%s)", ftmp ); free( ftmp ); @@ -145,6 +148,7 @@ get_filter( Connection *conn, BerElement *ber, Filter **filt, char **fstr ) Debug( LDAP_DEBUG_FILTER, "OR\n", 0, 0, 0 ); if ( (err = get_filter_list( conn, ber, &f->f_or, &ftmp )) == 0 ) { + if (ftmp == NULL) ftmp = strdup(""); *fstr = ch_malloc( 4 + strlen( ftmp ) ); sprintf( *fstr, "(|%s)", ftmp ); free( ftmp ); @@ -155,6 +159,7 @@ get_filter( Connection *conn, BerElement *ber, Filter **filt, char **fstr ) Debug( LDAP_DEBUG_FILTER, "NOT\n", 0, 0, 0 ); (void) ber_skip_tag( ber, &len ); if ( (err = get_filter( conn, ber, &f->f_not, &ftmp )) == 0 ) { + if (ftmp == NULL) ftmp = strdup(""); *fstr = ch_malloc( 4 + strlen( ftmp ) ); sprintf( *fstr, "(!%s)", ftmp ); free( ftmp ); diff --git a/servers/slapd/filterentry.c b/servers/slapd/filterentry.c index 712ff22e2e..495fcb2ca6 100644 --- a/servers/slapd/filterentry.c +++ b/servers/slapd/filterentry.c @@ -1,25 +1,18 @@ /* filterentry.c - apply a filter to an entry */ +#include "portable.h" + #include #include #include #include -#ifdef sunos5 -#include "regexpr.h" -#else -#include "regex.h" -#endif +#include #include "slap.h" extern Attribute *attr_find(); extern char *first_word(); extern char *next_word(); extern char *phonetic(); -extern char *re_comp(); - -#ifndef sunos5 -extern pthread_mutex_t regex_mutex; -#endif static int test_filter_list(); static int test_substring_filter(); @@ -223,11 +216,12 @@ test_approx_filter( w2 = next_word( w2 ) ) { c2 = phonetic( w2 ); if ( strcmp( c1, c2 ) == 0 ) { + free( c2 ); break; } + free( c2 ); } free( c1 ); - free( c2 ); /* * if we stopped because we ran out of words @@ -322,6 +316,7 @@ test_substring_filter( char pat[BUFSIZ]; char buf[BUFSIZ]; struct berval *val; + regex_t re; Debug( LDAP_DEBUG_FILTER, "begin test_substring_filter\n", 0, 0, 0 ); @@ -389,19 +384,16 @@ test_substring_filter( } /* compile the regex */ -#ifdef sunos5 - if ( (p = compile( pat, NULL, NULL )) == NULL ) { - Debug( LDAP_DEBUG_ANY, "compile failed (%s)\n", p, 0, 0 ); + Debug( LDAP_DEBUG_FILTER, "test_substring_filter: regcomp pat: %s\n", + pat, 0, 0 ); + if ((rc = regcomp(&re, pat, 0))) { + char error[512]; + + regerror(rc, &re, error, sizeof(error)); + Debug( LDAP_DEBUG_ANY, "regcomp failed (%s) %s\n", + p, error, 0 ); return( -1 ); } -#else /* sunos5 */ - pthread_mutex_lock( ®ex_mutex ); - if ( (p = re_comp( pat )) != 0 ) { - Debug( LDAP_DEBUG_ANY, "re_comp failed (%s)\n", p, 0, 0 ); - pthread_mutex_unlock( ®ex_mutex ); - return( -1 ); - } -#endif /* sunos5 */ /* for each value in the attribute see if regex matches */ for ( i = 0; a->a_vals[i] != NULL; i++ ) { @@ -417,29 +409,18 @@ test_substring_filter( } value_normalize( realval, a->a_syntax ); -#ifdef sunos5 - rc = step( realval, p ); -#else /* sunos5 */ - rc = re_exec( realval ); -#endif /* sunos5 */ + rc = !regexec(&re, realval, 0, NULL, 0); if ( tmp != NULL ) { free( tmp ); } if ( rc == 1 ) { -#ifdef sunos5 - free( p ); -#else /* sunos5 */ - pthread_mutex_unlock( ®ex_mutex ); -#endif /* sunos5 */ + regfree(&re); return( 0 ); } } -#ifdef sunos5 - free( p ); -#else /* sunos5 */ - pthread_mutex_unlock( ®ex_mutex ); -#endif /* sunos5 */ + + regfree(&re); Debug( LDAP_DEBUG_FILTER, "end test_substring_filter 1\n", 0, 0, 0 ); return( 1 ); diff --git a/servers/slapd/init.c b/servers/slapd/init.c index 03dd850f0e..7ba8318758 100644 --- a/servers/slapd/init.c +++ b/servers/slapd/init.c @@ -1,5 +1,7 @@ /* init.c - initialize various things */ +#include "portable.h" + #include #include #include @@ -18,9 +20,6 @@ extern pthread_mutex_t entry2str_mutex; extern pthread_mutex_t replog_mutex; extern pthread_mutex_t ops_mutex; extern pthread_mutex_t num_sent_mutex; -#ifndef sunos5 -extern pthread_mutex_t regex_mutex; -#endif init() { @@ -31,7 +30,4 @@ init() pthread_mutex_init( &replog_mutex, pthread_mutexattr_default ); pthread_mutex_init( &ops_mutex, pthread_mutexattr_default ); pthread_mutex_init( &num_sent_mutex, pthread_mutexattr_default ); -#ifndef sunos5 - pthread_mutex_init( ®ex_mutex, pthread_mutexattr_default ); -#endif } diff --git a/servers/slapd/lock.c b/servers/slapd/lock.c index 305fb5b91c..2e3cb917fd 100644 --- a/servers/slapd/lock.c +++ b/servers/slapd/lock.c @@ -1,5 +1,7 @@ /* lock.c - routines to open and apply an advisory lock to a file */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/main.c b/servers/slapd/main.c index 01930b9709..258923e61e 100644 --- a/servers/slapd/main.c +++ b/servers/slapd/main.c @@ -1,3 +1,5 @@ +#include "portable.h" + #include #include #include @@ -10,16 +12,17 @@ #include "slap.h" #include "ldapconfig.h" -extern void daemon(); +extern void slapd_daemon(); extern int lber_debug; extern char Versionstr[]; + /* * read-only global variables or variables only written by the listener * thread (after they are initialized) - no need to protect them with a mutex. */ -int ldap_debug; +int ldap_debug = 0; #ifdef LDAP_DEBUG int ldap_syslog = LDAP_DEBUG_STATS; #else @@ -55,15 +58,12 @@ pthread_mutex_t num_sent_mutex; */ pthread_mutex_t entry2str_mutex; pthread_mutex_t replog_mutex; -#ifndef sunos5 -pthread_mutex_t regex_mutex; -#endif static usage( name ) char *name; { - fprintf( stderr, "usage: %s [-d debuglevel] [-f configfile] [-p portnumber] [-s sysloglevel]\n", name ); + fprintf( stderr, "usage: %s [-d ?|debuglevel] [-f configfile] [-p portnumber] [-s sysloglevel]\n", name ); } main( argc, argv ) @@ -105,19 +105,19 @@ main( argc, argv ) LDAP_DEBUG_CONFIG ); printf( "\tLDAP_DEBUG_ACL\t\t%d\n", LDAP_DEBUG_ACL ); - printf( "\tLDAP_DEBUG_STATS\t\t%d\n", + printf( "\tLDAP_DEBUG_STATS\t%d\n", LDAP_DEBUG_STATS ); - printf( "\tLDAP_DEBUG_STATS2\t\t%d\n", + printf( "\tLDAP_DEBUG_STATS2\t%d\n", LDAP_DEBUG_STATS2 ); - printf( "\tLDAP_DEBUG_SHELL\t\t%d\n", + printf( "\tLDAP_DEBUG_SHELL\t%d\n", LDAP_DEBUG_SHELL ); - printf( "\tLDAP_DEBUG_PARSE\t\t%d\n", + printf( "\tLDAP_DEBUG_PARSE\t%d\n", LDAP_DEBUG_PARSE ); printf( "\tLDAP_DEBUG_ANY\t\t%d\n", LDAP_DEBUG_ANY ); exit( 0 ); } else { - ldap_debug = atoi( optarg ); + ldap_debug |= atoi( optarg ); lber_debug = (ldap_debug & LDAP_DEBUG_BER); } break; @@ -184,12 +184,27 @@ main( argc, argv ) pthread_attr_init( &attr ); pthread_attr_setdetachstate( &attr, PTHREAD_CREATE_DETACHED ); - if ( pthread_create( &listener_tid, attr, (void *) daemon, +#ifndef THREAD_MIT_PTHREADS + /* POSIX_THREADS or compatible + * This is a draft 10 or standard pthreads implementation + */ + if ( pthread_create( &listener_tid, &attr, (void *) slapd_daemon, (void *) port ) != 0 ) { Debug( LDAP_DEBUG_ANY, "listener pthread_create failed\n", 0, 0, 0 ); exit( 1 ); } +#else /* !THREAD_MIT_PTHREADS */ + /* + * This is a draft 4 or earlier pthreads implementation + */ + if ( pthread_create( &listener_tid, attr, (void *) slapd_daemon, + (void *) port ) != 0 ) { + Debug( LDAP_DEBUG_ANY, + "listener pthread_create failed\n", 0, 0, 0 ); + exit( 1 ); + } +#endif /* !THREAD_MIT_PTHREADS */ pthread_attr_destroy( &attr ); pthread_join( listener_tid, (void *) &status ); pthread_exit( 0 ); diff --git a/servers/slapd/modify.c b/servers/slapd/modify.c index dd7689cfaf..8c03510460 100644 --- a/servers/slapd/modify.c +++ b/servers/slapd/modify.c @@ -10,6 +10,8 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/modrdn.c b/servers/slapd/modrdn.c index 802dda55ac..75af6e13e8 100644 --- a/servers/slapd/modrdn.c +++ b/servers/slapd/modrdn.c @@ -10,6 +10,8 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/monitor.c b/servers/slapd/monitor.c index a7311989ef..66c6494e5c 100644 --- a/servers/slapd/monitor.c +++ b/servers/slapd/monitor.c @@ -17,6 +17,8 @@ * Added locking of currenttime_mutex to protect call(s) to localtime(). */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/operation.c b/servers/slapd/operation.c index 0c62e219ec..a960c30695 100644 --- a/servers/slapd/operation.c +++ b/servers/slapd/operation.c @@ -1,5 +1,7 @@ /* operation.c - routines to deal with pending ldap operations */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/phonetic.c b/servers/slapd/phonetic.c index 959e06e1e3..996c68160c 100644 --- a/servers/slapd/phonetic.c +++ b/servers/slapd/phonetic.c @@ -1,5 +1,7 @@ /* phonetic.c - routines to do phonetic matching */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/proto-slap.h b/servers/slapd/proto-slap.h index 83e4872d15..3b08579d76 100644 --- a/servers/slapd/proto-slap.h +++ b/servers/slapd/proto-slap.h @@ -1,213 +1,215 @@ #ifndef _PROTO_SLAP #define _PROTO_SLAP +#include + /* * acl.c */ -int access_allowed( Backend *be, Connection *conn, Operation *op, Entry *e, - char *attr, struct berval *val, char *dn, int access ); +int access_allowed LDAP_P(( Backend *be, Connection *conn, Operation *op, Entry *e, + char *attr, struct berval *val, char *dn, int access )); -struct acl * acl_get_applicable( Backend *be, Operation *op, Entry *e, - char *attr, char *edn, int nmatches, regmatch_t *matches ); -int acl_access_allowed( struct acl *a, Backend *be, Connection *conn, Entry *e, +struct acl * acl_get_applicable LDAP_P(( Backend *be, Operation *op, Entry *e, + char *attr, char *edn, int nmatches, regmatch_t *matches )); +int acl_access_allowed LDAP_P(( struct acl *a, Backend *be, Connection *conn, Entry *e, struct berval *val, Operation *op, int access, char *edn, - regmatch_t *matches ); + regmatch_t *matches )); -int acl_check_mods( Backend *be, Connection *conn, Operation *op, Entry *e, - LDAPMod *mods ); +int acl_check_mods LDAP_P(( Backend *be, Connection *conn, Operation *op, Entry *e, + LDAPMod *mods )); /* * aclparse.c */ -void parse_acl( Backend *be, char *fname, int lineno, int argc, char **argv ); -char * access2str( int access ); -int str2access( char *str ); +void parse_acl LDAP_P(( Backend *be, char *fname, int lineno, int argc, char **argv )); +char * access2str LDAP_P(( int access )); +int str2access LDAP_P(( char *str )); /* * attr.c */ -void attr_free( Attribute *a ); -char * attr_normalize( char *s ); -int attr_merge_fast( Entry *e, char *type, struct berval **vals, int nvals, - int naddvals, int *maxvals, Attribute ***a ); -int attr_merge( Entry *e, char *type, struct berval **vals ); -Attribute * attr_find( Attribute *a, char *type ); -int attr_delete( Attribute **attrs, char *type ); -int attr_syntax( char *type ); -void attr_syntax_config( char *fname, int lineno, int argc, char **argv ); +void attr_free LDAP_P(( Attribute *a )); +char * attr_normalize LDAP_P(( char *s )); +int attr_merge_fast LDAP_P(( Entry *e, char *type, struct berval **vals, int nvals, + int naddvals, int *maxvals, Attribute ***a )); +int attr_merge LDAP_P(( Entry *e, char *type, struct berval **vals )); +Attribute * attr_find LDAP_P(( Attribute *a, char *type )); +int attr_delete LDAP_P(( Attribute **attrs, char *type )); +int attr_syntax LDAP_P(( char *type )); +void attr_syntax_config LDAP_P(( char *fname, int lineno, int argc, char **argv )); /* * ava.c */ -int get_ava( BerElement *ber, Ava *ava ); -void ava_free( Ava *ava, int freeit ); +int get_ava LDAP_P(( BerElement *ber, Ava *ava )); +void ava_free LDAP_P(( Ava *ava, int freeit )); /* * backend.c */ -Backend * new_backend( char *type ); -Backend * select_backend( char * dn ); -int be_issuffix( Backend *be, char *suffix ); -int be_isroot( Backend *be, char *dn ); -int be_isroot_pw( Backend *be, char *dn, struct berval *cred ); -void be_close(); +Backend * new_backend LDAP_P(( char *type )); +Backend * select_backend LDAP_P(( char * dn )); +int be_issuffix LDAP_P(( Backend *be, char *suffix )); +int be_isroot LDAP_P(( Backend *be, char *dn )); +int be_isroot_pw LDAP_P(( Backend *be, char *dn, struct berval *cred )); +void be_close LDAP_P(()); /* * ch_malloc.c */ -char * ch_malloc( unsigned long size ); -char * ch_realloc( char *block, unsigned long size ); -char * ch_calloc( unsigned long nelem, unsigned long size ); +char * ch_malloc LDAP_P(( unsigned long size )); +char * ch_realloc LDAP_P(( char *block, unsigned long size )); +char * ch_calloc LDAP_P(( unsigned long nelem, unsigned long size )); /* * charray.c */ -void charray_add( char ***a, char *s ); -void charray_merge( char ***a, char **s ); -void charray_free( char **array ); -int charray_inlist( char **a, char *s ); -char ** charray_dup( char **a ); -char ** str2charray( char *str, char *brkstr ); +void charray_add LDAP_P(( char ***a, char *s )); +void charray_merge LDAP_P(( char ***a, char **s )); +void charray_free LDAP_P(( char **array )); +int charray_inlist LDAP_P(( char **a, char *s )); +char ** charray_dup LDAP_P(( char **a )); +char ** str2charray LDAP_P(( char *str, char *brkstr )); /* * config.c */ -void read_config( char *fname, Backend **bep, FILE *pfp ); +void read_config LDAP_P(( char *fname, Backend **bep, FILE *pfp )); /* * connection.c */ -void connection_activity( Connection *conn ); +void connection_activity LDAP_P(( Connection *conn )); /* * dn.c */ -char * dn_normalize( char *dn ); -char * dn_normalize_case( char *dn ); -char * dn_parent( Backend *be, char *dn ); -int dn_issuffix( char *dn, char *suffix ); -int dn_type( char *dn ); -char * dn_upcase( char *dn ); +char * dn_normalize LDAP_P(( char *dn )); +char * dn_normalize_case LDAP_P(( char *dn )); +char * dn_parent LDAP_P(( Backend *be, char *dn )); +int dn_issuffix LDAP_P(( char *dn, char *suffix )); +int dn_type LDAP_P(( char *dn )); +char * dn_upcase LDAP_P(( char *dn )); /* * entry.c */ -Entry * str2entry( char *s ); -char * entry2str( Entry *e, int *len, int printid ); -void entry_free( Entry *e ); +Entry * str2entry LDAP_P(( char *s )); +char * entry2str LDAP_P(( Entry *e, int *len, int printid )); +void entry_free LDAP_P(( Entry *e )); -int entry_rdwr_lock( Entry *e, int rw ); -int entry_rdwr_rlock( Entry *e ); -int entry_rdwr_wlock( Entry *e ); -int entry_rdwr_unlock( Entry *e, int rw ); -int entry_rdwr_runlock( Entry *e ); -int entry_rdwr_wunlock( Entry *e ); -int entry_rdwr_init( Entry *e ); +int entry_rdwr_lock LDAP_P(( Entry *e, int rw )); +int entry_rdwr_rlock LDAP_P(( Entry *e )); +int entry_rdwr_wlock LDAP_P(( Entry *e )); +int entry_rdwr_unlock LDAP_P(( Entry *e, int rw )); +int entry_rdwr_runlock LDAP_P(( Entry *e )); +int entry_rdwr_wunlock LDAP_P(( Entry *e )); +int entry_rdwr_init LDAP_P(( Entry *e )); /* * filter.c */ -int get_filter( Connection *conn, BerElement *ber, Filter **filt, char **fstr ); -void filter_free( Filter *f ); -void filter_print( Filter *f ); +int get_filter LDAP_P(( Connection *conn, BerElement *ber, Filter **filt, char **fstr )); +void filter_free LDAP_P(( Filter *f )); +void filter_print LDAP_P(( Filter *f )); /* * filterentry.c */ -int test_filter( Backend *be, Connection *conn, Operation *op, Entry *e, - Filter *f ); +int test_filter LDAP_P(( Backend *be, Connection *conn, Operation *op, Entry *e, + Filter *f )); /* * lock.c */ -FILE * lock_fopen( char *fname, char *type, FILE **lfp ); -int lock_fclose( FILE *fp, FILE *lfp ); +FILE * lock_fopen LDAP_P(( char *fname, char *type, FILE **lfp )); +int lock_fclose LDAP_P(( FILE *fp, FILE *lfp )); /* * monitor.c */ -void monitor_info( Connection *conn, Operation *op ); +void monitor_info LDAP_P(( Connection *conn, Operation *op )); /* * operation.c */ -void op_free( Operation *op ); -Operation * op_add( Operation **olist, BerElement *ber, unsigned long msgid, - unsigned long tag, char *dn, int id, int connid ); -void op_delete( Operation **olist, Operation *op ); +void op_free LDAP_P(( Operation *op )); +Operation * op_add LDAP_P(( Operation **olist, BerElement *ber, unsigned long msgid, + unsigned long tag, char *dn, int id, int connid )); +void op_delete LDAP_P(( Operation **olist, Operation *op )); /* * phonetic.c */ -char * first_word( char *s ); -char * next_word( char *s ); -char * word_dup( char *w ); -char * phonetic( char *s ); +char * first_word LDAP_P(( char *s )); +char * next_word LDAP_P(( char *s )); +char * word_dup LDAP_P(( char *w )); +char * phonetic LDAP_P(( char *s )); /* * repl.c */ -void replog( Backend *be, int optype, char *dn, void *change, int flag ); +void replog LDAP_P(( Backend *be, int optype, char *dn, void *change, int flag )); /* * result.c */ -void send_ldap_result( Connection *conn, Operation *op, int err, char *matched, - char *text ); -void send_ldap_search_result( Connection *conn, Operation *op, int err, - char *matched, char *text, int nentries ); -void close_connection( Connection *conn, int opconnid, int opid ); +void send_ldap_result LDAP_P(( Connection *conn, Operation *op, int err, char *matched, + char *text )); +void send_ldap_search_result LDAP_P(( Connection *conn, Operation *op, int err, + char *matched, char *text, int nentries )); +void close_connection LDAP_P(( Connection *conn, int opconnid, int opid )); /* * schema.c */ -int oc_schema_check( Entry *e ); +int oc_schema_check LDAP_P(( Entry *e )); /* * schemaparse.c */ -void parse_oc( Backend *be, char *fname, int lineno, int argc, char **argv ); +void parse_oc LDAP_P(( Backend *be, char *fname, int lineno, int argc, char **argv )); /* * str2filter.c */ -Filter * str2filter( char *str ); +Filter * str2filter LDAP_P(( char *str )); /* * value.c */ -int value_add_fast( struct berval ***vals, struct berval **addvals, int nvals, - int naddvals, int *maxvals ); -int value_add( struct berval ***vals, struct berval **addvals ); -void value_normalize( char *s, int syntax ); -int value_cmp( struct berval *v1, struct berval *v2, int syntax, - int normalize ); -int value_ncmp( struct berval *v1, struct berval *v2, int syntax, int len, - int normalize ); -int value_find( struct berval **vals, struct berval *v, int syntax, - int normalize ); +int value_add_fast LDAP_P(( struct berval ***vals, struct berval **addvals, int nvals, + int naddvals, int *maxvals )); +int value_add LDAP_P(( struct berval ***vals, struct berval **addvals )); +void value_normalize LDAP_P(( char *s, int syntax )); +int value_cmp LDAP_P(( struct berval *v1, struct berval *v2, int syntax, + int normalize )); +int value_ncmp LDAP_P(( struct berval *v1, struct berval *v2, int syntax, int len, + int normalize )); +int value_find LDAP_P(( struct berval **vals, struct berval *v, int syntax, + int normalize )); #endif /* _proto_slap */ diff --git a/servers/slapd/repl.c b/servers/slapd/repl.c index 0a3d7c4631..cd0198ebd7 100644 --- a/servers/slapd/repl.c +++ b/servers/slapd/repl.c @@ -1,5 +1,7 @@ /* repl.c - log modifications for replication purposes */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/result.c b/servers/slapd/result.c index 620c7ef13c..185cc0269d 100644 --- a/servers/slapd/result.c +++ b/servers/slapd/result.c @@ -1,6 +1,5 @@ /* result.c - routines to send ldap results, errors, and referrals */ -#define DISABLE_BRIDGE #include "portable.h" #include diff --git a/servers/slapd/schema.c b/servers/slapd/schema.c index ba16d9b0f1..fc5f0214fa 100644 --- a/servers/slapd/schema.c +++ b/servers/slapd/schema.c @@ -1,5 +1,7 @@ /* schema.c - routines to enforce schema definitions */ +#include "portable.h" + #include #include #include @@ -76,6 +78,11 @@ oc_check_required( Entry *e, char *ocname ) return( 0 ); } + /* check for empty oc_required */ + if(oc->oc_required == NULL) { + return( 0 ); + } + /* for each required attribute */ for ( i = 0; oc->oc_required[i] != NULL; i++ ) { /* see if it's in the entry */ @@ -111,14 +118,16 @@ oc_check_allowed( char *type, struct berval **ocl ) /* if we know about the oc */ if ( (oc = oc_find( ocl[i]->bv_val )) != NULL ) { /* does it require the type? */ - for ( j = 0; oc->oc_required[j] != NULL; j++ ) { + for ( j = 0; oc->oc_required != NULL && + oc->oc_required[j] != NULL; j++ ) { if ( strcasecmp( oc->oc_required[j], type ) == 0 ) { return( 0 ); } } /* does it allow the type? */ - for ( j = 0; oc->oc_allowed[j] != NULL; j++ ) { + for ( j = 0; oc->oc_allowed != NULL && + oc->oc_allowed[j] != NULL; j++ ) { if ( strcasecmp( oc->oc_allowed[j], type ) == 0 || strcmp( oc->oc_allowed[j], "*" ) == 0 ) diff --git a/servers/slapd/schemaparse.c b/servers/slapd/schemaparse.c index 180ed71d00..70edf66b8b 100644 --- a/servers/slapd/schemaparse.c +++ b/servers/slapd/schemaparse.c @@ -1,5 +1,7 @@ /* schemaparse.c - routines to parse config file objectclass definitions */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/search.c b/servers/slapd/search.c index fc96d2fd02..721c013f84 100644 --- a/servers/slapd/search.c +++ b/servers/slapd/search.c @@ -10,6 +10,8 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/shell-backends/passwd-shell.c b/servers/slapd/shell-backends/passwd-shell.c index 2210651dbf..fd354e0fe4 100644 --- a/servers/slapd/shell-backends/passwd-shell.c +++ b/servers/slapd/shell-backends/passwd-shell.c @@ -13,6 +13,8 @@ */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/shell-backends/shellutil.c b/servers/slapd/shell-backends/shellutil.c index 82eea1665b..e1a6d030a4 100644 --- a/servers/slapd/shell-backends/shellutil.c +++ b/servers/slapd/shell-backends/shellutil.c @@ -14,6 +14,8 @@ */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/shell-backends/shellutil.h b/servers/slapd/shell-backends/shellutil.h index 7ea0db057c..8c52ab5dcf 100644 --- a/servers/slapd/shell-backends/shellutil.h +++ b/servers/slapd/shell-backends/shellutil.h @@ -12,6 +12,12 @@ is provided ``as is'' without express or implied warranty. */ +#ifndef SHELLUTIL_H +#define SHELLUTIL_H + +#include + +LDAP_BEGIN_DECL #define MAXLINELEN 512 @@ -94,3 +100,6 @@ char *estrdup( char *s ); */ extern int debugflg; extern char *progname; + +LDAP_END_DECL +#endif diff --git a/servers/slapd/slap.h b/servers/slapd/slap.h index 43f1eae8d1..f5dee02400 100644 --- a/servers/slapd/slap.h +++ b/servers/slapd/slap.h @@ -3,11 +3,14 @@ #ifndef _SLDAPD_H_ #define _SLDAPD_H_ -#define LDAP_SYSLOG +#include "portable.h" + +#include -#include #include -#include +#include +#include + #undef NDEBUG #include @@ -27,6 +30,8 @@ #define MAXREMATCHES 10 +LDAP_BEGIN_DECL + /* * represents an attribute value assertion (i.e., attr=value) */ @@ -134,7 +139,7 @@ struct access { char *a_dnattr; long a_access; -#ifdef ACLGROUP +#ifdef SLAPD_ACLGROUP char *a_group; #endif @@ -226,7 +231,7 @@ typedef struct op { /* LDAP_AUTH_* */ int o_opid; /* id of this operation */ int o_connid; /* id of conn initiating this op */ -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS int o_cldap; /* != 0 if this came in via CLDAP */ struct sockaddr o_clientaddr; /* client address if via CLDAP */ char o_searchbase; /* search base if via CLDAP */ @@ -248,7 +253,7 @@ typedef struct conn { char *c_dn; /* current DN bound to this conn */ pthread_mutex_t c_dnmutex; /* mutex for c_dn field */ int c_authtype; /* auth method used to bind c_dn */ -#ifdef COMPAT +#ifdef LDAP_COMPAT int c_version; /* for compatibility w/2.0, 3.0 */ #endif char *c_addr; /* address of client on this conn */ @@ -280,8 +285,8 @@ typedef struct conn { #define Statslog( level, fmt, connid, opid, arg1, arg2, arg3 ) #endif -#ifdef NEEDPROTOS #include "proto-slap.h" -#endif + +LDAP_END_DECL #endif /* _slap_h_ */ diff --git a/servers/slapd/str2filter.c b/servers/slapd/str2filter.c index aca9674fd8..46b80f5fe6 100644 --- a/servers/slapd/str2filter.c +++ b/servers/slapd/str2filter.c @@ -1,5 +1,7 @@ /* str2filter.c - parse an rfc 1588 string filter */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/strdup.c b/servers/slapd/strdup.c index a16928a2e8..ec7398d4a8 100644 --- a/servers/slapd/strdup.c +++ b/servers/slapd/strdup.c @@ -1,8 +1,9 @@ +#include "portable.h" + #if defined( ultrix ) || defined( nextstep ) #include - char *strdup( char *s ) { char *p; diff --git a/servers/slapd/tempnam.c b/servers/slapd/tempnam.c index 20d108c9d2..53c0e50228 100644 --- a/servers/slapd/tempnam.c +++ b/servers/slapd/tempnam.c @@ -1,3 +1,5 @@ +#include "portable.h" + #if defined( nextstep ) #include diff --git a/servers/slapd/tools/centipede.c b/servers/slapd/tools/centipede.c index 9919232b7a..5de9388b56 100644 --- a/servers/slapd/tools/centipede.c +++ b/servers/slapd/tools/centipede.c @@ -1,5 +1,7 @@ /* centipede.c - generate and install indexing information (view w/tabstop=4) */ +#include "portable.h" + #include #include #include @@ -556,6 +558,11 @@ diff_centroids( int amax, acur, dmax, dcur; char **vals; +#ifdef LDBM_USE_DB2 + DBC *ocursorp; + DBC *ncursorp; +#endif /* LDBM_USE_DB2 */ + if ( verbose ) { printf( "Generating mods for differential %s centroid...", attr ); fflush( stdout ); @@ -600,8 +607,14 @@ diff_centroids( olast.dptr = NULL; nlast.dptr = NULL; +#ifdef LDBM_USE_DB2 + for ( okey = ldbm_firstkey( oldbm, &ocursorp ), + nkey = ldbm_firstkey( nldbm, &ncursorp ); + okey.dptr != NULL && nkey.dptr != NULL; ) +#else for ( okey = ldbm_firstkey( oldbm ), nkey = ldbm_firstkey( nldbm ); okey.dptr != NULL && nkey.dptr != NULL; ) +#endif { rc = strcmp( okey.dptr, nkey.dptr ); @@ -616,8 +629,13 @@ diff_centroids( } nlast = nkey; +#ifdef LDBM_USE_DB2 + okey = ldbm_nextkey( oldbm, olast, ocursorp ); + nkey = ldbm_nextkey( nldbm, nlast, ncursorp ); +#else okey = ldbm_nextkey( oldbm, olast ); nkey = ldbm_nextkey( nldbm, nlast ); +#endif } else if ( rc > 0 ) { /* new value is not in old centroid - add it */ if ( charray_add_dup( &avals, &acur, &amax, nkey.dptr ) == NULL ) { @@ -629,7 +647,12 @@ diff_centroids( ldbm_datum_free( nldbm, nlast ); } nlast = nkey; + +#ifdef LDBM_USE_DB2 + nkey = ldbm_nextkey( nldbm, nlast, ncursorp ); +#else nkey = ldbm_nextkey( nldbm, nlast ); +#endif } else { /* old value is not in new centroid - delete it */ if ( charray_add_dup( &dvals, &dcur, &dmax, okey.dptr ) == NULL ) { @@ -641,7 +664,12 @@ diff_centroids( ldbm_datum_free( oldbm, olast ); } olast = okey; + +#ifdef LDBM_USE_DB2 + okey = ldbm_nextkey( oldbm, olast, ocursorp ); +#else okey = ldbm_nextkey( oldbm, olast ); +#endif } } @@ -651,7 +679,11 @@ diff_centroids( return( NULL ); } +#ifdef LDBM_USE_DB2 + okey = ldbm_nextkey( oldbm, olast, ocursorp ); +#else okey = ldbm_nextkey( oldbm, olast ); +#endif if ( olast.dptr != NULL ) { ldbm_datum_free( oldbm, olast ); } @@ -666,7 +698,11 @@ diff_centroids( return( NULL ); } +#ifdef LDBM_USE_DB2 + nkey = ldbm_nextkey( nldbm, nlast, ncursorp ); +#else nkey = ldbm_nextkey( nldbm, nlast ); +#endif if ( nlast.dptr != NULL ) { ldbm_datum_free( nldbm, nlast ); } @@ -687,8 +723,14 @@ diff_centroids( /* generate list of values to add */ lastkey.dptr = NULL; +#ifdef LDBM_USE_DB2 + for ( key = ldbm_firstkey( nldbm, &ncursorp ); key.dptr != NULL; + key = ldbm_nextkey( nldbm, lastkey, ncursorp ) ) +#else for ( key = ldbm_firstkey( nldbm ); key.dptr != NULL; - key = ldbm_nextkey( nldbm, lastkey ) ) { + key = ldbm_nextkey( nldbm, lastkey ) ) +#endif + { /* see if it's in the old one */ data = ldbm_fetch( oldbm, key ); @@ -712,8 +754,14 @@ diff_centroids( /* generate list of values to delete */ lastkey.dptr = NULL; +#ifdef LDBM_USE_DB2 + for ( key = ldbm_firstkey( oldbm, &ocursorp ); key.dptr != NULL; + key = ldbm_nextkey( oldbm, lastkey, ocursorp ) ) +#else for ( key = ldbm_firstkey( oldbm ); key.dptr != NULL; - key = ldbm_nextkey( oldbm, lastkey ) ) { + key = ldbm_nextkey( oldbm, lastkey ) ) +#endif + { /* see if it's in the new one */ data = ldbm_fetch( nldbm, key ); @@ -773,6 +821,10 @@ full_centroid( char **vals; int vcur, vmax; +#ifdef LDBM_USE_DB2 + DBC *cursorp; +#endif + if ( verbose ) { printf( "Generating mods for full %s centroid...", attr ); fflush( stdout ); @@ -800,8 +852,14 @@ full_centroid( lastkey.dptr = NULL; vals = NULL; vcur = vmax = 0; +#ifdef LDBM_USE_DB2 + for ( key = ldbm_firstkey( ldbm, &cursorp ); key.dptr != NULL; + key = ldbm_nextkey( ldbm, lastkey, cursorp ) ) +#else for ( key = ldbm_firstkey( ldbm ); key.dptr != NULL; - key = ldbm_nextkey( ldbm, lastkey ) ) { + key = ldbm_nextkey( ldbm, lastkey ) ) +#endif + { if ( charray_add_dup( &vals, &vcur, &vmax, key.dptr ) == NULL ) { ldap_mods_free( mods, 1 ); return( NULL ); diff --git a/servers/slapd/tools/chlog2replog.c b/servers/slapd/tools/chlog2replog.c index f9f3b3c5d7..cd982936c8 100644 --- a/servers/slapd/tools/chlog2replog.c +++ b/servers/slapd/tools/chlog2replog.c @@ -16,6 +16,8 @@ * slapd/slurpd locking conventions. */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/tools/edb2ldif.c b/servers/slapd/tools/edb2ldif.c index d46be1edfd..29bbf1f497 100644 --- a/servers/slapd/tools/edb2ldif.c +++ b/servers/slapd/tools/edb2ldif.c @@ -10,6 +10,8 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/tools/ldapsyntax.c b/servers/slapd/tools/ldapsyntax.c index 4fa12c407a..69703a33d0 100644 --- a/servers/slapd/tools/ldapsyntax.c +++ b/servers/slapd/tools/ldapsyntax.c @@ -10,6 +10,8 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/tools/ldapsyntax.h b/servers/slapd/tools/ldapsyntax.h index ddcf1f2b3e..44a23263ca 100644 --- a/servers/slapd/tools/ldapsyntax.h +++ b/servers/slapd/tools/ldapsyntax.h @@ -10,17 +10,23 @@ * is provided ``as is'' without express or implied warranty. */ +#ifndef LDAPSYNTAX_H +#define LDAPSYNTAX_H 1 + +#include + +LDAP_BEGIN_DECL /* XXX: the "master" LINE_WIDTH #define is in ../slap.h */ #define LINE_WIDTH 76 /* for lines in string rep of an entry */ -#ifdef NEEDPROTOS /* * function prototypes */ -int init_syntaxes( void ); -int av2ldif( FILE *outfp, AV_Sequence av, DN dn, short syntax, - char *attrname, PS str_ps ); +int init_syntaxes LDAP_P(( void )); +int av2ldif LDAP_P(( FILE *outfp, AV_Sequence av, DN dn, short syntax, + char *attrname, PS str_ps )); -#endif /* NEEDPROTOS */ +LDAP_END_DECL +#endif diff --git a/servers/slapd/tools/ldbmcat.c b/servers/slapd/tools/ldbmcat.c index 79465df072..b89a54f489 100644 --- a/servers/slapd/tools/ldbmcat.c +++ b/servers/slapd/tools/ldbmcat.c @@ -1,3 +1,5 @@ +#include "portable.h" + #include #include #include @@ -24,6 +26,10 @@ main( argc, argv ) char *file, *s; int printid = 1; +#ifdef LDBM_USE_DB2 + DBC *cursorp; +#endif + if ( argc < 2 || argc > 3 || ( argc == 3 && strcmp( argv[1], "-n" ) != 0 )) { usage( argv[0] ); @@ -41,8 +47,15 @@ main( argc, argv ) } last.dptr = NULL; + +#ifdef LDBM_USE_DB2 + for ( key = ldbm_firstkey( dbp, &cursorp ); key.dptr != NULL; + key = ldbm_nextkey( dbp, last, cursorp ) ) +#else for ( key = ldbm_firstkey( dbp ); key.dptr != NULL; - key = ldbm_nextkey( dbp, last ) ) { + key = ldbm_nextkey( dbp, last ) ) +#endif + { if ( last.dptr != NULL ) ldbm_datum_free( dbp, last ); data = ldbm_fetch( dbp, key ); diff --git a/servers/slapd/tools/ldbmtest.c b/servers/slapd/tools/ldbmtest.c index b202c7b79f..fd2f1a0059 100644 --- a/servers/slapd/tools/ldbmtest.c +++ b/servers/slapd/tools/ldbmtest.c @@ -1,4 +1,3 @@ -#define DISABLE_BRIDGE #include "portable.h" #include diff --git a/servers/slapd/tools/ldif.c b/servers/slapd/tools/ldif.c index dc9f25d584..adcb4b8534 100644 --- a/servers/slapd/tools/ldif.c +++ b/servers/slapd/tools/ldif.c @@ -1,3 +1,5 @@ +#include "portable.h" + #include #include #include @@ -24,7 +26,7 @@ main( argc, argv ) { char buf[BUFSIZ]; char *type, *out; - int binary = 0; + int len, binary = 0; if (argc < 2 || argc > 3 ) { usage( argv[0] ); @@ -79,7 +81,9 @@ main( argc, argv ) } /* not binary: one value per line... */ - while ( gets( buf ) != NULL ) { + while ( fgets( buf, sizeof(buf), stdin ) != NULL ) { + if( buf[len=strlen(buf)] == '\n') buf[len] = '\0'; + if (( out = ldif_type_and_value( type, buf, strlen( buf ) )) == NULL ) { perror( "ldif_type_and_value" ); diff --git a/servers/slapd/tools/ldif2id2children.c b/servers/slapd/tools/ldif2id2children.c index 0bb8e5ec6d..795a26f151 100644 --- a/servers/slapd/tools/ldif2id2children.c +++ b/servers/slapd/tools/ldif2id2children.c @@ -1,3 +1,5 @@ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/tools/ldif2id2entry.c b/servers/slapd/tools/ldif2id2entry.c index ec2bf27279..057b085307 100644 --- a/servers/slapd/tools/ldif2id2entry.c +++ b/servers/slapd/tools/ldif2id2entry.c @@ -1,3 +1,5 @@ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/tools/ldif2index.c b/servers/slapd/tools/ldif2index.c index dd03f3dc78..2e4ba0c439 100644 --- a/servers/slapd/tools/ldif2index.c +++ b/servers/slapd/tools/ldif2index.c @@ -1,7 +1,10 @@ +#include "portable.h" + #include -#include -#include -#include + +#include +#include + #include "../slap.h" #include "ldapconfig.h" diff --git a/servers/slapd/tools/ldif2ldbm.c b/servers/slapd/tools/ldif2ldbm.c index b2caa7b3cc..01021b6840 100644 --- a/servers/slapd/tools/ldif2ldbm.c +++ b/servers/slapd/tools/ldif2ldbm.c @@ -1,3 +1,5 @@ +#include "portable.h" + #include #include #include @@ -5,9 +7,8 @@ #include #include "../slap.h" #include "../back-ldbm/back-ldbm.h" +#include "ldapconfig.h" -#define DEFAULT_CONFIGFILE "%ETCDIR%/slapd.conf" -#define DEFAULT_ETCDIR "%ETCDIR%" #define INDEXCMD "ldif2index" #define ID2ENTRYCMD "ldif2id2entry" #define ID2CHILDRENCMD "ldif2id2children" @@ -52,14 +53,14 @@ static int nkids; static void usage( char *name ) { - fprintf( stderr, "usage: %s -i inputfile [-d debuglevel] [-f configfile] [-j #jobs] [-n databasenumber] [-e etcdir]\n", name ); + fprintf( stderr, "usage: %s -i inputfile [-d debuglevel] [-f configfile] [-j #jobs] [-n databasenumber] [-s sbindir]\n", name ); exit( 1 ); } main( int argc, char **argv ) { int i, stop, status; - char *linep, *buf, *etcdir; + char *linep, *buf, *sbindir; char *args[10]; char buf2[20], buf3[20]; char line[BUFSIZ]; @@ -74,17 +75,18 @@ main( int argc, char **argv ) Avlnode *avltypes = NULL; extern char *optarg; - etcdir = DEFAULT_ETCDIR; - tailorfile = DEFAULT_CONFIGFILE; + sbindir = DEFAULT_SBINDIR; + tailorfile = SLAPD_DEFAULT_CONFIGFILE; dbnum = -1; - while ( (i = getopt( argc, argv, "d:e:f:i:j:n:" )) != EOF ) { + while ( (i = getopt( argc, argv, "d:e:s:f:i:j:n:" )) != EOF ) { switch ( i ) { case 'd': /* turn on debugging */ ldap_debug = atoi( optarg ); break; - case 'e': /* alternate etcdir (index cmd location) */ - etcdir = strdup( optarg ); + case 's': /* alternate sbindir (index cmd location) */ + case 'e': /* accept -e for backwards compatibility */ + sbindir = strdup( optarg ); break; case 'f': /* specify a tailor file */ @@ -135,7 +137,7 @@ main( int argc, char **argv ) fprintf( stderr, "No ldbm database found in config file\n" ); exit( 1 ); } - } else if ( dbnum < 0 || dbnum > nbackends ) { + } else if ( dbnum < 0 || dbnum > (nbackends-1) ) { fprintf( stderr, "Database number selected via -n is out of range\n" ); fprintf( stderr, "Must be in the range 1 to %d (number of databases in the config file)\n", nbackends ); exit( 1 ); @@ -150,14 +152,14 @@ main( int argc, char **argv ) */ i = 0; - sprintf( cmd, "%s/%s", etcdir, ID2ENTRYCMD ); + sprintf( cmd, "%s/%s", sbindir, ID2ENTRYCMD ); args[i++] = cmd; args[i++] = "-i"; args[i++] = inputfile; args[i++] = "-f"; args[i++] = tailorfile; args[i++] = "-n"; - sprintf( buf2, "%d", dbnum ); + sprintf( buf2, "%d", dbnum+1 ); args[i++] = buf2; if ( ldap_debug ) { sprintf( buf3, "%d", ldap_debug ); @@ -172,14 +174,14 @@ main( int argc, char **argv ) */ i = 0; - sprintf( cmd, "%s/%s", etcdir, ID2CHILDRENCMD ); + sprintf( cmd, "%s/%s", sbindir, ID2CHILDRENCMD ); args[i++] = cmd; args[i++] = "-i"; args[i++] = inputfile; args[i++] = "-f"; args[i++] = tailorfile; args[i++] = "-n"; - sprintf( buf2, "%d", dbnum ); + sprintf( buf2, "%d", dbnum+1 ); args[i++] = buf2; if ( ldap_debug ) { sprintf( buf3, "%d", ldap_debug ); @@ -194,14 +196,14 @@ main( int argc, char **argv ) */ i = 0; - sprintf( cmd, "%s/%s", etcdir, INDEXCMD ); + sprintf( cmd, "%s/%s", sbindir, INDEXCMD ); args[i++] = cmd; args[i++] = "-i"; args[i++] = inputfile; args[i++] = "-f"; args[i++] = tailorfile; args[i++] = "-n"; - sprintf( buf2, "%d", dbnum ); + sprintf( buf2, "%d", dbnum+1 ); args[i++] = buf2; if ( ldap_debug ) { sprintf( buf3, "%d", ldap_debug ); diff --git a/servers/slapd/tools/sizecount.c b/servers/slapd/tools/sizecount.c index 45d8230100..a653796ba5 100644 --- a/servers/slapd/tools/sizecount.c +++ b/servers/slapd/tools/sizecount.c @@ -1,3 +1,5 @@ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/unbind.c b/servers/slapd/unbind.c index 500006c34f..487fbbead5 100644 --- a/servers/slapd/unbind.c +++ b/servers/slapd/unbind.c @@ -13,6 +13,8 @@ * */ +#include "portable.h" + #include #include #include diff --git a/servers/slapd/value.c b/servers/slapd/value.c index c9e6fbb577..5be4338ed0 100644 --- a/servers/slapd/value.c +++ b/servers/slapd/value.c @@ -1,5 +1,6 @@ /* value.c - routines for dealing with values */ +#include "portable.h" #include #include #include diff --git a/servers/slurpd/admin.c b/servers/slurpd/admin.c index 6a58b40c4c..c056cd1d8b 100644 --- a/servers/slurpd/admin.c +++ b/servers/slurpd/admin.c @@ -15,6 +15,7 @@ * reconfiguration of slurpd. */ +#include "portable.h" #include #include diff --git a/servers/slurpd/args.c b/servers/slurpd/args.c index b3cc935df8..ec4f0b52b7 100644 --- a/servers/slurpd/args.c +++ b/servers/slurpd/args.c @@ -14,8 +14,11 @@ * args.c - process command-line arguments, and set appropriate globals. */ +#include "portable.h" + #include #include +#include #include #include diff --git a/servers/slurpd/ch_malloc.c b/servers/slurpd/ch_malloc.c index 298391e4f3..22b83b9f4d 100644 --- a/servers/slurpd/ch_malloc.c +++ b/servers/slurpd/ch_malloc.c @@ -14,6 +14,8 @@ * ch_malloc.c - malloc() and friends, with check for NULL return. */ +#include "portable.h" + #include #include #include diff --git a/servers/slurpd/config.c b/servers/slurpd/config.c index 7a8261e849..617943cbac 100644 --- a/servers/slurpd/config.c +++ b/servers/slurpd/config.c @@ -15,6 +15,8 @@ * config.c - configuration file handling routines */ +#include "portable.h" + #include #include #include diff --git a/servers/slurpd/detach.c b/servers/slurpd/detach.c index 7b3fdab57a..bb28bc96a2 100644 --- a/servers/slurpd/detach.c +++ b/servers/slurpd/detach.c @@ -10,6 +10,8 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include #include #ifdef SVR4 @@ -39,6 +41,12 @@ detach() nbits = getdtablesize(); #endif /* USE_SYSCONF */ +#ifdef FD_SETSIZE + if ( nbits > FD_SETSIZE ) { + nbits = FD_SETSIZE; + } +#endif /* FD_SETSIZE */ + #ifdef LDAP_DEBUG if ( ldap_debug == 0 ) { #endif diff --git a/servers/slurpd/fm.c b/servers/slurpd/fm.c index e517cb665a..14815549d9 100644 --- a/servers/slurpd/fm.c +++ b/servers/slurpd/fm.c @@ -14,7 +14,6 @@ * fm.c - file management routines. */ -#define DISABLE_BRIDGE #include "portable.h" #include diff --git a/servers/slurpd/globals.c b/servers/slurpd/globals.c index f8630323cb..89403fc490 100644 --- a/servers/slurpd/globals.c +++ b/servers/slurpd/globals.c @@ -14,6 +14,8 @@ * globals.c - initialization code for global data */ +#include + #include #include "slurp.h" diff --git a/servers/slurpd/globals.h b/servers/slurpd/globals.h index 5d976ff8a4..1582d1780d 100644 --- a/servers/slurpd/globals.h +++ b/servers/slurpd/globals.h @@ -10,6 +10,8 @@ * is provided ``as is'' without express or implied warranty. */ +#ifndef SLURPD_GLOBALS_H +#define SLURPD_GLOBALS_H 1 /* * globals.h - definition of structure holding global data. @@ -17,6 +19,8 @@ #include "slurp.h" +LDAP_BEGIN_DECL + typedef struct globals { /* Thread ID for file manager thread */ pthread_t fm_tid; @@ -50,11 +54,11 @@ typedef struct globals { St *st; /* Pointer to replication queue */ Rq *rq; -#ifdef KERBEROS +#ifdef HAVE_KERBEROS /* Default name of kerberos srvtab file */ char *default_srvtab; -#endif /* KERBEROS */ -#if defined( THREAD_SUNOS4_LWP ) +#endif /* HAVE_KERBEROS */ +#if defined( HAVE_LWP ) && !defined( HAVE_LWP_THR ) tl_t *tsl_list; mon_t tsl_mon; #endif /* THREAD_SUNOS4_LWP */ @@ -62,3 +66,7 @@ typedef struct globals { extern Globals *sglob; + +LDAP_END_DECL + +#endif /* SLURPD_GLOBALS_H */ diff --git a/servers/slurpd/ldap_op.c b/servers/slurpd/ldap_op.c index 487f7466cc..90ef27449f 100644 --- a/servers/slurpd/ldap_op.c +++ b/servers/slurpd/ldap_op.c @@ -14,7 +14,6 @@ * ldap_op.c - routines to perform LDAP operations */ -#define DISABLE_BRIDGE #include "portable.h" #include diff --git a/servers/slurpd/lock.c b/servers/slurpd/lock.c index 62aab06784..6e14c1bfa0 100644 --- a/servers/slurpd/lock.c +++ b/servers/slurpd/lock.c @@ -14,6 +14,8 @@ * lock.c - routines to open and apply an advisory lock to a file */ +#include "portable.h" + #include #include #include diff --git a/servers/slurpd/main.c b/servers/slurpd/main.c index a3b935faa5..1cd84b06ee 100644 --- a/servers/slurpd/main.c +++ b/servers/slurpd/main.c @@ -15,6 +15,8 @@ * main.c - main routine for slurpd. */ +#include "portable.h" + #include #include "slurp.h" @@ -121,6 +123,21 @@ main( * Start the main file manager thread (in fm.c). */ pthread_attr_init( &attr ); +#ifndef THREAD_MIT_PTHREADS + /* POSIX_THREADS or compatible + * This is a draft 10 or standard pthreads implementation + */ + if ( pthread_create( &(sglob->fm_tid), &attr, (void *) fm, (void *) NULL ) + != 0 ) { + Debug( LDAP_DEBUG_ANY, "file manager pthread_create failed\n", + 0, 0, 0 ); + exit( 1 ); + + } +#else /* !THREAD_MIT_PTHREADS */ + /* + * This is a draft 4 or earlier pthreads implementation + */ if ( pthread_create( &(sglob->fm_tid), attr, (void *) fm, (void *) NULL ) != 0 ) { Debug( LDAP_DEBUG_ANY, "file manager pthread_create failed\n", @@ -128,17 +145,26 @@ main( exit( 1 ); } +#endif /* !THREAD_MIT_PTHREADS */ pthread_attr_destroy( &attr ); /* * Wait for the fm thread to finish. */ +#ifdef POSIX_THREADS + pthread_join( sglob->fm_tid, (void *) NULL ); +#else pthread_join( sglob->fm_tid, (void *) &status ); +#endif /* * Wait for the replica threads to finish. */ for ( i = 0; sglob->replicas[ i ] != NULL; i++ ) { +#ifdef POSIX_THREADS + pthread_join( sglob->replicas[ i ]->ri_tid, (void *) NULL ); +#else pthread_join( sglob->replicas[ i ]->ri_tid, (void *) &status ); +#endif } Debug( LDAP_DEBUG_ANY, "slurpd: terminating normally\n", 0, 0, 0 ); sglob->slurpd_shutdown = 1; diff --git a/servers/slurpd/re.c b/servers/slurpd/re.c index f8ec36d038..64f9225ddb 100644 --- a/servers/slurpd/re.c +++ b/servers/slurpd/re.c @@ -18,7 +18,6 @@ */ -#define DISABLE_BRIDGE #include "portable.h" #include diff --git a/servers/slurpd/reject.c b/servers/slurpd/reject.c index 6ba2c8e34c..95ae7b7e62 100644 --- a/servers/slurpd/reject.c +++ b/servers/slurpd/reject.c @@ -17,7 +17,6 @@ * to a replica LDAP server. */ -#define DISABLE_BRIDGE #include "portable.h" #include diff --git a/servers/slurpd/replica.c b/servers/slurpd/replica.c index ed25a62907..38da5edaf8 100644 --- a/servers/slurpd/replica.c +++ b/servers/slurpd/replica.c @@ -15,6 +15,7 @@ * replica.c - code to start up replica threads. */ +#include "portable.h" #include @@ -57,8 +58,26 @@ start_replica_thread( pthread_attr_t attr; pthread_attr_init( &attr ); +#ifdef NOTDEF + /* if main wants to join with us, we shouldn't detach */ pthread_attr_setdetachstate( &attr, PTHREAD_CREATE_DETACHED ); +#endif +#ifndef THREAD_MIT_PTHREADS + /* POSIX_THREADS or compatible + * This is a draft 10 or standard pthreads implementation + */ + if ( pthread_create( &(ri->ri_tid), &attr, (void *) replicate, + (void *) ri ) != 0 ) { + Debug( LDAP_DEBUG_ANY, "replica \"%s:%d\" pthread_create failed\n", + ri->ri_hostname, ri->ri_port, 0 ); + pthread_attr_destroy( &attr ); + return -1; + } +#else /* !THREAD_MIT_PTHREADS */ + /* + * This is a draft 4 or earlier pthreads implementation + */ if ( pthread_create( &(ri->ri_tid), attr, (void *) replicate, (void *) ri ) != 0 ) { Debug( LDAP_DEBUG_ANY, "replica \"%s:%d\" pthread_create failed\n", @@ -66,6 +85,7 @@ start_replica_thread( pthread_attr_destroy( &attr ); return -1; } +#endif /* !THREAD_MIT_PTHREADS */ pthread_attr_destroy( &attr ); return 0; } diff --git a/servers/slurpd/replog.c b/servers/slurpd/replog.c index eb53bf1053..a9ecdb7ecc 100644 --- a/servers/slurpd/replog.c +++ b/servers/slurpd/replog.c @@ -15,10 +15,8 @@ * replog.c - routines which read and write replication log files. */ -#define DISABLE_BRIDGE #include "portable.h" - #include #include #include diff --git a/servers/slurpd/ri.c b/servers/slurpd/ri.c index cc478d1e6a..e11fc30f7b 100644 --- a/servers/slurpd/ri.c +++ b/servers/slurpd/ri.c @@ -17,6 +17,7 @@ */ +#include "portable.h" #include #include @@ -60,7 +61,11 @@ Ri_process( int rc ; char *errmsg; +#ifdef SIGSTKFLT + (void) SIGNAL( SIGSTKFLT, (void *) do_nothing ); +#else (void) SIGNAL( SIGUSR1, (void *) do_nothing ); +#endif (void) SIGNAL( SIGPIPE, SIG_IGN ); if ( ri == NULL ) { Debug( LDAP_DEBUG_ANY, "Error: Ri_process: ri == NULL!\n", 0, 0, 0 ); @@ -146,7 +151,8 @@ Ri_process( /* - * Wake a replication thread which may be sleeping. Send it a SIGUSR1. + * Wake a replication thread which may be sleeping. + * Send it a SIG(STKFLT|USR1). */ static void Ri_wake( @@ -156,8 +162,13 @@ Ri_wake( if ( ri == NULL ) { return; } +#ifdef SIGSTKFLT + pthread_kill( ri->ri_tid, SIGSTKFLT ); + (void) SIGNAL( SIGSTKFLT, (void *) do_nothing ); +#else pthread_kill( ri->ri_tid, SIGUSR1 ); (void) SIGNAL( SIGUSR1, (void *) do_nothing ); +#endif } diff --git a/servers/slurpd/rq.c b/servers/slurpd/rq.c index 845a7a7d34..260872b7d9 100644 --- a/servers/slurpd/rq.c +++ b/servers/slurpd/rq.c @@ -31,7 +31,6 @@ * */ -#define DISABLE_BRIDGE #include "portable.h" #include diff --git a/servers/slurpd/sanity.c b/servers/slurpd/sanity.c index 04be7db86a..240e479e4a 100644 --- a/servers/slurpd/sanity.c +++ b/servers/slurpd/sanity.c @@ -18,6 +18,8 @@ * feedback to the users. */ +#include "portable.h" + #include #include #include diff --git a/servers/slurpd/slurp.h b/servers/slurpd/slurp.h index 622cd38374..d493745d22 100644 --- a/servers/slurpd/slurp.h +++ b/servers/slurpd/slurp.h @@ -17,6 +17,8 @@ #define LDAP_SYSLOG +#include "portable.h" + #include #include #include @@ -24,7 +26,6 @@ #include "lber.h" #include "ldap.h" #include "lthread.h" -#include "portable.h" #include "ldapconfig.h" #include "ldif.h" @@ -135,6 +136,7 @@ #define RETRY_SLEEP_TIME 60 +LDAP_BEGIN_DECL /* * **************************************************************************** @@ -335,15 +337,11 @@ typedef struct tsl { /* * Public functions used to instantiate and initialize queue objects. */ -#ifdef NEEDPROTOS -extern int Ri_init( Ri **ri ); -extern int Rq_init( Rq **rq ); -extern int Re_init( Re **re ); -#else /* NEEDPROTOS */ -extern int Ri_init(); -extern int Rq_init(); -extern int Re_init(); -#endif /* NEEDPROTOS */ +extern int Ri_init LDAP_P(( Ri **ri )); +extern int Rq_init LDAP_P(( Rq **rq )); +extern int Re_init LDAP_P(( Re **re )); + +LDAP_END_DECL #endif /* _SLURPD_H_ */ diff --git a/servers/slurpd/st.c b/servers/slurpd/st.c index a274674f35..64029e2dbb 100644 --- a/servers/slurpd/st.c +++ b/servers/slurpd/st.c @@ -16,7 +16,6 @@ * writing status information to disk. */ -#define DISABLE_BRIDGE #include "portable.h" #include diff --git a/servers/slurpd/tsleep.c b/servers/slurpd/tsleep.c index 5dc3ba3dea..3cb34708e4 100644 --- a/servers/slurpd/tsleep.c +++ b/servers/slurpd/tsleep.c @@ -24,6 +24,7 @@ * is so much simpler... */ +#include "portable.h" #include #include "slurp.h" From 50eef5455260e27babeb71133b8f7aafb6af5d3a Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 21 Oct 1998 02:22:05 +0000 Subject: [PATCH 116/148] Add byte ordering defines. --- include/ac/socket.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/include/ac/socket.h b/include/ac/socket.h index d6a3405702..b86b46dc59 100644 --- a/include/ac/socket.h +++ b/include/ac/socket.h @@ -74,5 +74,22 @@ #endif /* __alpha && !VMS */ +#ifndef BYTE_ORDER +/* + * Definitions for byte order, according to byte significance from low + * address to high. + */ +#define LITTLE_ENDIAN 1234 /* LSB first: i386, vax */ +#define BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */ +#define PDP_ENDIAN 3412 /* LSB first in word, MSW first in long */ + +/* assume autoconf's AC_C_BIGENDIAN has been run */ +#ifdef WORDS_BIGENDIAN +#define BYTE_ORDER BIG_ENDIAN +#else +#define BYTE_ORDER LITTLE_ENDIAN +#endif + +#endif /* BYTE_ORDER */ #endif /* _AC_SOCKET_H_ */ From 92b28cf3973c0d8c112d08cec8308b66464e9aab Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 21 Oct 1998 02:22:43 +0000 Subject: [PATCH 117/148] Fix BYTE_ORDER test. --- libraries/liblutil/sha1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/liblutil/sha1.c b/libraries/liblutil/sha1.c index 833317d708..a6153f1f8a 100644 --- a/libraries/liblutil/sha1.c +++ b/libraries/liblutil/sha1.c @@ -35,12 +35,12 @@ * blk0() and blk() perform the initial expand. * I got the idea of expanding during the round function from SSLeay */ -#if BYTE_ORDER = LITTLE_ENDIAN +#if BYTE_ORDER == LITTLE_ENDIAN # define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \ |(rol(block->l[i],8)&0x00FF00FF)) -#endif #else # define blk0(i) block->l[i] +#endif #define blk(i) (block->l[i&15] = rol(block->l[(i+13)&15]^block->l[(i+8)&15] \ ^block->l[(i+2)&15]^block->l[i&15],1)) From af40e0cea7192eed0b09dcf069361db2d3f5e07a Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 21 Oct 1998 02:27:59 +0000 Subject: [PATCH 118/148] The world is STDC. --- build/unproto/Makefile | 123 ----- build/unproto/README | 160 ------ build/unproto/acc.sh | 35 -- build/unproto/cpp.sh | 35 -- build/unproto/error.c | 97 ---- build/unproto/error.h | 6 - build/unproto/example.c | 222 --------- build/unproto/example.out | 271 ----------- build/unproto/hash.c | 54 --- build/unproto/stdarg.h | 90 ---- build/unproto/stddef.h | 23 - build/unproto/stdlib.h | 53 -- build/unproto/strsave.c | 71 --- build/unproto/symbol.c | 144 ------ build/unproto/symbol.h | 11 - build/unproto/tok_class.c | 432 ----------------- build/unproto/tok_io.c | 612 ----------------------- build/unproto/tok_pool.c | 103 ---- build/unproto/token.h | 55 --- build/unproto/unproto.1 | 152 ------ build/unproto/unproto.c | 999 -------------------------------------- build/unproto/varargs.c | 32 -- build/unproto/vstring.c | 122 ----- build/unproto/vstring.h | 15 - 24 files changed, 3917 deletions(-) delete mode 100644 build/unproto/Makefile delete mode 100644 build/unproto/README delete mode 100755 build/unproto/acc.sh delete mode 100755 build/unproto/cpp.sh delete mode 100644 build/unproto/error.c delete mode 100644 build/unproto/error.h delete mode 100644 build/unproto/example.c delete mode 100644 build/unproto/example.out delete mode 100644 build/unproto/hash.c delete mode 100644 build/unproto/stdarg.h delete mode 100644 build/unproto/stddef.h delete mode 100644 build/unproto/stdlib.h delete mode 100644 build/unproto/strsave.c delete mode 100644 build/unproto/symbol.c delete mode 100644 build/unproto/symbol.h delete mode 100644 build/unproto/tok_class.c delete mode 100644 build/unproto/tok_io.c delete mode 100644 build/unproto/tok_pool.c delete mode 100644 build/unproto/token.h delete mode 100644 build/unproto/unproto.1 delete mode 100644 build/unproto/unproto.c delete mode 100644 build/unproto/varargs.c delete mode 100644 build/unproto/vstring.c delete mode 100644 build/unproto/vstring.h diff --git a/build/unproto/Makefile b/build/unproto/Makefile deleted file mode 100644 index 2d7a98c7da..0000000000 --- a/build/unproto/Makefile +++ /dev/null @@ -1,123 +0,0 @@ -# @(#) Makefile 1.6 93/06/18 22:29:40 - -## BEGIN CONFIGURATION STUFF - -# In the unlikely case that your compiler has no hooks for alternate -# compiler passes, use a "cc cflags -E file.c | unproto >file.i" -# pipeline, then "cc cflags -c file.i" to compile the resulting -# intermediate file. -# -# Otherwise, the "/lib/cpp | unproto" pipeline can be packaged as an -# executable shell script (see the provided "cpp.sh" script) that should -# be installed as "/whatever/cpp". This script should then be specified -# to the C compiler as a non-default preprocessor. -# -# PROG = unproto -# PIPE = - -# The overhead and problems of shell script interpretation can be -# eliminated by having the unprototyper program itself open the pipe to -# the preprocessor. In that case, define the PIPE_THROUGH_CPP macro as -# the path name of the default C preprocessor (usually "/lib/cpp"), -# install the unprototyper as "/whatever/cpp" and specify that to the C -# compiler as a non-default preprocessor. -# -PROG = cpp -PIPE = -DPIPE_THROUGH_CPP=\"/lib/cpp\" - -# Some compilers complain about some #directives. The following is only a -# partial solution, because the directives are still seen by /lib/cpp. -# Be careful with filtering out #pragma, because some pre-ANSI compilers -# (SunOS) rely on its use. -# -# SKIP = -DIGNORE_DIRECTIVES=\"pragma\",\"foo\",\"bar\" -# -SKIP = - -# The bell character code depends on the character set. With ASCII, it is -# 7. Specify a string constant with exactly three octal digits. If you -# change this definition, you will have to update the example.out file. -# -BELL = -DBELL=\"007\" - -# Some C compilers have problems with "void". The nature of the problems -# depends on the age of the compiler. -# -# If your compiler does not understand "void" at all, compile with -# -DMAP_VOID. The unprototyper will replace "void *" by "char *", a -# (void) argument list by an empty one, and will replace all other -# instances of "void" by "int". -# -# If your compiler has problems with "void *" only, compile with -# -DMAP_VOID_STAR. The unprototyper will replace "void *" by "char *", -# and will replace a (void) argument list by an empty one. All other -# instances of "void" will be left alone. -# -# If neither of these are defined, (void) argument lists will be replaced -# by empty ones. -# -# MAP = -DMAP_VOID_STAR - -# Now that we have brought up the subject of antique C compilers, here's -# a couple of aliases that may be useful, too. -# -# ALIAS = -Dstrchr=index - -# If you need support for functions that implement ANSI-style variable -# length argument lists, edit the stdarg.h file provided with this -# package so that it contains the proper definitions for your machine. - -## END CONFIGURATION STUFF - -SHELL = /bin/sh - -CFILES = unproto.c tok_io.c tok_class.c tok_pool.c vstring.c symbol.c error.c \ - hash.c strsave.c -HFILES = error.h token.h vstring.h symbol.h -SCRIPTS = cpp.sh acc.sh -SAMPLES = stdarg.h stddef.h stdlib.h varargs.c example.c example.out -SOURCES = README $(CFILES) $(HFILES) Makefile $(SCRIPTS) $(SAMPLES) -FILES = $(SOURCES) unproto.1 -OBJECTS = tok_io.o tok_class.o tok_pool.o unproto.o vstring.o symbol.o error.o \ - hash.o strsave.o - -CFLAGS = -O $(PIPE) $(SKIP) $(BELL) $(MAP) $(ALIAS) -#CFLAGS = -O $(PIPE) $(SKIP) $(BELL) $(MAP) $(ALIAS) -p -Dstatic= -#CFLAGS = -g $(PIPE) $(SKIP) $(BELL) $(MAP) $(ALIAS) -DDEBUG - -$(PROG): $(OBJECTS) - $(CC) $(CFLAGS) -o $@ $(OBJECTS) $(MALLOC) - -# For linting, enable all bells and whistles. - -lint: - lint -DPIPE_THROUGH_CPP=\"foo\" -DIGNORE_DIRECTIVES=\"foo\",\"bar\" \ - $(BELL) -DMAP_VOID $(ALIAS) $(CFILES) - -# Testing requires that the program is compiled with -DDEBUG. - -test: $(PROG) cpp example.c example.out - ./cpp example.c >example.tmp - @echo the following diff command should produce no output - diff -b example.out example.tmp - rm -f example.tmp - -shar: $(FILES) - @shar $(FILES) - -archive: - $(ARCHIVE) $(SOURCES) - -clean: - rm -f *.o core cpp unproto mon.out varargs.o varargs example.tmp - -error.o : error.c token.h error.h Makefile -hash.o : hash.c Makefile -strsave.o : strsave.c error.h Makefile -symbol.o : symbol.c error.h token.h symbol.h Makefile -tok_class.o : tok_class.c error.h vstring.h token.h symbol.h Makefile -tok_io.o : tok_io.c token.h vstring.h error.h Makefile -tok_pool.o : tok_pool.c token.h vstring.h error.h Makefile -unproto.o : unproto.c vstring.h stdarg.h token.h error.h symbol.h Makefile -varargs.o : varargs.c stdarg.h Makefile -vstring.o : vstring.c vstring.h Makefile diff --git a/build/unproto/README b/build/unproto/README deleted file mode 100644 index 10748743ec..0000000000 --- a/build/unproto/README +++ /dev/null @@ -1,160 +0,0 @@ -@(#) README 1.6 93/06/18 22:29:34 - -unproto - Compile ANSI C with traditional UNIX C compiler - -Description: ------------- - -This is a filter that sits in between the UNIX C preprocessor and the -next UNIX C compiler stage, on the fly transforming ANSI C syntax to -old C syntax. Line number information is preserved so that compiler -diagnostics still make sense. It runs at roughly the same speed as -/lib/cpp, so it has negligible impact on compilation time. - -Typically, the program is invoked by the native UNIX C compiler as an -alternate preprocessor. The unprototyper in turn invokes the native C -preprocessor and massages its output. Similar tricks can be used with -the lint(1) command. Details are given below. - -The filter rewrites ANSI-style function headings, function pointer -types and type casts, function prototypes, and combinations thereof. -Unlike some other unprototypers, this one is fully recursive and does -not depend on source file layout (see the example.c file). - -Besides the rewriting of argument lists, the program does the following -transformations: string concatenation, conversion of \a and \x escape -sequences to their octal equivalents, translation of the __TIME__ and -__DATE__ macros, optional mapping of `void *' to `char *', and optional -mapping of plain `void' to `int'. - -The unprototyper provides hooks for compilers that require special -tricks for variadic functions (fortunately, many don't). -support is provided for sparc, mips, mc68k, 80x86, vax, and others. - -The program has been tested with SunOS 4.1.1 (sparc), Ultrix 4.0 and -4.2 (mips), and Microport System V Release 2 (80286). It should work -with almost every PCC-based UNIX C compiler. - -Restrictions: -------------- - -A description of restrictions and workarounds can be found in the -unproto.1 manual page. - -Problems fixed with this release: ---------------------------------- - -Prototypes and definitions of functions returning pointer to function -were not rewritten to old style. - -Operation: ----------- - -This package implements a non-default C preprocessor (the output from -the default C preprocessor being piped through the unprototyper). How -one tells the C compiler to use a non-default preprocessor program is -somewhat compiler-dependent: - - SunOS 4.x: cc -Qpath directory_with_alternate_cpp ... - - Ultrix 4.x: cc -tp -hdirectory_with_alternate_cpp -B ... - - System V.2: cc -Bdirectory_with_alternate_cpp/ -tp ... - -Examples of these, and others, can be found in the acc.sh shell script -that emulates an ANSI C compiler. Your C compiler manual page should -provide the necessary information. - -A more portable, but less efficient, approach relies on the observation -that almost every UNIX C compiler supports the -E (write preprocessor -output to stdout) and -P options (preprocess file.c into file.i). Just -add the following lines to your Makefiles: - - .c.o: - $(CC) $(CFLAGS) -E $*.c | unproto >$*.i # simulate -P option - $(CC) $(CFLAGS) -c $*.i - rm -f $*.i - -On some systems the lint(1) command is just a shell script, and writing -a version that uses the unprototyper should not be too hard. With SunOS -4.x, /usr/bin/lint is not a shell script, but it does accept the same -syntax as the cc(1) command for the specification of a non-default -compiler pass. - -You may have to do some research on the lint command provided with your -own machine. - -Configuration: --------------- - -Check the contents of the `stdarg.h' file provided with this package. -This file serves a dual purpose: (1) on systems that do not provide a -stdarg.h file, it should be included by C source files that implements -ANSI-style variadic functions; (2) it is also used to configure the -unprototyper so that it emits the proper magic when it sees `...'. - -The `stdarg.h' file has support for sparc, mips, and for compilers that -pass arguments via the stack (typical for 80*86, mc68k and vax). It -gives general hints for other compilers. - -The other sample header files (stddef.h and stdlib.h) are not required -to build the unprototyper. - -The `varargs.c' file provided with this package can be used to verify -that the `stdarg.h' file has been set up correctly. - -If your C compiler has no hooks for an alternate preprocessor (the -unprototyper will be used as: `cc cflags -E file.c | unproto >file.i'), -build the `unproto' executable without the `PIPE_THROUGH_CPP' feature. -Details are given in the Makefile. - -Otherwise, the `cpp.sh' shell script can be used to set up the pipe -between the native C preprocessor and the unprototyper command. The -script assumes that the unprototyper binary is called `unproto', and -that it was compiled without the `PIPE_THROUGH_CPP' feature. See the -Makefile and the `cpp.sh' script for details and for a description of -possible problems with this approach. - -The overhead and problems of shell-script interpretation can be avoided -by letting the unprototyper itself pipe its standard input through the -C preprocessor. For this mode of operation, the unprototyper binary -should be called `cpp', and the `unproto.c' source file should be -compiled with the `PIPE_THROUGH_CPP' macro defined as the absolute -pathname of the native C preprocessor (usually `/lib/cpp'). See the -Makefile for details. - -Installation: -------------- - -Install the `unproto.1' manual page in a suitable place. If your system -does not provide a `stdarg.h' file, find a suitable place for the one -provided with the unprototyper and install it there. The same goes for -the sample stddef.h and stdlib.h files; make sure that the definitions -in there apply to your environment. Most or all of the latter files are -already part of Ultrix 4.x and SunOS 4.1.1. - -The ANSI float.h and limits.h files can be generated with the config -program by Steve Pemberton (comp.sources.misc volume 10, issue 62, -available from ftp.uu.net as comp.sources.misc/volume10/config42.Z). - -If you run the unprototyper with "cc -E" just install the `unproto' -binary; the `cpp' and `acc' shell scripts will not be needed. - -If you use the `cpp' shell script to pipe the preprocessor output -through the unprototyper program, install the `unproto' binary in a -place where the `cpp' shell script can find it, and install the `cpp' -shell script in a suitable place. Edit the `acc' shell script and -install it in a suitable place. From now on, type `acc' instead of -`cc'. - -If the unprototyper itself opens the pipe to the C preprocessor (i.e. -the unprototyper was built with the `PIPE_THROUGH_CPP' macro defined), -install the `cpp' unprototyper binary in a suitable place. Edit the -`acc' shell script and install it in a suitable place. From now on, -type `acc' instead of `cc'. - - Wietse Venema - wietse@wzv.win.tue.nl - Mathematics and Computing Science - Eindhoven University of Technology - The Netherlands diff --git a/build/unproto/acc.sh b/build/unproto/acc.sh deleted file mode 100755 index 124e700d01..0000000000 --- a/build/unproto/acc.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -# @(#) acc.sh 1.1 93/06/18 22:29:42 -# -# Script to emulate most of an ANSI C compiler with a traditional UNIX -# C compiler. - -# INCDIR should be the directory with auxiliary include files from the -# unproto source distribution (stdarg.h, stdlib.h, stddef.h, and other -# stuff that is missing from your compilation environment). With Ultrix -# 4.[0-2] you need unproto's stdarg.h even though the system provides -# one. -# -INCDIR=. - -# CPPDIR should be the directory with the unprototypeing cpp filter -# (preferably the version with the PIPE_THROUGH_CPP feature). -# -CPPDIR=. - -# DEFINES: you will want to define volatile and const, and maybe even -# __STDC__. -# -DEFINES="-Dvolatile= -Dconst= -D__STDC__" - -# Possible problem: INCDIR should be listed after the user-specified -I -# command-line options, not before them as we do here. This is a problem -# only if you attempt to redefine system libraries. -# -# Choose one of the commands below that is appropriate for your system. -# -exec cc -Qpath ${CPPDIR} -I${INCDIR} ${DEFINES} "$@" # SunOS 4.x -exec cc -tp -h${CPPDIR} -B -I${INCDIR} ${DEFINES} "$@" # Ultrix 4.2 -exec cc -Yp,${CPPDIR} -I${INCDIR} ${DEFINES} "$@" # M88 SysV.3 -exec cc -B${CPPDIR}/ -tp -I${INCDIR} ${DEFINES} "$@" # System V.2 diff --git a/build/unproto/cpp.sh b/build/unproto/cpp.sh deleted file mode 100755 index a0391461ea..0000000000 --- a/build/unproto/cpp.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -# @(#) cpp.sh 1.3 92/01/15 21:53:22 - -# Unprototypeing preprocessor for pre-ANSI C compilers. On some systems, -# this script can be as simple as: -# -# /lib/cpp "$@" | unproto -# -# However, some cc(1) drivers specify output file names on the -# preprocessor command line, so this shell script must be prepared to -# intercept them. Depending on the driver program, the cpp options may -# even go before or after the file name argument(s). The script below -# tries to tackle all these cases. -# -# You may want to add -Ipath_to_stdarg.h_file, -Dvoid=, -Dvolatile=, -# and even -D__STDC__. - -cpp_args="" - -while : -do - case $1 in - "") break;; - -*) cpp_args="$cpp_args $1";; - *) cpp_args="$cpp_args $1" - case $2 in - ""|-*) ;; - *) exec 1> $2 || exit 1; shift;; - esac;; - esac - shift -done - -/lib/cpp $cpp_args | unproto diff --git a/build/unproto/error.c b/build/unproto/error.c deleted file mode 100644 index 667d978cbb..0000000000 --- a/build/unproto/error.c +++ /dev/null @@ -1,97 +0,0 @@ -/*++ -/* NAME -/* error 3 -/* SUMMARY -/* diagnostics -/* PACKAGE -/* unproto -/* SYNOPSIS -/* #include "error.h" -/* -/* int errcount; -/* -/* void error(text) -/* char *text; -/* -/* void error_where(path, line, text) -/* char *path; -/* int line; -/* char *text; -/* -/* void fatal(text) -/* char *text; -/* DESCRIPTION -/* The routines in this file print a diagnostic (text). Some also -/* terminate the program. Upon each error*() call, the errcount variable -/* is incremented. -/* -/* error() provides a default context, i.e. the source-file -/* coordinate of the last read token. -/* -/* error_where() allows the caller to explicitly specify context: path -/* is a source-file name, and line is a line number. -/* -/* fatal() is like error() but terminates the program with a non-zero -/* exit status. -/* -/* context is ignored if the line number is zero or if the path -/* is an empty string. -/* AUTHOR(S) -/* Wietse Venema -/* Eindhoven University of Technology -/* Department of Mathematics and Computer Science -/* Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands -/* LAST MODIFICATION -/* 92/01/15 21:53:10 -/* VERSION/RELEASE -/* 1.2 -/*--*/ - -static char error_sccsid[] = "@(#) error.c 1.2 92/01/15 21:53:10"; - -/* C library */ - -#include - -extern void exit(); - -/* Application-specific stuff */ - -#include "token.h" -#include "error.h" - -int errcount = 0; /* error counter */ - -/* error - report problem (implicit context) */ - -void error(text) -char *text; -{ - error_where(in_path, in_line, text); -} - -/* error_where - report problem (explicit context) */ - -void error_where(path, line, text) -char *path; -int line; -char *text; -{ - errcount++; - - /* Suppress context info if there is none. */ - - if (line && path[0]) - fprintf(stderr, "%s, line %d: ", path, line); - - fprintf(stderr, "%s\n", text); -} - -/* fatal - report problem and terminate unsuccessfully */ - -void fatal(text) -char *text; -{ - error(text); - exit(1); -} diff --git a/build/unproto/error.h b/build/unproto/error.h deleted file mode 100644 index dfb27e9067..0000000000 --- a/build/unproto/error.h +++ /dev/null @@ -1,6 +0,0 @@ -/* @(#) error.h 1.2 92/01/15 21:53:14 */ - -extern int errcount; /* error counter */ -extern void error(); /* default context */ -extern void error_where(); /* user-specified context */ -extern void fatal(); /* fatal error */ diff --git a/build/unproto/example.c b/build/unproto/example.c deleted file mode 100644 index bf2f838f2a..0000000000 --- a/build/unproto/example.c +++ /dev/null @@ -1,222 +0,0 @@ - /* - * @(#) example.c 1.5 93/06/18 22:29:46 - * - * Examples of things that can be done with the unproto package - */ - -typedef char *charstar; - - /* - * New-style argument list with structured argument, one field being pointer - * to function returning pointer to function with function-pointer argument - */ - -x(struct { - struct { - int (*(*foo) (int (*arg1) (double))) (float arg2); - } foo; -} baz) { - return (0); -} - - /* New-style function-pointer declaration. */ - -int (*(*bar0) (float)) (int); - - /* Old-style argument list with new-style argument type. */ - -baz0(bar) -int (*(*bar) (float)) (int); -{} - - /* - * New-style argument list with new-style argument type, declaration - * embedded within block. Plus a couple assignments with function calls that - * look like casts. - */ - -foo(int (*(*bar) (float)) (int)) -{ - int (*baz) (int) = (int (*) (int)) 0, - y = (y * (*baz) (y)), - *(*z) (int) = (int *(*) (int)) 0; - - struct { int (*foo)(int); } *(*s)(int) = - (struct { int (*foo)(int); } *(*)(int)) 0; - - { - y = (y * (*baz) (y)); - } - { - z = (int *(*) (int)) 0; - } - { - s = (struct { int (*foo)(int); } *(*)(int)) 0; - } - - return (0); -} - -/* Multiple declarations in one statement */ - -test1() -{ - int foo2,*(*(*bar)(int))(float),*baz(double); -} - -/* Discriminate declarations from executable statements */ - -test2(charstar y) -{ - int foo = 5,atoi(charstar); - - foo = 5,atoi(y); -} - -/* Declarations without explicit type */ - -test3,test4(int); - -test5(int y) -{ - { - test3; - } - { - test4(y); - } -} - -test6[1],test7(int); - -test7(int x) -{ - { - test6[1]; - } - { - test7(x); - } -} - -/* Checking a complicated cast */ - -struct { - struct { - int (*f)(int), o; - } bar; -} (*baz2)(int) = (struct { struct { int (*f)(int), o; } bar; } (*)(int)) 0; - -/* Distinguish things with the same shape but with different meaning */ - -test8(x) -{ - { - struct { - int foo; - } bar(charstar); - } - { - do { - int foo; - } while (x); - } -} - -/* Do not think foo(*bar) is a function pointer declaration */ - -test9(char *bar) -{ - foo(*bar); -} - -/* another couple of special-cased words. */ - -test10(int x) -{ - { - int test10(int); - do test10(x); - while (x); - } - { - return test10(x); - } -} - -test11(int *x) -{ - while (*x) - (putchar(*x++)); -} - -test11a(int *x) -{ - for (*x;;) - (putchar(*x++)); -} - -/* #include directive between stuff that requires lookahead */ - -test12() -{ - char *x = "\xf\0002\002\02\2" /* foo */ -#include "/dev/null" - "\abar"; - - printf("foo" /* 1 */ "bar" /* 2 */ "baz"); - - *x = '\a'; - *x = '\xff'; -} - -int test13(void); - -/* line continuations in the middle of tokens */ - -te\ -st14(); -charstar test15 = "foo\ -bar"; -char test16 = "foo\\ -abar"; - -/* Array dimensions with unexpanded macros */ - -test17(charstar foo[bar]){} - -int (*(*test18[bar])(charstar))(charstar) = \ - (int (*(*[bar])(charstar))(charstar)) 0; - -/* Function returning pointer to function */ - -int (*(*test19(long))(int))(double); - -/* GCC accepts the following stuff, K&R C does not... */ - -void test20(int test21(double)) {} - -void test22(struct { int foo; } test23(short)) {} - -/* Do not blindly rewrite (*name(stuff))(otherstuff) */ - -void test23() -{ - int (*test24(int)) (int), - y = (*test24(2)) (3), - z = ((*test24(2)) (3)); -} - -/* Function returning pointer to function */ - -int (*(*test25(long foo))(int bar))(double baz){ /* body */ } - -int (*(*test26(foo))())() -long foo; -{ /* body */ } - -#define ARGSTR() struct {int l; char c[1];} - -void functie(ARGSTR() *cmdlin, ARGSTR() *c1) -{ -} diff --git a/build/unproto/example.out b/build/unproto/example.out deleted file mode 100644 index 0b14e1b8ae..0000000000 --- a/build/unproto/example.out +++ /dev/null @@ -1,271 +0,0 @@ -# 1 "example.c" - - - - - - -typedef char *charstar; - - - - - - -x( - - - -baz) -# 14 "example.c" -struct { - struct { - int (*(*foo)())(); - } foo; -} baz; -# 18 "example.c" -{/*1*/ - /* end dcls */return (0); -}/*1*/ - - - -int (*(*bar0)())(); - - - -baz0(bar) -int (*(*bar)())(); -{/*1*/}/*1*/ - - - - - - - -foo(bar) -# 38 "example.c" -int (*(*bar)())(); -{/*1*/ - int (*baz)()= (int (*)()) 0, - y = (y * (*baz)(y)), - *(*z)()= (int *(*)()) 0; - - struct {/*2*/ int (*foo)(); }/*2*/ *(*s)()= - (struct { int (*foo)(); } *(*)()) 0; - - /* end dcls */{/*2*/ - y /* end dcls */= (y * (*baz)(y)); - }/*2*/ - {/*2*/ - z /* end dcls */= (int *(*)()) 0; - }/*2*/ - {/*2*/ - s /* end dcls */= (struct { int (*foo)(); } *(*)()) 0; - }/*2*/ - - return (0); -}/*1*/ - - - -test1() -{/*1*/ - int foo2,*(*(*bar)())(),*baz(); -}/*1*/ - - - -test2(y) -# 69 "example.c" -charstar y; -{/*1*/ - int foo = 5,atoi(); - - foo /* end dcls */= 5,atoi(y); -}/*1*/ - - - -test3,test4(); - -test5(y) -# 80 "example.c" -int y; -{/*1*/ - /* end dcls */{/*2*/ - test3/* end dcls */; - }/*2*/ - {/*2*/ - test4/* end dcls */(y); - }/*2*/ -}/*1*/ - -test6[1],test7(); - -test7(x) -# 92 "example.c" -int x; -{/*1*/ - /* end dcls */{/*2*/ - test6/* end dcls */[1]; - }/*2*/ - {/*2*/ - test7/* end dcls */(x); - }/*2*/ -}/*1*/ - - - -struct {/*1*/ - struct {/*2*/ - int (*f)(), o; - }/*2*/ bar; -}/*1*/ (*baz2)()= (struct { struct { int (*f)(), o; } bar; } (*)()) 0; - - - -test8(x) -{/*1*/ - /* end dcls */{/*2*/ - struct {/*3*/ - int foo; - }/*3*/ bar(); - }/*2*/ - {/*2*/ - /* end dcls */do {/*3*/ - int foo; - }/*3*/ while (x); - }/*2*/ -}/*1*/ - - - -test9(bar) -# 128 "example.c" -char *bar; -{/*1*/ - foo/* end dcls */(*bar); -}/*1*/ - - - -test10(x) -# 135 "example.c" -int x; -{/*1*/ - /* end dcls */{/*2*/ - int test10(); - /* end dcls */do test10(x); - while (x); - }/*2*/ - {/*2*/ - /* end dcls */return test10(x); - }/*2*/ -}/*1*/ - -test11(x) -# 147 "example.c" -int *x; -{/*1*/ - /* end dcls */while (*x) - (putchar(*x++)); -}/*1*/ - -test11a(x) -# 153 "example.c" -int *x; -{/*1*/ - /* end dcls */for (*x;;) - (putchar(*x++)); -}/*1*/ - - - -test12() -{/*1*/ - char *x = -# 1 "/dev/null" 1 -# 165 "example.c" 2 -# 163 "example.c" -"\017\0002\002\002\002\007bar" - - ; - - printf/* end dcls */("foobarbaz" ); - - *x = '\007'; - *x = '\377'; -}/*1*/ - -int test13(); - - - -test14(); - -charstar test15 = "foobar"; - -char test16 = "foo\007bar"; - - - - -test17(foo) -# 186 "example.c" -charstar foo[bar]; -# 186 "example.c" -{/*1*/}/*1*/ - -int (*(*test18[bar])())()= (int (*(*[bar])())()) 0; - - - - -int (*(*test19())())(); - - - -void test20(test21) -# 197 "example.c" -int test21(); -# 197 "example.c" -{/*1*/}/*1*/ - -void test22(test23) -# 199 "example.c" -struct { int foo; } test23(); -# 199 "example.c" -{/*1*/}/*1*/ - - - -void test23() -{/*1*/ - int (*test24())(), - y = (*test24(2)) (3), - z = ((*test24(2))(3)); -}/*1*/ - - - -int (*(*test25(foo))())() -# 212 "example.c" -long foo; -# 212 "example.c" -{/*1*/ }/*1*/ - -int (*(*test26(foo))())() -long foo; -{/*1*/ }/*1*/ - - - -void functie(cmdlin,c1) -# 220 "example.c" -struct {int l; char c[1];} *cmdlin; -# 220 "example.c" -struct {int l; char c[1];} *c1; -{/*1*/ -}/*1*/ diff --git a/build/unproto/hash.c b/build/unproto/hash.c deleted file mode 100644 index 153f6b7df9..0000000000 --- a/build/unproto/hash.c +++ /dev/null @@ -1,54 +0,0 @@ -/*++ -/* NAME -/* hash 3 -/* SUMMARY -/* compute hash value for string -/* SYNOPSIS -/* int hash(string, size) -/* char *string; -/* int size; -/* DESCRIPTION -/* This function computes for the given null-terminated string an -/* integer hash value in the range 0..size-1. -/* SEE ALSO -/* .fi -/* Alfred V. Aho, Ravi Sethi and Jeffrey D. Ullman: Compilers: -/* principles, techniques and tools; Addison-Wesley, Amsterdam, 1986. -/* AUTHOR(S) -/* Wietse Venema -/* Eindhoven University of Technology -/* Department of Mathematics and Computer Science -/* Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands -/* -/* Originally written by: P. J. Weinberger at Bell Labs. -/* LAST MODIFICATION -/* 92/01/15 21:53:12 -/* VERSION/RELEASE -/* %I -/*--*/ - -static char hash_sccsid[] = "@(#) hash.c 1.1 92/01/15 21:53:12"; - -/* hash - hash a string; original author: P. J. Weinberger at Bell Labs. */ - -int hash(s, size) -register char *s; -unsigned size; -{ - register unsigned long h = 0; - register unsigned long g; - - /* - * For a performance comparison with the hash function presented in K&R, - * first edition, see the "Dragon" book by Aho, Sethi and Ullman. - */ - - while (*s) { - h = (h << 4) + *s++; - if (g = (h & 0xf0000000)) { - h ^= (g >> 24); - h ^= g; - } - } - return (h % size); -} diff --git a/build/unproto/stdarg.h b/build/unproto/stdarg.h deleted file mode 100644 index 20f6fe7727..0000000000 --- a/build/unproto/stdarg.h +++ /dev/null @@ -1,90 +0,0 @@ - /* - * @(#) stdarg.h 1.4 93/06/18 22:29:44 - * - * Sample stdarg.h file for use with the unproto filter. - * - * This file serves two purposes. - * - * 1 - On systems that do not have a /usr/include/stdarg.h file, it should be - * included by C source files that implement ANSI-style variadic functions. - * Ultrix 4.[0-2] comes with stdarg.h but still needs the one that is - * provided with the unproto filter. - * - * 2 - To configure the unprototyper itself. If the _VA_ALIST_ macro is - * defined, its value will appear in the place of the "..." at the end of - * argument lists of variadic function *definitions* (not declarations). - * Some compilers (such as Greenhills m88k) have a non-empty va_dcl - * definition in the system header file varargs.h. If that is the case, - * define "_VA_DCL_" with the same value as va_dcl. If _VA_DCL_ is defined, - * the unprototyper will emit its value just before the opening "{". - * - * Compilers that always pass arguments via the stack can use the default code - * at the end of this file (this usually applies for the vax, mc68k and - * 80*86 architectures). - * - * Special tricks are needed for compilers that pass some or all function - * arguments via registers. Examples of the latter are given for the mips - * and sparc architectures. Usually the compiler special-cases an argument - * declaration such as "va_alist" or "__builtin_va_alist". For inspiration, - * see the local /usr/include/varargs.h file. - * - * You can use the varargs.c program provided with the unproto package to - * verify that the stdarg.h file has been set up correctly. - */ - -#ifdef sparc /* tested with SunOS 4.1.1 */ - -#define _VA_ALIST_ "__builtin_va_alist" -typedef char *va_list; -#define va_start(ap, p) (ap = (char *) &__builtin_va_alist) -#define va_arg(ap, type) ((type *) __builtin_va_arg_incr((type *) ap))[0] -#define va_end(ap) - -#else -#ifdef mips /* tested with Ultrix 4.0 and 4.2 */ - -#define _VA_ALIST_ "va_alist" -#include "/usr/include/stdarg.h" - -#else -#ifdef m88k /* Motorola SYSTEM V/88 R32V3 */ - -#define _VA_ALIST_ "va_alist" -#define _VA_DCL_ "va_type va_alist;" -typedef struct _va_struct { - int va_narg; - int *va_stkaddr; - int *va_iregs; -} va_list; -#define va_start(ap, p) \ -((ap).va_narg=(int *)&va_alist-va_stkarg, \ - (ap).va_stkaddr=va_stkarg, \ - (ap).va_iregs=(int *)va_intreg) -#define va_end(p) -#if defined(LittleEndian) -#define va_arg(p,mode) \ - (*(mode *)_gh_va_arg(&p, va_align(mode), va_regtyp(mode), sizeof(mode))) -#else /* defined(LittleEndian) */ -#define va_arg(p,mode) ( \ - (p).va_narg += ((p).va_narg & (va_align(mode) == 8)) + \ - (sizeof(mode)+3)/4, \ - ((mode *)((va_regtyp(mode) && (p).va_narg <= 8 ? \ - (p).va_iregs: \ - (p).va_stkaddr) + (p).va_narg))[-1]) -#endif /* defined(LittleEndian) */ - -#else -#ifdef hpux -#include - -#else /* vax, mc68k, 80*86 */ - -typedef char *va_list; -#define va_start(ap, p) (ap = (char *) (&(p)+1)) -#define va_arg(ap, type) ((type *) (ap += sizeof(type)))[-1] -#define va_end(ap) - -#endif /* hpux */ -#endif /* m88k */ -#endif /* mips */ -#endif /* sparc */ diff --git a/build/unproto/stddef.h b/build/unproto/stddef.h deleted file mode 100644 index 97dbc01048..0000000000 --- a/build/unproto/stddef.h +++ /dev/null @@ -1,23 +0,0 @@ -/* @(#) stddef.h 1.1 92/02/15 17:25:46 */ - -#ifndef _stddef_h_ -#define _stddef_h_ - -/* NULL is also defined in */ - -#ifndef NULL -#define NULL 0 -#endif - -/* Structure member offset - some compilers barf on this. */ - -#define offsetof(type, member) ((size_t) &((type *)0)->member) - -/* Some of the following types may already be defined in . */ - -/* #include */ -/* typedef long ptrdiff_t; /* type of pointer difference */ -/* typedef unsigned short wchar_t; /* wide character type */ -/* typedef unsigned size_t; /* type of sizeof */ - -#endif /* _stddef_h_ */ diff --git a/build/unproto/stdlib.h b/build/unproto/stdlib.h deleted file mode 100644 index 78d99dd983..0000000000 --- a/build/unproto/stdlib.h +++ /dev/null @@ -1,53 +0,0 @@ -/* @(#) stdlib.h 1.1 92/02/15 17:25:45 */ - -#ifndef _stdlib_h_ -#define _stdlib_h_ - -/* NULL is also defined in */ - -#ifndef NULL -#define NULL 0 -#endif - -/* - * Some functions in this file will be missing from the typical pre-ANSI - * UNIX library. Some pre-ANSI UNIX library functions have return types - * that differ from what ANSI requires. - */ - -extern double atof(); -extern int atoi(); -extern long atol(); -extern double strtod(); -extern long strtol(); -extern unsigned long strtoul(); -extern int rand(); -extern void srand(); -extern char *calloc(); -extern char *malloc(); -extern char *realloc(); -extern void free(); -extern void abort(); -extern void exit(); -extern int atextit(); -extern int system(); -extern char *getenv(); -extern char *bsearch(); -extern void qsort(); -extern int abs(); -extern long labs(); - -typedef struct { - int quot; - int rem; -} div_t; - -typedef struct { - long quot; - long rem; -} ldiv_t; - -extern div_t div(); -extern ldiv_t ldiv(); - -#endif /* _stdlib_h_ */ diff --git a/build/unproto/strsave.c b/build/unproto/strsave.c deleted file mode 100644 index c2a4b15e5b..0000000000 --- a/build/unproto/strsave.c +++ /dev/null @@ -1,71 +0,0 @@ -/*++ -/* NAME -/* strsave 3 -/* SUMMARY -/* maintain unique copy of a string -/* SYNOPSIS -/* char *strsave(string) -/* char *string; -/* DESCRIPTION -/* This function returns a pointer to an unique copy of its -/* argument. -/* DIAGNOSTISC -/* strsave() calls fatal() when it runs out of memory. -/* AUTHOR(S) -/* Wietse Venema -/* Eindhoven University of Technology -/* Department of Mathematics and Computer Science -/* Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands -/* LAST MODIFICATION -/* 92/01/15 21:53:13 -/* VERSION/RELEASE -/* 1.1 -/*--*/ - -static char strsave_sccsid[] = "@(#) strsave.c 1.1 92/01/15 21:53:13"; - -/* C library */ - -extern char *strcpy(); -extern char *malloc(); - -/* Application-specific stuff */ - -#include "error.h" - -#define STR_TABSIZE 100 - -struct string { - char *strval; /* unique string copy */ - struct string *next; /* next one in hash chain */ -}; - -static struct string *str_tab[STR_TABSIZE] = {0,}; - -/* More string stuff. Maybe it should go to an #include file. */ - -#define STREQ(x,y) (*(x) == *(y) && strcmp((x),(y)) == 0) - -/* strsave - save unique copy of string */ - -char *strsave(str) -register char *str; -{ - register struct string *s; - register int where = hash(str, STR_TABSIZE); - - /* Look for existing entry. */ - - for (s = str_tab[where]; s; s = s->next) - if (STREQ(str, s->strval)) - return (s->strval); - - /* Add new entry. */ - - if ((s = (struct string *) malloc(sizeof(*s))) == 0 - || (s->strval = malloc(strlen(str) + 1)) == 0) - fatal("out of memory"); - s->next = str_tab[where]; - str_tab[where] = s; - return (strcpy(s->strval, str)); -} diff --git a/build/unproto/symbol.c b/build/unproto/symbol.c deleted file mode 100644 index ce9f7d9a01..0000000000 --- a/build/unproto/symbol.c +++ /dev/null @@ -1,144 +0,0 @@ -/*++ -/* NAME -/* symbol 3 -/* SUMMARY -/* rudimentary symbol table package -/* SYNOPSIS -/* #include "symbol.h" -/* -/* void sym_init() -/* -/* void sym_enter(name, type) -/* char *name; -/* int type; -/* -/* struct symbol *sym_find(name) -/* char *name; -/* DESCRIPTION -/* This is a rudimentary symbol-table package, just enough to -/* keep track of a couple of C keywords. -/* -/* sym_init() primes the table with C keywords. At present, most of -/* the keywords that have to do with types are left out. -/* We need a different strategy to detect type definitions because -/* we do not keep track of typedef names. -/* -/* sym_enter() adds an entry to the symbol table. -/* -/* sym_find() locates a symbol table entry (it returns 0 if -/* it is not found). -/* AUTHOR(S) -/* Wietse Venema -/* Eindhoven University of Technology -/* Department of Mathematics and Computer Science -/* Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands -/* LAST MODIFICATION -/* 92/02/15 18:59:56 -/* VERSION/RELEASE -/* 1.4 -/*--*/ - -static char symbol_sccsid[] = "@(#) symbol.c 1.4 92/02/15 18:59:56"; - -/* C library */ - -extern char *strcpy(); -extern char *malloc(); - -/* Application-specific stuff */ - -#include "error.h" -#include "token.h" -#include "symbol.h" - -#define SYM_TABSIZE 20 - -static struct symbol *sym_tab[SYM_TABSIZE] = {0,}; - -/* More string stuff. Maybe it should go to an #include file. */ - -#define STREQ(x,y) (*(x) == *(y) && strcmp((x),(y)) == 0) - -/* sym_enter - enter symbol into table */ - -void sym_enter(name, type) -char *name; -int type; -{ - struct symbol *s; - int where; - - if ((s = (struct symbol *) malloc(sizeof(*s))) == 0 - || (s->name = malloc(strlen(name) + 1)) == 0) - fatal("out of memory"); - (void) strcpy(s->name, name); - s->type = type; - - where = hash(name, SYM_TABSIZE); - s->next = sym_tab[where]; - sym_tab[where] = s; -} - -/* sym_find - locate symbol definition */ - -struct symbol *sym_find(name) -register char *name; -{ - register struct symbol *s; - - /* - * This function is called for almost every "word" token, so it better be - * fast. - */ - - for (s = sym_tab[hash(name, SYM_TABSIZE)]; s; s = s->next) - if (STREQ(name, s->name)) - return (s); - return (0); -} - - /* - * Initialization data for symbol table. We do not enter keywords for types. - * We use a different strategy to detect type declarations because we do not - * keep track of typedef names. - */ - -struct sym { - char *name; - int tokno; -}; - -static struct sym syms[] = { - "if", TOK_CONTROL, - "else", TOK_CONTROL, - "for", TOK_CONTROL, - "while", TOK_CONTROL, - "do", TOK_CONTROL, - "switch", TOK_CONTROL, - "case", TOK_CONTROL, - "default", TOK_CONTROL, - "return", TOK_CONTROL, - "continue", TOK_CONTROL, - "break", TOK_CONTROL, - "goto", TOK_CONTROL, - "struct", TOK_COMPOSITE, - "union", TOK_COMPOSITE, - "__DATE__", TOK_DATE, - "__TIME__", TOK_TIME, -#if defined(MAP_VOID_STAR) || defined(MAP_VOID) - "void", TOK_VOID, -#endif - "asm", TOK_OTHER, - 0, -}; - -/* sym_init - enter known keywords into symbol table */ - -void sym_init() -{ - register struct sym *p; - - for (p = syms; p->name; p++) - sym_enter(p->name, p->tokno); -} - diff --git a/build/unproto/symbol.h b/build/unproto/symbol.h deleted file mode 100644 index 0711c1f4dc..0000000000 --- a/build/unproto/symbol.h +++ /dev/null @@ -1,11 +0,0 @@ -/* @(#) symbol.h 1.1 91/09/22 21:21:42 */ - -struct symbol { - char *name; /* symbol name */ - int type; /* symbol type */ - struct symbol *next; -}; - -extern void sym_enter(); /* add symbol to table */ -extern struct symbol *sym_find(); /* locate symbol */ -extern void sym_init(); /* prime the table */ diff --git a/build/unproto/tok_class.c b/build/unproto/tok_class.c deleted file mode 100644 index 38ccd0d76e..0000000000 --- a/build/unproto/tok_class.c +++ /dev/null @@ -1,432 +0,0 @@ -/*++ -/* NAME -/* tok_class 3 -/* SUMMARY -/* token classification -/* PACKAGE -/* unproto -/* SYNOPSIS -/* #include "token.h" -/* -/* void tok_unget(t) -/* struct token *t; -/* -/* struct token *tok_class() -/* DESCRIPTION -/* tok_class() collects single and composite tokens, and -/* recognizes keywords. -/* At present, the only composite tokens are ()-delimited, -/* comma-separated lists, and non-whitespace tokens with attached -/* whitespace or comment tokens. -/* -/* Source transformations are: __DATE__ and __TIME__ are rewritten -/* to string constants with the current date and time, respectively. -/* Multiple string constants are concatenated. Optionally, "void *" -/* is mapped to "char *", and plain "void" to "int". -/* -/* tok_unget() implements an arbitrary amount of token pushback. -/* Only tokens obtained through tok_class() should be given to -/* tok_unget(). This function accepts a list of tokens in -/* last-read-first order. -/* DIAGNOSTICS -/* The code complains if input terminates in the middle of a list. -/* BUGS -/* Does not preserve white space at the beginning of a list element -/* or after the end of a list. -/* AUTHOR(S) -/* Wietse Venema -/* Eindhoven University of Technology -/* Department of Mathematics and Computer Science -/* Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands -/* LAST MODIFICATION -/* 92/01/15 21:53:02 -/* VERSION/RELEASE -/* 1.4 -/*--*/ - -static char class_sccsid[] = "@(#) tok_class.c 1.4 92/01/15 21:53:02"; - -/* C library */ - -#include - -extern char *strcpy(); -extern long time(); -extern char *ctime(); - -/* Application-specific stuff */ - -#include "error.h" -#include "vstring.h" -#include "token.h" -#include "symbol.h" - -static struct token *tok_list(); -static void tok_list_struct(); -static void tok_list_append(); -static void tok_strcat(); -static void tok_time(); -static void tok_date(); -static void tok_space_append(); - -#if defined(MAP_VOID_STAR) || defined(MAP_VOID) -static void tok_void(); /* rewrite void keyword */ -#endif - -static struct token *tok_buf = 0; /* token push-back storage */ - -/* TOK_PREPEND - add token to LIFO queue, return head */ - -#define TOK_PREPEND(list,t) (t->next = list, list = t) - -/* tok_space_append - append trailing space except at start of or after list */ - -static void tok_space_append(list, t) -register struct token *list; -register struct token *t; -{ - - /* - * The head/tail fields of a token do triple duty. They are used to keep - * track of the members that make up a (list); to keep track of the - * non-blank tokens that make up one list member; and, finally, to tack - * whitespace and comment tokens onto the non-blank tokens that make up - * one list member. - * - * Within a (list), white space and comment tokens are always tacked onto - * the non-blank tokens to avoid parsing complications later on. For this - * reason, blanks and comments at the beginning of a list member are - * discarded because there is no token to tack them onto. (Well, we could - * start each list member with a dummy token, but that would mess up the - * whole unprototyper). - * - * Blanks or comments that follow a (list) are discarded, because the - * head/tail fields of a (list) are already being used for other - * purposes. - * - * Newlines within a (list) are discarded because they can mess up the - * output when we rewrite function headers. The output routines will - * regenerate discarded newlines, anyway. - */ - - if (list == 0 || list->tokno == TOK_LIST) { - tok_free(t); - } else { - tok_list_append(list, t); - } -} - -/* tok_class - discriminate single tokens, keywords, and composite tokens */ - -struct token *tok_class() -{ - register struct token *t; - register struct symbol *s; - - /* - * Use push-back token, if available. Push-back tokens are already - * canonical and can be passed on to the caller without further - * inspection. - */ - - if (t = tok_buf) { - tok_buf = t->next; - t->next = 0; - return (t); - } - /* Read a new token and canonicalize it. */ - - if (t = tok_get()) { - switch (t->tokno) { - case '(': /* beginning of list */ - t = tok_list(t); - break; - case TOK_WORD: /* look up keyword */ - if ((s = sym_find(t->vstr->str))) { - switch (s->type) { - case TOK_TIME: /* map __TIME__ to string */ - tok_time(t); - tok_strcat(t); /* look for more strings */ - break; - case TOK_DATE: /* map __DATE__ to string */ - tok_date(t); - tok_strcat(t); /* look for more strings */ - break; -#if defined(MAP_VOID_STAR) || defined(MAP_VOID) - case TOK_VOID: /* optionally map void types */ - tok_void(t); - break; -#endif - default: /* other keyword */ - t->tokno = s->type; - break; - } - } - break; - case '"': /* string, look for more */ - tok_strcat(t); - break; - } - } - return (t); -} - -/* tok_list - collect ()-delimited, comma-separated list of tokens */ - -static struct token *tok_list(t) -struct token *t; -{ - register struct token *list = tok_alloc(); - char *filename; - int lineno; - - /* Save context of '(' for diagnostics. */ - - filename = t->path; - lineno = t->line; - - list->tokno = TOK_LIST; - list->head = list->tail = t; - list->path = t->path; - list->line = t->line; -#ifdef DEBUG - strcpy(list->vstr->str, "LIST"); -#endif - - /* - * Read until the matching ')' is found, accounting for structured stuff - * (enclosed by '{' and '}' tokens). Break the list up at each ',' token, - * and try to preserve as much whitespace as possible. Newlines are - * discarded so that they will not mess up the layout when we rewrite - * argument lists. The output routines will regenerate discarded - * newlines. - */ - - while (t = tok_class()) { /* skip blanks */ - switch (t->tokno) { - case ')': /* end of list */ - tok_list_append(list, t); - return (list); - case '{': /* struct/union type */ - tok_list_struct(list->tail, t); - break; - case TOK_WSPACE: /* preserve trailing blanks */ - tok_space_append(list->tail->tail, t); /* except after list */ - break; - case '\n': /* fix newlines later */ - tok_free(t); - break; - case ',': /* list separator */ - tok_list_append(list, t); - break; - default: /* other */ - tok_list_append(list->tail, t); - break; - } - } - error_where(filename, lineno, "unmatched '('"); - return (list); /* do not waste any data */ -} - -/* tok_list_struct - collect structured type info within list */ - -static void tok_list_struct(list, t) -register struct token *list; -register struct token *t; -{ - char *filename; - int lineno; - - /* - * Save context of '{' for diagnostics. This routine is called by the one - * that collects list members. If the '}' is not found, the list - * collector will not see the closing ')' either. - */ - - filename = t->path; - lineno = t->line; - - tok_list_append(list, t); - - /* - * Collect tokens until the matching '}' is found. Try to preserve as - * much whitespace as possible. Newlines are discarded so that they do - * not interfere when rewriting argument lists. The output routines will - * regenerate discarded newlines. - */ - - while (t = tok_class()) { - switch (t->tokno) { - case TOK_WSPACE: /* preserve trailing blanks */ - tok_space_append(list->tail, t); /* except after list */ - break; - case '\n': /* fix newlines later */ - tok_free(t); - break; - case '{': /* recurse */ - tok_list_struct(list, t); - break; - case '}': /* done */ - tok_list_append(list, t); - return; - default: /* other */ - tok_list_append(list, t); - break; - } - } - error_where(filename, lineno, "unmatched '{'"); -} - -/* tok_strcat - concatenate multiple string constants */ - -static void tok_strcat(t1) -register struct token *t1; -{ - register struct token *t2; - register struct token *lookahead = 0; - - /* - * Read ahead past whitespace, comments and newlines. If we find a string - * token, concatenate it with the previous one and push back the - * intervening tokens (thus preserving as much information as possible). - * If we find something else, push back all lookahead tokens. - */ - -#define PUSHBACK_AND_RETURN { if (lookahead) tok_unget(lookahead); return; } - - while (t2 = tok_class()) { - switch (t2->tokno) { - case TOK_WSPACE: /* read past comments/blanks */ - case '\n': /* read past newlines */ - TOK_PREPEND(lookahead, t2); - break; - case '"': /* concatenate string tokens */ - if (vs_strcpy(t1->vstr, - t1->vstr->str + strlen(t1->vstr->str) - 1, - t2->vstr->str + 1) == 0) - fatal("out of memory"); - tok_free(t2); - PUSHBACK_AND_RETURN; - default: /* something else, push back */ - tok_unget(t2); - PUSHBACK_AND_RETURN; - } - } - PUSHBACK_AND_RETURN; /* hit EOF */ -} - -#if defined(MAP_VOID_STAR) || defined(MAP_VOID) - -/* tok_void - support for compilers that have problems with "void" */ - -static void tok_void(t) -register struct token *t; -{ - register struct token *t2; - register struct token *lookahead = 0; - - /* - * Look ahead beyond whitespace, comments and newlines until we see a '*' - * token. If one is found, replace "void" by "char". If we find something - * else, and if "void" should always be mapped, replace "void" by "int". - * Always push back the lookahead tokens. - * - * XXX The code also replaces the (void) argument list; this must be - * accounted for later on. The alternative would be to add (in unproto.c) - * TOK_VOID cases all over the place and that would be too error-prone. - */ - -#define PUSHBACK_AND_RETURN { if (lookahead) tok_unget(lookahead); return; } - - while (t2 = tok_class()) { - switch (TOK_PREPEND(lookahead, t2)->tokno) { - case TOK_WSPACE: /* read past comments/blanks */ - case '\n': /* read past newline */ - break; - case '*': /* "void *" -> "char *" */ - if (vs_strcpy(t->vstr, t->vstr->str, "char") == 0) - fatal("out of memory"); - PUSHBACK_AND_RETURN; - default: -#ifdef MAP_VOID /* plain "void" -> "int" */ - if (vs_strcpy(t->vstr, t->vstr->str, "int") == 0) - fatal("out of memory"); -#endif - PUSHBACK_AND_RETURN; - } - } - PUSHBACK_AND_RETURN; /* hit EOF */ -} - -#endif - -/* tok_time - rewrite __TIME__ to "hh:mm:ss" string constant */ - -static void tok_time(t) -struct token *t; -{ - long now; - char *cp; - char buf[BUFSIZ]; - - /* - * Using sprintf() to select parts of a string is gross, but this should - * be fast enough. - */ - - (void) time(&now); - cp = ctime(&now); - sprintf(buf, "\"%.8s\"", cp + 11); - if (vs_strcpy(t->vstr, t->vstr->str, buf) == 0) - fatal("out of memory"); - t->tokno = buf[0]; -} - -/* tok_date - rewrite __DATE__ to "Mmm dd yyyy" string constant */ - -static void tok_date(t) -struct token *t; -{ - long now; - char *cp; - char buf[BUFSIZ]; - - /* - * Using sprintf() to select parts of a string is gross, but this should - * be fast enough. - */ - - (void) time(&now); - cp = ctime(&now); - sprintf(buf, "\"%.3s %.2s %.4s\"", cp + 4, cp + 8, cp + 20); - if (vs_strcpy(t->vstr, t->vstr->str, buf) == 0) - fatal("out of memory"); - t->tokno = buf[0]; -} - -/* tok_unget - push back one or more possibly composite tokens */ - -void tok_unget(t) -register struct token *t; -{ - register struct token *next; - - do { - next = t->next; - TOK_PREPEND(tok_buf, t); - } while (t = next); -} - -/* tok_list_append - append data to list */ - -static void tok_list_append(h, t) -struct token *h; -struct token *t; -{ - if (h->head == 0) { - h->head = h->tail = t; - } else { - h->tail->next = t; - h->tail = t; - } -} diff --git a/build/unproto/tok_io.c b/build/unproto/tok_io.c deleted file mode 100644 index 74ae6bcfee..0000000000 --- a/build/unproto/tok_io.c +++ /dev/null @@ -1,612 +0,0 @@ -/*++ -/* NAME -/* tok_io 3 -/* SUMMARY -/* token I/O -/* PACKAGE -/* unproto -/* SYNOPSIS -/* #include "token.h" -/* -/* struct token *tok_get() -/* -/* void tok_flush(t) -/* struct token *t; -/* -/* void tok_show(t) -/* struct token *t; -/* -/* void tok_show_ch(t) -/* struct token *t; -/* -/* void put_str(s) -/* char *s; -/* -/* void put_ch(c) -/* int c; -/* -/* void put_nl() -/* -/* char *in_path; -/* int in_line; -/* DESCRIPTION -/* These functions read from stdin and write to stdout. The -/* tokenizer keeps track of where the token appeared in the input -/* stream; on output, this information is used to preserve correct -/* line number information (even after lots of token lookahead or -/* after function-header rewriting) so that diagnostics from the -/* next compiler stage make sense. -/* -/* tok_get() reads the next token from standard input. It returns -/* a null pointer when the end of input is reached. -/* -/* tok_show() displays the contents of a (possibly composite) token -/* on the standard output. -/* -/* tok_show_ch() displays the contents of a single-character token -/* on the standard output. The character should not be a newline. -/* -/* tok_flush() displays the contents of a (possibly composite) token -/* on the standard output and makes it available for re-use. -/* -/* put_str() writes a null-terminated string to standard output. -/* There should be no newline characters in the string argument. -/* -/* put_ch() writes one character to standard output. The character -/* should not be a newline. -/* -/* put_nl() outputs a newline character and adjusts the program's idea of -/* the current output line. -/* -/* The in_path and in_line variables contain the file name and -/* line number of the most recently read token. -/* BUGS -/* The tokenizer is just good enough for the unproto filter. -/* As a benefit, it is quite fast. -/* AUTHOR(S) -/* Wietse Venema -/* Eindhoven University of Technology -/* Department of Mathematics and Computer Science -/* Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands -/* LAST MODIFICATION -/* 92/01/15 21:52:59 -/* VERSION/RELEASE -/* 1.3 -/*--*/ - -static char io_sccsid[] = "@(#) tok_io.c 1.3 92/01/15 21:52:59"; - -/* C library */ - -#include -#include - -extern char *strchr(); -extern char *malloc(); -extern char *realloc(); -extern char *strcpy(); - -/* Application-specific stuff */ - -#include "token.h" -#include "vstring.h" -#include "error.h" - -extern char *strsave(); /* XXX need include file */ - -/* Stuff to keep track of original source file name and position */ - -static char def_path[] = ""; /* default path name */ - -char *in_path = def_path; /* current input file name */ -int in_line = 1; /* current input line number */ - -static char *out_path = def_path; /* last name in output line control */ -static int out_line = 1; /* current output line number */ -int last_ch; /* type of last output */ - -/* Forward declarations */ - -static int read_quoted(); -static void read_comment(); -static int backslash_newline(); -static char *read_hex(); -static char *read_octal(); -static void fix_line_control(); - - /* - * Character input with one level of pushback. The INPUT() macro recursively - * strips backslash-newline pairs from the input stream. The UNPUT() macro - * should be used only for characters obtained through the INPUT() macro. - * - * After skipping a backslash-newline pair, the input line counter is not - * updated, and we continue with the same logical source line. We just - * update a counter with the number of backslash-newline sequences that must - * be accounted for (backslash_newline() updates the counter). At the end of - * the logical source line, an appropriate number of newline characters is - * pushed back (in tok_get()). I do not know how GCC handles this, but it - * seems to produce te same output. - * - * Because backslash_newline() recursively calls itself (through the INPUT() - * macro), we will run out of stack space, given a sufficiently long - * sequence of backslash-newline pairs. - */ - -static char in_char = 0; /* push-back storage */ -static int in_flag = 0; /* pushback available */ -static int nl_compensate = 0; /* line continuation kluge */ - -#define INPUT(c) (in_flag ? (in_flag = 0, c = in_char) : \ - (c = getchar()) != '\\' ? c : \ - (c = getchar()) != '\n' ? (ungetc(c, stdin), c = '\\') : \ - (c = backslash_newline())) -#define UNPUT(c) (in_flag = 1, in_char = c) - -/* Directives that should be ignored. */ - -#ifdef IGNORE_DIRECTIVES - -static char *ignore_directives[] = { - IGNORE_DIRECTIVES, - 0, -}; - -#endif - -/* Modified string and ctype stuff. */ - -#define STREQUAL(x,y) (*(x) == *(y) && strcmp((x),(y)) == 0) - -#define ISALNUM(c) (isalnum(c) || (c) == '_') -#define ISALPHA(c) (isalpha(c) || (c) == '_') -#define ISSPACE(c) (isspace(c) && c != '\n') -#define ISDOT(c) (c == '.') -#define ISHEX(c) (isdigit(c) || strchr("abcdefABCDEF", c) != 0) -#define ISOCTAL(c) (isdigit(c) && (c) != '8' && (c) != '9') - -/* Collect all characters that satisfy one condition */ - -#define COLLECT(v,c,cond) { \ - register struct vstring *vs = v; \ - register char *cp = vs->str; \ - *cp++ = c; \ - while (INPUT(c) != EOF) { \ - if (cond) { \ - if (VS_ADDCH(vs, cp, c) == 0) \ - fatal("out of memory"); \ - } else { \ - UNPUT(c); \ - break; \ - } \ - } \ - *cp = 0; \ - } - -/* Ensure that output line information is correct */ - -#define CHECK_LINE_CONTROL(p,l) { if (out_path != (p) || out_line != (l)) \ - fix_line_control((p),(l)); } - -/* do_control - parse control line */ - -static int do_control() -{ - struct token *t; - int line; - char *path; - - /* Make sure that the directive shows up in the right place. */ - - CHECK_LINE_CONTROL(in_path, in_line); - - while (t = tok_get()) { - switch (t->tokno) { - - case TOK_WSPACE: - /* Ignore blanks after "#" token. */ - tok_free(t); - break; - - case TOK_NUMBER: - - /* - * Line control is of the form: number pathname junk. Since we - * have no idea what junk the preprocessor may generate, we copy - * all line control tokens to stdout. - */ - - put_str("# "); - line = atoi(t->vstr->str); /* extract line number */ - tok_flush(t); - while ((t = tok_get()) && t->tokno == TOK_WSPACE) - tok_flush(t); /* copy white space */ - if (t) { /* extract path name */ - path = (t->tokno == '"') ? strsave(t->vstr->str) : in_path; - do { - tok_flush(t); /* copy until newline */ - } while (t->tokno != '\n' && (t = tok_get())); - } - out_line = in_line = line; /* synchronize */ - out_path = in_path = path; /* synchronize */ - return; - -#ifdef IGNORE_DIRECTIVES - - case TOK_WORD: - - /* - * Optionally ignore other #directives. This is only a partial - * solution, because the preprocessor will still see them. - */ - { - char **cpp; - char *cp = t->vstr->str; - - for (cpp = ignore_directives; *cpp; cpp++) { - if (STREQUAL(cp, *cpp)) { - do { - tok_free(t); - } while (t->tokno != '\n' && (t = tok_get())); - return; - } - } - } - /* FALLTHROUGH */ -#endif - default: - /* Pass through. */ - put_ch('#'); - do { - tok_flush(t); - } while (t->tokno != '\n' && (t = tok_get())); - return; - - case 0: - /* Hit EOF, punt. */ - put_ch('#'); - return; - } - } -} - -/* backslash_newline - fix up things after reading a backslash-newline pair */ - -static int backslash_newline() -{ - register int c; - - nl_compensate++; - return (INPUT(c)); -} - -/* tok_get - get next token */ - -static int last_tokno = '\n'; - -struct token *tok_get() -{ - register struct token *t; - register int c; - int d; - - /* - * Get one from the pool and fill it in. The loop is here in case we hit - * a preprocessor control line, which happens in a minority of all cases. - * We update the token input path and line info *after* backslash-newline - * processing or the newline compensation would go wrong. - */ - - t = tok_alloc(); - - for (;;) { - if ((INPUT(c)) == EOF) { - tok_free(t); - return (0); - } else if ((t->line = in_line, t->path = in_path), !isascii(c)) { - t->vstr->str[0] = c; - t->vstr->str[1] = 0; - t->tokno = TOK_OTHER; - break; - } else if (ISSPACE(c)) { - COLLECT(t->vstr, c, ISSPACE(c)); - t->tokno = TOK_WSPACE; - break; - } else if (ISALPHA(c)) { - COLLECT(t->vstr, c, ISALNUM(c)); - t->tokno = TOK_WORD; - break; - } else if (isdigit(c)) { - COLLECT(t->vstr, c, isdigit(c)); - t->tokno = TOK_NUMBER; - break; - } else if (c == '"' || c == '\'') { - t->tokno = read_quoted(t->vstr, c); /* detect missing end quote */ - break; - } else if (ISDOT(c)) { - COLLECT(t->vstr, c, ISDOT(c)); - t->tokno = TOK_OTHER; - break; - } else if (c == '#' && last_tokno == '\n') { - do_control(); - continue; - } else { - t->vstr->str[0] = c; - if (c == '\n') { - in_line++; - if (nl_compensate > 0) { /* compensation for bs-nl */ - UNPUT('\n'); - nl_compensate--; - } - } else if (c == '/') { - if ((INPUT(d)) == '*') { - t->vstr->str[1] = d; /* comment */ - read_comment(t->vstr); - t->tokno = TOK_WSPACE; - break; - } else { - if (d != EOF) - UNPUT(d); - } - } else if (c == '\\') { - t->vstr->str[1] = (INPUT(c) == EOF ? 0 : c); - t->vstr->str[2] = 0; - t->tokno = TOK_OTHER; - break; - } - t->vstr->str[1] = 0; - t->tokno = c; - break; - } - } - last_tokno = t->tokno; - t->end_line = in_line; - return (t); -} - -/* read_quoted - read string or character literal, canonicalize escapes */ - -static int read_quoted(vs, ch) -register struct vstring *vs; -int ch; -{ - register char *cp = vs->str; - register int c; - int ret = TOK_OTHER; - - *cp++ = ch; - - /* - * Clobber the token type in case of a premature newline or EOF. This - * prevents us from attempting to concatenate string constants with - * broken ones that have no closing quote. - */ - - while (INPUT(c) != EOF) { - if (c == '\n') { /* newline in string */ - UNPUT(c); - break; - } - if (VS_ADDCH(vs, cp, c) == 0) /* store character */ - fatal("out of memory"); - if (c == ch) { /* closing quote */ - ret = c; - break; - } - if (c == '\\') { /* parse escape sequence */ - if ((INPUT(c)) == EOF) { /* EOF, punt */ - break; - } else if (c == 'a') { /* \a -> audible bell */ - if ((cp = vs_strcpy(vs, cp, BELL)) == 0) - fatal("out of memory"); - } else if (c == 'x') { /* \xhh -> \nnn */ - cp = read_hex(vs, cp); - } else if (ISOCTAL(c) && ch != '\'') { - cp = read_octal(vs, cp, c); /* canonicalize \octal */ - } else { - if (VS_ADDCH(vs, cp, c) == 0) /* \other: leave alone */ - fatal("out of memory"); - } - } - } - *cp = 0; - return (ret); -} - -/* read_comment - stuff a whole comment into one huge token */ - -static void read_comment(vs) -register struct vstring *vs; -{ - register char *cp = vs->str + 2; /* skip slash star */ - register int c; - register int d; - - while (INPUT(c) != EOF) { - if (VS_ADDCH(vs, cp, c) == 0) - fatal("out of memory"); - if (c == '*') { - if ((INPUT(d)) == '/') { - if (VS_ADDCH(vs, cp, d) == 0) - fatal("out of memory"); - break; - } else { - if (d != EOF) - UNPUT(d); - } - } else if (c == '\n') { - in_line++; - } else if (c == '\\') { - if ((INPUT(d)) != EOF && VS_ADDCH(vs, cp, d) == 0) - fatal("out of memory"); - } - } - *cp = 0; -} - -/* read_hex - rewrite hex escape to three-digit octal escape */ - -static char *read_hex(vs, cp) -struct vstring *vs; -register char *cp; -{ - register int c; - register int i; - char buf[BUFSIZ]; - int len; - unsigned val; - - /* - * Eat up all subsequent hex digits. Complain later when there are too - * many. - */ - - for (i = 0; i < sizeof(buf) && (INPUT(c) != EOF) && ISHEX(c); i++) - buf[i] = c; - buf[i] = 0; - - if (i < sizeof(buf) && c) - UNPUT(c); - - /* - * Convert hex form to three-digit octal form. The three-digit form is - * used so that strings can be concatenated without problems. Complain - * about malformed input; truncate the result to at most three octal - * digits. - */ - - if (i == 0) { - error("\\x escape sequence without hexadecimal digits"); - if (VS_ADDCH(vs, cp, 'x') == 0) - fatal("out of memory"); - } else { - (void) sscanf(buf, "%x", &val); - sprintf(buf, "%03o", val); - if ((len = strlen(buf)) > 3) - error("\\x escape sequence yields non-character value"); - if ((cp = vs_strcpy(vs, cp, buf + len - 3)) == 0) - fatal("out of memory"); - } - return (cp); -} - -/* read_octal - convert octal escape to three-digit format */ - -static char obuf[] = "00123"; - -static char *read_octal(vs, cp, c) -register struct vstring *vs; -register char *cp; -register int c; -{ - register int i; - -#define buf_input (obuf + 2) - - /* Eat up at most three octal digits. */ - - buf_input[0] = c; - for (i = 1; i < 3 && (INPUT(c) != EOF) && ISOCTAL(c); i++) - buf_input[i] = c; - buf_input[i] = 0; - - if (i < 3 && c) - UNPUT(c); - - /* - * Leave three-digit octal escapes alone. Convert one-digit and two-digit - * octal escapes to three-digit form by prefixing them with a suitable - * number of '0' characters. This is done so that strings can be - * concatenated without problems. - */ - - if ((cp = vs_strcpy(vs, cp, buf_input + i - 3)) == 0) - fatal("out of memory"); - return (cp); -} - -/* put_nl - emit newline and adjust output line count */ - -void put_nl() -{ - put_ch('\n'); - out_line++; -} - -/* fix_line_control - to adjust path and/or line count info in output */ - -static void fix_line_control(path, line) -register char *path; -register int line; -{ - - /* - * This function is called sporadically, so it should not be a problem - * that we repeat some of the tests that preceded this function call. - * - * Emit a newline if we are not at the start of a line. - * - * If we switch files, or if we jump backwards, emit line control. If we - * jump forward, emit the proper number of newlines to compensate. - */ - - if (last_ch != '\n') /* terminate open line */ - put_nl(); - if (path != out_path || line < out_line) { /* file switch or back jump */ - printf("# %d %s\n", out_line = line, out_path = path); - last_ch = '\n'; - } else { /* forward jump */ - while (line > out_line) - put_nl(); - } -} - -/* tok_show_ch - output single-character token (not newline) */ - -void tok_show_ch(t) -register struct token *t; -{ - CHECK_LINE_CONTROL(t->path, t->line); - - put_ch(t->tokno); /* show token contents */ -} - -/* tok_show - output (possibly composite) token */ - -void tok_show(t) -register struct token *t; -{ - register struct token *p; - - if (t->tokno == TOK_LIST) { - register struct token *s; - - /* - * This branch is completely in terms of tok_xxx() primitives, so - * there is no need to check the line control information. - */ - - for (s = t->head; s; s = s->next) { - tok_show_ch(s); /* '(' or ',' or ')' */ - for (p = s->head; p; p = p->next) - tok_show(p); /* show list element */ - } - } else { - register char *cp = t->vstr->str; - - /* - * Measurements show that it pays off to give special treatment to - * single-character tokens. Note that both types of token may cause a - * change of output line number. - */ - - CHECK_LINE_CONTROL(t->path, t->line); - if (cp[1] == 0) { - put_ch(*cp); /* single-character token */ - } else { - put_str(cp); /* multi_character token */ - } - out_line = t->end_line; /* may span multiple lines */ - for (p = t->head; p; p = p->next) - tok_show(p); /* trailing blanks */ - } -} diff --git a/build/unproto/tok_pool.c b/build/unproto/tok_pool.c deleted file mode 100644 index e2ed107ce7..0000000000 --- a/build/unproto/tok_pool.c +++ /dev/null @@ -1,103 +0,0 @@ -/*++ -/* NAME -/* tok_pool 3 -/* SUMMARY -/* maintain pool of unused token structures -/* PACKAGE -/* unproto -/* SYNOPSIS -/* #include "token.h" -/* -/* struct token *tok_alloc() -/* -/* void tok_free(t) -/* struct token *t; -/* DESCRIPTION -/* tok_alloc() and tok_free() maintain a pool of unused token -/* structures. -/* -/* tok_alloc() takes the first free token structure from the pool -/* or allocates a new one if the pool is empty. -/* -/* tok_free() adds a (possibly composite) token structure to the pool. -/* BUGS -/* The pool never shrinks. -/* AUTHOR(S) -/* Wietse Venema -/* Eindhoven University of Technology -/* Department of Mathematics and Computer Science -/* Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands -/* LAST MODIFICATION -/* 92/01/15 21:53:04 -/* VERSION/RELEASE -/* 1.2 -/*--*/ - -static char pool_sccsid[] = "@(#) tok_pool.c 1.2 92/01/15 21:53:04"; - -/* C library */ - -extern char *malloc(); - -/* Application-specific stuff */ - -#include "token.h" -#include "vstring.h" -#include "error.h" - -#define TOKLEN 5 /* initial string buffer length */ - -struct token *tok_pool = 0; /* free token pool */ - -/* tok_alloc - allocate token structure from pool or heap */ - -struct token *tok_alloc() -{ - register struct token *t; - - if (tok_pool) { /* re-use an old one */ - t = tok_pool; - tok_pool = t->next; - } else { /* create a new one */ - if ((t = (struct token *) malloc(sizeof(struct token))) == 0 - || (t->vstr = vs_alloc(TOKLEN)) == 0) - fatal("out of memory"); - } - t->next = t->head = t->tail = 0; -#ifdef DEBUG - strcpy(t->vstr->str, "BUSY"); -#endif - return (t); -} - -/* tok_free - return (possibly composite) token to pool of free tokens */ - -void tok_free(t) -register struct token *t; -{ -#ifdef DEBUG - /* Check if we are freeing free token */ - - register struct token *p; - - for (p = tok_pool; p; p = p->next) - if (p == t) - fatal("freeing free token"); -#endif - - /* Free neighbours and subordinates first */ - - if (t->next) - tok_free(t->next); - if (t->head) - tok_free(t->head); - - /* Free self */ - - t->next = tok_pool; - t->head = t->tail = 0; - tok_pool = t; -#ifdef DEBUG - strcpy(t->vstr->str, "FREE"); -#endif -} diff --git a/build/unproto/token.h b/build/unproto/token.h deleted file mode 100644 index bb2f50a106..0000000000 --- a/build/unproto/token.h +++ /dev/null @@ -1,55 +0,0 @@ -/* @(#) token.h 1.4 92/01/15 21:53:17 */ - -struct token { - int tokno; /* token value, see below */ - char *path; /* file name */ - int line; /* line number at token start */ - int end_line; /* line number at token end */ - struct vstring *vstr; /* token contents */ - struct token *next; - struct token *head; - struct token *tail; -}; - -/* Special token values */ - -#define TOK_LIST 256 /* () delimited list */ -#define TOK_WORD 257 /* keyword or identifier */ -#define TOK_NUMBER 258 /* one or more digits */ -#define TOK_WSPACE 259 /* comment, white space, not newline */ -#define TOK_OTHER 260 /* other token */ -#define TOK_CONTROL 261 /* flow control keyword */ -#define TOK_COMPOSITE 262 /* struct or union keyword */ -#define TOK_DATE 263 /* date: Mmm dd yyyy */ -#define TOK_TIME 264 /* time: hh:mm:ss */ -#define TOK_VOID 265 /* void keyword */ - -/* Input/output functions and macros */ - -extern struct token *tok_get(); /* read next single token */ -extern void tok_show(); /* display (composite) token */ -extern struct token *tok_class(); /* classify tokens */ -extern void tok_unget(); /* stuff token back into input */ -extern void put_nl(); /* print newline character */ -extern void tok_show_ch(); /* emit single-character token */ - -#define tok_flush(t) (tok_show(t), tok_free(t)) - -#ifdef DEBUG -#define put_ch(c) (putchar(last_ch = c),fflush(stdout)) -#define put_str(s) (fputs(s,stdout),last_ch = 0,fflush(stdout)) -#else -#define put_ch(c) putchar(last_ch = c) -#define put_str(s) (fputs(s,stdout),last_ch = 0) -#endif - -/* Memory management */ - -struct token *tok_alloc(); /* allocate token storage */ -extern void tok_free(); /* re-cycle storage */ - -/* Context */ - -extern char *in_path; /* current input path name */ -extern int in_line; /* current input line number */ -extern int last_ch; /* type of last output */ diff --git a/build/unproto/unproto.1 b/build/unproto/unproto.1 deleted file mode 100644 index 31490c36fb..0000000000 --- a/build/unproto/unproto.1 +++ /dev/null @@ -1,152 +0,0 @@ -.TH UNPROTO 1 -.ad -.fi -.SH NAME -unproto -\- -compile ANSI C with traditional UNIX C compiler -.SH PACKAGE -.na -.nf -unproto -.SH SYNOPSIS -.na -.nf -/somewhere/cpp ... - -cc cflags -E file.c | unproto >file.i; cc cflags -c file.i -.SH DESCRIPTION -.ad -.fi -This document describes a filter that sits in between the UNIX -C preprocessor and the next UNIX C compiler stage, on the fly rewriting -ANSI-style syntax to old-style syntax. Typically, the program is -invoked by the native UNIX C compiler as an alternate preprocessor. -The unprototyper in turn invokes the native C preprocessor and -massages its output. Similar tricks can be used with the lint(1) -command. - -Language constructs that are always rewritten: -.TP -function headings, prototypes, pointer types -ANSI-C style function headings, function prototypes, function -pointer types and type casts are rewritten to old style. - support is provided for functions with variable-length -argument lists. -.TP -character and string constants -The \\a and \\x escape sequences are rewritten to their (three-digit) -octal equivalents. - -Multiple string tokens are concatenated; an arbitrary number of -whitespace or comment tokens may appear between successive -string tokens. - -Within string constants, octal escape sequences are rewritten to the -three-digit \\ddd form, so that string concatenation produces correct -results. -.TP -date and time -The __DATE__ and __TIME__ tokens are replaced by string constants -of the form "Mmm dd yyyy" and "hh:mm:ss", respectively. The result -is subjected to string concatenation, just like any other string -constant. -.PP -Language constructs that are rewritten only if the program has been -configured to do so: -.TP -void types -The unprototyper can be configured to rewrite "void *" to "char *", -and even to rewrite plain "void" to "int". -These features are configurable because many traditional UNIX C -compilers do not need them. - -Note: (void) argument lists are always replaced by empty ones. -.PP -ANSI C constructs that are not rewritten because the traditional -UNIX C preprocessor provides suitable workarounds: -.TP -const and volatile -Use the "-Dconst=" and/or "-Dvolatile=" preprocessor directives to -get rid of unimplemented keywords. -.TP -token pasting and stringizing -The traditional UNIX C preprocessor provides excellent alternatives. -For example: - -.nf -.ne 2 -#define string(bar) "bar" /* instead of: # x */ -#define paste(x,y) x/**\/y /* instead of: x##y */ -.fi - -There is a good reason why the # and ## operators are not implemented -in the unprototyper. -After program text has gone through a non-ANSI C preprocessor, all -information about the grouping of the operands of # and ## is lost. -Thus, if the unprototyper were to perform these operations, it would -produce correct results only in the most trivial cases. Operands -with embedded blanks, operands that expand to null tokens, and nested -use of # and/or ## would cause all kinds of obscure problems. -.PP -Unsupported ANSI features: -.TP -trigraphs and #pragmas -Trigraphs are useful only for systems with broken character sets. -If the local compiler chokes on #pragma, insert a blank before the -"#" character, and enclose the offending directive between #ifdef -and #endif. -.SH SEE ALSO -.na -.nf -.ad -.fi -cc(1), how to specify a non-default C preprocessor. -Some versions of the lint(1) command are implemented as a shell -script. It should require only minor modification for integration -with the unprototyper. Other versions of the lint(1) command accept -the same command syntax as the C compiler for the specification of a -non-default preprocessor. Some research may be needed. -.SH FILES -.na -.nf -/wherever/stdarg.h, provided with the unproto filter. -.SH DIAGNOSTICS -.ad -.fi -Problems are reported on the standard error stream. -A non-zero exit status means that there was a problem. -.SH BUGS -.ad -.fi -The unprototyper should be run on preprocessed source only: -unexpanded macros may confuse the program. - -Declarations of (object) are misunderstood and will result in -syntax errors: the objects between parentheses disappear. - -Sometimes does not preserve whitespace after parentheses and commas. -This is a purely aesthetical matter, and the compiler should not care. -Whitespace within string constants is, of course, left intact. - -Does not generate explicit type casts for function-argument -expressions. The lack of explicit conversions between integral -and/or pointer argument types should not be a problem in environments -where sizeof(int) == sizeof(long) == sizeof(pointer). A more serious -problem is the lack of automatic type conversions between integral and -floating-point argument types. Let lint(1) be your friend. -.SH AUTHOR(S) -.na -.nf -Wietse Venema (wietse@wzv.win.tue.nl) -Eindhoven University of Technology -Department of Mathematics and Computer Science -Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands -.SH LAST MODIFICATION -.na -.nf -93/06/18 22:29:37 -.SH VERSION/RELEASE -.na -.nf -1.6 diff --git a/build/unproto/unproto.c b/build/unproto/unproto.c deleted file mode 100644 index 2b2e7648b7..0000000000 --- a/build/unproto/unproto.c +++ /dev/null @@ -1,999 +0,0 @@ -/*++ -/* NAME -/* unproto 1 -/* SUMMARY -/* compile ANSI C with traditional UNIX C compiler -/* PACKAGE -/* unproto -/* SYNOPSIS -/* /somewhere/cpp ... -/* -/* cc cflags -E file.c | unproto >file.i; cc cflags -c file.i -/* DESCRIPTION -/* This document describes a filter that sits in between the UNIX -/* C preprocessor and the next UNIX C compiler stage, on the fly rewriting -/* ANSI-style syntax to old-style syntax. Typically, the program is -/* invoked by the native UNIX C compiler as an alternate preprocessor. -/* The unprototyper in turn invokes the native C preprocessor and -/* massages its output. Similar tricks can be used with the lint(1) -/* command. -/* -/* Language constructs that are always rewritten: -/* .TP -/* function headings, prototypes, pointer types -/* ANSI-C style function headings, function prototypes, function -/* pointer types and type casts are rewritten to old style. -/* support is provided for functions with variable-length -/* argument lists. -/* .TP -/* character and string constants -/* The \\a and \\x escape sequences are rewritten to their (three-digit) -/* octal equivalents. -/* -/* Multiple string tokens are concatenated; an arbitrary number of -/* whitespace or comment tokens may appear between successive -/* string tokens. -/* -/* Within string constants, octal escape sequences are rewritten to the -/* three-digit \\ddd form, so that string concatenation produces correct -/* results. -/* .TP -/* date and time -/* The __DATE__ and __TIME__ tokens are replaced by string constants -/* of the form "Mmm dd yyyy" and "hh:mm:ss", respectively. The result -/* is subjected to string concatenation, just like any other string -/* constant. -/* .PP -/* Language constructs that are rewritten only if the program has been -/* configured to do so: -/* .TP -/* void types -/* The unprototyper can be configured to rewrite "void *" to "char *", -/* and even to rewrite plain "void" to "int". -/* These features are configurable because many traditional UNIX C -/* compilers do not need them. -/* -/* Note: (void) argument lists are always replaced by empty ones. -/* .PP -/* ANSI C constructs that are not rewritten because the traditional -/* UNIX C preprocessor provides suitable workarounds: -/* .TP -/* const and volatile -/* Use the "-Dconst=" and/or "-Dvolatile=" preprocessor directives to -/* get rid of unimplemented keywords. -/* .TP -/* token pasting and stringizing -/* The traditional UNIX C preprocessor provides excellent alternatives. -/* For example: -/* -/* .nf -/* .ne 2 -/* #define string(bar) "bar" /* instead of: # x */ -/* #define paste(x,y) x/**\/y /* instead of: x##y */ -/* .fi -/* -/* There is a good reason why the # and ## operators are not implemented -/* in the unprototyper. -/* After program text has gone through a non-ANSI C preprocessor, all -/* information about the grouping of the operands of # and ## is lost. -/* Thus, if the unprototyper were to perform these operations, it would -/* produce correct results only in the most trivial cases. Operands -/* with embedded blanks, operands that expand to null tokens, and nested -/* use of # and/or ## would cause all kinds of obscure problems. -/* .PP -/* Unsupported ANSI features: -/* .TP -/* trigraphs and #pragmas -/* Trigraphs are useful only for systems with broken character sets. -/* If the local compiler chokes on #pragma, insert a blank before the -/* "#" character, and enclose the offending directive between #ifdef -/* and #endif. -/* SEE ALSO -/* .ad -/* .fi -/* cc(1), how to specify a non-default C preprocessor. -/* Some versions of the lint(1) command are implemented as a shell -/* script. It should require only minor modification for integration -/* with the unprototyper. Other versions of the lint(1) command accept -/* the same command syntax as the C compiler for the specification of a -/* non-default preprocessor. Some research may be needed. -/* FILES -/* /wherever/stdarg.h, provided with the unproto filter. -/* DIAGNOSTICS -/* Problems are reported on the standard error stream. -/* A non-zero exit status means that there was a problem. -/* BUGS -/* The unprototyper should be run on preprocessed source only: -/* unexpanded macros may confuse the program. -/* -/* Declarations of (object) are misunderstood and will result in -/* syntax errors: the objects between parentheses disappear. -/* -/* Sometimes does not preserve whitespace after parentheses and commas. -/* This is a purely aesthetical matter, and the compiler should not care. -/* Whitespace within string constants is, of course, left intact. -/* -/* Does not generate explicit type casts for function-argument -/* expressions. The lack of explicit conversions between integral -/* and/or pointer argument types should not be a problem in environments -/* where sizeof(int) == sizeof(long) == sizeof(pointer). A more serious -/* problem is the lack of automatic type conversions between integral and -/* floating-point argument types. Let lint(1) be your friend. -/* AUTHOR(S) -/* Wietse Venema (wietse@wzv.win.tue.nl) -/* Eindhoven University of Technology -/* Department of Mathematics and Computer Science -/* Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands -/* LAST MODIFICATION -/* 93/06/18 22:29:37 -/* VERSION/RELEASE -/* 1.6 -/*--*/ - -static char unproto_sccsid[] = "@(#) unproto.c 1.6 93/06/18 22:29:37"; - -/* C library */ - -#include -#include -#include -#include - -extern void exit(); -extern int optind; -extern char *optarg; -extern int getopt(); - -/* Application-specific stuff */ - -#include "vstring.h" -#include "stdarg.h" -#include "token.h" -#include "error.h" -#include "symbol.h" - -/* Forward declarations. */ - -static struct token *dcl_flush(); -static void block_flush(); -static void block_dcls(); -static struct token *show_func_ptr_type(); -static struct token *show_struct_type(); -static void show_arg_name(); -static void show_type(); -static void pair_flush(); -static void check_cast(); -static void show_empty_list(); - -#define check_cast_flush(t) (check_cast(t), tok_free(t)) - -#ifdef PIPE_THROUGH_CPP -static int pipe_stdin_through_cpp(); -#endif - -/* Disable debugging printfs while preserving side effects. */ - -#ifdef DEBUG -#define DPRINTF printf -#else -#define DPRINTF (void) -#endif - -/* An attempt to make some complicated expressions a bit more readable. */ - -#define STREQ(x,y) (*(x) == *(y) && !strcmp((x),(y))) - -#define LAST_ARG_AND_EQUAL(s,c) ((s)->next && (s)->next->next == 0 \ - && (s)->head && ((s)->head == (s)->tail) \ - && (STREQ((s)->head->vstr->str, (c)))) - -#define LIST_BEGINS_WITH_STAR(s) (s->head->head && s->head->head->tokno == '*') - -#define IS_FUNC_PTR_TYPE(s) (s->tokno == TOK_LIST && s->next \ - && s->next->tokno == TOK_LIST \ - && LIST_BEGINS_WITH_STAR(s)) - -/* What to look for to detect a (void) argument list. */ - -#ifdef MAP_VOID -#define VOID_ARG "int" /* bare "void" is mapped to "int" */ -#else -#define VOID_ARG "void" /* bare "void" is left alone */ -#endif - -/* main - driver */ - -int main(argc, argv) -int argc; -char **argv; -{ - register struct token *t; -#ifdef PIPE_THROUGH_CPP /* pipe through /lib/cpp */ - int cpp_status; - int wait_pid; - int cpp_pid; - - cpp_pid = pipe_stdin_through_cpp(argv); -#endif - - sym_init(); /* prime the symbol table */ - - while (t = tok_class()) { - if (t = dcl_flush(t)) { /* try declaration */ - if (t->tokno == '{') { /* examine rejected token */ - block_flush(t); /* body */ - } else { - tok_flush(t); /* other, recover */ - } - } - } - -#ifdef PIPE_THROUGH_CPP /* pipe through /lib/cpp */ - while ((wait_pid = wait(&cpp_status)) != -1 && wait_pid != cpp_pid) - /* void */ ; - return (errcount != 0 || wait_pid != cpp_pid || cpp_status != 0); -#else - return (errcount != 0); -#endif -} - -#ifdef PIPE_THROUGH_CPP /* pipe through /lib/cpp */ - -/* pipe_stdin_through_cpp - avoid shell script overhead */ - -static int pipe_stdin_through_cpp(argv) -char **argv; -{ - int pipefds[2]; - int pid; - char **cpptr = argv; - int i; - struct stat st; - - /* - * The code that sets up the pipe requires that file descriptors 0,1,2 - * are already open. All kinds of mysterious things will happen if that - * is not the case. The following loops makes sure that descriptors 0,1,2 - * are set up properly. - */ - - for (i = 0; i < 3; i++) { - if (fstat(i, &st) == -1 && open("/dev/null", 2) != i) { - perror("open /dev/null"); - exit(1); - } - } - - /* - * With most UNIX implementations, the second non-option argument to - * /lib/cpp specifies the output file. If an output file other than - * stdout is specified, we must force /lib/cpp to write to stdout, and we - * must redirect our own standard output to the specified output file. - */ - -#define IS_OPTION(cp) ((cp)[0] == '-' && (cp)[1] != 0) - - /* Skip to first non-option argument, if any. */ - - while (*++cpptr && IS_OPTION(*cpptr)) - /* void */ ; - - /* - * Assume that the first non-option argument is the input file name. The - * next argument could be the output destination or an option (System V - * Release 2 /lib/cpp gets the options *after* the file arguments). - */ - - if (*cpptr && *++cpptr && **cpptr != '-') { - - /* - * The first non-option argument is followed by another argument that - * is not an option ("-stuff") or a hyphen ("-"). Redirect our own - * standard output before we clobber the file name. - */ - - if (freopen(*cpptr, "w", stdout) == 0) { - perror(*cpptr); - exit(1); - } - /* Clobber the file name argument so that /lib/cpp writes to stdout */ - - *cpptr = "-"; - } - /* Set up the pipe that connects /lib/cpp to our standard input. */ - - if (pipe(pipefds)) { - perror("pipe"); - exit(1); - } - switch (pid = fork()) { - case -1: /* error */ - perror("fork"); - exit(1); - /* NOTREACHED */ - case 0: /* child */ - (void) close(pipefds[0]); /* close reading end */ - (void) close(1); /* connect stdout to pipe */ - if (dup(pipefds[1]) != 1) - fatal("dup() problem"); - (void) close(pipefds[1]); /* close redundant fd */ - (void) execv(PIPE_THROUGH_CPP, argv); - perror(PIPE_THROUGH_CPP); - exit(1); - /* NOTREACHED */ - default: /* parent */ - (void) close(pipefds[1]); /* close writing end */ - (void) close(0); /* connect stdin to pipe */ - if (dup(pipefds[0]) != 0) - fatal("dup() problem"); - close(pipefds[0]); /* close redundant fd */ - return (pid); - } -} - -#endif - -/* show_arg_names - display function argument names */ - -static void show_arg_names(t) -register struct token *t; -{ - register struct token *s; - - /* Do argument names, but suppress void and rewrite trailing ... */ - - if (LAST_ARG_AND_EQUAL(t->head, VOID_ARG)) { - show_empty_list(t); /* no arguments */ - } else { - for (s = t->head; s; s = s->next) { /* foreach argument... */ - if (LAST_ARG_AND_EQUAL(s, "...")) { -#ifdef _VA_ALIST_ /* see ./stdarg.h */ - tok_show_ch(s); /* ',' */ - put_str(_VA_ALIST_); /* varargs magic */ -#endif - } else { - tok_show_ch(s); /* '(' or ',' or ')' */ - show_arg_name(s); /* extract argument name */ - } - } - } -} - -/* show_arg_types - display function argument types */ - -static void show_arg_types(t) -register struct token *t; -{ - register struct token *s; - - /* Do argument types, but suppress void and trailing ... */ - - if (!LAST_ARG_AND_EQUAL(t->head, VOID_ARG)) { - for (s = t->head; s; s = s->next) { /* foreach argument... */ - if (LAST_ARG_AND_EQUAL(s, "...")) { -#ifdef _VA_DCL_ /* see ./stdarg.h */ - put_str(_VA_DCL_); /* varargs magic */ - put_nl(); /* make output look nicer */ -#endif - } else { - if (s->head != s->tail) { /* really new-style argument? */ - show_type(s); /* rewrite type info */ - put_ch(';'); - put_nl(); /* make output look nicer */ - } - } - } - } -} - -/* header_flush - rewrite new-style function heading to old style */ - -static void header_flush(t) -register struct token *t; -{ - show_arg_names(t); /* show argument names */ - put_nl(); /* make output look nicer */ - show_arg_types(t); /* show argument types */ - tok_free(t); /* discard token */ -} - -/* fpf_header_names - define func returning ptr to func, no argument types */ - -static void fpf_header_names(list) -struct token *list; -{ - register struct token *s; - register struct token *p; - - /* - * Recurse until we find the argument list. Account for the rare case - * that list is a comma-separated list (which should be a syntax error). - * Display old-style fuction argument names. - */ - - for (s = list->head; s; s = s->next) { - tok_show_ch(s); /* '(' or ',' or ')' */ - for (p = s->head; p; p = p->next) { - if (p->tokno == TOK_LIST) { - if (IS_FUNC_PTR_TYPE(p)) { /* recurse */ - fpf_header_names(p); - show_empty_list(p = p->next); - } else { /* display argument names */ - show_arg_names(p); - } - } else { /* pass through other stuff */ - tok_show(p); - } - } - } -} - -/* fpf_header_types - define func returning ptr to func, argument types only */ - -static void fpf_header_types(list) -struct token *list; -{ - register struct token *s; - register struct token *p; - - /* - * Recurse until we find the argument list. Account for the rare case - * that list is a comma-separated list (which should be a syntax error). - * Display old-style function argument types. - */ - - for (s = list->head; s; s = s->next) { - for (p = s->head; p; p = p->next) { - if (p->tokno == TOK_LIST) { - if (IS_FUNC_PTR_TYPE(p)) { /* recurse */ - fpf_header_types(p); - p = p->next; - } else { /* display argument types */ - show_arg_types(p); - } - } - } - } -} - -/* fpf_header - define function returning pointer to function */ - -static void fpf_header(l1, l2) -struct token *l1; -struct token *l2; -{ - fpf_header_names(l1); /* strip argument types */ - show_empty_list(l2); /* strip prototype */ - put_nl(); /* nicer output */ - fpf_header_types(l1); /* show argument types */ -} - -/* skip_enclosed - skip over enclosed tokens */ - -static struct token *skip_enclosed(p, stop) -register struct token *p; -register int stop; -{ - register int start = p->tokno; - - /* Always return a pointer to the last processed token, never NULL. */ - - while (p->next) { - p = p->next; - if (p->tokno == start) { - p = skip_enclosed(p, stop); /* recurse */ - } else if (p->tokno == stop) { - break; /* done */ - } - } - return (p); -} - -/* show_arg_name - extract argument name from argument type info */ - -static void show_arg_name(s) -register struct token *s; -{ - if (s->head) { - register struct token *p; - register struct token *t = 0; - - /* Find the last interesting item. */ - - for (p = s->head; p; p = p->next) { - if (p->tokno == TOK_WORD) { - t = p; /* remember last word */ - } else if (p->tokno == '{') { - p = skip_enclosed(p, '}'); /* skip structured stuff */ - } else if (p->tokno == '[') { - break; /* dimension may be a macro */ - } else if (IS_FUNC_PTR_TYPE(p)) { - t = p; /* or function pointer */ - p = p->next; - } - } - - /* Extract argument name from last interesting item. */ - - if (t) { - if (t->tokno == TOK_LIST) - show_arg_name(t->head); /* function pointer, recurse */ - else - tok_show(t); /* print last word */ - } - } -} - -/* show_type - rewrite type to old-style syntax */ - -static void show_type(s) -register struct token *s; -{ - register struct token *p; - - /* - * Rewrite (*stuff)(args) to (*stuff)(). Rewrite word(args) to word(), - * but only if the word was preceded by a word, '*' or '}'. Leave - * anything else alone. - */ - - for (p = s->head; p; p = p->next) { - if (IS_FUNC_PTR_TYPE(p)) { - p = show_func_ptr_type(p, p->next); /* function pointer type */ - } else { - register struct token *q; - register struct token *r; - - tok_show(p); /* other */ - if ((p->tokno == TOK_WORD || p->tokno == '*' || p->tokno == '}') - && (q = p->next) && q->tokno == TOK_WORD - && (r = q->next) && r->tokno == TOK_LIST) { - tok_show(q); /* show name */ - show_empty_list(p = r); /* strip args */ - } - } - } -} - -/* show_func_ptr_type - display function_pointer type using old-style syntax */ - -static struct token *show_func_ptr_type(t1, t2) -struct token *t1; -struct token *t2; -{ - register struct token *s; - - /* - * Rewrite (list1) (list2) to (list1) (). Account for the rare case that - * (list1) is a comma-separated list. That should be an error, but we do - * not want to waste any information. - */ - - for (s = t1->head; s; s = s->next) { - tok_show_ch(s); /* '(' or ',' or ')' */ - show_type(s); /* recurse */ - } - show_empty_list(t2); - return (t2); -} - -/* show_empty_list - display opening and closing parentheses (if available) */ - -static void show_empty_list(t) -register struct token *t; -{ - tok_show_ch(t->head); /* opening paren */ - if (t->tail->tokno == ')') - tok_show_ch(t->tail); /* closing paren */ -} - -/* show_struct_type - display structured type, rewrite function-pointer types */ - -static struct token *show_struct_type(p) -register struct token *p; -{ - tok_show(p); /* opening brace */ - - while (p->next) { /* XXX cannot return 0 */ - p = p->next; - if (IS_FUNC_PTR_TYPE(p)) { - p = show_func_ptr_type(p, p->next); /* function-pointer member */ - } else if (p->tokno == '{') { - p = show_struct_type(p); /* recurse */ - } else { - tok_show(p); /* other */ - if (p->tokno == '}') { - return (p); /* done */ - } - } - } - DPRINTF("/* missing '}' */"); - return (p); -} - -/* is_func_ptr_cast - recognize function-pointer type cast */ - -static int is_func_ptr_cast(t) -register struct token *t; -{ - register struct token *p; - - /* - * Examine superficial structure. Require (list1) (list2). Require that - * list1 begins with a star. - */ - - if (!IS_FUNC_PTR_TYPE(t)) - return (0); - - /* - * Make sure that there is no name in (list1). Do not worry about - * unexpected tokens, because the compiler will complain anyway. - */ - - for (p = t->head->head; p; p = p->next) { - switch (p->tokno) { - case TOK_LIST: /* recurse */ - return (is_func_ptr_cast(p)); - case TOK_WORD: /* name in list */ - return (0); - case '[': - return (1); /* dimension may be a macro */ - } - } - return (1); /* no name found */ -} - -/* check_cast - display ()-delimited, comma-separated list */ - -static void check_cast(t) -struct token *t; -{ - register struct token *s; - register struct token *p; - - /* - * Rewrite function-pointer types and function-pointer casts. Do not - * blindly rewrite (*list1)(list2) to (*list1)(). Function argument lists - * are about the only thing we can discard without provoking diagnostics - * from the compiler. - */ - - for (s = t->head; s; s = s->next) { - tok_show_ch(s); /* '(' or ',' or ')' */ - for (p = s->head; p; p = p->next) { - switch (p->tokno) { - case TOK_LIST: - if (is_func_ptr_cast(p)) { /* not: IS_FUNC_PTR_TYPE(p) */ - p = show_func_ptr_type(p, p->next); - } else { - check_cast(p); /* recurse */ - } - break; - case '{': - p = show_struct_type(p); /* rewrite func. ptr. types */ - break; - default: - tok_show(p); - break; - } - } - } -} - -/* block_dcls - on the fly rewrite decls/initializers at start of block */ - -static void block_dcls() -{ - register struct token *t; - - /* - * Away from the top level, a declaration should be preceded by type or - * storage-class information. That is why inside blocks, structs and - * unions we insist on reading one word before passing the _next_ token - * to the dcl_flush() function. - * - * Struct and union declarations look the same everywhere: we make an - * exception for these more regular constructs and pass the "struct" and - * "union" tokens to the type_dcl() function. - */ - - while (t = tok_class()) { - switch (t->tokno) { - case TOK_WSPACE: /* preserve white space */ - case '\n': /* preserve line count */ - tok_flush(t); - break; - case TOK_WORD: /* type declarations? */ - tok_flush(t); /* advance to next token */ - t = tok_class(); /* null return is ok */ - /* FALLTRHOUGH */ - case TOK_COMPOSITE: /* struct or union */ - if ((t = dcl_flush(t)) == 0) - break; - /* FALLTRHOUGH */ - default: /* end of declarations */ - DPRINTF("/* end dcls */"); - /* FALLTRHOUGH */ - case '}': /* end of block */ - tok_unget(t); - return; - } - } -} - -/* block_flush - rewrite struct, union or statement block on the fly */ - -static void block_flush(t) -register struct token *t; -{ - static int count = 0; - - tok_flush(t); - DPRINTF("/*%d*/", ++count); - - /* - * Rewrite function pointer types in declarations and function pointer - * casts in initializers at start of block. - */ - - block_dcls(); - - /* Remainder of block: only rewrite function pointer casts. */ - - while (t = tok_class()) { - if (t->tokno == TOK_LIST) { - check_cast_flush(t); - } else if (t->tokno == '{') { - block_flush(t); - } else { - tok_flush(t); - if (t->tokno == '}') { - DPRINTF("/*%d*/", count--); - return; - } - } - } - DPRINTF("/* missing '}' */"); -} - -/* pair_flush - on the fly rewrite casts in grouped stuff */ - -static void pair_flush(t, start, stop) -register struct token *t; -register int start; -register int stop; -{ - tok_flush(t); - - while (t = tok_class()) { - if (t->tokno == start) { /* recurse */ - pair_flush(t, start, stop); - } else if (t->tokno == TOK_LIST) { /* expression or cast */ - check_cast_flush(t); - } else { /* other, copy */ - tok_flush(t); - if (t->tokno == stop) { /* done */ - return; - } - } - } - DPRINTF("/* missing '%c' */", stop); -} - -/* initializer - on the fly rewrite casts in initializer */ - -static void initializer() -{ - register struct token *t; - - while (t = tok_class()) { - switch (t->tokno) { - case ',': /* list separator */ - case ';': /* list terminator */ - tok_unget(t); - return; - case TOK_LIST: /* expression or cast */ - check_cast_flush(t); - break; - case '[': /* array subscript, may nest */ - pair_flush(t, '[', ']'); - break; - case '{': /* structured data, may nest */ - pair_flush(t, '{', '}'); - break; - default: /* other, just copy */ - tok_flush(t); - break; - } - } -} - -/* func_ptr_dcl_flush - rewrite function pointer stuff */ - -static struct token *func_ptr_dcl_flush(list) -register struct token *list; -{ - register struct token *t; - register struct token *t2; - - /* - * Ignore blanks and newlines because we are too lazy to maintain more - * than one token worth of lookahead. The output routines will regenerate - * discarded newline tokens. - */ - - while (t = tok_class()) { - switch (t->tokno) { - case TOK_WSPACE: - case '\n': - tok_free(t); - break; - case TOK_LIST: - /* Function pointer or function returning pointer to function. */ - while ((t2 = tok_class()) /* skip blanks etc. */ - &&(t2->tokno == TOK_WSPACE || t2->tokno == '\n')) - tok_free(t2); - switch (t2 ? t2->tokno : 0) { - case '{': /* function heading (new) */ - fpf_header(list, t); - break; - case TOK_WORD: /* function heading (old) */ - tok_show(list); - tok_show(t); - break; - default: /* func pointer type */ - (void) show_func_ptr_type(list, t); - break; - } - tok_free(list); - tok_free(t); - if (t2) - tok_unget(t2); - return (0); - default: /* not a declaration */ - tok_unget(t); - return (list); - } - } - - /* Hit EOF; must be mistake, but do not waste any information. */ - - return (list); -} - -/* function_dcl_flush - rewrite function { heading, type declaration } */ - -static struct token *function_dcl_flush(list) -register struct token *list; -{ - register struct token *t; - - /* - * Ignore blanks and newlines because we are too lazy to maintain more - * than one token worth of lookahead. The output routines will regenerate - * ignored newline tokens. - */ - - while (t = tok_class()) { - switch (t->tokno) { - case TOK_WSPACE: - case '\n': - tok_free(t); - break; - case '{': - /* Function heading: word (list) { -> old style heading */ - header_flush(list); - tok_unget(t); - return (0); - case TOK_WORD: - /* Old-style function heading: word (list) word... */ - tok_flush(list); - tok_unget(t); - return (0); - case TOK_LIST: - /* Function pointer: word (list1) (list2) -> word (list1) () */ - tok_flush(list); - show_empty_list(t); - tok_free(t); - return (0); - case ',': - case ';': - /* Function type declaration: word (list) -> word () */ - show_empty_list(list); - tok_free(list); - tok_unget(t); - return (0); - default: - /* Something else, reject the list. */ - tok_unget(t); - return (list); - } - } - - /* Hit EOF; must be mistake, but do not waste any information. */ - - return (list); -} - -/* dcl_flush - parse declaration on the fly, return rejected token */ - -static struct token *dcl_flush(t) -register struct token *t; -{ - register int got_word; - - /* - * Away from the top level, type or storage-class information is required - * for an (extern or forward) function type declaration or a variable - * declaration. - * - * With our naive word-counting approach, this means that the caller should - * read one word before passing the next token to us. This is how we - * distinguish, for example, function declarations from function calls. - * - * An exception are structs and unions, because they look the same at any - * level. The caller should give is the "struct" or "union" token. - */ - - for (got_word = 0; t; t = tok_class()) { - switch (t->tokno) { - case TOK_WSPACE: /* advance past blanks */ - case '\n': /* advance past newline */ - case '*': /* indirection: keep trying */ - tok_flush(t); - break; - case TOK_WORD: /* word: keep trying */ - case TOK_COMPOSITE: /* struct or union */ - got_word = 1; - tok_flush(t); - break; - default: - - /* - * Function pointer types can be preceded by zero or more words - * (at least one when not at the top level). Other stuff can be - * accepted only after we have seen at least one word (two words - * when not at the top level). See also the above comment on - * structs and unions. - */ - - if (t->tokno == TOK_LIST && LIST_BEGINS_WITH_STAR(t)) { - if (t = func_ptr_dcl_flush(t)) { - return (t); /* reject token */ - } else { - got_word = 1; /* for = and [ and , and ; */ - } - } else if (got_word == 0) { - return (t); /* reject token */ - } else { - switch (t->tokno) { - case TOK_LIST: /* function type */ - if (t = function_dcl_flush(t)) - return (t); /* reject token */ - break; - case '[': /* dimension, does not nest */ - pair_flush(t, '[', ']'); - break; - case '=': /* initializer follows */ - tok_flush(t); - initializer(); /* rewrite casts */ - break; - case '{': /* struct, union, may nest */ - block_flush(t); /* use code for stmt blocks */ - break; - case ',': /* separator: keep trying */ - got_word = 0; - tok_flush(t); - break; - case ';': /* terminator: succeed */ - tok_flush(t); - return (0); - default: /* reject token */ - return (t); - } - } - } - } - return (0); /* hit EOF */ -} diff --git a/build/unproto/varargs.c b/build/unproto/varargs.c deleted file mode 100644 index 4ca56d8155..0000000000 --- a/build/unproto/varargs.c +++ /dev/null @@ -1,32 +0,0 @@ - /* - * @(#) varargs.c 1.1 91/09/01 23:08:45 - * - * This program can be used to verify that the stdarg.h file is set up - * correctly for your system. If it works, it should print one line with the - * text "stdarg.h works". - */ - -#include -#include "stdarg.h" - -main(int argc, char *argv[]) -{ - varargs_test("%s %s\n", "stdarg.h", "works"); -} - -varargs_test(char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - while (*fmt) { - if (strncmp("%s", fmt, 2) == 0) { - fputs(va_arg(ap, char *), stdout); - fmt += 2; - } else { - putchar(*fmt); - fmt++; - } - } - va_end(ap); -} diff --git a/build/unproto/vstring.c b/build/unproto/vstring.c deleted file mode 100644 index 220bd530fe..0000000000 --- a/build/unproto/vstring.c +++ /dev/null @@ -1,122 +0,0 @@ -/*++ -/* NAME -/* vs_alloc(), VS_ADDCH() -/* SUMMARY -/* auto-resizing string library -/* PACKAGE -/* vstring -/* SYNOPSIS -/* #include "vstring.h" -/* -/* struct vstring *vs_alloc(len) -/* int len; -/* -/* int VS_ADDCH(vs, wp, ch) -/* struct vstring *vs; -/* char *wp; -/* int ch; -/* -/* char *vs_strcpy(vp, dst, src) -/* struct vstring *vp; -/* char *dst; -/* char *src; -/* DESCRIPTION -/* These functions and macros implement a small library for -/* arbitrary-length strings that grow automatically when -/* they fill up. The allocation strategy is such that there -/* will always be place for the terminating null character. -/* -/* vs_alloc() allocates storage for a variable-length string -/* of at least "len" bytes. -/* -/* VS_ADDCH() adds a character to a variable-length string -/* and automagically extends the string if fills up. -/* \fIvs\fP is a pointer to a vstring structure; \fIwp\fP -/* the current write position in the corresponding character -/* array; \fIch\fP the character value to be written. -/* Note that VS_ADDCH() is a macro that evaluates some -/* arguments more than once. -/* -/* vs_strcpy() appends a null-terminated string to a variable-length -/* string. \fIsrc\fP provides the data to be copied; \fIvp\fP is the -/* target, and \fIdst\fP the current write position within the target. -/* The result is null-terminated. The return value is the new write -/* position. -/* DIAGNOSTICS -/* VS_ADDCH() returns zero if it was unable to dynamically -/* resize a string. -/* -/* vs_alloc() returns a null pointer in case of problems. -/* -/* vs_strcpy() returns a null pointer if the request failed. -/* BUGS -/* Auto-resizing may change the address of the string data in -/* a vstring structure. Beware of dangling pointers. -/* AUTHOR(S) -/* Wietse Venema -/* Eindhoven University of Technology -/* Department of Mathematics and Computer Science -/* Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands -/* LAST MODIFICATION -/* 92/01/15 21:53:06 -/* VERSION/RELEASE -/* 1.3 -/*--*/ - -static char vstring_sccsid[] = "@(#) vstring.c 1.3 92/01/15 21:53:06"; - -/* C library */ - -extern char *malloc(); -extern char *realloc(); - -/* Application-specific stuff */ - -#include "vstring.h" - -/* vs_alloc - initial string allocation */ - -struct vstring *vs_alloc(len) -int len; -{ - register struct vstring *vp; - - if (len < 1 - || (vp = (struct vstring *) malloc(sizeof(struct vstring))) == 0 - || (vp->str = malloc(len)) == 0) - return (0); - vp->last = vp->str + len - 1; - return (vp); -} - -/* vs_realloc - extend string, update write pointer */ - -char *vs_realloc(vp, cp) -register struct vstring *vp; -char *cp; -{ - int where = cp - vp->str; - int len = vp->last - vp->str + 1; - - if ((vp->str = realloc(vp->str, len *= 2)) == 0) - return (0); - vp->last = vp->str + len - 1; - return (vp->str + where); -} - -/* vs_strcpy - copy string */ - -char *vs_strcpy(vp, dst, src) -register struct vstring *vp; -register char *dst; -register char *src; -{ - while (*src) { - if (VS_ADDCH(vp, dst, *src) == 0) - return (0); - src++; - } - *dst = '\0'; - return (dst); -} - diff --git a/build/unproto/vstring.h b/build/unproto/vstring.h deleted file mode 100644 index c2e1f88a77..0000000000 --- a/build/unproto/vstring.h +++ /dev/null @@ -1,15 +0,0 @@ -/* @(#) vstring.h 1.2 92/01/15 21:53:19 */ - -struct vstring { - char *str; /* string value */ - char *last; /* last position */ -}; - -extern struct vstring *vs_alloc(); /* initial allocation */ -extern char *vs_realloc(); /* string extension */ -extern char *vs_strcpy(); /* copy string */ - -/* macro to add one character to auto-resized string */ - -#define VS_ADDCH(vs,wp,c) \ - ((wp < (vs)->last || (wp = vs_realloc(vs,wp))) ? (*wp++ = c) : 0) From 201b689b3fa93d0e58dfa2eb722c73d729d2baaf Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 21 Oct 1998 02:30:28 +0000 Subject: [PATCH 119/148] no longer needed. --- build/README-unproto | 3 -- build/uname.sh | 109 ------------------------------------------- build/version | 2 +- 3 files changed, 1 insertion(+), 113 deletions(-) delete mode 100644 build/README-unproto delete mode 100644 build/uname.sh diff --git a/build/README-unproto b/build/README-unproto deleted file mode 100644 index 05def5e9ca..0000000000 --- a/build/README-unproto +++ /dev/null @@ -1,3 +0,0 @@ -The unproto code was obtained from: - - ftp://ftp.win.tue.nl/pub/unix/unproto5.shar.Z diff --git a/build/uname.sh b/build/uname.sh deleted file mode 100644 index fbb58ddd5c..0000000000 --- a/build/uname.sh +++ /dev/null @@ -1,109 +0,0 @@ -#!/bin/sh -# simple BSD-like uname replacement for those systems without it -# -# Copyright (c) 1995 The Regents of the University of Michigan -# - - -# -# if /bin/uname or /usr/bin/uname exists, just use it -# ...unless we are on SCO, where the provided uname is bad -# -if [ ! -f /usr/bin/swconfig ]; then - if [ -f /bin/uname ]; then - exec /bin/uname $* - fi - - if [ -f /usr/bin/uname ]; then - exec /usr/bin/uname $* - fi -fi - - -# -# flags to keep track of what to output -# -PRINT_SYSTEM=0 -PRINT_VERSION=0 -PRINT_RELEASE=0 - -# -# process arguments -# -USAGE="usage: $0 [-s] [-v] [-r]" - -while [ $# != 0 ]; do - case "$1" in - -s) - PRINT_SYSTEM=1 - ;; - -v) - PRINT_VERSION=1 - ;; - -r) - PRINT_RELEASE=1 - ;; - *) - echo "$USAGE" - exit 1 - ;; - esac - shift -done - - -# -# print system name by default -# -if [ $PRINT_VERSION = "0" -a $PRINT_RELEASE = "0" ]; then - PRINT_SYSTEM=1 -fi - - -# -# default to unknown everything... -# -SYSTEM="Unknown-System" -VERSION="Unknown-Version" -RELEASE="Unknown-Release" - -# -# check to see if we are on a machine that runs NextSTEP or SCO -# -if [ -r /NextApps ]; then - SYSTEM="NeXTSTEP" -elif [ -f /usr/bin/swconfig ]; then - SYSTEM="SCO" -fi - - -# -# output requested information -# -OUTPUT=0 -if [ $PRINT_SYSTEM = "1" ]; then - echo -n "$SYSTEM" - OUTPUT=1 -fi - -if [ $PRINT_VERSION = "1" ]; then - if [ $OUTPUT = "1" ]; then - echo -n " $VERSION" - else - echo -n "$VERSION" - OUTPUT=1 - fi -fi - -if [ $PRINT_RELEASE = "1" ]; then - if [ $OUTPUT = "1" ]; then - echo -n " $RELEASE" - else - echo -n "$RELEASE" - OUTPUT=1 - fi -fi - -echo - -exit 0 diff --git a/build/version b/build/version index 7dea76edb3..19e2c5948a 100644 --- a/build/version +++ b/build/version @@ -1 +1 @@ -1.0.1 +1.1-devel From 54da7d2f493a5f1ba30b13b0fc8095d3b426ea9c Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 21 Oct 1998 02:34:06 +0000 Subject: [PATCH 120/148] no longer supported. --- build/platforms/vms/make.com | 95 ------------------------------------ 1 file changed, 95 deletions(-) delete mode 100644 build/platforms/vms/make.com diff --git a/build/platforms/vms/make.com b/build/platforms/vms/make.com deleted file mode 100644 index 01fe3265a4..0000000000 --- a/build/platforms/vms/make.com +++ /dev/null @@ -1,95 +0,0 @@ -$! 30-Nov-1995 ldap V3.2 Craig Watkins Innosoft International, Inc. -$! -$! This is a crude make procedure to build the ldap libraries and the test -$! program. This should work with DECC or VAXC compilers. -$! -$! This links with UCX libraries so that it should work on any TCP/IP -$! package that has UCX emulation. This has been tested with MultiNet. -$! You may have to change the LINK to find your copy of UCX$IPC.OLB. -$! -$ ARCH = "VAX" -$ if f$getsyi("hw_model") .GE. 1024 then ARCH = "ALPHA" -$ ! -$ ! If we are on an alpha/axp, we need to use DECC -- otherwise, your choice -$ COMPILER = "VAXC" -$ if ARCH .eqs. "ALPHA" then COMPILER = "DECC" -$ ! -$ if COMPILER .eqs. "VAXC" -$ then -$ define arpa sys$library: -$ define sys sys$library: -$ define netinet sys$library: -$! This assumes your default compiler is VAXC; if not, add /VAXC below -$ cc_switches = "/include=([---.include],[---.libraries.vms])/define=(LDAP_DEBUG,CLDAP,LDAP_REFERRALS,STR_TRANSLATION,LDAP_CHARSET_8859=88591)" -$! -$ else -$! -$ cc_switches = "/decc/standard=vaxc/include=([---.include],[---.libraries.vms])/define=(__STDC__,LDAP_DEBUG,CLDAP,LDAP_REFERRALS,STR_TRANSLATION,LDAP_CHARSET_8859=88591) -$ endif -$ ! -$ cc 'CC_SWITCHES' 'P1' [---.libraries.liblber]io -$ cc 'CC_SWITCHES' 'P1' [---.libraries.liblber]encode -$ cc 'CC_SWITCHES' 'P1' [---.libraries.liblber]decode -$ cc 'CC_SWITCHES' 'P1' [---.libraries.liblber]version -$ ! -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]ABANDON -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]ADD -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]ADDENTRY -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]BIND -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]CACHE -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]CHARSET -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]CLDAP -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]COMPARE -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]DELETE -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]DISPTMPL -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]DSPARSE -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]ERROR -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]FREE -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]FRIENDLY -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]GETATTR -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]GETDN -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]GETDXBYNAME -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]GETENTRY -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]GETFILTER -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]GETVALUES -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]KBIND -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]MODIFY -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]MODRDN -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]OPEN -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]OS-IP -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]REGEX -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]REQUEST -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]RESULT -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]SBIND -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]SEARCH -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]SORT -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]SRCHPREF -$ cc 'CC_SWITCHES' 'P1' /define="TEMPLATEFILE=""LDAP_ETC:ldaptemplates.conf""" - - [---.libraries.libldap]TMPLOUT -$!CC 'CC_SWITCHES' 'P1' [---.libraries.libldap]TMPLTEST -$ cc 'CC_SWITCHES' 'P1' /define="FILTERFILE=""LDAP_ETC:ldapfilter.conf""" - - [---.libraries.libldap]UFN -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]UNBIND -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]VERSION -$ ! -$ cc 'CC_SWITCHES' 'P1' [---.libraries.vms]getopt -$ cc 'CC_SWITCHES' 'P1' [---.libraries.vms]strings -$ ! -$ library/create/log ldap.olb *.obj -$ ! -$ cc 'CC_SWITCHES' 'P1' [---.libraries.libldap]TEST -$ ! -$ if COMPILER .eqs. "VAXC" -$ then -$! -$ link test, sys$input/opt -ldap.olb/lib -sys$library:ucx$ipc.olb/lib -sys$share:vaxcrtl.exe/share -$! -$ else -$! -$ link test, sys$input/opt -ldap.olb/lib -$ endif -$! From bed979f9fca44b5437131e20c7719ad7c96da922 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 21 Oct 1998 02:36:02 +0000 Subject: [PATCH 121/148] No longer supported. --- libraries/macintosh/README | 67 - libraries/macintosh/getopt.c | 104 -- libraries/macintosh/kerberos-macos.c | 80 - libraries/macintosh/macos-ip.c | 291 --- libraries/macintosh/macos.h | 32 - libraries/macintosh/strings.c | 90 - libraries/macintosh/tcp/AddressXlation.h | 200 -- libraries/macintosh/tcp/GetMyIPAddr.h | 46 - libraries/macintosh/tcp/MacTCPCommonTypes.h | 220 --- libraries/macintosh/tcp/MiscIPPB.h | 179 -- libraries/macintosh/tcp/TCPPB.h | 404 ---- libraries/macintosh/tcp/UDPPB.h | 190 -- libraries/macintosh/tcp/dnr.c | 529 ------ libraries/macintosh/tcp/tcp.c | 982 ---------- libraries/macintosh/tcp/tcp.h | 79 - libraries/msdos/README | 12 - libraries/msdos/README.CSA | 100 - libraries/msdos/README.NFS | 55 - libraries/msdos/README.WSA | 228 --- libraries/msdos/lp.c | 265 --- libraries/msdos/makefile.msc | 78 - libraries/msdos/makefile.nfs | 60 - libraries/msdos/makelber.msc | 58 - libraries/msdos/makelber.nfs | 50 - libraries/msdos/makeldap.msc | 92 - libraries/msdos/makeldap.nfs | 97 - libraries/msdos/makeud.msc | 76 - libraries/msdos/msdos.c | 84 - libraries/msdos/msdos.h | 52 - libraries/msdos/opendos.c | 393 ---- libraries/msdos/protoud.h | 28 - libraries/msdos/winsock/include/file.h | 4 - libraries/msdos/winsock/include/filio.h | 4 - libraries/msdos/winsock/include/in.h | 4 - libraries/msdos/winsock/include/ioctl.h | 4 - libraries/msdos/winsock/include/krb/des.h | 63 - libraries/msdos/winsock/include/krb/krb.h | 504 ----- .../winsock/include/krb/mit/arpa/nameser.h | 257 --- .../msdos/winsock/include/krb/mit/conf-pc.h | 80 - .../msdos/winsock/include/krb/mit/conf.h | 81 - .../msdos/winsock/include/krb/mit/hesiod.h | 113 -- .../msdos/winsock/include/krb/mit/lsh_pwd.h | 56 - .../msdos/winsock/include/krb/mit/mit_copy.h | 22 - .../msdos/winsock/include/krb/mit/osconf.h | 63 - .../msdos/winsock/include/krb/mit/resolv.h | 144 -- .../msdos/winsock/include/krb/mit/wshelper.h | 62 - .../msdos/winsock/include/net/_sys/filio.h | 4 - .../msdos/winsock/include/net/_sys/ioctl.h | 4 - libraries/msdos/winsock/include/net/netdb.h | 4 - libraries/msdos/winsock/include/param.h | 4 - libraries/msdos/winsock/include/select.h | 4 - libraries/msdos/winsock/include/socket.h | 4 - libraries/msdos/winsock/include/time.h | 4 - libraries/msdos/winsock/include/wsa.h | 132 -- libraries/msdos/winsock/include/wsa/errno.c | 21 - libraries/msdos/winsock/include/wsa/errno.rc | 57 - .../msdos/winsock/include/wsa/winsock.def | 84 - libraries/msdos/winsock/include/wsa/winsock.h | 906 --------- libraries/msdos/winsock/kerberos.c | 119 -- libraries/msdos/winsock/ldap32.def | 166 -- libraries/msdos/winsock/ldap32.mak | 1632 ----------------- libraries/msdos/winsock/ldap32.mdp | Bin 43520 -> 0 bytes libraries/msdos/winsock/libldap.def | 165 -- libraries/msdos/winsock/libldap.mak | 667 ------- libraries/msdos/winsock/libldap.rc | 40 - libraries/msdos/winsock/ltest/console.c | 257 --- libraries/msdos/winsock/ltest/console.h | 19 - libraries/msdos/winsock/ltest/inpdlg.dlg | 14 - libraries/msdos/winsock/ltest/inpdlg.h | 1 - libraries/msdos/winsock/ltest/ltest.def | 9 - libraries/msdos/winsock/ltest/ltest.mak | 140 -- libraries/msdos/winsock/ltest/ltest.rc | 22 - libraries/msdos/winsock/ltest/ltest32.mak | 348 ---- libraries/msdos/winsock/ltest/ltest32.mdp | Bin 37376 -> 0 bytes libraries/msdos/winsock/ltest/textwind.c | 130 -- libraries/msdos/winsock/ltest/textwind.h | 13 - libraries/msdos/winsock/makefile | 680 ------- libraries/msdos/winsock/openwsa.c | 133 -- libraries/msdos/winsock/setupwsa.bat | 69 - libraries/msdos/winsock/unsetupwsa.bat | 77 - libraries/msdos/winsock/winkit/readme.txt | 182 -- libraries/msdos/winsock/winkit/windowskit.cmd | 1 - libraries/msdos/winsock/winkit/windowskit.mak | 172 -- libraries/msdos/winsock/wsa.c | 91 - libraries/msdos/winsock/wsa/errno.c | 21 - libraries/msdos/winsock/wsa/errno.rc | 57 - libraries/msdos/winsock/wsa/winsock.def | 84 - libraries/msdos/winsock/wsa/winsock.h | 826 --------- libraries/msdos/winsock/wsockip.c | 467 ----- libraries/vms/README.VMS | 16 - libraries/vms/getopt.c | 106 -- libraries/vms/strings.c | 97 - libraries/vms/ucx_select.h | 28 - 93 files changed, 14759 deletions(-) delete mode 100644 libraries/macintosh/README delete mode 100644 libraries/macintosh/getopt.c delete mode 100644 libraries/macintosh/kerberos-macos.c delete mode 100644 libraries/macintosh/macos-ip.c delete mode 100644 libraries/macintosh/macos.h delete mode 100644 libraries/macintosh/strings.c delete mode 100644 libraries/macintosh/tcp/AddressXlation.h delete mode 100644 libraries/macintosh/tcp/GetMyIPAddr.h delete mode 100644 libraries/macintosh/tcp/MacTCPCommonTypes.h delete mode 100644 libraries/macintosh/tcp/MiscIPPB.h delete mode 100644 libraries/macintosh/tcp/TCPPB.h delete mode 100644 libraries/macintosh/tcp/UDPPB.h delete mode 100644 libraries/macintosh/tcp/dnr.c delete mode 100644 libraries/macintosh/tcp/tcp.c delete mode 100644 libraries/macintosh/tcp/tcp.h delete mode 100644 libraries/msdos/README delete mode 100644 libraries/msdos/README.CSA delete mode 100644 libraries/msdos/README.NFS delete mode 100644 libraries/msdos/README.WSA delete mode 100644 libraries/msdos/lp.c delete mode 100644 libraries/msdos/makefile.msc delete mode 100644 libraries/msdos/makefile.nfs delete mode 100644 libraries/msdos/makelber.msc delete mode 100644 libraries/msdos/makelber.nfs delete mode 100644 libraries/msdos/makeldap.msc delete mode 100644 libraries/msdos/makeldap.nfs delete mode 100644 libraries/msdos/makeud.msc delete mode 100644 libraries/msdos/msdos.c delete mode 100644 libraries/msdos/msdos.h delete mode 100644 libraries/msdos/opendos.c delete mode 100644 libraries/msdos/protoud.h delete mode 100644 libraries/msdos/winsock/include/file.h delete mode 100644 libraries/msdos/winsock/include/filio.h delete mode 100644 libraries/msdos/winsock/include/in.h delete mode 100644 libraries/msdos/winsock/include/ioctl.h delete mode 100644 libraries/msdos/winsock/include/krb/des.h delete mode 100644 libraries/msdos/winsock/include/krb/krb.h delete mode 100644 libraries/msdos/winsock/include/krb/mit/arpa/nameser.h delete mode 100644 libraries/msdos/winsock/include/krb/mit/conf-pc.h delete mode 100644 libraries/msdos/winsock/include/krb/mit/conf.h delete mode 100644 libraries/msdos/winsock/include/krb/mit/hesiod.h delete mode 100644 libraries/msdos/winsock/include/krb/mit/lsh_pwd.h delete mode 100644 libraries/msdos/winsock/include/krb/mit/mit_copy.h delete mode 100644 libraries/msdos/winsock/include/krb/mit/osconf.h delete mode 100644 libraries/msdos/winsock/include/krb/mit/resolv.h delete mode 100644 libraries/msdos/winsock/include/krb/mit/wshelper.h delete mode 100644 libraries/msdos/winsock/include/net/_sys/filio.h delete mode 100644 libraries/msdos/winsock/include/net/_sys/ioctl.h delete mode 100644 libraries/msdos/winsock/include/net/netdb.h delete mode 100644 libraries/msdos/winsock/include/param.h delete mode 100644 libraries/msdos/winsock/include/select.h delete mode 100644 libraries/msdos/winsock/include/socket.h delete mode 100644 libraries/msdos/winsock/include/time.h delete mode 100644 libraries/msdos/winsock/include/wsa.h delete mode 100644 libraries/msdos/winsock/include/wsa/errno.c delete mode 100644 libraries/msdos/winsock/include/wsa/errno.rc delete mode 100644 libraries/msdos/winsock/include/wsa/winsock.def delete mode 100644 libraries/msdos/winsock/include/wsa/winsock.h delete mode 100644 libraries/msdos/winsock/kerberos.c delete mode 100644 libraries/msdos/winsock/ldap32.def delete mode 100644 libraries/msdos/winsock/ldap32.mak delete mode 100644 libraries/msdos/winsock/ldap32.mdp delete mode 100644 libraries/msdos/winsock/libldap.def delete mode 100644 libraries/msdos/winsock/libldap.mak delete mode 100644 libraries/msdos/winsock/libldap.rc delete mode 100644 libraries/msdos/winsock/ltest/console.c delete mode 100644 libraries/msdos/winsock/ltest/console.h delete mode 100644 libraries/msdos/winsock/ltest/inpdlg.dlg delete mode 100644 libraries/msdos/winsock/ltest/inpdlg.h delete mode 100644 libraries/msdos/winsock/ltest/ltest.def delete mode 100644 libraries/msdos/winsock/ltest/ltest.mak delete mode 100644 libraries/msdos/winsock/ltest/ltest.rc delete mode 100644 libraries/msdos/winsock/ltest/ltest32.mak delete mode 100644 libraries/msdos/winsock/ltest/ltest32.mdp delete mode 100644 libraries/msdos/winsock/ltest/textwind.c delete mode 100644 libraries/msdos/winsock/ltest/textwind.h delete mode 100644 libraries/msdos/winsock/makefile delete mode 100644 libraries/msdos/winsock/openwsa.c delete mode 100644 libraries/msdos/winsock/setupwsa.bat delete mode 100644 libraries/msdos/winsock/unsetupwsa.bat delete mode 100644 libraries/msdos/winsock/winkit/readme.txt delete mode 100644 libraries/msdos/winsock/winkit/windowskit.cmd delete mode 100644 libraries/msdos/winsock/winkit/windowskit.mak delete mode 100644 libraries/msdos/winsock/wsa.c delete mode 100644 libraries/msdos/winsock/wsa/errno.c delete mode 100644 libraries/msdos/winsock/wsa/errno.rc delete mode 100644 libraries/msdos/winsock/wsa/winsock.def delete mode 100644 libraries/msdos/winsock/wsa/winsock.h delete mode 100644 libraries/msdos/winsock/wsockip.c delete mode 100644 libraries/vms/README.VMS delete mode 100644 libraries/vms/getopt.c delete mode 100644 libraries/vms/strings.c delete mode 100644 libraries/vms/ucx_select.h diff --git a/libraries/macintosh/README b/libraries/macintosh/README deleted file mode 100644 index ac5ceb9cdb..0000000000 --- a/libraries/macintosh/README +++ /dev/null @@ -1,67 +0,0 @@ -LDAP Macintosh README - -The lber and ldap client libraries have been ported to Macintosh. -Build testing was originally done with Think C 5.0.4 and MPW 3.2, both -running under System 7.1. Recently, it has been built using Metrowerks -CodeWarrior 8.0 and Symantec C++ 7.0.3. The libaries have been tested -under System 7.0, 7.1, and 7.5, and are believed to run under any -System later than 6.0. None of the LDAP clients included in the -distribution have been tested on the Mac. - -MAKING THE DISTRIBUTION -The instructions included here are for Symantec C 7.0.4, but the steps -are very similar for the other environments. - -To build the ldap and lber libraries (easiest to do as one project): - - 1) create a new project that contains the following files: - libraries/liblber/decode.c - libraries/liblber/encode.c - libraries/liblber/io.c - libraries/macintosh/tcp/dnr.c - libraries/macintosh/tcp/tcp.c - libraries/macintosh/macos-ip.c - libraries/macintosh/strings.c - plus all the .c files in libraries/libldap/, except test.c, - tmpltest.c, and os-ip.c. - - 2) put all of the .h files in include/, libraries/macintosh/, - libraries/libldap and libraries/macintosh/tcp somewhere - in the same folder where the project is located. - - 3) Add the MacTraps, MacTraps2, Unix, and ANSI-small libraries - (included with Symantec/ThinkC) to the project. - - 3) Bring up the Edit menu "Options..." dialog and set the following: - Language Settings: - Strict Prototype Enforcement/Require Prototypes - Prefix: - #define MACOS - #define NEEDPROTOS - #define NEEDGETOPT - #define NO_USERINTERFACE - #define FILTERFILE "ldapfilter.conf" - #define TEMPLATEFILE "ldaptemplates.conf" - - If you want to build a version of the library that does - not have any global variables (such as for inclusion in a - driver or other code module), add a "#define NO_GLOBALS" - to the Prefix. The only catch is that the tcp/dnr.c - file needs changes to remove the global variables. - - If you want support for referrals (optionally enabled - for each LDAP connection), add '#define LDAP_REFERRALS' - to the prefix list. This is recommended. - - 4) Compile the project (Bring Up To Date under the Project menu) - - 5) If you would like to use the libldap/test.c program to test the - library in an ugly console window, you will need to add the - test.c file itself and the full ANSI library (instead of - ANSI-small) to the project, and don't define NO_USERINTERFACE. - -BUG REPORTING - - Bug reports should be sent to bug-ldap@terminator.cc.umich.edu. - -README Last updated 11 April 1996 by Mark Smith diff --git a/libraries/macintosh/getopt.c b/libraries/macintosh/getopt.c deleted file mode 100644 index 25e5d0baf0..0000000000 --- a/libraries/macintosh/getopt.c +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (c) 1987 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that: (1) source distributions retain this entire copyright - * notice and comment, and (2) distributions including binaries display - * the following acknowledgement: ``This product includes software - * developed by the University of California, Berkeley and its contributors'' - * in the documentation or other materials provided with the distribution - * and in all advertising materials mentioning features or use of this - * software. Neither the name of the University nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)getopt.c 4.12 (Berkeley) 6/1/90"; -#endif /* LIBC_SCCS and not lint */ - -#include -#include -#include "lber.h" -#define index strchr -#define rindex strrchr - -/* - * get option letter from argument vector - */ -int opterr = 1, /* if error message should be printed */ - optind = 1, /* index into parent argv vector */ - optopt; /* character checked for validity */ -char *optarg; /* argument associated with option */ - -#define BADCH (int)'?' -#define EMSG "" - -getopt(int nargc, char **nargv, char *ostr) -{ - static char *place = EMSG; /* option letter processing */ - register char *oli; /* option letter list index */ - char *p; - - if (!*place) { /* update scanning pointer */ - if (optind >= nargc || *(place = nargv[optind]) != '-') { - place = EMSG; - return(EOF); - } - if (place[1] && *++place == '-') { /* found "--" */ - ++optind; - place = EMSG; - return(EOF); - } - } /* option letter okay? */ - if ((optopt = (int)*place++) == (int)':' || - !(oli = index(ostr, optopt))) { - /* - * if the user didn't specify '-' as an option, - * assume it means EOF. - */ - if (optopt == (int)'-') - return(EOF); - if (!*place) - ++optind; - if (opterr) { - if (!(p = rindex(*nargv, '/'))) - p = *nargv; - else - ++p; - (void)fprintf(stderr, "%s: illegal option -- %c\n", - p, optopt); - } - return(BADCH); - } - if (*++oli != ':') { /* don't need argument */ - optarg = NULL; - if (!*place) - ++optind; - } - else { /* need an argument */ - if (*place) /* no white space */ - optarg = place; - else if (nargc <= ++optind) { /* no arg */ - place = EMSG; - if (!(p = rindex(*nargv, '/'))) - p = *nargv; - else - ++p; - if (opterr) - (void)fprintf(stderr, - "%s: option requires an argument -- %c\n", - p, optopt); - return(BADCH); - } - else /* white space */ - optarg = nargv[optind]; - place = EMSG; - ++optind; - } - return(optopt); /* dump back option letter */ -} diff --git a/libraries/macintosh/kerberos-macos.c b/libraries/macintosh/kerberos-macos.c deleted file mode 100644 index ee9c31c6b1..0000000000 --- a/libraries/macintosh/kerberos-macos.c +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 1992, 1994 Regents of the University of Michigan. - * All rights reserved. - * - * kerberos-macos.c - */ - -#ifndef lint -static char copyright[] = "@(#) Copyright (c) 1994 Regents of the University of Michigan.\nAll rights reserved.\n"; -#endif - -#include "lber.h" -#include "ldap.h" - -#ifdef KERBEROS - -#include -#include -#include -#ifdef THINK_C -#include -#else /* THINK_C */ -#include -#endif /* THINK_C */ -#ifdef AUTHMAN -#include -#include -#include "authLibrary.h" -#include "ldap-int.h" - -/* - * get_kerberosv4_credentials - obtain kerberos v4 credentials for ldap. - */ - -/* ARGSUSED */ -char * -get_kerberosv4_credentials( LDAP *ld, char *who, char *service, int *len ) -{ - static short authman_refnum = 0; - char *cred, ticket[ MAX_KTXT_LEN ]; - short version, ticketlen, err; - Str255 svcps, instps; - - /* - * make sure RJC's Authentication Manager 2.0 or better is available - */ - if ( authman_refnum == 0 && (( err = openAuthMan( &authman_refnum, &version )) != noErr || version < 2 )) { - authman_refnum = 0; - ld->ld_errno = LDAP_AUTH_UNKNOWN; - return( NULL ); - } - - strcpy( (char *)svcps, service ); - CtoPstr( (char *)svcps ); -#ifdef LDAP_REFERRALS - strcpy( (char *)instps, ld->ld_defconn->lconn_krbinstance ); -#else /* LDAP_REFERRALS */ - strcpy( (char *)instps, ld->ld_host ); -#endif /* LDAP_REFERRALS */ - - CtoPstr( (char *)instps ); - if (( err = getV4Ticket( authman_refnum, &ticket, &ticketlen, &svcps, &instps, - NULL, INFINITE_LIFETIME, 1 )) != noErr ) { - ld->ld_errno = ( err == userCanceledErr ) ? - LDAP_USER_CANCELLED : LDAP_INVALID_CREDENTIALS; - return( NULL ); - } - - if (( cred = malloc( ticketlen )) == NULL ) { - ld->ld_errno = LDAP_NO_MEMORY; - return( NULL ); - } - - *len = ticketlen; - memcpy( cred, (char *)ticket, ticketlen ); - return( cred ); -} - -#endif -#endif diff --git a/libraries/macintosh/macos-ip.c b/libraries/macintosh/macos-ip.c deleted file mode 100644 index 3a6a1805c2..0000000000 --- a/libraries/macintosh/macos-ip.c +++ /dev/null @@ -1,291 +0,0 @@ -/* - * Copyright (c) 1995 Regents of the University of Michigan. - * All rights reserved. - * - * macos-ip.c -- Macintosh platform-specific TCP & UDP related code - */ - -#ifndef lint -static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of Michigan.\nAll rights reserved.\n"; -#endif - -#include -#include -#include -#include -#include "macos.h" -#include "lber.h" -#include "ldap.h" -#include "ldap-int.h" - -int -connect_to_host( Sockbuf *sb, char *host, unsigned long address, - int port, int async ) -/* - * if host == NULL, connect using address - * "address" and "port" must be in network byte order - * zero is returned upon success, -1 if fatal error, -2 EINPROGRESS - * async is only used ifndef NO_REFERRALS (non-0 means don't wait for connect) - * XXX async is not used yet! - */ -{ - void *tcps; - short i; -#ifdef SUPPORT_OPENTRANSPORT - InetHostInfo hi; -#else /* SUPPORT_OPENTRANSPORT */ - struct hostInfo hi; -#endif /* SUPPORT_OPENTRANSPORT */ - - Debug( LDAP_DEBUG_TRACE, "connect_to_host: %s:%d\n", - ( host == NULL ) ? "(by address)" : host, ntohs( port ), 0 ); - - if ( host != NULL && gethostinfobyname( host, &hi ) != noErr ) { - return( -1 ); - } - - if (( tcps = tcpopen( NULL, TCP_BUFSIZ )) == NULL ) { - Debug( LDAP_DEBUG_TRACE, "tcpopen failed\n", 0, 0, 0 ); - return( -1 ); - } - -#ifdef SUPPORT_OPENTRANSPORT - for ( i = 0; host == NULL || hi.addrs[ i ] != 0; ++i ) { - if ( host != NULL ) { - SAFEMEMCPY( (char *)&address, (char *)&hi.addrs[ i ], sizeof( long )); - } -#else /* SUPPORT_OPENTRANSPORT */ - for ( i = 0; host == NULL || hi.addr[ i ] != 0; ++i ) { - if ( host != NULL ) { - SAFEMEMCPY( (char *)&address, (char *)&hi.addr[ i ], sizeof( long )); - } -#endif /* SUPPORT_OPENTRANSPORT */ - - if ( tcpconnect( tcps, address, port ) > 0 ) { - sb->sb_sd = (void *)tcps; - return( 0 ); - } - - if ( host == NULL ) { /* using single address -- not hi.addrs array */ - break; - } - } - - Debug( LDAP_DEBUG_TRACE, "tcpconnect failed\n", 0, 0, 0 ); - tcpclose( tcps ); - return( -1 ); -} - - -void -close_connection( Sockbuf *sb ) -{ - tcpclose( (tcpstream *)sb->sb_sd ); -} - - -#ifdef KERBEROS -char * -host_connected_to( Sockbuf *sb ) -{ - ip_addr addr; - -#ifdef SUPPORT_OPENTRANSPORT - InetHostInfo hi; -#else /* SUPPORT_OPENTRANSPORT */ - struct hostInfo hi; -#endif /* SUPPORT_OPENTRANSPORT */ - - if ( tcpgetpeername( (tcpstream *)sb->sb_sd, &addr, NULL ) != noErr ) { - return( NULL ); - } - -#ifdef SUPPORT_OPENTRANSPORT - if ( gethostinfobyaddr( addr, &hi ) == noErr ) { - return( strdup( hi.name )); - } -#else /* SUPPORT_OPENTRANSPORT */ - if ( gethostinfobyaddr( addr, &hi ) == noErr ) { - return( strdup( hi.cname )); - } -#endif /* SUPPORT_OPENTRANSPORT */ - - return( NULL ); -} -#endif /* KERBEROS */ - - -#ifdef LDAP_REFERRALS -struct tcpstreaminfo { - struct tcpstream *tcpsi_stream; - Boolean tcpsi_check_read; - Boolean tcpsi_is_read_ready; -/* Boolean tcpsi_check_write; /* no write select support needed yet */ -/* Boolean tcpsi_is_write_ready; /* ditto */ -}; - -struct selectinfo { - short si_count; - struct tcpstreaminfo *si_streaminfo; -}; - - -void -mark_select_read( LDAP *ld, Sockbuf *sb ) -{ - struct selectinfo *sip; - struct tcpstreaminfo *tcpsip; - short i; - - Debug( LDAP_DEBUG_TRACE, "mark_select_read: stream %x\n", (tcpstream *)sb->sb_sd, 0, 0 ); - - if (( sip = (struct selectinfo *)ld->ld_selectinfo ) == NULL ) { - return; - } - - for ( i = 0; i < sip->si_count; ++i ) { /* make sure stream is not already in the list... */ - if ( sip->si_streaminfo[ i ].tcpsi_stream == (tcpstream *)sb->sb_sd ) { - sip->si_streaminfo[ i ].tcpsi_check_read = true; - sip->si_streaminfo[ i ].tcpsi_is_read_ready = false; - return; - } - } - - /* add a new stream element to our array... */ - if ( sip->si_count <= 0 ) { - tcpsip = (struct tcpstreaminfo *)malloc( sizeof( struct tcpstreaminfo )); - } else { - tcpsip = (struct tcpstreaminfo *)realloc( sip->si_streaminfo, - ( sip->si_count + 1 ) * sizeof( struct tcpstreaminfo )); - } - - if ( tcpsip != NULL ) { - tcpsip[ sip->si_count ].tcpsi_stream = (tcpstream *)sb->sb_sd; - tcpsip[ sip->si_count ].tcpsi_check_read = true; - tcpsip[ sip->si_count ].tcpsi_is_read_ready = false; - sip->si_streaminfo = tcpsip; - ++sip->si_count; - } -} - - -void -mark_select_clear( LDAP *ld, Sockbuf *sb ) -{ - struct selectinfo *sip; - short i; - - Debug( LDAP_DEBUG_TRACE, "mark_select_clear: stream %x\n", (tcpstream *)sb->sb_sd, 0, 0 ); - - sip = (struct selectinfo *)ld->ld_selectinfo; - if ( sip != NULL && sip->si_count > 0 && sip->si_streaminfo != NULL ) { - for ( i = 0; i < sip->si_count; ++i ) { - if ( sip->si_streaminfo[ i ].tcpsi_stream == (tcpstream *)sb->sb_sd ) { - break; - } - } - if ( i < sip->si_count ) { - --sip->si_count; - for ( ; i < sip->si_count; ++i ) { - sip->si_streaminfo[ i ] = sip->si_streaminfo[ i + 1 ]; - } - /* we don't bother to use realloc to make the si_streaminfo array smaller */ - } - } -} - - -int -is_read_ready( LDAP *ld, Sockbuf *sb ) -{ - struct selectinfo *sip; - short i; - - sip = (struct selectinfo *)ld->ld_selectinfo; - if ( sip != NULL && sip->si_count > 0 && sip->si_streaminfo != NULL ) { - for ( i = 0; i < sip->si_count; ++i ) { - if ( sip->si_streaminfo[ i ].tcpsi_stream == (tcpstream *)sb->sb_sd ) { -#ifdef LDAP_DEBUG - if ( sip->si_streaminfo[ i ].tcpsi_is_read_ready ) { - Debug( LDAP_DEBUG_TRACE, "is_read_ready: stream %x READY\n", - (tcpstream *)sb->sb_sd, 0, 0 ); - } else { - Debug( LDAP_DEBUG_TRACE, "is_read_ready: stream %x Not Ready\n", - (tcpstream *)sb->sb_sd, 0, 0 ); - } -#endif /* LDAP_DEBUG */ - return( sip->si_streaminfo[ i ].tcpsi_is_read_ready ? 1 : 0 ); - } - } - } - - Debug( LDAP_DEBUG_TRACE, "is_read_ready: stream %x: NOT FOUND\n", (tcpstream *)sb->sb_sd, 0, 0 ); - return( 0 ); -} - - -void * -new_select_info() -{ - return( (void *)calloc( 1, sizeof( struct selectinfo ))); -} - - -void -free_select_info( void *sip ) -{ - if ( sip != NULL ) { - free( sip ); - } -} - - -int -do_ldap_select( LDAP *ld, struct timeval *timeout ) -{ - struct selectinfo *sip; - Boolean ready, gotselecterr; - long ticks, endticks; - short i, err; - - Debug( LDAP_DEBUG_TRACE, "do_ldap_select\n", 0, 0, 0 ); - - if (( sip = (struct selectinfo *)ld->ld_selectinfo ) == NULL ) { - return( -1 ); - } - - if ( sip->si_count == 0 ) { - return( 1 ); - } - - if ( timeout != NULL ) { - endticks = 60 * timeout->tv_sec + ( 60 * timeout->tv_usec ) / 1000000 + TickCount(); - } - - for ( i = 0; i < sip->si_count; ++i ) { - if ( sip->si_streaminfo[ i ].tcpsi_check_read ) { - sip->si_streaminfo[ i ].tcpsi_is_read_ready = false; - } - } - - ready = gotselecterr = false; - do { - for ( i = 0; i < sip->si_count; ++i ) { - if ( sip->si_streaminfo[ i ].tcpsi_check_read && !sip->si_streaminfo[ i ].tcpsi_is_read_ready ) { - if (( err = tcpreadready( sip->si_streaminfo[ i ].tcpsi_stream )) > 0 ) { - sip->si_streaminfo[ i ].tcpsi_is_read_ready = ready = true; - } else if ( err < 0 ) { - gotselecterr = true; - } - } - } - if ( !ready && !gotselecterr ) { - Delay( 2L, &ticks ); - SystemTask(); - } - } while ( !ready && !gotselecterr && ( timeout == NULL || ticks < endticks )); - - Debug( LDAP_DEBUG_TRACE, "do_ldap_select returns %d\n", ready ? 1 : ( gotselecterr ? -1 : 0 ), 0, 0 ); - return( ready ? 1 : ( gotselecterr ? -1 : 0 )); -} -#endif /* LDAP_REFERRALS */ diff --git a/libraries/macintosh/macos.h b/libraries/macintosh/macos.h deleted file mode 100644 index d765413c34..0000000000 --- a/libraries/macintosh/macos.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * macos.h: bridge unix and Mac for LBER/LDAP - */ -#define ntohl( l ) (l) -#define htonl( l ) (l) -#define ntohs( s ) (s) -#define htons( s ) (s) - -#ifdef NO_GLOBALS - -#ifdef macintosh /* IUMagIDString declared in TextUtils.h under MPW */ -#include -#else /* macintosh */ /* IUMagIDString declared in Packages.h under ThinkC */ -#include -#endif /* macintosh */ - -#define strcasecmp( s1, s2 ) IUMagIDString( s1, s2, strlen( s1 ), \ - strlen( s2 )) -#else /* NO_GLOBALS */ -int strcasecmp( char *s1, char *s2 ); -int strncasecmp( char *s1, char *s2, long n ); -#endif NO_GLOBALS - -#include /* to get BlockMove() */ - -char *strdup( char *s ); - -#ifndef isascii -#define isascii(c) ((unsigned)(c)<=0177) /* for those who don't have this in ctype.h */ -#endif isascii - -#include "tcp.h" diff --git a/libraries/macintosh/strings.c b/libraries/macintosh/strings.c deleted file mode 100644 index 5b9044111f..0000000000 --- a/libraries/macintosh/strings.c +++ /dev/null @@ -1,90 +0,0 @@ -/* - * strings.c - */ -#include -#include -#include "macos.h" - - -#ifndef NO_GLOBALS -/* - * Copyright (c) 1987 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ -/* - * This array is designed for mapping upper and lower case letter - * together for a case independent comparison. The mappings are - * based upon ascii character sequences. - */ -static char charmap[] = { - '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', - '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', - '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', - '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', - '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', - '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', - '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', - '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', - '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147', - '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', - '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', - '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137', - '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147', - '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', - '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', - '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', - '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', - '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', - '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', - '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', - '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247', - '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257', - '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267', - '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277', - '\300', '\341', '\342', '\343', '\344', '\345', '\346', '\347', - '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', - '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', - '\370', '\371', '\372', '\333', '\334', '\335', '\336', '\337', - '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', - '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', - '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', - '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377', -}; - -int -strcasecmp(char *s1, char *s2) -{ - register char *cm = charmap; - - while (cm[*s1] == cm[*s2++]) - if (*s1++ == '\0') - return(0); - return(cm[*s1] - cm[*--s2]); -} - -int -strncasecmp(char *s1, char *s2, long n) -{ - register char *cm = charmap; - - while (--n >= 0 && cm[*s1] == cm[*s2++]) - if (*s1++ == '\0') - return(0); - return(n < 0 ? 0 : cm[*s1] - cm[*--s2]); -} -#endif NO_GLOBALS - - -char * -strdup( char *p ) -{ - char *r; - - r = (char *) malloc( strlen( p ) + 1 ); - if ( r != NULL ) { - strcpy( r, p ); - } - - return( r ); -} diff --git a/libraries/macintosh/tcp/AddressXlation.h b/libraries/macintosh/tcp/AddressXlation.h deleted file mode 100644 index 8157cc571a..0000000000 --- a/libraries/macintosh/tcp/AddressXlation.h +++ /dev/null @@ -1,200 +0,0 @@ -/* - File: AddressXlation.h - - Copyright: © 1984-1993 by Apple Computer, Inc., all rights reserved. - - WARNING - This file was auto generated by the interfacer tool. Modifications - must be made to the master file. - -*/ - -#ifndef __ADDRESSXLATION__ -#define __ADDRESSXLATION__ - -#ifndef __MACTCPCOMMONTYPES__ -#include "MacTCPCommonTypes.h" -#endif - -#define NUM_ALT_ADDRS 4 - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct hostInfo { - long rtnCode; - char cname[255]; - unsigned long addr[NUM_ALT_ADDRS]; -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -typedef struct hostInfo hostInfo; - -enum AddrClasses { - A = 1, - NS, - CNAME = 5, - HINFO = 13, - MX = 15, - lastClass = 32767 -}; - -typedef enum AddrClasses AddrClasses; - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct HInfoRec { - char cpuType[30]; - char osType[30]; -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -typedef struct HInfoRec HInfoRec; - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct MXRec { - unsigned short preference; - char exchange[255]; -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -typedef struct MXRec MXRec; - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct returnRec { - long rtnCode; - char cname[255]; - union { - unsigned long addr[NUM_ALT_ADDRS]; - struct HInfoRec hinfo; - struct MXRec mx; - } rdata; -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -typedef struct returnRec returnRec; - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct cacheEntryRecord { - char *cname; - unsigned short type; - unsigned short cacheClass; - unsigned long ttl; - union { - char *name; - ip_addr addr; - } rdata; -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -typedef struct cacheEntryRecord cacheEntryRecord; - -#ifdef __cplusplus -extern "C" { -#endif - -typedef pascal void (*EnumResultProcPtr)(struct cacheEntryRecord *cacheEntryRecordPtr, char *userDataPtr); - -enum { - uppEnumResultProcInfo = kPascalStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(struct cacheEntryRecord*))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(char*))) -}; - -#if USESROUTINEDESCRIPTORS -typedef UniversalProcPtr EnumResultUPP; - -#define CallEnumResultProc(userRoutine, cacheEntryRecordPtr, userDataPtr) \ - CallUniversalProc((UniversalProcPtr)userRoutine, uppEnumResultProcInfo, cacheEntryRecordPtr, userDataPtr) -#define NewEnumResultProc(userRoutine) \ - (EnumResultUPP) NewRoutineDescriptor((ProcPtr)userRoutine, uppEnumResultProcInfo, GetCurrentISA()) -#else -typedef EnumResultProcPtr EnumResultUPP; - -#define CallEnumResultProc(userRoutine, cacheEntryRecordPtr, userDataPtr) \ - (*userRoutine)(cacheEntryRecordPtr, userDataPtr) -#define NewEnumResultProc(userRoutine) \ - (EnumResultUPP)(userRoutine) -#endif - -typedef pascal void (*ResultProcPtr)(struct hostInfo *hostInfoPtr, char *userDataPtr); - -enum { - uppResultProcInfo = kPascalStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(struct hostInfo*))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(char*))) -}; - -#if USESROUTINEDESCRIPTORS -typedef UniversalProcPtr ResultUPP; - -#define CallResultProc(userRoutine, hostInfoPtr, userDataPtr) \ - CallUniversalProc((UniversalProcPtr)userRoutine, uppResultProcInfo, hostInfoPtr, userDataPtr) -#define NewResultProc(userRoutine) \ - (ResultUPP) NewRoutineDescriptor((ProcPtr)userRoutine, uppResultProcInfo, GetCurrentISA()) -#else -typedef ResultProcPtr ResultUPP; - -#define CallResultProc(userRoutine, hostInfoPtr, userDataPtr) \ - (*userRoutine)(hostInfoPtr, userDataPtr) -#define NewResultProc(userRoutine) \ - (ResultUPP)(userRoutine) -#endif - -typedef pascal void (*ResultProc2ProcPtr)(struct returnRec *returnRecPtr, char *userDataPtr); - -enum { - uppResultProc2ProcInfo = kPascalStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(struct returnRec*))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(char*))) -}; - -#if USESROUTINEDESCRIPTORS -typedef UniversalProcPtr ResultProc2UPP; - -#define CallResultProc2Proc(userRoutine, returnRecPtr, userDataPtr) \ - CallUniversalProc((UniversalProcPtr)userRoutine, uppResultProc2ProcInfo, returnRecPtr, userDataPtr) -#define NewResultProc2Proc(userRoutine) \ - (ResultProc2UPP) NewRoutineDescriptor((ProcPtr)userRoutine, uppResultProc2ProcInfo, GetCurrentISA()) -#else -typedef ResultProc2ProcPtr ResultProc2UPP; - -#define CallResultProc2Proc(userRoutine, returnRecPtr, userDataPtr) \ - (*userRoutine)(returnRecPtr, userDataPtr) -#define NewResultProc2Proc(userRoutine) \ - (ResultProc2UPP)(userRoutine) -#endif - -typedef ResultProc2ProcPtr ResultProc2Ptr; - -extern OSErr OpenResolver(char *fileName); -extern OSErr StrToAddr(char *hostName, struct hostInfo *hostInfoPtr, ResultUPP ResultProc, char *userDataPtr); -extern OSErr AddrToStr(unsigned long addr, char *addrStr); -extern OSErr EnumCache(EnumResultUPP enumResultProc, char *userDataPtr); -extern OSErr AddrToName(ip_addr addr, struct hostInfo *hostInfoPtr, ResultUPP ResultProc, char *userDataPtr); -extern OSErr HInfo(char *hostName, struct returnRec *returnRecPtr, ResultProc2Ptr resultProc, char *userDataPtr); -extern OSErr MXInfo(char *hostName, struct returnRec *returnRecPtr, ResultProc2Ptr resultProc, char *userDataPtr); -extern OSErr CloseResolver(void); -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/libraries/macintosh/tcp/GetMyIPAddr.h b/libraries/macintosh/tcp/GetMyIPAddr.h deleted file mode 100644 index 253cdf6939..0000000000 --- a/libraries/macintosh/tcp/GetMyIPAddr.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - File: GetMyIPAddr.h - - Copyright: © 1984-1993 by Apple Computer, Inc., all rights reserved. - - WARNING - This file was auto generated by the interfacer tool. Modifications - must be made to the master file. - -*/ - -#ifndef __GETMYIPADDR__ -#define __GETMYIPADDR__ - -#ifndef __MACTCPCOMMONTYPES__ -#include -#endif - -#define ipctlGetAddr 15 /* csCode to get our IP address */ - -#define GetIPParamBlockHeader \ - struct QElem *qLink; \ - short qType; \ - short ioTrap; \ - Ptr ioCmdAddr; \ - ProcPtr ioCompletion; \ - OSErr ioResult; \ - StringPtr ioNamePtr; \ - short ioVRefNum; \ - short ioCRefNum; \ - short csCode - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct GetAddrParamBlock { - GetIPParamBlockHeader; /* standard I/O header */ - ip_addr ourAddress; /* our IP address */ - long ourNetMask; /* our IP net mask */ -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -#endif - diff --git a/libraries/macintosh/tcp/MacTCPCommonTypes.h b/libraries/macintosh/tcp/MacTCPCommonTypes.h deleted file mode 100644 index f806fdcc93..0000000000 --- a/libraries/macintosh/tcp/MacTCPCommonTypes.h +++ /dev/null @@ -1,220 +0,0 @@ -/* - File: MacTCPCommonTypes.h - - Copyright: © 1984-1993 by Apple Computer, Inc., all rights reserved. - - WARNING - This file was auto generated by the interfacer tool. Modifications - must be made to the master file. - -*/ - -#ifndef __MACTCPCOMMONTYPES__ -#define __MACTCPCOMMONTYPES__ - -#ifndef __TYPES__ -#include -#endif - -/* MacTCP return Codes in the range -23000 through -23049 */ -#define inProgress 1 /* I/O in progress */ - -#define ipBadLapErr -23000 /* bad network configuration */ -#define ipBadCnfgErr -23001 /* bad IP configuration error */ -#define ipNoCnfgErr -23002 /* missing IP or LAP configuration error */ -#define ipLoadErr -23003 /* error in MacTCP load */ -#define ipBadAddr -23004 /* error in getting address */ -#define connectionClosing -23005 /* connection is closing */ -#define invalidLength -23006 -#define connectionExists -23007 /* request conflicts with existing connection */ -#define connectionDoesntExist -23008 /* connection does not exist */ -#define insufficientResources -23009 /* insufficient resources to perform request */ -#define invalidStreamPtr -23010 -#define streamAlreadyOpen -23011 -#define connectionTerminated -23012 -#define invalidBufPtr -23013 -#define invalidRDS -23014 -#define invalidWDS -23014 -#define openFailed -23015 -#define commandTimeout -23016 -#define duplicateSocket -23017 - -/* Error codes from internal IP functions */ -#define ipDontFragErr -23032 /* Packet too large to send w/o fragmenting */ -#define ipDestDeadErr -23033 /* destination not responding */ -#define icmpEchoTimeoutErr -23035 /* ICMP echo timed-out */ -#define ipNoFragMemErr -23036 /* no memory to send fragmented pkt */ -#define ipRouteErr -23037 /* can't route packet off-net */ - -#define nameSyntaxErr -23041 -#define cacheFault -23042 -#define noResultProc -23043 -#define noNameServer -23044 -#define authNameErr -23045 -#define noAnsErr -23046 -#define dnrErr -23047 -#define outOfMemory -23048 - -#define BYTES_16WORD 2 /* bytes per 16 bit ip word */ -#define BYTES_32WORD 4 /* bytes per 32 bit ip word */ -#define BYTES_64WORD 8 /* bytes per 64 bit ip word */ - -typedef unsigned char b_8; /* 8-bit quantity */ -typedef unsigned short b_16; /* 16-bit quantity */ -typedef unsigned long b_32; /* 32-bit quantity */ -typedef b_32 ip_addr; /* IP address is 32-bits */ - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct ip_addrbytes { - union { - b_32 addr; - char byte[4]; - } a; -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -typedef struct ip_addrbytes ip_addrbytes; - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct wdsEntry { - unsigned short length; - char *ptr; -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -typedef struct wdsEntry wdsEntry; - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct rdsEntry { - unsigned short length; - char *ptr; -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -typedef struct rdsEntry rdsEntry; - -typedef unsigned long BufferPtr; - -typedef unsigned long StreamPtr; - -enum ICMPMsgType { - netUnreach, - hostUnreach, - protocolUnreach, - portUnreach, - fragReqd, - sourceRouteFailed, - timeExceeded, - parmProblem, - missingOption, - lastICMPMsgType = 32767 -}; - -typedef enum ICMPMsgType ICMPMsgType; - -typedef b_16 ip_port; - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct ICMPReport { - StreamPtr streamPtr; - ip_addr localHost; - ip_port localPort; - ip_addr remoteHost; - ip_port remotePort; - short reportType; - unsigned short optionalAddlInfo; - unsigned long optionalAddlInfoPtr; -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -typedef struct ICMPReport ICMPReport; - -typedef OSErr (*OSErrProcPtr)(); - -enum { - uppOSErrProcInfo = kCStackBased - | RESULT_SIZE(SIZE_CODE(sizeof(OSErr))) -}; - -#if USESROUTINEDESCRIPTORS -typedef UniversalProcPtr OSErrUPP; - -#define CallOSErrProc(userRoutine) \ - CallUniversalProc((UniversalProcPtr)userRoutine, uppOSErrProcInfo) -#define NewOSErrProc(userRoutine) \ - (OSErrUPP) NewRoutineDescriptor((ProcPtr)userRoutine, uppOSErrProcInfo, GetCurrentISA()) -#else -typedef OSErrProcPtr OSErrUPP; - -#define CallOSErrProc(userRoutine) \ - (*userRoutine)() -#define NewOSErrProc(userRoutine) \ - (OSErrUPP)(userRoutine) -#endif - -typedef Ptr (*PtrProcPtr)(); - -enum { - uppPtrProcInfo = kCStackBased - | RESULT_SIZE(SIZE_CODE(sizeof(Ptr))) -}; - -#if USESROUTINEDESCRIPTORS -typedef UniversalProcPtr PtrUPP; - -#define CallPtrProc(userRoutine) \ - CallUniversalProc((UniversalProcPtr)userRoutine, uppPtrProcInfo) -#define NewPtrProc(userRoutine) \ - (PtrUPP) NewRoutineDescriptor((ProcPtr)userRoutine, uppPtrProcInfo, GetCurrentISA()) -#else -typedef PtrProcPtr PtrUPP; - -#define CallPtrProc(userRoutine) \ - (*userRoutine)() -#define NewPtrProc(userRoutine) \ - (PtrUPP)(userRoutine) -#endif - -typedef Boolean (*BooleanProcPtr)(); - -enum { - uppBooleanProcInfo = kCStackBased - | RESULT_SIZE(SIZE_CODE(sizeof(Boolean))) -}; - -#if USESROUTINEDESCRIPTORS -typedef UniversalProcPtr BooleanUPP; - -#define CallBooleanProc(userRoutine) \ - CallUniversalProc((UniversalProcPtr)userRoutine, uppBooleanProcInfo) -#define NewBooleanProc(userRoutine) \ - (BooleanUPP) NewRoutineDescriptor((ProcPtr)userRoutine, uppBooleanProcInfo, GetCurrentISA()) -#else -typedef BooleanProcPtr BooleanUPP; - -#define CallBooleanProc(userRoutine) \ - (*userRoutine)() -#define NewBooleanProc(userRoutine) \ - (BooleanUPP)(userRoutine) -#endif - -typedef void (*voidProcPtr)(); - -#endif - diff --git a/libraries/macintosh/tcp/MiscIPPB.h b/libraries/macintosh/tcp/MiscIPPB.h deleted file mode 100644 index 28a29833b3..0000000000 --- a/libraries/macintosh/tcp/MiscIPPB.h +++ /dev/null @@ -1,179 +0,0 @@ -/* - File: MiscIPPB.h - - Copyright: © 1984-1993 by Apple Computer, Inc., all rights reserved. - - WARNING - This file was auto generated by the interfacer tool. Modifications - must be made to the master file. - -*/ - -#ifndef __MISCIPPB__ -#define __MISCIPPB__ - -#ifndef __MACTCPCOMMONTYPES__ -#include -#endif - -#ifndef __APPLETALK__ -#include -#endif - -#define ipctlEchoICMP 17 /* send icmp echo */ -#define ipctlLAPStats 19 /* get lap stats */ - -#define IPParamBlockHeader \ - struct QElem *qLink; \ - short qType; \ - short ioTrap; \ - Ptr ioCmdAddr; \ - ProcPtr ioCompletion; \ - OSErr ioResult; \ - StringPtr ioNamePtr; \ - short ioVRefNum; \ - short ioCRefNum; \ - short csCode - -typedef void (*ICMPEchoNotifyProcPtr)(struct ICMPParamBlock *iopb); - -enum { - uppICMPEchoNotifyProcInfo = kCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(struct ICMPParamBlock*))) -}; - -#if USESROUTINEDESCRIPTORS -typedef UniversalProcPtr ICMPEchoNotifyUPP; - -#define CallICMPEchoNotifyProc(userRoutine, iopb) \ - CallUniversalProc((UniversalProcPtr)userRoutine, uppICMPEchoNotifyProcInfo, iopb) -#define NewICMPEchoNotifyProc(userRoutine) \ - (ICMPEchoNotifyUPP) NewRoutineDescriptor((ProcPtr)userRoutine, uppICMPEchoNotifyProcInfo, GetCurrentISA()) -#else -typedef ICMPEchoNotifyProcPtr ICMPEchoNotifyUPP; - -#define CallICMPEchoNotifyProc(userRoutine, iopb) \ - (*userRoutine)(iopb) -#define NewICMPEchoNotifyProc(userRoutine) \ - (ICMPEchoNotifyUPP)(userRoutine) -#endif - -typedef ICMPEchoNotifyProcPtr ICMPEchoNotifyProc; - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct IPParamBlock { - IPParamBlockHeader; /* standard I/O header */ - union { - struct { - ip_addr dest; /* echo to IP address */ - wdsEntry data; - short timeout; - Ptr options; - unsigned short optLength; - ICMPEchoNotifyProc icmpCompletion; - unsigned long userDataPtr; - } IPEchoPB; - struct { - struct LAPStats *lapStatsPtr; - } LAPStatsPB; - } csParam; -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct ICMPParamBlock { - IPParamBlockHeader; /* standard I/O header */ - short params[11]; - struct { - unsigned long echoRequestOut; /* time in ticks of when the echo request went out */ - unsigned long echoReplyIn; /* time in ticks of when the reply was received */ - struct rdsEntry echoedData; /* data received in responce */ - Ptr options; - unsigned long userDataPtr; - } icmpEchoInfo; -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct LAPStats { - short ifType; - char *ifString; - short ifMaxMTU; - long ifSpeed; - short ifPhyAddrLength; - char *ifPhysicalAddress; - union { - struct arp_entry *arp_table; - struct nbp_entry *nbp_table; - } AddrXlation; - short slotNumber; -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -typedef struct LAPStats LAPStats; - -#define NBP_TABLE_SIZE 20 - -#define NBP_MAX_NAME_SIZE 16+10+2 - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct nbp_entry { - ip_addr ip_address; /* IP address */ - AddrBlock at_address; /* matching AppleTalk address */ - Boolean gateway; /* TRUE if entry for a gateway */ - Boolean valid; /* TRUE if LAP address is valid */ - Boolean probing; /* TRUE if NBP lookup pending */ - long age; /* ticks since cache entry verified */ - long access; /* ticks since last access */ - char filler[116]; /* for internal use only !!! */ -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -#define ARP_TABLE_SIZE 20 /* number of ARP table entries */ - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct Enet_addr { - b_16 en_hi; - b_32 en_lo; -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -typedef struct Enet_addr Enet_addr; - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct arp_entry { - short age; /* cache aging field */ - b_16 protocol; /* Protocol type */ - ip_addr ip_address; /* IP address */ - Enet_addr en_address; /* matching Ethernet address */ -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -typedef struct arp_entry arp_entry; - -#endif - diff --git a/libraries/macintosh/tcp/TCPPB.h b/libraries/macintosh/tcp/TCPPB.h deleted file mode 100644 index ddb6fa0697..0000000000 --- a/libraries/macintosh/tcp/TCPPB.h +++ /dev/null @@ -1,404 +0,0 @@ -/* - File: TCPPB.h - - Copyright: © 1984-1993 by Apple Computer, Inc., all rights reserved. - - WARNING - This file was auto generated by the interfacer tool. Modifications - must be made to the master file. - -*/ - -#ifndef __TCPPB__ -#define __TCPPB__ - -#ifndef __MACTCPCOMMONTYPES__ -#include -#endif - -#define TCPCreate 30 -#define TCPPassiveOpen 31 -#define TCPActiveOpen 32 -#define TCPSend 34 -#define TCPNoCopyRcv 35 -#define TCPRcvBfrReturn 36 -#define TCPRcv 37 -#define TCPClose 38 -#define TCPAbort 39 -#define TCPStatus 40 -#define TCPExtendedStat 41 -#define TCPRelease 42 -#define TCPGlobalInfo 43 -#define TCPCtlMax 49 - -enum TCPEventCode { - TCPClosing = 1, - TCPULPTimeout, - TCPTerminate, - TCPDataArrival, - TCPUrgent, - TCPICMPReceived, - lastEvent = 32767 -}; - -typedef enum TCPEventCode TCPEventCode; - -enum TCPTerminationReason { - TCPRemoteAbort = 2, - TCPNetworkFailure, - TCPSecPrecMismatch, - TCPULPTimeoutTerminate, - TCPULPAbort, - TCPULPClose, - TCPServiceError, - lastReason = 32767 -}; - -// typedef TCPTerminationReason TCPTerminationReason; - -typedef pascal void (*TCPNotifyProcPtr)(StreamPtr tcpStream, unsigned short eventCode, Ptr userDataPtr, unsigned short terminReason, struct ICMPReport *icmpMsg); - -enum { - uppTCPNotifyProcInfo = kPascalStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(StreamPtr))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(unsigned short))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Ptr))) - | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(unsigned short))) - | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(struct ICMPReport*))) -}; - -#if USESROUTINEDESCRIPTORS -typedef UniversalProcPtr TCPNotifyUPP; - -#define CallTCPNotifyProc(userRoutine, tcpStream, eventCode, userDataPtr, terminReason, icmpMsg) \ - CallUniversalProc((UniversalProcPtr)userRoutine, uppTCPNotifyProcInfo, tcpStream, eventCode, userDataPtr, terminReason, icmpMsg) -#define NewTCPNotifyProc(userRoutine) \ - (TCPNotifyUPP) NewRoutineDescriptor((ProcPtr)userRoutine, uppTCPNotifyProcInfo, GetCurrentISA()) -#else -typedef TCPNotifyProcPtr TCPNotifyUPP; - -#define CallTCPNotifyProc(userRoutine, tcpStream, eventCode, userDataPtr, terminReason, icmpMsg) \ - (*userRoutine)(tcpStream, eventCode, userDataPtr, terminReason, icmpMsg) -#define NewTCPNotifyProc(userRoutine) \ - (TCPNotifyUPP)(userRoutine) -#endif - -typedef TCPNotifyProcPtr TCPNotifyProc; - -typedef void (*TCPIOCompletionProcPtr)(struct TCPiopb *iopb); - -enum { - uppTCPIOCompletionProcInfo = kCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(struct TCPiopb*))) -}; - -#if USESROUTINEDESCRIPTORS -typedef UniversalProcPtr TCPIOCompletionUPP; - -#define CallTCPIOCompletionProc(userRoutine, iopb) \ - CallUniversalProc((UniversalProcPtr)userRoutine, uppTCPIOCompletionProcInfo, iopb) -#define NewTCPIOCompletionProc(userRoutine) \ - (TCPIOCompletionUPP) NewRoutineDescriptor((ProcPtr)userRoutine, uppTCPIOCompletionProcInfo, GetCurrentISA()) -#else -typedef TCPIOCompletionProcPtr TCPIOCompletionUPP; - -#define CallTCPIOCompletionProc(userRoutine, iopb) \ - (*userRoutine)(iopb) -#define NewTCPIOCompletionProc(userRoutine) \ - (TCPIOCompletionUPP)(userRoutine) -#endif - -typedef TCPIOCompletionProcPtr TCPIOCompletionProc; - -typedef unsigned short tcp_port; - -typedef unsigned char byte; - -enum { /* ValidityFlags */ - timeoutValue = 0x80, - timeoutAction = 0x40, - typeOfService = 0x20, - precedence = 0x10 -}; - -enum { /* TOSFlags */ - lowDelay = 0x01, - throughPut = 0x02, - reliability = 0x04 -}; - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct TCPCreatePB { - Ptr rcvBuff; - unsigned long rcvBuffLen; - TCPNotifyUPP notifyProc; - Ptr userDataPtr; -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -typedef struct TCPCreatePB TCPCreatePB; - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct TCPOpenPB { - byte ulpTimeoutValue; - byte ulpTimeoutAction; - byte validityFlags; - byte commandTimeoutValue; - ip_addr remoteHost; - tcp_port remotePort; - ip_addr localHost; - tcp_port localPort; - byte tosFlags; - byte precedence; - Boolean dontFrag; - byte timeToLive; - byte security; - byte optionCnt; - byte options[40]; - Ptr userDataPtr; -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -typedef struct TCPOpenPB TCPOpenPB; - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct TCPSendPB { - byte ulpTimeoutValue; - byte ulpTimeoutAction; - byte validityFlags; - Boolean pushFlag; - Boolean urgentFlag; - Ptr wdsPtr; - unsigned long sendFree; - unsigned short sendLength; - Ptr userDataPtr; -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -typedef struct TCPSendPB TCPSendPB; - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct TCPReceivePB { - byte commandTimeoutValue; - byte filler; - Boolean markFlag; - Boolean urgentFlag; - Ptr rcvBuff; - unsigned short rcvBuffLen; - Ptr rdsPtr; - unsigned short rdsLength; - unsigned short secondTimeStamp; - Ptr userDataPtr; -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -typedef struct TCPReceivePB TCPReceivePB; - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct TCPClosePB { - byte ulpTimeoutValue; - byte ulpTimeoutAction; - byte validityFlags; - Ptr userDataPtr; -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -typedef struct TCPClosePB TCPClosePB; - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct HistoBucket { - unsigned short value; - unsigned long counter; -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -typedef struct HistoBucket HistoBucket; - -#define NumOfHistoBuckets 7 - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct TCPConnectionStats { - unsigned long dataPktsRcvd; - unsigned long dataPktsSent; - unsigned long dataPktsResent; - unsigned long bytesRcvd; - unsigned long bytesRcvdDup; - unsigned long bytesRcvdPastWindow; - unsigned long bytesSent; - unsigned long bytesResent; - unsigned short numHistoBuckets; - struct HistoBucket sentSizeHisto[NumOfHistoBuckets]; - unsigned short lastRTT; - unsigned short tmrSRTT; - unsigned short rttVariance; - unsigned short tmrRTO; - byte sendTries; - byte sourchQuenchRcvd; -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -typedef struct TCPConnectionStats TCPConnectionStats; - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct TCPStatusPB { - byte ulpTimeoutValue; - byte ulpTimeoutAction; - long unused; - ip_addr remoteHost; - tcp_port remotePort; - ip_addr localHost; - tcp_port localPort; - byte tosFlags; - byte precedence; - byte connectionState; - unsigned short sendWindow; - unsigned short rcvWindow; - unsigned short amtUnackedData; - unsigned short amtUnreadData; - Ptr securityLevelPtr; - unsigned long sendUnacked; - unsigned long sendNext; - unsigned long congestionWindow; - unsigned long rcvNext; - unsigned long srtt; - unsigned long lastRTT; - unsigned long sendMaxSegSize; - struct TCPConnectionStats *connStatPtr; - Ptr userDataPtr; -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -typedef struct TCPStatusPB TCPStatusPB; - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct TCPAbortPB { - Ptr userDataPtr; -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -typedef struct TCPAbortPB TCPAbortPB; - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct TCPParam { - unsigned long tcpRtoA; - unsigned long tcpRtoMin; - unsigned long tcpRtoMax; - unsigned long tcpMaxSegSize; - unsigned long tcpMaxConn; - unsigned long tcpMaxWindow; -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -typedef struct TCPParam TCPParam; - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct TCPStats { - unsigned long tcpConnAttempts; - unsigned long tcpConnOpened; - unsigned long tcpConnAccepted; - unsigned long tcpConnClosed; - unsigned long tcpConnAborted; - unsigned long tcpOctetsIn; - unsigned long tcpOctetsOut; - unsigned long tcpOctetsInDup; - unsigned long tcpOctetsRetrans; - unsigned long tcpInputPkts; - unsigned long tcpOutputPkts; - unsigned long tcpDupPkts; - unsigned long tcpRetransPkts; -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -typedef struct TCPStats TCPStats; - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct TCPGlobalInfoPB { - struct TCPParam *tcpParamPtr; - struct TCPStats *tcpStatsPtr; - StreamPtr *tcpCDBTable[1]; - Ptr userDataPtr; - unsigned short maxTCPConnections; -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -typedef struct TCPGlobalInfoPB TCPGlobalInfoPB; - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct TCPiopb { - char fill12[12]; - TCPIOCompletionProc ioCompletion; - short ioResult; - char *ioNamePtr; - short ioVRefNum; - short ioCRefNum; - short csCode; - StreamPtr tcpStream; - union { - struct TCPCreatePB create; - struct TCPOpenPB open; - struct TCPSendPB send; - struct TCPReceivePB receive; - struct TCPClosePB close; - struct TCPAbortPB abort; - struct TCPStatusPB status; - struct TCPGlobalInfoPB globalInfo; - } csParam; -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -typedef struct TCPiopb TCPiopb; - -#endif - diff --git a/libraries/macintosh/tcp/UDPPB.h b/libraries/macintosh/tcp/UDPPB.h deleted file mode 100644 index f8c7bbdfe5..0000000000 --- a/libraries/macintosh/tcp/UDPPB.h +++ /dev/null @@ -1,190 +0,0 @@ -/* - File: UDPPB.h - - Copyright: © 1984-1993 by Apple Computer, Inc., all rights reserved. - - WARNING - This file was auto generated by the interfacer tool. Modifications - must be made to the master file. - -*/ - -#ifndef __UDPPB__ -#define __UDPPB__ - -#ifndef __MACTCPCOMMONTYPES__ -#include -#endif - -#define UDPCreate 20 -#define UDPRead 21 -#define UDPBfrReturn 22 -#define UDPWrite 23 -#define UDPRelease 24 -#define UDPMaxMTUSize 25 -#define UDPStatus 26 -#define UDPMultiCreate 27 -#define UDPMultiSend 28 -#define UDPMultiRead 29 -#define UDPCtlMax 29 - -enum UDPEventCode { - UDPDataArrival = 1, - UDPICMPReceived, - lastUDPEvent = 32767 -}; - -typedef enum UDPEventCode UDPEventCode; - -typedef pascal void (*UDPNotifyProcPtr)(StreamPtr udpStream, unsigned short eventCode, Ptr userDataPtr, struct ICMPReport *icmpMsg); - -enum { - uppUDPNotifyProcInfo = kPascalStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(StreamPtr))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(unsigned short))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Ptr))) - | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(struct ICMPReport*))) -}; - -#if USESROUTINEDESCRIPTORS -typedef UniversalProcPtr UDPNotifyUPP; - -#define CallUDPNotifyProc(userRoutine, udpStream, eventCode, userDataPtr, icmpMsg) \ - CallUniversalProc((UniversalProcPtr)userRoutine, uppUDPNotifyProcInfo, udpStream, eventCode, userDataPtr, icmpMsg) -#define NewUDPNotifyProc(userRoutine) \ - (UDPNotifyUPP) NewRoutineDescriptor((ProcPtr)userRoutine, uppUDPNotifyProcInfo, GetCurrentISA()) -#else -typedef UDPNotifyProcPtr UDPNotifyUPP; - -#define CallUDPNotifyProc(userRoutine, udpStream, eventCode, userDataPtr, icmpMsg) \ - (*userRoutine)(udpStream, eventCode, userDataPtr, icmpMsg) -#define NewUDPNotifyProc(userRoutine) \ - (UDPNotifyUPP)(userRoutine) -#endif - -typedef UDPNotifyProcPtr UDPNotifyProc; - -typedef void (*UDPIOCompletionProcPtr)(struct UDPiopb *iopb); - -enum { - uppUDPIOCompletionProcInfo = kCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(struct UDPiopb*))) -}; - -#if USESROUTINEDESCRIPTORS -typedef UniversalProcPtr UDPIOCompletionUPP; - -#define CallUDPIOCompletionProc(userRoutine, iopb) \ - CallUniversalProc((UniversalProcPtr)userRoutine, uppUDPIOCompletionProcInfo, iopb) -#define NewUDPIOCompletionProc(userRoutine) \ - (UDPIOCompletionUPP) NewRoutineDescriptor((ProcPtr)userRoutine, uppUDPIOCompletionProcInfo, GetCurrentISA()) -#else -typedef UDPIOCompletionProcPtr UDPIOCompletionUPP; - -#define CallUDPIOCompletionProc(userRoutine, iopb) \ - (*userRoutine)(iopb) -#define NewUDPIOCompletionProc(userRoutine) \ - (UDPIOCompletionUPP)(userRoutine) -#endif - -typedef UDPIOCompletionProcPtr UDPIOCompletionProc; - -typedef unsigned short udp_port; - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct UDPCreatePB { /* for create and release calls */ - Ptr rcvBuff; - unsigned long rcvBuffLen; - UDPNotifyProc notifyProc; - unsigned short localPort; - Ptr userDataPtr; - udp_port endingPort; -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -typedef struct UDPCreatePB UDPCreatePB; - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct UDPSendPB { - unsigned short reserved; - ip_addr remoteHost; - udp_port remotePort; - Ptr wdsPtr; - Boolean checkSum; - unsigned short sendLength; - Ptr userDataPtr; - udp_port localPort; -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -typedef struct UDPSendPB UDPSendPB; - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct UDPReceivePB { /* for receive and buffer return calls */ - unsigned short timeOut; - ip_addr remoteHost; - udp_port remotePort; - Ptr rcvBuff; - unsigned short rcvBuffLen; - unsigned short secondTimeStamp; - Ptr userDataPtr; - ip_addr destHost; /* only for use with multi rcv */ - udp_port destPort; /* only for use with multi rcv */ -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -typedef struct UDPReceivePB UDPReceivePB; - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct UDPMTUPB { - unsigned short mtuSize; - ip_addr remoteHost; - Ptr userDataPtr; -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -typedef struct UDPMTUPB UDPMTUPB; - -#if defined(powerc) || defined (__powerc) -#pragma options align=mac68k -#endif -struct UDPiopb { - char fill12[12]; - UDPIOCompletionProc ioCompletion; - short ioResult; - char *ioNamePtr; - short ioVRefNum; - short ioCRefNum; - short csCode; - StreamPtr udpStream; - union { - struct UDPCreatePB create; - struct UDPSendPB send; - struct UDPReceivePB receive; - struct UDPMTUPB mtu; - } csParam; -}; -#if defined(powerc) || defined(__powerc) -#pragma options align=reset -#endif - -typedef struct UDPiopb UDPiopb; - -#endif - diff --git a/libraries/macintosh/tcp/dnr.c b/libraries/macintosh/tcp/dnr.c deleted file mode 100644 index 47ea30ab86..0000000000 --- a/libraries/macintosh/tcp/dnr.c +++ /dev/null @@ -1,529 +0,0 @@ -/* - DNR.c - DNR library for MPW - - © Copyright 1988 by Apple Computer. All rights reserved - -*/ - -#define MPW3.0 - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "AddressXlation.h" - -/* - * function prototypes - */ -static void GetSystemFolder(short *vRefNumP, long *dirIDP); -static void GetCPanelFolder(short *vRefNumP, long *dirIDP); -static short SearchFolderForDNRP(long targetType, long targetCreator, short vRefNum, - long dirID); -static short OpenOurRF( void ); - - -#define OPENRESOLVER 1L -#define CLOSERESOLVER 2L -#define STRTOADDR 3L -#define ADDRTOSTR 4L -#define ENUMCACHE 5L -#define ADDRTONAME 6L -#define HINFO 7L -#define MXINFO 8L - -Handle codeHndl = nil; -UniversalProcPtr dnr = nil; - - -static TrapType GetTrapType(unsigned long theTrap) -{ - if (BitAnd(theTrap, 0x0800) > 0) - return(ToolTrap); - else - return(OSTrap); - } - -static Boolean TrapAvailable(unsigned long trap) -{ -TrapType trapType = ToolTrap; -unsigned long numToolBoxTraps; - - if (NGetTrapAddress(_InitGraf, ToolTrap) == NGetTrapAddress(0xAA6E, ToolTrap)) - numToolBoxTraps = 0x200; - else - numToolBoxTraps = 0x400; - - trapType = GetTrapType(trap); - if (trapType == ToolTrap) { - trap = BitAnd(trap, 0x07FF); - if (trap >= numToolBoxTraps) - trap = _Unimplemented; - } - return(NGetTrapAddress(trap, trapType) != NGetTrapAddress(_Unimplemented, ToolTrap)); - -} - -static void GetSystemFolder(short *vRefNumP, long *dirIDP) -{ - SysEnvRec info; - long wdProcID; - - SysEnvirons(1, &info); - if (GetWDInfo(info.sysVRefNum, vRefNumP, dirIDP, &wdProcID) != noErr) { - *vRefNumP = 0; - *dirIDP = 0; - } - } - -static void GetCPanelFolder(short *vRefNumP, long *dirIDP) -{ - Boolean hasFolderMgr = false; - long feature; - - if (Gestalt(gestaltFindFolderAttr, &feature) == noErr) - hasFolderMgr = true; - if (!hasFolderMgr) { - GetSystemFolder(vRefNumP, dirIDP); - return; - } - else { - if (FindFolder(kOnSystemDisk, kControlPanelFolderType, kDontCreateFolder, vRefNumP, dirIDP) != noErr) { - *vRefNumP = 0; - *dirIDP = 0; - } - } - } - -/* SearchFolderForDNRP is called to search a folder for files that might - contain the 'dnrp' resource */ -static short SearchFolderForDNRP(long targetType, long targetCreator, short vRefNum, long dirID) -{ - HParamBlockRec fi; - Str255 filename; - short refnum; - - fi.fileParam.ioCompletion = nil; - fi.fileParam.ioNamePtr = filename; - fi.fileParam.ioVRefNum = vRefNum; - fi.fileParam.ioDirID = dirID; - fi.fileParam.ioFDirIndex = 1; - - while (PBHGetFInfoSync(&fi) == noErr) { - /* scan system folder for driver resource files of specific type & creator */ - if (fi.fileParam.ioFlFndrInfo.fdType == targetType && - fi.fileParam.ioFlFndrInfo.fdCreator == targetCreator) { - /* found the MacTCP driver file? */ - refnum = HOpenResFile(vRefNum, dirID, filename, fsRdPerm); - if (GetIndResource('dnrp', 1) == NULL) - CloseResFile(refnum); - else - return refnum; - } - /* check next file in system folder */ - fi.fileParam.ioFDirIndex++; - fi.fileParam.ioDirID = dirID; /* PBHGetFInfo() clobbers ioDirID */ - } - return(-1); - } - - - -/* OpenOurRF is called to open the MacTCP driver resources */ - -static short OpenOurRF() -{ - short refnum; - short vRefNum; - long dirID; - - /* first search Control Panels for MacTCP 1.1 */ - GetCPanelFolder(&vRefNum, &dirID); - refnum = SearchFolderForDNRP('cdev', 'ztcp', vRefNum, dirID); - if (refnum != -1) return(refnum); - - /* next search System Folder for MacTCP 1.0.x */ - GetSystemFolder(&vRefNum, &dirID); - refnum = SearchFolderForDNRP('cdev', 'mtcp', vRefNum, dirID); - if (refnum != -1) return(refnum); - - /* finally, search Control Panels for MacTCP 1.0.x */ - GetCPanelFolder(&vRefNum, &dirID); - refnum = SearchFolderForDNRP('cdev', 'mtcp', vRefNum, dirID); - if (refnum != -1) return(refnum); - - return -1; - } - - - - -typedef OSErr (*OpenResolverProcPtr)(long selector, char* fileName); - -enum { - uppOpenResolverProcInfo = kCStackBased - | RESULT_SIZE(SIZE_CODE(sizeof(short))) - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(char *))) -}; - -#if USESROUTINEDESCRIPTORS -typedef UniversalProcPtr OpenResolverUPP; - -#define NewOpenResolverProc(userRoutine) \ - (OpenResolverUPP) NewRoutineDescriptor(userRoutine, uppOpenResolverProcInfo, GetCurrentISA()) -#define CallOpenResolverProc(userRoutine, selector, filename) \ - CallUniversalProc(userRoutine, uppOpenResolverProcInfo, selector, filename) -#else -typedef OpenResolverProcPtr OpenResolverUPP; - -#define NewOpenResolverProc(userRoutine) \ - (OpenResolverUPP)(userRoutine) -#define CallOpenResolverProc(userRoutine, selector, filename) \ - (*(OpenResolverProcPtr)userRoutine)(selector, filename) -#endif - - - -OSErr OpenResolver(char *fileName) -{ - short refnum; - OSErr rc; - - if (dnr != nil) - /* resolver already loaded in */ - return(noErr); - - /* open the MacTCP driver to get DNR resources. Search for it based on - creator & type rather than simply file name */ - refnum = OpenOurRF(); - - /* ignore failures since the resource may have been installed in the - System file if running on a Mac 512Ke */ - - /* load in the DNR resource package */ - codeHndl = GetIndResource('dnrp', 1); - if (codeHndl == nil) { - /* can't open DNR */ - return(ResError()); - } - - DetachResource(codeHndl); - if (refnum != -1) { - CloseWD(refnum); - CloseResFile(refnum); - } - - /* lock the DNR resource since it cannot be relocated while opened */ - HLock(codeHndl); - dnr = (UniversalProcPtr) *codeHndl; - - /* call open resolver */ - rc = CallOpenResolverProc(dnr, OPENRESOLVER, fileName); - if (rc != noErr) { - /* problem with open resolver, flush it */ - HUnlock(codeHndl); - DisposeHandle(codeHndl); - dnr = nil; - } - return(rc); -} - - - -typedef OSErr (*CloseResolverProcPtr)(long selector); - -enum { - uppCloseResolverProcInfo = kCStackBased - | RESULT_SIZE(SIZE_CODE(sizeof(short))) - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short))) -}; - -#if USESROUTINEDESCRIPTORS -typedef UniversalProcPtr CloseResolverUPP; - -#define NewCloseResolverProc(userRoutine) \ - (CloseResolverUPP) NewRoutineDescriptor(userRoutine, uppCloseResolverProcInfo, GetCurrentISA()) -#define CallCloseResolverProc(userRoutine, selector) \ - CallUniversalProc(userRoutine, uppCloseResolverProcInfo, selector) -#else -typedef CloseResolverProcPtr CloseResolverUPP; - -#define NewCloseResolverProc(userRoutine) \ - (CloseResolverUPP)(userRoutine) -#define CallCloseResolverProc(userRoutine, selector) \ - (*(CloseResolverProcPtr)userRoutine)(selector) -#endif - - - -OSErr CloseResolver() -{ - if (dnr == nil) - /* resolver not loaded error */ - return(notOpenErr); - - /* call close resolver */ - CallCloseResolverProc(dnr, CLOSERESOLVER); - - /* release the DNR resource package */ - HUnlock(codeHndl); - DisposeHandle(codeHndl); - dnr = nil; - return(noErr); -} - - - - -typedef OSErr (*StrToAddrProcPtr)(long selector, char* hostName, struct hostInfo* rtnStruct, - long resultProc, char* userData); - -enum { - uppStrToAddrProcInfo = kCStackBased - | RESULT_SIZE(SIZE_CODE(sizeof(short))) - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(char *))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(struct hostInfo *))) - | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(long))) - | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(char *))) -}; - -#if USESROUTINEDESCRIPTORS -typedef UniversalProcPtr StrToAddrUPP; - -#define NewStrToAddrProc(userRoutine) \ - (StrToAddrUPP) NewRoutineDescriptor(userRoutine, uppStrToAddrProcInfo, GetCurrentISA()) -#define CallStrToAddrProc(userRoutine, selector, hostName, rtnStruct, resultProc, userData) \ - CallUniversalProc(userRoutine, uppStrToAddrProcInfo, selector, hostName, rtnStruct, resultProc, userData) -#else -typedef StrToAddrProcPtr StrToAddrUPP; - -#define NewStrToAddrProc(userRoutine) \ - (StrToAddrUPP)(userRoutine) -#define CallStrToAddrProc(userRoutine, selector, hostName, rtnStruct, resultProc, userData) \ - (*(StrToAddrProcPtr)userRoutine)(selector, hostName, rtnStruct, resultProc, userData) -#endif - - - -OSErr StrToAddr(char *hostName, struct hostInfo *rtnStruct, ResultUPP resultupp, char *userDataPtr) -{ - if (dnr == nil) - /* resolver not loaded error */ - return(notOpenErr); - - return(CallStrToAddrProc(dnr, STRTOADDR, hostName, rtnStruct, (long)resultupp, userDataPtr)); -} - - -typedef OSErr (*AddrToStrProcPtr)(long selector, long address, char* hostName); - -enum { - uppAddrToStrProcInfo = kCStackBased - | RESULT_SIZE(SIZE_CODE(sizeof(short))) - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(unsigned long))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(char *))) -}; - -#if USESROUTINEDESCRIPTORS -typedef UniversalProcPtr AddrToStrUPP; - -#define NewAddrToStrProc(userRoutine) \ - (AddrToStrUPP) NewRoutineDescriptor(userRoutine, uppAddrToStrProcInfo, GetCurrentISA()) -#define CallAddrToStrProc(userRoutine, selector, address, hostName) \ - CallUniversalProc(userRoutine, uppAddrToStrProcInfo, selector, address, hostName) -#else -typedef AddrToStrProcPtr AddrToStrUPP; - -#define NewAddrToStrProc(userRoutine) \ - (AddrToStrUPP)(userRoutine) -#define CallAddrToStrProc(userRoutine, selector, address, hostName) \ - (*(AddrToStrProcPtr)userRoutine)(selector, address, hostName) -#endif - - -OSErr AddrToStr(unsigned long addr, char *addrStr) -{ - if (dnr == nil) - /* resolver not loaded error */ - return(notOpenErr); - - CallAddrToStrProc(dnr, ADDRTOSTR, addr, addrStr); - - return(noErr); -} - - - -typedef OSErr (*EnumCacheProcPtr)(long selector, long result, char* userData); - -enum { - uppEnumCacheProcInfo = kCStackBased - | RESULT_SIZE(SIZE_CODE(sizeof(short))) - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(char *))) -}; - -#if USESROUTINEDESCRIPTORS -typedef UniversalProcPtr EnumCacheUPP; - -#define NewEnumCacheProc(userRoutine) \ - (EnumCacheUPP) NewRoutineDescriptor(userRoutine, uppEnumCacheProcInfo, GetCurrentISA()) -#define CallEnumCacheProc(userRoutine, selector, result, userData) \ - CallUniversalProc(userRoutine, uppEnumCacheProcInfo, selector, result, userData) -#else -typedef EnumCacheProcPtr EnumCacheUPP; - -#define NewEnumCacheProc(userRoutine) \ - (EnumCacheUPP)(userRoutine) -#define CallEnumCacheProc(userRoutine, selector, result, userData) \ - (*(EnumCacheProcPtr)userRoutine)(selector, result, userData) -#endif - - - -OSErr EnumCache(EnumResultUPP resultupp, char *userDataPtr) -{ - if (dnr == nil) - /* resolver not loaded error */ - return(notOpenErr); - - return(CallEnumCacheProc(dnr, ENUMCACHE, (long)resultupp, userDataPtr)); -} - - - -typedef OSErr (*AddrToNameProcPtr)(long selector, unsigned long addr, struct hostInfo* rtnStruct, - long resultProc, char* userData); - -enum { - uppAddrToNameProcInfo = kCStackBased - | RESULT_SIZE(SIZE_CODE(sizeof(short))) - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(unsigned long))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(struct hostInfo *))) - | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(long))) - | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(char *))) - -}; - -#if USESROUTINEDESCRIPTORS -typedef UniversalProcPtr AddrToNameUPP; - -#define NewAddrToNameProc(userRoutine) \ - (AddrToNameUPP) NewRoutineDescriptor(userRoutine, uppAddrToNameProcInfo, GetCurrentISA()) -#define CallAddrToNameProc(userRoutine, selector, addr, rtnStruct, resultProc, userData) \ - CallUniversalProc(userRoutine, uppAddrToNameProcInfo, selector, addr, rtnStruct, resultProc, userData) -#else -typedef AddrToNameProcPtr AddrToNameUPP; - -#define NewAddrToNameProc(userRoutine) \ - (AddrToNameUPP)(userRoutine) -#define CallAddrToNameProc(userRoutine, selector, addr, rtnStruct, resultProc, userData) \ - (*(AddrToNameProcPtr)userRoutine)(selector, addr, rtnStruct, resultProc, userData) -#endif - - - -OSErr AddrToName(unsigned long addr, struct hostInfo *rtnStruct, ResultUPP resultupp, - char *userDataPtr) -{ - if (dnr == nil) - /* resolver not loaded error */ - return(notOpenErr); - - return(CallAddrToNameProc(dnr, ADDRTONAME, addr, rtnStruct, (long)resultupp, userDataPtr)); -} - - -typedef OSErr (*HInfoProcPtr)(long selector, char* hostName, struct returnRec* returnRecPtr, - long resultProc, char* userData); - -enum { - uppHInfoProcInfo = kCStackBased - | RESULT_SIZE(SIZE_CODE(sizeof(short))) - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(char *))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(struct returnRec *))) - | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(long))) - | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(char *))) - -}; - -#if USESROUTINEDESCRIPTORS -typedef UniversalProcPtr HInfoUPP; - -#define NewHInfoProc(userRoutine) \ - (HInfoUPP) NewRoutineDescriptor(userRoutine, uppHInfoProcInfo, GetCurrentISA()) -#define CallHInfoProc(userRoutine, selector, hostName, returnRecPtr, resultProc, userData) \ - CallUniversalProc(userRoutine, uppHInfoProcInfo, selector, hostName, returnRecPtr, resultProc, userData) -#else -typedef HInfoProcPtr HInfoUPP; - -#define NewHInfoProc(userRoutine) \ - (HInfoUPP)(userRoutine) -#define CallHInfoProc(userRoutine, selector, hostName, returnRecPtr, resultProc, userData) \ - (*(HInfoProcPtr)userRoutine)( selector, hostName, returnRecPtr, resultProc, userData) -#endif - -extern OSErr HInfo(char *hostName, struct returnRec *returnRecPtr, ResultProc2Ptr resultProc, - char *userDataPtr) -{ - if (dnr == nil) - /* resolver not loaded error */ - return(notOpenErr); - - return(CallHInfoProc(dnr, HINFO, hostName, returnRecPtr, (long)resultProc, userDataPtr)); -} - - - -typedef OSErr (*MXInfoProcPtr)(long selector, char* hostName, struct returnRec* returnRecPtr, - long resultProc, char* userData); - -enum { - uppMXInfoProcInfo = kCStackBased - | RESULT_SIZE(SIZE_CODE(sizeof(short))) - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(char *))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(struct returnRec *))) - | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(long))) - | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(char *))) - -}; - -#if USESROUTINEDESCRIPTORS -typedef UniversalProcPtr MXInfoUPP; - -#define NewMXInfoProc(userRoutine) \ - (MXInfoUPP) NewRoutineDescriptor(userRoutine, uppMXInfoProcInfo, GetCurrentISA()) -#define CallMXInfoProc(userRoutine, selector, hostName, returnRecPtr, resultProc, userData) \ - CallUniversalProc(userRoutine, selector, hostName, returnRecPtr, resultProc, userData) -#else -typedef MXInfoProcPtr MXInfoUPP; - -#define NewMXInfoProc(userRoutine) \ - (MXInfoUPP)(userRoutine) -#define CallMXInfoProc(userRoutine, selector, hostName, returnRecPtr, resultProc, userData) \ - (*(MXInfoProcPtr)userRoutine)(selector, hostName, returnRecPtr, resultProc, userData) -#endif - - -extern OSErr MXInfo(char *hostName, struct returnRec *returnRecPtr, ResultProc2Ptr resultProc, - char *userDataPtr) -{ - if (dnr == nil) - /* resolver not loaded error */ - return(notOpenErr); - - return(CallMXInfoProc(dnr, MXINFO, hostName, returnRecPtr, (long)resultProc, userDataPtr)); -} diff --git a/libraries/macintosh/tcp/tcp.c b/libraries/macintosh/tcp/tcp.c deleted file mode 100644 index 80d0878cf4..0000000000 --- a/libraries/macintosh/tcp/tcp.c +++ /dev/null @@ -1,982 +0,0 @@ -/* - * Copyright (c) 1990-92 Regents of the University of Michigan. - * All rights reserved. - * - * tcp.c -- TCP communication related routines - */ -#include "lber.h" -#include "ldap.h" -#include "tcp.h" - -#include -#include /* to get SystemTask() */ -#include -#include -#include - -/* - * local prototypes - */ -#ifdef NEEDPROTOS -void bzero( char *buf, unsigned long count ); -pascal void setdoneflag( struct hostInfo *hip, char *donep ); -pascal void tcp_asynchnotify( StreamPtr tstream, unsigned short event, Ptr userdatap, - unsigned short term_reason, struct ICMPReport *icmpmsg ); -OSErr kick_mactcp( short *drefnump ); -#ifdef SUPPORT_OPENTRANSPORT -pascal void EventHandler(tcpstream *tsp, OTEventCode event, OTResult result, void * /* cookie */); -#endif /* SUPPORT_OPENTRANSPORT */ -#else /* NEEDPROTOS */ -void bzero(); -pascal void setdoneflag(); -pascal void tcp_asynchnotify(); -OSErr kick_mactcp(); -#ifdef SUPPORT_OPENTRANSPORT -pascal void EventHandler(); -#endif /* SUPPORT_OPENTRANSPORT */ -#endif /* NEEDPROTOS */ - -#ifdef SUPPORT_OPENTRANSPORT -static Boolean gHaveOT = false; -#endif /* SUPPORT_OPENTRANSPORT */ - - -#ifdef SUPPORT_OPENTRANSPORT -/* - * Initialize the tcp module. This mainly consists of seeing if we have - * Open Transport and initializing it and setting our global saying so. - */ -OSStatus -tcp_init( void ) -{ - long result; - OSStatus err; - - gHaveOT = (( err = Gestalt( gestaltOpenTpt, &result )) == noErr && - ( result & gestaltOpenTptPresent ) != 0 && - ( result & gestaltOpenTptTCPPresent ) != 0 ); - - if ( gHaveOT ) { - return( InitOpenTransport()); - } else { - return( kOTNoError ); /* assume we have MacTCP */ - } -} - - -void -tcp_shutdown( void ) -{ - if ( gHaveOT ) { - CloseOpenTransport(); - } -} - -Boolean -tcp_have_opentransport( void ) -{ - return( gHaveOT ); -} -#endif /* SUPPORT_OPENTRANSPORT */ - - -/* - * open and return an pointer to a TCP stream (return NULL if error) - * "buf" is a buffer for receives of length "buflen." - */ -tcpstream * -tcpopen( unsigned char * buf, long buflen ) { - TCPiopb pb; - OSStatus err; - tcpstream * tsp; - short drefnum; -#ifdef SUPPORT_OPENTRANSPORT - TEndpointInfo info; -#endif /* SUPPORT_OPENTRANSPORT */ - - if (nil == (tsp = (tcpstream *)NewPtrClear(sizeof(tcpstream)))) { - return( nil ); - } - -#ifdef SUPPORT_OPENTRANSPORT - if ( gHaveOT ) { - - // - // Now create a TCP - // - tsp->tcps_ep = OTOpenEndpoint( OTCreateConfiguration( kTCPName ), 0, &info, &err ); - - if ( !tsp->tcps_ep ) { - if ( err == kOTNoError ) { - err = -1; - } - } - - if ( !err ) { - err = OTSetSynchronous( tsp->tcps_ep ); - } - - tsp->tcps_data = 0; - tsp->tcps_terminated = tsp->tcps_connected = false; - - // - // Install notifier we're going to use - // - if ( !err ) { - err = OTInstallNotifier( tsp->tcps_ep, (OTNotifyProcPtr) EventHandler, 0 ); - } - - if ( err != kOTNoError ) { - if ( tsp->tcps_ep ) { - OTCloseProvider( tsp->tcps_ep ); - } - DisposePtr( (Ptr)tsp ); - tsp = nil; - } - } else { -#endif /* SUPPORT_OPENTRANSPORT */ - - if ( kick_mactcp( &drefnum ) != noErr ) { - return ( nil ); - } - - if (( tsp->tcps_notifyupp = NewTCPNotifyProc( tcp_asynchnotify )) == NULL ) { - DisposePtr( (Ptr)tsp ); - return( nil ); - } - - tsp->drefnum = drefnum; - - if ( buflen == 0 ) { - buflen = TCP_BUFSIZ; - } - - if ( buf == NULL && - (nil == ( buf = tsp->tcps_buffer = (unsigned char *)NewPtr( buflen )))) { - DisposeRoutineDescriptor( tsp->tcps_notifyupp ); - DisposePtr( (Ptr)tsp ); - return( nil ); - } - bzero( (char *)&pb, sizeof( pb )); - pb.csCode = TCPCreate; - pb.ioCRefNum = tsp->drefnum; - pb.csParam.create.rcvBuff = (Ptr) buf; - pb.csParam.create.rcvBuffLen = buflen; - pb.csParam.create.notifyProc = tsp->tcps_notifyupp; - pb.csParam.create.userDataPtr = (Ptr)tsp; - - if (( err = PBControlSync( (ParmBlkPtr)&pb )) != noErr || pb.ioResult != noErr ) { - DisposeRoutineDescriptor( tsp->tcps_notifyupp ); - DisposePtr( (Ptr)tsp->tcps_buffer ); - DisposePtr( (Ptr)tsp ); - return( nil ); - } - - tsp->tcps_data = 0; - tsp->tcps_terminated = tsp->tcps_connected = false; - tsp->tcps_sptr = pb.tcpStream; - -#ifdef SUPPORT_OPENTRANSPORT - } -#endif /* SUPPORT_OPENTRANSPORT */ - - return( tsp ); -} - -/* - * connect to remote host at IP address "addr", TCP port "port" - * return local port assigned, 0 if error - */ -#ifdef SUPPORT_OPENTRANSPORT -InetPort -tcpconnect( tcpstream * tsp, InetHost addr, InetPort port ) { -#else /* SUPPORT_OPENTRANSPORT */ -ip_port -tcpconnect( tcpstream * tsp, ip_addr addr, ip_port port ) { -#endif /* SUPPORT_OPENTRANSPORT */ - TCPiopb pb; - OSStatus err; -#ifdef SUPPORT_OPENTRANSPORT - struct InetAddress sndsin, rcvsin, retsin; - TCall sndcall, rcvcall; - TBind ret; -#endif /* SUPPORT_OPENTRANSPORT */ - -#ifdef SUPPORT_OPENTRANSPORT - if ( gHaveOT ) { - - if ( tsp->tcps_ep == NULL ) { - return( 0 ); - } - - bzero( (char *)&sndsin, sizeof( struct InetAddress )); - bzero( (char *)&rcvsin, sizeof( struct InetAddress )); - bzero( (char *)&retsin, sizeof( struct InetAddress )); - bzero( (char *)&sndcall, sizeof( TCall )); - bzero( (char *)&rcvcall, sizeof( TCall)); - bzero( (char *)&ret, sizeof( TBind )); - - // Bind TCP to an address and port. We don't care which one, so we pass null for - // the requested address. - ret.addr.maxlen = sizeof( struct InetAddress ); - ret.addr.buf = (unsigned char *)&retsin; - err = OTBind( tsp->tcps_ep, NULL, &ret ); - if ( err != kOTNoError ) { - return( 0 ); - } - - OTInitInetAddress( &sndsin, port, addr ); - sndcall.addr.len = sizeof( struct InetAddress ); - sndcall.addr.buf = (UInt8 *)&sndsin; - - rcvcall.addr.maxlen = sizeof( struct InetAddress ); - rcvcall.addr.buf = (unsigned char *)&rcvsin; - - err = OTConnect( tsp->tcps_ep, &sndcall, &rcvcall ); - if ( err != kOTNoError ) { - return 0; - } - - tsp->tcps_connected = true; - tsp->tcps_remoteport = rcvsin.fPort; - tsp->tcps_remoteaddr = rcvsin.fHost; - return( retsin.fPort ); - - } else { -#endif /* SUPPORT_OPENTRANSPORT */ - - if ( tsp->tcps_sptr == (StreamPtr)NULL ) { - return( 0 ); - } - - bzero( (char *)&pb, sizeof( pb )); - pb.csCode = TCPActiveOpen; - pb.ioCRefNum = tsp->drefnum; - pb.tcpStream = tsp->tcps_sptr; - pb.csParam.open.remoteHost = addr; - pb.csParam.open.remotePort = port; - pb.csParam.open.ulpTimeoutValue = 15; - pb.csParam.open.validityFlags = timeoutValue; - - if (( err = PBControlSync( (ParmBlkPtr)&pb )) != noErr || pb.ioResult != noErr ) { - return( 0 ); - } - - tsp->tcps_connected = true; - return( pb.csParam.open.localPort ); - -#ifdef SUPPORT_OPENTRANSPORT - } -#endif /* SUPPORT_OPENTRANSPORT */ - -} - - -/* - * close and release a TCP stream - * returns 0 if no error, -1 if any error occurs - */ -short -tcpclose( tcpstream * tsp ) { - TCPiopb pb; - OSStatus rc; - -#ifdef SUPPORT_OPENTRANSPORT - if ( gHaveOT ) { - - - if ( tsp->tcps_ep == NULL ) { - return( -1 ); - } - -#ifdef notdef - /* - * if connected execute a close - */ - if ( tcp->tcps_connected ) { - Call OTSndOrderlyDisconnect and wait for the other end to respond. This requires - waiting for and reading any data that comes in in the meantime. This code was ifdefed - out in the MacTCP so it is here too. - } -#endif /* notdef */ - - rc = OTSndDisconnect( tsp->tcps_ep, NULL ); - - OTCloseProvider( tsp->tcps_ep ); - DisposePtr( (Ptr)tsp ); - - if ( rc != 0 ) { - rc = -1; - } - - } else { -#endif /* SUPPORT_OPENTRANSPORT */ - - if ( tsp->tcps_sptr == (StreamPtr)NULL ) { - return( -1 ); - } - -#ifdef notdef - /* - * if connected execute a close - */ - if ( tcp->tcps_connected ) { - bzero( (char *)&pb, sizeof( pb )); - pb.csCode = TCPClose; - pb.ioCRefNum = tsp->drefnum; - pb.tcpStream = sp; - pb.csParam.close.validityFlags = 0; - PBControlSync( (ParmBlkPtr)&pb ); - } -#endif /* notdef */ - - bzero( (char *)&pb, sizeof( pb )); - pb.csCode = TCPRelease; - pb.ioCRefNum = tsp->drefnum; - pb.tcpStream = tsp->tcps_sptr; - pb.csParam.close.validityFlags = 0; - rc = 0; - - if ( PBControlSync( (ParmBlkPtr)&pb ) != noErr || pb.ioResult != noErr ) { - rc = -1; - } - - DisposeRoutineDescriptor( tsp->tcps_notifyupp ); - DisposePtr( (Ptr)tsp->tcps_buffer ); - DisposePtr( (Ptr)tsp ); - -#ifdef SUPPORT_OPENTRANSPORT - } -#endif /* SUPPORT_OPENTRANSPORT */ - - return( rc ); -} - - -/* - * wait for new data to arrive - * - * if "timeout" is NULL, wait until data arrives or connection goes away - * if "timeout" is a pointer to a zero'ed struct, poll - * else wait for "timeout->tv_sec + timeout->tv_usec" seconds - */ -short -tcpselect( tcpstream * tsp, struct timeval * timeout ) -{ - long ticks, endticks; - short rc; - - if ( timeout != NULL ) { - endticks = 60 * timeout->tv_sec + ( 60 * timeout->tv_usec ) / 1000000 + TickCount(); - } - ticks = 0; - - while (( rc = tcpreadready( tsp )) == 0 && ( timeout == NULL || ticks < endticks )) { - Delay( 2L, &ticks ); - SystemTask(); - } - - return ( rc ); -} - - -short -tcpreadready( tcpstream *tsp ) -{ -#ifdef SUPPORT_OPENTRANSPORT - size_t dataAvail; - - if (gHaveOT) { - if ( tsp->tcps_ep == NULL ) { - return( -1 ); - } - - OTCountDataBytes( tsp->tcps_ep, &dataAvail ); - tsp->tcps_data = ( dataAvail != 0 ); - } else { -#endif /* SUPPORT_OPENTRANSPORT */ - if ( tsp->tcps_sptr == (StreamPtr)NULL ) { - return( -1 ); - } - - /* tsp->tcps_data is set in async. notify proc, so nothing for us to do here */ -#ifdef SUPPORT_OPENTRANSPORT - } -#endif /* SUPPORT_OPENTRANSPORT */ - return ( tsp->tcps_terminated ? -1 : ( tsp->tcps_data < 1 ) ? 0 : 1 ); -} - - -/* - * read up to "rbuflen" bytes into "rbuf" from a connected TCP stream - * wait up to "timeout" seconds for data (if timeout == 0, wait "forever") - */ -long -tcpread( tcpstream * tsp, byte timeout, unsigned char * rbuf, - unsigned short rbuflen, DialogPtr dlp ) { - TCPiopb pb; - unsigned long time, end_time; -#ifdef SUPPORT_OPENTRANSPORT - OTFlags flags; - OTResult result; - size_t dataAvail; -#endif /* SUPPORT_OPENTRANSPORT */ - -#ifdef SUPPORT_OPENTRANSPORT - if ( gHaveOT ) { - - if ( tsp->tcps_ep == NULL ) { - return( -1 ); - } - - // Try to read data. Since we're in non-blocking mode, this will fail with kOTNoDataErr - // if no data is available. - result = OTRcv( tsp->tcps_ep, rbuf, rbuflen, &flags ); - if ( result == kOTNoDataErr ) { - // Nothing available, wait for some. The ugly spin loop below is the way the old - // MacTCP code worked. I should fix it, but I don't have time right now. - tsp->tcps_data = 0; - GetDateTime( &time ); - end_time = time + timeout; - - while (( timeout <= 0 || end_time > time ) && tsp->tcps_data < 1 && !tsp->tcps_terminated ) { - OTCountDataBytes( tsp->tcps_ep, &dataAvail ); - if ( dataAvail > 0 ) { - tsp->tcps_data = 1; - } - GetDateTime( &time ); - SystemTask(); - } - - if ( tsp->tcps_data < 1 ) { - return( tsp->tcps_terminated ? -3 : -1 ); - } - - // Should have data available now, try again. - result = OTRcv( tsp->tcps_ep, rbuf, rbuflen, &flags ); - } - - if ( result < 0 ) { - return( -1 ); - } - - OTCountDataBytes( tsp->tcps_ep, &dataAvail ); - if ( dataAvail == 0 ) { - tsp->tcps_data = 0; - } - - return( result ); - - } else { -#endif /* SUPPORT_OPENTRANSPORT */ - - if ( tsp->tcps_sptr == (StreamPtr)NULL ) { - return( -1 ); - } - - GetDateTime( &time ); - end_time = time + timeout; - - while(( timeout <= 0 || end_time > time ) && tsp->tcps_data < 1 && - !tsp->tcps_terminated ) { - GetDateTime( &time ); - SystemTask(); - } - - if ( tsp->tcps_data < 1 ) { - return( tsp->tcps_terminated ? -3 : -1 ); - } - - bzero( (char *)&pb, sizeof( pb )); - pb.csCode = TCPRcv; - pb.ioCRefNum = tsp->drefnum; - pb.tcpStream = tsp->tcps_sptr; - pb.csParam.receive.commandTimeoutValue = timeout; - pb.csParam.receive.rcvBuff = (char *)rbuf; - pb.csParam.receive.rcvBuffLen = rbuflen; - - if ( PBControlSync( (ParmBlkPtr)&pb ) != noErr || pb.ioResult != noErr ) { - return( -1 ); - } - - if ( --(tsp->tcps_data) < 0 ) { - tsp->tcps_data = 0; - } - - return( pb.csParam.receive.rcvBuffLen ); - -#ifdef SUPPORT_OPENTRANSPORT - } -#endif /* SUPPORT_OPENTRANSPORT */ -#pragma unused (dlp) -} - -/* - * send TCP data - * "sp" is the stream to write to - * "wbuf" is "wbuflen" bytes of data to send - * returns < 0 if error, number of bytes written if no error - */ -long -tcpwrite( tcpstream * tsp, unsigned char * wbuf, unsigned short wbuflen ) { - TCPiopb pb; - wdsEntry wds[ 2 ]; - OSErr err; -#ifdef SUPPORT_OPENTRANSPORT - OTResult result; - unsigned short nwritten; -#endif /* SUPPORT_OPENTRANSPORT */ - -#ifdef SUPPORT_OPENTRANSPORT - if ( gHaveOT ) { - - if ( tsp->tcps_ep == NULL ) { - return( -1 ); - } - - /* - * We used to do a single call to OTSnd() here, framed with OTSetBlocking() and OTSetNonBlocking() - * this caused crashes deep inside OpenTransport when writes were large or done in - * rapid succession, so now we never turn on blocking mode - */ - nwritten = 0; - while ( wbuflen > 0 ) { - if (( result = OTSnd( tsp->tcps_ep, wbuf, wbuflen, 0 )) < 0 ) { - if ( result != kOTFlowErr ) { - break; - } - } else { - nwritten += result; - if (( wbuflen -= result ) > 0 ) { - SystemTask(); - wbuf += result; - } - } - } - return(( wbuflen == 0 ) ? nwritten : result ); - - } else { -#endif /* SUPPORT_OPENTRANSPORT */ - - if ( tsp->tcps_sptr == (StreamPtr)NULL ) { - return( -1 ); - } - - wds[ 0 ].length = wbuflen; - wds[ 0 ].ptr = (char *)wbuf; - wds[ 1 ].length = 0; - - bzero( (char *)&pb, sizeof( pb )); - pb.csCode = TCPSend; - pb.ioCRefNum = tsp->drefnum; - pb.tcpStream = tsp->tcps_sptr; - pb.csParam.send.wdsPtr = (Ptr)wds; - pb.csParam.send.validityFlags = 0; - - if (( err = PBControlSync( (ParmBlkPtr)&pb )) != noErr || pb.ioResult != noErr ) { - return( -1 ); - } - - return( wbuflen ); - -#ifdef SUPPORT_OPENTRANSPORT - } -#endif /* SUPPORT_OPENTRANSPORT */ -} - -static pascal void -tcp_asynchnotify( - StreamPtr tstream, - unsigned short event, - Ptr userdatap, - unsigned short term_reason, - struct ICMPReport *icmpmsg -) -{ - tcpstream *tsp; - - tsp = (tcpstream *)userdatap; - switch( event ) { - case TCPDataArrival: - ++(tsp->tcps_data); - break; - case TCPClosing: - case TCPTerminate: - case TCPULPTimeout: - tsp->tcps_terminated = true; - break; - default: - break; - } -#pragma unused (tstream, term_reason, icmpmsg) -} - - -short -tcpgetpeername( tcpstream *tsp, ip_addr *addrp, tcp_port *portp ) { - TCPiopb pb; - OSErr err; - -#ifdef SUPPORT_OPENTRANSPORT - if ( gHaveOT ) { - - if ( tsp->tcps_ep == NULL ) { - return( -1 ); - } - - if ( addrp != NULL ) { - *addrp = tsp->tcps_remoteaddr; - } - - if ( portp != NULL ) { - *portp = tsp->tcps_remoteport; - } - - } else { -#endif /* SUPPORT_OPENTRANSPORT */ - - if ( tsp->tcps_sptr == (StreamPtr)NULL ) { - return( -1 ); - } - - bzero( (char *)&pb, sizeof( pb )); - pb.csCode = TCPStatus; - pb.ioCRefNum = tsp->drefnum; - pb.tcpStream = tsp->tcps_sptr; - - if (( err = PBControlSync( (ParmBlkPtr)&pb )) != noErr || pb.ioResult != noErr ) { - return( err ); - } - - if ( addrp != NULL ) { - *addrp = pb.csParam.status.remoteHost; - } - - if ( portp != NULL ) { - *portp = pb.csParam.status.remotePort; - } - -#ifdef SUPPORT_OPENTRANSPORT - } - - return( kOTNoError ); -#else /* SUPPORT_OPENTRANSPORT */ - return( noErr ); -#endif /* SUPPORT_OPENTRANSPORT */ -} - - -/* - * bzero -- set "len" bytes starting at "p" to zero - */ -static void -bzero( char *p, unsigned long len ) -{ - unsigned long i; - - for ( i = 0; i < len; ++i ) { - *p++ = '\0'; - } -} - - -pascal void -setdoneflag( struct hostInfo *hip, char *donep ) -{ - ++(*donep); -#pragma unused (hip) -} - - -/* - * return a hostInfo structure for "host" (return != noErr if error) - */ -short -#ifdef SUPPORT_OPENTRANSPORT -gethostinfobyname( char *host, InetHostInfo *hip ) { -#else /* SUPPORT_OPENTRANSPORT */ -gethostinfobyname( char *host, struct hostInfo *hip ) { -#endif /* SUPPORT_OPENTRANSPORT */ - char done = 0; - OSStatus err; - long time; - ResultUPP rupp; -#ifdef notdef - struct dnr_struct dnr_global = {nil, 0}; -#endif /* notdef */ -#ifdef SUPPORT_OPENTRANSPORT - hostInfo hi; /* Old MacTCP version of hostinfo */ - InetSvcRef inetsvc; /* Internet services reference */ -#endif /* SUPPORT_OPENTRANSPORT */ - -#ifdef SUPPORT_OPENTRANSPORT - if ( gHaveOT ) { - - // Get an Internet Services reference - inetsvc = OTOpenInternetServices( kDefaultInternetServicesPath, 0, &err ); - if ( !inetsvc || err != kOTNoError ) { - if ( err == kOTNoError ) { - err = -1; - } - inetsvc = nil; - } - - if ( !err ) { - err = OTInetStringToAddress( inetsvc, host, hip ); - } - - if ( inetsvc ) { - OTCloseProvider(inetsvc); - } - - } else { -#endif /* SUPPORT_OPENTRANSPORT */ - - if (( err = kick_mactcp( NULL )) != noErr - || ( err = OpenResolver( /* &dnr_global, */ NULL )) != noErr ) { - return( err ); - } - - if (( rupp = NewResultProc( setdoneflag )) == NULL ) { - err = memFullErr; - } else { -#ifdef SUPPORT_OPENTRANSPORT - bzero( (char *)&hi, sizeof( hostInfo )); - if (( err = StrToAddr( /* &dnr_global, */ host, &hi, rupp, &done )) == cacheFault ) { -#else /* SUPPORT_OPENTRANSPORT */ - bzero((char *) hip, sizeof( hostInfo )); - if (( err = StrToAddr( /* &dnr_global, */ host, hip, rupp, &done )) == cacheFault ) { -#endif /* SUPPORT_OPENTRANSPORT */ - while( !done ) { - Delay( 2L, &time ); // querying DN servers; wait for reply - SystemTask(); - } -#ifdef SUPPORT_OPENTRANSPORT - err = hi.rtnCode; -#else /* SUPPORT_OPENTRANSPORT */ - err = hip->rtnCode; -#endif /* SUPPORT_OPENTRANSPORT */ - } - DisposeRoutineDescriptor( rupp ); - } - - CloseResolver( /* &dnr_global */ ); - -#ifdef SUPPORT_OPENTRANSPORT - /* Copy the results to the InetHostInfo area passed in by caller */ - BlockMove(hi.cname, hip->name, kMaxHostNameLen); - BlockMove(hi.addr, hip->addrs, 4*NUM_ALT_ADDRS); - hip->addrs[NUM_ALT_ADDRS] = 0; - - /* Convert the return code to an OT style return code */ - if ( err == nameSyntaxErr ) { - err = kOTBadNameErr; - } else if ( err == noNameServer || err == authNameErr || err == noAnsErr ) { - err = kOTBadNameErr; - } else if (err != noErr) { - err = kOTSysErrorErr; - } - - } - - if (( err == kOTNoError ) && ( hip->addrs[ 0 ] == 0 )) { - err = kOTBadNameErr; - } - return( err ); - -#else /* SUPPORT_OPENTRANSPORT */ - if ( err != noErr || (( err == noErr ) && ( hip->addr[ 0 ] == 0 ))) { - return( err == noErr ? noAnsErr : err ); - } - return( noErr ); -#endif /* SUPPORT_OPENTRANSPORT */ -} - -/* - * return a hostInfo structure for "addr" (return != noErr if error) - */ -short -#ifdef SUPPORT_OPENTRANSPORT -gethostinfobyaddr( InetHost addr, InetHostInfo *hip ) -#else /* SUPPORT_OPENTRANSPORT */ -gethostinfobyaddr( ip_addr addr, struct hostInfo *hip ) -#endif /* SUPPORT_OPENTRANSPORT */ -{ - - char done = 0; - OSStatus err; - long time; - ResultUPP rupp; -#ifdef notdef - struct dnr_struct dnr_global = {nil, 0}; -#endif /* notdef */ -#ifdef SUPPORT_OPENTRANSPORT - hostInfo hi; /* Old MacTCP version of hostinfo */ - InetSvcRef inetsvc; /* Internet services reference */ -#endif /* SUPPORT_OPENTRANSPORT */ - -#ifdef SUPPORT_OPENTRANSPORT - if ( gHaveOT ) { - // Get an Internet Services reference - inetsvc = OTOpenInternetServices( kDefaultInternetServicesPath, 0, &err ); - if ( !inetsvc || err != kOTNoError ) { - if ( err == kOTNoError ) { - err = -1; - } - inetsvc = nil; - } - - if ( !err ) { - err = OTInetAddressToName( inetsvc, addr, hip->name ); - } - - if ( inetsvc ) { - OTCloseProvider( inetsvc ); - } - - } else { -#endif /* SUPPORT_OPENTRANSPORT */ - - if (( err = kick_mactcp( NULL )) != noErr || - ( err = OpenResolver( /* &dnr_global, */ NULL )) != noErr ) - return( err ); - - if (( rupp = NewResultProc( setdoneflag )) == NULL ) { - err = memFullErr; - } else { -#ifdef SUPPORT_OPENTRANSPORT - bzero( (char *) &hi, sizeof( hostInfo )); - if (( err = AddrToName( /* &dnr_global, */ addr, &hi, rupp, &done )) == cacheFault ) { -#else /* SUPPORT_OPENTRANSPORT */ - bzero( (char *)hip, sizeof( hostInfo )); - if (( err = AddrToName( /* &dnr_global, */ addr, hip, rupp, &done )) == cacheFault ) { -#endif /* SUPPORT_OPENTRANSPORT */ - while( !done ) { - Delay( 2L, &time ); // querying DN servers; wait for reply - SystemTask(); - } -#ifdef SUPPORT_OPENTRANSPORT - err = hi.rtnCode; -#else /* SUPPORT_OPENTRANSPORT */ - err = hip->rtnCode; -#endif /* SUPPORT_OPENTRANSPORT */ - } - DisposeRoutineDescriptor( rupp ); - } - - CloseResolver( /* &dnr_global */ ); - -#ifdef SUPPORT_OPENTRANSPORT - /* Copy the results to the InetHostInfo area passed in by caller */ - BlockMove(hi.cname, hip->name, kMaxHostNameLen); - BlockMove(hi.addr, hip->addrs, 4*NUM_ALT_ADDRS); - hip->addrs[NUM_ALT_ADDRS] = 0; - - /* Convert the return code to an OT style return code */ - if (err == nameSyntaxErr) { - err = kOTBadNameErr; - } else if (err == noNameServer || err == authNameErr || err == noAnsErr) { - err = kOTBadNameErr; - } else if (err != noErr) { - err = kOTSysErrorErr; - } - - } -#endif /* SUPPORT_OPENTRANSPORT */ - - return( err ); -} - -/* - * return a ASCII equivalent of ipaddr. addrstr must be at large enough to hold the - * result which is of the form "AAA.BBB.CCC.DDD" and can be a maximum of 16 bytes in size - */ -short -#ifdef SUPPORT_OPENTRANSPORT -ipaddr2str( InetHost ipaddr, char *addrstr ) -#else /* SUPPORT_OPENTRANSPORT */ -ipaddr2str( ip_addr ipaddr, char *addrstr ) -#endif /* SUPPORT_OPENTRANSPORT */ -{ - OSStatus err; -#ifdef notdef - struct dnr_struct dnr_global = {nil, 0}; -#endif /* notdef */ - -#ifdef SUPPORT_OPENTRANSPORT - if ( gHaveOT ) { - - OTInetHostToString( ipaddr, addrstr ); - err = kOTNoError; - - } else { -#endif /* SUPPORT_OPENTRANSPORT */ - - if (( err = kick_mactcp( NULL )) != noErr || - ( err = OpenResolver( /* &dnr_global, */ NULL )) != noErr ) - return( err ); - - err = AddrToStr( ipaddr, addrstr ); - - CloseResolver( /* &dnr_global */ ); - -#ifdef SUPPORT_OPENTRANSPORT - } -#endif /* SUPPORT_OPENTRANSPORT */ - - return( err ); -} - - -#ifdef SUPPORT_OPENTRANSPORT -/******************************************************************************* -** EventHandler -********************************************************************************/ -pascal void EventHandler(tcpstream *tsp, OTEventCode event, OTResult result, void * /* cookie */) -{ - - switch(event) - { - case T_ORDREL: - case T_DISCONNECT: - tsp->tcps_terminated = true; - break; - case T_DATA: - case T_EXDATA: - tsp->tcps_data += 1; - break; - default: - break; - } - return; -} -#endif /* SUPPORT_OPENTRANSPORT */ - - -static OSErr -kick_mactcp( short *drefnump ) -{ - short dref; - OSErr err; - struct GetAddrParamBlock gapb; - -/* - * we make sure the MacTCP driver is open and issue a "Get My Address" call - * so that adevs like MacPPP are initialized (MacTCP is dumb) - */ - if (( err = OpenDriver( "\p.IPP", &dref )) != noErr ) { - return( err ); - } - - if ( drefnump != NULL ) { - *drefnump = dref; - } - - bzero( (char *)&gapb, sizeof( gapb )); - gapb.csCode = ipctlGetAddr; - gapb.ioCRefNum = dref; - - err = PBControlSync( (ParmBlkPtr)&gapb ); - - return( noErr ); -} diff --git a/libraries/macintosh/tcp/tcp.h b/libraries/macintosh/tcp/tcp.h deleted file mode 100644 index 0c7b8e44d2..0000000000 --- a/libraries/macintosh/tcp/tcp.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * tcp.h interface to MCS's TCP routines - */ - -#include -#ifdef SUPPORT_OPENTRANSPORT -#include -#include -#endif /* SUPPORT_OPENTRANSPORT */ -#include "MacTCPCommonTypes.h" -#include "AddressXlation.h" -#include "TCPPB.h" -#include "GetMyIPAddr.h" - -#ifndef TCP_BUFSIZ -#define TCP_BUFSIZ 8192 -#endif /* TCP_BUFSIZ */ - -typedef struct tcpstream { - StreamPtr tcps_sptr; /* stream pointer for MacTCP TCP PB calls */ -#ifdef SUPPORT_OPENTRANSPORT - EndpointRef tcps_ep; /* OpenTransport end point */ -#endif /* SUPPORT_OPENTRANSPORT */ - short tcps_data; /* count of packets on read queue */ - short drefnum; /* driver ref num, for convenience */ - Boolean tcps_connected; /* true if connection was made */ - Boolean tcps_terminated; /* true if connection no longer exists */ -#ifdef SUPPORT_OPENTRANSPORT - InetHost tcps_remoteaddr; /* Address of our peer */ - InetPort tcps_remoteport; /* Port number of our peer */ -#endif /* SUPPORT_OPENTRANSPORT */ - unsigned char *tcps_buffer; /* buffer given over to system to use */ - struct tcpstream *tcps_next; /* next one in chain */ - TCPNotifyUPP tcps_notifyupp; /* universal proc pointer for notify routine */ -} tcpstream, *tcpstreamptr; - -/* - * the Unix-y struct timeval - */ -struct timeval { - long tv_sec; /* seconds */ - long tv_usec; /* and microseconds */ -}; - -#ifdef SUPPORT_OPENTRANSPORT -typedef UInt8 byte; -typedef UInt32 ip_addr; -typedef UInt16 tcp_port; -#endif /* SUPPORT_OPENTRANSPORT */ - -#define TCP_IS_TERMINATED( tsp ) (tsp)->tcps_terminated - -/* - * function prototypes - */ -#ifdef SUPPORT_OPENTRANSPORT -OSStatus tcp_init(void); -void tcp_shutdown(void); -Boolean tcp_have_opentransport( void ); -#endif /* SUPPORT_OPENTRANSPORT */ -tcpstream *tcpopen( unsigned char * buf, long buflen ); -tcp_port tcpconnect( tcpstream *s, ip_addr addr, tcp_port port ); -short tcpclose( tcpstream *s ); -long tcpread( tcpstream *s, byte timeout, unsigned char * rbuf, - unsigned short rbuflen, DialogPtr dlp ); -long tcpwrite( tcpstream *s, unsigned char * wbuf, unsigned short wbuflen ); -short tcpselect( tcpstream *s, struct timeval * timeout ); -short tcpreadready( tcpstream *tsp ); -short tcpgetpeername( tcpstream * tsp, ip_addr *addrp, tcp_port *portp ); - -#ifdef SUPPORT_OPENTRANSPORT -short gethostinfobyname( char *host, InetHostInfo *hip ); -short gethostinfobyaddr(InetHost addr, InetHostInfo *hip ); -short ipaddr2str( InetHost ipaddr, char *addrstr ); -#else /* SUPPORT_OPENTRANSPORT */ -short gethostinfobyname( char *host, struct hostInfo *hip ); -short gethostinfobyaddr( ip_addr addr, struct hostInfo *hip ); -short ipaddr2str( ip_addr ipaddr, char *addrstr ); -#endif /* SUPPORT_OPENTRANSPORT */ diff --git a/libraries/msdos/README b/libraries/msdos/README deleted file mode 100644 index 95520174ce..0000000000 --- a/libraries/msdos/README +++ /dev/null @@ -1,12 +0,0 @@ -LDAP MSDOS Overview README - -The lber and ldap client libraries have been ported to MSDOS, running -over various flavors of TCP/IP. A list of ports and README files to -see for further instruction follows: - -MSDOS over NCSA Telnet TCP/IP README.CSA -MSDOS over PCNFS README.NFS -MSWindows over WinSock API README.WSA - - -README Last updated 26 July 1993 Mark Smith diff --git a/libraries/msdos/README.CSA b/libraries/msdos/README.CSA deleted file mode 100644 index 0b005394f8..0000000000 --- a/libraries/msdos/README.CSA +++ /dev/null @@ -1,100 +0,0 @@ -LDAP MSDOS with NCSA Telnet TCP/IP stack README - -The lber and ldap client libraries, and the ud client (called BUD on -DOS) have been ported to MSDOS, running over the NCSA Telnet TCP/IP -code (available from ftp.ncsa.uiuc.edu). Build testing was done with -Microsoft C 5.00 and MSDOS 5.0. We plan to get Microsoft C 7.0 and -join the 1990s soon.... - -This port was just completed as this is being written (4 September 1992), -so it goes without saying that the code is largely untested under DOS. -Be sure to report and bugs to us (see the end of this file for where to -report bugs). - -None of the other clients included in the distribution have been tested -on the PC. The synchronous LDAP interface is also untested, although it -does build okay. - -MAKING THE DISTRIBUTION -To build the ldap and lber libraries: - - 1) obtain the NCSA source and build it. The remainder of this - README will assume the root of the NCSA source is a directory - called "NCSA". - - 2) Create an NCSA\LDAP directory, and the following three - directories underneath it: h, liblber, libldap. You should - have a structure that looks like this: - NCSA\ - LDAP\ - H\ - LIBLBER\ - LIBLDAP\ - - (lots of other NCSA directories) - - 3) Populate them from the distribution (files from the h/, liblber/, - and libldap/ distribution directories get copied to H\, - LIBLBER\, and LIBLDAP\ respectively). - - 4) Copy additional files for MSDOS to proper places: - distribution file PC file - msdos/makefile.msc LDAP\MAKEFILE.MSC - msdos/msdos.h LDAP\H\MSDOS.H - msdos/lp.c LDAP\LIBLBER\LP.C - msdos/makelber.msc LDAP\LIBLBER\MAKELBER.MSC - msdos/msdos.c LDAP\LIBLBER\MSDOS.C - msdos/makeldap.msc LDAP\LIBLDAP\MAKELDAP.MSC - msdos/opendos.c LDAP\LIBLDAP\OPENDOS.C - - 5) If you wish to change any compiler or linker switches, you - should be able to do so just by editing the top-level - MAKEFILE.MSC make file. There seems to be a problem if you - add -DLDAP_DEBUG: the linker is unable to resolve the - lber_debug variable (defined in liblber/decode.c, used there - and in liblber/io.c). If anyone can figure out how to get it - to work, let us know. - - 6) Build the library (this will also build the LDAP test program): - cd NCSA\LDAP - make makefile.msc - If your DOS C compiler is as picky as ours, you will get many - screen fulls of warnings that can safely be ignored. - Note that if you try to make while sitting in the lower - directories (LIBLDAP or LIBLBER), it will fail. This will - hopefully be cleaned up in a later release. - - 7) Test the library using LTEST.EXE: - cd to somewhere where there is a proper NCSA CONFIG.TEL file - execute "LTEST " from there, and test away. - -To build the ud client "BUD": - 1) Build the ldap and lber libraries (see above). - - 2) Create a directory called UD underneath your LDAP directory, - and populate it with all the files from the ud/ directory - from the distribution. Also add the following files: - msdos/makeud.msc - msdos/protoud.h - macintosh/getopt.c (yes, put this in the LDAP\UD directory) - - 3) Change any desired options in UD.H or in the LDAP\MAKEFILE.MSC - make file. You will probably want to set up your own - site-specific values for DEFAULT_BASE and DEFAULT_SERVER (in - UD.H). - - 4) Uncomment out the lines near the end of LDAP\MAKEFILE.MSC - that define the rules to make ud. - - 5) Build bud.exe: - cd NCSA\LDAP - make makefile.msc - You should now have a working bud.exe. Make sure you test - it while in a directory that has a proper NCSA CONFIG.TEL file - in it. - -BUG REPORTING - - Bug reports should be sent to bug-ldap@terminator.cc.umich.edu. - -README Last updated 4 September 1992 Mark Smith diff --git a/libraries/msdos/README.NFS b/libraries/msdos/README.NFS deleted file mode 100644 index 0965a8b168..0000000000 --- a/libraries/msdos/README.NFS +++ /dev/null @@ -1,55 +0,0 @@ -LDAP MSDOS with SUN PC-NFS README - -The lber and ldap client libraries have been ported to MSDOS, running over -SUN PC-NFS. Build testing was done with Microsoft C 7.00, SUN PC-NFS -Programmer's Toolkit version 4.0 and MSDOS 5.0. - -This port is relatively untested so please be sure to report any bugs to -us (see the end of this file for where to report bugs). - -None of the clients included in the distribution have been tested -on the PC over PC-NFS although UD has been tested over the NCSA TCP/IP port. - -MAKING THE DISTRIBUTION -To build the ldap and lber libraries on the PC: - -1) Create a directory somewhere for your LDAP source files and then create - the following three directories in it: h, liblber and libldap. You - should have a structure something like - - LDAP\H - LDAP\LIBLDAP - LDAP\LIBLBER - -2) Populate them from the distribution (files from the h/, liblber/, - and libldap/ distribution directories get copied to H\, - LIBLBER\, and LIBLDAP\ respectively). - -3) Copy additional files for MSDOS PC-NFS to proper places: - distribution file PC file - msdos/makefile.nfs LDAP\MAKEFILE - msdos/msdos.h LDAP\H\MSDOS.H - msdos/lp.c LDAP\LIBLBER\LP.C - msdos/makelber.nfs LDAP\LIBLBER\MAKEFILE - msdos/msdos.c LDAP\LIBLBER\MSDOS.C - msdos/makeldap.nfs LDAP\LIBLDAP\MAKEFILE - msdos/opendos.c LDAP\LIBLDAP\OPENDOS.C - -4) If you wish to change any compiler or linker switches, you - should be able to do so just by editing the top-level - MAKEFILE. - -5) Build the library (this will also build the LDAP test program): - - CD LDAP - NMAKE - - You will get many screen fulls of warnings that can safely be ignored. - -6) Test the library using LTEST.EXE. - -BUG REPORTING - - Bug reports should be sent to bug-ldap@terminator.cc.umich.edu. - -README.NFS Last updated January 1993 Andy Powell (University of Bath) diff --git a/libraries/msdos/README.WSA b/libraries/msdos/README.WSA deleted file mode 100644 index 3e8d75fc84..0000000000 --- a/libraries/msdos/README.WSA +++ /dev/null @@ -1,228 +0,0 @@ -LDAP MSWindows with WinSock API README - -The lber and ldap client libraries have been ported to Microsoft Windows -in the form of a Windows Dynamic Link library called LIBLDAP.DLL and -Ldap32.dll (16 and 32 bit versions respectively). - -A Windows Socket API version 1.1 conformant TCP/IP WINSOCK.DLL is -required for the LIBLDAP.DLL to run. Some patches have been -incorporated that should make it possible to build the LIBLDAP.DLL under -Borland C++ 3.1. Brief instructions are included later in this file. -(There are no changes to the Borland support in this release.) - -This release also include 16 and 32 bit versions of the ltest (& -ltest32) API test programs. Instructions for building it are in the -second half of this document. None of the other clients included in the -distribution have been tested under Windows. The synchronous LDAP -interface is also untested, although it does build okay. - -At the very end of this document are some hints for writing applications -that use the LIBLDAP.DLL. - -We have also made a windows "kit" available at: - - ftp://terminator.rs.itd.umich.edu/ldap/windows/winldap.zip - -Our hope is that with this kit, you won't have to compile all this -yourself (unless you want to). The kit includes: - 16 and 32bit dlls - debug and release builds - the LTest utility program - man pages in the form of HLP files (new and old formats) - include files - sample config files - -MAKING THE DISTRIBUTION - -Build testing was done on Windows NT workstation 3.51 (service patch 2) -(on NTFS which supports long filenames) using Microsoft Visual C++ 1.52c -(16 bit) and Visual C++ 4.0 (32 bit). - -To build the LIBLDAP.DLL library under Microsoft Visual C++ 1.52c -(16bit) or Visual C++ 4.0 (32bit): (search forward in this file for -"Borland" if you are using Borland C++) - - 1) Untar the ldap distribution somewhere on MSDOS. You will - need at least the include and libraries subdirectories. - A version of tar that works under MSDOS is a big help for - this step - - tar xf ldap.tar - - This will create a directory called ldap or similar that - contains the ldap source distribution. We will refer to - that directory simply as "\ldap" from now on, but it could - be anywhere and have any name on your system - - Note that a lot of empty include files are on this distribution. - This is because some compilers are not smart enough to properly - generate dependencies (i.e. they ignore #ifdefs) so the file needs - to be present, even if not used. - - 2) cd to the LDAP directory (root of your LDAP area on MSDOS) and - execute the setupwsa batch file. This will copy a bunch of - files from the ldap\libraries\msdos and - ldap\libraries\msdos\winsock directories to the ldap\include - and ldap\libraries\libldap directories: - cd \ldap - libraries\msdos\winsock\setupwsa.bat - Note that a lot of empty include files are copied over... this - is because some compilers are not smart enough to properly - generate dependencies. - - 3) Create a WINSOCK.LIB import library from the WINSOCK.DEF file. - You can also obtain a pre-built .LIB from ftp.microdyne.com in - /pub/winsock/winsock-1.1/winsock.lib. To build an import - library using Microsoft's IMPLIB utility: - cd \ldap\libraries\libldap - implib winsock.lib winsock.def - - 4) Now fire up MS Windows and start the Visual C++ Workbench. Open - the project \ldap\libraries\libldap\libldap.mak or - \ldap\libraries\libldap\ldap32.mak with the appropriate compiler. - - Change the project "Include" directory to list the ldap - include directory as well as the standard include directories - (change by using the command found under the - Options...Directories menu in the 16 bit compiler and - Build/Settings in the 32bit compiler). - - The preprocessor symbols I have defined are: - WINSOCK, DOS, NEEDPROTOS, NO_USERINTERFACE, KERBEROS I ran - into buffer length limitations when I tried to define more - preprocessor symbols this way. So all the rest are defined - in msdos.h. This makes the order of inclusion critical for - msdos.h. - - - Note: If you are using something other than Visual C++ you will - need to create a makefile or other project file. It should - include all of the .c files in the liblber and libldap - directories, plus the libraries\libldap\libldap.def (or - libraries\libldap\ldap32.def) module definition file. It - will need to link in winsock.lib. You should use the large - memory model. - - 5) Select Build LIBLDAP.DLL (or Rebuild All) from the Project - menu to build the DLL. You will see many warnings, - especially from the liblber code. Our experience is that it - is safe to ignore them. - - 6) If you want to change what symbols are defined (for example - WSHELPER, or LDAP_DEBUG), change them in msdos.h and - recompile. LDAP_DEBUG now works in the windows environment. - The comments in msdos.h explain what the various options are. - -You should now have a functional LIBLDAP (or ldap32) dynamic link -library. If you wish to build a version of ltest for MSWindows to test -it, follow these next steps. - - 1) Copy the libldap test.c and LIBLDAP.DLL import library files - to the Windows ltest directory. Under DOS: - cd \ldap - copy libraries\libldap\test.c libraries\msdos\winsock\ltest - copy libraries\libldap\libldap.lib libraries\msdos\winsock\ltest - - 2) Open the project \ldap\libraries\msdos\winsock\ltest\ltest.mak - (or ltest32.mdp) under the Microsoft Visual C++ Workbench. - Change the project include directory to list the - \ldap\include directory as well as the standard include - directories. - - 3) Edit the string resource IDS_LDAP_HOST_NAME in ltest.rc (or - ltest32.rc) and change the string "truelies" to the name of - the LDAP server host you would like to test against. - - Since this is a string resource, it may also be edited in the - DLL with AppStudio. So you can change it without having to - recompile. - - 4) Build the project. If you are not using Visual C++, you will - need to create a makefile or other project file, and then - build. The project should include all of the .c files in - the ldap\libraries\msdos\winsock\ltest directory and the - ltest.def module definition file. You will need to link in - libldap.lib and winsock.lib (import libraries). - -You should now have a functional ltest application. It is ugly, but it -is useful for testing purposes. It doesn't try very hard to be a pretty -MS Windows application. - - -To build the LIBLDAP.DLL library under Borland C++ 3.1: - - Note: No changes have been made wrt Borland compiler in this release. - - 1) Untar the ldap distribution somewhere on MSDOS. You will - need at least the include and libaries subdirectories. - A version of tar that works under MSDOS is a big help for - this step: - tar xf ldap.tar - - This will create a directory called ldap or similar that - contains the ldap source distribution. We will refer to - that directory simply as "\ldap" from now on, but it could - be anywhere and have any name on your system - - 2) cd to the LDAP directory (root of your LDAP area on MSDOS) and - execute the setupwsa batch file. This will copy a bunch of - files from the ldap\libraries\msdos and ldap\libraries\msdos\winsock - directories to the ldap\include and ldap\libraries\libldap - directories: - cd \ldap - libraries\msdos\winsock\setupwsa.bat - - 3) Start Borland C++ and create a new project here named - libraries\libldap\libldap.prj and add all .c files in - the libraries\liblber and libraries/libldap directories - except open.c and test.c. Also add libldap.def and - the winsock.lib. - - 4) Configure the project: - Set include directories to have ..\..\include in them - Set these #defines: NO_USERINTERFACE;DOS;NEEDPROTOS;WIN31;BC31 - Switch case-sensitive link/exports off - Include the runtime library statically, and 'none' of the others - - 5) Do Build All - - -WRITING APPLICATIONS THAT USE LIBLDAP.DLL - - All of the normal LDAP and LBER calls documented in the man pages - (contained in the ldap\doc\man directory) should work, except for - ldap_perror (this is not supported under Windows since you will - want to use an application-defined dialog; you can use ldap_err2string - to obtain an error string to display in a message box or dialog). - The LIBLDAP.DEF file has a complete list of available routines. - - Any memory that you obtain as the result of a call to an LIBLDAP.DLL - routine should NOT be freed by calling the free() routine in your - C library. Instead, use the the new utility routine ldap_memfree. - This is so the malloc/calloc and free routines all come from the same - library (the one in libldap) rather than using libldap's malloc/calloc - and the calling program's free. The 32bit compiler (in debug mode) - FORCED me to be compulsive about this for the application I used to test. - - To be friendly under Windows, you should use the asynchronous LDAP - calls whenever possible. - - One limitation of the current LIBLDAP.DLL is that each X.500 LDAP - result message has to be smaller than 64K bytes. Ldap32.dll does - NOT have this limitation. - - To compile the dlls we define the following preprocessor variables. - - WINSOCK, DOS, NEEDPROTOS, NO_USERINTERFACE, KERBEROS - - Presumably you don't need KERBEROS. You may need some/all the - others to take the right path through the include files. Also note - that a few more preprocessor variables are defined in msdos.h. This - means that msdos.h must be included before ldap.h or lber.h. - - -BUG REPORTING - - Bug reports should be sent to bug-ldap@umich.edu. - -README Last updated 13 January 1996 by Steve Rothwell diff --git a/libraries/msdos/lp.c b/libraries/msdos/lp.c deleted file mode 100644 index 85551d442b..0000000000 --- a/libraries/msdos/lp.c +++ /dev/null @@ -1,265 +0,0 @@ -/* ------------------------------------------------------------- - lp.c - - Routines common to lpr, lpq, and lprm. - - Paul Hilchey May 1989 - - Copyright (C) 1989 The University of British Columbia - All rights reserved. - - history - ------- - 1/6/89 Microsoft C port by Heeren Pathak (NCSA) - ------------------------------------------------------------- -*/ - -#ifdef DOS -#ifndef PCNFS - -#define LPR - -#include -#include -#include -#include -#ifdef MEMORY_DEBUG -#include "memdebug.h" -#endif -#include "netevent.h" -#include "hostform.h" -#include "lp.h" -#include "externs.h" - -#ifdef MSC -#define EXIT_FAILURE 1 -#endif - -void checkerr( void ); - -/**************************************************************** - * lookup * - * Try to find the remote host in the local cache or from a * - * domain name server. * - * parameters: null terminated string containing the name or * - * ip address of the host * - * return value: pointer to machine info record, or 0 if the * - * lookup failed * - ****************************************************************/ -struct machinfo *lookup(char *host) -{ - int what,dat; - int machine_number; /* used to identify domain lookup events */ - struct machinfo *machine_info; - - machine_info = Sgethost(host); /* look up in hosts cache */ - - if (!machine_info) { - if ((machine_number = Sdomain(host)) < 0) - return(0); /* initiate domain name lookup */ - - /* wait for DOMOK or DOMFAIL event */ - while (machine_info==NULL) { - switch(lgetevent(USERCLASS,&what,&dat)) { - case DOMFAIL: - /* lookup failed, return 0 */ - return(0); - case DOMOK: - /* get pointer to machine record */ - machine_info=Slooknum(machine_number); - default: - break; - } - } - if (debug) puts("Domain lookup worked"); - } - return(machine_info); -} - -/***************************************************************** - * open_connection * - * Open the TCP connection. * - * parameters: pointer to machine info record * - * source port number * - * destination port number * - * return value: connection identifier (port number), or -1 if * - * connection could not be opened * - *****************************************************************/ -int open_connection(struct machinfo *machine_record, int source_port, -int dest_port) -{ - int ev,what,dat; /* parameters for lgetevent */ - int conid; /* connection identifier */ - - /* set the source port */ - netfromport(source_port); - - /* initiate connection open */ - if (0 > (conid = Snetopen(machine_record,dest_port))) - return(-1); - - if (debug) puts("snetopen ok"); - - /* wait for connection to open or for attempt to fail */ - while(1) { - if (0 != (ev = lgetevent(CONCLASS,&what,&dat))) { - if (dat != conid) { /* not for us */ - /* netputevent(what,ev,dat); */ - continue; - } - if (ev == CONOPEN) - break; - else - return(-1); - } - } - if (debug) puts("Conopen"); - return(conid); -} - - -/******************************************************************* - * crash * - * Shut down all network stuff, print an error message to stderr, * - * and abort. * - * parameters: variable length argument list for the error * - * message (a la printf) * - *******************************************************************/ -void crash(char *msg,...) -{ - va_list argptr; - - fprintf(stderr,"\nError: "); - va_start(argptr,msg); - vfprintf(stderr,msg,argptr); - va_end(argptr); - fprintf(stderr,"\n"); - - /* shut everything down */ - netshut(); - exit(EXIT_FAILURE); -} - -/********************************************************************* - * Check for any error events that may have occured. Either print * - * the message on stderr or just ignore it if it is probably not * - * serious. Set debug on to see all error messages. * - *********************************************************************/ -void checkerr(void ) -{ - char *errmsg; - int i,j; - - while (ERR1 == Sgetevent(ERRCLASS,&i,&j)) { - if ((!debug) && - ((300 <= j && j <= 399) || /* IP messages */ - (400 <= j && j <= 499) || /* TCP messages */ - (600 <= j && j <= 699) || /* ICMP messages */ - j == 801 || j == 805 || /* misc. domain stuff */ - j == 806)) - continue; /* just ignore them */ - errmsg = neterrstring(j); - fprintf(stderr,"%s\n",errmsg); - } -} - -/********************************************************************* - * lgetevent * - * Check for network events. The next pending non-error event is * - * returned (if any). * - * Takes the same parameters as sgetevent. * - *********************************************************************/ -int lgetevent(int class, int *what, int *datp) -{ - checkerr(); - return(Sgetevent(class, what, datp)); -} - -/****************************************************************** - * nprintf * - * Formatted write to an open TCP conection. Like fprintf, but * - * use a connection id returned from snteopen instead of a file * - * handle. The formatted string must not exceed 1023 bytes. * - * Returns EOF if an error occurs * - ******************************************************************/ -int nprintf(int connection_id, char *format,...) -#define BUFF_SIZE 1024 -{ - va_list argptr; - char buff[BUFF_SIZE], *buff_ptr; - int len1, len2; - - va_start(argptr,format); - len1 = vsprintf(buff,format,argptr); - va_end(argptr); - if ((len1 == EOF) || len1+1 >= BUFF_SIZE) return(EOF); - buff_ptr = buff; - while (buff_ptr < (buff + len1)) { - len2 = netwrite(connection_id, buff_ptr, - len1-(buff_ptr - buff)); - checkerr(); - Stask(); - if (len2 < 0) return(EOF); - buff_ptr += len2; - } - if (debug) puts(buff); - return (len1); -} - -/****************************************************************** - * nread * - * Read from an open TCP connection. Waits for incoming data if * - * there is none in the queue. Returns EOF if the connection * - * closes and there is no more data. * - * * - * parameters: connection id returned by Snetopen * - * buffer for returned data * - * size of buffer * - * returned value: number of characters read into the buffer * - ******************************************************************/ - -int nread(int connection_id, char *buff, int buff_size) -{ - int class,data,ev; - int len; - - netpush(connection_id); /* flush buffer */ - - while (0 == netest(connection_id)) { - ev = lgetevent(CONCLASS, &class, &data); - if (!ev) continue; - if (data != connection_id) { /* not for us; throw away */ - /* netputevent(class, ev, data); */ - continue; - } - if (debug) printf("nread %d %d\n",class,ev); - if (ev == CONDATA) { - len = netread(connection_id,buff,buff_size); - if (len == 0) continue; - return (len); - } - } - /* throw away other events. getevent should be changed so we - can retrieve events for a selected port only */ - while (lgetevent(USERCLASS | CONCLASS, &class, &data)); - return (EOF); /* connection is closed and no data in queue */ -} - -#ifdef MSC -#else -#pragma warn .par -#endif - -/****************************************************************** - * breakstop * - * Handle break interrupts by shutting down the network stuff and * - * aborting. * - ******************************************************************/ -int breakstop(void ) -{ - netshut(); - return(0); -} - -#endif PCNFS -#endif /* DOS */ diff --git a/libraries/msdos/makefile.msc b/libraries/msdos/makefile.msc deleted file mode 100644 index f70f03b730..0000000000 --- a/libraries/msdos/makefile.msc +++ /dev/null @@ -1,78 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1992 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# LDAP lightweight X.500 Directory access top level makefile for MSC -# -#----------------------------------------------------------------------------- - - - -# -# Edit the following variables to have appropriate values for your system -# - -# -# You may want to change some of these things too -# -# two kinds of things go in ACFLAGS, global compiler flags (like -g to -# generate symbol table info), and global defines (like -DKERBEROS to enable -# kerberos version 4 authentication, or -DLDAP_DEBUG to compile in some -# debugging info you can then turn on by setting ldap_debug) -# -ACFLAGS = -g -DNEEDPROTOS #-DLDAP_DEBUG # added to every $(CFLAGS) -ALDFLAGS = # -g # always passed to ld -UDDEFINES = -DUOFM # particular to ud - -# -# you probably don't need to edit these things, but if you want to use -# a different make or c compiler, change it here. -# -MAKE = nmake -CC = cl -CFLAGS = /c /AL /DDOS /DMSC /Ox /W1 $(ACFLAGS) -I../h -LD = link -LDFLAGS = /m /ST:8192 $(ALDFLAGS) - -############################################################################ -# # -# You should not have to edit anything below this point # -# # -############################################################################ - -SDIRS = liblber ldapd libldap -OTHERS = finger gopher ud - -all: lber-library ldap-server ldap-library - -library-only: lber-library ldap-library - -others: ldap-finger ldap-gopher ldap-ud - -lber-library: - echo "cd liblber; $(MAKE) all" - cd liblber - $(MAKE) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" LIBDIR=$(LIBDIR) \ - CC=$(CC) LD=$(LD) /F makelber.msc - cd .. - -ldap-library: - echo "cd libldap; $(MAKE) all" - cd libldap - $(MAKE) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" LIBDIR=$(LIBDIR) \ - CC=$(CC) LD=$(LD) /F makeldap.msc - cd .. - -#ldap-ud: -# echo "cd ud; $(MAKE) all" -# cd ud -# $(MAKE) CFLAGS="$(CFLAGS) $(UDDEFINES)" LDFLAGS="$(LDFLAGS)" \ -# LIBDIR=$(LIBDIR) CC=$(CC) LD=$(LD) makeud.msc -# cd .. diff --git a/libraries/msdos/makefile.nfs b/libraries/msdos/makefile.nfs deleted file mode 100644 index ae827f2a1a..0000000000 --- a/libraries/msdos/makefile.nfs +++ /dev/null @@ -1,60 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1992 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# LDAP lightweight X.500 Directory access top level makefile for MSC -# -#----------------------------------------------------------------------------- -# -# Edit the following variables to have appropriate values for your system -# -NOLOGO = /nologo -MAKE = nmake $(NOLOGO) -CFLAGS = /c /AL /DDOS /DMSC /DNEEDPROTOS /DPCNFS /W3 /Oas $(ACFLAGS) -I../h -LDFLAGS = /m /SEG:256 /ST:8192 - -############################################################################ -# # -# You should not have to edit anything below this point # -# # -############################################################################ - -SDIRS = liblber ldapd libldap -OTHERS = finger gopher ud - -all: lber-lib ldap-lib - -lib-only: lber-lib ldap-lib - -others: ldap-finger ldap-gopher ldap-ud - -lber-lib: - cd liblber - $(MAKE) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" all - cd .. - -ldap-lib: - cd libldap - $(MAKE) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" all - cd .. - -#ldap-ud: -# echo "cd ud; $(MAKE) all" -# cd ud -# $(MAKE) CFLAGS="$(CFLAGS) $(UDDEFINES)" LDFLAGS="$(LDFLAGS)" \ -# LIBDIR=$(LIBDIR) CC=$(CC) LD=$(LD) makeud.msc -# cd .. - -clean: - cd liblber - $(MAKE) clean - cd ..\libldap - $(MAKE) clean - cd .. diff --git a/libraries/msdos/makelber.msc b/libraries/msdos/makelber.msc deleted file mode 100644 index ae5bf671c2..0000000000 --- a/libraries/msdos/makelber.msc +++ /dev/null @@ -1,58 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1992 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# lightweight ber library makefile for MicroSoft C -# -#----------------------------------------------------------------------------- - -SRCS = decode.c encode.c io.c msdos.c lp.c -OBJS = decode.obj encode.obj io.obj msdos.obj lp.obj - -CFLAGS = $(ACFLAGS) -I../h -CC = echo "cd up a level first" - -NCFLAGS = -I../../include - -#default: -# (cd ../; make lber-library) - -all: $(OBJS) liblber.lib - -decode.obj: decode.c - $(CC) $(CFLAGS) decode.c - -encode.obj: encode.c - $(CC) $(CFLAGS) encode.c - -io.obj: io.c - $(CC) $(CFLAGS) io.c - -msdos.obj: msdos.c - $(CC) $(CFLAGS) $(NCFLAGS) msdos.c - -lp.obj: lp.c - $(CC) $(CFLAGS) $(NCFLAGS) lp.c - -liblber.lib: $(OBJS) - del liblber.lib - lib liblber.lib +decode.obj+encode.obj+io.obj+msdos.obj+lp.obj; - -#etest.obj: etest.c -# $(CC) $(CFLAGS) etest.c - -#etest: liblber.lib etest.obj -# $(LD) $(LDFLAGS) etest,etest,nul,liblber - -#dtest.obj: dtest.c -# $(CC) $(CFLAGS) dtest.c - -#dtest: liblber.lib dtest.obj -# $(LD) $(LDFLAGS) dtest,dtest,nul,liblber diff --git a/libraries/msdos/makelber.nfs b/libraries/msdos/makelber.nfs deleted file mode 100644 index f0025a6440..0000000000 --- a/libraries/msdos/makelber.nfs +++ /dev/null @@ -1,50 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1992 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# LDAP lightweight X.500 Directory access top level makefile for MSC -# -#----------------------------------------------------------------------------- - -SRCS = decode.c encode.c io.c msdos.c lp.c -OBJS = decode.obj encode.obj io.obj msdos.obj lp.obj - -NOLOGO = /nologo -CC = cl $(NOLOGO) -MAKE = nmake $(NOLOGO) - -default: - cd .. - $(MAKE) lber-lib - -all: $(OBJS) liblber.lib - -decode.obj: decode.c - $(CC) $(CFLAGS) decode.c - -encode.obj: encode.c - $(CC) $(CFLAGS) encode.c - -io.obj: io.c - $(CC) $(CFLAGS) io.c - -msdos.obj: msdos.c - $(CC) $(CFLAGS) msdos.c - -lp.obj: lp.c - $(CC) $(CFLAGS) lp.c - -liblber.lib: $(OBJS) - del liblber.lib - lib $(NOLOGO) liblber.lib +decode.obj+encode.obj+io.obj+msdos.obj+lp.obj; - -clean: - del *.obj - del *.lib diff --git a/libraries/msdos/makeldap.msc b/libraries/msdos/makeldap.msc deleted file mode 100644 index 1d068974da..0000000000 --- a/libraries/msdos/makeldap.msc +++ /dev/null @@ -1,92 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1992 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# LDAP library makefile for MicroSoft C -# -#----------------------------------------------------------------------------- - -SRCS = bind.c opendos.c result.c error.c compare.c search.c parse.c \ - modify.c add.c modrdn.c delete.c abandon.c synchronous.c \ - kerberos.c -OBJS = bind.obj opendos.obj result.obj error.obj compare.obj search.obj \ - parse.obj modify.obj add.obj modrdn.obj delete.obj abandon.obj \ - synchronous.obj kerberos.obj - -CFLAGS = $(ACFLAGS) -I../h $(KRBINCLUDEDIR) -NCFLAGS = -I../../include -CC = echo "cd up a level first" - -#default: -# (cd ../; make ldap-library) - -all: libldap.lib ltest - -bind.obj: bind.c - $(CC) $(CFLAGS) $(NCFLAGS) bind.c - -opendos.obj: opendos.c - $(CC) $(CFLAGS) $(NCFLAGS) opendos.c - -result.obj: result.c - $(CC) $(CFLAGS) $(NCFLAGS) result.c - -error.obj: error.c - $(CC) $(CFLAGS) error.c - -compare.obj: compare.c - $(CC) $(CFLAGS) compare.c - -search.obj: search.c - $(CC) $(CFLAGS) search.c - -parse.obj: parse.c - $(CC) $(CFLAGS) parse.c - -modify.obj: modify.c - $(CC) $(CFLAGS) modify.c - -add.obj: add.c - $(CC) $(CFLAGS) add.c - -modrdn.obj: modrdn.c - $(CC) $(CFLAGS) modrdn.c - -delete.obj: delete.c - $(CC) $(CFLAGS) delete.c - -abandon.obj: abandon.c - $(CC) $(CFLAGS) abandon.c - -synchronous.obj: synchronous.c - $(CC) $(CFLAGS) synchronous.c - -kerberos.obj: kerberos.c - $(CC) $(CFLAGS) kerberos.c - -libldap.lib: $(OBJS) - del libldap.lib - lib libldap.lib +bind.obj+opendos.obj+result.obj+error.obj+compare.obj; - lib libldap.lib +search.obj+parse.obj+modify.obj+add.obj+modrdn.obj; - lib libldap.lib +delete.obj+abandon.obj+synchronous.obj+kerberos.obj; - -test.obj: test.c - $(CC) $(CFLAGS) test.c - -ltest: libldap.lib test.obj ..\liblber\liblber.lib - copy libldap.lib ..\..\lib - copy ..\liblber\liblber.lib ..\..\lib - cd ..\..\lib - $(LD) $(LDFLAGS) ..\ldap\libldap\test+memdebug+ncsaio,ltest,nul,libldap+liblber.lib+tcp+sess+enet+common - copy ltest.exe ..\ldap\libldap\ltest.exe - del libldap.lib - del liblber.lib - del ltest.exe - cd ..\ldap\libldap diff --git a/libraries/msdos/makeldap.nfs b/libraries/msdos/makeldap.nfs deleted file mode 100644 index 939264b5d5..0000000000 --- a/libraries/msdos/makeldap.nfs +++ /dev/null @@ -1,97 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1992 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# LDAP lightweight X.500 Directory access top level makefile for MSC -# -#----------------------------------------------------------------------------- - -SRCS = bind.c opendos.c result.c error.c compare.c search.c parse.c \ - modify.c add.c modrdn.c delete.c abandon.c synchron.c \ - kerberos.c cache.c ufn.c -OBJS = bind.obj opendos.obj result.obj error.obj compare.obj search.obj \ - parse.obj modify.obj add.obj modrdn.obj delete.obj abandon.obj \ - synchron.obj kerberos.obj cache.obj ufn.obj - -NOLOGO = /nologo -CC = cl $(NOLOGO) -MAKE = nmake $(NOLOGO) -LD = link $(NOLOGO) - -default: - cd .. - $(MAKE) ldap-lib - -all: libldap.lib ltest - -bind.obj: bind.c - $(CC) $(CFLAGS) bind.c - -opendos.obj: opendos.c - $(CC) $(CFLAGS) opendos.c - -result.obj: result.c - $(CC) $(CFLAGS) result.c - -error.obj: error.c - $(CC) $(CFLAGS) error.c - -compare.obj: compare.c - $(CC) $(CFLAGS) compare.c - -search.obj: search.c - $(CC) $(CFLAGS) search.c - -parse.obj: parse.c - $(CC) $(CFLAGS) parse.c - -modify.obj: modify.c - $(CC) $(CFLAGS) modify.c - -add.obj: add.c - $(CC) $(CFLAGS) add.c - -modrdn.obj: modrdn.c - $(CC) $(CFLAGS) modrdn.c - -delete.obj: delete.c - $(CC) $(CFLAGS) delete.c - -abandon.obj: abandon.c - $(CC) $(CFLAGS) abandon.c - -synchron.obj: synchron.c - $(CC) $(CFLAGS) synchron.c - -kerberos.obj: kerberos.c - $(CC) $(CFLAGS) kerberos.c - -cache.obj: cache.c - $(CC) $(CFLAGS) cache.c - -ufn.obj: ufn.c - $(CC) $(CFLAGS) ufn.c - -libldap.lib: $(OBJS) - del libldap.lib - lib $(NOLOGO) libldap.lib +bind.obj+opendos.obj+result.obj+error.obj+compare.obj; - lib $(NOLOGO) libldap.lib +search.obj+parse.obj+modify.obj+add.obj+modrdn.obj; - lib $(NOLOGO) libldap.lib +delete.obj+abandon.obj+synchron.obj+kerberos.obj+cache.obj+ufn.obj; - -test.obj: test.c - $(CC) $(CFLAGS) test.c - -ltest: libldap.lib test.obj ..\liblber\liblber.lib - $(LD) $(LDFLAGS) test,ltest,nul,libldap+..\liblber\liblber+ltklib ; - -clean: - del *.obj - del *.lib - del *.exe diff --git a/libraries/msdos/makeud.msc b/libraries/msdos/makeud.msc deleted file mode 100644 index dfa1197966..0000000000 --- a/libraries/msdos/makeud.msc +++ /dev/null @@ -1,76 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 1992 Regents of the University of Michigan. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that this notice is preserved and that due credit is given -# to the University of Michigan at Ann Arbor. The name of the University -# may not be used to endorse or promote products derived from this -# software without specific prior written permission. This software -# is provided ``as is'' without express or implied warranty. -# -# ud makefile for Microsoft C -# -# Use -DUOFM for University of Michigan specifics like: -# if ud should know about noBatchUpdates -# Use -DDOS if building for a DOS machine -# Use -DNOTERMCAP if there is no termcap library -# also need to redefine/undefine the Makefile TERMLIB variable -#----------------------------------------------------------------------------- -SRCS= find.c mod.c print.c auth.c util.c help.c getopt.c versio.c -OBJS= find.obj mod.obj print.obj auth.obj util.obj help.obj \ - getopt.obj version.obj -HDRS= ud.h protoud.h - -CFLAGS = $(ACFLAGS) -I../h -NCFLAGS = -I../../include -CC = echo "cd up a level first" - -#default: -# (cd ../; make ud) - -all: ud - -main.obj: main.c - $(CC) $(CFLAGS) main.c - -find.obj: find.c - $(CC) $(CFLAGS) find.c - -mod.obj: mod.c - $(CC) $(CFLAGS) mod.c - -print.obj: print.c - $(CC) $(CFLAGS) print.c - -auth.obj: auth.c - $(CC) $(CFLAGS) auth.c - -util.obj: util.c - $(CC) $(CFLAGS) util.c - -help.obj: help.c - $(CC) $(CFLAGS) help.c - -getopt.obj: getopt.c - $(CC) $(CFLAGS) getopt.c - -version.obj: version.c - $(CC) $(CFLAGS) version.c - -libud.lib: $(OBJS) - del libud.lib - lib libud.lib find.obj+mod.obj+print.obj+auth.obj+util.obj+help.obj+getopt+version; - -bud: libud.lib ../libldap/libldap.lib ../liblber/liblber.lib - copy libud.lib ..\..\lib - copy ..\libldap\libldap.lib ..\..\lib - copy ..\liblber\liblber.lib ..\..\lib - cd ..\..\lib - $(LD) $(LDFLAGS) ..\ldap\ud\main+memdebug+ncsaio,bud,nul,libud+libldap+liblber+tcp+sess+enet+common - copy bud.exe ..\ldap\ud\bud.exe - del libldap.lib - del liblber.lib - del bud.exe - cd ..\ldap\ud - diff --git a/libraries/msdos/msdos.c b/libraries/msdos/msdos.c deleted file mode 100644 index ecfc957e95..0000000000 --- a/libraries/msdos/msdos.c +++ /dev/null @@ -1,84 +0,0 @@ -#ifndef PCNFS -#include -#include -#include -#include -#include -#include -#include -#define ffblk find_t -#define ff_name name -#include -#include -#include - -#define WINMASTER -#define LPR - -#ifdef MEMORY_DEBUG -#include "memdebug.h" -#endif -#include "whatami.h" -#include "hostform.h" -#include "windat.h" -#include "lp.h" -#include "externs.h" -#include "msdos.h" - -/* Function prototypes */ - -int netup = 0; -int connection_id; -int cf_length = 0; /* current length of control_file */ -int sequence_number; /* sequence number for spooled file names */ -struct config *cp; /* configuration information */ -char username[9]; /* name of user */ -int debug = 0; /* 1 = print debugging info; set with -D option */ - -int ftppassword, /* not used; just to avoid unresolved external */ -bypass_passwd=0; /* whether to bypass the password check */ - -unsigned char path_name[_MAX_DRIVE+_MAX_DIR], /* character storage for the path name */ -temp_str[20],s[_MAX_DIR],temp_data[30]; - -/* Do session initialization. Snetinit reads config file. */ -ncsainit() -{ - char *ptr; - int i; - if (netup) return; - ptr = getenv("CONFIG.TEL"); - if (ptr != NULL) Shostfile(ptr); - if(i=Snetinit()) { - if(i==-2) /* BOOTP server not responding */ - netshut(); /* release network */ - crash("network initialization failed."); - } /* end if */ - netup = 1; -} - - -int ncsaopen( address, port ) -unsigned long address; -short port; -{ - unsigned char *bob; - struct machinfo *mr; - short source_port; - short handle; - char s[256]; - - bob = (unsigned char *) &address; - sprintf(s,"%u.%u.%u.%u\n",bob[0],bob[1],bob[2],bob[3]); - mr = lookup(s); - - /* open connection */ - /* pick a source port at random from the set of privileged ports */ - - srand((unsigned)time(NULL)); - - source_port = rand() % MAX_PRIV_PORT; - handle = open_connection(mr, source_port, port); - return(handle); -} -#endif /* PCNFS */ diff --git a/libraries/msdos/msdos.h b/libraries/msdos/msdos.h deleted file mode 100644 index b670463111..0000000000 --- a/libraries/msdos/msdos.h +++ /dev/null @@ -1,52 +0,0 @@ -/* ldapmsdos.h */ -/* - * Copyright (c) 1992 Regents of the University of Michigan. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that this notice is preserved and that due credit is given - * to the University of Michigan at Ann Arbor. The name of the University - * may not be used to endorse or promote products derived from this - * software without specific prior written permission. This software - * is provided ``as is'' without express or implied warranty. - */ - -#ifdef PCNFS -#include -#include -#include -#endif /* PCNFS */ - -#ifdef NCSA -#define NCSADOMAINFIX 1 /* see README.dos */ - -typedef unsigned short us; -typedef unsigned long ul; -#define ntohs(i) ((us)( (((us)i & 0xff) << 8) + (((us)i & 0xff00) >> 8) )) -#define ntohl(i) ((ul)( (((ul)i & 0xff) << 24) + (((ul)i & 0xff00) << 8) + \ - (((ul)i & 0xff0000) >> 8) + \ - (((ul)i & 0xff000000) >> 24) )) -#define htons(i) ntohs(i) -#define htonl(i) ntohl(i) - -typedef unsigned long ip_addr; -typedef unsigned long u_long; -typedef unsigned short u_short; -typedef unsigned char u_char; - -extern int ncsainit( void ); -extern int ncsaopen( unsigned long addr, short port ); -extern int nread(int connection_id, char *buff, int buff_size); -#endif /* NCSA */ - -#if defined( PCNFS ) || defined( NCSA ) -#include - -struct timeval { - long tv_sec; - long tv_usec; -}; -#endif /* PCNFS */ - -#define strcasecmp(a,b) stricmp(a,b) -#define strncasecmp(a,b,len) strnicmp(a,b,len) diff --git a/libraries/msdos/opendos.c b/libraries/msdos/opendos.c deleted file mode 100644 index 68752dbdfa..0000000000 --- a/libraries/msdos/opendos.c +++ /dev/null @@ -1,393 +0,0 @@ -/* - * Copyright (c) 1992 Regents of the University of Michigan. - * All rights reserved. - * - * open-dos.c - */ - -#ifndef lint -static char copyright[] = "@(#) Copyright (c) 1992 Regents of the University of Michigan.\nAll rights reserved.\n"; -#endif - -#include "lber.h" -#include "ldap.h" -#include -#include -#include -#ifdef PCNFS -#include -#include -#include -#include -#include -#else /* PCNFS */ -#include "hostform.h" -#include "externs.h" -#endif /* PCNFS */ -#include "msdos.h" - -#ifndef INADDR_LOOPBACK -#define INADDR_LOOPBACK ((u_long) 0x7f000001) -#endif - -#ifdef LDAP_DEBUG -int ldap_debug; -#endif - -#ifndef PCNFS -u_long *lookup_addrs( char *host ); -extern long inet_addr( char *addr ); -extern struct machinfo *lookup( char *host ); -#endif /* PCNFS */ - -/* - * ldap_open - initialize and connect to an ldap server. A magic cookie to - * be used for future communication is returned on success, NULL on failure. - * - * Example: - * LDAP *ld; - * ld = ldap_open( hostname, port ); - */ - -#ifdef PCNFS -LDAP *ldap_open( host, port ) - char *host; - int port; -{ - int s; - unsigned long address; - struct sockaddr_in sock; - struct hostent *hp; - LDAP *ld; - char *p, hostname[BUFSIZ]; - - Debug( LDAP_DEBUG_TRACE, "ldap_open\n", 0, 0, 0 ); - - if ( host == NULL ) { - fprintf(stderr, "No hostname!\n"); - return( NULL ); - } - if ( (hp = gethostbyname( host )) == NULL ) { - perror( "gethostbyname" ); - return( NULL ); - } - SAFEMEMCPY( (char *) &address, (char *) hp->h_addr, hp->h_length ); - strcpy( hostname, hp->h_name ); - if ( (p = strchr( hostname, '.' )) != NULL ) - *p = '\0'; - if ( port == 0 ) - port = LDAP_PORT; - - if ( (s = socket( AF_INET, SOCK_STREAM, 0 )) < 0 ) { - tk_perror( "socket" ); - return( NULL ); - } - - memset( (char *)&sock, 0, sizeof(sock)); - SAFEMEMCPY( &sock.sin_addr, hp->h_addr, hp->h_length ); - sock.sin_family = hp->h_addrtype; - sock.sin_port = htons( (u_short) port); - - if (connect( s, (struct sockaddr *)&sock, sizeof(sock) ) < 0 ) { - tk_perror( "connect" ); - return( NULL ); - } - - if ( (ld = (LDAP *) calloc( sizeof(LDAP), 1 )) == NULL ) { - close( s ); - return( NULL ); - } - ld->ld_sb.sb_sd = s; - ld->ld_host = strdup( hostname ); - ld->ld_version = LDAP_VERSION; - - return( ld ); -} -#else /* PCNFS */ - -LDAP *ldap_open( host, port ) -char *host; -int port; -{ - int s, i; - unsigned long tmpaddr[2], *addrs; - LDAP *ld; - char *p, hostname[BUFSIZ]; - - Debug( LDAP_DEBUG_TRACE, "ldap_open\n", 0, 0, 0 ); - - ncsainit(); - tmpaddr[ 1 ] = 0; - addrs = tmpaddr; - if ( host != NULL ) { - strcpy( hostname, host ); - if ( (tmpaddr[0] = inet_addr( host )) == -1 ) { - if (( addrs = lookup_addrs( host )) == NULL ) { - netshut(); - return( NULL ); - } - } - } else { - tmpaddr[0] = INADDR_LOOPBACK; - strcpy( hostname, "localhost" ); - } - if ( (p = strchr( hostname, '.' )) != NULL ) - *p = '\0'; - if ( port == 0 ) - port = LDAP_PORT; - - for ( i = 0; addrs[ i ] != 0; ++i ) { - if ( (s = ncsaopen( addrs[ i ], port )) >= 0 ) { - break; - } - } - - if ( addrs[ i ] == 0 ) { - netshut(); - return( NULL ); - } - - if ( (ld = (LDAP *) calloc( sizeof(LDAP), 1 )) == NULL ) { - netclose( s ); - netshut(); - return( NULL ); - } - ld->ld_sb.sb_sd = s; - ld->ld_host = strdup( hostname ); - ld->ld_version = LDAP_VERSION; - - return( ld ); -} - - -u_long * -lookup_addrs( host ) - char *host; -{ - struct machinfo *mr; - int numaddrs, i; - char *ipp; - u_long *addrs, along; - - if (( mr = lookup( host )) == NULL ) { - return( NULL ); - } - - ipp = mr->hostip; -#ifdef NCSADOMAINFIX - numaddrs = 0; - while ( numaddrs < 4 ) { /* maximum of 4 addresses */ - SAFEMEMCPY( (char *)&along, (char *)ipp, sizeof( u_long )); - if ( along == 0 ) { - break; - } - ++numaddrs; - ipp += 4; - } -#else /* NCSADOMAINFIX */ - numaddrs = 1; -#endif /* NCSADOMAINFIX */ - - if (( addrs = (u_long *)malloc(( numaddrs + 1 ) * sizeof( u_long ))) - == NULL ) { - return( NULL ); - } - addrs[ numaddrs ] = 0; - - for ( i = 0, ipp = mr->hostip; i < numaddrs; ++i, ipp += 4 ) { - SAFEMEMCPY( (char *)&addrs[ i ], (char *)ipp, sizeof( u_long )); - } - - return( addrs ); -} - -/* - * Stand alone inet_addr derived from BSD 4.3 Networking Release 2 by MCS - * - * Copyright (c) 1992 Regents of the University of Michigan. - * All rights reserved. - * - * inet_addr.c - */ - -/* - * Copyright (c) 1983, 1990 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)inet_addr.c 5.10 (Berkeley) 2/24/91"; -#endif /* LIBC_SCCS and not lint */ - -#define STANDALONE 1 - -#ifdef STANDALONE -#define INADDR_NONE 0xffffffff /* -1 return */ -#define const -int inet_aton( char *cp, u_long *addr); - -#else STANDALONE -#include -#include -#endif STANDALONE - -#include - -#ifndef isascii -#define isascii(c) ((unsigned)(c)<=0177) /* for broken machines */ -#endif isascii - -/* - * Ascii internet address interpretation routine. - * The value returned is in network order. - */ -long -inet_addr(cp) - register const char *cp; -{ -#ifdef STANDALONE - u_long val; -#else STANDALONE - struct in_addr val; -#endif STANDALONE - - if (inet_aton(cp, &val)) -#ifdef STANDALONE - return (val); -#else STANDALONE - return (val.s_addr); -#endif STANDALONE - return (INADDR_NONE); -} - -/* - * Check whether "cp" is a valid ascii representation - * of an Internet address and convert to a binary address. - * Returns 1 if the address is valid, 0 if not. - * This replaces inet_addr, the return value from which - * cannot distinguish between failure and a local broadcast address. - */ - -inet_aton(cp, addr) - register char *cp; -#ifdef STANDALONE - u_long *addr; -#else STANDALONE - struct in_addr *addr; -#endif STANDALONE -{ - register u_long val, base, n; - register char c; - u_long parts[4], *pp = parts; - - for (;;) { - /* - * Collect number up to ``.''. - * Values are specified as for C: - * 0x=hex, 0=octal, other=decimal. - */ - val = 0; base = 10; - if (*cp == '0') { - if (*++cp == 'x' || *cp == 'X') - base = 16, cp++; - else - base = 8; - } - while ((c = *cp) != '\0') { - if (isascii(c) && isdigit(c)) { - val = (val * base) + (c - '0'); - cp++; - continue; - } - if (base == 16 && isascii(c) && isxdigit(c)) { - val = (val << 4) + - (c + 10 - (islower(c) ? 'a' : 'A')); - cp++; - continue; - } - break; - } - if (*cp == '.') { - /* - * Internet format: - * a.b.c.d - * a.b.c (with c treated as 16-bits) - * a.b (with b treated as 24 bits) - */ - if (pp >= parts + 3 || val > 0xff) - return (0); - *pp++ = val, cp++; - } else - break; - } - /* - * Check for trailing characters. - */ - if (*cp && (!isascii(*cp) || !isspace(*cp))) - return (0); - /* - * Concoct the address according to - * the number of parts specified. - */ - n = pp - parts + 1; - switch (n) { - - case 1: /* a -- 32 bits */ - break; - - case 2: /* a.b -- 8.24 bits */ - if (val > 0xffffff) - return (0); - val |= parts[0] << 24; - break; - - case 3: /* a.b.c -- 8.8.16 bits */ - if (val > 0xffff) - return (0); - val |= (parts[0] << 24) | (parts[1] << 16); - break; - - case 4: /* a.b.c.d -- 8.8.8.8 bits */ - if (val > 0xff) - return (0); - val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8); - break; - } - if (addr) -#ifdef STANDALONE - *addr = htonl(val); -#else STANDALONE - addr->s_addr = htonl(val); -#endif STANDALONE - return (1); -} - -#endif /* PCNFS */ diff --git a/libraries/msdos/protoud.h b/libraries/msdos/protoud.h deleted file mode 100644 index d78f5b7bd6..0000000000 --- a/libraries/msdos/protoud.h +++ /dev/null @@ -1,28 +0,0 @@ -extern int bind_info(void); -extern int auth(char *who,char *best_guess); -extern char *mygetpass(char *prompt); -extern int iam(char *who); -extern int print_my_name(void); -extern int init_search(char * *attributes); -extern int init_read(char * *attributes); -extern int dxi_vrfy(char *dn); -extern LDAPMessage *find(char *who); -extern int pick_one(int i); -extern int print_list(LDAPMessage *list,char * *names,int *matches); -extern int main(int argc,char * *argv); -extern int do_commands(void); -extern int status(void); -extern int change_base(char *s); -extern int initialize_client(void); -extern int attn(void); -extern int print_help(char *s); -extern char *alias(char *s); -extern void printbase(char *lead,char *s); -extern int fetch_buffer(char *buffer,int length,struct _iobuf *where); -extern int modify(char *who); -extern void set_pw(char *who); -extern int change_field(char *tag,char *id,char (*val)[256],char *who); -extern char *get_value(char *id,char *prompt); -extern int parse_answer(LDAPMessage *s); -extern int print_person(void); -extern int print_entry(char (*s)[256],char *label); diff --git a/libraries/msdos/winsock/include/file.h b/libraries/msdos/winsock/include/file.h deleted file mode 100644 index cead0808d2..0000000000 --- a/libraries/msdos/winsock/include/file.h +++ /dev/null @@ -1,4 +0,0 @@ -/* - * This file is intentionally empty. Some compilers require the presence of - * an include file, even if the "#ifdef"s exclude it from actual use. PTUI ! - */ diff --git a/libraries/msdos/winsock/include/filio.h b/libraries/msdos/winsock/include/filio.h deleted file mode 100644 index cead0808d2..0000000000 --- a/libraries/msdos/winsock/include/filio.h +++ /dev/null @@ -1,4 +0,0 @@ -/* - * This file is intentionally empty. Some compilers require the presence of - * an include file, even if the "#ifdef"s exclude it from actual use. PTUI ! - */ diff --git a/libraries/msdos/winsock/include/in.h b/libraries/msdos/winsock/include/in.h deleted file mode 100644 index cead0808d2..0000000000 --- a/libraries/msdos/winsock/include/in.h +++ /dev/null @@ -1,4 +0,0 @@ -/* - * This file is intentionally empty. Some compilers require the presence of - * an include file, even if the "#ifdef"s exclude it from actual use. PTUI ! - */ diff --git a/libraries/msdos/winsock/include/ioctl.h b/libraries/msdos/winsock/include/ioctl.h deleted file mode 100644 index cead0808d2..0000000000 --- a/libraries/msdos/winsock/include/ioctl.h +++ /dev/null @@ -1,4 +0,0 @@ -/* - * This file is intentionally empty. Some compilers require the presence of - * an include file, even if the "#ifdef"s exclude it from actual use. PTUI ! - */ diff --git a/libraries/msdos/winsock/include/krb/des.h b/libraries/msdos/winsock/include/krb/des.h deleted file mode 100644 index 58699c59dc..0000000000 --- a/libraries/msdos/winsock/include/krb/des.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * $Source: Q:/SRC/KRB/MIT/ORIGINAL/INCLUDE/RCS/DES.H $ - * $Author: shabby $ - * $Header: Q:/SRC/KRB/MIT/ORIGINAL/INCLUDE/RCS/DES.H 1.3 1994/08/31 07:02:28 shabby Exp $ - * - * Copyright 1987, 1988 by the Massachusetts Institute of Technology. - * - * For copying and distribution information, please see the file - * . - * - * Include file for the Data Encryption Standard library. - */ - -/* only do the whole thing once */ -#ifndef DES_DEFS -#define DES_DEFS - -#include - -typedef unsigned char des_cblock[8]; /* crypto-block size */ -/* Key schedule */ -typedef struct des_ks_struct { des_cblock _; } des_key_schedule[16]; - -#define DES_KEY_SZ (sizeof(des_cblock)) -#define DES_ENCRYPT 1 -#define DES_DECRYPT 0 - -#ifndef NCOMPAT -#define C_Block des_cblock -#define Key_schedule des_key_schedule -#define ENCRYPT DES_ENCRYPT -#define DECRYPT DES_DECRYPT -#define KEY_SZ DES_KEY_SZ -#define string_to_key des_string_to_key -#define read_pw_string des_read_pw_string -#define random_key des_random_key -#define pcbc_encrypt des_pcbc_encrypt -#define key_sched des_key_sched -#define cbc_encrypt des_cbc_encrypt -#define cbc_cksum des_cbc_cksum -#define C_Block_print des_cblock_print -#define quad_cksum des_quad_cksum -typedef struct des_ks_struct bit_64; -#endif - -#define des_cblock_print(x) des_cblock_print_file(x, stdout) - -int des_check_key_parity(des_cblock); -int des_is_weak_key(des_cblock); - -/* Function prototypes */ -int des_key_sched(des_cblock,des_key_schedule); -int des_ecb_encrypt(unsigned long*,unsigned long*,des_key_schedule,int); -int des_pcbc_encrypt(des_cblock*,des_cblock*,long,des_key_schedule, - des_cblock*,int); - -unsigned long des_cbc_cksum(des_cblock*,des_cblock*,long, - des_key_schedule,des_cblock*); - -int des_is_weak_key(des_cblock); -void des_fixup_key_parity(des_cblock); -int des_check_key_parity(des_cblock); -#endif /* DES_DEFS */ diff --git a/libraries/msdos/winsock/include/krb/krb.h b/libraries/msdos/winsock/include/krb/krb.h deleted file mode 100644 index d9e2b178a4..0000000000 --- a/libraries/msdos/winsock/include/krb/krb.h +++ /dev/null @@ -1,504 +0,0 @@ -/* - * $Source: Q:/SRC/KRB/MIT/ORIGINAL/RCS/KRB.H $ - * $Author: pbh $ - * $Header: Q:/SRC/KRB/MIT/ORIGINAL/RCS/KRB.H 1.5 1994/09/08 22:47:00 pbh Exp $ - * - * Copyright 1987, 1988 by the Massachusetts Institute of Technology. - * - * For copying and distribution information, please see the file - * . - * - * Include file for the Kerberos library. - */ - -/* Only one time, please */ -#ifndef KRB_DEFS -#define KRB_DEFS - -#include -#include - -/* Need some defs from des.h */ -#include - -/* Text describing error codes */ -#define MAX_KRB_ERRORS 256 -#ifndef WINDOWS -extern char *krb_err_txt[MAX_KRB_ERRORS]; -#else -extern char FAR *krb_err_txt[MAX_KRB_ERRORS]; -#endif - - -/* These are not defined for at least SunOS 3.3 and Ultrix 2.2 */ -#if defined(ULTRIX022) || (defined(SunOS) && SunOS < 40) -#define FD_ZERO(p) ((p)->fds_bits[0] = 0) -#define FD_SET(n, p) ((p)->fds_bits[0] |= (1 << (n))) -#define FD_ISSET(n, p) ((p)->fds_bits[0] & (1 << (n))) -#endif /* ULTRIX022 || SunOS */ - -/* General definitions */ -#define KSUCCESS 0 -#define KFAILURE 255 - -#ifdef NO_UIDGID_T -typedef unsigned short uid_t; -typedef unsigned short gid_t; -#endif /* NO_UIDGID_T */ - -/* - * Kerberos specific definitions - * - * KRBLOG is the log file for the kerberos master server. KRB_CONF is - * the configuration file where different host machines running master - * and slave servers can be found. KRB_MASTER is the name of the - * machine with the master database. The admin_server runs on this - * machine, and all changes to the db (as opposed to read-only - * requests, which can go to slaves) must go to it. KRB_HOST is the - * default machine * when looking for a kerberos slave server. Other - * possibilities are * in the KRB_CONF file. KRB_REALM is the name of - * the realm. - */ - -#ifdef notdef -this is server - only, does not belong here; -#define KRBLOG "/kerberos/kerberos.log" -are these used anyplace '?'; -#define VX_KRB_HSTFILE "/etc/krbhst" -#define PC_KRB_HSTFILE "\\kerberos\\krbhst" -#endif -#ifdef IBMPC -#define KRB_CONF "%s\\kerb\\krb.con" -#define KRB_RLM_TRANS "%s\\KERB\\krbrealm.con" -#else -#define KRB_CONF "/etc/krb.conf" -#define KRB_RLM_TRANS "/etc/krb.realms" -#endif -#define KRB_MASTER "kerberos.mit.edu" -#define KRB_REALM "ATHENA.MIT.EDU" -#define KRB_HOST KRB_MASTER - -/* The maximum sizes for aname, realm, sname, and instance +1 */ -#define ANAME_SZ 40 -#define REALM_SZ 40 -#define SNAME_SZ 40 -#define INST_SZ 40 -/* include space for '.' and '@' */ -#define MAX_K_NAME_SZ (ANAME_SZ + INST_SZ + REALM_SZ + 2) -#define KKEY_SZ 100 -#define VERSION_SZ 1 -#define MSG_TYPE_SZ 1 -#define DATE_SZ 26 /* RTI date output */ - -#define MAX_HSTNM 100 - -#ifndef DEFAULT_TKT_LIFE /* allow compile-time override */ -#define DEFAULT_TKT_LIFE 96 /* default lifetime for krb_mk_req - & co., 8 hrs */ -#endif - -/* Definition of text structure used to pass text around */ -#define MAX_KTXT_LEN 1250 - -struct ktext { - int length; /* Length of the text */ - unsigned char dat[MAX_KTXT_LEN]; /* The data itself */ - unsigned long mbz; /* zero to catch runaway strings */ -}; - -typedef struct ktext far *KTEXT; -typedef struct ktext far *KTEXT_FP; -typedef struct ktext KTEXT_ST; - - -/* Definitions for send_to_kdc */ -#define CLIENT_KRB_TIMEOUT 10 /* time between retries */ /* changed from 4, 8-14-94 pbh */ -#define CLIENT_KRB_RETRY 5 /* retry this many times */ -#define CLIENT_KRB_BUFLEN 512 /* max unfragmented packet */ - -/* Definitions for ticket file utilities */ -#define R_TKT_FIL 0 -#define W_TKT_FIL 1 - -/* Definitions for cl_get_tgt */ -#ifdef PC -#define CL_GTGT_INIT_FILE "\\kerberos\\k_in_tkts" -#else -#define CL_GTGT_INIT_FILE "/etc/k_in_tkts" -#endif /* PC */ - -/* Parameters for rd_ap_req */ -/* Maximum alloable clock skew in seconds */ -#define CLOCK_SKEW 5*60 -/* Filename for readservkey */ -#define KEYFILE "/etc/srvtab" - -/* Structure definition for rd_ap_req */ - -struct auth_dat { - unsigned char k_flags; /* Flags from ticket */ - char pname[ANAME_SZ]; /* Principal's name */ - char pinst[INST_SZ]; /* His Instance */ - char prealm[REALM_SZ]; /* His Realm */ - unsigned long checksum; /* Data checksum (opt) */ - C_Block session; /* Session Key */ - int life; /* Life of ticket */ - unsigned long time_sec; /* Time ticket issued */ - unsigned long address; /* Address in ticket */ - KTEXT_ST reply; /* Auth reply (opt) */ -}; - -typedef struct auth_dat AUTH_DAT; - -/* Structure definition for credentials returned by get_cred */ - -struct credentials { - char service[ANAME_SZ]; /* Service name */ - char instance[INST_SZ]; /* Instance */ - char realm[REALM_SZ]; /* Auth domain */ - C_Block session; /* Session key */ - int lifetime; /* Lifetime */ - int kvno; /* Key version number */ - KTEXT_ST ticket_st; /* The ticket itself */ - long issue_date; /* The issue time */ - char pname[ANAME_SZ]; /* Principal's name */ - char pinst[INST_SZ]; /* Principal's instance */ -}; - -typedef struct credentials CREDENTIALS; - -/* Structure definition for rd_private_msg and rd_safe_msg */ - -struct msg_dat { - unsigned char far *app_data; /* pointer to appl data */ - unsigned long app_length; /* length of appl data */ - unsigned long hash; /* hash to lookup replay */ - int swap; /* swap bytes? */ - long time_sec; /* msg timestamp seconds */ - unsigned char time_5ms; /* msg timestamp 5ms units */ -}; - -typedef struct msg_dat MSG_DAT; - - -/* Location of ticket file for save_cred and get_cred */ -#define TKT_FILE tkt_string() -#define TKT_ENV "KERBEROS_TICKETS" -typedef struct { - unsigned buf_size; - unsigned dummy; - unsigned eof_ptr; - int sema; /* semaphore 0 - OK, -1 - lock write, +ve lock read */ -} tkt_header; - -tkt_header far *tkt_ptr(void); - -#define KM_TKFILE 0 -#define KM_KRBMEM 1 - -#define TKT_ROOT "/tmp/tkt" /* not used in OS/2 anyway */ - -/* Error codes returned from the KDC */ -#define KDC_OK 0 /* Request OK */ -#define KDC_NAME_EXP 1 /* Principal expired */ -#define KDC_SERVICE_EXP 2 /* Service expired */ -#define KDC_AUTH_EXP 3 /* Auth expired */ -#define KDC_PKT_VER 4 /* Protocol version unknown */ -#define KDC_P_MKEY_VER 5 /* Wrong master key version */ -#define KDC_S_MKEY_VER 6 /* Wrong master key version */ -#define KDC_BYTE_ORDER 7 /* Byte order unknown */ -#define KDC_PR_UNKNOWN 8 /* Principal unknown */ -#define KDC_PR_N_UNIQUE 9 /* Principal not unique */ -#define KDC_NULL_KEY 10 /* Principal has null key */ -#define KDC_GEN_ERR 20 /* Generic error from KDC */ - - -/* Values returned by get_credentials */ -#define GC_OK 0 /* Retrieve OK */ -#define RET_OK 0 /* Retrieve OK */ -#define GC_TKFIL 21 /* Can't read ticket file */ -#define RET_TKFIL 21 /* Can't read ticket file */ -#define GC_NOTKT 22 /* Can't find ticket or TGT */ -#define RET_NOTKT 22 /* Can't find ticket or TGT */ - - -/* Values returned by mk_ap_req */ -#define MK_AP_OK 0 /* Success */ -#define MK_AP_TGTEXP 26 /* TGT Expired */ - -/* Values returned by rd_ap_req */ -#define RD_AP_OK 0 /* Request authentic */ -#define RD_AP_UNDEC 31 /* Can't decode authenticator */ -#define RD_AP_EXP 32 /* Ticket expired */ -#define RD_AP_NYV 33 /* Ticket not yet valid */ -#define RD_AP_REPEAT 34 /* Repeated request */ -#define RD_AP_NOT_US 35 /* The ticket isn't for us */ -#define RD_AP_INCON 36 /* Request is inconsistent */ -#define RD_AP_TIME 37 /* delta_t too big */ -#define RD_AP_BADD 38 /* Incorrect net address */ -#define RD_AP_VERSION 39 /* protocol version mismatch */ -#define RD_AP_MSG_TYPE 40 /* invalid msg type */ -#define RD_AP_MODIFIED 41 /* message stream modified */ -#define RD_AP_ORDER 42 /* message out of order */ -#define RD_AP_UNAUTHOR 43 /* unauthorized request */ - -/* Values returned by get_pw_tkt */ -#define GT_PW_OK 0 /* Got password changing tkt */ -#define GT_PW_NULL 51 /* Current PW is null */ -#define GT_PW_BADPW 52 /* Incorrect current password */ -#define GT_PW_PROT 53 /* Protocol Error */ -#define GT_PW_KDCERR 54 /* Error returned by KDC */ -#define GT_PW_NULLTKT 55 /* Null tkt returned by KDC */ - - -/* Values returned by send_to_kdc */ -#define SKDC_OK 0 /* Response received */ -#define SKDC_RETRY 56 /* Retry count exceeded */ -#define SKDC_CANT 57 /* Can't send request */ - -/* - * Values returned by get_intkt - * (can also return SKDC_* and KDC errors) - */ - -#define INTK_OK 0 /* Ticket obtained */ -#define INTK_W_NOTALL 61 /* Not ALL tickets returned */ -#define INTK_BADPW 62 /* Incorrect password */ -#define INTK_PROT 63 /* Protocol Error */ -#define INTK_ERR 70 /* Other error */ - -/* Values returned by get_adtkt */ -#define AD_OK 0 /* Ticket Obtained */ -#define AD_NOTGT 71 /* Don't have tgt */ - -/* Error codes returned by ticket file utilities */ -#define NO_TKT_FIL 76 /* No ticket file found */ -#define TKT_FIL_ACC 77 /* Couldn't access tkt file */ -#define TKT_FIL_LCK 78 /* Couldn't lock ticket file */ -#define TKT_FIL_FMT 79 /* Bad ticket file format */ -#define TKT_FIL_INI 80 /* tf_init not called first */ - -/* Error code returned by kparse_name */ -#define KNAME_FMT 81 /* Bad Kerberos name format */ - -/* Error code returned by krb_mk_safe */ -#define SAFE_PRIV_ERROR -1 /* syscall error */ - -/* - * macros for byte swapping; also scratch space - * u_quad 0-->7, 1-->6, 2-->5, 3-->4, 4-->3, 5-->2, 6-->1, 7-->0 - * u_long 0-->3, 1-->2, 2-->1, 3-->0 - * u_short 0-->1, 1-->0 - */ - -#define swap_u_16(x) {\ - unsigned long _krb_swap_tmp[4];\ - _swab(((char *) x) +0, ((char *) _krb_swap_tmp) +14 ,2); \ - _swab(((char *) x) +2, ((char *) _krb_swap_tmp) +12 ,2); \ - _swab(((char *) x) +4, ((char *) _krb_swap_tmp) +10 ,2); \ - _swab(((char *) x) +6, ((char *) _krb_swap_tmp) +8 ,2); \ - _swab(((char *) x) +8, ((char *) _krb_swap_tmp) +6 ,2); \ - _swab(((char *) x) +10,((char *) _krb_swap_tmp) +4 ,2); \ - _swab(((char *) x) +12,((char *) _krb_swap_tmp) +2 ,2); \ - _swab(((char *) x) +14,((char *) _krb_swap_tmp) +0 ,2); \ - bcopy((char *)_krb_swap_tmp,(char *)x,16);\ - } - -#define swap_u_12(x) {\ - unsigned long _krb_swap_tmp[4];\ - _swab(( char *) x, ((char *) _krb_swap_tmp) +10 ,2); \ - _swab(((char *) x) +2, ((char *) _krb_swap_tmp) +8 ,2); \ - _swab(((char *) x) +4, ((char *) _krb_swap_tmp) +6 ,2); \ - _swab(((char *) x) +6, ((char *) _krb_swap_tmp) +4 ,2); \ - _swab(((char *) x) +8, ((char *) _krb_swap_tmp) +2 ,2); \ - _swab(((char *) x) +10,((char *) _krb_swap_tmp) +0 ,2); \ - bcopy((char *)_krb_swap_tmp,(char *)x,12);\ - } - -#define swap_C_Block(x) {\ - unsigned long _krb_swap_tmp[4];\ - _swab(( char *) x, ((char *) _krb_swap_tmp) +6 ,2); \ - _swab(((char *) x) +2,((char *) _krb_swap_tmp) +4 ,2); \ - _swab(((char *) x) +4,((char *) _krb_swap_tmp) +2 ,2); \ - _swab(((char *) x) +6,((char *) _krb_swap_tmp) ,2); \ - bcopy((char *)_krb_swap_tmp,(char *)x,8);\ - } -#define swap_u_quad(x) {\ - unsigned long _krb_swap_tmp[4];\ - _swab(( char *) &x, ((char *) _krb_swap_tmp) +6 ,2); \ - _swab(((char *) &x) +2,((char *) _krb_swap_tmp) +4 ,2); \ - _swab(((char *) &x) +4,((char *) _krb_swap_tmp) +2 ,2); \ - _swab(((char *) &x) +6,((char *) _krb_swap_tmp) ,2); \ - bcopy((char *)_krb_swap_tmp,(char *)&x,8);\ - } - -#define swap_u_long(x) {\ - unsigned long _krb_swap_tmp[4];\ - _swab((char *) &x, ((char *) _krb_swap_tmp) +2 ,2); \ - _swab(((char *) &x) +2,((char *) _krb_swap_tmp),2); \ - x = _krb_swap_tmp[0]; \ - } - -#define swap_u_short(x) {\ - unsigned short _krb_swap_sh_tmp; \ - _swab((char *) &x, ( &_krb_swap_sh_tmp) ,2); \ - x = (unsigned short) _krb_swap_sh_tmp; \ - } - -/* Kerberos ticket flag field bit definitions */ -#define K_FLAG_ORDER 0 /* bit 0 --> lsb */ -#define K_FLAG_1 /* reserved */ -#define K_FLAG_2 /* reserved */ -#define K_FLAG_3 /* reserved */ -#define K_FLAG_4 /* reserved */ -#define K_FLAG_5 /* reserved */ -#define K_FLAG_6 /* reserved */ -#define K_FLAG_7 /* reserved, bit 7 --> msb */ - -char *tkt_string(); - -#ifdef OLDNAMES -#define krb_mk_req mk_ap_req -#define krb_rd_req rd_ap_req -#define krb_kntoln an_to_ln -#define krb_set_key set_serv_key -#define krb_get_cred get_credentials -#define krb_mk_priv mk_private_msg -#define krb_rd_priv rd_private_msg -#define krb_mk_safe mk_safe_msg -#define krb_rd_safe rd_safe_msg -#define krb_mk_err mk_appl_err_msg -#define krb_rd_err rd_appl_err_msg -#define krb_ck_repl check_replay -#define krb_get_pw_in_tkt get_in_tkt -#define krb_get_svc_in_tkt get_svc_in_tkt -#define krb_get_pw_tkt get_pw_tkt -#define krb_realmofhost krb_getrealm -#define krb_get_phost get_phost -#define krb_get_krbhst get_krbhst -#define krb_get_lrealm get_krbrlm -#endif /* OLDNAMES */ - -/* Defines for krb_sendauth and krb_recvauth */ - -#define KOPT_DONT_MK_REQ 0x00000001 /* don't call krb_mk_req */ -#define KOPT_DO_MUTUAL 0x00000002 /* do mutual auth */ - -#define KOPT_DONT_CANON 0x00000004 /* - * don't canonicalize inst as - * a hostname - */ - -#define KRB_SENDAUTH_VLEN 8 /* length for version strings */ - -#ifdef ATHENA_COMPAT -#define KOPT_DO_OLDSTYLE 0x00000008 /* use the old-style protocol */ -#endif /* ATHENA_COMPAT */ - -#ifdef WINDOWS -#include -int gettimeofday(struct timeval *tv, struct timezone *tz); -void tkt_free(tkt_header FAR* hdr); -int krb_get_tf_fullname(char *tf, char *name, char *inst, char *realm); -/* Windows prototypes */ -int FAR PASCAL krb_sendauth(long,int,KTEXT_FP,LPSTR,LPSTR,LPSTR,unsigned long, - MSG_DAT FAR *,CREDENTIALS FAR *, Key_schedule FAR *, - struct sockaddr_in FAR *,struct sockaddr_in FAR *, LPSTR); -char FAR* FAR* FAR get_krb_err_txt(void); -/* 2-22-93, pbh */ -int FAR krb_get_tf_realm(char FAR *,char FAR *); -int FAR tf_init(char FAR*,int); -int FAR tf_get_pname(char FAR*); -int FAR tf_get_pinst(char FAR*); -int FAR tf_get_cred(CREDENTIALS FAR*); -void FAR tf_close(void); -int FAR tf_save_cred(char FAR*,char FAR*,char FAR*,C_Block,int,int,KTEXT,long); -BOOL FAR k_isinst(char FAR *s); -BOOL FAR k_isrealm(char FAR *s); -BOOL FAR k_isname(char FAR *s); -int FAR set_krb_debug( int ); /* Warning, unique to Windows! */ -int FAR set_krb_ap_req_debug( int ); /* Warning, unique to Windows! */ -LPSTR FAR PASCAL get_krb_err_txt_entry( int i); /* Warning, unique to Windows! */ -int FAR PASCAL krb_mk_req(KTEXT,LPSTR,LPSTR,LPSTR,long); -LPSTR FAR PASCAL krb_getrealm( char FAR *host); -/* end 2-22-93, pbh */ - -#ifdef WINSOCK -#define bcopy(a,b,c) memcpy( (b), (a), (c) ) -#define bzero(a,b) memset( (a), 0, (b) ) -#endif /* WINSOCK */ - - -/* -#ifdef __cplusplus -int printf(char far*,...); -#else -int printf(); -#endif -*/ - -int FAR kname_parse(char FAR*,char FAR*,char FAR*,char FAR*); -int FAR krb_get_pw_in_tkt(char FAR*,char FAR*,char FAR*,char FAR*,char FAR*,int,char FAR*); -int FAR dest_tkt(void); -int FAR krb_get_lrealm(LPSTR ,int); - -int FAR krb_use_kerbmem(); -int FAR krb_check_tgt(); -int FAR krb_check_serv(char *); - -int FAR krb_get_cred(char FAR*,char FAR*,char FAR*,CREDENTIALS FAR*); -int FAR send_to_kdc(KTEXT,KTEXT,char FAR*); - -#define MIT_PWD_DLL_CLASS "MITPasswordWndDLL" - -#else /* end of WINDOWS start of DOS */ - -/* DOS prototypes */ -int krb_get_in_tkt(char *, char *, char *, char *, char *, int, int (*)(), int (*)(), char *); -long krb_mk_priv( u_char *, u_char *, u_long, Key_schedule, C_Block, - struct sockaddr_in *, struct sockaddr_in *); -char* krb_getrealm( char *host); -char* krb_realmofhost( char *host); -int krb_get_tf_realm(char*,char*); -int krb_get_tf_fullname(char*,char*,char*,char*); -int get_ad_tkt(char*,char*,char*,int); -int krb_get_cred(char*,char*,char*,CREDENTIALS*); -int krb_get_krbhst(char*,char*,int); -int krb_get_lrealm(char*,int); -char* krb_get_phost(char*); -int krb_mk_req(KTEXT,char*,char*,char*,long); -int krb_set_lifetime(int); - -#ifndef WINSOCK -int krb_net_read(int,char*,int); -int krb_net_write(int,char*,int); -#else -int krb_net_read(SOCKET,char*,int); -int krb_net_write(SOCKET,char*,int); -#endif /*winsock*/ - -KTEXT pkt_cipher(KTEXT); -int pkt_clen(KTEXT); -long krb_rd_priv(unsigned char*,unsigned long,Key_schedule,C_Block, - struct sockaddr_in*, struct sockaddr_in*,MSG_DAT*); -int save_credentials(char*,char*,char*,C_Block,int,int,KTEXT,long); -int send_to_kdc(KTEXT,KTEXT,char*); -int krb_sendauth(long,int,KTEXT,char*,char*,char*,u_long, - MSG_DAT*,CREDENTIALS*,Key_schedule, - struct sockaddr_in*,struct sockaddr_in*,char*); -int tf_init(char*,int); -int tf_get_pname(char*); -int tf_get_pinst(char*); -int tf_get_cred(CREDENTIALS*); -void tf_close(void); -int tf_save_cred(char*,char*,char*,C_Block,int,int,KTEXT,long); -int kname_parse(char*,char*,char*,char*); -int krb_get_pw_in_tkt(char*,char*,char*,char*,char*,int,char*); -int dest_tkt(void); - -int krb_use_kerbmem(); -int krb_check_tgt(); -int krb_check_serv(char *); - -#endif /* WINDOWS */ -#endif /* KRB_DEFS */ diff --git a/libraries/msdos/winsock/include/krb/mit/arpa/nameser.h b/libraries/msdos/winsock/include/krb/mit/arpa/nameser.h deleted file mode 100644 index bc6ffcb06e..0000000000 --- a/libraries/msdos/winsock/include/krb/mit/arpa/nameser.h +++ /dev/null @@ -1,257 +0,0 @@ -/* - * Copyright (c) 1983, 1989 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)nameser.h 5.25 (Berkeley) 4/3/91 - */ - -#ifndef _NAMESER_H_ -#define _NAMESER_H_ - -/* - * Define constants based on rfc883 - */ -#define PACKETSZ 512 /* maximum packet size */ -#define MAXDNAME 256 /* maximum domain name */ -#define MAXCDNAME 255 /* maximum compressed domain name */ -#define MAXLABEL 63 /* maximum length of domain label */ - /* Number of bytes of fixed size data in query structure */ -#define QFIXEDSZ 4 - /* number of bytes of fixed size data in resource record */ -#define RRFIXEDSZ 10 - -/* - * Internet nameserver port number - */ -#define NAMESERVER_PORT 53 - -/* - * Currently defined opcodes - */ -#define QUERY 0x0 /* standard query */ -#define IQUERY 0x1 /* inverse query */ -#define STATUS 0x2 /* nameserver status query */ -/*#define xxx 0x3 /* 0x3 reserved */ - /* non standard */ -#define UPDATEA 0x9 /* add resource record */ -#define UPDATED 0xa /* delete a specific resource record */ -#define UPDATEDA 0xb /* delete all nemed resource record */ -#define UPDATEM 0xc /* modify a specific resource record */ -#define UPDATEMA 0xd /* modify all named resource record */ - -#define ZONEINIT 0xe /* initial zone transfer */ -#define ZONEREF 0xf /* incremental zone referesh */ - -/* - * Currently defined response codes - */ -#define NOERROR 0 /* no error */ -#define FORMERR 1 /* format error */ -#define SERVFAIL 2 /* server failure */ -#define NXDOMAIN 3 /* non existent domain */ -#define NOTIMP 4 /* not implemented */ -#define REFUSED 5 /* query refused */ - /* non standard */ -#define NOCHANGE 0xf /* update failed to change db */ - -/* - * Type values for resources and queries - */ -#define T_A 1 /* host address */ -#define T_NS 2 /* authoritative server */ -#define T_MD 3 /* mail destination */ -#define T_MF 4 /* mail forwarder */ -#define T_CNAME 5 /* connonical name */ -#define T_SOA 6 /* start of authority zone */ -#define T_MB 7 /* mailbox domain name */ -#define T_MG 8 /* mail group member */ -#define T_MR 9 /* mail rename name */ -#define T_NULL 10 /* null resource record */ -#define T_WKS 11 /* well known service */ -#define T_PTR 12 /* domain name pointer */ -#define T_HINFO 13 /* host information */ -#define T_MINFO 14 /* mailbox information */ -#define T_MX 15 /* mail routing information */ -#define T_TXT 16 /* text strings */ - /* non standard */ -#define T_UINFO 100 /* user (finger) information */ -#define T_UID 101 /* user ID */ -#define T_GID 102 /* group ID */ -#define T_UNSPEC 103 /* Unspecified format (binary data) */ - /* Query type values which do not appear in resource records */ -#define T_AXFR 252 /* transfer zone of authority */ -#define T_MAILB 253 /* transfer mailbox records */ -#define T_MAILA 254 /* transfer mail agent records */ -#define T_ANY 255 /* wildcard match */ - -/* - * Values for class field - */ - -#define C_IN 1 /* the arpa internet */ -#define C_CHAOS 3 /* for chaos net at MIT */ -#define C_HS 4 /* for Hesiod name server at MIT */ - /* Query class values which do not appear in resource records */ -#define C_ANY 255 /* wildcard match */ - -/* - * Status return codes for T_UNSPEC conversion routines - */ -#define CONV_SUCCESS 0 -#define CONV_OVERFLOW -1 -#define CONV_BADFMT -2 -#define CONV_BADCKSUM -3 -#define CONV_BADBUFLEN -4 - -#ifndef BYTE_ORDER -#define LITTLE_ENDIAN 1234 /* least-significant byte first (vax) */ -#define BIG_ENDIAN 4321 /* most-significant byte first (IBM, net) */ -#define PDP_ENDIAN 3412 /* LSB first in word, MSW first in long (pdp) */ - -#if defined(vax) || defined(ns32000) || defined(sun386) || defined(MIPSEL) || \ - defined(BIT_ZERO_ON_RIGHT) -#define BYTE_ORDER LITTLE_ENDIAN - -#endif -#if defined(sel) || defined(pyr) || defined(mc68000) || defined(sparc) || \ - defined(is68k) || defined(tahoe) || defined(ibm032) || defined(ibm370) || \ - defined(MIPSEB) || defined (BIT_ZERO_ON_LEFT) -#define BYTE_ORDER BIG_ENDIAN -#endif -#endif /* BYTE_ORDER */ - -#ifndef BYTE_ORDER - /* you must determine what the correct bit order is for your compiler */ - #define BYTE_ORDER LITTLE_ENDIAN /* for Intel x86 series */ -#endif -/* - * Structure for query header, the order of the fields is machine and - * compiler dependent, in our case, the bits within a byte are assignd - * least significant first, while the order of transmition is most - * significant first. This requires a somewhat confusing rearrangement. - */ - -#ifdef _WINDLL -/* define UNIX types */ -#include -#endif - -typedef struct { - u_short id; /* query identification number */ -#if BYTE_ORDER == BIG_ENDIAN - /* fields in third byte */ - u_char qr:1; /* response flag */ - u_char opcode:4; /* purpose of message */ - u_char aa:1; /* authoritive answer */ - u_char tc:1; /* truncated message */ - u_char rd:1; /* recursion desired */ - /* fields in fourth byte */ - u_char ra:1; /* recursion available */ - u_char pr:1; /* primary server required (non standard) */ - u_char unused:2; /* unused bits */ - u_char rcode:4; /* response code */ -#endif -#if BYTE_ORDER == LITTLE_ENDIAN || BYTE_ORDER == PDP_ENDIAN - /* fields in third byte */ - u_char rd:1; /* recursion desired */ - u_char tc:1; /* truncated message */ - u_char aa:1; /* authoritive answer */ - u_char opcode:4; /* purpose of message */ - u_char qr:1; /* response flag */ - /* fields in fourth byte */ - u_char rcode:4; /* response code */ - u_char unused:2; /* unused bits */ - u_char pr:1; /* primary server required (non standard) */ - u_char ra:1; /* recursion available */ -#endif - /* remaining bytes */ - u_short qdcount; /* number of question entries */ - u_short ancount; /* number of answer entries */ - u_short nscount; /* number of authority entries */ - u_short arcount; /* number of resource entries */ -} HEADER; - -/* - * Defines for handling compressed domain names - */ -#define INDIR_MASK 0xc0 - -/* - * Structure for passing resource records around. - */ -struct rrec { - short r_zone; /* zone number */ - short r_class; /* class number */ - short r_type; /* type number */ - u_long r_ttl; /* time to live */ - int r_size; /* size of data area */ - char *r_data; /* pointer to data */ -}; - -extern u_short _getshort(); -extern u_long _getlong(); - -/* - * Inline versions of get/put short/long. - * Pointer is advanced; we assume that both arguments - * are lvalues and will already be in registers. - * cp MUST be u_char *. - */ -#define GETSHORT(s, cp) { \ - (s) = *(cp)++ << 8; \ - (s) |= *(cp)++; \ -} - -#define GETLONG(l, cp) { \ - (l) = *(cp)++ << 8; \ - (l) |= *(cp)++; (l) <<= 8; \ - (l) |= *(cp)++; (l) <<= 8; \ - (l) |= *(cp)++; \ -} - - -#define PUTSHORT(s, cp) { \ - *(cp)++ = (s) >> 8; \ - *(cp)++ = (s); \ -} - -/* - * Warning: PUTLONG destroys its first argument. - */ -#define PUTLONG(l, cp) { \ - (cp)[3] = l; \ - (cp)[2] = (l >>= 8); \ - (cp)[1] = (l >>= 8); \ - (cp)[0] = l >> 8; \ - (cp) += sizeof(u_long); \ -} - -#endif /* !_NAMESER_H_ */ diff --git a/libraries/msdos/winsock/include/krb/mit/conf-pc.h b/libraries/msdos/winsock/include/krb/mit/conf-pc.h deleted file mode 100644 index 169a5e27c6..0000000000 --- a/libraries/msdos/winsock/include/krb/mit/conf-pc.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * $Source: F:/DOSDEV/NEWKRB/INCLUDE/RCS/conf-pc.h $ - * $Author: pbh $ - * $Header: F:/DOSDEV/NEWKRB/INCLUDE/RCS/conf-pc.h 1.2 1994/08/16 18:43:42 pbh Exp $ - * - * Copyright 1988 by the Massachusetts Institute of Technology. - * - * For copying and distribution information, please see the file - * . - * - * Machine-type definitions: IBM PC 8086 - */ - -#include - -#ifndef IBMPC - #define IBMPC -#endif - -#if defined(__WINDOWS__) && !defined(WINDOWS) -#define WINDOWS -#endif - -#if defined(__OS2__) && !defined(OS2) -#define OS2 -#endif - -#ifndef OS2 -#define BITS16 -#define CROSSMSDOS -/* OS/2 is 32 bit!!!! */ -#else -#define BITS32 -#endif -#define LSBFIRST - -#define index(s,c) strchr(s,c) /* PC version of index */ -#define rindex(s,c) strrchr(s,c) - -typedef unsigned char u_char; -typedef unsigned long u_long; -typedef unsigned short u_short; -typedef short uid_t; - -#if !defined(WINDOWS) && !defined(DWORD) -typedef long DWORD; -#endif - -#ifdef OS2 -typedef char *LPSTR; -typedef char *LPBYTE; -typedef char *CHARPTR; -typedef char *LPINT; -typedef unsigned int WORD; - -#define far -#define near -#define FAR -#define PASCAL -#include -#define lstrcpy strcpy -#define lstrlen strlen -#define lstrcmp strcmp -#define lstrcpyn strncpy -#endif - -#if defined(OS2) || defined(WINDOWS) -#define creat _creat -#define read _read -#define write _write -#define open _open -#define close _close -#define stat(x,y) _stat(x,y) -#define putch _putch -#define getch _getch -#endif - -#ifdef WINDOWS -#include -#endif diff --git a/libraries/msdos/winsock/include/krb/mit/conf.h b/libraries/msdos/winsock/include/krb/mit/conf.h deleted file mode 100644 index 17c53458ae..0000000000 --- a/libraries/msdos/winsock/include/krb/mit/conf.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * $Source: F:/DOSDEV/NEWKRB/INCLUDE/RCS/conf.h $ - * $Author: pbh $ - * $Header: F:/DOSDEV/NEWKRB/INCLUDE/RCS/conf.h 1.2 1994/08/16 18:43:42 pbh Exp $ - * - * Copyright 1988 by the Massachusetts Institute of Technology. - * - * For copying and distribution information, please see the file - * . - * - * Configuration info for operating system, hardware description, - * language implementation, C library, etc. - * - * This file should be included in (almost) every file in the Kerberos - * sources, and probably should *not* be needed outside of those - * sources. (How do we deal with /usr/include/des.h and - * /usr/include/krb.h?) - */ - -#ifndef _CONF_H_ -#define _CONF_H_ - -#include - -#include "osconf.h" - -#ifdef SHORTNAMES -#include "names.h" -#endif - -/* - * Language implementation-specific definitions - */ - -/* special cases */ -#ifdef __HIGHC__ -/* broken implementation of ANSI C */ -#undef __STDC__ -#endif - -#if !defined(__STDC__) && !defined(__BORLANDC__) -#define const -#define volatile -#define signed -typedef char *pointer; /* pointer to generic data */ -#define PROTOTYPE(p) () -#else -typedef void *pointer; -#define PROTOTYPE(p) p -#endif - -/* Does your compiler understand "void"? */ -#ifdef notdef -#define void int -#endif - -/* - * A few checks to see that necessary definitions are included. - */ - -/* byte order */ -/* #define LSBFIRST */ -/* #define BITS16 */ -/* #define CROSSMSDOS */ - -#ifndef MSBFIRST -#ifndef LSBFIRST -#error byte order not defined -#endif -#endif - -/* machine size */ -#ifndef BITS16 -#ifndef BITS32 -#error number of bits? -#endif -#endif - -/* end of checks */ - -#endif /* _CONF_H_ */ diff --git a/libraries/msdos/winsock/include/krb/mit/hesiod.h b/libraries/msdos/winsock/include/krb/mit/hesiod.h deleted file mode 100644 index c357444bcf..0000000000 --- a/libraries/msdos/winsock/include/krb/mit/hesiod.h +++ /dev/null @@ -1,113 +0,0 @@ -/* This file contains definitions for use by the Hesiod name service and - * applications. - * - * For copying and distribution information, see the file . - * - * Original version by Steve Dyer, IBM/Project Athena. - * - * $Author: probe $ - * $Athena: hesiod.h,v 1.3 88/08/07 21:52:39 treese Locked $ - * $Header: /afs/rel-eng.athena.mit.edu/project/release/current/source/athena/athena.lib/hesiod/RCS/hesiod.h,v 1.6 90/07/20 13:09:16 probe Exp $ - * $Source: /afs/rel-eng.athena.mit.edu/project/release/current/source/athena/athena.lib/hesiod/RCS/hesiod.h,v $ - * $Log: hesiod.h,v $ - * Revision 1.6 90/07/20 13:09:16 probe - * Incorrect declaration of hes_getpwnam() - * - * Revision 1.5 90/07/11 16:49:12 probe - * Patches from - * Added missing declarations - * - * Revision 1.5 90/07/09 18:44:30 mar - * mention hes_getservbyname(), hes_getpwent() - * - * Revision 1.4 88/08/07 23:18:00 treese - * Second-public-distribution - * - * Revision 1.3 88/08/07 21:52:39 treese - * First public distribution - * - * Revision 1.2 88/06/05 19:51:32 treese - * Cleaned up for public distribution - * - */ - -/* Configuration information. */ - -#ifndef _HESIOD_ -#define _HESIOD_ - -#ifdef WINDOWS -#include -#endif - -#if !defined(WINDOWS) && !defined(_WINDOWS) -#define HESIOD_CONF "/etc/hesiod.conf" /* Configuration file. */ -#else -#define HESIOD_CONF "c:\\net\\tcp\\hesiod.cfg" -#endif - -#define DEF_RHS ".Athena.MIT.EDU" /* Defaults if HESIOD_CONF */ -#define DEF_LHS ".ns" /* file is not present. */ - -/* Error codes. */ - -#define HES_ER_UNINIT -1 /* uninitialized */ -#define HES_ER_OK 0 /* no error */ -#define HES_ER_NOTFOUND 1 /* Hesiod name not found by server */ -#define HES_ER_CONFIG 2 /* local problem (no config file?) */ -#define HES_ER_NET 3 /* network problem */ - -/* Declaration of routines */ - -#ifdef __cplusplus -extern "C" { -#endif - -#if !defined(WINDOWS) && !defined(_WINDOWS) -char *hes_to_bind(); -char **hes_resolve(); -int hes_error(); -#else -#ifndef _WSHELPER_ -LPSTR FAR PASCAL hes_to_bind(LPSTR HesiodName, LPSTR HesiodNameType); -LPSTR * FAR PASCAL hes_resolve(LPSTR HesiodName, LPSTR HesiodNameType); -int FAR PASCAL hes_error(void); -#endif -#endif - - -/* For use in getting post-office information. */ - -#if !defined(WINDOWS) && !defined(_WINDOWS) -struct hes_postoffice { - char *po_type; - char *po_host; - char *po_name; -}; -#else -struct hes_postoffice { - LPSTR po_type; - LPSTR po_host; - LPSTR po_name; -}; -#endif - -/* Other routines */ - -#if !defined(WINDOWS) && !defined(_WINDOWS) -struct hes_postoffice *hes_getmailhost(); -struct servent *hes_getservbyname(); -struct passwd *hes_getpwnam(); -struct passwd *hes_getpwuid(); -#else -struct hes_postoffice FAR * WINAPI hes_getmailhost(LPSTR user); -struct servent FAR * WINAPI hes_getservbyname(LPSTR name, LPSTR proto); -struct passwd FAR * WINAPI hes_getpwnam(LPSTR nam); -struct passwd FAR * WINAPI hes_getpwuid(int uid); -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* _HESIOD_ */ diff --git a/libraries/msdos/winsock/include/krb/mit/lsh_pwd.h b/libraries/msdos/winsock/include/krb/mit/lsh_pwd.h deleted file mode 100644 index c51a2965e6..0000000000 --- a/libraries/msdos/winsock/include/krb/mit/lsh_pwd.h +++ /dev/null @@ -1,56 +0,0 @@ -/* LSH_PWD.H this is the include file for the LSH_PWD.C */ - -/* Included from krb.h - CRS 940805 */ - -#ifndef __LSH_PWD__ -#define __LSH_PWD__ - -// Definition of the info structure that is passed to tell the dialog box what state it -// should be in. - -#include - -typedef struct { - int dlgtype; -#define DLGTYPE_PASSWD 0 -#define DLGTYPE_CHPASSWD 1 - int dlgstatemax; // I am not sure what this is yet. STUFF TO DO! - LPSTR title; // The title on the Dialog box - for Renewing or Initializing. - LPSTR principal; -} LSH_DLGINFO, FAR *LPLSH_DLGINFO; - - -// Some defines swiped from leash.h -// These are necessary but they must be kept sync'ed with leash.h -#define HELPFILE "kerberos.hlp" -#define PASSWORDCHAR '#' - -#define DLGHT(ht) (HIWORD(GetDialogBaseUnits())*(ht)/8) -#define DLGWD(wd) (LOWORD(GetDialogBaseUnits())*(wd)/4) - -// external variables -#ifdef PDLL -long lsh_errno; -char *err_context; /* error context */ -char FAR *kadm_info; /* to get info from the kadm* files */ -long dlgu; /* dialog units */ -#ifdef WINSOCK -HINSTANCE hinstWinSock = NULL; -#endif // WINSOCK -#endif // PDLL - -// local macros stolen from leash.h -#ifndef MAKEWORD -#define MAKEWORD(low, high) ((WORD)(((BYTE)(low)) | (((UINT)((BYTE)(high))) << 8))) -#endif /*MAKEWORD*/ - - -// Function Prototypes. -int FAR PASCAL _export Lsh_Enter_Password_Dialog(HWND hParent, LPLSH_DLGINFO lpdlginfo); -int FAR PASCAL _export Lsh_Change_Password_Dialog(HWND hParent, LPLSH_DLGINFO lpdlginfo); -int lsh_com_err_proc (LPSTR whoami, long code, LPSTR fmt, va_list args); -int _export DoNiftyErrorReport(long errnum, LPSTR what); -LONG FAR PASCAL _export MITPwdWinProcDLL(HWND hWnd, WORD message, WORD wParam, LONG lParam); -BOOL FAR PASCAL _export PasswordProcDLL(HWND hDialog, WORD message, WORD wParam, LONG lParam); -LONG FAR PASCAL _export lsh_get_lsh_errno( LONG FAR *err_val); -#endif __LSH_PWD__ diff --git a/libraries/msdos/winsock/include/krb/mit/mit_copy.h b/libraries/msdos/winsock/include/krb/mit/mit_copy.h deleted file mode 100644 index b47de92f81..0000000000 --- a/libraries/msdos/winsock/include/krb/mit/mit_copy.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - Copyright (C) 1989 by the Massachusetts Institute of Technology - - Export of this software from the United States of America is assumed - to require a specific license from the United States Government. - It is the responsibility of any person or organization contemplating - export to obtain such a license before exporting. - -WITHIN THAT CONSTRAINT, permission to use, copy, modify, and -distribute this software and its documentation for any purpose and -without fee is hereby granted, provided that the above copyright -notice appear in all copies and that both that copyright notice and -this permission notice appear in supporting documentation, and that -the name of M.I.T. not be used in advertising or publicity pertaining -to distribution of the software without specific, written prior -permission. M.I.T. makes no representations about the suitability of -this software for any purpose. It is provided "as is" without express -or implied warranty. - - */ - - diff --git a/libraries/msdos/winsock/include/krb/mit/osconf.h b/libraries/msdos/winsock/include/krb/mit/osconf.h deleted file mode 100644 index 644b0e3139..0000000000 --- a/libraries/msdos/winsock/include/krb/mit/osconf.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * $Source: F:/DOSDEV/NEWKRB/INCLUDE/RCS/osconf.h $ - * $Author: pbh $ - * $Header: F:/DOSDEV/NEWKRB/INCLUDE/RCS/osconf.h 1.2 1994/08/16 18:43:42 pbh Exp $ - * - * Copyright 1988 by the Massachusetts Institute of Technology. - * - * For copying and distribution information, please see the file - * . - * - * Athena configuration. - */ - -#include - -#ifndef _OSCONF_H_ -#define _OSCONF_H_ - -#if defined(IBMPC) && !defined(PC) -#define PC -#endif - -#ifdef tahoe -#include "conf-bsdtahoe.h" -#else /* !tahoe */ -#ifdef vax -#include "conf-bsdvax.h" -#else /* !vax */ -#if defined(mips) && defined(ultrix) -#include "conf-ultmips2.h" -#else /* !Ultrix MIPS-2 */ -#ifdef ibm032 -#include "conf-bsdibm032.h" -#else /* !ibm032 */ -#ifdef apollo -#include "conf-bsdapollo.h" -#else /* !apollo */ -#ifdef sun -#ifdef sparc -#include "conf-bsdsparc.h" -#else /* sun but not sparc */ -#ifdef i386 -#include "conf-bsd386i.h" -#else /* sun but not (sparc or 386i) */ -#include "conf-bsdm68k.h" -#endif /* i386 */ -#endif /* sparc */ -#else /* !sun */ -#ifdef pyr -#include "conf-pyr.h" -#else -#if defined(PC) || defined(__MSDOS__) || defined(OS2) -#include "conf-pc.h" -#endif /* PC */ -#endif /* pyr */ -#endif /* sun */ -#endif /* apollo */ -#endif /* ibm032 */ -#endif /* mips */ -#endif /* vax */ -#endif /* tahoe */ - -#endif /* _OSCONF_H_ */ diff --git a/libraries/msdos/winsock/include/krb/mit/resolv.h b/libraries/msdos/winsock/include/krb/mit/resolv.h deleted file mode 100644 index ebe0a281d8..0000000000 --- a/libraries/msdos/winsock/include/krb/mit/resolv.h +++ /dev/null @@ -1,144 +0,0 @@ -/* - WSHelper DNS/Hesiod Library for WINSOCK - resolv.h -*/ - -/* - * Copyright (c) 1983, 1987, 1989 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)resolv.h 5.15 (Berkeley) 4/3/91 - */ - -#ifndef _RESOLV_H_ -#define _RESOLV_H_ - -/* - * Resolver configuration file. - * Normally not present, but may contain the address of the - * inital name server(s) to query and the domain search list. - */ - -#ifndef _PATH_RESCONF -#if !defined(WINDOWS) && !defined(_WINDOWS) -#define _PATH_RESCONF "/etc/resolv.conf" -#else -#define _PATH_RESCONF "c:\\net\\tcp\\resolv.cfg" -#endif -#endif - -#ifndef MAXDNAME -#include -#endif - -/* - * Global defines and variables for resolver stub. - */ -#define MAXNS 3 /* max # name servers we'll track */ -#define MAXDFLSRCH 3 /* # default domain levels to try */ -#define MAXDNSRCH 6 /* max # domains in search path */ -#define LOCALDOMAINPARTS 2 /* min levels in name that is "local" */ - -#define RES_TIMEOUT 5 /* min. seconds between retries */ - -// new -#define MAXMXRECS 8 - -struct mxent { - int numrecs; - u_short pref[MAXMXRECS]; - char FAR * FAR * hostname; -}; - -struct state { - int retrans; /* retransmition time interval */ - int retry; /* number of times to retransmit */ - long options; /* option flags - see below. */ - int nscount; /* number of name servers */ - struct sockaddr_in nsaddr_list[MAXNS]; /* address of name server */ -#define nsaddr nsaddr_list[0] /* for backward compatibility */ - u_short id; /* current packet id */ - char defdname[MAXDNAME]; /* default domain */ - char *dnsrch[MAXDNSRCH+1]; /* components of domain to search */ -}; - -/* - * Resolver options - */ -#define RES_INIT 0x0001 /* address initialized */ -#define RES_DEBUG 0x0002 /* print debug messages */ -#define RES_AAONLY 0x0004 /* authoritative answers only */ -#define RES_USEVC 0x0008 /* use virtual circuit */ -#define RES_PRIMARY 0x0010 /* query primary server only */ -#define RES_IGNTC 0x0020 /* ignore trucation errors */ -#define RES_RECURSE 0x0040 /* recursion desired */ -#define RES_DEFNAMES 0x0080 /* use default domain name */ -#define RES_STAYOPEN 0x0100 /* Keep TCP socket open */ -#define RES_DNSRCH 0x0200 /* search up local domain tree */ - -#define RES_DEFAULT (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH) - -extern struct state _res; - -#include - -/* Private routines shared between libc/net, named, nslookup and others. */ -#define dn_skipname __dn_skipname -#define fp_query __fp_query -#define hostalias __hostalias -#define putlong __putlong -#define putshort __putshort -#define p_class __p_class -#define p_time __p_time -#define p_type __p_type - -#if !defined(WINDOWS) && !defined(_WINDOWS) -__BEGIN_DECLS -int __dn_skipname __P((const u_char *, const u_char *)); -void __fp_query __P((char *, FILE *)); -char *__hostalias __P((const char *)); -void __putlong __P((u_long, u_char *)); -void __putshort __P((u_short, u_char *)); -char *__p_class __P((int)); -char *__p_time __P((u_long)); -char *__p_type __P((int)); - -int dn_comp __P((const u_char *, u_char *, int, u_char **, u_char **)); -int dn_expand __P((const u_char *, const u_char *, const u_char *, - u_char *, int)); -int res_init __P((void)); -int res_mkquery __P((int, const char *, int, int, const char *, int, - const struct rrec *, char *, int)); -int res_send __P((const char *, int, char *, int)); -__END_DECLS -#endif - -#endif /* !_RESOLV_H_ */ diff --git a/libraries/msdos/winsock/include/krb/mit/wshelper.h b/libraries/msdos/winsock/include/krb/mit/wshelper.h deleted file mode 100644 index 971c85a490..0000000000 --- a/libraries/msdos/winsock/include/krb/mit/wshelper.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - WSHelper DNS/Hesiod Library for WINSOCK - wshelper.h -*/ - -#ifndef _WSHELPER_ -#define _WSHELPER_ - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -int FAR PASCAL res_mkquery(int op, char FAR *dname, int qclass, int type, - char FAR *data, int datalen, struct rrec FAR *newrr, - char FAR *buf, int buflen); - -int FAR PASCAL res_send(char FAR *msg, int msglen, char FAR *answer, int anslen); - -int FAR PASCAL res_init(); - -int FAR PASCAL dn_comp(char FAR *exp_dn, char FAR *comp_dn, int length, - char FAR * FAR *dnptrs, char FAR * FAR *lastdnptr); - -int FAR PASCAL dn_expand(char FAR *msg, char FAR *eomorig, char FAR *comp_dn, - char FAR *exp_dn, int length); - -struct hostent FAR* FAR PASCAL rgethostbyname(char FAR *name); - -struct hostent FAR* FAR PASCAL rgethostbyaddr(char FAR *addr, int len, int type); - -LPSTR FAR PASCAL hes_to_bind(char FAR *HesiodName, char FAR *HesiodNameType); - -LPSTR * FAR PASCAL hes_resolve(char FAR *HesiodName, char FAR *HesiodNameType); - -int FAR PASCAL hes_error(void); - -void FAR PASCAL res_setopts(long opts); - -long FAR PASCAL res_getopts(void); - -unsigned long FAR PASCAL inet_aton(register const char *cp, struct in_addr *addr); - -LPSTR FAR PASCAL gethinfobyname(LPSTR name); - -LPSTR FAR PASCAL getmxbyname(LPSTR name); - -LPSTR FAR PASCAL getrecordbyname(LPSTR name, int rectype); - -DWORD FAR PASCAL rrhost( LPSTR lpHost ); - -struct servent FAR * FAR PASCAL rgetservbyname(LPSTR name, LPSTR proto); - -#ifdef __cplusplus -} -#endif - -#endif /* _WSHELPER_ */ - diff --git a/libraries/msdos/winsock/include/net/_sys/filio.h b/libraries/msdos/winsock/include/net/_sys/filio.h deleted file mode 100644 index f352fdd480..0000000000 --- a/libraries/msdos/winsock/include/net/_sys/filio.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef _SOCKET -#include -#endif - diff --git a/libraries/msdos/winsock/include/net/_sys/ioctl.h b/libraries/msdos/winsock/include/net/_sys/ioctl.h deleted file mode 100644 index f352fdd480..0000000000 --- a/libraries/msdos/winsock/include/net/_sys/ioctl.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef _SOCKET -#include -#endif - diff --git a/libraries/msdos/winsock/include/net/netdb.h b/libraries/msdos/winsock/include/net/netdb.h deleted file mode 100644 index f352fdd480..0000000000 --- a/libraries/msdos/winsock/include/net/netdb.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef _SOCKET -#include -#endif - diff --git a/libraries/msdos/winsock/include/param.h b/libraries/msdos/winsock/include/param.h deleted file mode 100644 index cead0808d2..0000000000 --- a/libraries/msdos/winsock/include/param.h +++ /dev/null @@ -1,4 +0,0 @@ -/* - * This file is intentionally empty. Some compilers require the presence of - * an include file, even if the "#ifdef"s exclude it from actual use. PTUI ! - */ diff --git a/libraries/msdos/winsock/include/select.h b/libraries/msdos/winsock/include/select.h deleted file mode 100644 index cead0808d2..0000000000 --- a/libraries/msdos/winsock/include/select.h +++ /dev/null @@ -1,4 +0,0 @@ -/* - * This file is intentionally empty. Some compilers require the presence of - * an include file, even if the "#ifdef"s exclude it from actual use. PTUI ! - */ diff --git a/libraries/msdos/winsock/include/socket.h b/libraries/msdos/winsock/include/socket.h deleted file mode 100644 index cead0808d2..0000000000 --- a/libraries/msdos/winsock/include/socket.h +++ /dev/null @@ -1,4 +0,0 @@ -/* - * This file is intentionally empty. Some compilers require the presence of - * an include file, even if the "#ifdef"s exclude it from actual use. PTUI ! - */ diff --git a/libraries/msdos/winsock/include/time.h b/libraries/msdos/winsock/include/time.h deleted file mode 100644 index cead0808d2..0000000000 --- a/libraries/msdos/winsock/include/time.h +++ /dev/null @@ -1,4 +0,0 @@ -/* - * This file is intentionally empty. Some compilers require the presence of - * an include file, even if the "#ifdef"s exclude it from actual use. PTUI ! - */ diff --git a/libraries/msdos/winsock/include/wsa.h b/libraries/msdos/winsock/include/wsa.h deleted file mode 100644 index 808697c57c..0000000000 --- a/libraries/msdos/winsock/include/wsa.h +++ /dev/null @@ -1,132 +0,0 @@ -/* wsa.h */ -/* - * Copyright (c) 1993 Regents of the University of Michigan. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that this notice is preserved and that due credit is given - * to the University of Michigan at Ann Arbor. The name of the University - * may not be used to endorse or promote products derived from this - * software without specific prior written permission. This software - * is provided ``as is'' without express or implied warranty. - */ - -#ifndef _MSDOS_H -#define _MSDOS_H - -/* - * NOTE: This file should be included via ldap.h. Many symbols are - * defined here that are needed BEFORE anything else is included. - * Be careful !!! - */ -/* - * The following are defined within the Integrated Development Environment - * of Microsoft's Visual C++ Compiler (v1.52c) - * (Options/Project/Compiler/Preprocessor/Symbols and Macros to Define) - * But there's a (buffer length) limit to how long this list can be, so - * I'm doing the rest here in msdos.h - * WINSOCK, DOS, NEEDPROTOS, NO_USERINTERFACE - */ -/* - * MIT's krb.h doesn't use the symbols provided by Microsoft. - * It needs __MSDOS__ and WINDOWS. Normally _WINDOWS is provided by MS - * but it's based on having the prolog/epilog optimization switches set - * in a way that we don't set them. So define it manually. - * - * kbind.c needs __MSDOS__ for krb.h to include osconf.h - * which includes conf-pc.h which defines byte order and such - */ -#define __MSDOS__ -/* - * conf-pc.h wants WINDOWS rather than _WINDOWS which Microsoft provides - */ -#define WINDOWS - -/* - * Where two of the config files live in the windows environment - * There are two others also; ldfriend.cfg, & srchpref.cfg - * These names are different that the unix names due to 8.3 rule - */ -#define FILTERFILE "ldfilter.cfg" -#define TEMPLATEFILE "disptmpl.cfg" -/* - * These are not automatically defined for us even though we're a DLL. They - * are triggered by prolog/epilog configuration options that we don't use. - * But be careful not to redefine them for other apps that include this file. - */ -#ifndef _WINDLL -/* - * Needed by wshelper.h - */ -#define _WINDLL -#endif - -#ifndef _WINDOWS -/* - * Needed by authlib.h via kerberos.c via AUTHMAN - */ -#define _WINDOWS 1 -#endif - -/* - * KERBEROS must be defined as a preprocessor symbol in the compiler. - * It's too late to define it in this file. - */ - -/* - * AUTHMAN - Use Authlib.dll as a higher level interface to krbv4win.dll - * (kerberos). If defined, get_kerberosv4_credentials in kerberos.c is - * used and authlib.dll (and krbv4win.dll) are dynamically loaded and used. - * If AUTHMAN is not defined, the get_kerberosv4_credentials in - * kbind.c works just fine, but requires the presence of krbv4win.dll at - * load time. - */ -/* don't want to be dependent on authman - * #define AUTHMAN - */ - -/* - * define WSHELPER if you want wsockip.c to use rgethostbyaddr() (in - * WSHELPER.DLL) rather than gethostbyaddr(). You might want this if your - * gethostbyaddr() returns the WRONG host name and you want to use - * kerberos authentication (need host name to form service ticket - * request). Most won't want kerberos, and of those, there might actually - * be some vendors who really do the lookup rather than use cached info - * from gethostbyname() calls. - */ -#define WSHELPER -/* - * The new slapd stuff - */ -#define LDAP_REFERRALS -/* - * LDAP character string translation routines - * I compiled and tested these and they seemed to work. - * The thing to test with is: - * cn=Charset Test Entry, ou=SWITCHdirectory, o=SWITCH, c=CH - * - * I'm disabling it for release. -#define STR_TRANSLATION -#define LDAP_CHARSET_8859 88591 -#define LDAP_DEFAULT_CHARSET LDAP_CHARSET_8859 - */ - - - -#define LDAP_DEBUG -#include - - -#include -#include -#ifndef _WIN32 -#define memcpy( a, b, n ) _fmemcpy( a, b, n ) -#define strcpy( a, b ) _fstrcpy( a, b ) -#define strchr( a, c ) _fstrchr( a, c ) -#endif /* !_WIN32 */ -#define strcasecmp(a,b) stricmp(a,b) -#define strncasecmp(a,b,len) strnicmp(a,b,len) - -#endif /* _MSDOS_H */ - - diff --git a/libraries/msdos/winsock/include/wsa/errno.c b/libraries/msdos/winsock/include/wsa/errno.c deleted file mode 100644 index cb49c5fe62..0000000000 --- a/libraries/msdos/winsock/include/wsa/errno.c +++ /dev/null @@ -1,21 +0,0 @@ -#include - -/* Copies string corresponding to the error code provided */ -/* into buf, maximum length len. Returns length actually */ -/* copied to buffer, or zero if error code is unknown. */ -/* String resources should be present for each error code */ -/* using the value of the code as the string ID (except for */ -/* error = 0, which is mapped to WSABASEERR to keep it with */ -/* the others). The DLL is free to use any string IDs that */ -/* are less than WSABASEERR for its own use. The LibMain */ -/* procedure of the DLL is presumed to have saved its */ -/* HINSTANCE in the global variable hInst. */ - -int PASCAL FAR WSAsperror (int errorcode, char far * buf, int len) -{ - if (errorcode == 0) - errorcode = WSABASEERR; - if (errorcode < WSABASEERR) - return 0; - return LoadString(hInst,errorcode,buf,len); -} diff --git a/libraries/msdos/winsock/include/wsa/errno.rc b/libraries/msdos/winsock/include/wsa/errno.rc deleted file mode 100644 index 1252957877..0000000000 --- a/libraries/msdos/winsock/include/wsa/errno.rc +++ /dev/null @@ -1,57 +0,0 @@ -#include - -STRINGTABLE -BEGIN - WSABASEERR, "[0] No Error" - WSAEINTR, "[10004] Interrupted system call" - WSAEBADF, "[10009] Bad file number" - WSAEACCES, "[10013] Permission denied" - WSAEFAULT, "[10014] Bad address" - WSAEINVAL, "[10022] Invalid argument" - WSAEMFILE, "[10024] Too many open files" - WSAEWOULDBLOCK, "[10035] Operation would block" - WSAEINPROGRESS, "[10036] Operation now in progress" - WSAEALREADY, "[10037] Operation already in progress" - WSAENOTSOCK, "[10038] Socket operation on non-socket" - WSAEDESTADDRREQ, "[10039] Destination address required" - WSAEMSGSIZE, "[10040] Message too long" - WSAEPROTOTYPE, "[10041] Protocol wrong type for socket" - WSAENOPROTOOPT, "[10042] Bad protocol option" - WSAEPROTONOSUPPORT, "[10043] Protocol not supported" - WSAESOCKTNOSUPPORT, "[10044] Socket type not supported" - WSAEOPNOTSUPP, "[10045] Operation not supported on socket" - WSAEPFNOSUPPORT, "[10046] Protocol family not supported" - WSAEAFNOSUPPORT, "[10047] Address family not supported by protocol family" - WSAEADDRINUSE, "[10048] Address already in use" - WSAEADDRNOTAVAIL, "[10049] Can't assign requested address" - WSAENETDOWN, "[10050] Network is down" - WSAENETUNREACH, "[10051] Network is unreachable" - WSAENETRESET, "[10052] Net dropped connection or reset" - WSAECONNABORTED, "[10053] Software caused connection abort" - WSAECONNRESET, "[10054] Connection reset by peer" - WSAENOBUFS, "[10055] No buffer space available" - WSAEISCONN, "[10056] Socket is already connected" - WSAENOTCONN, "[10057] Socket is not connected" - WSAESHUTDOWN, "[10058] Can't send after socket shutdown" - WSAETOOMANYREFS, "[10059] Too many references, can't splice" - WSAETIMEDOUT, "[10060] Connection timed out" - WSAECONNREFUSED, "[10061] Connection refused" - WSAELOOP, "[10062] Too many levels of symbolic links" - WSAENAMETOOLONG, "[10063] File name too long" - WSAEHOSTDOWN, "[10064] Host is down" - WSAEHOSTUNREACH, "[10065] No Route to Host" - WSAENOTEMPTY, "[10066] Directory not empty" - WSAEPROCLIM, "[10067] Too many processes" - WSAEUSERS, "[10068] Too many users" - WSAEDQUOT, "[10069] Disc Quota Exceeded" - WSAESTALE, "[10070] Stale NFS file handle" - WSAEREMOTE, "[10071] Too many levels of remote in path" - WSASYSNOTREADY, "[10091] Network SubSystem is unavailable" - WSAVERNOTSUPPORTED, "[10092] WINSOCK DLL Version out of range" - WSANOTINITIALIZED, "[10093] Successful WSASTARTUP not yet performed" - WSAHOST_NOT_FOUND, "[11001] Host not found" - WSATRY_AGAIN, "[11002] Non-Authoritative Host not found" - WSANO_RECOVERY, "[11003] Non-Recoverable errors: FORMERR, REFUSED, NOTIMP" - WSANO_DATA, "[11004] Valid name, no data record of requested -type" -END diff --git a/libraries/msdos/winsock/include/wsa/winsock.def b/libraries/msdos/winsock/include/wsa/winsock.def deleted file mode 100644 index 0aa0953284..0000000000 --- a/libraries/msdos/winsock/include/wsa/winsock.def +++ /dev/null @@ -1,84 +0,0 @@ -; -; File: winsock.def -; System: MS-Windows 3.x -; Summary: Module definition file for Windows Sockets DLL. -; - -LIBRARY WINSOCK ; Application's module name - -DESCRIPTION 'BSD Socket API for Windows' - -EXETYPE WINDOWS ; required for all windows applications - -STUB 'WINSTUB.EXE' ; generates error message if application - ; is run without Windows - -;CODE can be FIXED in memory because of potential upcalls -CODE PRELOAD FIXED - -;DATA must be SINGLE and at a FIXED location since this is a DLL -DATA PRELOAD FIXED SINGLE - -HEAPSIZE 1024 -STACKSIZE 16384 - -; All functions that will be called by any Windows routine -; must be exported. Any additional exports beyond those defined -; here must have ordinal numbers 1000 or above. - -EXPORTS - accept @1 - bind @2 - closesocket @3 - connect @4 - getpeername @5 - getsockname @6 - getsockopt @7 - htonl @8 - htons @9 - inet_addr @10 - inet_ntoa @11 - ioctlsocket @12 - listen @13 - ntohl @14 - ntohs @15 - recv @16 - recvfrom @17 - select @18 - send @19 - sendto @20 - setsockopt @21 - shutdown @22 - socket @23 - - gethostbyaddr @51 - gethostbyname @52 - getprotobyname @53 - getprotobynumber @54 - getservbyname @55 - getservbyport @56 - gethostname @57 - - WSAAsyncSelect @101 - WSAAsyncGetHostByAddr @102 - WSAAsyncGetHostByName @103 - WSAAsyncGetProtoByNumber @104 - WSAAsyncGetProtoByName @105 - WSAAsyncGetServByPort @106 - WSAAsyncGetServByName @107 - WSACancelAsyncRequest @108 - WSASetBlockingHook @109 - WSAUnhookBlockingHook @110 - WSAGetLastError @111 - WSASetLastError @112 - WSACancelBlockingCall @113 - WSAIsBlocking @114 - WSAStartup @115 - WSACleanup @116 - - __WSAFDIsSet @151 - - WEP @500 RESIDENTNAME - -;eof - diff --git a/libraries/msdos/winsock/include/wsa/winsock.h b/libraries/msdos/winsock/include/wsa/winsock.h deleted file mode 100644 index c73fe4ca16..0000000000 --- a/libraries/msdos/winsock/include/wsa/winsock.h +++ /dev/null @@ -1,906 +0,0 @@ -/* WINSOCK.H--definitions to be used with the WINSOCK.DLL - * - * This header file corresponds to version 1.1 of the Windows Sockets specification. - * - * This file includes parts which are Copyright (c) 1982-1986 Regents - * of the University of California. All rights reserved. The - * Berkeley Software License Agreement specifies the terms and - * conditions for redistribution. - * - * Change log: - * - * Fri Apr 23 16:31:01 1993 Mark Towfiq (towfiq@Microdyne.COM) - * New version from David Treadwell which adds extern "C" around - * __WSAFDIsSet() and removes "const" from buf param of - * WSAAsyncGetHostByAddr(). Added change log. - * - * Sat May 15 10:55:00 1993 David Treadwell (davidtr@microsoft.com) - * Fix the IN_CLASSC macro to account for class-D multicasts. - * Add AF_IPX == AF_NS. - * - */ - -#ifndef _WINSOCKAPI_ -#define _WINSOCKAPI_ - -/* - * Pull in WINDOWS.H if necessary - */ -#ifndef _INC_WINDOWS -#include -#endif /* _INC_WINDOWS */ - -/* - * Basic system type definitions, taken from the BSD file sys/types.h. - */ -typedef unsigned char u_char; -typedef unsigned short u_short; -typedef unsigned int u_int; -typedef unsigned long u_long; - -/* - * The new type to be used in all - * instances which refer to sockets. - */ -typedef u_int SOCKET; - -/* - * Select uses arrays of SOCKETs. These macros manipulate such - * arrays. FD_SETSIZE may be defined by the user before including - * this file, but the default here should be >= 64. - * - * CAVEAT IMPLEMENTOR and USER: THESE MACROS AND TYPES MUST BE - * INCLUDED IN WINSOCK.H EXACTLY AS SHOWN HERE. - */ -#ifndef FD_SETSIZE -#define FD_SETSIZE 64 -#endif /* FD_SETSIZE */ - -typedef struct fd_set { - u_int fd_count; /* how many are SET? */ - SOCKET fd_array[FD_SETSIZE]; /* an array of SOCKETs */ -} fd_set; - -#ifdef __cplusplus -extern "C" { -#endif - -extern int PASCAL FAR __WSAFDIsSet(SOCKET, fd_set FAR *); - -#ifdef __cplusplus -} -#endif - - -#define FD_CLR(fd, set) do { \ - u_int __i; \ - for (__i = 0; __i < ((fd_set FAR *)(set))->fd_count ; __i++) { \ - if (((fd_set FAR *)(set))->fd_array[__i] == fd) { \ - while (__i < ((fd_set FAR *)(set))->fd_count-1) { \ - ((fd_set FAR *)(set))->fd_array[__i] = \ - ((fd_set FAR *)(set))->fd_array[__i+1]; \ - __i++; \ - } \ - ((fd_set FAR *)(set))->fd_count--; \ - break; \ - } \ - } \ -} while(0) - -#define FD_SET(fd, set) do { \ - if (((fd_set FAR *)(set))->fd_count < FD_SETSIZE) \ - ((fd_set FAR *)(set))->fd_array[((fd_set FAR *)(set))->fd_count++]=(fd);\ -} while(0) - -#define FD_ZERO(set) (((fd_set FAR *)(set))->fd_count=0) - -#define FD_ISSET(fd, set) __WSAFDIsSet((SOCKET)(fd), (fd_set FAR *)(set)) - -/* - * Structure used in select() call, taken from the BSD file sys/time.h. - */ -struct timeval { - long tv_sec; /* seconds */ - long tv_usec; /* and microseconds */ -}; - -/* - * Operations on timevals. - * - * NB: timercmp does not work for >= or <=. - */ -#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) -#define timercmp(tvp, uvp, cmp) \ - ((tvp)->tv_sec cmp (uvp)->tv_sec || \ - (tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec) -#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 - -/* - * Commands for ioctlsocket(), taken from the BSD file fcntl.h. - * - * - * Ioctl's have the command encoded in the lower word, - * and the size of any in or out parameters in the upper - * word. The high 2 bits of the upper word are used - * to encode the in/out status of the parameter; for now - * we restrict parameters to at most 128 bytes. - */ -#define IOCPARM_MASK 0x7f /* parameters must be < 128 bytes */ -#define IOC_VOID 0x20000000 /* no parameters */ -#define IOC_OUT 0x40000000 /* copy out parameters */ -#define IOC_IN 0x80000000 /* copy in parameters */ -#define IOC_INOUT (IOC_IN|IOC_OUT) - /* 0x20000000 distinguishes new & - old ioctl's */ -#define _IO(x,y) (IOC_VOID|((x)<<8)|(y)) - -#define _IOR(x,y,t) (IOC_OUT|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y)) - -#define _IOW(x,y,t) (IOC_IN|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y)) - -#define FIONREAD _IOR('f', 127, u_long) /* get # bytes to read */ -#define FIONBIO _IOW('f', 126, u_long) /* set/clear non-blocking i/o */ -#define FIOASYNC _IOW('f', 125, u_long) /* set/clear async i/o */ - -/* Socket I/O Controls */ -#define SIOCSHIWAT _IOW('s', 0, u_long) /* set high watermark */ -#define SIOCGHIWAT _IOR('s', 1, u_long) /* get high watermark */ -#define SIOCSLOWAT _IOW('s', 2, u_long) /* set low watermark */ -#define SIOCGLOWAT _IOR('s', 3, u_long) /* get low watermark */ -#define SIOCATMARK _IOR('s', 7, u_long) /* at oob mark? */ - -/* - * Structures returned by network data base library, taken from the - * BSD file netdb.h. All addresses are supplied in host order, and - * returned in network order (suitable for use in system calls). - */ - -struct hostent { - char FAR * h_name; /* official name of host */ - char FAR * FAR * h_aliases; /* alias list */ - short h_addrtype; /* host address type */ - short h_length; /* length of address */ - char FAR * FAR * h_addr_list; /* list of addresses */ -#define h_addr h_addr_list[0] /* address, for backward compat */ -}; - -/* - * It is assumed here that a network number - * fits in 32 bits. - */ -struct netent { - char FAR * n_name; /* official name of net */ - char FAR * FAR * n_aliases; /* alias list */ - short n_addrtype; /* net address type */ - u_long n_net; /* network # */ -}; - -struct servent { - char FAR * s_name; /* official service name */ - char FAR * FAR * s_aliases; /* alias list */ - short s_port; /* port # */ - char FAR * s_proto; /* protocol to use */ -}; - -struct protoent { - char FAR * p_name; /* official protocol name */ - char FAR * FAR * p_aliases; /* alias list */ - short p_proto; /* protocol # */ -}; - -/* - * Constants and structures defined by the internet system, - * Per RFC 790, September 1981, taken from the BSD file netinet/in.h. - */ - -/* - * Protocols - */ -#define IPPROTO_IP 0 /* dummy for IP */ -#define IPPROTO_ICMP 1 /* control message protocol */ -#define IPPROTO_GGP 2 /* gateway^2 (deprecated) */ -#define IPPROTO_TCP 6 /* tcp */ -#define IPPROTO_PUP 12 /* pup */ -#define IPPROTO_UDP 17 /* user datagram protocol */ -#define IPPROTO_IDP 22 /* xns idp */ -#define IPPROTO_ND 77 /* UNOFFICIAL net disk proto */ - -#define IPPROTO_RAW 255 /* raw IP packet */ -#define IPPROTO_MAX 256 - -/* - * Port/socket numbers: network standard functions - */ -#define IPPORT_ECHO 7 -#define IPPORT_DISCARD 9 -#define IPPORT_SYSTAT 11 -#define IPPORT_DAYTIME 13 -#define IPPORT_NETSTAT 15 -#define IPPORT_FTP 21 -#define IPPORT_TELNET 23 -#define IPPORT_SMTP 25 -#define IPPORT_TIMESERVER 37 -#define IPPORT_NAMESERVER 42 -#define IPPORT_WHOIS 43 -#define IPPORT_MTP 57 - -/* - * Port/socket numbers: host specific functions - */ -#define IPPORT_TFTP 69 -#define IPPORT_RJE 77 -#define IPPORT_FINGER 79 -#define IPPORT_TTYLINK 87 -#define IPPORT_SUPDUP 95 - -/* - * UNIX TCP sockets - */ -#define IPPORT_EXECSERVER 512 -#define IPPORT_LOGINSERVER 513 -#define IPPORT_CMDSERVER 514 -#define IPPORT_EFSSERVER 520 - -/* - * UNIX UDP sockets - */ -#define IPPORT_BIFFUDP 512 -#define IPPORT_WHOSERVER 513 -#define IPPORT_ROUTESERVER 520 - /* 520+1 also used */ - -/* - * Ports < IPPORT_RESERVED are reserved for - * privileged processes (e.g. root). - */ -#define IPPORT_RESERVED 1024 - -/* - * Link numbers - */ -#define IMPLINK_IP 155 -#define IMPLINK_LOWEXPER 156 -#define IMPLINK_HIGHEXPER 158 - -/* - * Internet address (old style... should be updated) - */ -struct in_addr { - union { - struct { u_char s_b1,s_b2,s_b3,s_b4; } S_un_b; - struct { u_short s_w1,s_w2; } S_un_w; - u_long S_addr; - } S_un; -#define s_addr S_un.S_addr - /* can be used for most tcp & ip code */ -#define s_host S_un.S_un_b.s_b2 - /* host on imp */ -#define s_net S_un.S_un_b.s_b1 - /* network */ -#define s_imp S_un.S_un_w.s_w2 - /* imp */ -#define s_impno S_un.S_un_b.s_b4 - /* imp # */ -#define s_lh S_un.S_un_b.s_b3 - /* logical host */ -}; - -/* - * Definitions of bits in internet address integers. - * On subnets, the decomposition of addresses to host and net parts - * is done according to subnet mask, not the masks here. - */ -#define IN_CLASSA(i) (((long)(i) & 0x80000000) == 0) -#define IN_CLASSA_NET 0xff000000 -#define IN_CLASSA_NSHIFT 24 -#define IN_CLASSA_HOST 0x00ffffff -#define IN_CLASSA_MAX 128 - -#define IN_CLASSB(i) (((long)(i) & 0xc0000000) == 0x80000000) -#define IN_CLASSB_NET 0xffff0000 -#define IN_CLASSB_NSHIFT 16 -#define IN_CLASSB_HOST 0x0000ffff -#define IN_CLASSB_MAX 65536 - -#define IN_CLASSC(i) (((long)(i) & 0xe0000000) == 0xc0000000) -#define IN_CLASSC_NET 0xffffff00 -#define IN_CLASSC_NSHIFT 8 -#define IN_CLASSC_HOST 0x000000ff - -#define INADDR_ANY (u_long)0x00000000 -#define INADDR_LOOPBACK 0x7f000001 -#define INADDR_BROADCAST (u_long)0xffffffff -#define INADDR_NONE 0xffffffff - -/* - * Socket address, internet style. - */ -struct sockaddr_in { - short sin_family; - u_short sin_port; - struct in_addr sin_addr; - char sin_zero[8]; -}; - -#define WSADESCRIPTION_LEN 256 -#define WSASYS_STATUS_LEN 128 - -typedef struct WSAData { - WORD wVersion; - WORD wHighVersion; - char szDescription[WSADESCRIPTION_LEN+1]; - char szSystemStatus[WSASYS_STATUS_LEN+1]; - unsigned short iMaxSockets; - unsigned short iMaxUdpDg; - char FAR * lpVendorInfo; -} WSADATA; - -typedef WSADATA FAR *LPWSADATA; - -/* - * Options for use with [gs]etsockopt at the IP level. - */ -#define IP_OPTIONS 1 /* set/get IP per-packet options */ -#define IP_MULTICAST_IF 2 /* set/get IP multicast interface */ -#define IP_MULTICAST_TTL 3 /* set/get IP multicast timetolive */ -#define IP_MULTICAST_LOOP 4 /* set/get IP multicast loopback */ -#define IP_ADD_MEMBERSHIP 5 /* add an IP group membership */ -#define IP_DROP_MEMBERSHIP 6 /* drop an IP group membership */ - -#define IP_DEFAULT_MULTICAST_TTL 1 /* normally limit m'casts to 1 hop */ -#define IP_DEFAULT_MULTICAST_LOOP 1 /* normally hear sends if a member */ -#define IP_MAX_MEMBERSHIPS 20 /* per socket; must fit in one mbuf */ - -/* - * Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. - */ -struct ip_mreq { - struct in_addr imr_multiaddr; /* IP multicast address of group */ - struct in_addr imr_interface; /* local IP address of interface */ -}; - -/* - * Definitions related to sockets: types, address families, options, - * taken from the BSD file sys/socket.h. - */ - -/* - * This is used instead of -1, since the - * SOCKET type is unsigned. - */ -#define INVALID_SOCKET (SOCKET)(~0) -#define SOCKET_ERROR (-1) - -/* - * Types - */ -#define SOCK_STREAM 1 /* stream socket */ -#define SOCK_DGRAM 2 /* datagram socket */ -#define SOCK_RAW 3 /* raw-protocol interface */ -#define SOCK_RDM 4 /* reliably-delivered message */ -#define SOCK_SEQPACKET 5 /* sequenced packet stream */ - -/* - * Option flags per-socket. - */ -#define SO_DEBUG 0x0001 /* turn on debugging info recording */ -#define SO_ACCEPTCONN 0x0002 /* socket has had listen() */ -#define SO_REUSEADDR 0x0004 /* allow local address reuse */ -#define SO_KEEPALIVE 0x0008 /* keep connections alive */ -#define SO_DONTROUTE 0x0010 /* just use interface addresses */ -#define SO_BROADCAST 0x0020 /* permit sending of broadcast msgs */ -#define SO_USELOOPBACK 0x0040 /* bypass hardware when possible */ -#define SO_LINGER 0x0080 /* linger on close if data present */ -#define SO_OOBINLINE 0x0100 /* leave received OOB data in line */ - -#define SO_DONTLINGER (u_int)(~SO_LINGER) - -/* - * Additional options. - */ -#define SO_SNDBUF 0x1001 /* send buffer size */ -#define SO_RCVBUF 0x1002 /* receive buffer size */ -#define SO_SNDLOWAT 0x1003 /* send low-water mark */ -#define SO_RCVLOWAT 0x1004 /* receive low-water mark */ -#define SO_SNDTIMEO 0x1005 /* send timeout */ -#define SO_RCVTIMEO 0x1006 /* receive timeout */ -#define SO_ERROR 0x1007 /* get error status and clear */ -#define SO_TYPE 0x1008 /* get socket type */ - -/* - * Options for connect and disconnect data and options. Used only by - * non-TCP/IP transports such as DECNet, OSI TP4, etc. - */ -#define SO_CONNDATA 0x7000 -#define SO_CONNOPT 0x7001 -#define SO_DISCDATA 0x7002 -#define SO_DISCOPT 0x7003 -#define SO_CONNDATALEN 0x7004 -#define SO_CONNOPTLEN 0x7005 -#define SO_DISCDATALEN 0x7006 -#define SO_DISCOPTLEN 0x7007 - -/* - * Option for opening sockets for synchronous access. - */ -#define SO_OPENTYPE 0x7008 - -#define SO_SYNCHRONOUS_ALERT 0x10 -#define SO_SYNCHRONOUS_NONALERT 0x20 - -/* - * Other NT-specific options. - */ -#define SO_MAXDG 0x7009 -#define SO_MAXPATHDG 0x700A - -/* - * TCP options. - */ -#define TCP_NODELAY 0x0001 -#define TCP_BSDURGENT 0x7000 - -/* - * Address families. - */ -#define AF_UNSPEC 0 /* unspecified */ -#define AF_UNIX 1 /* local to host (pipes, portals) */ -#define AF_INET 2 /* internetwork: UDP, TCP, etc. */ -#define AF_IMPLINK 3 /* arpanet imp addresses */ -#define AF_PUP 4 /* pup protocols: e.g. BSP */ -#define AF_CHAOS 5 /* mit CHAOS protocols */ -#define AF_IPX 6 /* IPX and SPX */ -#define AF_NS 6 /* XEROX NS protocols */ -#define AF_ISO 7 /* ISO protocols */ -#define AF_OSI AF_ISO /* OSI is ISO */ -#define AF_ECMA 8 /* european computer manufacturers */ -#define AF_DATAKIT 9 /* datakit protocols */ -#define AF_CCITT 10 /* CCITT protocols, X.25 etc */ -#define AF_SNA 11 /* IBM SNA */ -#define AF_DECnet 12 /* DECnet */ -#define AF_DLI 13 /* Direct data link interface */ -#define AF_LAT 14 /* LAT */ -#define AF_HYLINK 15 /* NSC Hyperchannel */ -#define AF_APPLETALK 16 /* AppleTalk */ -#define AF_NETBIOS 17 /* NetBios-style addresses */ - -#define AF_MAX 18 - -/* - * Structure used by kernel to store most - * addresses. - */ -struct sockaddr { - u_short sa_family; /* address family */ - char sa_data[14]; /* up to 14 bytes of direct address */ -}; - -/* - * Structure used by kernel to pass protocol - * information in raw sockets. - */ -struct sockproto { - u_short sp_family; /* address family */ - u_short sp_protocol; /* protocol */ -}; - -/* - * Protocol families, same as address families for now. - */ -#define PF_UNSPEC AF_UNSPEC -#define PF_UNIX AF_UNIX -#define PF_INET AF_INET -#define PF_IMPLINK AF_IMPLINK -#define PF_PUP AF_PUP -#define PF_CHAOS AF_CHAOS -#define PF_NS AF_NS -#define PF_IPX AF_IPX -#define PF_ISO AF_ISO -#define PF_OSI AF_OSI -#define PF_ECMA AF_ECMA -#define PF_DATAKIT AF_DATAKIT -#define PF_CCITT AF_CCITT -#define PF_SNA AF_SNA -#define PF_DECnet AF_DECnet -#define PF_DLI AF_DLI -#define PF_LAT AF_LAT -#define PF_HYLINK AF_HYLINK -#define PF_APPLETALK AF_APPLETALK - -#define PF_MAX AF_MAX - -/* - * Structure used for manipulating linger option. - */ -struct linger { - u_short l_onoff; /* option on/off */ - u_short l_linger; /* linger time */ -}; - -/* - * Level number for (get/set)sockopt() to apply to socket itself. - */ -#define SOL_SOCKET 0xffff /* options for socket level */ - -/* - * Maximum queue length specifiable by listen. - */ -#define SOMAXCONN 5 - -#define MSG_OOB 0x1 /* process out-of-band data */ -#define MSG_PEEK 0x2 /* peek at incoming message */ -#define MSG_DONTROUTE 0x4 /* send without using routing tables */ - -#define MSG_MAXIOVLEN 16 - -#define MSG_PARTIAL 0x8000 /* partial send or recv for message xport */ - -/* - * Define constant based on rfc883, used by gethostbyxxxx() calls. - */ -#define MAXGETHOSTSTRUCT 1024 - -/* - * Define flags to be used with the WSAAsyncSelect() call. - */ -#define FD_READ 0x01 -#define FD_WRITE 0x02 -#define FD_OOB 0x04 -#define FD_ACCEPT 0x08 -#define FD_CONNECT 0x10 -#define FD_CLOSE 0x20 - -/* - * All Windows Sockets error constants are biased by WSABASEERR from - * the "normal" - */ -#define WSABASEERR 10000 -/* - * Windows Sockets definitions of regular Microsoft C error constants - */ -#define WSAEINTR (WSABASEERR+4) -#define WSAEBADF (WSABASEERR+9) -#define WSAEACCES (WSABASEERR+13) -#define WSAEFAULT (WSABASEERR+14) -#define WSAEINVAL (WSABASEERR+22) -#define WSAEMFILE (WSABASEERR+24) - -/* - * Windows Sockets definitions of regular Berkeley error constants - */ -#define WSAEWOULDBLOCK (WSABASEERR+35) -#define WSAEINPROGRESS (WSABASEERR+36) -#define WSAEALREADY (WSABASEERR+37) -#define WSAENOTSOCK (WSABASEERR+38) -#define WSAEDESTADDRREQ (WSABASEERR+39) -#define WSAEMSGSIZE (WSABASEERR+40) -#define WSAEPROTOTYPE (WSABASEERR+41) -#define WSAENOPROTOOPT (WSABASEERR+42) -#define WSAEPROTONOSUPPORT (WSABASEERR+43) -#define WSAESOCKTNOSUPPORT (WSABASEERR+44) -#define WSAEOPNOTSUPP (WSABASEERR+45) -#define WSAEPFNOSUPPORT (WSABASEERR+46) -#define WSAEAFNOSUPPORT (WSABASEERR+47) -#define WSAEADDRINUSE (WSABASEERR+48) -#define WSAEADDRNOTAVAIL (WSABASEERR+49) -#define WSAENETDOWN (WSABASEERR+50) -#define WSAENETUNREACH (WSABASEERR+51) -#define WSAENETRESET (WSABASEERR+52) -#define WSAECONNABORTED (WSABASEERR+53) -#define WSAECONNRESET (WSABASEERR+54) -#define WSAENOBUFS (WSABASEERR+55) -#define WSAEISCONN (WSABASEERR+56) -#define WSAENOTCONN (WSABASEERR+57) -#define WSAESHUTDOWN (WSABASEERR+58) -#define WSAETOOMANYREFS (WSABASEERR+59) -#define WSAETIMEDOUT (WSABASEERR+60) -#define WSAECONNREFUSED (WSABASEERR+61) -#define WSAELOOP (WSABASEERR+62) -#define WSAENAMETOOLONG (WSABASEERR+63) -#define WSAEHOSTDOWN (WSABASEERR+64) -#define WSAEHOSTUNREACH (WSABASEERR+65) -#define WSAENOTEMPTY (WSABASEERR+66) -#define WSAEPROCLIM (WSABASEERR+67) -#define WSAEUSERS (WSABASEERR+68) -#define WSAEDQUOT (WSABASEERR+69) -#define WSAESTALE (WSABASEERR+70) -#define WSAEREMOTE (WSABASEERR+71) - -#define WSAEDISCON (WSABASEERR+101) - -/* - * Extended Windows Sockets error constant definitions - */ -#define WSASYSNOTREADY (WSABASEERR+91) -#define WSAVERNOTSUPPORTED (WSABASEERR+92) -#define WSANOTINITIALISED (WSABASEERR+93) - -/* - * Error return codes from gethostbyname() and gethostbyaddr() - * (when using the resolver). Note that these errors are - * retrieved via WSAGetLastError() and must therefore follow - * the rules for avoiding clashes with error numbers from - * specific implementations or language run-time systems. - * For this reason the codes are based at WSABASEERR+1001. - * Note also that [WSA]NO_ADDRESS is defined only for - * compatibility purposes. - */ - -#define h_errno WSAGetLastError() - -/* Authoritative Answer: Host not found */ -#define WSAHOST_NOT_FOUND (WSABASEERR+1001) -#define HOST_NOT_FOUND WSAHOST_NOT_FOUND - -/* Non-Authoritative: Host not found, or SERVERFAIL */ -#define WSATRY_AGAIN (WSABASEERR+1002) -#define TRY_AGAIN WSATRY_AGAIN - -/* Non recoverable errors, FORMERR, REFUSED, NOTIMP */ -#define WSANO_RECOVERY (WSABASEERR+1003) -#define NO_RECOVERY WSANO_RECOVERY - -/* Valid name, no data record of requested type */ -#define WSANO_DATA (WSABASEERR+1004) -#define NO_DATA WSANO_DATA - -/* no address, look for MX record */ -#define WSANO_ADDRESS WSANO_DATA -#define NO_ADDRESS WSANO_ADDRESS - -/* - * Windows Sockets errors redefined as regular Berkeley error constants. - * These are commented out in Windows NT to avoid conflicts with errno.h. - * Use the WSA constants instead. - */ -#if 0 -#define EWOULDBLOCK WSAEWOULDBLOCK -#define EINPROGRESS WSAEINPROGRESS -#define EALREADY WSAEALREADY -#define ENOTSOCK WSAENOTSOCK -#define EDESTADDRREQ WSAEDESTADDRREQ -#define EMSGSIZE WSAEMSGSIZE -#define EPROTOTYPE WSAEPROTOTYPE -#define ENOPROTOOPT WSAENOPROTOOPT -#define EPROTONOSUPPORT WSAEPROTONOSUPPORT -#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT -#define EOPNOTSUPP WSAEOPNOTSUPP -#define EPFNOSUPPORT WSAEPFNOSUPPORT -#define EAFNOSUPPORT WSAEAFNOSUPPORT -#define EADDRINUSE WSAEADDRINUSE -#define EADDRNOTAVAIL WSAEADDRNOTAVAIL -#define ENETDOWN WSAENETDOWN -#define ENETUNREACH WSAENETUNREACH -#define ENETRESET WSAENETRESET -#define ECONNABORTED WSAECONNABORTED -#define ECONNRESET WSAECONNRESET -#define ENOBUFS WSAENOBUFS -#define EISCONN WSAEISCONN -#define ENOTCONN WSAENOTCONN -#define ESHUTDOWN WSAESHUTDOWN -#define ETOOMANYREFS WSAETOOMANYREFS -#define ETIMEDOUT WSAETIMEDOUT -#define ECONNREFUSED WSAECONNREFUSED -#define ELOOP WSAELOOP -#define ENAMETOOLONG WSAENAMETOOLONG -#define EHOSTDOWN WSAEHOSTDOWN -#define EHOSTUNREACH WSAEHOSTUNREACH -#define ENOTEMPTY WSAENOTEMPTY -#define EPROCLIM WSAEPROCLIM -#define EUSERS WSAEUSERS -#define EDQUOT WSAEDQUOT -#define ESTALE WSAESTALE -#define EREMOTE WSAEREMOTE -#endif - -/* Socket function prototypes */ - -#ifdef __cplusplus -extern "C" { -#endif - -SOCKET PASCAL FAR accept (SOCKET s, struct sockaddr FAR *addr, - int FAR *addrlen); - -int PASCAL FAR bind (SOCKET s, const struct sockaddr FAR *addr, int namelen); - -int PASCAL FAR closesocket (SOCKET s); - -int PASCAL FAR connect (SOCKET s, const struct sockaddr FAR *name, int namelen); - -int PASCAL FAR ioctlsocket (SOCKET s, long cmd, u_long FAR *argp); - -int PASCAL FAR getpeername (SOCKET s, struct sockaddr FAR *name, - int FAR * namelen); - -int PASCAL FAR getsockname (SOCKET s, struct sockaddr FAR *name, - int FAR * namelen); - -int PASCAL FAR getsockopt (SOCKET s, int level, int optname, - char FAR * optval, int FAR *optlen); - -u_long PASCAL FAR htonl (u_long hostlong); - -u_short PASCAL FAR htons (u_short hostshort); - -unsigned long PASCAL FAR inet_addr (const char FAR * cp); - -char FAR * PASCAL FAR inet_ntoa (struct in_addr in); - -int PASCAL FAR listen (SOCKET s, int backlog); - -u_long PASCAL FAR ntohl (u_long netlong); - -u_short PASCAL FAR ntohs (u_short netshort); - -int PASCAL FAR recv (SOCKET s, char FAR * buf, int len, int flags); - -int PASCAL FAR recvfrom (SOCKET s, char FAR * buf, int len, int flags, - struct sockaddr FAR *from, int FAR * fromlen); - -int PASCAL FAR select (int nfds, fd_set FAR *readfds, fd_set FAR *writefds, - fd_set FAR *exceptfds, const struct timeval FAR *timeout); - -int PASCAL FAR send (SOCKET s, const char FAR * buf, int len, int flags); - -int PASCAL FAR sendto (SOCKET s, const char FAR * buf, int len, int flags, - const struct sockaddr FAR *to, int tolen); - -int PASCAL FAR setsockopt (SOCKET s, int level, int optname, - const char FAR * optval, int optlen); - -int PASCAL FAR shutdown (SOCKET s, int how); - -SOCKET PASCAL FAR socket (int af, int type, int protocol); - -/* Database function prototypes */ - -struct hostent FAR * PASCAL FAR gethostbyaddr(const char FAR * addr, - int len, int type); - -struct hostent FAR * PASCAL FAR gethostbyname(const char FAR * name); - -int PASCAL FAR gethostname (char FAR * name, int namelen); - -struct servent FAR * PASCAL FAR getservbyport(int port, const char FAR * proto); - -struct servent FAR * PASCAL FAR getservbyname(const char FAR * name, - const char FAR * proto); - -struct protoent FAR * PASCAL FAR getprotobynumber(int proto); - -struct protoent FAR * PASCAL FAR getprotobyname(const char FAR * name); - -/* Microsoft Windows Extension function prototypes */ - -int PASCAL FAR WSAStartup(WORD wVersionRequired, LPWSADATA lpWSAData); - -int PASCAL FAR WSACleanup(void); - -void PASCAL FAR WSASetLastError(int iError); - -int PASCAL FAR WSAGetLastError(void); - -BOOL PASCAL FAR WSAIsBlocking(void); - -int PASCAL FAR WSAUnhookBlockingHook(void); - -FARPROC PASCAL FAR WSASetBlockingHook(FARPROC lpBlockFunc); - -int PASCAL FAR WSACancelBlockingCall(void); - -HANDLE PASCAL FAR WSAAsyncGetServByName(HWND hWnd, u_int wMsg, - const char FAR * name, - const char FAR * proto, - char FAR * buf, int buflen); - -HANDLE PASCAL FAR WSAAsyncGetServByPort(HWND hWnd, u_int wMsg, int port, - const char FAR * proto, char FAR * buf, - int buflen); - -HANDLE PASCAL FAR WSAAsyncGetProtoByName(HWND hWnd, u_int wMsg, - const char FAR * name, char FAR * buf, - int buflen); - -HANDLE PASCAL FAR WSAAsyncGetProtoByNumber(HWND hWnd, u_int wMsg, - int number, char FAR * buf, - int buflen); - -HANDLE PASCAL FAR WSAAsyncGetHostByName(HWND hWnd, u_int wMsg, - const char FAR * name, char FAR * buf, - int buflen); - -HANDLE PASCAL FAR WSAAsyncGetHostByAddr(HWND hWnd, u_int wMsg, - const char FAR * addr, int len, int type, - char FAR * buf, int buflen); - -int PASCAL FAR WSACancelAsyncRequest(HANDLE hAsyncTaskHandle); - -int PASCAL FAR WSAAsyncSelect(SOCKET s, HWND hWnd, u_int wMsg, - long lEvent); - -int PASCAL FAR WSARecvEx (SOCKET s, char FAR * buf, int len, int FAR *flags); - -#ifdef __cplusplus -} -#endif - -/* Microsoft Windows Extended data types */ -typedef struct sockaddr SOCKADDR; -typedef struct sockaddr *PSOCKADDR; -typedef struct sockaddr FAR *LPSOCKADDR; - -typedef struct sockaddr_in SOCKADDR_IN; -typedef struct sockaddr_in *PSOCKADDR_IN; -typedef struct sockaddr_in FAR *LPSOCKADDR_IN; - -typedef struct linger LINGER; -typedef struct linger *PLINGER; -typedef struct linger FAR *LPLINGER; - -typedef struct in_addr IN_ADDR; -typedef struct in_addr *PIN_ADDR; -typedef struct in_addr FAR *LPIN_ADDR; - -typedef struct fd_set FD_SET; -typedef struct fd_set *PFD_SET; -typedef struct fd_set FAR *LPFD_SET; - -typedef struct hostent HOSTENT; -typedef struct hostent *PHOSTENT; -typedef struct hostent FAR *LPHOSTENT; - -typedef struct servent SERVENT; -typedef struct servent *PSERVENT; -typedef struct servent FAR *LPSERVENT; - -typedef struct protoent PROTOENT; -typedef struct protoent *PPROTOENT; -typedef struct protoent FAR *LPPROTOENT; - -typedef struct timeval TIMEVAL; -typedef struct timeval *PTIMEVAL; -typedef struct timeval FAR *LPTIMEVAL; - -/* - * Windows message parameter composition and decomposition - * macros. - * - * WSAMAKEASYNCREPLY is intended for use by the Windows Sockets implementation - * when constructing the response to a WSAAsyncGetXByY() routine. - */ -#define WSAMAKEASYNCREPLY(buflen,error) MAKELONG(buflen,error) -/* - * WSAMAKESELECTREPLY is intended for use by the Windows Sockets implementation - * when constructing the response to WSAAsyncSelect(). - */ -#define WSAMAKESELECTREPLY(event,error) MAKELONG(event,error) -/* - * WSAGETASYNCBUFLEN is intended for use by the Windows Sockets application - * to extract the buffer length from the lParam in the response - * to a WSAGetXByY(). - */ -#define WSAGETASYNCBUFLEN(lParam) LOWORD(lParam) -/* - * WSAGETASYNCERROR is intended for use by the Windows Sockets application - * to extract the error code from the lParam in the response - * to a WSAGetXByY(). - */ -#define WSAGETASYNCERROR(lParam) HIWORD(lParam) -/* - * WSAGETSELECTEVENT is intended for use by the Windows Sockets application - * to extract the event code from the lParam in the response - * to a WSAAsyncSelect(). - */ -#define WSAGETSELECTEVENT(lParam) LOWORD(lParam) -/* - * WSAGETSELECTERROR is intended for use by the Windows Sockets application - * to extract the error code from the lParam in the response - * to a WSAAsyncSelect(). - */ -#define WSAGETSELECTERROR(lParam) HIWORD(lParam) - -#endif /* _WINSOCKAPI_ */ - - - \ No newline at end of file diff --git a/libraries/msdos/winsock/kerberos.c b/libraries/msdos/winsock/kerberos.c deleted file mode 100644 index 62292049a4..0000000000 --- a/libraries/msdos/winsock/kerberos.c +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (c) 1992, 1994 Regents of the University of Michigan. - * All rights reserved. - * - * kerberos.c - for the windows environment - */ - -#include -#include "lber.h" -#include "ldap.h" - -#ifdef KERBEROS -#ifdef WINSOCK -#include -#endif -#include - -#ifdef AUTHMAN -#include - -/* - * get_kerberosv4_credentials - obtain kerberos v4 credentials for ldap. - * this includes krbtgt, and any service tickets - */ - -/* ARGSUSED */ -char * -get_kerberosv4_credentials( LDAP *ld, char *who, char *service, int *len ) -{ - static short authman_refnum = 0; - static char ticket[ MAX_KTXT_LEN ]; - short version, ticketlen, err; - AUTH_PTR ticketStorage = ticket; - AUTH_SHORT_PTR pTicketLen = &ticketlen; - AUTH_STR_PTR pName = service; - AUTH_STR_PTR pInstance; - HINSTANCE instAuthLibDLL = NULL; - pfn_openAuthMan fp_openAuthMan = NULL; - pfn_closeAuthMan fp_closeAuthMan = NULL; - pfn_getV4Ticket fp_getV4Ticket = NULL; - - -#ifdef LDAP_REFERRALS - pInstance = ld->ld_defconn->lconn_krbinstance; -#else /* LDAP_REFERRALS */ - pInstance = ld->ld_host; -#endif /* LDAP_REFERRALS */ - - if ( !pInstance ) { // if we don't know name of service host, no chance for service tickets - ld->ld_errno = LDAP_LOCAL_ERROR; - WSASetLastError(WSANO_ADDRESS); - return( NULL ); - } - - if ( !instAuthLibDLL ) - { - unsigned int prevMode = SetErrorMode( SEM_NOOPENFILEERRORBOX ); // don't whine at user if you can't find it - instAuthLibDLL = LoadLibrary("AuthLib.DLL"); - SetErrorMode( prevMode ); - - if ( instAuthLibDLL < HINSTANCE_ERROR ) // can't find authlib - { - ld->ld_errno = LDAP_AUTH_UNKNOWN; - return( NULL ); - } - - fp_openAuthMan = (pfn_openAuthMan)GetProcAddress( instAuthLibDLL, "openAuthMan" ); - fp_getV4Ticket = (pfn_getV4Ticket)GetProcAddress( instAuthLibDLL, "getV4Ticket" ); - fp_closeAuthMan = (pfn_closeAuthMan)GetProcAddress( instAuthLibDLL, "closeAuthMan" ); - - // verify that we found all the routines we need - if (!(fp_closeAuthMan && fp_getV4Ticket && fp_openAuthMan)) - { - FreeLibrary( instAuthLibDLL ); // free authlib.dll so it gets unloaded - instAuthLibDLL = NULL; - ld->ld_errno = LDAP_AUTH_UNKNOWN; - return( NULL ); - } - - } - - /* - * make sure RJC's Authentication Manager version isn't > 4.0 - */ - if ( authman_refnum == 0 && (( err = (fp_openAuthMan)( &authman_refnum, &version )) != AUTH_NO_ERROR || AUTH_VERSION_CODE > version )) { - ld->ld_errno = LDAP_AUTH_UNKNOWN; - if ( AUTH_VERSION_CODE > version ) - { - ld->ld_errno = LDAP_INAPPROPRIATE_AUTH; // version too old - } - (fp_closeAuthMan)( authman_refnum ); - authman_refnum = NULL; - FreeLibrary( instAuthLibDLL ); // free authlib.dll so it gets unloaded - instAuthLibDLL = NULL; - return( NULL ); - } - - if (( err = (fp_getV4Ticket)( authman_refnum, ticketStorage, pTicketLen, pName, pInstance, - NULL, INFINITE_LIFETIME, 1 )) != AUTH_NO_ERROR ) { - - ld->ld_errno = AUTH_USER_CANCELED == err ? LDAP_USER_CANCELLED : LDAP_INVALID_CREDENTIALS; - (fp_closeAuthMan)( authman_refnum ); - authman_refnum = NULL; - FreeLibrary( instAuthLibDLL ); // free authlib.dll so it gets unloaded - instAuthLibDLL = NULL; - return( NULL ); - } - - *len = ticketlen; - (fp_closeAuthMan)( authman_refnum ); // open pukes if you call twice with no close in between - authman_refnum = NULL; - FreeLibrary( instAuthLibDLL ); // free authlib.dll so it gets unloaded - instAuthLibDLL = NULL; - return( (char *)ticket ); -} - -#endif /* AUTHMAN */ -#endif /* KERBEROS */ - diff --git a/libraries/msdos/winsock/ldap32.def b/libraries/msdos/winsock/ldap32.def deleted file mode 100644 index 8563777cae..0000000000 --- a/libraries/msdos/winsock/ldap32.def +++ /dev/null @@ -1,166 +0,0 @@ -LIBRARY LDAP32 -DESCRIPTION 'Lightweight Directory Access Protocol Client API' -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE SINGLE -VERSION 3.2 -HEAPSIZE 4096 - -EXPORTS -; we need to manually assign ordinal numbers so we can add new routines -; and not disturb the ordinals and thus not require callers to relink. - ldap_abandon @10 - ldap_add @11 - ldap_unbind @13 - ldap_enable_cache @14 - ldap_disable_cache @15 - ldap_destroy_cache @16 - ldap_flush_cache @17 - ldap_uncache_entry @18 - ldap_compare @19 - ldap_delete @20 - ldap_result2error @21 - ldap_err2string @22 - ldap_modify @23 - ldap_modrdn @24 - ldap_open @25 - ldap_first_entry @26 - ldap_next_entry @27 - ldap_delete_result_entry @28 - ldap_add_result_entry @29 - ldap_get_dn @30 - ldap_dn2ufn @31 - ldap_first_attribute @32 - ldap_next_attribute @33 - ldap_get_values @34 - ldap_get_values_len @35 - ldap_count_entries @36 - ldap_count_values @37 - ldap_value_free @38 - ldap_explode_dn @39 - ldap_result @40 - ldap_msgfree @41 - ldap_msgdelete @42 - ldap_search @43 - ldap_add_s @44 - ldap_bind_s @45 - ldap_unbind_s @46 - ldap_delete_s @47 - ldap_modify_s @48 - ldap_modrdn_s @49 - ldap_search_s @50 - ldap_search_st @51 - ldap_compare_s @52 - ldap_ufn_search_c @53 - ldap_ufn_search_s @54 - ldap_init_getfilter @55 - ldap_getfilter_free @56 - ldap_getfirstfilter @57 - ldap_getnextfilter @58 - ldap_simple_bind @59 - ldap_simple_bind_s @60 - ldap_bind @61 - ldap_friendly_name @62 - ldap_free_friendlymap @63 - ldap_ufn_search_ct @64 - ldap_set_cache_options @65 - ldap_uncache_request @66 - ldap_modrdn2 @67 - ldap_modrdn2_s @68 - ldap_ufn_setfilter @69 - ldap_ufn_setprefix @70 - ldap_ufn_timeout @71 - ldap_init_getfilter_buf @72 - ldap_setfilteraffixes @73 - ldap_sort_entries @74 - ldap_sort_values @75 - ldap_sort_strcasecmp @76 - ldap_count_values_len @77 - ldap_name2template @78 - ldap_value_free_len @79 - -; manually comment and uncomment these five as necessary -; ldap_kerberos_bind1 @80 -; ldap_kerberos_bind2 @81 -; ldap_kerberos_bind_s @82 -; ldap_kerberos_bind1_s @83 -; ldap_kerberos_bind2_s @84 - - ldap_init @85 - ldap_is_dns_dn @86 - ldap_explode_dns @87 - ldap_mods_free @88 - - ldap_is_ldap_url @89 - ldap_free_urldesc @90 - ldap_url_parse @91 - ldap_url_search @92 - ldap_url_search_s @93 - ldap_url_search_st @94 - ldap_set_rebind_proc @95 - - ber_skip_tag @100 - ber_peek_tag @101 - ber_get_int @102 - ber_get_stringb @103 - ber_get_stringa @104 - ber_get_stringal @105 - ber_get_bitstringa @106 - ber_get_null @107 - ber_get_boolean @108 - ber_first_element @109 - ber_next_element @110 - ber_scanf @111 - ber_bvfree @112 - ber_bvecfree @113 - ber_put_int @114 - ber_put_ostring @115 - ber_put_string @116 - ber_put_bitstring @117 - ber_put_null @118 - ber_put_boolean @119 - ber_start_seq @120 - ber_start_set @121 - ber_put_seq @122 - ber_put_set @123 - ber_printf @124 - ber_read @125 - ber_write @126 - ber_free @127 - ber_flush @128 - ber_alloc @129 - ber_dup @130 - ber_get_next @131 - ber_get_tag @132 - ber_put_enum @133 - der_alloc @134 - ber_alloc_t @135 - ber_bvdup @136 - ber_init @137 - ber_reset @138 - - ldap_memfree @200 - - ldap_init_searchprefs @300 - ldap_init_searchprefs_buf @301 - ldap_free_searchprefs @302 - ldap_first_searchobj @303 - ldap_next_searchobj @304 - ldap_build_filter @305 - - ldap_init_templates @400 - ldap_init_templates_buf @401 - ldap_free_templates @402 - ldap_first_disptmpl @403 - ldap_next_disptmpl @404 - ldap_oc2template @405 - ldap_tmplattrs @406 - ldap_first_tmplrow @407 - ldap_next_tmplrow @408 - ldap_first_tmplcol @409 - ldap_next_tmplcol @410 - ldap_entry2text_search @411 - ldap_entry2text @412 - ldap_vals2text @413 - ldap_entry2html @414 - ldap_entry2html_search @415 - ldap_vals2html @416 diff --git a/libraries/msdos/winsock/ldap32.mak b/libraries/msdos/winsock/ldap32.mak deleted file mode 100644 index a8bcf7eec0..0000000000 --- a/libraries/msdos/winsock/ldap32.mak +++ /dev/null @@ -1,1632 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 4.10 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -!IF "$(CFG)" == "" -CFG=libldap - Win32 Debug -!MESSAGE No configuration specified. Defaulting to libldap - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "libldap - Win32 Release" && "$(CFG)" !=\ - "libldap - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE on this makefile -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "ldap32.mak" CFG="libldap - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "libldap - Win32 Release" (based on\ - "Win32 (x86) Dynamic-Link Library") -!MESSAGE "libldap - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF -################################################################################ -# Begin Project -# PROP Target_Last_Scanned "libldap - Win32 Debug" -CPP=cl.exe -RSC=rc.exe -MTL=mktyplib.exe - -!IF "$(CFG)" == "libldap - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -OUTDIR=.\Release -INTDIR=.\Release - -ALL : "$(OUTDIR)\ldap32.dll" "$(OUTDIR)\ldap32.bsc" - -CLEAN : - -@erase "$(INTDIR)\abandon.obj" - -@erase "$(INTDIR)\abandon.sbr" - -@erase "$(INTDIR)\add.obj" - -@erase "$(INTDIR)\add.sbr" - -@erase "$(INTDIR)\addentry.obj" - -@erase "$(INTDIR)\addentry.sbr" - -@erase "$(INTDIR)\bind.obj" - -@erase "$(INTDIR)\bind.sbr" - -@erase "$(INTDIR)\cache.obj" - -@erase "$(INTDIR)\cache.sbr" - -@erase "$(INTDIR)\charset.obj" - -@erase "$(INTDIR)\charset.sbr" - -@erase "$(INTDIR)\compare.obj" - -@erase "$(INTDIR)\compare.sbr" - -@erase "$(INTDIR)\decode.obj" - -@erase "$(INTDIR)\decode.sbr" - -@erase "$(INTDIR)\delete.obj" - -@erase "$(INTDIR)\delete.sbr" - -@erase "$(INTDIR)\disptmpl.obj" - -@erase "$(INTDIR)\disptmpl.sbr" - -@erase "$(INTDIR)\dsparse.obj" - -@erase "$(INTDIR)\dsparse.sbr" - -@erase "$(INTDIR)\encode.obj" - -@erase "$(INTDIR)\encode.sbr" - -@erase "$(INTDIR)\error.obj" - -@erase "$(INTDIR)\error.sbr" - -@erase "$(INTDIR)\free.obj" - -@erase "$(INTDIR)\free.sbr" - -@erase "$(INTDIR)\friendly.obj" - -@erase "$(INTDIR)\friendly.sbr" - -@erase "$(INTDIR)\getattr.obj" - -@erase "$(INTDIR)\getattr.sbr" - -@erase "$(INTDIR)\getdn.obj" - -@erase "$(INTDIR)\getdn.sbr" - -@erase "$(INTDIR)\getentry.obj" - -@erase "$(INTDIR)\getentry.sbr" - -@erase "$(INTDIR)\getfilte.obj" - -@erase "$(INTDIR)\getfilte.sbr" - -@erase "$(INTDIR)\getvalue.obj" - -@erase "$(INTDIR)\getvalue.sbr" - -@erase "$(INTDIR)\io.obj" - -@erase "$(INTDIR)\io.sbr" - -@erase "$(INTDIR)\kbind.obj" - -@erase "$(INTDIR)\kbind.sbr" - -@erase "$(INTDIR)\kerberos.obj" - -@erase "$(INTDIR)\kerberos.sbr" - -@erase "$(INTDIR)\libldap.res" - -@erase "$(INTDIR)\modify.obj" - -@erase "$(INTDIR)\modify.sbr" - -@erase "$(INTDIR)\modrdn.obj" - -@erase "$(INTDIR)\modrdn.sbr" - -@erase "$(INTDIR)\msdos.obj" - -@erase "$(INTDIR)\msdos.sbr" - -@erase "$(INTDIR)\open.obj" - -@erase "$(INTDIR)\open.sbr" - -@erase "$(INTDIR)\regex.obj" - -@erase "$(INTDIR)\regex.sbr" - -@erase "$(INTDIR)\request.obj" - -@erase "$(INTDIR)\request.sbr" - -@erase "$(INTDIR)\result.obj" - -@erase "$(INTDIR)\result.sbr" - -@erase "$(INTDIR)\sbind.obj" - -@erase "$(INTDIR)\sbind.sbr" - -@erase "$(INTDIR)\search.obj" - -@erase "$(INTDIR)\search.sbr" - -@erase "$(INTDIR)\sort.obj" - -@erase "$(INTDIR)\sort.sbr" - -@erase "$(INTDIR)\srchpref.obj" - -@erase "$(INTDIR)\srchpref.sbr" - -@erase "$(INTDIR)\tmplout.obj" - -@erase "$(INTDIR)\tmplout.sbr" - -@erase "$(INTDIR)\ufn.obj" - -@erase "$(INTDIR)\ufn.sbr" - -@erase "$(INTDIR)\unbind.obj" - -@erase "$(INTDIR)\unbind.sbr" - -@erase "$(INTDIR)\url.obj" - -@erase "$(INTDIR)\url.sbr" - -@erase "$(INTDIR)\wsockip.obj" - -@erase "$(INTDIR)\wsockip.sbr" - -@erase "$(OUTDIR)\ldap32.bsc" - -@erase "$(OUTDIR)\ldap32.dll" - -@erase "$(OUTDIR)\ldap32.exp" - -@erase "$(OUTDIR)\ldap32.lib" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /G3 /MT /W3 /Od /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "WINSOCK" /D "DOS" /D "NEEDPROTOS" /D "NO_USERINTERFACE" /D "KERBEROS" /YX /c -# ADD CPP /nologo /G3 /MT /W3 /Od /I "..\..\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "WINSOCK" /D "DOS" /D "NEEDPROTOS" /D "NO_USERINTERFACE" /D "_NODLLIMPORT_" /FR /YX /c -CPP_PROJ=/nologo /G3 /MT /W3 /Od /I "..\..\include" /D "NDEBUG" /D "WIN32" /D\ - "_WINDOWS" /D "WINSOCK" /D "DOS" /D "NEEDPROTOS" /D "NO_USERINTERFACE" /D\ - "_NODLLIMPORT_" /FR"$(INTDIR)/" /Fp"$(INTDIR)/ldap32.pch" /YX /Fo"$(INTDIR)/"\ - /c -CPP_OBJS=.\Release/ -CPP_SBRS=.\Release/ -# ADD BASE MTL /nologo /D "NDEBUG" /win32 -# ADD MTL /nologo /D "NDEBUG" /win32 -MTL_PROJ=/nologo /D "NDEBUG" /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -RSC_PROJ=/l 0x409 /fo"$(INTDIR)/libldap.res" /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/ldap32.bsc" -BSC32_SBRS= \ - "$(INTDIR)\abandon.sbr" \ - "$(INTDIR)\add.sbr" \ - "$(INTDIR)\addentry.sbr" \ - "$(INTDIR)\bind.sbr" \ - "$(INTDIR)\cache.sbr" \ - "$(INTDIR)\charset.sbr" \ - "$(INTDIR)\compare.sbr" \ - "$(INTDIR)\decode.sbr" \ - "$(INTDIR)\delete.sbr" \ - "$(INTDIR)\disptmpl.sbr" \ - "$(INTDIR)\dsparse.sbr" \ - "$(INTDIR)\encode.sbr" \ - "$(INTDIR)\error.sbr" \ - "$(INTDIR)\free.sbr" \ - "$(INTDIR)\friendly.sbr" \ - "$(INTDIR)\getattr.sbr" \ - "$(INTDIR)\getdn.sbr" \ - "$(INTDIR)\getentry.sbr" \ - "$(INTDIR)\getfilte.sbr" \ - "$(INTDIR)\getvalue.sbr" \ - "$(INTDIR)\io.sbr" \ - "$(INTDIR)\kbind.sbr" \ - "$(INTDIR)\kerberos.sbr" \ - "$(INTDIR)\modify.sbr" \ - "$(INTDIR)\modrdn.sbr" \ - "$(INTDIR)\msdos.sbr" \ - "$(INTDIR)\open.sbr" \ - "$(INTDIR)\regex.sbr" \ - "$(INTDIR)\request.sbr" \ - "$(INTDIR)\result.sbr" \ - "$(INTDIR)\sbind.sbr" \ - "$(INTDIR)\search.sbr" \ - "$(INTDIR)\sort.sbr" \ - "$(INTDIR)\srchpref.sbr" \ - "$(INTDIR)\tmplout.sbr" \ - "$(INTDIR)\ufn.sbr" \ - "$(INTDIR)\unbind.sbr" \ - "$(INTDIR)\url.sbr" \ - "$(INTDIR)\wsockip.sbr" - -"$(OUTDIR)\ldap32.bsc" : "$(OUTDIR)" $(BSC32_SBRS) - $(BSC32) @<< - $(BSC32_FLAGS) $(BSC32_SBRS) -<< - -LINK32=link.exe -# ADD BASE LINK32 oldnames.lib ldllcew.lib krbv4win.lib wshelper.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /map:"FULL" /machine:IX86 -# ADD LINK32 WSOCK32.LIB oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:IX86 -# SUBTRACT LINK32 /map -LINK32_FLAGS=WSOCK32.LIB oldnames.lib kernel32.lib user32.lib gdi32.lib\ - winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib\ - uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll\ - /incremental:no /pdb:"$(OUTDIR)/ldap32.pdb" /machine:IX86\ - /out:"$(OUTDIR)/ldap32.dll" /implib:"$(OUTDIR)/ldap32.lib" -LINK32_OBJS= \ - "$(INTDIR)\abandon.obj" \ - "$(INTDIR)\add.obj" \ - "$(INTDIR)\addentry.obj" \ - "$(INTDIR)\bind.obj" \ - "$(INTDIR)\cache.obj" \ - "$(INTDIR)\charset.obj" \ - "$(INTDIR)\compare.obj" \ - "$(INTDIR)\decode.obj" \ - "$(INTDIR)\delete.obj" \ - "$(INTDIR)\disptmpl.obj" \ - "$(INTDIR)\dsparse.obj" \ - "$(INTDIR)\encode.obj" \ - "$(INTDIR)\error.obj" \ - "$(INTDIR)\free.obj" \ - "$(INTDIR)\friendly.obj" \ - "$(INTDIR)\getattr.obj" \ - "$(INTDIR)\getdn.obj" \ - "$(INTDIR)\getentry.obj" \ - "$(INTDIR)\getfilte.obj" \ - "$(INTDIR)\getvalue.obj" \ - "$(INTDIR)\io.obj" \ - "$(INTDIR)\kbind.obj" \ - "$(INTDIR)\kerberos.obj" \ - "$(INTDIR)\libldap.res" \ - "$(INTDIR)\modify.obj" \ - "$(INTDIR)\modrdn.obj" \ - "$(INTDIR)\msdos.obj" \ - "$(INTDIR)\open.obj" \ - "$(INTDIR)\regex.obj" \ - "$(INTDIR)\request.obj" \ - "$(INTDIR)\result.obj" \ - "$(INTDIR)\sbind.obj" \ - "$(INTDIR)\search.obj" \ - "$(INTDIR)\sort.obj" \ - "$(INTDIR)\srchpref.obj" \ - "$(INTDIR)\tmplout.obj" \ - "$(INTDIR)\ufn.obj" \ - "$(INTDIR)\unbind.obj" \ - "$(INTDIR)\url.obj" \ - "$(INTDIR)\wsockip.obj" \ - "..\..\..\..\MSDEV\LIB\WSOCK32.LIB" - -"$(OUTDIR)\ldap32.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "libldap - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -OUTDIR=.\Debug -INTDIR=.\Debug - -ALL : "$(OUTDIR)\ldap32.dll" "$(OUTDIR)\ldap32.bsc" - -CLEAN : - -@erase "$(INTDIR)\abandon.obj" - -@erase "$(INTDIR)\abandon.sbr" - -@erase "$(INTDIR)\add.obj" - -@erase "$(INTDIR)\add.sbr" - -@erase "$(INTDIR)\addentry.obj" - -@erase "$(INTDIR)\addentry.sbr" - -@erase "$(INTDIR)\bind.obj" - -@erase "$(INTDIR)\bind.sbr" - -@erase "$(INTDIR)\cache.obj" - -@erase "$(INTDIR)\cache.sbr" - -@erase "$(INTDIR)\charset.obj" - -@erase "$(INTDIR)\charset.sbr" - -@erase "$(INTDIR)\compare.obj" - -@erase "$(INTDIR)\compare.sbr" - -@erase "$(INTDIR)\decode.obj" - -@erase "$(INTDIR)\decode.sbr" - -@erase "$(INTDIR)\delete.obj" - -@erase "$(INTDIR)\delete.sbr" - -@erase "$(INTDIR)\disptmpl.obj" - -@erase "$(INTDIR)\disptmpl.sbr" - -@erase "$(INTDIR)\dsparse.obj" - -@erase "$(INTDIR)\dsparse.sbr" - -@erase "$(INTDIR)\encode.obj" - -@erase "$(INTDIR)\encode.sbr" - -@erase "$(INTDIR)\error.obj" - -@erase "$(INTDIR)\error.sbr" - -@erase "$(INTDIR)\free.obj" - -@erase "$(INTDIR)\free.sbr" - -@erase "$(INTDIR)\friendly.obj" - -@erase "$(INTDIR)\friendly.sbr" - -@erase "$(INTDIR)\getattr.obj" - -@erase "$(INTDIR)\getattr.sbr" - -@erase "$(INTDIR)\getdn.obj" - -@erase "$(INTDIR)\getdn.sbr" - -@erase "$(INTDIR)\getentry.obj" - -@erase "$(INTDIR)\getentry.sbr" - -@erase "$(INTDIR)\getfilte.obj" - -@erase "$(INTDIR)\getfilte.sbr" - -@erase "$(INTDIR)\getvalue.obj" - -@erase "$(INTDIR)\getvalue.sbr" - -@erase "$(INTDIR)\io.obj" - -@erase "$(INTDIR)\io.sbr" - -@erase "$(INTDIR)\kbind.obj" - -@erase "$(INTDIR)\kbind.sbr" - -@erase "$(INTDIR)\kerberos.obj" - -@erase "$(INTDIR)\kerberos.sbr" - -@erase "$(INTDIR)\libldap.res" - -@erase "$(INTDIR)\modify.obj" - -@erase "$(INTDIR)\modify.sbr" - -@erase "$(INTDIR)\modrdn.obj" - -@erase "$(INTDIR)\modrdn.sbr" - -@erase "$(INTDIR)\msdos.obj" - -@erase "$(INTDIR)\msdos.sbr" - -@erase "$(INTDIR)\open.obj" - -@erase "$(INTDIR)\open.sbr" - -@erase "$(INTDIR)\regex.obj" - -@erase "$(INTDIR)\regex.sbr" - -@erase "$(INTDIR)\request.obj" - -@erase "$(INTDIR)\request.sbr" - -@erase "$(INTDIR)\result.obj" - -@erase "$(INTDIR)\result.sbr" - -@erase "$(INTDIR)\sbind.obj" - -@erase "$(INTDIR)\sbind.sbr" - -@erase "$(INTDIR)\search.obj" - -@erase "$(INTDIR)\search.sbr" - -@erase "$(INTDIR)\sort.obj" - -@erase "$(INTDIR)\sort.sbr" - -@erase "$(INTDIR)\srchpref.obj" - -@erase "$(INTDIR)\srchpref.sbr" - -@erase "$(INTDIR)\tmplout.obj" - -@erase "$(INTDIR)\tmplout.sbr" - -@erase "$(INTDIR)\ufn.obj" - -@erase "$(INTDIR)\ufn.sbr" - -@erase "$(INTDIR)\unbind.obj" - -@erase "$(INTDIR)\unbind.sbr" - -@erase "$(INTDIR)\url.obj" - -@erase "$(INTDIR)\url.sbr" - -@erase "$(INTDIR)\vc40.idb" - -@erase "$(INTDIR)\vc40.pdb" - -@erase "$(INTDIR)\wsockip.obj" - -@erase "$(INTDIR)\wsockip.sbr" - -@erase "$(OUTDIR)\ldap32.bsc" - -@erase "$(OUTDIR)\ldap32.dll" - -@erase "$(OUTDIR)\ldap32.exp" - -@erase "$(OUTDIR)\ldap32.ilk" - -@erase "$(OUTDIR)\ldap32.lib" - -@erase "$(OUTDIR)\ldap32.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /MTd /W3 /Gm /Zi /Od /Gf /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "WINSOCK" /D "DOS" /D "NEEDPROTOS" /D "NO_USERINTERFACE" /D "KERBEROS" /FR /YX /c -# ADD CPP /nologo /MTd /W3 /Gm /Zi /Od /Gf /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "WINSOCK" /D "DOS" /D "NEEDPROTOS" /D "NO_USERINTERFACE" /D "_NODLLIMPORT_" /FR /YX /c -CPP_PROJ=/nologo /MTd /W3 /Gm /Zi /Od /Gf /I "..\..\include" /D "_DEBUG" /D\ - "WIN32" /D "_WINDOWS" /D "WINSOCK" /D "DOS" /D "NEEDPROTOS" /D\ - "NO_USERINTERFACE" /D "_NODLLIMPORT_" /FR"$(INTDIR)/" /Fp"$(INTDIR)/ldap32.pch"\ - /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c -CPP_OBJS=.\Debug/ -CPP_SBRS=.\Debug/ -# ADD BASE MTL /nologo /D "_DEBUG" /win32 -# ADD MTL /nologo /D "_DEBUG" /win32 -MTL_PROJ=/nologo /D "_DEBUG" /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -RSC_PROJ=/l 0x409 /fo"$(INTDIR)/libldap.res" /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/ldap32.bsc" -BSC32_SBRS= \ - "$(INTDIR)\abandon.sbr" \ - "$(INTDIR)\add.sbr" \ - "$(INTDIR)\addentry.sbr" \ - "$(INTDIR)\bind.sbr" \ - "$(INTDIR)\cache.sbr" \ - "$(INTDIR)\charset.sbr" \ - "$(INTDIR)\compare.sbr" \ - "$(INTDIR)\decode.sbr" \ - "$(INTDIR)\delete.sbr" \ - "$(INTDIR)\disptmpl.sbr" \ - "$(INTDIR)\dsparse.sbr" \ - "$(INTDIR)\encode.sbr" \ - "$(INTDIR)\error.sbr" \ - "$(INTDIR)\free.sbr" \ - "$(INTDIR)\friendly.sbr" \ - "$(INTDIR)\getattr.sbr" \ - "$(INTDIR)\getdn.sbr" \ - "$(INTDIR)\getentry.sbr" \ - "$(INTDIR)\getfilte.sbr" \ - "$(INTDIR)\getvalue.sbr" \ - "$(INTDIR)\io.sbr" \ - "$(INTDIR)\kbind.sbr" \ - "$(INTDIR)\kerberos.sbr" \ - "$(INTDIR)\modify.sbr" \ - "$(INTDIR)\modrdn.sbr" \ - "$(INTDIR)\msdos.sbr" \ - "$(INTDIR)\open.sbr" \ - "$(INTDIR)\regex.sbr" \ - "$(INTDIR)\request.sbr" \ - "$(INTDIR)\result.sbr" \ - "$(INTDIR)\sbind.sbr" \ - "$(INTDIR)\search.sbr" \ - "$(INTDIR)\sort.sbr" \ - "$(INTDIR)\srchpref.sbr" \ - "$(INTDIR)\tmplout.sbr" \ - "$(INTDIR)\ufn.sbr" \ - "$(INTDIR)\unbind.sbr" \ - "$(INTDIR)\url.sbr" \ - "$(INTDIR)\wsockip.sbr" - -"$(OUTDIR)\ldap32.bsc" : "$(OUTDIR)" $(BSC32_SBRS) - $(BSC32) @<< - $(BSC32_FLAGS) $(BSC32_SBRS) -<< - -LINK32=link.exe -# ADD BASE LINK32 oldnames.lib ldllcew.lib krbv4win.lib wshelper.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /map:"FULL" /debug /machine:IX86 -# ADD LINK32 WSOCK32.LIB oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:IX86 -# SUBTRACT LINK32 /map -LINK32_FLAGS=WSOCK32.LIB oldnames.lib kernel32.lib user32.lib gdi32.lib\ - winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib\ - uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll\ - /incremental:yes /pdb:"$(OUTDIR)/ldap32.pdb" /debug /machine:IX86\ - /def:".\ldap32.def" /out:"$(OUTDIR)/ldap32.dll" /implib:"$(OUTDIR)/ldap32.lib" -DEF_FILE= \ - ".\ldap32.def" -LINK32_OBJS= \ - "$(INTDIR)\abandon.obj" \ - "$(INTDIR)\add.obj" \ - "$(INTDIR)\addentry.obj" \ - "$(INTDIR)\bind.obj" \ - "$(INTDIR)\cache.obj" \ - "$(INTDIR)\charset.obj" \ - "$(INTDIR)\compare.obj" \ - "$(INTDIR)\decode.obj" \ - "$(INTDIR)\delete.obj" \ - "$(INTDIR)\disptmpl.obj" \ - "$(INTDIR)\dsparse.obj" \ - "$(INTDIR)\encode.obj" \ - "$(INTDIR)\error.obj" \ - "$(INTDIR)\free.obj" \ - "$(INTDIR)\friendly.obj" \ - "$(INTDIR)\getattr.obj" \ - "$(INTDIR)\getdn.obj" \ - "$(INTDIR)\getentry.obj" \ - "$(INTDIR)\getfilte.obj" \ - "$(INTDIR)\getvalue.obj" \ - "$(INTDIR)\io.obj" \ - "$(INTDIR)\kbind.obj" \ - "$(INTDIR)\kerberos.obj" \ - "$(INTDIR)\libldap.res" \ - "$(INTDIR)\modify.obj" \ - "$(INTDIR)\modrdn.obj" \ - "$(INTDIR)\msdos.obj" \ - "$(INTDIR)\open.obj" \ - "$(INTDIR)\regex.obj" \ - "$(INTDIR)\request.obj" \ - "$(INTDIR)\result.obj" \ - "$(INTDIR)\sbind.obj" \ - "$(INTDIR)\search.obj" \ - "$(INTDIR)\sort.obj" \ - "$(INTDIR)\srchpref.obj" \ - "$(INTDIR)\tmplout.obj" \ - "$(INTDIR)\ufn.obj" \ - "$(INTDIR)\unbind.obj" \ - "$(INTDIR)\url.obj" \ - "$(INTDIR)\wsockip.obj" \ - "..\..\..\..\MSDEV\LIB\WSOCK32.LIB" - -"$(OUTDIR)\ldap32.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - -.c{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.c{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -################################################################################ -# Begin Target - -# Name "libldap - Win32 Release" -# Name "libldap - Win32 Debug" - -!IF "$(CFG)" == "libldap - Win32 Release" - -!ELSEIF "$(CFG)" == "libldap - Win32 Debug" - -!ENDIF - -################################################################################ -# Begin Source File - -SOURCE=.\abandon.c -DEP_CPP_ABAND=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_ABAND=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\abandon.obj" : $(SOURCE) $(DEP_CPP_ABAND) "$(INTDIR)" - -"$(INTDIR)\abandon.sbr" : $(SOURCE) $(DEP_CPP_ABAND) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\add.c -DEP_CPP_ADD_C=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_ADD_C=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\add.obj" : $(SOURCE) $(DEP_CPP_ADD_C) "$(INTDIR)" - -"$(INTDIR)\add.sbr" : $(SOURCE) $(DEP_CPP_ADD_C) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\bind.c -DEP_CPP_BIND_=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_BIND_=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\externs.h"\ - ".\macos.h"\ - - -"$(INTDIR)\bind.obj" : $(SOURCE) $(DEP_CPP_BIND_) "$(INTDIR)" - -"$(INTDIR)\bind.sbr" : $(SOURCE) $(DEP_CPP_BIND_) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\cache.c -DEP_CPP_CACHE=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_CACHE=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\externs.h"\ - ".\macos.h"\ - - -"$(INTDIR)\cache.obj" : $(SOURCE) $(DEP_CPP_CACHE) "$(INTDIR)" - -"$(INTDIR)\cache.sbr" : $(SOURCE) $(DEP_CPP_CACHE) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\compare.c -DEP_CPP_COMPA=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_COMPA=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\compare.obj" : $(SOURCE) $(DEP_CPP_COMPA) "$(INTDIR)" - -"$(INTDIR)\compare.sbr" : $(SOURCE) $(DEP_CPP_COMPA) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\delete.c -DEP_CPP_DELET=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_DELET=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\delete.obj" : $(SOURCE) $(DEP_CPP_DELET) "$(INTDIR)" - -"$(INTDIR)\delete.sbr" : $(SOURCE) $(DEP_CPP_DELET) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\error.c -DEP_CPP_ERROR=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_ERROR=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - - -"$(INTDIR)\error.obj" : $(SOURCE) $(DEP_CPP_ERROR) "$(INTDIR)" - -"$(INTDIR)\error.sbr" : $(SOURCE) $(DEP_CPP_ERROR) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\getfilte.c -DEP_CPP_GETFI=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\regex.h"\ - "..\..\include\sys/file.h"\ - "..\..\include\sys/time.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_GETFI=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\getfilte.obj" : $(SOURCE) $(DEP_CPP_GETFI) "$(INTDIR)" - -"$(INTDIR)\getfilte.sbr" : $(SOURCE) $(DEP_CPP_GETFI) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\regex.c -DEP_CPP_REGEX=\ - "..\..\include\portable.h"\ - "..\..\include\regex.h"\ - - -"$(INTDIR)\regex.obj" : $(SOURCE) $(DEP_CPP_REGEX) "$(INTDIR)" - -"$(INTDIR)\regex.sbr" : $(SOURCE) $(DEP_CPP_REGEX) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\modify.c -DEP_CPP_MODIF=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_MODIF=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\modify.obj" : $(SOURCE) $(DEP_CPP_MODIF) "$(INTDIR)" - -"$(INTDIR)\modify.sbr" : $(SOURCE) $(DEP_CPP_MODIF) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\modrdn.c -DEP_CPP_MODRD=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_MODRD=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\modrdn.obj" : $(SOURCE) $(DEP_CPP_MODRD) "$(INTDIR)" - -"$(INTDIR)\modrdn.sbr" : $(SOURCE) $(DEP_CPP_MODRD) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\getdn.c -DEP_CPP_GETDN=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_GETDN=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\getdn.obj" : $(SOURCE) $(DEP_CPP_GETDN) "$(INTDIR)" - -"$(INTDIR)\getdn.sbr" : $(SOURCE) $(DEP_CPP_GETDN) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\getentry.c -DEP_CPP_GETEN=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_GETEN=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\getentry.obj" : $(SOURCE) $(DEP_CPP_GETEN) "$(INTDIR)" - -"$(INTDIR)\getentry.sbr" : $(SOURCE) $(DEP_CPP_GETEN) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\getattr.c -DEP_CPP_GETAT=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_GETAT=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\getattr.obj" : $(SOURCE) $(DEP_CPP_GETAT) "$(INTDIR)" - -"$(INTDIR)\getattr.sbr" : $(SOURCE) $(DEP_CPP_GETAT) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\getvalue.c -DEP_CPP_GETVA=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_GETVA=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\getvalue.obj" : $(SOURCE) $(DEP_CPP_GETVA) "$(INTDIR)" - -"$(INTDIR)\getvalue.sbr" : $(SOURCE) $(DEP_CPP_GETVA) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\addentry.c -DEP_CPP_ADDEN=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_ADDEN=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\addentry.obj" : $(SOURCE) $(DEP_CPP_ADDEN) "$(INTDIR)" - -"$(INTDIR)\addentry.sbr" : $(SOURCE) $(DEP_CPP_ADDEN) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\result.c -DEP_CPP_RESUL=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\portable.h"\ - "..\..\include\sys/select.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_RESUL=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\externs.h"\ - ".\macos.h"\ - ".\ucx_select.h"\ - - -"$(INTDIR)\result.obj" : $(SOURCE) $(DEP_CPP_RESUL) "$(INTDIR)" - -"$(INTDIR)\result.sbr" : $(SOURCE) $(DEP_CPP_RESUL) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\search.c -DEP_CPP_SEARC=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_SEARC=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\search.obj" : $(SOURCE) $(DEP_CPP_SEARC) "$(INTDIR)" - -"$(INTDIR)\search.sbr" : $(SOURCE) $(DEP_CPP_SEARC) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\ufn.c -DEP_CPP_UFN_C=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_UFN_C=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\ufn.obj" : $(SOURCE) $(DEP_CPP_UFN_C) "$(INTDIR)" - -"$(INTDIR)\ufn.sbr" : $(SOURCE) $(DEP_CPP_UFN_C) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\msdos.c -DEP_CPP_MSDOS=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - -NODEP_CPP_MSDOS=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - - -"$(INTDIR)\msdos.obj" : $(SOURCE) $(DEP_CPP_MSDOS) "$(INTDIR)" - -"$(INTDIR)\msdos.sbr" : $(SOURCE) $(DEP_CPP_MSDOS) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\sbind.c -DEP_CPP_SBIND=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_SBIND=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\sbind.obj" : $(SOURCE) $(DEP_CPP_SBIND) "$(INTDIR)" - -"$(INTDIR)\sbind.sbr" : $(SOURCE) $(DEP_CPP_SBIND) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\unbind.c -DEP_CPP_UNBIN=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_UNBIN=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\externs.h"\ - ".\macos.h"\ - - -"$(INTDIR)\unbind.obj" : $(SOURCE) $(DEP_CPP_UNBIN) "$(INTDIR)" - -"$(INTDIR)\unbind.sbr" : $(SOURCE) $(DEP_CPP_UNBIN) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\kbind.c -DEP_CPP_KBIND=\ - "..\..\include\conf.h"\ - "..\..\include\des.h"\ - "..\..\include\krb.h"\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\lsh_pwd.h"\ - "..\..\include\mit_copy.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\conf-pc.h"\ - ".\..\..\include\osconf.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_KBIND=\ - ".\..\..\include\conf-bsd386i.h"\ - ".\..\..\include\conf-bsdapollo.h"\ - ".\..\..\include\conf-bsdibm032.h"\ - ".\..\..\include\conf-bsdm68k.h"\ - ".\..\..\include\conf-bsdsparc.h"\ - ".\..\..\include\conf-bsdtahoe.h"\ - ".\..\..\include\conf-bsdvax.h"\ - ".\..\..\include\conf-pyr.h"\ - ".\..\..\include\conf-ultmips2.h"\ - ".\..\..\include\names.h"\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\kbind.obj" : $(SOURCE) $(DEP_CPP_KBIND) "$(INTDIR)" - -"$(INTDIR)\kbind.sbr" : $(SOURCE) $(DEP_CPP_KBIND) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\friendly.c -DEP_CPP_FRIEN=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_FRIEN=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\friendly.obj" : $(SOURCE) $(DEP_CPP_FRIEN) "$(INTDIR)" - -"$(INTDIR)\friendly.sbr" : $(SOURCE) $(DEP_CPP_FRIEN) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\disptmpl.c -DEP_CPP_DISPT=\ - "..\..\include\disptmpl.h"\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/file.h"\ - "..\..\include\sys/time.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_DISPT=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\disptmpl.obj" : $(SOURCE) $(DEP_CPP_DISPT) "$(INTDIR)" - -"$(INTDIR)\disptmpl.sbr" : $(SOURCE) $(DEP_CPP_DISPT) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\dsparse.c -DEP_CPP_DSPAR=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/file.h"\ - "..\..\include\sys/time.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_DSPAR=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\dsparse.obj" : $(SOURCE) $(DEP_CPP_DSPAR) "$(INTDIR)" - -"$(INTDIR)\dsparse.sbr" : $(SOURCE) $(DEP_CPP_DSPAR) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\free.c -DEP_CPP_FREE_=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_FREE_=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\free.obj" : $(SOURCE) $(DEP_CPP_FREE_) "$(INTDIR)" - -"$(INTDIR)\free.sbr" : $(SOURCE) $(DEP_CPP_FREE_) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\sort.c -DEP_CPP_SORT_=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - -NODEP_CPP_SORT_=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\sort.obj" : $(SOURCE) $(DEP_CPP_SORT_) "$(INTDIR)" - -"$(INTDIR)\sort.sbr" : $(SOURCE) $(DEP_CPP_SORT_) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\srchpref.c -DEP_CPP_SRCHP=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\srchpref.h"\ - "..\..\include\sys/file.h"\ - "..\..\include\sys/time.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_SRCHP=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\srchpref.obj" : $(SOURCE) $(DEP_CPP_SRCHP) "$(INTDIR)" - -"$(INTDIR)\srchpref.sbr" : $(SOURCE) $(DEP_CPP_SRCHP) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\tmplout.c -DEP_CPP_TMPLO=\ - "..\..\include\disptmpl.h"\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/file.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_TMPLO=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\tmplout.obj" : $(SOURCE) $(DEP_CPP_TMPLO) "$(INTDIR)" - -"$(INTDIR)\tmplout.sbr" : $(SOURCE) $(DEP_CPP_TMPLO) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\libldap.rc - -"$(INTDIR)\libldap.res" : $(SOURCE) "$(INTDIR)" - $(RSC) $(RSC_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\request.c -DEP_CPP_REQUE=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\portable.h"\ - "..\..\include\sys/select.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_REQUE=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\externs.h"\ - ".\macos.h"\ - ".\ucx_select.h"\ - - -"$(INTDIR)\request.obj" : $(SOURCE) $(DEP_CPP_REQUE) "$(INTDIR)" - -"$(INTDIR)\request.sbr" : $(SOURCE) $(DEP_CPP_REQUE) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\wsockip.c -DEP_CPP_WSOCK=\ - "..\..\include\_sys/filio.h"\ - "..\..\include\_sys/ioctl.h"\ - "..\..\include\arpa/nameser.h"\ - "..\..\include\hesiod.h"\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\netdb.h"\ - "..\..\include\netinet/in.h"\ - "..\..\include\portable.h"\ - "..\..\include\resolv.h"\ - "..\..\include\sys/filio.h"\ - "..\..\include\sys/ioctl.h"\ - "..\..\include\sys/select.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - "..\..\include\wshelper.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_WSOCK=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - - -"$(INTDIR)\wsockip.obj" : $(SOURCE) $(DEP_CPP_WSOCK) "$(INTDIR)" - -"$(INTDIR)\wsockip.sbr" : $(SOURCE) $(DEP_CPP_WSOCK) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\open.c -DEP_CPP_OPEN_=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\netinet/in.h"\ - "..\..\include\sys/param.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_OPEN_=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\open.obj" : $(SOURCE) $(DEP_CPP_OPEN_) "$(INTDIR)" - -"$(INTDIR)\open.sbr" : $(SOURCE) $(DEP_CPP_OPEN_) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\ldap32.def - -!IF "$(CFG)" == "libldap - Win32 Release" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "libldap - Win32 Debug" - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=\MSDEV\LIB\WSOCK32.LIB - -!IF "$(CFG)" == "libldap - Win32 Release" - -!ELSEIF "$(CFG)" == "libldap - Win32 Debug" - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\kerberos.c -DEP_CPP_KERBE=\ - "..\..\include\authlib.h"\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - -NODEP_CPP_KERBE=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - - -"$(INTDIR)\kerberos.obj" : $(SOURCE) $(DEP_CPP_KERBE) "$(INTDIR)" - -"$(INTDIR)\kerberos.sbr" : $(SOURCE) $(DEP_CPP_KERBE) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\url.c -DEP_CPP_URL_C=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_URL_C=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\url.obj" : $(SOURCE) $(DEP_CPP_URL_C) "$(INTDIR)" - -"$(INTDIR)\url.sbr" : $(SOURCE) $(DEP_CPP_URL_C) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\charset.c -DEP_CPP_CHARS=\ - "..\..\include\lber.h"\ - "..\..\include\ldap.h"\ - "..\..\include\msdos.h"\ - "..\..\include\sys/param.h"\ - "..\..\include\sys/time.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - ".\..\..\include\proto-ld.h"\ - ".\ldap-int.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_CHARS=\ - ".\..\..\include\proto-lber.h"\ - ".\..\..\include\proto-ldap.h"\ - ".\macos.h"\ - - -"$(INTDIR)\charset.obj" : $(SOURCE) $(DEP_CPP_CHARS) "$(INTDIR)" - -"$(INTDIR)\charset.sbr" : $(SOURCE) $(DEP_CPP_CHARS) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="\src\ldap-3.3b1\libraries\liblber\io.c" -DEP_CPP_IO_C48=\ - "..\..\include\lber.h"\ - "..\..\include\msdos.h"\ - "..\..\include\netinet/in.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_IO_C48=\ - "..\liblber\macos.h"\ - ".\..\..\include\proto-lber.h"\ - - -BuildCmds= \ - $(CPP) $(CPP_PROJ) $(SOURCE) \ - - -"$(INTDIR)\io.obj" : $(SOURCE) $(DEP_CPP_IO_C48) "$(INTDIR)" - $(BuildCmds) - -"$(INTDIR)\io.sbr" : $(SOURCE) $(DEP_CPP_IO_C48) "$(INTDIR)" - $(BuildCmds) - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="\src\ldap-3.3b1\libraries\liblber\encode.c" -DEP_CPP_ENCOD=\ - "..\..\include\lber.h"\ - "..\..\include\msdos.h"\ - "..\..\include\netinet/in.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_ENCOD=\ - "..\liblber\macos.h"\ - ".\..\..\include\proto-lber.h"\ - - -BuildCmds= \ - $(CPP) $(CPP_PROJ) $(SOURCE) \ - - -"$(INTDIR)\encode.obj" : $(SOURCE) $(DEP_CPP_ENCOD) "$(INTDIR)" - $(BuildCmds) - -"$(INTDIR)\encode.sbr" : $(SOURCE) $(DEP_CPP_ENCOD) "$(INTDIR)" - $(BuildCmds) - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="\src\ldap-3.3b1\libraries\liblber\decode.c" -DEP_CPP_DECOD=\ - "..\..\include\lber.h"\ - "..\..\include\msdos.h"\ - "..\..\include\netinet/in.h"\ - "..\..\include\sys\socket.h"\ - ".\..\..\include\proto-lb.h"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - -NODEP_CPP_DECOD=\ - "..\liblber\macos.h"\ - ".\..\..\include\proto-lber.h"\ - - -BuildCmds= \ - $(CPP) $(CPP_PROJ) $(SOURCE) \ - - -"$(INTDIR)\decode.obj" : $(SOURCE) $(DEP_CPP_DECOD) "$(INTDIR)" - $(BuildCmds) - -"$(INTDIR)\decode.sbr" : $(SOURCE) $(DEP_CPP_DECOD) "$(INTDIR)" - $(BuildCmds) - -# End Source File -# End Target -# End Project -################################################################################ diff --git a/libraries/msdos/winsock/ldap32.mdp b/libraries/msdos/winsock/ldap32.mdp deleted file mode 100644 index a3f977e236ab511e92fc23518fe7b2a508c75e28..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 43520 zcmeHQe{dAneSZf!Bw^WxB7P($$p$MIu%#0}WJe~n73gG;Es!k91}lp3>2AecINe_M z?u^uu3Dc6AnYt}a)P{OIQ%y@-x5W)n9h(6ZD>nVX3DgliT~gantCSu!Ng2s z$NhZXzPGnpua0%5X=kEcSiSGt?{`1@zTfxrzWd(W$3}KIlR_*J(Xr?(@LqH* zY74x%sI`xje@rCBsAv=G1Z{DT{2N(i@mQeN;YBUM;>q=zrVXM|wCo*8?dwf#=}PW> zYS*imKP1aU{2B4)AB>4hI7Q<#BDJhX#K1T&I^;>-?f?F)X!yf1@fPR|5QkJ;m2q{b49Ks=-#H}DCkGRJW zl6M=pFCZk3xTg@3N1W3L$s^8Lgya$DGD7l*L%lZo(m`3`@}MknZz8;gllFKA;dOPr z>GYW7@p-MF$>Z}3(B$!X?Fh-^^STj|r}4=ne*T0IYklcx!SjjBH1b%Ev+2jR_&td8 zS>$JdLw{1G={WC^d4=$}!rycMLCK#*ocMEX zPW&q3JgyvY;-njKp8fK(QvSM5-&fNzK8iT?J9);5Q+@@`H(#m6o5}y06L0;aF^PBT z>*{{Q$#43P+Vl7$=GtF7{1o`aJ1d;{am2~r^S2YOes>|B%VuP}g7nay=O>-`X(hid z=fty!Q=jR)6F-MI@4xgpCk|39!^!-n{o251er&Xz_-WwN{x_>md=`AB@7fV3PW*q1 z&#z~EUT((WgA{k;Y?@Q@e>^7Rb1ypj%p&f!$7#g9_Be;Q*B%!YU)$p<;$C}PN8D?V zTS{Krqv22H+oKh6uRYoj_u8Wiaj!j6heRi->#eaaHlPJ+33}wZ|>Qz4mB$*}>EHXhodq)8(TLaj!kP5ck@H`RTRC zDEMFX=*za&YmW-}U-9sdBkr}wEaF~!oK|sdk8_B7?Qs!tuRX3J?zP8t#n<+@g}B!q z4Szb{9<7KIPursnaj!kP5ck?6g?K%CWWld`^!3~0IQXCU@MjVC+T%3hUVEHVacz%_ zi0gKa>AI@oN1-S4`MQdqK}fxBsdxb)pVRPX&i$_;&ih+c9Hi8%O~u>6XFhkS_!;1{ z+^1ChCGctYQP2HPK`$PN7&{OWH-#`R)`$Uw#2rOQ+;N0VZx$hO3kZqJ zgSbZ#Uk5s6Tcs^Nd*lK968LfPaf~m30^Bo*6ZgL7(RSj#*AOS}deAE%c^UEUSckZ> z_C?W(Yi}T)wvC;I0#ki>>Mg{H(|U&axJa;5rZXWfB+hIQ}7T zzV{~5+m1MS35k}rcSw0BeR1(HZE*?{v3y*t#4WomW7IMdDRVMk z%vbVO5!d1ZX?9K9*HK9?PGDH=HmhP1`JHOkp1`$HikVUfTmN9Ax@7 z`0%J(TnxTX?tY&f%V-?GHg)>4uQ>XC!Y9YNw+WIl5r0=K>40YvHpaD~gjF(ntzyNT zt_Y=fo0Mz#!8PO`&lAtU-oWFr)d}Qp+6E~nesB%>@vL}J*2i78l{iv1lS%vpUWt~G z<53>hkuDy`5MEaF&|hGT2b$$)4(B_d9ldc4JeCjIrxmo;+W<{_Q}1@rTJLVqv?KNA zF^7|K)H^Od?8+U79Q9f9B`|P!_3`K5&w<~YC|G6FfLhSX=r2xM#QPN&@2YxkLfJcu zd-z=Dz281;mq%u%CaeO+bGUD%_;qQYCe;0DwgWikaQ!WuJW5}KPKv$&x&bGTrn6|< z6g>oby`twpZ&dWDzZ?@?ioOZDN73uPF(w8SodeBhe50ZEd*SRoyxs- zOYF8#j+&4jr=DfM?v#<6NLQDl&m-(nv_M%HQ1lS!5@@aWQP9+ndY=HT^`2GoaWNw1 zNTXg}R@c0GuR=;XfsxPcT(!H#is}RE`NTp{wIdbawTn71mxqg-N02mrweJM zJ+}IA*jMRvvp-SNlD>s0;%jZAtlk1XlwSH3fYkkG^1Zt}1!NmKbi}#Yk+v~%7 z2zdT}gL#)5+|#+9{>J`el!VOi1o#BpaM(3;T>-i02G^(i_Q ziv^m|E~C^qgKG{4cpkuSos+oAZb2XIi1T34@ykhu`lIF81=N$f1pe>h-F!e~y2; zP5H^RJ-U>iO#91Ih_ge{{&KcIUVms7{K)_3yl-Qq{Vke{&AcHS(LDomL6c-G8V zSu>ew|ALY1+ALpXe_$LUA1Paz!}*c})ZP6PrH44SS*{i;4$QV~3#Mo5JiWGUo7j@v z;?s_36ZvA+!FqVXBs~-kDw9j&RhmlKL))m}cRs7lj8IyQlT4&bR8~Vc^n055y4$u2 z9lc~x2(Qn2?$%e;3m=DryN|6-r7P*mOvyC%;-yC+f2cTR7Aw4uCo=lNik+E^iPw!! z<*h=RlLj;st-^)7`-{d<`jBb#*|ueC4%&nZ&HF54FJ1`QGx{pt9$i?~k2j8o(gnP1 zE?4Yo#*6m}@Yn6LiWz8-FIHs>+&7&uOJ1Rb1Svj;q-G7grzu%wIg>#@CX3?^zkeb1gX{U>>$ZtZVRf*)E%V$kvV#XLV zZA)YPR!yM4Xildy6$7ujP>{61NeHZU5c*YOphL8QinjsrE zBA?7`P(Hm2k$aqE`S0Ep6Bj;|8W_NB$Q9(#FUb;PJemfaYu-$G>dm!#^BLPJTay)| z_rV8cCe6!d6h6Fi!ux~$=}IQIMH5>!fePWU@J_G+hIwA>9e8X2H$?OQYV$)Y@GnO5 z|7!L)4*y^@|1X;V$A(nThm7X`^|ag`F|ZEn*SHg|66SH|C$?i&YS;fB={qcu7X$GaYPH|5^~;QFXj=l-OzqS_N)GR zt(?c`%!?$BF=AEij43$3@ms)a5jQYL{D7L%eGT&%+kwqv&tG8;hNjPB?WdwofgV!y z4bbC??tT?(KNY?CHLU&AG}dJtQ}hAQFDUv7=u@EoYw7&?^ zF;DyLlbCzm^iN~5?H(~J#y+fxFz_qBV$$IwN)Jo9Wv`chA9jN5o+moQBPxAt?|Cr) z)=0S}ujerT)p#W*-<{E`lyIi}mbo~Bdarck-tB?h(3zaP{}j^M@GZ>UR=6ubvp=EU z>p^2&F4wT;&jsr8PF``mJQ8ge&b_wDNW4?vjD z{}@8QUVMJyiE2J`Sb89+7Sgxm^&q`UzoaJ0Dn^O~o8R!)k zSQD()0bN#jtpRu+!g`bYuoCJc;-j#efmKr*#QjWIbSwf3+$A>6X*KyPng>gnLkSW2 z|0DlD_9TFZIP(8T{{P7TAI<;ex<|cVMg#os99QZ6GFlPmD@;8fx()G0#H0DY(fa>r z{eQInpKA-F_5Y1S(fWTOqV@mIJ`{2v0nhq+?4IKOZjaXgN9+H&pFp(!pZ!L({{N@3 z{{Iu$ALNtR5n>a(j1OY(i4OG9(Xm)8&@BCb^!%+J=-)Mv+Bsx&82kJ8ZQE+3`gT3J zTka|GpPfakU>&lI&b^~qqjUc@qjUF^(K(hkItLNoJ!y3I8yk|zas1C0Glgo_++cL3 zj131RhC@qGbs2POaQ}$Q7#Zw++=-+H)zy7{eW{`0!BICpc<{-QzTy6TqkY4V?(FST zNc#pcJF$Q7(BSasL0o!tc!S(crIU0?(VV%wZELcW$>HkL2f(pBQrQ}vF<^-MTxGoq z9LX1960qAl3&!T@uFa1aos$}dbD{B!B<3FD3E7(7kpGAa=Sn-tnJ8yA5b(XnWBaK; zQivQdtU|V!o-)fxfEtHQyJ!}`VWf&ZSrmCFn^zRlg(uve+DP7n;W8!KlJF(rD2iXZ)h#TG*om1&d4jVCT??2G}FfUGS-;k8k%<(|PAZS%9 zJ^(xj*Yi^)q{zp@l?_HmUv0K}$F?NqbqCDqPETNNuvJWEVzEu3PYyHx-5p`<#t3uos58>!2s3zex$pmBbUBPZHC;B<_)^D$Mwpt1;mZ5Rm2T4A zabYcTfwQKcL~`sC)1 zA$`nf6zN&uiPD4xp3x{W_-8~kij=?B7W|nNjUv&Q_-a!$icFUlEHKe1G8#n&77p)5 z0~keOj>&2@GNQLqy5^+Y4{prZT0cj1@Z<&GwOkF~rqWoE-6VR4Z0mDorV=c?5WHNu ze+&n0%M$9ZlQlV*24|Qq05Wohwb}a>PTax2YQoE7@1aP}{ z9R+alY}Zw^Alq>b1+amwJMjRnlQivU2@rr`aJzE#1n?aI?b-m)z`X0N$Q0{AHE z$~6+qRIZQ!Cer3{eFO;L(X~!0fDZuG{3Pv6P)!3s&6N=V0DjGN5x|FT%2g4-6FfI3NDhAyP8+RIDufN~F-dMRlt9s3~Wb^HyC0HWu*;sBShiaqP%E2bN7PqQq4Aw;d%jK?HVD^{nsidr!YemsTc z|GX7*+A`-a*3quT{%%}H%Vokh){HH(4m{U+zAKh5mSB%Vp3qz25Kly`%6(e0ba^(vQb4 zc`3YpnL2}dQ|@UueFJ~**l*N_$9+iscwC#Fz&3c6;h?HSCRYl4Qy|tNE`1yO1pJ+| z?s^??3pjb)L^!SJJ^wH!jw||Q&?gmr8}v(x9{SFhcv;bBL7!9fip%(3v!b5`eOb}x zLBpx@y-dv6KcMO3FA9ERiR-kVRC=94I#|BA=ErQHxB0-6 zm`>JDlu+cO{x00|UzPiXte`XW*dt?tbzr5)L9RvQP_M43y4CcL*h2y*kMjt76#eEu zWB$LQH(tTMA&M@6&MNu>=#rwF{$)%YRrC<(6N;V&J*((B&`js|krJlsWC728-pQx6 zzvk?3qSH(Ld!QNI!aqKbJv4YSpGMO7EFM1sC^t93cjTat-k*Z|a`2oU!FM}>$HTx$ z{aL^K`NaC5k&Kaq{Nko8uDE_4Xr&PuU#Oq(=tp_p=htsFuDkm6 zC!FcQNc(Ow*Rk*Jc6bEtr^@SF3vw+nb_ww-e+ZPqy>JWI`w+3In zb+Qzd1;4Fj-{|dUTT#|npId>)@dVpmZ7=_RG0VVnzN0AcDb_^MTaU*TPD2PB_PGh{ zHCyDkKz`42ziY443MUR6_6^+kM5o7ZFX~4aBe5%AOxrUCHwu>HleCL>OW`dG!1L?J zw!J?wMXw4C^@F(hoQtyq<(77842hHIoA%(aKKa@ag|k8FhXDCJ{XV&Sd~&SEaq)%s z$=&6XcPKgsdXJ*dgC13MH@;Cx`wYwazWhgfmSS%ooV54dzVy1|Kc79< zc;sY4qd$=aA`3(oh%B(^EYK-7!_%==M2BUDGEX6}vI=>0fkK`dL-@K8$-fO3Fv;|AOXey9*fIdD_wXzs_j=U!6IOdQDNN z6-av0Rk-y*wMkfaUZxSv+~&N4g%*J7NnfFtI_gPa;WDZ=DJ=8@^dzxxH+UwEg)0iS z`YKY06+0|B?xeD4{hyxC<(;$^E|c786Jgi5)h4w?>;L@o=4+GY!d1cAB)V|6RFmq$ zs8Lj`58;pb*TSn{uYM)?aZyk*y7aHfe zO9R4r(uZ(2{M1L0kBb4Z a7jp~-#gKRcZNUL @<<$(PROJ).CRF -ABANDON.OBJ + -ADD.OBJ + -BIND.OBJ + -CACHE.OBJ + -COMPARE.OBJ + -DELETE.OBJ + -ERROR.OBJ + -GETFILTE.OBJ + -REGEX.OBJ + -MODIFY.OBJ + -MODRDN.OBJ + -GETDN.OBJ + -GETENTRY.OBJ + -GETATTR.OBJ + -GETVALUE.OBJ + -ADDENTRY.OBJ + -RESULT.OBJ + -SEARCH.OBJ + -UFN.OBJ + -DECODE.OBJ + -ENCODE.OBJ + -IO.OBJ + -MSDOS.OBJ + -SBIND.OBJ + -UNBIND.OBJ + -KBIND.OBJ + -FRIENDLY.OBJ + -DISPTMPL.OBJ + -DSPARSE.OBJ + -FREE.OBJ + -SORT.OBJ + -SRCHPREF.OBJ + -TMPLOUT.OBJ + -REQUEST.OBJ + -WSOCKIP.OBJ + -OPEN.OBJ + -CHARSET.OBJ + -URL.OBJ + -$(OBJS_EXT) -$(PROJ).DLL -$(MAPFILE) -c:\msvc\lib\+ -c:\msvc\mfc\lib\+ -c:\src\lib\+ -WINSOCK.LIB+ -$(LIBS) -$(DEFFILE); -<< - link $(LFLAGS) @$(PROJ).CRF - $(RC) $(RESFLAGS) LIBLDAP.RES $@ - @copy $(PROJ).CRF MSVC.BND - implib /nowep $(PROJ).LIB $(PROJ).DLL - -$(PROJ).DLL:: LIBLDAP.RES - if not exist MSVC.BND $(RC) $(RESFLAGS) LIBLDAP.RES $@ - -run: $(PROJ).DLL - $(PROJ) $(RUNFLAGS) - - -$(PROJ).BSC: $(SBRS) - bscmake @<< -/o$@ $(SBRS) -<< diff --git a/libraries/msdos/winsock/libldap.rc b/libraries/msdos/winsock/libldap.rc deleted file mode 100644 index 2c15d8d80c..0000000000 --- a/libraries/msdos/winsock/libldap.rc +++ /dev/null @@ -1,40 +0,0 @@ -#ifdef APSTUDIO_INVOKED - #error: this file is not editable by App Studio; use an editor -#endif //APSTUDIO_INVOKED - -#include "ver.h" - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,3,0,0 // LIBLDAP version 3.3 - PRODUCTVERSION 3,3,0,0 - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -#ifdef _DEBUG - FILEFLAGS (VS_FF_DEBUG|VS_FF_PRIVATEBUILD|VS_FF_PRERELEASE) -#else - FILEFLAGS VS_FF_PRERELEASE // beta version -// FILEFLAGS 0 // final version -#endif - FILEOS VOS_DOS_WINDOWS16 - FILETYPE VFT_APP - FILESUBTYPE 0 -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904E4" // lang=US English, Charset=Windows Multilingual - BEGIN - VALUE "CompanyName", "University of Michigan\0" - VALUE "FileDescription", "Lightweight Directory Access Protocol Library\0" - VALUE "FileVersion", "3.3b1\0" - VALUE "InternalName", "LIBLDAP\0" - VALUE "LegalCopyright", "Copyright (c) 1996 The Regents of The University of Michigan\0" - VALUE "LegalTrademarks", "None\0" - VALUE "OriginalFileName", "LIBLDAP.DLL\0" - VALUE "ProductName", "LIBLDAP\0" - VALUE "ProductVersion", "3.3b1\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1252 // English + Windows ANSI codepage - END -END diff --git a/libraries/msdos/winsock/ltest/console.c b/libraries/msdos/winsock/ltest/console.c deleted file mode 100644 index 2cacc0d325..0000000000 --- a/libraries/msdos/winsock/ltest/console.c +++ /dev/null @@ -1,257 +0,0 @@ -/* - * console.c -- simple windows console emulator for Winsock testing - * 27 June 1993 by Mark C Smith - */ -#include -#include -#include -#include "console.h" - -static char *argv[] = { "console", "rearwindow", 0 }; /* */ -char szAppName[20]; -char szLineBuf[512]; -HWND hInst; -HWND hWndMain, hWndOutputEdit; -HANDLE hAccel; - -int reg_classes( void ); -void unreg_classes( void ); - - - -int PASCAL -WinMain( HANDLE hInstance, HANDLE hPrevInst, LPSTR lpszCmdLine, int nCmdShow) -{ - MSG msg; - int rc; - - strcpy( szAppName, "console"); - - hInst = hInstance; - if ( !hPrevInst ) { - if (( rc = reg_classes()) != 0 ) { - MessageBox(0, "Couldn't register window classes", NULL, MB_ICONEXCLAMATION); - return( rc ); - } - } - - hWndMain = CreateWindow( - szAppName, /* Window class name */ - "Console", /* Window's title */ - WS_CAPTION | /* Title and Min/Max */ - WS_SYSMENU | /* Add system menu box */ - WS_MINIMIZEBOX | /* Add minimize box */ - WS_MAXIMIZEBOX | /* Add maximize box */ - WS_THICKFRAME | /* thick sizeable frame */ - WS_CLIPCHILDREN | /* don't draw in child windows areas */ - WS_OVERLAPPED, - CW_USEDEFAULT, 0, /* Use default X, Y */ - CW_USEDEFAULT, 0, /* Use default X, Y */ - 0, /* Parent window's handle */ - 0, /* Default to Class Menu */ - hInst, /* Instance of window */ - NULL ); /* Create struct for WM_CREATE */ - - if( !hWndMain ) { - MessageBox( 0, "Couldn't create main window", NULL, MB_ICONEXCLAMATION); - return( -1 ); - } - - ShowWindow( hWndMain, nCmdShow ); - - hAccel = LoadAccelerators( hInst, szAppName ); - - if (( hWndOutputEdit = new_editwindow( hWndMain, "console output" )) == NULL ) { - MessageBox( 0, "Couldn't create output window", NULL, MB_ICONEXCLAMATION); - return( -1 ); - } - - while( GetMessage( &msg, 0, 0, 0 )) { - if( TranslateAccelerator( hWndMain, hAccel, &msg )) { - continue; - } - - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - unreg_classes(); - return( msg.wParam ); -} - -LONG FAR PASCAL -WndProc( HWND hWnd, WORD msg, WORD wParam, LONG lParam ) -{ - HDC hDC; - PAINTSTRUCT ps; - - switch( msg ) { - case WM_COMMAND: - switch( wParam ) { - case IDM_F_OPENLDAP: - ldapmain( 2, argv ); - break; - - case IDM_F_EXIT: - PostQuitMessage( 0 ); - break; - - default: - return( DefWindowProc( hWnd, msg, wParam, lParam )); - } - - case WM_CREATE: - break; - - case WM_MOVE: - break; - - case WM_SIZE: - break; - - case WM_PAINT: - memset( &ps, 0x00, sizeof( PAINTSTRUCT )); - hDC = BeginPaint( hWnd, &ps ); - SetBkMode(hDC, TRANSPARENT); - - EndPaint(hWnd, &ps); - break; - - case WM_CLOSE: - DestroyWindow(hWnd); - if ( hWnd == hWndMain ) { - PostQuitMessage( 0 ); - } - break; - - default: - return( DefWindowProc( hWnd, msg, wParam, lParam )); - } - - return( 0L ); -} - -int -reg_classes( void ) -{ - WNDCLASS wndclass; - memset( &wndclass, 0x00, sizeof( WNDCLASS )); - - - wndclass.style = CS_HREDRAW | CS_VREDRAW | CS_BYTEALIGNWINDOW; - wndclass.lpfnWndProc = WndProc; - wndclass.cbClsExtra = 0; - wndclass.cbWndExtra = 0; - wndclass.hInstance = hInst; - wndclass.hIcon = LoadIcon(hInst, "CONSOLE"); - wndclass.hCursor = LoadCursor(NULL, IDC_ARROW); - wndclass.hbrBackground = (HBRUSH)( COLOR_WINDOW+1 ); - wndclass.lpszMenuName = szAppName; /* Menu Name is App Name */ - wndclass.lpszClassName = szAppName; /* Class Name is App Name */ - if( !RegisterClass( &wndclass )) { - return( -1 ); - } - - return( 0 ); -} - -void -unreg_classes( void ) -{ - UnregisterClass( szAppName, hInst ); -} - - -char * -getline( char *line, int len, FILE *s, char *prompt ) -{ - FARPROC lpfnDlgProc; - int nRc; - - printf( prompt ); - - lpfnDlgProc = MakeProcInstance((FARPROC)GetLineDlgProc, hInst); - nRc = DialogBox(hInst, MAKEINTRESOURCE(200), hWndMain, lpfnDlgProc); - FreeProcInstance(lpfnDlgProc); - if ( !nRc ) { - return( NULL ); - } - strncpy( line, szLineBuf, len ); - printf( "%s\n", line ); - return( line ); -} - - - -void -perror( char *msg ) -{ - printf( "%s: error %d\n", msg, WSAGetLastError()); -} - -void -appexit( int rc ) -{ - printf( "exit( %d )\n", rc ); -} - -int -fprintf( FILE *f, char *fmt, void *a1, void *a2, void *a3, void *a4, - void *a5 ) -{ - printf( fmt, a1, a2, a3, a4, a5 ); -} - -int -printf( char *fmt, void *a1, void *a2, void *a3, void *a4, void *a5 ) -{ - char *p, *send, buf[ 1024 ], *crlf = "\r\n"; - - sprintf( buf, fmt, a1, a2, a3, a4, a5 ); - - send = buf; - for ( p = buf; *p != '\0'; ++p ) { - if ( *p == '\n' ) { - *p = '\0'; - SendMessage( hWndOutputEdit, EM_REPLACESEL, 0, (long)send ); - SendMessage( hWndOutputEdit, EM_REPLACESEL, 0, (long)crlf ); - send = p + 1; - } - } - - if ( p > send ) { - SendMessage( hWndOutputEdit, EM_REPLACESEL, 0, (long)send ); - } -} - -BOOL FAR PASCAL -GetLineDlgProc(HWND hWndDlg, WORD Message, WORD wParam, LONG lParam) -{ - switch(Message) { - case WM_INITDIALOG: - /* cwCenter(hWndDlg, 0); */ - break; - - case WM_CLOSE: - /* Closing the Dialog behaves the same as Cancel */ - PostMessage(hWndDlg, WM_COMMAND, IDCANCEL, 0L); - break; - - case WM_COMMAND: - switch(wParam) { - case IDOK: - SendDlgItemMessage( hWndDlg, DLG_GETLINE_TEXT, WM_GETTEXT, sizeof( szLineBuf), - (long)szLineBuf ); - EndDialog(hWndDlg, TRUE); - break; - case IDCANCEL: - EndDialog(hWndDlg, FALSE); - break; - } - break; - - default: - return FALSE; - } - return TRUE; -} diff --git a/libraries/msdos/winsock/ltest/console.h b/libraries/msdos/winsock/ltest/console.h deleted file mode 100644 index 03f48bf082..0000000000 --- a/libraries/msdos/winsock/ltest/console.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - * console.h -- defines for a simple windows console emulator - * 27 June 1993 by Mark C Smith - */ - -#define IDM_FILE 1000 -#define IDM_F_OPENLDAP 1050 -#define IDM_F_EXIT 1100 -#define DLG_GETLINE_TEXT 102 - -#define exit( e ) appexit( e ); return( e ) - -void perror( char *msg ); -int printf( char *fmt, ... ); -int fprintf( FILE *f, char *fmt, ... ); -void appexit( int rc ); -char *getline( char *line, int len, FILE *s, char *prompt ); -LONG FAR PASCAL WndProc( HWND, WORD, WORD, LONG ); -BOOL FAR PASCAL GetLineDlgProc(HWND hWndDlg, WORD Message, WORD wParam, LONG lParam); diff --git a/libraries/msdos/winsock/ltest/inpdlg.dlg b/libraries/msdos/winsock/ltest/inpdlg.dlg deleted file mode 100644 index de0c641d44..0000000000 --- a/libraries/msdos/winsock/ltest/inpdlg.dlg +++ /dev/null @@ -1,14 +0,0 @@ -DLGINCLUDE RCDATA DISCARDABLE -BEGIN - "INPDLG.H\0" -END - -200 DIALOG 14, 28, 313, 34 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Getline" -FONT 8, "MS Sans Serif" -BEGIN - LTEXT "Input:", 101, 2, 3, 20, 8 - EDITTEXT DLG_GETLINE_TEXT, 25, 2, 245, 26, ES_AUTOHSCROLL - PUSHBUTTON "Enter", IDOK, 275, 6, 33, 14 -END diff --git a/libraries/msdos/winsock/ltest/inpdlg.h b/libraries/msdos/winsock/ltest/inpdlg.h deleted file mode 100644 index 2838cc5bd5..0000000000 --- a/libraries/msdos/winsock/ltest/inpdlg.h +++ /dev/null @@ -1 +0,0 @@ -#define DLG_GETLINE_TEXT 102 diff --git a/libraries/msdos/winsock/ltest/ltest.def b/libraries/msdos/winsock/ltest/ltest.def deleted file mode 100644 index 27416cd32a..0000000000 --- a/libraries/msdos/winsock/ltest/ltest.def +++ /dev/null @@ -1,9 +0,0 @@ -NAME CONSOLE -EXETYPE WINDOWS -STUB 'C:\windows\WINSTUB.EXE' -CODE PRELOAD MOVEABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 32768 -EXPORTS WndProc @1 - TEditWndProc @2 - GetLineDlgProc @3 diff --git a/libraries/msdos/winsock/ltest/ltest.mak b/libraries/msdos/winsock/ltest/ltest.mak deleted file mode 100644 index df5e9a6d92..0000000000 --- a/libraries/msdos/winsock/ltest/ltest.mak +++ /dev/null @@ -1,140 +0,0 @@ -# Microsoft Visual C++ generated build script - Do not modify - -PROJ = LTEST -DEBUG = 1 -PROGTYPE = 0 -CALLER = -ARGS = -DLLS = -D_RCDEFINES = -d_DEBUG -R_RCDEFINES = -dNDEBUG -ORIGIN = MSVC -ORIGIN_VER = 1.00 -PROJPATH = E:\SRC\LDAP-3.3B1\LIBRAR~1\MSDOS\WINSOCK\LTEST\ -USEMFC = 0 -CC = cl -CPP = cl -CXX = cl -CCREATEPCHFLAG = -CPPCREATEPCHFLAG = -CUSEPCHFLAG = -CPPUSEPCHFLAG = -FIRSTC = CONSOLE.C -FIRSTCPP = -RC = rc -CFLAGS_D_WEXE = /nologo /G2 /W3 /Gf /Zi /AL /Od /D "_DEBUG" /D "DOS" /D "NEEDPROTOS" /D "WINSOCK" /I "..\h" /I "..\winsock" /FR /GA /Fd"LIBLDAP.PDB" -CFLAGS_R_WEXE = /nologo /W3 /AM /O1 /D "NDEBUG" /D "DOS" /D "NEEDPROTOS" /D "WINSOCK" /I "..\winsock" /FR /GA -LFLAGS_D_WEXE = /NOLOGO /NOD /PACKC:61440 /STACK:10240 /ALIGN:16 /ONERROR:NOEXE /CO -LFLAGS_R_WEXE = /NOLOGO /NOD /PACKC:61440 /STACK:10240 /ALIGN:16 /ONERROR:NOEXE -LIBS_D_WEXE = oldnames libw llibcew commdlg.lib olecli.lib olesvr.lib shell.lib -LIBS_R_WEXE = oldnames libw mlibcew commdlg.lib olecli.lib olesvr.lib shell.lib -RCFLAGS = /nologo -RESFLAGS = /nologo -RUNFLAGS = -DEFFILE = LTEST.DEF -OBJS_EXT = -LIBS_EXT = ..\..\..\LIBLDAP\LIBLDAP.LIB ..\..\..\LIBLDAP\WINSOCK.LIB -!if "$(DEBUG)" == "1" -CFLAGS = $(CFLAGS_D_WEXE) -LFLAGS = $(LFLAGS_D_WEXE) -LIBS = $(LIBS_D_WEXE) -MAPFILE = nul -RCDEFINES = $(D_RCDEFINES) -!else -CFLAGS = $(CFLAGS_R_WEXE) -LFLAGS = $(LFLAGS_R_WEXE) -LIBS = $(LIBS_R_WEXE) -MAPFILE = nul -RCDEFINES = $(R_RCDEFINES) -!endif -!if [if exist MSVC.BND del MSVC.BND] -!endif -SBRS = CONSOLE.SBR \ - TEXTWIND.SBR \ - GETOPT.SBR \ - TEST.SBR - - -LIBLDAP_DEP = - -WINSOCK_DEP = - -CONSOLE_DEP = c:\msvc\include\winsock.h \ - e:\src\ldap-3.3b1\librar~1\msdos\winsock\ltest\console.h - - -TEXTWIND_DEP = e:\src\ldap-3.3b1\librar~1\msdos\winsock\ltest\console.h \ - e:\src\ldap-3.3b1\librar~1\msdos\winsock\ltest\textwind.h - - -LTEST_RCDEP = e:\src\ldap-3.3b1\librar~1\msdos\winsock\ltest\console.h \ - e:\src\ldap-3.3b1\librar~1\msdos\winsock\ltest\inpdlg.dlg - - -GETOPT_DEP = e:\src\ldap-3.3b1\include\lber.h \ - e:\src\ldap-3.3b1\include\proto-lb.h - - -TEST_DEP = e:\src\ldap-3.3b1\include\msdos.h \ - c:\msvc\include\winsock.h \ - e:\src\ldap-3.3b1\include\sys/socket.h \ - e:\src\ldap-3.3b1\include\sys/file.h \ - e:\src\ldap-3.3b1\include\lber.h \ - e:\src\ldap-3.3b1\include\proto-lb.h \ - e:\src\ldap-3.3b1\include\ldap.h \ - e:\src\ldap-3.3b1\include\proto-ld.h - - -all: $(PROJ).EXE $(PROJ).BSC - -CONSOLE.OBJ: CONSOLE.C $(CONSOLE_DEP) - $(CC) $(CFLAGS) $(CCREATEPCHFLAG) /c CONSOLE.C - -TEXTWIND.OBJ: TEXTWIND.C $(TEXTWIND_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c TEXTWIND.C - -LTEST.RES: LTEST.RC $(LTEST_RCDEP) - $(RC) $(RCFLAGS) $(RCDEFINES) -r LTEST.RC - -GETOPT.OBJ: ..\..\..\MACINTOS\GETOPT.C $(GETOPT_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c ..\..\..\MACINTOS\GETOPT.C - -TEST.OBJ: ..\..\..\LIBLDAP\TEST.C $(TEST_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c ..\..\..\LIBLDAP\TEST.C - - -$(PROJ).EXE:: LTEST.RES - -$(PROJ).EXE:: CONSOLE.OBJ TEXTWIND.OBJ GETOPT.OBJ TEST.OBJ $(OBJS_EXT) $(DEFFILE) - echo >NUL @<<$(PROJ).CRF -CONSOLE.OBJ + -TEXTWIND.OBJ + -GETOPT.OBJ + -TEST.OBJ + -$(OBJS_EXT) -$(PROJ).EXE -$(MAPFILE) -c:\msvc\lib\+ -c:\msvc\mfc\lib\+ -c:\src\lib\+ -e:.\+ -..\..\..\LIBLDAP\LIBLDAP.LIB+ -..\..\..\LIBLDAP\WINSOCK.LIB+ -$(LIBS) -$(DEFFILE); -<< - link $(LFLAGS) @$(PROJ).CRF - $(RC) $(RESFLAGS) LTEST.RES $@ - @copy $(PROJ).CRF MSVC.BND - -$(PROJ).EXE:: LTEST.RES - if not exist MSVC.BND $(RC) $(RESFLAGS) LTEST.RES $@ - -run: $(PROJ).EXE - $(PROJ) $(RUNFLAGS) - - -$(PROJ).BSC: $(SBRS) - bscmake @<< -/o$@ $(SBRS) -<< diff --git a/libraries/msdos/winsock/ltest/ltest.rc b/libraries/msdos/winsock/ltest/ltest.rc deleted file mode 100644 index 60622a5220..0000000000 --- a/libraries/msdos/winsock/ltest/ltest.rc +++ /dev/null @@ -1,22 +0,0 @@ -#include -#include "console.h" - - -CONSOLE MENU - BEGIN - POPUP "&File" - BEGIN - MENUITEM "&Open LDAP", IDM_F_OPENLDAP - MENUITEM SEPARATOR - MENUITEM "E&xit\tAlt+F4", IDM_F_EXIT - END - END - - -CONSOLE ACCELERATORS - BEGIN - VK_F12, IDM_F_OPENLDAP, VIRTKEY, CONTROL - VK_F4, IDM_F_EXIT, ALT, VIRTKEY - END - -#include "inpdlg.dlg" diff --git a/libraries/msdos/winsock/ltest/ltest32.mak b/libraries/msdos/winsock/ltest/ltest32.mak deleted file mode 100644 index 586018c653..0000000000 --- a/libraries/msdos/winsock/ltest/ltest32.mak +++ /dev/null @@ -1,348 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 4.10 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Application" 0x0101 - -!IF "$(CFG)" == "" -CFG=LTEST - Win32 Debug -!MESSAGE No configuration specified. Defaulting to LTEST - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "LTEST - Win32 Release" && "$(CFG)" != "LTEST - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE on this makefile -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "LTEST32.MAK" CFG="LTEST - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "LTEST - Win32 Release" (based on "Win32 (x86) Application") -!MESSAGE "LTEST - Win32 Debug" (based on "Win32 (x86) Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF -################################################################################ -# Begin Project -# PROP Target_Last_Scanned "LTEST - Win32 Debug" -CPP=cl.exe -RSC=rc.exe -MTL=mktyplib.exe - -!IF "$(CFG)" == "LTEST - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -OUTDIR=.\Release -INTDIR=.\Release - -ALL : "$(OUTDIR)\LTEST32.exe" - -CLEAN : - -@erase "$(INTDIR)\console.obj" - -@erase "$(INTDIR)\getopt.obj" - -@erase "$(INTDIR)\ltest.res" - -@erase "$(INTDIR)\test.obj" - -@erase "$(INTDIR)\textwind.obj" - -@erase "$(OUTDIR)\LTEST32.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /W3 /O1 /I "..\winsock" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "DOS" /D "NEEDPROTOS" /D "WINSOCK" /FR /YX /c -# ADD CPP /nologo /W3 /O1 /I "..\..\..\..\include" /I "." /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "DOS" /D "NEEDPROTOS" /D "WINSOCK" /YX /c -# SUBTRACT CPP /Fr -CPP_PROJ=/nologo /ML /W3 /O1 /I "..\..\..\..\include" /I "." /D "WIN32" /D\ - "NDEBUG" /D "_WINDOWS" /D "DOS" /D "NEEDPROTOS" /D "WINSOCK"\ - /Fp"$(INTDIR)/LTEST32.pch" /YX /Fo"$(INTDIR)/" /c -CPP_OBJS=.\Release/ -CPP_SBRS=.\. -# ADD BASE MTL /nologo /D "NDEBUG" /win32 -# ADD MTL /nologo /D "NDEBUG" /win32 -MTL_PROJ=/nologo /D "NDEBUG" /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -RSC_PROJ=/l 0x409 /fo"$(INTDIR)/ltest.res" /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/LTEST32.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -# ADD BASE LINK32 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /stack:0x2800 /subsystem:windows /machine:IX86 -# ADD LINK32 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /stack:0x2800 /subsystem:windows /machine:IX86 -LINK32_FLAGS=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib\ - comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\ - odbc32.lib odbccp32.lib /nologo /stack:0x2800 /subsystem:windows\ - /incremental:no /pdb:"$(OUTDIR)/LTEST32.pdb" /machine:IX86 /def:".\ltest.def"\ - /out:"$(OUTDIR)/LTEST32.exe" -DEF_FILE= \ - ".\ltest.def" -LINK32_OBJS= \ - "$(INTDIR)\console.obj" \ - "$(INTDIR)\getopt.obj" \ - "$(INTDIR)\ltest.res" \ - "$(INTDIR)\test.obj" \ - "$(INTDIR)\textwind.obj" \ - "..\..\..\..\..\..\MSDEV\LIB\WSOCK32.LIB" \ - "..\..\..\libldap\Debug\ldap32.lib" - -"$(OUTDIR)\LTEST32.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "LTEST - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -OUTDIR=.\Debug -INTDIR=.\Debug - -ALL : "$(OUTDIR)\LTEST32.exe" - -CLEAN : - -@erase "$(INTDIR)\console.obj" - -@erase "$(INTDIR)\getopt.obj" - -@erase "$(INTDIR)\ltest.res" - -@erase "$(INTDIR)\test.obj" - -@erase "$(INTDIR)\textwind.obj" - -@erase "$(OUTDIR)\LTEST32.exe" - -@erase "$(OUTDIR)\LTEST32.ilk" - -@erase "$(OUTDIR)\LTEST32.pdb" - -@erase ".\LIBLDAP.IDB" - -@erase ".\LIBLDAP.PDB" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /W3 /Gm /Zi /Od /Gf /I "..\h" /I "..\winsock" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "DOS" /D "NEEDPROTOS" /D "WINSOCK" /FR /YX /Fd"LIBLDAP.PDB" /c -# ADD CPP /nologo /W3 /Gm /Zi /Od /Gf /I "..\h" /I "..\..\..\..\include" /I "." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "DOS" /D "NEEDPROTOS" /D "WINSOCK" /YX /Fd"LIBLDAP.PDB" /c -# SUBTRACT CPP /Fr -CPP_PROJ=/nologo /MLd /W3 /Gm /Zi /Od /Gf /I "..\h" /I "..\..\..\..\include" /I\ - "." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "DOS" /D "NEEDPROTOS" /D "WINSOCK"\ - /Fp"$(INTDIR)/LTEST32.pch" /YX /Fo"$(INTDIR)/" /Fd"LIBLDAP.PDB" /c -CPP_OBJS=.\Debug/ -CPP_SBRS=.\. -# ADD BASE MTL /nologo /D "_DEBUG" /win32 -# ADD MTL /nologo /D "_DEBUG" /win32 -MTL_PROJ=/nologo /D "_DEBUG" /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -RSC_PROJ=/l 0x409 /fo"$(INTDIR)/ltest.res" /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/LTEST32.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -# ADD BASE LINK32 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /stack:0x2800 /subsystem:windows /debug /machine:IX86 -# ADD LINK32 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /stack:0x2800 /subsystem:windows /debug /machine:IX86 -LINK32_FLAGS=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib\ - comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\ - odbc32.lib odbccp32.lib /nologo /stack:0x2800 /subsystem:windows\ - /incremental:yes /pdb:"$(OUTDIR)/LTEST32.pdb" /debug /machine:IX86\ - /def:".\ltest.def" /out:"$(OUTDIR)/LTEST32.exe" -DEF_FILE= \ - ".\ltest.def" -LINK32_OBJS= \ - "$(INTDIR)\console.obj" \ - "$(INTDIR)\getopt.obj" \ - "$(INTDIR)\ltest.res" \ - "$(INTDIR)\test.obj" \ - "$(INTDIR)\textwind.obj" \ - "..\..\..\..\..\..\MSDEV\LIB\WSOCK32.LIB" \ - "..\..\..\libldap\Debug\ldap32.lib" - -"$(OUTDIR)\LTEST32.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - -.c{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.c{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -################################################################################ -# Begin Target - -# Name "LTEST - Win32 Release" -# Name "LTEST - Win32 Debug" - -!IF "$(CFG)" == "LTEST - Win32 Release" - -!ELSEIF "$(CFG)" == "LTEST - Win32 Debug" - -!ENDIF - -################################################################################ -# Begin Source File - -SOURCE=.\console.c -DEP_CPP_CONSO=\ - ".\console.h"\ - - -"$(INTDIR)\console.obj" : $(SOURCE) $(DEP_CPP_CONSO) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\textwind.c -DEP_CPP_TEXTW=\ - ".\console.h"\ - ".\textwind.h"\ - - -"$(INTDIR)\textwind.obj" : $(SOURCE) $(DEP_CPP_TEXTW) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\ltest.rc - -!IF "$(CFG)" == "LTEST - Win32 Release" - - -"$(INTDIR)\ltest.res" : $(SOURCE) "$(INTDIR)" - $(RSC) $(RSC_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "LTEST - Win32 Debug" - -DEP_RSC_LTEST=\ - ".\console.h"\ - ".\inpdlg.dlg"\ - - -"$(INTDIR)\ltest.res" : $(SOURCE) $(DEP_RSC_LTEST) "$(INTDIR)" - $(RSC) $(RSC_PROJ) $(SOURCE) - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="\src\ldap-3.3b1\libraries\macintos\getopt.c" -DEP_CPP_GETOP=\ - "..\..\..\..\include\lber.h"\ - "..\..\..\..\include\proto-lb.h"\ - "..\..\..\..\include\proto-lber.h"\ - - -"$(INTDIR)\getopt.obj" : $(SOURCE) $(DEP_CPP_GETOP) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="\src\ldap-3.3b1\libraries\libldap\test.c" -DEP_CPP_TEST_=\ - "..\..\..\..\include\lber.h"\ - "..\..\..\..\include\ldap.h"\ - "..\..\..\..\include\msdos.h"\ - "..\..\..\..\include\proto-lb.h"\ - "..\..\..\..\include\proto-lber.h"\ - "..\..\..\..\include\proto-ld.h"\ - "..\..\..\..\include\proto-ldap.h"\ - ".\console.h"\ - {$(INCLUDE)}"\sys\stat.h"\ - {$(INCLUDE)}"\sys\types.h"\ - -NODEP_CPP_TEST_=\ - "..\..\..\libldap\macos.h"\ - "..\..\..\libldap\msdos.h"\ - - -"$(INTDIR)\test.obj" : $(SOURCE) $(DEP_CPP_TEST_) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\ltest.def - -!IF "$(CFG)" == "LTEST - Win32 Release" - -!ELSEIF "$(CFG)" == "LTEST - Win32 Debug" - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="\src\ldap-3.3b1\libraries\libldap\Debug\ldap32.lib" - -!IF "$(CFG)" == "LTEST - Win32 Release" - -!ELSEIF "$(CFG)" == "LTEST - Win32 Debug" - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=\MSDEV\LIB\WSOCK32.LIB - -!IF "$(CFG)" == "LTEST - Win32 Release" - -!ELSEIF "$(CFG)" == "LTEST - Win32 Debug" - -!ENDIF - -# End Source File -# End Target -# End Project -################################################################################ diff --git a/libraries/msdos/winsock/ltest/ltest32.mdp b/libraries/msdos/winsock/ltest/ltest32.mdp deleted file mode 100644 index 5cd47fdf5f9982f76a1bcc2128cea3367fd8218a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 37376 zcmeHQZ)_aLb$>_l_)oMXTGSuMO1x(5t0L)+)Sspl)1>@!lthOVuRK{|&R0mw+a-C? z^7gR1Cy_-9tBswgiDEO3<0xs68ii5#Ljvf73%Gy)^Fs;0|*F^@Pj`XMFFWr zfe5Ir^!H|G_m0aGMWKL^nzPby-|f8l?VC4m-ptLu*?T5?qPLNnXq2dd)UoL_@OyP^ zY7MMx>e{Qye}$5Cl0Hv+h;^}5{8d`nJQ@fGynCCc&Z?$W4Kz^;b&O}zr-svqj;6-X z4E@WykNGx{q~-2&v>Gmv@@pT7VT0hl_H8!`}1)+M6p;a(JL*P_rH;& zyTeJEe3@uFrjtKJ*$;Q+FuNp*<6n&Ew=3{B`!1fRM{sR;&MaKe5)&1V;Y9xJIDIL^ zd+G%rFB`#&*TL(k;*ARFP?nE4jf8lf#5*0qYZiQ~<$Dy@63>MhzeTV`C@V z0ntC_XyDPju$Qy4o zc9e~_M^}iKF3!xDj#(<0E@Qe$+Ar?EGsOLw#QjK&PDLqrt9L*=}zLl&7Gu+-(vkGLwrl(=Og%AMLk#B{We@nOqw%} z>CS0cPxmS=t}x!8gm^b3-g6S~$H?b)+k$gc&%1Fg5h}!3W%V&?{y0uUA#N9Jg!PaC z?o^HcU~d(*hiZS9JyYDr)Z;W3;ytzh>N&=1{|2Fl(RQ}G%g1t}FUIN5L%yr>zPrCE z_=J5jAK!NXHIGs2y|)|CkAI#c)=ySPXM>Vl(atU%$F(mBzLwuDfsfNdHc1V@<3mGY zJhtnoe%KBJBrTg*oS(L>zz+HTozN=xTR!&wo!?jAguG3XzJl{Uq&N+V`WywFN8)-9 z;G99ZlSpHr8ShDOPJv#Ip*~0k=)`HWFjp!T%AhOdvh8?$H}>z1x37VRQ=ImO`nmx= zt{>IZkNFutTECsR9@cL(Q7Tv!!|w-4y8OmD;QmpF+x2bupl6fRC~@CmP#la~+x{y* z$rEcNYy$4LK#EZl?5R2)84_>j2Jkw8H<^%43fEi~4u(-*3*~zYc&yhh;IU5G_Xc*- zB<@eQZ=v74{`DN%nP{}+qT3Ta1G^*Fkql`X*>i(sw`~l=PnO!WKaPSHoKW+q8lD@R*yJD4QkJ zuk+iim$pzZ?*fE z*6?kK@bLm%oQ|&H>xl3*3ch1&_#TPy`SY%?tl`@g;o~;zq+#%N&`sD^pR}0)*o=k5 z#~qv(B)#XQ9K9gv0nkg5o&)_8NiTtZQ_?G--;(tC@5A><`sS;!e@SouK~DJ5pVqO@ z?GbsKA&;;tIqwYGXIq5NpC?x52La!s5k8);#o^h5d2GPfDfxnNgKaHNT_N8uP%pOA zMeySQ2DuKPSLaz>OFnKx z1lPCssyod4T;wn!Q+1MU^yqvX-3orEej)1Z9l&uahoEzY;R|T zzS`fJYfKWSJ!|C5dUjd!g+;q&L_4+L>jN(*9{-wOKp~h^?f4g!m%o=CPZTZF)ruv2 zr@$QZ>t@0Cf!v01F>gT6#`iMod+5_SwEv3?OZ2b)>HgztZ4(VA=}GwePSH;OJmd!O z_~^s=s-(}qlA~*qz7F~gNfY|}O{O8of8+c<(wBk9K4%5=n=dEDyzxIk!+yl~rMsZn zzE7D8VkUB7UUx2_n%Y>=jZ-3Q-!$&C{9LtO2UsW^++Us+?a=hw70g{SKb7-^+Ira) zR~xcz&F8!KHuyNPo|-nGC;omooUltX#o3CZd-zH$3>xD`)!%#o`53Qz19)OyS(z@Q z853wn0d}W759zA@<|uT@cn9m?)%~7;ukC4bMz2^NJBUP8Rvs#6=RA0zoei-D?zeAa zT<668>@&bWiEED|^=^Ak=yRXYQ~cgt=!lb;f7R+UMVa>@-{*aO{_Z{SaAJGjE#z{-*_ZX@lKvL94RwP{(G`KpQo(*X6;5$dG9Y^Ux(+WfvD5 z2iZs9Xhw?ii46HC;A?sS-%aGdhQverdUydJ-~K^-U=h!-H^RrfqDs7O!IcX7ZLmJ6 z*8hB8sn-8mGHU&g`-fWpQ|o`2jbI+H*8kM{U+w%{t^fJ`B3L(4>wlO)s`WpfV201T z)%u@YPgLuFYW+{G|E+nRsn-9nZl~7&KJoRxZCIh?HPRheXWofbLXOu^$7az$8`i#f z3676{`wRap{))9Ru^~icvsK{v+d!L)SxXKx7c;fu>LbC`A;;7&1UV>uc_%;J_ZG{h zHePgft2kSlH%lIu0(Mj$5|Qk6uc)GY@GH z@8IaAkmV(?bV-)t#Uf&&rWduG>DU1V!k+?$(UQ5K7d#CiG=Ff4&#w~sI?g%$Ux z74>`I+3NF5Tr`~-%f1v8e+5~ceikCU5P~VDW$Mf~IHlCL6f*J#NzXH5tC zsVDpoz_LAHiQXAYzRSBZ4ho{3Oru^qeGHbZzF5)HLor%@EIl@cVrUh#(O(LS(T?kY z3)Ne2=T~-*7YmN<+B10Yb>P6-c4iypCFuMx6cC340#C^OtfSzAV&0A`Nz;;{OV!rsDrp{2%&)ivRQDl2!blivLsbe=7bD z`>0g>pNjvZ>>ohA__&jm!RKkyD7V(a8x*NtPejwu$_X6i+4Nko{M-D&>BDis% z+t{Uoql4zKKj4YC-mcGLAHox)(Ua5-Zgp%94Ybo2UJq)j)_>v2u=uzmSW;E%ziRzgt^cb1 z-xz1r{%^JayCtLcf2;l9i1ZXQWPYB*NA12)75}OBf2;l9;(KoR{8#P&UbFvQ#eb^! z&${b7YW-L3|E^tM{Ur8(KZW<)B=8QVee?yq$>snZ6tf!jXLD$vO|1W69hr8HogT@a z){@%U(NjkbYm*~mBZJuyF_!N=D6zqA!nw2@aaZxV^Z0?+C1vs{4N)}Lh#giW@m7*a~Y-73*Fn}zS<%dvy zm!m!VdlwG(_4aB#Ze`kCbUkyvAF>$sC0FY~D>^2J=;~H~2@PI0ru#$n26e_o=xAOq z%oR&!|L9cT7ojn8roTIt_mzkbV6ZFR+OpCd}PA#WLaIe8>?WcpAZN^o=s zZ%E9~yN2!NSvz*&f)AKS%&v*uv5%P&B!2QN6$~;c@e` zCMI_t-)jGQ{HQJ0JugfS%nz-QP|rsyd_!W0OHmen$%KI~-c-Fti85p;L&}$v&{o5V&SIsZ)O6{mVzprcPm0E*wJY z33vFx;G)5629u9V_xK4MLMP!j%<;(U>YzNLpVeY zBe#s?X%E|E9j0b$+H_LuFtnE)+q09_^mv074G1g;h#;na-kD-M( zSh?$QbOiNTzuE!Y1L_rT?Mgp$_LFR|_F}1w`Ed&A{!Oo1wSJd)s8;pc*8l6jq7(0z zQ}2IV8;`~B2m3U<|51*G>ZCNFG@vw~G@vw~G@vw~G@vw~G@vw~G@vw~H1H|bKnlN0 z)QjKDI*eb1IZA&_U&MQ!`{)?;;}^~Tl)n5auDPljzs*QI-No;3RUfXX_zxBTq2fQp z<1zV=3=i;B{6{qgOvQhMQDQ3oL&bj}Y;e>02^Ie_sp3CY2Nl)}>QM0?_PTKyD*j_~ zLjgM~{v!;Es)=<90y`cM%oMO~D5^)re{8bf|5U3Wn_B~aMgufRL-_UYG>zbwOiyfX Lb!@WQx6%IsYXDqY diff --git a/libraries/msdos/winsock/ltest/textwind.c b/libraries/msdos/winsock/ltest/textwind.c deleted file mode 100644 index 80f522f73c..0000000000 --- a/libraries/msdos/winsock/ltest/textwind.c +++ /dev/null @@ -1,130 +0,0 @@ -/* - * textwind.c - */ -#include -#include -#include "console.h" -#include "textwind.h" - -static BOOL windclassreg = FALSE; -extern HWND hInst; - -/* - * local prototypes - */ -BOOL register_editclass( void ); - - -HWND -new_editwindow( HWND hParent, char *lpszTitle ) -{ - HWND hWnd, hEditWnd; - RECT r; - - /* - * register text edit window class if we have not already done so - */ - if ( !windclassreg && !register_editclass()) { - return( NULL ); - } - - /* - * create an instance of text edit window - */ - hWnd = CreateWindow( WINDCLASS_TEDIT, lpszTitle != NULL ? lpszTitle : "Untitled", - WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, - hParent, NULL, hInst, NULL ); - - if ( !hWnd ) { - return( NULL ); - } - - /* - * create a child Edit controls that fills the text edit window - */ - GetClientRect( hWnd, (LPRECT)&r ); - hEditWnd = CreateWindow( "Edit", NULL, - WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL | ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_MULTILINE, - 0, 0, r.right - r.left, r.bottom - r.top, hWnd, IDC_EDIT, hInst, NULL ); - - if ( !hEditWnd ) { - DestroyWindow( hWnd ); - return( NULL ); - } - - /* - * add edit control to property list of window - */ - if( !SetProp( hWnd, "hEditWnd", hEditWnd )) { - DestroyWindow( hWnd ); - return( NULL ); - } - - if ( lpszTitle != NULL ) { - SetWindowText( hWnd, lpszTitle ); - } - - /* - * show and draw the new window - */ - ShowWindow( hWnd, SW_SHOWNORMAL ); - UpdateWindow( hWnd ); - return( hEditWnd ); -} - - -BOOL -register_editclass() -{ - WNDCLASS wc; - - memset( &wc, 0x00, sizeof(WNDCLASS) ); - - wc.style = CS_HREDRAW | CS_VREDRAW | CS_BYTEALIGNWINDOW; - wc.lpfnWndProc = TEditWndProc; - wc.hInstance = hInst; - wc.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1 ); - wc.lpszClassName = WINDCLASS_TEDIT; - return( windclassreg = RegisterClass( &wc )); -} - - -void -memory_error( void ) -{ - MessageBox( GetFocus(), "Out of memory", "Sample", MB_ICONHAND | MB_OK ); -} - - -long FAR PASCAL TEditWndProc( HWND hWnd, unsigned message, WORD wParam, LONG lParam ) -{ - HWND hEditWnd; - - hEditWnd = GetProp( hWnd, "hEditWnd" ); - - switch( message ) { - case WM_COMMAND: - switch( wParam ) { - case IDC_EDIT: - if ( HIWORD( lParam ) == EN_ERRSPACE ) { - memory_error(); - } - break; - } - break; - - case WM_SETFOCUS: - SetFocus( hEditWnd ); - break; - - case WM_SIZE: - MoveWindow( hEditWnd, 0, 0, LOWORD(lParam), HIWORD(lParam), TRUE ); - break; - - default: - return( DefWindowProc( hWnd, message, wParam, lParam )); - } - - return( NULL ); -} diff --git a/libraries/msdos/winsock/ltest/textwind.h b/libraries/msdos/winsock/ltest/textwind.h deleted file mode 100644 index b61cb8a4a2..0000000000 --- a/libraries/msdos/winsock/ltest/textwind.h +++ /dev/null @@ -1,13 +0,0 @@ -/* - * textwind.h - */ - -#define WINDCLASS_TEDIT "TextClass" -#define IDC_EDIT 100 - -/* - * prototypes - */ -HWND new_editwindow( HWND hParent, char *lpszTtitle ); -void memory_error( void ); -long FAR PASCAL TEditWndProc( HWND hWnd, unsigned message, WORD wParam, LONG lParam ); diff --git a/libraries/msdos/winsock/makefile b/libraries/msdos/winsock/makefile deleted file mode 100644 index 9bdb965d16..0000000000 --- a/libraries/msdos/winsock/makefile +++ /dev/null @@ -1,680 +0,0 @@ -# Microsoft Visual C++ generated build script - Do not modify -# Microsoft Visual C++ generated build script - Do not modify -# but due to buffer length limitataions for both preprocessor defines -# and include paths we went to using this file as an external makefile -# April 1995 sgr@umich.edu - -PROJ = LIBLDAP -DEBUG = 0 -PROGTYPE = 1 - -WINSOCK = 1 # want winsock api, no vendor specific calls -DOS = 1 # windows lives on top of DOS at present -NEEDPROTOS = 1 # need strict typeing in fcn declarations -KERBEROS = 1 # Kerberos or no, your choice - -#include paths will vary per site, I've broken them up by function -INC_MSVC = c:\msvc\include -INC_LDAP = q:\src\ldap-3.2b1\include -INC_KERBEROS = q:\src\krb\mit_env\kerberos\include;q:\src\krb\mit_env\kerberos -INC_WSHELPER = c:\src\mit\wshelper -INC_AUTHMAN = c:\src\authman\dll -INC_MITENV = q:\src\krb\mit_env\localh - -#order is important -INCLUDE = $(INC_MSVC);$(INC_LDAP);$(INC_AUTHMAN);$(INC_MITENV);$(INC_KERBEROS);$(INC_WSHELPER) - -LDAP_FLAGS = /D "TEMPLATEFILE" ="""ldtmpl.cfg"""\ - /D "FILTERFILE"="""ldfilter.cfg""" - -!if "$(KERBEROS)" == "1" -# WSHELPER -# with kerberos, we need to use WSHELPER (Winsock Helper) to do -# gethostbyaddr() calls for us because we can't count on the vendor's -# (Novell) tcp/ip stack doing this right. The real name of the ldap -# server is required to get service tickets. -# -LDAP_FLAGS = $(LDAP_FLAGS) /D "KERBEROS" /D "WSHELPER" /D "AUTHMAN" -# SET INCLUDE=$(INCLUDE), $(INC_KERBEROS), $(INC_WSHELPER), $(INC_AUTHMAN), $(INC_MITENV) -!endif -# _WINDOWS -# authman.h requires _WINDOWS (with a value!), which is set automatically by -# particular options related to prolog/epilog code generation -# which are true for AUTHMAN, but not libldap, so do this manually. -# -# -# __MSDOS__ -# krb.h (well really osconf.h, via conf.h, via krb.h) doesn't recognize -# microsoft's default "_MSDOS". It wants __MSDOS__, so provide it. -# -# WINDOWS -# same crap, this time from conf-pc.h, this time with WINDOWS -# -# _WINDLL -# Wshelper.h requires _WINDLL to be defined. Default configuration -# of libldap doesn't use any prolog/epilog optimization, so _WINDLL -# isn't defined by default. -# -!if "$(WINSOCK)"=="1" -LDAP_FLAGS = $(LDAP_FLAGS)\ - /D "WINSOCK"\ - /D "_WINDOWS"\ - /D "__MSDOS__"\ - /D "WINDOWS"\ - /D "_WINDLL"\ - /D "NO_USERINTERFACE" -!endif -!if "$(DOS)"=="1" -LDAP_FLAGS = $(LDAP_FLAGS) /D "DOS" -!endif -!if "$(NEEDPROTOS)"=="1" -LDAP_FLAGS = $(LDAP_FLAGS) /D "NEEDPROTOS" -!endif - -CALLER = -ARGS = -DLLS = -D_RCDEFINES = /d_DEBUG -R_RCDEFINES = /dNDEBUG -ORIGIN = MSVC -ORIGIN_VER = 1.00 -PROJPATH = Q:\SRC\LDAP-3.2B1\LIB\LIBLDAP\ -USEMFC = 0 -CC = cl -CPP = cl -CXX = cl -CCREATEPCHFLAG = -CPPCREATEPCHFLAG = -CUSEPCHFLAG = -CPPUSEPCHFLAG = -FIRSTC = ABANDON.C -FIRSTCPP = -RC = rc -CFLAGS_D_WDLL = /nologo /G2 /W3 /Gf /Zi /ALu /Od /D "_DEBUG" /FR /Fd"LIBLDAP.PDB" -CFLAGS_R_WDLL = /nologo /f- /G3 /W3 /Gf /ALu /Od /D "NDEBUG" /FR -LFLAGS_D_WDLL = /NOLOGO /NOD /NOE /PACKC:61440 /ALIGN:16 /ONERROR:NOEXE /CO /MAP:FULL -LFLAGS_R_WDLL = /NOLOGO /NOD /NOE /PACKC:61440 /ALIGN:16 /ONERROR:NOEXE /MAP:FULL -LIBS_D_WDLL = oldnames libw ldllcew authlib krbv4win wshelper commdlg.lib olecli.lib olesvr.lib shell.lib -LIBS_R_WDLL = oldnames libw ldllcew authlib krbv4win wshelper commdlg.lib olecli.lib olesvr.lib shell.lib -RCFLAGS = /nologo -RESFLAGS = /nologo -RUNFLAGS = -DEFFILE = LIBLDAP.DEF -OBJS_EXT = -LIBS_EXT = WINSOCK.LIB -!if "$(DEBUG)" == "1" -CFLAGS = $(CFLAGS_D_WDLL) $(LDAP_FLAGS) -LFLAGS = $(LFLAGS_D_WDLL) -LIBS = $(LIBS_D_WDLL) -MAPFILE = nul -RCDEFINES = $(D_RCDEFINES) -!else -CFLAGS = $(CFLAGS_R_WDLL) $(LDAP_FLAGS) -LFLAGS = $(LFLAGS_R_WDLL) -LIBS = $(LIBS_R_WDLL) -MAPFILE = nul -RCDEFINES = $(R_RCDEFINES) -!endif -!if [if exist MSVC.BND del MSVC.BND] -!endif -SBRS = ABANDON.SBR \ - ADD.SBR \ - BIND.SBR \ - CACHE.SBR \ - COMPARE.SBR \ - DELETE.SBR \ - ERROR.SBR \ - GETFILTE.SBR \ - REGEX.SBR \ - MODIFY.SBR \ - MODRDN.SBR \ - GETDN.SBR \ - GETENTRY.SBR \ - GETATTR.SBR \ - ADDENTRY.SBR \ - RESULT.SBR \ - SEARCH.SBR \ - UFN.SBR \ - OPENWSA.SBR \ - DECODE.SBR \ - ENCODE.SBR \ - IO.SBR \ - MSDOS.SBR \ - SBIND.SBR \ - UNBIND.SBR \ - KBIND.SBR \ - FRIENDLY.SBR \ - DISPTMPL.SBR \ - DSPARSE.SBR \ - FREE.SBR \ - SORT.SBR \ - SRCHPREF.SBR \ - TMPLOUT.SBR \ - KERBEROS.SBR \ - GETVALUE.SBR - - -WINSOCK_DEP = - -ABANDON_DEP = $(INC_LDAP)\sys\socket.h \ - $(INC_LDAP)\msdos.h \ - $(INC_LDAP)\winsock.h \ - $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h \ - $(INC_LDAP)\ldap.h \ - $(INC_LDAP)\proto-ld.h - - -ADD_DEP = $(INC_LDAP)\msdos.h \ - $(INC_LDAP)\winsock.h \ - $(INC_LDAP)\sys/socket.h \ - $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h \ - $(INC_LDAP)\ldap.h \ - $(INC_LDAP)\proto-ld.h - - -BIND_DEP = $(INC_LDAP)\msdos.h \ - $(INC_LDAP)\winsock.h \ - $(INC_LDAP)\sys/socket.h \ - $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h \ - $(INC_LDAP)\ldap.h \ - $(INC_LDAP)\proto-ld.h - - -CACHE_DEP = $(INC_LDAP)\msdos.h \ - $(INC_LDAP)\winsock.h \ - $(INC_LDAP)\sys/socket.h \ - $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h \ - $(INC_LDAP)\ldap.h \ - $(INC_LDAP)\proto-ld.h - - -COMPARE_DEP = $(INC_LDAP)\sys/socket.h \ - $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h \ - $(INC_LDAP)\ldap.h \ - $(INC_LDAP)\winsock.h \ - $(INC_LDAP)\proto-ld.h - - -DELETE_DEP = $(INC_LDAP)\msdos.h \ - $(INC_LDAP)\winsock.h \ - $(INC_LDAP)\sys/socket.h \ - $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h \ - $(INC_LDAP)\ldap.h \ - $(INC_LDAP)\proto-ld.h - - -ERROR_DEP = $(INC_LDAP)\msdos.h \ - $(INC_LDAP)\winsock.h \ - $(INC_LDAP)\sys/socket.h \ - $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h \ - $(INC_LDAP)\ldap.h \ - $(INC_LDAP)\proto-ld.h - - -GETFILTE_DEP = $(INC_LDAP)\regex.h \ - $(INC_LDAP)\msdos.h \ - $(INC_LDAP)\winsock.h \ - $(INC_LDAP)\sys/file.h \ - $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h \ - $(INC_LDAP)\ldap.h \ - $(INC_LDAP)\proto-ld.h - - -REGEX_DEP = $(INC_LDAP)\portable.h \ - $(INC_LDAP)\regex.h - - -MODIFY_DEP = $(INC_LDAP)\sys/socket.h \ - $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h \ - $(INC_LDAP)\ldap.h \ - $(INC_LDAP)\winsock.h \ - $(INC_LDAP)\proto-ld.h - - -MODRDN_DEP = $(INC_LDAP)\sys/socket.h \ - $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h \ - $(INC_LDAP)\ldap.h \ - $(INC_LDAP)\winsock.h \ - $(INC_LDAP)\proto-ld.h - - -GETDN_DEP = $(INC_LDAP)\msdos.h \ - $(INC_LDAP)\winsock.h \ - $(INC_LDAP)\sys/socket.h \ - $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h \ - $(INC_LDAP)\ldap.h \ - $(INC_LDAP)\proto-ld.h - - -GETENTRY_DEP = $(INC_LDAP)\msdos.h \ - $(INC_LDAP)\winsock.h \ - $(INC_LDAP)\sys/socket.h \ - $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h \ - $(INC_LDAP)\ldap.h \ - $(INC_LDAP)\proto-ld.h - - -GETATTR_DEP = $(INC_LDAP)\msdos.h \ - $(INC_LDAP)\winsock.h \ - $(INC_LDAP)\sys/socket.h \ - $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h \ - $(INC_LDAP)\ldap.h \ - $(INC_LDAP)\proto-ld.h - - -ADDENTRY_DEP = $(INC_LDAP)\msdos.h \ - $(INC_LDAP)\winsock.h \ - $(INC_LDAP)\sys/socket.h \ - $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h \ - $(INC_LDAP)\ldap.h \ - $(INC_LDAP)\proto-ld.h - - -RESULT_DEP = $(INC_LDAP)\msdos.h \ - $(INC_LDAP)\winsock.h \ - $(INC_LDAP)\sys/socket.h \ - $(INC_LDAP)\sys/select.h \ - $(INC_LDAP)\portable.h \ - $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h \ - $(INC_LDAP)\ldap.h \ - $(INC_LDAP)\proto-ld.h - - -SEARCH_DEP = $(INC_LDAP)\sys/socket.h \ - $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h \ - $(INC_LDAP)\ldap.h \ - $(INC_LDAP)\winsock.h \ - $(INC_LDAP)\proto-ld.h \ - $(INC_LDAP)\msdos.h - - -UFN_DEP = $(INC_LDAP)\msdos.h \ - $(INC_LDAP)\winsock.h \ - $(INC_LDAP)\sys/socket.h \ - $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h \ - $(INC_LDAP)\ldap.h \ - $(INC_LDAP)\proto-ld.h - - -OPENWSA_DEP = $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h \ - $(INC_LDAP)\ldap.h \ - $(INC_LDAP)\winsock.h \ - $(INC_LDAP)\proto-ld.h \ - $(INC_LDAP)\msdos.h \ - q:\src\mit\localh\wshelper.h \ - q:\src\mit\localh\resolv.h \ - q:\src\mit\localh\arpa/nameser.h \ - q:\src\mit\localh\hesiod.h - - -DECODE_DEP = $(INC_LDAP)\sys/socket.h \ - $(INC_LDAP)\netinet/in.h \ - $(INC_LDAP)\msdos.h \ - $(INC_LDAP)\winsock.h \ - $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h - - -ENCODE_DEP = $(INC_LDAP)\sys/socket.h \ - $(INC_LDAP)\netinet/in.h \ - $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h \ - $(INC_LDAP)\msdos.h \ - $(INC_LDAP)\winsock.h - - -IO_DEP = $(INC_LDAP)\sys/socket.h \ - $(INC_LDAP)\netinet/in.h \ - $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h \ - $(INC_LDAP)\winsock.h \ - $(INC_LDAP)\msdos.h - - -MSDOS_DEP = $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h \ - $(INC_LDAP)\ldap.h \ - $(INC_LDAP)\winsock.h \ - $(INC_LDAP)\proto-ld.h \ - $(INC_LDAP)\msdos.h - - -SBIND_DEP = $(INC_LDAP)\sys/socket.h \ - $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h \ - $(INC_LDAP)\ldap.h \ - $(INC_LDAP)\winsock.h \ - $(INC_LDAP)\proto-ld.h - - -UNBIND_DEP = $(INC_LDAP)\msdos.h \ - $(INC_LDAP)\winsock.h \ - $(INC_LDAP)\sys/socket.h \ - $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h \ - $(INC_LDAP)\ldap.h \ - $(INC_LDAP)\proto-ld.h - - -KBIND_DEP = $(INC_LDAP)\msdos.h \ - $(INC_LDAP)\winsock.h \ - c:\src\h\krbv4\krb.h \ - q:\src\mit\localh\mit_copy.h \ - q:\src\mit\localh\conf.h \ - q:\src\mit\localh\osconf.h \ - q:\src\mit\localh\conf-pc.h \ - c:\src\h\krbv4\des.h \ - q:\src\mit\localh\lsh_pwd.h \ - $(INC_LDAP)\sys/socket.h \ - $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h \ - $(INC_LDAP)\ldap.h \ - $(INC_LDAP)\proto-ld.h - - -FRIENDLY_DEP = $(INC_LDAP)\msdos.h \ - $(INC_LDAP)\winsock.h \ - $(INC_LDAP)\sys/socket.h \ - $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h \ - $(INC_LDAP)\ldap.h \ - $(INC_LDAP)\proto-ld.h - - -DISPTMPL_DEP = $(INC_LDAP)\msdos.h \ - $(INC_LDAP)\winsock.h \ - $(INC_LDAP)\sys/file.h \ - $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h \ - $(INC_LDAP)\ldap.h \ - $(INC_LDAP)\proto-ld.h \ - $(INC_LDAP)\disptmpl.h - - -DSPARSE_DEP = $(INC_LDAP)\msdos.h \ - $(INC_LDAP)\winsock.h \ - $(INC_LDAP)\sys/file.h \ - $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h \ - $(INC_LDAP)\ldap.h \ - $(INC_LDAP)\proto-ld.h - - -FREE_DEP = $(INC_LDAP)\msdos.h \ - $(INC_LDAP)\winsock.h \ - $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h \ - $(INC_LDAP)\ldap.h \ - $(INC_LDAP)\proto-ld.h - - -SORT_DEP = $(INC_LDAP)\msdos.h \ - $(INC_LDAP)\winsock.h \ - $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h \ - $(INC_LDAP)\ldap.h \ - $(INC_LDAP)\proto-ld.h - - -SRCHPREF_DEP = $(INC_LDAP)\msdos.h \ - $(INC_LDAP)\winsock.h \ - $(INC_LDAP)\sys/file.h \ - $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h \ - $(INC_LDAP)\ldap.h \ - $(INC_LDAP)\proto-ld.h \ - $(INC_LDAP)\srchpref.h - - -TMPLOUT_DEP = $(INC_LDAP)\msdos.h \ - $(INC_LDAP)\winsock.h \ - $(INC_LDAP)\sys/file.h \ - $(INC_LDAP)\sys/socket.h \ - $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h \ - $(INC_LDAP)\ldap.h \ - $(INC_LDAP)\proto-ld.h \ - $(INC_LDAP)\disptmpl.h - - -LIBLDAP_RCDEP = - -KERBEROS_DEP = $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h \ - $(INC_LDAP)\ldap.h \ - $(INC_LDAP)\winsock.h \ - $(INC_LDAP)\proto-ld.h \ - $(INC_LDAP)\msdos.h \ - c:\src\authman\dll\authlib.h - - -GETVALUE_DEP = $(INC_LDAP)\msdos.h \ - $(INC_LDAP)\winsock.h \ - $(INC_LDAP)\sys/socket.h \ - $(INC_LDAP)\lber.h \ - $(INC_LDAP)\proto-lb.h \ - $(INC_LDAP)\ldap.h \ - $(INC_LDAP)\proto-ld.h - - -all: $(PROJ).DLL $(PROJ).BSC - -clean: - del *.aps - del *.bsc - del *.pdb - del *.vcw - del *.res - del *.pch - del *.obj - del *.sbr -# del *.map - -ABANDON.OBJ: ABANDON.C $(ABANDON_DEP) - $(CC) $(CFLAGS) $(CCREATEPCHFLAG) /c ABANDON.C - -ADD.OBJ: ADD.C $(ADD_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c ADD.C - -BIND.OBJ: BIND.C $(BIND_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c BIND.C - -CACHE.OBJ: CACHE.C $(CACHE_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c CACHE.C - -COMPARE.OBJ: COMPARE.C $(COMPARE_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c COMPARE.C - -DELETE.OBJ: DELETE.C $(DELETE_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c DELETE.C - -ERROR.OBJ: ERROR.C $(ERROR_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c ERROR.C - -GETFILTE.OBJ: GETFILTE.C $(GETFILTE_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c GETFILTE.C - -REGEX.OBJ: REGEX.C $(REGEX_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c REGEX.C - -MODIFY.OBJ: MODIFY.C $(MODIFY_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c MODIFY.C - -MODRDN.OBJ: MODRDN.C $(MODRDN_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c MODRDN.C - -GETDN.OBJ: GETDN.C $(GETDN_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c GETDN.C - -GETENTRY.OBJ: GETENTRY.C $(GETENTRY_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c GETENTRY.C - -GETATTR.OBJ: GETATTR.C $(GETATTR_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c GETATTR.C - -ADDENTRY.OBJ: ADDENTRY.C $(ADDENTRY_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c ADDENTRY.C - -RESULT.OBJ: RESULT.C $(RESULT_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c RESULT.C - -SEARCH.OBJ: SEARCH.C $(SEARCH_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c SEARCH.C - -UFN.OBJ: UFN.C $(UFN_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c UFN.C - -OPENWSA.OBJ: OPENWSA.C $(OPENWSA_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c OPENWSA.C - -DECODE.OBJ: ..\LIBLBER\DECODE.C $(DECODE_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c ..\LIBLBER\DECODE.C - -ENCODE.OBJ: ..\LIBLBER\ENCODE.C $(ENCODE_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c ..\LIBLBER\ENCODE.C - -IO.OBJ: ..\LIBLBER\IO.C $(IO_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c ..\LIBLBER\IO.C - -MSDOS.OBJ: MSDOS.C $(MSDOS_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c MSDOS.C - -SBIND.OBJ: SBIND.C $(SBIND_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c SBIND.C - -UNBIND.OBJ: UNBIND.C $(UNBIND_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c UNBIND.C - -KBIND.OBJ: KBIND.C $(KBIND_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c KBIND.C - -FRIENDLY.OBJ: FRIENDLY.C $(FRIENDLY_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c FRIENDLY.C - -DISPTMPL.OBJ: DISPTMPL.C $(DISPTMPL_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c DISPTMPL.C - -DSPARSE.OBJ: DSPARSE.C $(DSPARSE_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c DSPARSE.C - -FREE.OBJ: FREE.C $(FREE_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c FREE.C - -SORT.OBJ: SORT.C $(SORT_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c SORT.C - -SRCHPREF.OBJ: SRCHPREF.C $(SRCHPREF_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c SRCHPREF.C - -TMPLOUT.OBJ: TMPLOUT.C $(TMPLOUT_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c TMPLOUT.C - -LIBLDAP.RES: LIBLDAP.RC $(LIBLDAP_RCDEP) - $(RC) $(RCFLAGS) $(RCDEFINES) -r LIBLDAP.RC - -KERBEROS.OBJ: ..\MSDOS\KERBEROS.C $(KERBEROS_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c ..\MSDOS\KERBEROS.C - -GETVALUE.OBJ: GETVALUE.C $(GETVALUE_DEP) - $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c GETVALUE.C - - -$(PROJ).DLL:: LIBLDAP.RES - -$(PROJ).DLL:: ABANDON.OBJ ADD.OBJ BIND.OBJ CACHE.OBJ COMPARE.OBJ DELETE.OBJ ERROR.OBJ \ - GETFILTE.OBJ REGEX.OBJ MODIFY.OBJ MODRDN.OBJ GETDN.OBJ GETENTRY.OBJ GETATTR.OBJ ADDENTRY.OBJ \ - RESULT.OBJ SEARCH.OBJ UFN.OBJ OPENWSA.OBJ DECODE.OBJ ENCODE.OBJ IO.OBJ MSDOS.OBJ \ - SBIND.OBJ UNBIND.OBJ KBIND.OBJ FRIENDLY.OBJ DISPTMPL.OBJ DSPARSE.OBJ FREE.OBJ SORT.OBJ \ - SRCHPREF.OBJ TMPLOUT.OBJ KERBEROS.OBJ GETVALUE.OBJ $(OBJS_EXT) $(DEFFILE) - echo >NUL @<<$(PROJ).CRF -ABANDON.OBJ + -ADD.OBJ + -BIND.OBJ + -CACHE.OBJ + -COMPARE.OBJ + -DELETE.OBJ + -ERROR.OBJ + -GETFILTE.OBJ + -REGEX.OBJ + -MODIFY.OBJ + -MODRDN.OBJ + -GETDN.OBJ + -GETENTRY.OBJ + -GETATTR.OBJ + -ADDENTRY.OBJ + -RESULT.OBJ + -SEARCH.OBJ + -UFN.OBJ + -OPENWSA.OBJ + -DECODE.OBJ + -ENCODE.OBJ + -IO.OBJ + -MSDOS.OBJ + -SBIND.OBJ + -UNBIND.OBJ + -KBIND.OBJ + -FRIENDLY.OBJ + -DISPTMPL.OBJ + -DSPARSE.OBJ + -FREE.OBJ + -SORT.OBJ + -SRCHPREF.OBJ + -TMPLOUT.OBJ + -KERBEROS.OBJ + -GETVALUE.OBJ + -$(OBJS_EXT) -$(PROJ).DLL -$(MAPFILE) -c:\msvc\lib\+ -c:\msvc\mfc\lib\+ -c:\src\lib\+ -c:\src\mit\locallib\+ -WINSOCK.LIB+ -$(LIBS) -$(DEFFILE); -<< - link $(LFLAGS) @$(PROJ).CRF - $(RC) $(RESFLAGS) LIBLDAP.RES $@ - @copy $(PROJ).CRF MSVC.BND - implib /nowep $(PROJ).LIB $(PROJ).DLL - -$(PROJ).DLL:: LIBLDAP.RES - if not exist MSVC.BND $(RC) $(RESFLAGS) LIBLDAP.RES $@ - -run: $(PROJ).DLL - $(PROJ) $(RUNFLAGS) - -#clean: -# del *.aps -# del *.bsc -# del *.pdb -# del *.vcw -# del *.res -# del *.pch -# del *.obj -# del *.sbr -# del *.map - -$(PROJ).BSC: $(SBRS) - bscmake @<< -/o$@ $(SBRS) -<< - diff --git a/libraries/msdos/winsock/openwsa.c b/libraries/msdos/winsock/openwsa.c deleted file mode 100644 index 01371219fd..0000000000 --- a/libraries/msdos/winsock/openwsa.c +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) 1993 Regents of the University of Michigan. - * All rights reserved. - * - * open-wsa.c -- libldap ldap_open routine that assumes Winsock API - */ - -#ifndef lint -static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of Michigan.\nAll rights reserved.\n"; -#endif - -#include "lber.h" -#include "ldap.h" -#include -#include -#include "msdos.h" -#ifdef WSHELPER -#include "wshelper.h" -#endif - -#ifndef INADDR_LOOPBACK -#define INADDR_LOOPBACK ((u_long) 0x7f000001) -#endif - -#ifdef LDAP_DEBUG -int ldap_debug; -#endif - -/* - * ldap_open - initialize and connect to an ldap server. A magic cookie to - * be used for future communication is returned on success, NULL on failure. - * - * Example: - * LDAP *ld; - * ld = ldap_open( hostname, port ); - */ - -LDAP *ldap_open( host, port ) -char *host; -int port; -{ - SOCKET s; - struct sockaddr_in sock; - struct hostent FAR *hp; - LDAP *ld; - unsigned long address; - int i, connected; - char *p, hostname[64]; - WSADATA wsadata; - - Debug( LDAP_DEBUG_TRACE, "ldap_open\n", 0, 0, 0 ); - - if ( WSAStartup( 0x0101, &wsadata ) != 0 ) { - return( NULL ); - } - - hp = NULL; - - if ( host != NULL ) { - if (( address = inet_addr( host )) == INADDR_NONE ) { - if (( hp = gethostbyname( host )) == NULL ) { - WSACleanup(); - return( NULL ); - } - } - } else { - address = htonl( INADDR_LOOPBACK ); - } - - if ( port == 0 ) - port = LDAP_PORT; - - if ( (s = socket( AF_INET, SOCK_STREAM, 0 )) == INVALID_SOCKET ) { - WSACleanup(); - return( NULL ); - } - - connected = 0; - for ( i = 0; i == 0 || ( hp != NULL && hp->h_addr_list[ i ] != 0L ); - ++i ) { - if ( hp != NULL ) { - SAFEMEMCPY( &sock.sin_addr.s_addr, hp->h_addr_list[ i ], - sizeof( sock.sin_addr.s_addr )); - } else { - sock.sin_addr.s_addr = address; - } - sock.sin_family = AF_INET; - sock.sin_port = htons( port ); - - if ( connect( s, (struct sockaddr *) &sock, sizeof(sock) ) != SOCKET_ERROR ) { - connected = 1; - break; - } - } - - if ( !connected ) { - closesocket( s ); - WSACleanup(); - return( NULL ); - } - - /* - * do a reverse lookup on the addr to get the official hostname. - * this is necessary for kerberos to work right, since the official - * hostname is used as the kerberos instance. - */ - - hostname[0] = '\0'; -#ifdef WSHELPER - if ( (hp = rgethostbyaddr( (char *)&sock.sin_addr.s_addr, -#else - if ( (hp = gethostbyaddr( (char *)&sock.sin_addr.s_addr, -#endif - sizeof(sock.sin_addr.s_addr), AF_INET )) != NULL ) { - if ( hp->h_name != NULL ) { - if ( (p = strchr( hp->h_name, '.' )) != NULL ) { - *p = '\0'; - } - strcpy( hostname, hp->h_name ); - } - } - - if ( (ld = (LDAP *) calloc( sizeof(LDAP), 1 )) == NULL ) { - closesocket( s ); - WSACleanup(); - return( NULL ); - } - ld->ld_sb.sb_sd = s; - ld->ld_host = strdup( hostname ); - ld->ld_version = LDAP_VERSION; - - return( ld ); -} diff --git a/libraries/msdos/winsock/setupwsa.bat b/libraries/msdos/winsock/setupwsa.bat deleted file mode 100644 index af86c644ac..0000000000 --- a/libraries/msdos/winsock/setupwsa.bat +++ /dev/null @@ -1,69 +0,0 @@ -rem -rem MSDOS batch file to setup LDAP source area for Windows Socket API build -rem This should be run from the ***ROOT*** of the LDAP source tree -rem -rem Updated 4 April 1996 * Steve Rothwell * University of Michigan -rem - -mkdir include\sys -mkdir include\_sys -mkdir include\arpa -mkdir include\netinet - -rem original set of empty files -copy libraries\msdos\winsock\include\file.h include\sys -copy libraries\msdos\winsock\include\select.h include\sys -copy libraries\msdos\winsock\include\socket.h include\sys -copy libraries\msdos\winsock\include\param.h include\sys -copy libraries\msdos\winsock\include\ioctl.h include\sys -copy libraries\msdos\winsock\include\filio.h include\sys -copy libraries\msdos\winsock\include\time.h include\sys -copy libraries\msdos\winsock\include\in.h include\netinet - -rem a newer copy -copy libraries\msdos\winsock\include\wsa\winsock.h include - -rem from MIT's kerberos stuff -copy libraries\msdos\winsock\include\krb\krb.h include -copy libraries\msdos\winsock\include\krb\des.h include - -rem from MIT's "localh" collection -copy libraries\msdos\winsock\include\krb\mit\mit_copy.h include -copy libraries\msdos\winsock\include\krb\mit\conf.h include -copy libraries\msdos\winsock\include\krb\mit\conf-pc.h include -copy libraries\msdos\winsock\include\krb\mit\osconf.h include -copy libraries\msdos\winsock\include\krb\mit\lsh_pwd.h include -copy libraries\msdos\winsock\include\krb\mit\wshelper.h include -copy libraries\msdos\winsock\include\krb\mit\resolv.h include -copy libraries\msdos\winsock\include\krb\mit\hesiod.h include -copy libraries\msdos\winsock\include\krb\mit\arpa\nameser.h include\arpa - -rem from Novell's LWP "toolkit" collection -copy libraries\msdos\winsock\include\net\_sys\filio.h include\_sys -copy libraries\msdos\winsock\include\net\_sys\ioctl.h include\_sys -copy libraries\msdos\winsock\include\net\netdb.h include - -copy libraries\msdos\winsock\include\wsa.h include\msdos.h -copy libraries\msdos\winsock\wsa.c libraries\libldap\msdos.c - -copy libraries\msdos\winsock\wsockip.c libraries\libldap -copy libraries\msdos\winsock\kerberos.c libraries\libldap - -rem the Pieces you need for MSVC 1.52c -copy libraries\msdos\winsock\libldap.def libraries\libldap -copy libraries\msdos\winsock\libldap.mak libraries\libldap -copy libraries\msdos\winsock\libldap.rc libraries\libldap -copy libraries\msdos\winsock\wsa\winsock.def libraries\libldap - -copy libraries\msdos\winsock\ldap32.def libraries\libldap -copy libraries\msdos\winsock\ldap32.mak libraries\libldap -copy libraries\msdos\winsock\ldap32.mdp libraries\libldap - -attrib -r libraries\libldap\getfilter.c -move libraries\libldap\getfilter.c libraries\libldap\getfilte.c -attrib -r libraries\libldap\getvalues.c -move libraries\libldap\getvalues.c libraries\libldap\getvalue.c -attrib -r include\proto-ldap.h -move include\proto-ldap.h include\proto-ld.h -attrib -r include\proto-lber.h -move include\proto-lber.h include\proto-lb.h diff --git a/libraries/msdos/winsock/unsetupwsa.bat b/libraries/msdos/winsock/unsetupwsa.bat deleted file mode 100644 index ddef7253a1..0000000000 --- a/libraries/msdos/winsock/unsetupwsa.bat +++ /dev/null @@ -1,77 +0,0 @@ -@rem -@rem this is UNsetupwsa.bat It reverses what setupwsa.bat does. -@rem you SHOULD NOT use this file !!! -@rem MSDOS batch file to setup LDAP source area for Windows Socket API build -@rem This should be run from the ***ROOT*** of the LDAP source tree -@rem -@rem Updated 1 December 1995 * Steve Rothwell * University of Michigan -@rem - -@echo "You SHOULD NOT USE unsetupwsa.bat" -@goto END - -:UNSETUP - -rem original set of empty files -call copyback libraries\msdos\winsock\include\file.h include\sys\file.h -call copyback libraries\msdos\winsock\include\select.h include\sys\select.h -call copyback libraries\msdos\winsock\include\socket.h include\sys\socket.h -call copyback libraries\msdos\winsock\include\param.h include\sys\param.h -call copyback libraries\msdos\winsock\include\ioctl.h include\sys\ioctl.h -call copyback libraries\msdos\winsock\include\filio.h include\sys\filio.h -call copyback libraries\msdos\winsock\include\time.h include\sys\time.h -call copyback libraries\msdos\winsock\include\in.h include\netinet\in.h - -rem a newer copy -call copyback libraries\msdos\winsock\include\wsa\winsock.h include\winsock.h - -rem from MIT's kerberos stuff -call copyback libraries\msdos\winsock\include\krb\krb.h include\krb.h -call copyback libraries\msdos\winsock\include\krb\des.h include\des.h - -rem from MIT's "localh" collection -call copyback libraries\msdos\winsock\include\krb\mit\mit_copy.h include\mit_copy.h -call copyback libraries\msdos\winsock\include\krb\mit\conf.h include\conf.h -call copyback libraries\msdos\winsock\include\krb\mit\conf-pc.h include\conf-pc.h -call copyback libraries\msdos\winsock\include\krb\mit\osconf.h include\osconf.h -call copyback libraries\msdos\winsock\include\krb\mit\lsh_pwd.h include\lsh_pwd.h -call copyback libraries\msdos\winsock\include\krb\mit\wshelper.h include\wshelper.h -call copyback libraries\msdos\winsock\include\krb\mit\resolv.h include\resolv.h -call copyback libraries\msdos\winsock\include\krb\mit\hesiod.h include\hesiod.h -call copyback libraries\msdos\winsock\include\krb\mit\arpa\nameser.h include\arpa\nameser.h - -rem from Novell's LWP "toolkit" collection -call copyback libraries\msdos\winsock\include\net\_sys\filio.h include\_sys\filio.h -call copyback libraries\msdos\winsock\include\net\_sys\ioctl.h include\_sys\ioctl.h -call copyback libraries\msdos\winsock\include\net\netdb.h include\netdb.h - -call copyback libraries\msdos\winsock\include\wsa.h include\msdos.h -call copyback libraries\msdos\winsock\wsa.c libraries\libldap\msdos.c - -call copyback libraries\msdos\winsock\wsockip.c libraries\libldap\wsockip.c -call copyback libraries\msdos\winsock\kerberos.c libraries\libldap\kerberos.c - -rem the Pieces you need for MSVC 1.52c -call copyback libraries\msdos\winsock\libldap.def libraries\libldap\libldap.def -call copyback libraries\msdos\winsock\libldap.mak libraries\libldap\libldap.mak -call copyback libraries\msdos\winsock\libldap.rc libraries\libldap\libldap.rc -call copyback libraries\msdos\winsock\wsa\winsock.def libraries\libldap\winsock.def - -call copyback libraries\msdos\winsock\ldap32.def libraries\libldap\ldap32.def -call copyback libraries\msdos\winsock\ldap32.mak libraries\libldap\ldap32.mak -call copyback libraries\msdos\winsock\ldap32.mdp libraries\libldap\ldap32.mdp - -call copyback libraries\libldap\getfilter.c libraries\libldap\getfilte.c -call copyback libraries\libldap\getvalues.c libraries\libldap\getvalue.c -call copyback include\proto-lber.h include\proto-lb.h -call copyback include\proto-ldap.h include\proto-ld.h - -rmdir include\netinet -rmdir include\arpa -rmdir include\_sys -rmdir include\sys - -goto END - -:END - diff --git a/libraries/msdos/winsock/winkit/readme.txt b/libraries/msdos/winsock/winkit/readme.txt deleted file mode 100644 index 5dffc1cf87..0000000000 --- a/libraries/msdos/winsock/winkit/readme.txt +++ /dev/null @@ -1,182 +0,0 @@ - -LDAP (Lightweight Directory Access Protocol) API for Windows/Winsock - -The lber and ldap client libraries have been ported to Microsoft Windows -in the form of Windows Dynamic Link libraries called LIBLDAP.DLL (16Bit) -and Ldap32.dll (32Bit). The LTest program is also provided in both -formats. - -A Windows Sockets API (version 1.1 conformant) TCP/IP WINSOCK.DLL or -WSOCK32.DLL is required for the DLL to run. - -Our intent is that this "kit" include everything you'll need to make use -of the ldap client API from your 16Bit or 32Bit application. If you -find something missing or have a suggestion for improvement, send email -to the "bug reporting" address at the bottom of this file. - -To use this "kit" - - 1) Get to a DOS prompt - - 2) Create the directory you want this to live in (e.g. \ldap) - and cd into it. We will refer to that directory simply as - "\ldap" from now on, but it could be anywhere and have any name - you desire. - - 3) Use "pkunzip -d" to extract the files. The "-d" is NECESSARY to - preserve the subdirectories and avoid file name collisions. - - 4) We have included only the files you need to use and test - libldap.dll and ldap32.dll. If you want the entire distribution, - with source, you can get it from: - - ftp://terminator.rs.itd.umich.edu/ldap/ldap-3.3.tar.Z - -The following files are included in this distribution: - - 16Bit binaries and libs - BINARIES/DEBUG/LIBLDAP.DLL - BINARIES/DEBUG/LIBLDAP.LIB - BINARIES/RELEASE/LIBLDAP.DLL - BINARIES/RELEASE/LIBLDAP.LIB - - BINARIES/DEBUG/LTEST.EXE - - 32Bit binaries and libs - BINARIES/DEBUG/LDAP32.DLL - BINARIES/DEBUG/LDAP32.LIB - BINARIES/RELEASE/LDAP32.DLL - BINARIES/RELEASE/LDAP32.LIB - - BINARIES/DEBUG/LTEST32.EXE - - Include files - INCKIT/MSDOS.H - INCKIT/LBER.H - INCKIT/LDAP.H - INCKIT/PROTO-LD.H - INCKIT/PROTO-LB.H - INCKIT/SRCHPREF.H - INCKIT/DISPTMPL.H - - Sample Configuration files - SRCHPREF.CFG - DISPTMPL.CFG - LDFRIEND.CFG - LDFILTER.CFG - - Man pages in the form of Windows HLP files - LIBLDAP.HLP - old format hlp file - LDAP32.HLP - new format hlp file, both have same content - -16Bit versions - - Libldap.dll was compiled with KERBEROS, AUTHMAN, WSHELPER, WIN32, - _WINDOWS,& LDAP_REFERRALS defined. Even if you do not need kerberos - authentication, (see below for more information on kerberos) this - dll should work correctly for you. - - LDAP_REFERRALS makes libldap.dll capable of handling referrals - returned by a slapd server. - -32Bit versions - - The 32Bit version is NOT SAFE for MULTIPLE THREADS at this time. - Not more than one thread per application may make use of the - ldap routines. - - Ldap32.dll was compiled with LDAP_REFERRALS defined and is capable - of handling referrals returned by a slapd server. - - -WRITING APPLICATIONS THAT USE LIBLDAP.DLL or LDAP32.DLL - - All of the normal LDAP and LBER calls documented in the help file - should work, except for ldap_perror (this is not supported under - Windows since you will want to use an application-defined dialog; - you can use ldap_err2string to obtain an error string to display in - a message box or dialog). - - The man pages are included in this kit in the form of windows HLP files. - The official source man pages are available via the web at: - - http://www.umich.edu/ldap/doc/man/ - - Any memory that you obtain as the result of a call to an LIBLDAP.DLL - routine should NOT be freed by calling the free() routine in your C - library. Instead, use the the new utility routine ldap_memfree or - the appropriate ldap ...free routine. This is so the malloc/calloc - and free routines all come from the same library (the one in - libldap) rather than using libldap's malloc/calloc and the calling - program's free. Microsoft's VC++ 4.0 compiler (in debug mode) - FORCED me to be compulsive about this for the application I used to - test. - - To be friendly under Windows, you should use the asynchronous LDAP - calls whenever possible. - - One limitation of the current LIBLDAP.DLL is that each X.500 LDAP - result message has to be smaller than 64K bytes. Ldap32.dll does - NOT have this limitation. - - To compile the ldap dlls we define the following preprocessor variables. - - WINSOCK, DOS, NEEDPROTOS, NO_USERINTERFACE, KERBEROS - - Presumably you don't need KERBEROS. You may need some/all the others - to take the right path through the include files. Also note that a - few more preprocessor variables are defined in msdos.h. This means that - msdos.h must be included before ldap.h or lber.h. - - -LTest and LTtest32 - - The LTest.exe and LTest32.exe programs are test interfaces to libldap - and ldap32 respectively. By default they connect to the host - "truelies". This host name is contained in a string resource in the - exe file. You may easily "customize" this to be the name of whatever - server you're using with AppStudio or any Windows resource editor. - -Kerberos Information - - Libldap.dll was compiled with KERBEROS, AUTHMAN, WSHELPER, & - LDAP_REFERRALS defined. If you do not need kerberos authentication, - this dll should still work correctly for you. Libldap.dll - dynamically loads and uses the dlls needed for kerberos - authentication (Authlib.dll, Krbv4win.dll, & WSHelper.dll). If - Libldap.dll is unable to load the needed dlls, execution continues - without error, but without kerberos authentication capability. - - AUTHMAN allows libldap.dll to make use of Authlib.dll (which - requires KrbV4Win.dll & WSHelper.dll) if they are ALL in the "PATH". - If these are not available, kerberos authentication can not succede, - but libldap.dll will execute without error. - - WSHELPER means that if WSHelper.dll is in the "PATH", it will be - dynamically loaded and used to do the gethostbyaddr() call required - for kerberos authentication to work. (This is used because so many - vendor implementations of gethostbyaddr return WRONG results. We - are working with all vendors we can get to listen to get these - implementations fixed.) If WSHelper.dll is not in the "PATH" - libldap.dll does not fail to execute correctly. - - Ldap32.dll does NOT have the ability to do kerberos authentication - because none of Authlib.dll, krbv4win.dll or wshelper.dll have been - ported to 32Bits at this time. - - For further information on using kerberos with the ldap DLLs send - email to ldap-support@umich.edu. - -BUG REPORTING - - Bug reports should be sent to bug-ldap@umich.edu. - - -Miscellaneous - - Build testing was done on Windows NT workstation 3.51 (build 1057 - service pack 2) on an NTFS file system (which supports long - filenames) using Microsoft Visual C++ 1.52c (16 bit) and Visual C++ - 4.0 (32 bit). - -README Last updated 11 January 1996 by Steve Rothwell diff --git a/libraries/msdos/winsock/winkit/windowskit.cmd b/libraries/msdos/winsock/winkit/windowskit.cmd deleted file mode 100644 index bcaa22776a..0000000000 --- a/libraries/msdos/winsock/winkit/windowskit.cmd +++ /dev/null @@ -1 +0,0 @@ -nmake /f WindowsKit.Mak all diff --git a/libraries/msdos/winsock/winkit/windowskit.mak b/libraries/msdos/winsock/winkit/windowskit.mak deleted file mode 100644 index 7ba81542e9..0000000000 --- a/libraries/msdos/winsock/winkit/windowskit.mak +++ /dev/null @@ -1,172 +0,0 @@ -# -# makefile.nmake stub makefile for nmake -# 15 Dec 1995 : sgr -# -# :[:] [... ] -# -# [] -# -# $@ Current target's full name (path, base, extension) -# $$@ Current target's full name (path, base, extension) -# (Valid only as a dependent in a dependency.) -# $* Current target's path & base name minus extension -# $** All dependents of the current target. -# $? All dependents with a later timestamp than the current target. -# $< Dependent file with a later timestamp that the current target. -# (Valid only in commands in inference rules.) -# -# Modifiers $(@F) -# B Base name -# F Base name + extension (Full name) -# D Drive + directory -# R Drive + directory + base name (Reusable name) - -ROOT = ..\..\..\.. -HELP = $(ROOT)\windows\help -LDAP = $(ROOT)\librar~1\libldap -LTEST = $(ROOT)\librar~1\msdos\winsock\ltest -WINSOCK = $(ROOT)\librar~1\msdos\winsock -MAININC = $(ROOT)\include -LINCL = incKit -BIN = binaries -BINARIES = \ - $(BIN)\debug\libldap.dll \ - $(BIN)\debug\libldap.lib \ - $(BIN)\release\libldap.dll \ - $(BIN)\release\libldap.lib \ - $(BIN)\debug\ltest.exe \ - $(BIN)\debug\ldap32.dll \ - $(BIN)\debug\ldap32.lib \ - $(BIN)\release\ldap32.dll \ - $(BIN)\release\ldap32.lib \ - $(BIN)\debug\ltest32.exe \ - libldap.hlp \ - ldap32.hlp - -all: WinLdap.zip - -WinLdap.zip : \ - $(BINARIES) \ -# Using Wax500 as a test case, only the -# following include files are needed to make -# a non-kerberized ldap32.dll -# or a kerberized libldap.dll - $(LINCL)\disptmpl.h \ - $(LINCL)\lber.h \ - $(LINCL)\ldap.h \ - $(LINCL)\msdos.h \ - $(LINCL)\proto-ld.h \ - $(LINCL)\proto-lb.h \ - $(LINCL)\srchpref.h \ - srchpref.cfg \ - disptmpl.cfg \ - ldfriend.cfg \ - ldfilter.cfg \ - readme.txt - -!pkzip -P -u $@ $? - del *.cfg - -$(BIN)\debug\libldap.dll : $(LDAP)\debug\libldap.dll - -@md $(@D) - -copy $? $@ - -$(BIN)\debug\libldap.lib : $(LDAP)\debug\libldap.lib - -@md $(@D) - -copy $? $@ - -$(BIN)\debug\ltest.exe : $(LTEST)\ltest.exe - -@md $(@D) - -copy $? $@ - -$(BIN)\debug\ldap32.dll : $(LDAP)\debug\ldap32.dll - -@md $(@D) - -copy $? $@ - -$(BIN)\debug\ldap32.lib : $(LDAP)\debug\ldap32.lib - -@md $(@D) - -copy $? $@ - -$(BIN)\debug\ltest32.exe : $(LTEST)\debug\ltest32.exe - -@md $(@D) - -copy $? $@ - -$(BIN)\release\libldap.dll : $(LDAP)\release\libldap.dll - -@md $(@D) - -copy $? $@ - -$(BIN)\release\libldap.lib : $(LDAP)\release\libldap.lib - -@md $(@D) - -copy $? $@ - -$(BIN)\release\ldap32.dll : $(LDAP)\release\ldap32.dll - -@md $(@D) - -copy $? $@ - -$(BIN)\release\ldap32.lib : $(LDAP)\release\ldap32.lib - -@md $(@D) - -copy $? $@ - -$(LINCL)\disptmpl.h : $(MAININC)\disptmpl.h - -@md $(@D) - -copy $? $@ - -$(LINCL)\lber.h : $(MAININC)\lber.h - -@md $(@D) - -copy $? $@ - -$(LINCL)\ldap.h : $(MAININC)\ldap.h - -@md $(@D) - -copy $? $@ - -$(LINCL)\msdos.h : $(MAININC)\msdos.h - -@md $(@D) - -copy $? $@ - -$(LINCL)\proto-ld.h : $(MAININC)\proto-ld.h - -@md $(@D) - -copy $? $@ - -$(LINCL)\proto-lb.h : $(MAININC)\proto-lb.h - -@md $(@D) - -copy $? $@ - -$(LINCL)\srchpref.h : $(MAININC)\srchpref.h - -@md $(@D) - -copy $? $@ - -libldap.hlp : $(HELP)\build\libldap.hlp - -copy $? $@ - -ldap32.hlp : $(HELP)\ldap32.hlp - -copy $? $@ - -srchpref.cfg : $(LDAP)\ldapsearchprefs.conf - -copy $** $@ - -ldfilter.cfg : $(LDAP)\ldapfilter.conf - -copy $** $@ - -disptmpl.cfg : $(LDAP)\ldaptemplates.conf - -copy $** $@ - -ldfriend.cfg : $(LDAP)\ldapfriendly - -copy $** $@ - - -$(LDAP)\debug\libldap.dll : -$(LDAP)\debug\libldap.lib : -$(LDAP)\release\libldap.dll : -$(LDAP)\release\libldap.lib : -$(LTEST)\ltest.exe : -$(LDAP)\debug\ldap32.dll : -$(LDAP)\debug\ldap32.lib : -$(LDAP)\release\ldap32.dll : -$(LDAP)\release\ldap32.lib : -$(LTEST)\debug\ltest32.exe : -$(HELP)\build\libldap.hlp : -$(HELP)\ldap32.hlp : -$(LDAP)\ldapsearchprefs.conf : -$(LDAP)\ldapfilter.conf : -$(LDAP)\ldaptemplates.conf : -$(LDAP)\ldapfriendly : -readme.txt : diff --git a/libraries/msdos/winsock/wsa.c b/libraries/msdos/winsock/wsa.c deleted file mode 100644 index 5ae59f9dc6..0000000000 --- a/libraries/msdos/winsock/wsa.c +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Microsoft Windows specifics for LIBLDAP DLL - */ -#include "lber.h" -#include "ldap.h" -#include "msdos.h" - - -#ifdef _WIN32 -/* Lifted from Q125688 - * How to Port a 16-bit DLL to a Win32 DLL - * on the MSVC 4.0 CD - */ -BOOL WINAPI DllMain (HANDLE hModule, DWORD fdwReason, LPVOID lpReserved) -{ - switch (fdwReason) - { - case DLL_PROCESS_ATTACH: - /* Code from LibMain inserted here. Return TRUE to keep the - DLL loaded or return FALSE to fail loading the DLL. - - You may have to modify the code in your original LibMain to - account for the fact that it may be called more than once. - You will get one DLL_PROCESS_ATTACH for each process that - loads the DLL. This is different from LibMain which gets - called only once when the DLL is loaded. The only time this - is critical is when you are using shared data sections. - If you are using shared data sections for statically - allocated data, you will need to be careful to initialize it - only once. Check your code carefully. - - Certain one-time initializations may now need to be done for - each process that attaches. You may also not need code from - your original LibMain because the operating system may now - be doing it for you. - */ - /* - * 16 bit code calls UnlockData() - * which is mapped to UnlockSegment in windows.h - * in 32 bit world UnlockData is not defined anywhere - * UnlockSegment is mapped to GlobalUnfix in winbase.h - * and the docs for both UnlockSegment and GlobalUnfix say - * ".. function is oboslete. Segments have no meaning - * in the 32-bit environment". So we do nothing here. - */ - break; - - case DLL_THREAD_ATTACH: - /* Called each time a thread is created in a process that has - already loaded (attached to) this DLL. Does not get called - for each thread that exists in the process before it loaded - the DLL. - - Do thread-specific initialization here. - */ - break; - - case DLL_THREAD_DETACH: - /* Same as above, but called when a thread in the process - exits. - - Do thread-specific cleanup here. - */ - break; - - case DLL_PROCESS_DETACH: - /* Code from _WEP inserted here. This code may (like the - LibMain) not be necessary. Check to make certain that the - operating system is not doing it for you. - */ - break; - } - /* The return value is only used for DLL_PROCESS_ATTACH; all other - conditions are ignored. */ - return TRUE; // successful DLL_PROCESS_ATTACH -} -#else -int CALLBACK -LibMain( HINSTANCE hinst, WORD wDataSeg, WORD cbHeapSize, LPSTR lpszCmdLine ) -{ - UnlockData( 0 ); - return( 1 ); -} -#endif - - -void -ldap_memfree( void *p ) -{ - free( p ); -} diff --git a/libraries/msdos/winsock/wsa/errno.c b/libraries/msdos/winsock/wsa/errno.c deleted file mode 100644 index cb49c5fe62..0000000000 --- a/libraries/msdos/winsock/wsa/errno.c +++ /dev/null @@ -1,21 +0,0 @@ -#include - -/* Copies string corresponding to the error code provided */ -/* into buf, maximum length len. Returns length actually */ -/* copied to buffer, or zero if error code is unknown. */ -/* String resources should be present for each error code */ -/* using the value of the code as the string ID (except for */ -/* error = 0, which is mapped to WSABASEERR to keep it with */ -/* the others). The DLL is free to use any string IDs that */ -/* are less than WSABASEERR for its own use. The LibMain */ -/* procedure of the DLL is presumed to have saved its */ -/* HINSTANCE in the global variable hInst. */ - -int PASCAL FAR WSAsperror (int errorcode, char far * buf, int len) -{ - if (errorcode == 0) - errorcode = WSABASEERR; - if (errorcode < WSABASEERR) - return 0; - return LoadString(hInst,errorcode,buf,len); -} diff --git a/libraries/msdos/winsock/wsa/errno.rc b/libraries/msdos/winsock/wsa/errno.rc deleted file mode 100644 index 1252957877..0000000000 --- a/libraries/msdos/winsock/wsa/errno.rc +++ /dev/null @@ -1,57 +0,0 @@ -#include - -STRINGTABLE -BEGIN - WSABASEERR, "[0] No Error" - WSAEINTR, "[10004] Interrupted system call" - WSAEBADF, "[10009] Bad file number" - WSAEACCES, "[10013] Permission denied" - WSAEFAULT, "[10014] Bad address" - WSAEINVAL, "[10022] Invalid argument" - WSAEMFILE, "[10024] Too many open files" - WSAEWOULDBLOCK, "[10035] Operation would block" - WSAEINPROGRESS, "[10036] Operation now in progress" - WSAEALREADY, "[10037] Operation already in progress" - WSAENOTSOCK, "[10038] Socket operation on non-socket" - WSAEDESTADDRREQ, "[10039] Destination address required" - WSAEMSGSIZE, "[10040] Message too long" - WSAEPROTOTYPE, "[10041] Protocol wrong type for socket" - WSAENOPROTOOPT, "[10042] Bad protocol option" - WSAEPROTONOSUPPORT, "[10043] Protocol not supported" - WSAESOCKTNOSUPPORT, "[10044] Socket type not supported" - WSAEOPNOTSUPP, "[10045] Operation not supported on socket" - WSAEPFNOSUPPORT, "[10046] Protocol family not supported" - WSAEAFNOSUPPORT, "[10047] Address family not supported by protocol family" - WSAEADDRINUSE, "[10048] Address already in use" - WSAEADDRNOTAVAIL, "[10049] Can't assign requested address" - WSAENETDOWN, "[10050] Network is down" - WSAENETUNREACH, "[10051] Network is unreachable" - WSAENETRESET, "[10052] Net dropped connection or reset" - WSAECONNABORTED, "[10053] Software caused connection abort" - WSAECONNRESET, "[10054] Connection reset by peer" - WSAENOBUFS, "[10055] No buffer space available" - WSAEISCONN, "[10056] Socket is already connected" - WSAENOTCONN, "[10057] Socket is not connected" - WSAESHUTDOWN, "[10058] Can't send after socket shutdown" - WSAETOOMANYREFS, "[10059] Too many references, can't splice" - WSAETIMEDOUT, "[10060] Connection timed out" - WSAECONNREFUSED, "[10061] Connection refused" - WSAELOOP, "[10062] Too many levels of symbolic links" - WSAENAMETOOLONG, "[10063] File name too long" - WSAEHOSTDOWN, "[10064] Host is down" - WSAEHOSTUNREACH, "[10065] No Route to Host" - WSAENOTEMPTY, "[10066] Directory not empty" - WSAEPROCLIM, "[10067] Too many processes" - WSAEUSERS, "[10068] Too many users" - WSAEDQUOT, "[10069] Disc Quota Exceeded" - WSAESTALE, "[10070] Stale NFS file handle" - WSAEREMOTE, "[10071] Too many levels of remote in path" - WSASYSNOTREADY, "[10091] Network SubSystem is unavailable" - WSAVERNOTSUPPORTED, "[10092] WINSOCK DLL Version out of range" - WSANOTINITIALIZED, "[10093] Successful WSASTARTUP not yet performed" - WSAHOST_NOT_FOUND, "[11001] Host not found" - WSATRY_AGAIN, "[11002] Non-Authoritative Host not found" - WSANO_RECOVERY, "[11003] Non-Recoverable errors: FORMERR, REFUSED, NOTIMP" - WSANO_DATA, "[11004] Valid name, no data record of requested -type" -END diff --git a/libraries/msdos/winsock/wsa/winsock.def b/libraries/msdos/winsock/wsa/winsock.def deleted file mode 100644 index 0aa0953284..0000000000 --- a/libraries/msdos/winsock/wsa/winsock.def +++ /dev/null @@ -1,84 +0,0 @@ -; -; File: winsock.def -; System: MS-Windows 3.x -; Summary: Module definition file for Windows Sockets DLL. -; - -LIBRARY WINSOCK ; Application's module name - -DESCRIPTION 'BSD Socket API for Windows' - -EXETYPE WINDOWS ; required for all windows applications - -STUB 'WINSTUB.EXE' ; generates error message if application - ; is run without Windows - -;CODE can be FIXED in memory because of potential upcalls -CODE PRELOAD FIXED - -;DATA must be SINGLE and at a FIXED location since this is a DLL -DATA PRELOAD FIXED SINGLE - -HEAPSIZE 1024 -STACKSIZE 16384 - -; All functions that will be called by any Windows routine -; must be exported. Any additional exports beyond those defined -; here must have ordinal numbers 1000 or above. - -EXPORTS - accept @1 - bind @2 - closesocket @3 - connect @4 - getpeername @5 - getsockname @6 - getsockopt @7 - htonl @8 - htons @9 - inet_addr @10 - inet_ntoa @11 - ioctlsocket @12 - listen @13 - ntohl @14 - ntohs @15 - recv @16 - recvfrom @17 - select @18 - send @19 - sendto @20 - setsockopt @21 - shutdown @22 - socket @23 - - gethostbyaddr @51 - gethostbyname @52 - getprotobyname @53 - getprotobynumber @54 - getservbyname @55 - getservbyport @56 - gethostname @57 - - WSAAsyncSelect @101 - WSAAsyncGetHostByAddr @102 - WSAAsyncGetHostByName @103 - WSAAsyncGetProtoByNumber @104 - WSAAsyncGetProtoByName @105 - WSAAsyncGetServByPort @106 - WSAAsyncGetServByName @107 - WSACancelAsyncRequest @108 - WSASetBlockingHook @109 - WSAUnhookBlockingHook @110 - WSAGetLastError @111 - WSASetLastError @112 - WSACancelBlockingCall @113 - WSAIsBlocking @114 - WSAStartup @115 - WSACleanup @116 - - __WSAFDIsSet @151 - - WEP @500 RESIDENTNAME - -;eof - diff --git a/libraries/msdos/winsock/wsa/winsock.h b/libraries/msdos/winsock/wsa/winsock.h deleted file mode 100644 index 13eb70a501..0000000000 --- a/libraries/msdos/winsock/wsa/winsock.h +++ /dev/null @@ -1,826 +0,0 @@ -/* WINSOCK.H--definitions to be used with the WINSOCK.DLL - * - * This header file corresponds to version 1.1 of the Windows Sockets specification. - * - * This file includes parts which are Copyright (c) 1982-1986 Regents - * of the University of California. All rights reserved. The - * Berkeley Software License Agreement specifies the terms and - * conditions for redistribution. - */ - -#ifndef _WINSOCKAPI_ -#define _WINSOCKAPI_ - -/* - * Pull in WINDOWS.H if necessary - */ -#ifndef _INC_WINDOWS -#include -#endif /* _INC_WINDOWS */ - -/* - * Basic system type definitions, taken from the BSD file sys/types.h. - */ -typedef unsigned char u_char; -typedef unsigned short u_short; -typedef unsigned int u_int; -typedef unsigned long u_long; - -/* - * The new type to be used in all - * instances which refer to sockets. - */ -typedef u_int SOCKET; - -/* - * Select uses arrays of SOCKETs. These macros manipulate such - * arrays. FD_SETSIZE may be defined by the user before including - * this file, but the default here should be >= 64. - * - * CAVEAT IMPLEMENTOR and USER: THESE MACROS AND TYPES MUST BE - * INCLUDED IN WINSOCK.H EXACTLY AS SHOWN HERE. - */ -#ifndef FD_SETSIZE -#define FD_SETSIZE 64 -#endif /* FD_SETSIZE */ - -typedef struct fd_set { - u_short fd_count; /* how many are SET? */ - SOCKET fd_array[FD_SETSIZE]; /* an array of SOCKETs */ -} fd_set; - -extern int PASCAL FAR __WSAFDIsSet(SOCKET, fd_set FAR *); - -#define FD_CLR(fd, set) do { \ - u_int __i; \ - for (__i = 0; __i < ((fd_set FAR *)(set))->fd_count ; __i++) { \ - if (((fd_set FAR *)(set))->fd_array[__i] == fd) { \ - while (__i < ((fd_set FAR *)(set))->fd_count-1) { \ - ((fd_set FAR *)(set))->fd_array[__i] = \ - ((fd_set FAR *)(set))->fd_array[__i+1]; \ - __i++; \ - } \ - ((fd_set FAR *)(set))->fd_count--; \ - break; \ - } \ - } \ -} while(0) - -#define FD_SET(fd, set) do { \ - if (((fd_set FAR *)(set))->fd_count < FD_SETSIZE) \ - ((fd_set FAR *)(set))->fd_array[((fd_set FAR *)(set))->fd_count++]=fd;\ -} while(0) - -#define FD_ZERO(set) (((fd_set FAR *)(set))->fd_count=0) - -#define FD_ISSET(fd, set) __WSAFDIsSet((SOCKET)fd, (fd_set FAR *)set) - -/* - * Structure used in select() call, taken from the BSD file sys/time.h. - */ -struct timeval { - long tv_sec; /* seconds */ - long tv_usec; /* and microseconds */ -}; - -/* - * Operations on timevals. - * - * NB: timercmp does not work for >= or <=. - */ -#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) -#define timercmp(tvp, uvp, cmp) \ - ((tvp)->tv_sec cmp (uvp)->tv_sec || \ - (tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec) -#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 - -/* - * Commands for ioctlsocket(), taken from the BSD file fcntl.h. - * - * - * Ioctl's have the command encoded in the lower word, - * and the size of any in or out parameters in the upper - * word. The high 2 bits of the upper word are used - * to encode the in/out status of the parameter; for now - * we restrict parameters to at most 128 bytes. - */ -#define IOCPARM_MASK 0x7f /* parameters must be < 128 bytes */ -#define IOC_VOID 0x20000000 /* no parameters */ -#define IOC_OUT 0x40000000 /* copy out parameters */ -#define IOC_IN 0x80000000 /* copy in parameters */ -#define IOC_INOUT (IOC_IN|IOC_OUT) - /* 0x20000000 distinguishes new & - old ioctl's */ -#define _IO(x,y) (IOC_VOID|(x<<8)|y) - -#define _IOR(x,y,t) (IOC_OUT|(((long)sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y) - -#define _IOW(x,y,t) (IOC_IN|(((long)sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y) - -#define FIONREAD _IOR('f', 127, u_long) /* get # bytes to read */ -#define FIONBIO _IOW('f', 126, u_long) /* set/clear non-blocking i/o */ -#define FIOASYNC _IOW('f', 125, u_long) /* set/clear async i/o */ - -/* Socket I/O Controls */ -#define SIOCSHIWAT _IOW('s', 0, u_long) /* set high watermark */ -#define SIOCGHIWAT _IOR('s', 1, u_long) /* get high watermark */ -#define SIOCSLOWAT _IOW('s', 2, u_long) /* set low watermark */ -#define SIOCGLOWAT _IOR('s', 3, u_long) /* get low watermark */ -#define SIOCATMARK _IOR('s', 7, u_long) /* at oob mark? */ - -/* - * Structures returned by network data base library, taken from the - * BSD file netdb.h. All addresses are supplied in host order, and - * returned in network order (suitable for use in system calls). - */ - -struct hostent { - char FAR * h_name; /* official name of host */ - char FAR * FAR * h_aliases; /* alias list */ - short h_addrtype; /* host address type */ - short h_length; /* length of address */ - char FAR * FAR * h_addr_list; /* list of addresses */ -#define h_addr h_addr_list[0] /* address, for backward compat */ -}; - -/* - * It is assumed here that a network number - * fits in 32 bits. - */ -struct netent { - char FAR * n_name; /* official name of net */ - char FAR * FAR * n_aliases; /* alias list */ - short n_addrtype; /* net address type */ - u_long n_net; /* network # */ -}; - -struct servent { - char FAR * s_name; /* official service name */ - char FAR * FAR * s_aliases; /* alias list */ - short s_port; /* port # */ - char FAR * s_proto; /* protocol to use */ -}; - -struct protoent { - char FAR * p_name; /* official protocol name */ - char FAR * FAR * p_aliases; /* alias list */ - short p_proto; /* protocol # */ -}; - -/* - * Constants and structures defined by the internet system, - * Per RFC 790, September 1981, taken from the BSD file netinet/in.h. - */ - -/* - * Protocols - */ -#define IPPROTO_IP 0 /* dummy for IP */ -#define IPPROTO_ICMP 1 /* control message protocol */ -#define IPPROTO_GGP 2 /* gateway^2 (deprecated) */ -#define IPPROTO_TCP 6 /* tcp */ -#define IPPROTO_PUP 12 /* pup */ -#define IPPROTO_UDP 17 /* user datagram protocol */ -#define IPPROTO_IDP 22 /* xns idp */ -#define IPPROTO_ND 77 /* UNOFFICIAL net disk proto */ - -#define IPPROTO_RAW 255 /* raw IP packet */ -#define IPPROTO_MAX 256 - -/* - * Port/socket numbers: network standard functions - */ -#define IPPORT_ECHO 7 -#define IPPORT_DISCARD 9 -#define IPPORT_SYSTAT 11 -#define IPPORT_DAYTIME 13 -#define IPPORT_NETSTAT 15 -#define IPPORT_FTP 21 -#define IPPORT_TELNET 23 -#define IPPORT_SMTP 25 -#define IPPORT_TIMESERVER 37 -#define IPPORT_NAMESERVER 42 -#define IPPORT_WHOIS 43 -#define IPPORT_MTP 57 - -/* - * Port/socket numbers: host specific functions - */ -#define IPPORT_TFTP 69 -#define IPPORT_RJE 77 -#define IPPORT_FINGER 79 -#define IPPORT_TTYLINK 87 -#define IPPORT_SUPDUP 95 - -/* - * UNIX TCP sockets - */ -#define IPPORT_EXECSERVER 512 -#define IPPORT_LOGINSERVER 513 -#define IPPORT_CMDSERVER 514 -#define IPPORT_EFSSERVER 520 - -/* - * UNIX UDP sockets - */ -#define IPPORT_BIFFUDP 512 -#define IPPORT_WHOSERVER 513 -#define IPPORT_ROUTESERVER 520 - /* 520+1 also used */ - -/* - * Ports < IPPORT_RESERVED are reserved for - * privileged processes (e.g. root). - */ -#define IPPORT_RESERVED 1024 - -/* - * Link numbers - */ -#define IMPLINK_IP 155 -#define IMPLINK_LOWEXPER 156 -#define IMPLINK_HIGHEXPER 158 - -/* - * Internet address (old style... should be updated) - */ -struct in_addr { - union { - struct { u_char s_b1,s_b2,s_b3,s_b4; } S_un_b; - struct { u_short s_w1,s_w2; } S_un_w; - u_long S_addr; - } S_un; -#define s_addr S_un.S_addr - /* can be used for most tcp & ip code */ -#define s_host S_un.S_un_b.s_b2 - /* host on imp */ -#define s_net S_un.S_un_b.s_b1 - /* network */ -#define s_imp S_un.S_un_w.s_w2 - /* imp */ -#define s_impno S_un.S_un_b.s_b4 - /* imp # */ -#define s_lh S_un.S_un_b.s_b3 - /* logical host */ -}; - -/* - * Definitions of bits in internet address integers. - * On subnets, the decomposition of addresses to host and net parts - * is done according to subnet mask, not the masks here. - */ -#define IN_CLASSA(i) (((long)(i) & 0x80000000) == 0) -#define IN_CLASSA_NET 0xff000000 -#define IN_CLASSA_NSHIFT 24 -#define IN_CLASSA_HOST 0x00ffffff -#define IN_CLASSA_MAX 128 - -#define IN_CLASSB(i) (((long)(i) & 0xc0000000) == 0x80000000) -#define IN_CLASSB_NET 0xffff0000 -#define IN_CLASSB_NSHIFT 16 -#define IN_CLASSB_HOST 0x0000ffff -#define IN_CLASSB_MAX 65536 - -#define IN_CLASSC(i) (((long)(i) & 0xc0000000) == 0xc0000000) -#define IN_CLASSC_NET 0xffffff00 -#define IN_CLASSC_NSHIFT 8 -#define IN_CLASSC_HOST 0x000000ff - -#define INADDR_ANY (u_long)0x00000000 -#define INADDR_LOOPBACK 0x7f000001 -#define INADDR_BROADCAST (u_long)0xffffffff -#define INADDR_NONE 0xffffffff - -/* - * Socket address, internet style. - */ -struct sockaddr_in { - short sin_family; - u_short sin_port; - struct in_addr sin_addr; - char sin_zero[8]; -}; - -#define WSADESCRIPTION_LEN 256 -#define WSASYS_STATUS_LEN 128 - -typedef struct WSAData { - WORD wVersion; - WORD wHighVersion; - char szDescription[WSADESCRIPTION_LEN+1]; - char szSystemStatus[WSASYS_STATUS_LEN+1]; - unsigned short iMaxSockets; - unsigned short iMaxUdpDg; - char FAR * lpVendorInfo; -} WSADATA; - -typedef WSADATA FAR *LPWSADATA; - -/* - * Options for use with [gs]etsockopt at the IP level. - */ -#define IP_OPTIONS 1 /* set/get IP per-packet options */ - -/* - * Definitions related to sockets: types, address families, options, - * taken from the BSD file sys/socket.h. - */ - -/* - * This is used instead of -1, since the - * SOCKET type is unsigned. - */ -#define INVALID_SOCKET (SOCKET)(~0) -#define SOCKET_ERROR (-1) - -/* - * Types - */ -#define SOCK_STREAM 1 /* stream socket */ -#define SOCK_DGRAM 2 /* datagram socket */ -#define SOCK_RAW 3 /* raw-protocol interface */ -#define SOCK_RDM 4 /* reliably-delivered message */ -#define SOCK_SEQPACKET 5 /* sequenced packet stream */ - -/* - * Option flags per-socket. - */ -#define SO_DEBUG 0x0001 /* turn on debugging info recording */ -#define SO_ACCEPTCONN 0x0002 /* socket has had listen() */ -#define SO_REUSEADDR 0x0004 /* allow local address reuse */ -#define SO_KEEPALIVE 0x0008 /* keep connections alive */ -#define SO_DONTROUTE 0x0010 /* just use interface addresses */ -#define SO_BROADCAST 0x0020 /* permit sending of broadcast msgs */ -#define SO_USELOOPBACK 0x0040 /* bypass hardware when possible */ -#define SO_LINGER 0x0080 /* linger on close if data present */ -#define SO_OOBINLINE 0x0100 /* leave received OOB data in line */ - -#define SO_DONTLINGER (u_int)(~SO_LINGER) - -/* - * Additional options. - */ -#define SO_SNDBUF 0x1001 /* send buffer size */ -#define SO_RCVBUF 0x1002 /* receive buffer size */ -#define SO_SNDLOWAT 0x1003 /* send low-water mark */ -#define SO_RCVLOWAT 0x1004 /* receive low-water mark */ -#define SO_SNDTIMEO 0x1005 /* send timeout */ -#define SO_RCVTIMEO 0x1006 /* receive timeout */ -#define SO_ERROR 0x1007 /* get error status and clear */ -#define SO_TYPE 0x1008 /* get socket type */ - -/* - * TCP options. - */ -#define TCP_NODELAY 0x0001 - -/* - * Address families. - */ -#define AF_UNSPEC 0 /* unspecified */ -#define AF_UNIX 1 /* local to host (pipes, portals) */ -#define AF_INET 2 /* internetwork: UDP, TCP, etc. */ -#define AF_IMPLINK 3 /* arpanet imp addresses */ -#define AF_PUP 4 /* pup protocols: e.g. BSP */ -#define AF_CHAOS 5 /* mit CHAOS protocols */ -#define AF_NS 6 /* XEROX NS protocols */ -#define AF_ISO 7 /* ISO protocols */ -#define AF_OSI AF_ISO /* OSI is ISO */ -#define AF_ECMA 8 /* european computer manufacturers */ -#define AF_DATAKIT 9 /* datakit protocols */ -#define AF_CCITT 10 /* CCITT protocols, X.25 etc */ -#define AF_SNA 11 /* IBM SNA */ -#define AF_DECnet 12 /* DECnet */ -#define AF_DLI 13 /* Direct data link interface */ -#define AF_LAT 14 /* LAT */ -#define AF_HYLINK 15 /* NSC Hyperchannel */ -#define AF_APPLETALK 16 /* AppleTalk */ -#define AF_NETBIOS 17 /* NetBios-style addresses */ - -#define AF_MAX 18 - -/* - * Structure used by kernel to store most - * addresses. - */ -struct sockaddr { - u_short sa_family; /* address family */ - char sa_data[14]; /* up to 14 bytes of direct address */ -}; - -/* - * Structure used by kernel to pass protocol - * information in raw sockets. - */ -struct sockproto { - u_short sp_family; /* address family */ - u_short sp_protocol; /* protocol */ -}; - -/* - * Protocol families, same as address families for now. - */ -#define PF_UNSPEC AF_UNSPEC -#define PF_UNIX AF_UNIX -#define PF_INET AF_INET -#define PF_IMPLINK AF_IMPLINK -#define PF_PUP AF_PUP -#define PF_CHAOS AF_CHAOS -#define PF_NS AF_NS -#define PF_ISO AF_ISO -#define PF_OSI AF_OSI -#define PF_ECMA AF_ECMA -#define PF_DATAKIT AF_DATAKIT -#define PF_CCITT AF_CCITT -#define PF_SNA AF_SNA -#define PF_DECnet AF_DECnet -#define PF_DLI AF_DLI -#define PF_LAT AF_LAT -#define PF_HYLINK AF_HYLINK -#define PF_APPLETALK AF_APPLETALK - -#define PF_MAX AF_MAX - -/* - * Structure used for manipulating linger option. - */ -struct linger { - u_short l_onoff; /* option on/off */ - u_short l_linger; /* linger time */ -}; - -/* - * Level number for (get/set)sockopt() to apply to socket itself. - */ -#define SOL_SOCKET 0xffff /* options for socket level */ - -/* - * Maximum queue length specifiable by listen. - */ -#define SOMAXCONN 5 - -#define MSG_OOB 0x1 /* process out-of-band data */ -#define MSG_PEEK 0x2 /* peek at incoming message */ -#define MSG_DONTROUTE 0x4 /* send without using routing tables */ - -#define MSG_MAXIOVLEN 16 - -/* - * Define constant based on rfc883, used by gethostbyxxxx() calls. - */ -#define MAXGETHOSTSTRUCT 1024 - -/* - * Define flags to be used with the WSAAsyncSelect() call. - */ -#define FD_READ 0x01 -#define FD_WRITE 0x02 -#define FD_OOB 0x04 -#define FD_ACCEPT 0x08 -#define FD_CONNECT 0x10 -#define FD_CLOSE 0x20 - -/* - * All Windows Sockets error constants are biased by WSABASEERR from - * the "normal" - */ -#define WSABASEERR 10000 -/* - * Windows Sockets definitions of regular Microsoft C error constants - */ -#define WSAEINTR (WSABASEERR+4) -#define WSAEBADF (WSABASEERR+9) -#define WSAEACCES (WSABASEERR+13) -#define WSAEFAULT (WSABASEERR+14) -#define WSAEINVAL (WSABASEERR+22) -#define WSAEMFILE (WSABASEERR+24) - -/* - * Windows Sockets definitions of regular Berkeley error constants - */ -#define WSAEWOULDBLOCK (WSABASEERR+35) -#define WSAEINPROGRESS (WSABASEERR+36) -#define WSAEALREADY (WSABASEERR+37) -#define WSAENOTSOCK (WSABASEERR+38) -#define WSAEDESTADDRREQ (WSABASEERR+39) -#define WSAEMSGSIZE (WSABASEERR+40) -#define WSAEPROTOTYPE (WSABASEERR+41) -#define WSAENOPROTOOPT (WSABASEERR+42) -#define WSAEPROTONOSUPPORT (WSABASEERR+43) -#define WSAESOCKTNOSUPPORT (WSABASEERR+44) -#define WSAEOPNOTSUPP (WSABASEERR+45) -#define WSAEPFNOSUPPORT (WSABASEERR+46) -#define WSAEAFNOSUPPORT (WSABASEERR+47) -#define WSAEADDRINUSE (WSABASEERR+48) -#define WSAEADDRNOTAVAIL (WSABASEERR+49) -#define WSAENETDOWN (WSABASEERR+50) -#define WSAENETUNREACH (WSABASEERR+51) -#define WSAENETRESET (WSABASEERR+52) -#define WSAECONNABORTED (WSABASEERR+53) -#define WSAECONNRESET (WSABASEERR+54) -#define WSAENOBUFS (WSABASEERR+55) -#define WSAEISCONN (WSABASEERR+56) -#define WSAENOTCONN (WSABASEERR+57) -#define WSAESHUTDOWN (WSABASEERR+58) -#define WSAETOOMANYREFS (WSABASEERR+59) -#define WSAETIMEDOUT (WSABASEERR+60) -#define WSAECONNREFUSED (WSABASEERR+61) -#define WSAELOOP (WSABASEERR+62) -#define WSAENAMETOOLONG (WSABASEERR+63) -#define WSAEHOSTDOWN (WSABASEERR+64) -#define WSAEHOSTUNREACH (WSABASEERR+65) -#define WSAENOTEMPTY (WSABASEERR+66) -#define WSAEPROCLIM (WSABASEERR+67) -#define WSAEUSERS (WSABASEERR+68) -#define WSAEDQUOT (WSABASEERR+69) -#define WSAESTALE (WSABASEERR+70) -#define WSAEREMOTE (WSABASEERR+71) - -/* - * Extended Windows Sockets error constant definitions - */ -#define WSASYSNOTREADY (WSABASEERR+91) -#define WSAVERNOTSUPPORTED (WSABASEERR+92) -#define WSANOTINITIALISED (WSABASEERR+93) - -/* - * Error return codes from gethostbyname() and gethostbyaddr() - * (when using the resolver). Note that these errors are - * retrieved via WSAGetLastError() and must therefore follow - * the rules for avoiding clashes with error numbers from - * specific implementations or language run-time systems. - * For this reason the codes are based at WSABASEERR+1001. - * Note also that [WSA]NO_ADDRESS is defined only for - * compatibility purposes. - */ - -#define h_errno WSAGetLastError() - -/* Authoritative Answer: Host not found */ -#define WSAHOST_NOT_FOUND (WSABASEERR+1001) -#define HOST_NOT_FOUND WSAHOST_NOT_FOUND - -/* Non-Authoritative: Host not found, or SERVERFAIL */ -#define WSATRY_AGAIN (WSABASEERR+1002) -#define TRY_AGAIN WSATRY_AGAIN - -/* Non recoverable errors, FORMERR, REFUSED, NOTIMP */ -#define WSANO_RECOVERY (WSABASEERR+1003) -#define NO_RECOVERY WSANO_RECOVERY - -/* Valid name, no data record of requested type */ -#define WSANO_DATA (WSABASEERR+1004) -#define NO_DATA WSANO_DATA - -/* no address, look for MX record */ -#define WSANO_ADDRESS WSANO_DATA -#define NO_ADDRESS WSANO_ADDRESS - -/* - * Windows Sockets errors redefined as regular Berkeley error constants - */ -#define EWOULDBLOCK WSAEWOULDBLOCK -#define EINPROGRESS WSAEINPROGRESS -#define EALREADY WSAEALREADY -#define ENOTSOCK WSAENOTSOCK -#define EDESTADDRREQ WSAEDESTADDRREQ -#define EMSGSIZE WSAEMSGSIZE -#define EPROTOTYPE WSAEPROTOTYPE -#define ENOPROTOOPT WSAENOPROTOOPT -#define EPROTONOSUPPORT WSAEPROTONOSUPPORT -#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT -#define EOPNOTSUPP WSAEOPNOTSUPP -#define EPFNOSUPPORT WSAEPFNOSUPPORT -#define EAFNOSUPPORT WSAEAFNOSUPPORT -#define EADDRINUSE WSAEADDRINUSE -#define EADDRNOTAVAIL WSAEADDRNOTAVAIL -#define ENETDOWN WSAENETDOWN -#define ENETUNREACH WSAENETUNREACH -#define ENETRESET WSAENETRESET -#define ECONNABORTED WSAECONNABORTED -#define ECONNRESET WSAECONNRESET -#define ENOBUFS WSAENOBUFS -#define EISCONN WSAEISCONN -#define ENOTCONN WSAENOTCONN -#define ESHUTDOWN WSAESHUTDOWN -#define ETOOMANYREFS WSAETOOMANYREFS -#define ETIMEDOUT WSAETIMEDOUT -#define ECONNREFUSED WSAECONNREFUSED -#define ELOOP WSAELOOP -#define ENAMETOOLONG WSAENAMETOOLONG -#define EHOSTDOWN WSAEHOSTDOWN -#define EHOSTUNREACH WSAEHOSTUNREACH -#define ENOTEMPTY WSAENOTEMPTY -#define EPROCLIM WSAEPROCLIM -#define EUSERS WSAEUSERS -#define EDQUOT WSAEDQUOT -#define ESTALE WSAESTALE -#define EREMOTE WSAEREMOTE - -/* Socket function prototypes */ - -#ifdef __cplusplus -extern "C" { -#endif - -SOCKET PASCAL FAR accept (SOCKET s, struct sockaddr FAR *addr, - int FAR *addrlen); - -int PASCAL FAR bind (SOCKET s, const struct sockaddr FAR *addr, int namelen); - -int PASCAL FAR closesocket (SOCKET s); - -int PASCAL FAR connect (SOCKET s, const struct sockaddr FAR *name, int namelen); - -int PASCAL FAR ioctlsocket (SOCKET s, long cmd, u_long FAR *argp); - -int PASCAL FAR getpeername (SOCKET s, struct sockaddr FAR *name, - int FAR * namelen); - -int PASCAL FAR getsockname (SOCKET s, struct sockaddr FAR *name, - int FAR * namelen); - -int PASCAL FAR getsockopt (SOCKET s, int level, int optname, - char FAR * optval, int FAR *optlen); - -u_long PASCAL FAR htonl (u_long hostlong); - -u_short PASCAL FAR htons (u_short hostshort); - -unsigned long PASCAL FAR inet_addr (const char FAR * cp); - -char FAR * PASCAL FAR inet_ntoa (struct in_addr in); - -int PASCAL FAR listen (SOCKET s, int backlog); - -u_long PASCAL FAR ntohl (u_long netlong); - -u_short PASCAL FAR ntohs (u_short netshort); - -int PASCAL FAR recv (SOCKET s, char FAR * buf, int len, int flags); - -int PASCAL FAR recvfrom (SOCKET s, char FAR * buf, int len, int flags, - struct sockaddr FAR *from, int FAR * fromlen); - -int PASCAL FAR select (int nfds, fd_set FAR *readfds, fd_set FAR *writefds, - fd_set FAR *exceptfds, const struct timeval FAR *timeout); - -int PASCAL FAR send (SOCKET s, const char FAR * buf, int len, int flags); - -int PASCAL FAR sendto (SOCKET s, const char FAR * buf, int len, int flags, - const struct sockaddr FAR *to, int tolen); - -int PASCAL FAR setsockopt (SOCKET s, int level, int optname, - const char FAR * optval, int optlen); - -int PASCAL FAR shutdown (SOCKET s, int how); - -SOCKET PASCAL FAR socket (int af, int type, int protocol); - -/* Database function prototypes */ - -struct hostent FAR * PASCAL FAR gethostbyaddr(const char FAR * addr, - int len, int type); - -struct hostent FAR * PASCAL FAR gethostbyname(const char FAR * name); - -int PASCAL FAR gethostname (char FAR * name, int namelen); - -struct servent FAR * PASCAL FAR getservbyport(int port, const char FAR * proto); - -struct servent FAR * PASCAL FAR getservbyname(const char FAR * name, - const char FAR * proto); - -struct protoent FAR * PASCAL FAR getprotobynumber(int proto); - -struct protoent FAR * PASCAL FAR getprotobyname(const char FAR * name); - -/* Microsoft Windows Extension function prototypes */ - -int PASCAL FAR WSAStartup(WORD wVersionRequired, LPWSADATA lpWSAData); - -int PASCAL FAR WSACleanup(void); - -void PASCAL FAR WSASetLastError(int iError); - -int PASCAL FAR WSAGetLastError(void); - -BOOL PASCAL FAR WSAIsBlocking(void); - -int PASCAL FAR WSAUnhookBlockingHook(void); - -FARPROC PASCAL FAR WSASetBlockingHook(FARPROC lpBlockFunc); - -int PASCAL FAR WSACancelBlockingCall(void); - -HANDLE PASCAL FAR WSAAsyncGetServByName(HWND hWnd, u_int wMsg, - const char FAR * name, - const char FAR * proto, - char FAR * buf, int buflen); - -HANDLE PASCAL FAR WSAAsyncGetServByPort(HWND hWnd, u_int wMsg, int port, - const char FAR * proto, char FAR * buf, - int buflen); - -HANDLE PASCAL FAR WSAAsyncGetProtoByName(HWND hWnd, u_int wMsg, - const char FAR * name, char FAR * buf, - int buflen); - -HANDLE PASCAL FAR WSAAsyncGetProtoByNumber(HWND hWnd, u_int wMsg, - int number, char FAR * buf, - int buflen); - -HANDLE PASCAL FAR WSAAsyncGetHostByName(HWND hWnd, u_int wMsg, - const char FAR * name, char FAR * buf, - int buflen); - -HANDLE PASCAL FAR WSAAsyncGetHostByAddr(HWND hWnd, u_int wMsg, - const char FAR * addr, int len, int type, - const char FAR * buf, int buflen); - -int PASCAL FAR WSACancelAsyncRequest(HANDLE hAsyncTaskHandle); - -int PASCAL FAR WSAAsyncSelect(SOCKET s, HWND hWnd, u_int wMsg, - long lEvent); - -#ifdef __cplusplus -} -#endif - -/* Microsoft Windows Extended data types */ -typedef struct sockaddr SOCKADDR; -typedef struct sockaddr *PSOCKADDR; -typedef struct sockaddr FAR *LPSOCKADDR; - -typedef struct sockaddr_in SOCKADDR_IN; -typedef struct sockaddr_in *PSOCKADDR_IN; -typedef struct sockaddr_in FAR *LPSOCKADDR_IN; - -typedef struct linger LINGER; -typedef struct linger *PLINGER; -typedef struct linger FAR *LPLINGER; - -typedef struct in_addr IN_ADDR; -typedef struct in_addr *PIN_ADDR; -typedef struct in_addr FAR *LPIN_ADDR; - -typedef struct fd_set FD_SET; -typedef struct fd_set *PFD_SET; -typedef struct fd_set FAR *LPFD_SET; - -typedef struct hostent HOSTENT; -typedef struct hostent *PHOSTENT; -typedef struct hostent FAR *LPHOSTENT; - -typedef struct servent SERVENT; -typedef struct servent *PSERVENT; -typedef struct servent FAR *LPSERVENT; - -typedef struct protoent PROTOENT; -typedef struct protoent *PPROTOENT; -typedef struct protoent FAR *LPPROTOENT; - -typedef struct timeval TIMEVAL; -typedef struct timeval *PTIMEVAL; -typedef struct timeval FAR *LPTIMEVAL; - -/* - * Windows message parameter composition and decomposition - * macros. - * - * WSAMAKEASYNCREPLY is intended for use by the Windows Sockets implementation - * when constructing the response to a WSAAsyncGetXByY() routine. - */ -#define WSAMAKEASYNCREPLY(buflen,error) MAKELONG(buflen,error) -/* - * WSAMAKESELECTREPLY is intended for use by the Windows Sockets implementation - * when constructing the response to WSAAsyncSelect(). - */ -#define WSAMAKESELECTREPLY(event,error) MAKELONG(event,error) -/* - * WSAGETASYNCBUFLEN is intended for use by the Windows Sockets application - * to extract the buffer length from the lParam in the response - * to a WSAGetXByY(). - */ -#define WSAGETASYNCBUFLEN(lParam) LOWORD(lParam) -/* - * WSAGETASYNCERROR is intended for use by the Windows Sockets application - * to extract the error code from the lParam in the response - * to a WSAGetXByY(). - */ -#define WSAGETASYNCERROR(lParam) HIWORD(lParam) -/* - * WSAGETSELECTEVENT is intended for use by the Windows Sockets application - * to extract the event code from the lParam in the response - * to a WSAAsyncSelect(). - */ -#define WSAGETSELECTEVENT(lParam) LOWORD(lParam) -/* - * WSAGETSELECTERROR is intended for use by the Windows Sockets application - * to extract the error code from the lParam in the response - * to a WSAAsyncSelect(). - */ -#define WSAGETSELECTERROR(lParam) HIWORD(lParam) - -#endif /* _WINSOCKAPI_ */ - diff --git a/libraries/msdos/winsock/wsockip.c b/libraries/msdos/winsock/wsockip.c deleted file mode 100644 index 307541cfc2..0000000000 --- a/libraries/msdos/winsock/wsockip.c +++ /dev/null @@ -1,467 +0,0 @@ -/* - * Copyright (c) 1995 Regents of the University of Michigan. - * All rights reserved. - * - * os-ip.c -- platform-specific TCP & UDP related code - */ - -#ifndef lint -static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of Michigan.\nAll rights reserved.\n"; -#endif - -#include -#include -#if defined(WINSOCK) || defined(_WIN32) -#include -#include "msdos.h" -#include "stdarg.h" -#ifdef KERBEROS -#include "wshelper.h" -#endif /* KERBEROS */ -#endif /* WINSOCK */ -#include - -#ifdef _WIN32 -#include -#else /* _WIN32 */ -#include -#include -#include -#include -#endif /* _WIN32 */ -#ifdef _AIX -#include -#endif /* _AIX */ -#include "portable.h" -#include "lber.h" -#include "ldap.h" - -#ifdef NEED_FILIO -#ifdef WINSOCK -#include <_sys/filio.h> -#else /* WINSOCK */ -#include -#endif /* WINSOCK */ -#else /* NEED_FILIO */ -#ifdef WINSOCK -#include <_sys/ioctl.h> -#else /* WINSOCK */ -#include -#endif /* WINSOCK */ -#endif /* NEED_FILIO */ -#ifdef USE_SYSCONF -#include -#endif /* USE_SYSCONF */ - - -#ifdef MACOS -#define tcp_close( s ) tcpclose( s ) -#else /* MACOS */ -#ifdef DOS -#ifdef PCNFS -#define tcp_close( s ) close( s ) -#endif /* PCNFS */ -#ifdef NCSA -#define tcp_close( s ) netclose( s ); netshut() -#endif /* NCSA */ -#ifdef WINSOCK -#define tcp_close( s ) closesocket( s ); WSACleanup(); -#endif /* WINSOCK */ -#else /* DOS */ -#define tcp_close( s ) close( s ) -#endif /* DOS */ -#endif /* MACOS */ - - -#ifdef WINSOCK - static WSADATA wsadata; - -#ifdef LDAP_DEBUG -void -Debug( int level, char* fmt, ... ) -{ - char buf[BUFSIZ]; - va_list DbgArgs; - int i = 0; - char* arg[3] = { NULL, NULL, NULL }; - - va_start( DbgArgs, fmt ); - for ( i= 0; i < 3; i++ ) - { - arg[i] = va_arg( DbgArgs, va_list ); - } - va_end( DbgArgs ); /* Reset variable arguments. */ - - - wsprintf( buf, fmt, arg[0], arg[1], arg[2] ); - OutputDebugString( buf ); -} - -#define BPLEN 48 -#include - -void -lber_bprint( char *data, int len ) -{ - static char hexdig[] = "0123456789abcdef"; - char out[ BPLEN ]; - int i = 0; - char buf[BUFSIZ]; - - memset( out, 0, BPLEN ); - buf[0] = '\0'; - for ( ;; ) { - if ( len < 1 ) { - wsprintf( buf, "\t%s\n", ( i == 0 ) ? "(end)" : out ); - OutputDebugString( buf ); - break; - } - -#ifndef HEX - if ( isgraph( (unsigned char)*data )) { - out[ i ] = ' '; - out[ i+1 ] = *data; - } else { -#endif - out[ i ] = hexdig[ ( *data & 0xf0 ) >> 4 ]; - out[ i+1 ] = hexdig[ *data & 0x0f ]; -#ifndef HEX - } -#endif - i += 2; - len--; - data++; - - if ( i > BPLEN - 2 ) { - wsprintf( buf, "\t%s\n", out ); - OutputDebugString( buf ); - memset( out, 0, BPLEN ); - i = 0; - continue; - } - out[ i++ ] = ' '; - } -} -#endif /* LDAP_DEBUG */ -#endif /* WINSOCK */ - -int -connect_to_host( Sockbuf *sb, char *host, unsigned long address, - int port, int async ) -/* - * if host == NULL, connect using address - * "address" and "port" must be in network byte order - * zero is returned upon success, -1 if fatal error, -2 EINPROGRESS - * async is only used ifdef LDAP_REFERRALS (non-0 means don't wait for connect) - * XXX async is not used yet! - */ -{ - int rc, i, s, connected, use_hp; - struct sockaddr_in sin; - struct hostent *hp; - -#ifdef notyet -#ifdef LDAP_REFERRALS - int status; /* for ioctl call */ -#endif /* LDAP_REFERRALS */ -#endif /* notyet */ - - Debug( LDAP_DEBUG_TRACE, "connect_to_host: %s:%d\n", - ( host == NULL ) ? "(by address)" : host, ntohs( port ), 0 ); - -#ifdef WINSOCK - if ( WSAStartup( 0x0101, &wsadata ) != 0 ) { - return( (int)NULL ); - } -#endif - - hp = NULL; - connected = use_hp = 0; - - if ( host != NULL && ( address = inet_addr( host )) == -1 ) { - if ( (hp = gethostbyname( host )) == NULL ) { -#ifdef WINSOCK - errno = WSAGetLastError(); -#else - errno = EHOSTUNREACH; /* not exactly right, but... */ -#endif - return( -1 ); - } - use_hp = 1; - } - - rc = -1; - for ( i = 0; !use_hp || ( hp->h_addr_list[ i ] != 0 ); i++ ) { - if (( s = socket( AF_INET, SOCK_STREAM, 0 )) < 0 ) { - return( -1 ); - } -#ifdef notyet -#ifdef LDAP_REFERRALS - status = 1; - if ( async && ioctl( s, FIONBIO, (caddr_t)&status ) == -1 ) { - Debug( LDAP_DEBUG_ANY, "FIONBIO ioctl failed on %d\n", - s, 0, 0 ); - } -#endif /* LDAP_REFERRALS */ -#endif /* notyet */ - (void)memset( (char *)&sin, 0, sizeof( struct sockaddr_in )); - sin.sin_family = AF_INET; - sin.sin_port = port; - SAFEMEMCPY( (char *) &sin.sin_addr.s_addr, - ( use_hp ? (char *) hp->h_addr_list[ i ] : - (char *) &address ), sizeof( sin.sin_addr.s_addr) ); - - if ( connect( s, (struct sockaddr *)&sin, - sizeof( struct sockaddr_in )) >= 0 ) { - connected = 1; - rc = 0; - break; - } else { -#ifdef notyet -#ifdef LDAP_REFERRALS -#ifdef EAGAIN - if ( errno == EINPROGRESS || errno == EAGAIN ) { -#else /* EAGAIN */ - if ( errno == EINPROGRESS ) { -#endif /* EAGAIN */ - Debug( LDAP_DEBUG_TRACE, - "connect would block...\n", 0, 0, 0 ); - rc = -2; - break; - } -#endif /* LDAP_REFERRALS */ -#endif /* notyet */ - - Debug( LDAP_DEBUG_TRACE, "%s", (char *)inet_ntoa( sin.sin_addr ), 0, 0 ); - - close( s ); - if ( !use_hp ) { - break; - } - } - } - - sb->sb_sd = s; - - if ( connected ) { -#ifdef notyet -#ifdef LDAP_REFERRALS - status = 0; - if ( !async && ioctl( s, FIONBIO, (caddr_t)&on ) == -1 ) { - Debug( LDAP_DEBUG_ANY, "FIONBIO ioctl failed on %d\n", - s, 0, 0 ); - } -#endif /* LDAP_REFERRALS */ -#endif /* notyet */ - - Debug( LDAP_DEBUG_TRACE, "sd %d connected to: %s\n", - s, inet_ntoa( sin.sin_addr ), 0 ); - } - - return( rc ); /* Do NOT call WSACleanup. We want to use socket and various routines */ -} - - -void -close_connection( Sockbuf *sb ) -{ - tcp_close( sb->sb_sd ); -} - - -#ifdef KERBEROS -char * -host_connected_to( Sockbuf *sb ) -{ - struct hostent *hp = NULL; - int len; - struct sockaddr_in sin; - -#ifdef WINSOCK - struct hostent lhp; - char hName[BUFSIZ/2]; - unsigned int prevMode; - - // Create a function pointer type that can be type-checked - // by an ANSI-C compiler. - typedef struct hostent FAR * (PASCAL FAR * LPGHBA)(const char FAR * addr, int len, int type); - HINSTANCE hDLLInst; - LPGHBA ghba = NULL; // Declare pointer to functions that can be type-checked. - - memset(&lhp, 0x00, sizeof(struct hostent)); - hName[0] = '\0'; -#endif - (void)memset( (char *)&sin, 0, sizeof( struct sockaddr_in )); - len = sizeof( sin ); - if ( getpeername( sb->sb_sd, (struct sockaddr*) &sin, &len ) == -1 ) { - return( NULL ); - } - - /* - * do a reverse lookup on the addr to get the official hostname. - * this is necessary for kerberos to work right, since the official - * hostname is used as the kerberos instance. - */ -#ifdef WINSOCK - /* - * Dynamically detect and use wshelper.dll if available. If not use - * winsock's gethostbyaddr and cross your fingers. - */ - prevMode = SetErrorMode( SEM_NOOPENFILEERRORBOX ); - hDLLInst = LoadLibrary ("WSHELPER.DLL"); - SetErrorMode( prevMode ); - if (hDLLInst >= HINSTANCE_ERROR) { - ghba = (LPGHBA)GetProcAddress (hDLLInst, "rgethostbyaddr"); - - if (ghba) { - hp = (*ghba)( (char *)&sin.sin_addr, - sizeof( sin.sin_addr.s_addr ), AF_INET ); - if ( hp && hp->h_name ) { - /* copy name, put in our fake hp, make hp point to it - * because this hp disappears when FreeLibrary is called */ - strcpy(hName, hp->h_name); - lhp.h_name = &hName; - hp = &lhp; - } - } else { - hp = gethostbyaddr( (char *)&sin.sin_addr, - sizeof( sin.sin_addr.s_addr ), AF_INET ); - } - FreeLibrary (hDLLInst); - } else { - hp = gethostbyaddr( (char *)&sin.sin_addr, - sizeof( sin.sin_addr.s_addr ), AF_INET ); - } -#else - hp = gethostbyaddr( (char *)&sin.sin_addr, - sizeof( sin.sin_addr.s_addr ), AF_INET ); -#endif - if ( hp != NULL ) { - if ( hp->h_name != NULL ) { - return( strdup( hp->h_name )); - } - } - - return( NULL ); -} -#endif /* KERBEROS */ - - -#ifdef LDAP_REFERRALS -/* for UNIX */ -struct selectinfo { - fd_set si_readfds; - fd_set si_writefds; - fd_set si_use_readfds; - fd_set si_use_writefds; -}; - - -void -mark_select_write( LDAP *ld, Sockbuf *sb ) -{ - struct selectinfo *sip; - - sip = (struct selectinfo *)ld->ld_selectinfo; - - if ( !FD_ISSET( sb->sb_sd, &sip->si_writefds )) - FD_SET( sb->sb_sd, &sip->si_writefds ); -} - - -void -mark_select_read( LDAP *ld, Sockbuf *sb ) -{ - struct selectinfo *sip; - - sip = (struct selectinfo *)ld->ld_selectinfo; - - if ( !FD_ISSET( sb->sb_sd, &sip->si_readfds )) - FD_SET( sb->sb_sd, &sip->si_readfds ); -} - - -void -mark_select_clear( LDAP *ld, Sockbuf *sb ) -{ - struct selectinfo *sip; - - sip = (struct selectinfo *)ld->ld_selectinfo; - - FD_CLR( sb->sb_sd, &sip->si_writefds ); - FD_CLR( sb->sb_sd, &sip->si_readfds ); -} - - -int -is_write_ready( LDAP *ld, Sockbuf *sb ) -{ - struct selectinfo *sip; - - sip = (struct selectinfo *)ld->ld_selectinfo; - - return( FD_ISSET( sb->sb_sd, &sip->si_use_writefds )); -} - - -int -is_read_ready( LDAP *ld, Sockbuf *sb ) -{ - struct selectinfo *sip; - - sip = (struct selectinfo *)ld->ld_selectinfo; - - return( FD_ISSET( sb->sb_sd, &sip->si_use_readfds )); -} - - -void * -new_select_info() -{ - struct selectinfo *sip; - - if (( sip = (struct selectinfo *)calloc( 1, - sizeof( struct selectinfo ))) != NULL ) { - FD_ZERO( &sip->si_readfds ); - FD_ZERO( &sip->si_writefds ); - } - - return( (void *)sip ); -} - - -void -free_select_info( void *sip ) -{ - free( sip ); -} - - -int -do_ldap_select( LDAP *ld, struct timeval *timeout ) -{ - struct selectinfo *sip; - static int tblsize; - - Debug( LDAP_DEBUG_TRACE, "do_ldap_select\n", 0, 0, 0 ); - - if ( tblsize == 0 ) { -#ifdef USE_SYSCONF - tblsize = sysconf( _SC_OPEN_MAX ); -#else /* USE_SYSCONF */ -#ifdef WINSOCK - tblsize = FD_SETSIZE; -#else - tblsize = getdtablesize(); -#endif -#endif /* USE_SYSCONF */ - } - - sip = (struct selectinfo *)ld->ld_selectinfo; - sip->si_use_readfds = sip->si_readfds; - sip->si_use_writefds = sip->si_writefds; - - return( select( tblsize, &sip->si_use_readfds, &sip->si_use_writefds, - NULL, timeout )); -} -#endif /* LDAP_REFERRALS */ diff --git a/libraries/vms/README.VMS b/libraries/vms/README.VMS deleted file mode 100644 index 4cb3b6aeb4..0000000000 --- a/libraries/vms/README.VMS +++ /dev/null @@ -1,16 +0,0 @@ -LDAP VMS README - -The lber and ldap client libraries and the ldap server ldapd have been -ported to VMS. While we at the University of Michigan have no way to -test under VMS, the necessary code changes have been incorporated. - -Please see the file ldap/build/platforms/vms/make.com for some very basic -build instructions. - - -BUG REPORTING - - Bug reports should be sent to bug-ldap@umich.edu. They will be - passed on to those who did the LDAP VMS port. - -README Last updated 15 December 1994 Mark Smith diff --git a/libraries/vms/getopt.c b/libraries/vms/getopt.c deleted file mode 100644 index 814ab18c80..0000000000 --- a/libraries/vms/getopt.c +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) 1987 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that: (1) source distributions retain this entire copyright - * notice and comment, and (2) distributions including binaries display - * the following acknowledgement: ``This product includes software - * developed by the University of California, Berkeley and its contributors'' - * in the documentation or other materials provided with the distribution - * and in all advertising materials mentioning features or use of this - * software. Neither the name of the University nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)getopt.c 4.12 (Berkeley) 6/1/90"; -#endif /* LIBC_SCCS and not lint */ - -#include -#include -#include "lber.h" -#define index strchr -#define rindex strrchr - -/* - * get option letter from argument vector - */ -int opterr = 1, /* if error message should be printed */ - optind = 1, /* index into parent argv vector */ - optopt; /* character checked for validity */ -char *optarg; /* argument associated with option */ - -#define BADCH (int)'?' -#define EMSG "" - -getopt(nargc, nargv, ostr) - int nargc; - char **nargv, *ostr; -{ - static char *place = EMSG; /* option letter processing */ - register char *oli; /* option letter list index */ - char *p; - - if (!*place) { /* update scanning pointer */ - if (optind >= nargc || *(place = nargv[optind]) != '-') { - place = EMSG; - return(EOF); - } - if (place[1] && *++place == '-') { /* found "--" */ - ++optind; - place = EMSG; - return(EOF); - } - } /* option letter okay? */ - if ((optopt = (int)*place++) == (int)':' || - !(oli = index(ostr, optopt))) { - /* - * if the user didn't specify '-' as an option, - * assume it means EOF. - */ - if (optopt == (int)'-') - return(EOF); - if (!*place) - ++optind; - if (opterr) { - if (!(p = rindex(*nargv, '/'))) - p = *nargv; - else - ++p; - (void)fprintf(stderr, "%s: illegal option -- %c\n", - p, optopt); - } - return(BADCH); - } - if (*++oli != ':') { /* don't need argument */ - optarg = NULL; - if (!*place) - ++optind; - } - else { /* need an argument */ - if (*place) /* no white space */ - optarg = place; - else if (nargc <= ++optind) { /* no arg */ - place = EMSG; - if (!(p = rindex(*nargv, '/'))) - p = *nargv; - else - ++p; - if (opterr) - (void)fprintf(stderr, - "%s: option requires an argument -- %c\n", - p, optopt); - return(BADCH); - } - else /* white space */ - optarg = nargv[optind]; - place = EMSG; - ++optind; - } - return(optopt); /* dump back option letter */ -} diff --git a/libraries/vms/strings.c b/libraries/vms/strings.c deleted file mode 100644 index e96ceb3b02..0000000000 --- a/libraries/vms/strings.c +++ /dev/null @@ -1,97 +0,0 @@ -/* - * strings.c - */ -#include -#include - - -#ifndef NO_GLOBALS -/* - * Copyright (c) 1987 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ -/* - * This array is designed for mapping upper and lower case letter - * together for a case independent comparison. The mappings are - * based upon ascii character sequences. - */ -static char charmap[] = { - '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', - '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', - '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', - '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', - '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', - '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', - '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', - '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', - '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147', - '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', - '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', - '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137', - '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147', - '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', - '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', - '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', - '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', - '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', - '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', - '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', - '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247', - '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257', - '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267', - '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277', - '\300', '\341', '\342', '\343', '\344', '\345', '\346', '\347', - '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', - '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', - '\370', '\371', '\372', '\333', '\334', '\335', '\336', '\337', - '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', - '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', - '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', - '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377', -}; - -int -strcasecmp(s1, s2) - register char *s1, *s2; -{ - register char *cm = charmap; - - while (cm[*s1] == cm[*s2++]) - if (*s1++ == '\0') - return(0); - return(cm[*s1] - cm[*--s2]); -} - -int -strncasecmp(s1, s2, n) - register char *s1, *s2; - register long n; -{ - register char *cm = charmap; - - while (--n >= 0 && cm[*s1] == cm[*s2++]) - if (*s1++ == '\0') - return(0); - return(n < 0 ? 0 : cm[*s1] - cm[*--s2]); -} -#endif NO_GLOBALS - - -char * -strdup( p ) - char *p; -{ - char *r; - - r = (char *) malloc( strlen( p ) + 1 ); - if ( r != NULL ) { - strcpy( r, p ); - } - - return( r ); -} - -void bcopy (void * src, void *dest, int n) { - memmove(dest, src, n); -} diff --git a/libraries/vms/ucx_select.h b/libraries/vms/ucx_select.h deleted file mode 100644 index a45e3ab382..0000000000 --- a/libraries/vms/ucx_select.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Select uses bit masks of file descriptors in longs. These macros - * manipulate such bit fields. - * - * FD_SETSIZE is the number file descriptors select() is able to - * deal with. For DEC TCP/IP on VMS this is currently 32. - */ -#define FD_SETSIZE 32 -#define NBBY 8 /* number of bits in a byte */ - -typedef long fd_mask; -#define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */ - -#ifndef howmany -#define howmany(x, y) (((x)+((y)-1))/(y)) -#endif - -typedef struct fd_set { - fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)]; -} fd_set; - -#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS))) -#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS))) -#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS))) -#define FD_ZERO(p) memset((char *)(p), 0, sizeof(*(p))) - -#define getdtablesize() FD_SETSIZE - From 62a5807bb3c40ee57f569c15116a80a4a67acd90 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 21 Oct 1998 04:34:47 +0000 Subject: [PATCH 122/148] Use autoconf defines --- clients/finger/main.c | 8 +++++--- clients/gopher/detach.c | 8 ++++---- clients/gopher/go500.c | 8 +++++--- clients/gopher/go500gw.c | 2 +- clients/rcpt500/query.c | 22 +++++++++++----------- clients/tools/ldapsearch.c | 6 +++--- clients/ud/auth.c | 2 +- clients/ud/globals.c | 2 +- clients/ud/main.c | 7 ++++--- clients/ud/print.c | 14 ++++++-------- clients/ud/ud.h | 13 ++++++++----- clients/ud/util.c | 2 +- 12 files changed, 50 insertions(+), 44 deletions(-) diff --git a/clients/finger/main.c b/clients/finger/main.c index d9ce474fdb..90d3f0c0ed 100644 --- a/clients/finger/main.c +++ b/clients/finger/main.c @@ -170,11 +170,13 @@ static do_query() exit( 1 ); } -#ifdef USE_SYSCONF +#ifdef HAVE_SYSCONF tblsize = sysconf( _SC_OPEN_MAX ); -#else /* USE_SYSCONF */ +#elif HAVE_GETDTABLESIZE tblsize = getdtablesize(); -#endif /* USE_SYSCONF */ +#else + tblsize = FD_SETSIZE; +#endif #ifdef FD_SETSIZE if (tblsize > FD_SETSIZE) { diff --git a/clients/gopher/detach.c b/clients/gopher/detach.c index ce327fef20..8a8baa670c 100644 --- a/clients/gopher/detach.c +++ b/clients/gopher/detach.c @@ -31,7 +31,7 @@ int debug; #elif defined( HAVE_GETDTABLESIZE ) nbits = getdtablesize(); #else - nbits = 32; + nbits = FD_SETSIZE; #endif #ifdef FD_SETSIZE @@ -73,14 +73,14 @@ int debug; (void) dup2( sd, 2 ); close( sd ); -#ifdef USE_SETSID +#ifdef HAVE_SETSID (void) setsid(); -#else /* USE_SETSID */ +#else /* HAVE_SETSID */ if ( (sd = open( "/dev/tty", O_RDWR )) != -1 ) { (void) ioctl( sd, TIOCNOTTY, NULL ); (void) close( sd ); } -#endif /* USE_SETSID */ +#endif /* HAVE_SETSID */ } (void) signal( SIGPIPE, SIG_IGN ); diff --git a/clients/gopher/go500.c b/clients/gopher/go500.c index aef3ea376d..792b45a56e 100644 --- a/clients/gopher/go500.c +++ b/clients/gopher/go500.c @@ -137,11 +137,13 @@ char **argv; } #endif -#ifdef USE_SYSCONF +#ifdef HAVE_SYSCONF dtblsize = sysconf( _SC_OPEN_MAX ); -#else /* USE_SYSCONF */ +#elif HAVE_GETDTABLESIZE dtblsize = getdtablesize(); -#endif /* USE_SYSCONF */ +#else + dtblsize = FD_SETSIZE; +#endif #ifdef FD_SETSIZE if (dtblsize > FD_SETSIZE) { diff --git a/clients/gopher/go500gw.c b/clients/gopher/go500gw.c index 725d2b1c53..2260d6061a 100644 --- a/clients/gopher/go500gw.c +++ b/clients/gopher/go500gw.c @@ -153,7 +153,7 @@ char **argv; #elif HAVE_GETDTABLESIZE dtblsize = getdtablesize(); #else - dtblsize = 32; + dtblsize = FD_SETSIZE; #endif #ifdef FD_SETSIZE diff --git a/clients/rcpt500/query.c b/clients/rcpt500/query.c index 4ba778a1bd..65c57df2d3 100644 --- a/clients/rcpt500/query.c +++ b/clients/rcpt500/query.c @@ -80,11 +80,11 @@ query_cmd( msgp, reply ) /* * open connection to LDAP server and bind as dapuser */ -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS if ( do_cldap ) ldp = cldap_open( ldaphost, ldapport ); else -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ ldp = ldap_open( ldaphost, ldapport ); if ( ldp == NULL ) { @@ -94,9 +94,9 @@ query_cmd( msgp, reply ) return( 0 ); } -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS if ( !do_cldap ) -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ if ( ldap_simple_bind_s( ldp, dapuser, NULL ) != LDAP_SUCCESS ) { report_ldap_err( ldp, reply ); close_ldap( ldp ); @@ -113,11 +113,11 @@ query_cmd( msgp, reply ) matches = 0; #ifdef RCPT500_UFN -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS if ( !do_cldap && strchr( msgp->msg_arg, ',' ) != NULL ) { -#else /* CLDAP */ +#else /* LDAP_CONNECTIONLESS */ if ( strchr( msgp->msg_arg, ',' ) != NULL ) { -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ struct timeval tv; ldap_ufn_setprefix( ldp, searchbase ); @@ -136,12 +136,12 @@ query_cmd( msgp, reply ) for ( lfi = ldap_getfirstfilter( lfdp, "rcpt500", msgp->msg_arg ); lfi != NULL; lfi = ldap_getnextfilter( lfdp )) { -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS if ( do_cldap ) rc = cldap_search_s( ldp, searchbase, LDAP_SCOPE_SUBTREE, lfi->lfi_filter, attrs, 0, &ldmsgp, dapuser ); else -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ rc = ldap_search_s( ldp, searchbase, LDAP_SCOPE_SUBTREE, lfi->lfi_filter, attrs, 0, &ldmsgp ); @@ -223,11 +223,11 @@ query_cmd( msgp, reply ) void close_ldap( LDAP *ld ) { -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS if ( do_cldap ) cldap_close( ld ); else -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ ldap_unbind( ld ); } diff --git a/clients/tools/ldapsearch.c b/clients/tools/ldapsearch.c index bd1b568cf9..97ad7568b8 100644 --- a/clients/tools/ldapsearch.c +++ b/clients/tools/ldapsearch.c @@ -50,7 +50,7 @@ char *s; fprintf( stderr, " -z size lim\tsize limit (in entries) for search\n" ); fprintf( stderr, " -D binddn\tbind dn\n" ); fprintf( stderr, " -w passwd\tbind passwd (for simple authentication)\n" ); -#ifdef KERBEROS +#ifdef HAVE_KERBEROS fprintf( stderr, " -k\t\tuse Kerberos instead of Simple Password authentication\n" ); #endif fprintf( stderr, " -h host\tldap server\n" ); @@ -111,7 +111,7 @@ char **argv; scope = LDAP_SCOPE_SUBTREE; while (( i = getopt( argc, argv, -#ifdef KERBEROS +#ifdef HAVE_KERBEROS "KknuvtRABLD:s:f:h:b:d:p:F:a:w:l:z:S:" #else "nuvtRABLD:s:f:h:b:d:p:F:a:w:l:z:S:" @@ -131,7 +131,7 @@ char **argv; fprintf( stderr, "compile with -DLDAP_DEBUG for debugging\n" ); #endif /* LDAP_DEBUG */ break; -#ifdef KERBEROS +#ifdef HAVE_KERBEROS case 'k': /* use kerberos bind */ kerberos = 2; break; diff --git a/clients/ud/auth.c b/clients/ud/auth.c index a245a05f13..0e48fa6b86 100644 --- a/clients/ud/auth.c +++ b/clients/ud/auth.c @@ -34,7 +34,7 @@ extern char *mygetpass(); /* getpass() passwds are too short */ extern int debug; /* debug flag */ #endif -#ifdef KERBEROS +#ifdef HAVE_KERBEROS static char tktpath[20]; /* ticket file path */ static int kinit(); static int valid_tgt(); diff --git a/clients/ud/globals.c b/clients/ud/globals.c index cbde607652..6c6f74f979 100644 --- a/clients/ud/globals.c +++ b/clients/ud/globals.c @@ -44,7 +44,7 @@ struct attribute attrlist[] = { #ifdef UOFM { "multiLineDescription", "Description", change_field, ATTR_FLAG_PERSON | ATTR_FLAG_GROUP | ATTR_FLAG_READ | ATTR_FLAG_PERSON_MOD | ATTR_FLAG_GROUP_MOD | ATTR_FLAG_IS_MULTILINE }, #endif -#ifdef KERBEROS +#ifdef HAVE_KERBEROS { "krbName", "Kerberos name", NULL, ATTR_FLAG_PERSON | ATTR_FLAG_READ }, #endif { "description", "Brief description", NULL, ATTR_FLAG_PERSON | ATTR_FLAG_GROUP | ATTR_FLAG_READ }, diff --git a/clients/ud/main.c b/clients/ud/main.c index 3bab4f83b9..a089742df2 100644 --- a/clients/ud/main.c +++ b/clients/ud/main.c @@ -270,7 +270,7 @@ do_commands() printf(" Thank you!\n"); ldap_unbind(ld); -#ifdef KERBEROS +#ifdef HAVE_KERBEROS destroy_tickets(); #endif exit(0); @@ -693,9 +693,9 @@ RETSIGTYPE attn() fflush(stderr); fflush(stdout); printf("\n\n INTERRUPTED!\n"); -#if defined(DOS) || defined(SYSV) + (void) signal(SIGINT, attn); -#endif + longjmp(env, 1); } @@ -711,6 +711,7 @@ RETSIGTYPE chwinsz() if (win.ws_col != 0) col_size = win.ws_col; } + (void) signal(SIGWINCH, chwinsz); } #endif diff --git a/clients/ud/print.c b/clients/ud/print.c index 7eafd315b5..d6eb2bdeff 100644 --- a/clients/ud/print.c +++ b/clients/ud/print.c @@ -13,14 +13,14 @@ #include "portable.h" #include -#include #include -#ifndef __STDC__ -#include -#endif -#include + +#include +#include + #include #include + #include "ud.h" #ifdef DEBUG @@ -597,9 +597,7 @@ time2text( char *ldtimestr, int dateonly ) /* gtime.c - inverse gmtime */ -#if !defined( MACOS ) && !defined( _WIN32 ) && !defined( DOS ) -#include -#endif /* !MACOS */ +#include /* gtime(): the inverse of localtime(). This routine was supplied by Mike Accetta at CMU many years ago. diff --git a/clients/ud/ud.h b/clients/ud/ud.h index 40b6ecff7a..9a54cafae3 100644 --- a/clients/ud/ud.h +++ b/clients/ud/ud.h @@ -10,14 +10,13 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #ifdef DOS -#include "protoud.h" -#define strncasecmp(a, b, n) strnicmp(a, b, n) -#define strcasecmp(a, b) stricmp(a, b) #define MAX_VALUES 8 #else #define MAX_VALUES 1000 -#endif /* end of DOS ifdef */ +#endif /* !DOS */ /***************************************************************************** ** @@ -87,7 +86,7 @@ /* * Authentication method we will be using. */ -#ifdef KERBEROS +#ifdef HAVE_KERBEROS #define UD_AUTH_METHOD LDAP_AUTH_KRBV4 #else #define UD_AUTH_METHOD LDAP_AUTH_SIMPLE @@ -136,6 +135,8 @@ #define ATTR_FLAG_IS_A_BOOL 0x4000 #define ATTR_FLAG_IS_MULTILINE 0x8000 +LDAP_BEGIN_DECL + /* * These are the structures we use when parsing an answer we get from the LDAP * server. @@ -156,3 +157,5 @@ struct entry { char *name; struct attribute attrs[MAX_ATTRS]; }; + +LDAP_END_DECL diff --git a/clients/ud/util.c b/clients/ud/util.c index c7fc697dbd..32e686e390 100644 --- a/clients/ud/util.c +++ b/clients/ud/util.c @@ -217,7 +217,7 @@ char *s; { if (errno != 0) perror(s); -#ifdef KERBEROS +#ifdef HAVE_KERBEROS destroy_tickets(); #endif exit(-1); From e40ec58ab279d0c7bc1874424b78b371a297b8f5 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 21 Oct 1998 21:56:38 +0000 Subject: [PATCH 123/148] import localtime -> gmtime change from -devel --- servers/slapd/add.c | 5 +++-- servers/slapd/modify.c | 5 +++-- servers/slapd/monitor.c | 15 +++++++++------ 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/servers/slapd/add.c b/servers/slapd/add.c index feecf522b5..7d31bc8744 100644 --- a/servers/slapd/add.c +++ b/servers/slapd/add.c @@ -186,10 +186,11 @@ add_created_attrs( Operation *op, Entry *e ) attr_merge( e, "creatorsname", bvals ); pthread_mutex_lock( ¤ttime_mutex ); - ltm = localtime( ¤ttime ); -#ifdef LDAP_Y2K +#ifndef LDAP_LOCALTIME + ltm = gmtime( ¤ttime ); strftime( buf, sizeof(buf), "%Y%m%d%H%M%SZ", ltm ); #else + ltm = localtime( ¤ttime ); strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm ); #endif pthread_mutex_unlock( ¤ttime_mutex ); diff --git a/servers/slapd/modify.c b/servers/slapd/modify.c index 8c03510460..2820a3ed19 100644 --- a/servers/slapd/modify.c +++ b/servers/slapd/modify.c @@ -253,10 +253,11 @@ add_lastmods( Operation *op, LDAPMod **mods ) *mods = tmp; pthread_mutex_lock( ¤ttime_mutex ); - ltm = localtime( ¤ttime ); -#ifdef LDAP_Y2K +#ifndef LDAP_LOCALTIME + ltm = gmtime( ¤ttime ); strftime( buf, sizeof(buf), "%Y%m%d%H%M%SZ", ltm ); #else + ltm = localtime( ¤ttime ); strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm ); #endif pthread_mutex_unlock( ¤ttime_mutex ); diff --git a/servers/slapd/monitor.c b/servers/slapd/monitor.c index 66c6494e5c..c43b61ac46 100644 --- a/servers/slapd/monitor.c +++ b/servers/slapd/monitor.c @@ -95,10 +95,11 @@ monitor_info( Connection *conn, Operation *op ) nreadwaiters++; } pthread_mutex_lock( ¤ttime_mutex ); - ltm = localtime( &c[i].c_starttime ); -#ifdef LDAP_Y2K +#ifndef LDAP_LOCALTIME + ltm = gmtime( &c[i].c_starttime ); strftime( buf2, sizeof(buf2), "%Y%m%d%H%M%SZ", ltm ); #else + ltm = localtime( &c[i].c_starttime ); strftime( buf2, sizeof(buf2), "%y%m%d%H%M%SZ", ltm ); #endif pthread_mutex_unlock( ¤ttime_mutex ); @@ -163,10 +164,11 @@ monitor_info( Connection *conn, Operation *op ) attr_merge( e, "bytessent", vals ); pthread_mutex_lock( ¤ttime_mutex ); - ltm = localtime( ¤ttime ); -#ifdef LDAP_Y2K +#ifndef LDAP_LOCALTIME + ltm = gmtime( ¤ttime ); strftime( buf, sizeof(buf), "%Y%m%d%H%M%SZ", ltm ); #else + ltm = localtime( ¤ttime ); strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm ); #endif pthread_mutex_unlock( ¤ttime_mutex ); @@ -175,10 +177,11 @@ monitor_info( Connection *conn, Operation *op ) attr_merge( e, "currenttime", vals ); pthread_mutex_lock( ¤ttime_mutex ); - ltm = localtime( &starttime ); -#ifdef LDAP_Y2K +#ifndef LDAP_LOCALTIME + ltm = gmtime( &starttime ); strftime( buf, sizeof(buf), "%Y%m%d%H%M%SZ", ltm ); #else + ltm = localtime( &starttime ); strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm ); #endif pthread_mutex_unlock( ¤ttime_mutex ); From c0f5c884297aac7b930afad98f601912c83e9e72 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 21 Oct 1998 23:49:46 +0000 Subject: [PATCH 124/148] SLAPD compiles. Needs LDBM work to link. --- servers/slapd/acl.c | 14 ++--- servers/slapd/aclparse.c | 18 +++--- servers/slapd/add.c | 9 +-- servers/slapd/attr.c | 19 ++++-- servers/slapd/ava.c | 7 ++- servers/slapd/back-ldbm/add.c | 7 ++- servers/slapd/back-ldbm/attr.c | 7 ++- servers/slapd/back-ldbm/back-ldbm.h | 2 +- servers/slapd/back-ldbm/bind.c | 54 +++++++---------- servers/slapd/back-ldbm/cache.c | 5 +- servers/slapd/back-ldbm/close.c | 5 +- servers/slapd/back-ldbm/compare.c | 7 ++- servers/slapd/back-ldbm/config.c | 7 ++- servers/slapd/back-ldbm/dbcache.c | 13 ++-- servers/slapd/back-ldbm/delete.c | 7 ++- servers/slapd/back-ldbm/dn2id.c | 13 ++-- servers/slapd/back-ldbm/filterindex.c | 7 ++- servers/slapd/back-ldbm/group.c | 9 +-- servers/slapd/back-ldbm/id2children.c | 9 +-- servers/slapd/back-ldbm/id2entry.c | 11 ++-- servers/slapd/back-ldbm/idl.c | 16 +++-- servers/slapd/back-ldbm/index.c | 11 ++-- servers/slapd/back-ldbm/init.c | 15 ++--- servers/slapd/back-ldbm/kerberos.c | 17 +++--- servers/slapd/back-ldbm/modify.c | 7 ++- servers/slapd/back-ldbm/modrdn.c | 7 ++- servers/slapd/back-ldbm/nextid.c | 8 ++- servers/slapd/back-ldbm/search.c | 7 ++- servers/slapd/back-ldbm/unbind.c | 5 +- servers/slapd/back-passwd/config.c | 10 ++-- servers/slapd/back-passwd/search.c | 11 ++-- servers/slapd/back-shell/abandon.c | 7 ++- servers/slapd/back-shell/add.c | 7 ++- servers/slapd/back-shell/bind.c | 7 ++- servers/slapd/back-shell/compare.c | 7 ++- servers/slapd/back-shell/config.c | 7 ++- servers/slapd/back-shell/delete.c | 7 ++- servers/slapd/back-shell/fork.c | 7 ++- servers/slapd/back-shell/init.c | 5 +- servers/slapd/back-shell/modify.c | 7 ++- servers/slapd/back-shell/modrdn.c | 7 ++- servers/slapd/back-shell/result.c | 7 ++- servers/slapd/back-shell/search.c | 7 ++- servers/slapd/back-shell/unbind.c | 7 ++- servers/slapd/backend.c | 28 +++++---- servers/slapd/bind.c | 13 ++-- servers/slapd/ch_malloc.c | 6 +- servers/slapd/charray.c | 7 ++- servers/slapd/compare.c | 5 +- servers/slapd/config.c | 7 ++- servers/slapd/configinfo.c | 7 ++- servers/slapd/connection.c | 28 ++++----- servers/slapd/daemon.c | 66 +++++++++------------ servers/slapd/delete.c | 7 ++- servers/slapd/detach.c | 30 ++++------ servers/slapd/dn.c | 11 ++-- servers/slapd/entry.c | 9 +-- servers/slapd/filter.c | 21 +++---- servers/slapd/filterentry.c | 9 +-- servers/slapd/init.c | 12 ++-- servers/slapd/lock.c | 12 ++-- servers/slapd/main.c | 21 +++---- servers/slapd/modify.c | 10 ++-- servers/slapd/modrdn.c | 7 ++- servers/slapd/monitor.c | 11 ++-- servers/slapd/operation.c | 7 ++- servers/slapd/phonetic.c | 18 +++--- servers/slapd/repl.c | 8 ++- servers/slapd/result.c | 31 ++++------ servers/slapd/schema.c | 7 ++- servers/slapd/schemaparse.c | 7 ++- servers/slapd/search.c | 7 ++- servers/slapd/shell-backends/Makefile.in | 5 ++ servers/slapd/shell-backends/passwd-shell.c | 18 ++---- servers/slapd/shell-backends/shellutil.c | 42 +++++++++---- servers/slapd/shell-backends/shellutil.h | 2 +- servers/slapd/slap.h | 4 +- servers/slapd/str2filter.c | 7 ++- servers/slapd/strdup.c | 6 +- servers/slapd/tempnam.c | 6 +- servers/slapd/unbind.c | 5 +- servers/slapd/value.c | 17 +++--- 82 files changed, 498 insertions(+), 459 deletions(-) diff --git a/servers/slapd/acl.c b/servers/slapd/acl.c index 1098553319..cbd734612d 100644 --- a/servers/slapd/acl.c +++ b/servers/slapd/acl.c @@ -3,12 +3,10 @@ #include "portable.h" #include -#include -#include -#include -#include -#include -#include + +#include +#include +#include #include "slap.h" @@ -362,7 +360,7 @@ acl_access_allowed( return( (b->a_access & ~ACL_SELF) >= access ); } -#ifdef ACLGROUP +#ifdef SLAPD_ACLGROUPS if ( b->a_group != NULL && op->o_dn != NULL ) { char buf[512]; @@ -386,7 +384,7 @@ acl_access_allowed( return( (b->a_access & ~ACL_SELF) >= access ); } } -#endif /* ACLGROUP */ +#endif /* SLAPD_ACLGROUPS */ } if ( odn ) free( odn ); diff --git a/servers/slapd/aclparse.c b/servers/slapd/aclparse.c index a8ba951089..4e92136f92 100644 --- a/servers/slapd/aclparse.c +++ b/servers/slapd/aclparse.c @@ -3,16 +3,14 @@ #include "portable.h" #include -#include -#include -#include -#include -#include -#include -#include + +#include +#include +#include +#include +#include #include "slap.h" -#include "portable.h" extern Filter *str2filter(); extern struct acl *global_acl; @@ -210,11 +208,11 @@ parse_acl( } else if ( strcasecmp( left, "dnattr" ) == 0 ) { b->a_dnattr = strdup( right ); -#ifdef ACLGROUP +#ifdef SLAPD_ACLGROUPS } else if ( strcasecmp( left, "group" ) == 0 ) { regtest(fname, lineno, right); b->a_group = dn_upcase(strdup( right )); -#endif /* ACLGROUP */ +#endif /* SLAPD_ACLGROUPS */ } else if ( strcasecmp( left, "domain" ) == 0 ) { char *s; regtest(fname, lineno, right); diff --git a/servers/slapd/add.c b/servers/slapd/add.c index 7d31bc8744..110e3d365d 100644 --- a/servers/slapd/add.c +++ b/servers/slapd/add.c @@ -13,10 +13,11 @@ #include "portable.h" #include -#include -#include -#include -#include + +#include +#include +#include + #include "slap.h" extern Backend *select_backend(); diff --git a/servers/slapd/attr.c b/servers/slapd/attr.c index 5842813b96..1aa2392395 100644 --- a/servers/slapd/attr.c +++ b/servers/slapd/attr.c @@ -3,15 +3,22 @@ #include "portable.h" #include -#include -#include + +#ifdef HAVE_FCNTL_H #include -#include -#include -#include +#endif + +#include +#include +#include +#include + +#ifdef HAVE_SYS_PARAM_H #include +#endif + #include -#include "portable.h" + #include "slap.h" extern char **charray_dup(); diff --git a/servers/slapd/ava.c b/servers/slapd/ava.c index 12ef18cbf4..1e10339cb2 100644 --- a/servers/slapd/ava.c +++ b/servers/slapd/ava.c @@ -3,9 +3,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" int diff --git a/servers/slapd/back-ldbm/add.c b/servers/slapd/back-ldbm/add.c index 37b6a40635..eebcf4a257 100644 --- a/servers/slapd/back-ldbm/add.c +++ b/servers/slapd/back-ldbm/add.c @@ -3,9 +3,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" #include "back-ldbm.h" #include "proto-back-ldbm.h" diff --git a/servers/slapd/back-ldbm/attr.c b/servers/slapd/back-ldbm/attr.c index ca59ba3090..ea9694857f 100644 --- a/servers/slapd/back-ldbm/attr.c +++ b/servers/slapd/back-ldbm/attr.c @@ -3,9 +3,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" #include "back-ldbm.h" diff --git a/servers/slapd/back-ldbm/back-ldbm.h b/servers/slapd/back-ldbm/back-ldbm.h index 3d656f4dd9..dda1ff8452 100644 --- a/servers/slapd/back-ldbm/back-ldbm.h +++ b/servers/slapd/back-ldbm/back-ldbm.h @@ -9,7 +9,7 @@ LDAP_BEGIN_DECL #define DEFAULT_CACHE_SIZE 1000 -#ifdef LDBM_USE_DB2 +#ifdef HAVE_BERKELEY_DB2 # define DEFAULT_DBCACHE_SIZE (100 * DEFAULT_DB_PAGE_SIZE) #else # define DEFAULT_DBCACHE_SIZE 100000 diff --git a/servers/slapd/back-ldbm/bind.c b/servers/slapd/back-ldbm/bind.c index 90aa228f08..f27872456e 100644 --- a/servers/slapd/back-ldbm/bind.c +++ b/servers/slapd/back-ldbm/bind.c @@ -3,45 +3,33 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include +#include +#include + #include "slap.h" #include "back-ldbm.h" #include "proto-back-ldbm.h" -#ifdef KERBEROS -#ifdef KERBEROS_V -#include -#else -#include -#endif /* KERBEROS_V */ -#endif /* KERBEROS */ -#ifdef LDAP_CRYPT -/* change for crypted passwords -- lukeh */ -#ifdef __NeXT__ -extern char *crypt (char *key, char *salt); -#else -#include -#endif -#endif /* LDAP_CRYPT */ - -#ifdef LDAP_SHA1 +#ifdef SLAPD_SHA1 #include -#endif /* LDAP_SHA1 */ -#ifdef LDAP_MD5 +#endif /* SLAPD_SHA1 */ + +#ifdef SLAPD_MD5 #include -#endif /* LDAP_MD5 */ +#endif /* SLAPD_MD5 */ #include extern Attribute *attr_find(); -#ifdef KERBEROS +#ifdef HAVE_KERBEROS extern int krbv4_ldap_auth(); #endif -#ifdef LDAP_CRYPT +#ifdef SLAPD_CRYPT pthread_mutex_t crypt_mutex; static int @@ -65,7 +53,7 @@ crypted_value_find( return ( 0 ); } pthread_mutex_unlock( &crypt_mutex ); -#ifdef LDAP_MD5 +#ifdef SLAPD_MD5 } else if ( syntax != SYNTAX_BIN && strncasecmp( "{MD5}", vals[i]->bv_val, (sizeof("{MD5}") - 1 ) ) == 0 ) { ldap_MD5_CTX MD5context; @@ -87,8 +75,8 @@ crypted_value_find( if (strcmp(userpassword, base64digest) == 0) { return ( 0 ); } -#endif /* LDAP_MD5 */ -#ifdef LDAP_SHA1 +#endif /* SLAPD_MD5 */ +#ifdef SLAPD_SHA1 } else if ( syntax != SYNTAX_BIN && strncasecmp( "{SHA}", vals[i]->bv_val, (sizeof("{SHA}") - 1 ) ) == 0 ) { ldap_SHA1_CTX SHA1context; @@ -110,7 +98,7 @@ crypted_value_find( if (strcmp(userpassword, base64digest) == 0) { return ( 0 ); } -#endif /* LDAP_SHA1 */ +#endif /* SLAPD_SHA1 */ } else { if ( value_cmp( vals[i], v, syntax, normalize ) == 0 ) { return( 0 ); @@ -120,7 +108,7 @@ crypted_value_find( return( 1 ); } -#endif /* LDAP_CRYPT */ +#endif /* SLAPD_CRYPT */ int ldbm_back_bind( @@ -137,7 +125,7 @@ ldbm_back_bind( Attribute *a; int rc; char *matched = NULL; -#ifdef KERBEROS +#ifdef HAVE_KERBEROS char krbname[MAX_K_NAME_SZ + 1]; AUTH_DAT ad; #endif @@ -195,7 +183,7 @@ ldbm_back_bind( goto return_results; } -#ifdef LDAP_CRYPT +#ifdef SLAPD_CRYPT if ( crypted_value_find( a->a_vals, cred, a->a_syntax, 0, cred ) != 0 ) #else if ( value_find( a->a_vals, cred, a->a_syntax, 0 ) != 0 ) @@ -214,7 +202,7 @@ ldbm_back_bind( rc = 0; break; -#ifdef KERBEROS +#ifdef HAVE_KERBEROS case LDAP_AUTH_KRBV41: if ( krbv4_ldap_auth( be, cred, &ad ) != LDAP_SUCCESS ) { send_ldap_result( conn, op, LDAP_INVALID_CREDENTIALS, diff --git a/servers/slapd/back-ldbm/cache.c b/servers/slapd/back-ldbm/cache.c index 4c5e7c3203..940a226b84 100644 --- a/servers/slapd/back-ldbm/cache.c +++ b/servers/slapd/back-ldbm/cache.c @@ -3,9 +3,10 @@ #include "portable.h" #include -#include -#include + +#include #include "slap.h" + #include "back-ldbm.h" static int cache_delete_entry_internal(); diff --git a/servers/slapd/back-ldbm/close.c b/servers/slapd/back-ldbm/close.c index 66ef3e8606..f300d9f92d 100644 --- a/servers/slapd/back-ldbm/close.c +++ b/servers/slapd/back-ldbm/close.c @@ -3,8 +3,9 @@ #include "portable.h" #include -#include -#include + +#include + #include "slap.h" #include "back-ldbm.h" diff --git a/servers/slapd/back-ldbm/compare.c b/servers/slapd/back-ldbm/compare.c index 714923e177..e98f83dd94 100644 --- a/servers/slapd/back-ldbm/compare.c +++ b/servers/slapd/back-ldbm/compare.c @@ -3,9 +3,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" #include "back-ldbm.h" #include "proto-back-ldbm.h" diff --git a/servers/slapd/back-ldbm/config.c b/servers/slapd/back-ldbm/config.c index 5cbfd6e924..0e087dc0b1 100644 --- a/servers/slapd/back-ldbm/config.c +++ b/servers/slapd/back-ldbm/config.c @@ -3,9 +3,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" #include "back-ldbm.h" diff --git a/servers/slapd/back-ldbm/dbcache.c b/servers/slapd/back-ldbm/dbcache.c index bef299be86..ff09593f93 100644 --- a/servers/slapd/back-ldbm/dbcache.c +++ b/servers/slapd/back-ldbm/dbcache.c @@ -3,14 +3,17 @@ #include "portable.h" #include + +#include +#include #include #include -#include -#include -#include #include -#include + +#ifdef HAVE_SYS_PARAM_H +#include +#endif #include "slap.h" #include "back-ldbm.h" @@ -180,7 +183,7 @@ ldbm_cache_fetch( ) { Datum data; -#ifdef LDBM_USE_DB2 +#ifdef HAVE_BERKELEY_DB2 memset( &data, 0, sizeof( data ) ); #endif diff --git a/servers/slapd/back-ldbm/delete.c b/servers/slapd/back-ldbm/delete.c index ee5fbabca6..a7997e0f3f 100644 --- a/servers/slapd/back-ldbm/delete.c +++ b/servers/slapd/back-ldbm/delete.c @@ -3,9 +3,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" #include "back-ldbm.h" #include "proto-back-ldbm.h" diff --git a/servers/slapd/back-ldbm/dn2id.c b/servers/slapd/back-ldbm/dn2id.c index 89a5ea13ea..ff56ba616b 100644 --- a/servers/slapd/back-ldbm/dn2id.c +++ b/servers/slapd/back-ldbm/dn2id.c @@ -3,9 +3,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" #include "back-ldbm.h" #include "proto-back-ldbm.h" @@ -26,7 +27,7 @@ dn2id_add( Datum key, data; struct ldbminfo *li = (struct ldbminfo *) be->be_private; -#ifdef LDBM_USE_DB2 +#ifdef HAVE_BERKELEY_DB2 memset( &key, 0, sizeof( key ) ); memset( &data, 0, sizeof( data ) ); #endif @@ -71,7 +72,7 @@ dn2id( ID id; Datum key, data; -#ifdef LDBM_USE_DB2 +#ifdef HAVE_BERKELEY_DB2 memset( &key, 0, sizeof( key ) ); memset( &data, 0, sizeof( data ) ); #endif @@ -128,7 +129,7 @@ dn2id_delete( Datum key; int rc; -#ifdef LDBM_USE_DB2 +#ifdef HAVE_BERKELEY_DB2 memset( &key, 0, sizeof( key ) ); #endif diff --git a/servers/slapd/back-ldbm/filterindex.c b/servers/slapd/back-ldbm/filterindex.c index b65b841e24..ffb9292b42 100644 --- a/servers/slapd/back-ldbm/filterindex.c +++ b/servers/slapd/back-ldbm/filterindex.c @@ -3,9 +3,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" #include "back-ldbm.h" diff --git a/servers/slapd/back-ldbm/group.c b/servers/slapd/back-ldbm/group.c index e3e3436ceb..16106d8904 100644 --- a/servers/slapd/back-ldbm/group.c +++ b/servers/slapd/back-ldbm/group.c @@ -3,9 +3,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" #include "back-ldbm.h" #include "proto-back-ldbm.h" @@ -13,7 +14,7 @@ extern Attribute *attr_find(); -#ifdef ACLGROUP +#ifdef SLAPD_ACLGROUPS /* return 0 IFF edn is a value in uniqueMember attribute * of entry with bdn AND that entry has an objectClass * value of groupOfUniqueNames diff --git a/servers/slapd/back-ldbm/id2children.c b/servers/slapd/back-ldbm/id2children.c index 2906c5b2cb..b25a14c54d 100644 --- a/servers/slapd/back-ldbm/id2children.c +++ b/servers/slapd/back-ldbm/id2children.c @@ -3,8 +3,9 @@ #include "portable.h" #include -#include -#include + +#include + #include "slap.h" #include "back-ldbm.h" @@ -25,7 +26,7 @@ id2children_add( IDList *idl; char buf[20]; -#ifdef LDBM_USE_DB2 +#ifdef HAVE_BERKELEY_DB2 memset( &key, 0, sizeof( key ) ); memset( &data, 0, sizeof( data ) ); #endif @@ -70,7 +71,7 @@ has_children( IDList *idl; char buf[20]; -#ifdef LDBM_USE_DB2 +#ifdef HAVE_BERKELEY_DB2 memset( &key, 0, sizeof( key ) ); #endif diff --git a/servers/slapd/back-ldbm/id2entry.c b/servers/slapd/back-ldbm/id2entry.c index 140555c0c3..5e7582daf7 100644 --- a/servers/slapd/back-ldbm/id2entry.c +++ b/servers/slapd/back-ldbm/id2entry.c @@ -3,8 +3,9 @@ #include "portable.h" #include -#include -#include + +#include + #include "slap.h" #include "back-ldbm.h" @@ -23,7 +24,7 @@ id2entry_add( Backend *be, Entry *e ) Datum key, data; int len, rc, flags; -#ifdef LDBM_USE_DB2 +#ifdef HAVE_BERKELEY_DB2 memset( &key, 0, sizeof( key ) ); memset( &data, 0, sizeof( data ) ); #endif @@ -75,7 +76,7 @@ id2entry_delete( Backend *be, Entry *e ) /* XXX - check for writer lock - should also check no reader pending */ assert(pthread_rdwr_wchk_np(&e->e_rdwr)); -#ifdef LDBM_USE_DB2 +#ifdef HAVE_BERKELEY_DB2 memset( &key, 0, sizeof( key ) ); #endif @@ -116,7 +117,7 @@ id2entry( Backend *be, ID id, int rw ) Datum key, data; Entry *e; -#ifdef LDBM_USE_DB2 +#ifdef HAVE_BERKELEY_DB2 memset( &key, 0, sizeof( key ) ); memset( &data, 0, sizeof( data ) ); #endif diff --git a/servers/slapd/back-ldbm/idl.c b/servers/slapd/back-ldbm/idl.c index d68c7b834b..88f089116f 100644 --- a/servers/slapd/back-ldbm/idl.c +++ b/servers/slapd/back-ldbm/idl.c @@ -3,12 +3,10 @@ #include "portable.h" #include -#include -#include -#ifdef CLDAP -#include -#endif +#include +#include + #include "slap.h" #include "ldapconfig.h" #include "back-ldbm.h" @@ -63,7 +61,7 @@ idl_fetch_one( char *kstr; int i, nids; -#ifdef LDBM_USE_DB2 +#ifdef HAVE_BERKELEY_DB2 memset( &k2, 0, sizeof( k2 ) ); memset( &data, 0, sizeof( data ) ); #endif @@ -90,7 +88,7 @@ idl_fetch( char *kstr; int i, nids; -#ifdef LDBM_USE_DB2 +#ifdef HAVE_BERKELEY_DB2 memset( &k2, 0, sizeof( k2 ) ); memset( &data, 0, sizeof( data ) ); #endif @@ -184,7 +182,7 @@ idl_store( Datum data; struct ldbminfo *li = (struct ldbminfo *) be->be_private; -#ifdef LDBM_USE_DB2 +#ifdef HAVE_BERKELEY_DB2 memset( &data, 0, sizeof( data ) ); #endif @@ -306,7 +304,7 @@ idl_insert_key( char *kstr; Datum k2; -#ifdef LDBM_USE_DB2 +#ifdef HAVE_BERKELEY_DB2 memset( &k2, 0, sizeof( k2 ) ); #endif diff --git a/servers/slapd/back-ldbm/index.c b/servers/slapd/back-ldbm/index.c index 1e58ab8c91..0581fc1a1e 100644 --- a/servers/slapd/back-ldbm/index.c +++ b/servers/slapd/back-ldbm/index.c @@ -3,9 +3,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" #include "back-ldbm.h" @@ -107,7 +108,7 @@ index_read( char *realval, *tmpval; char buf[BUFSIZ]; -#ifdef LDBM_USE_DB2 +#ifdef HAVE_BERKELEY_DB2 memset( &key, 0, sizeof( key ) ); #endif @@ -181,7 +182,7 @@ add_value( char *realval, *tmpval, *s; char buf[BUFSIZ]; -#ifdef LDBM_USE_DB2 +#ifdef HAVE_BERKELEY_DB2 memset( &key, 0, sizeof( key ) ); #endif diff --git a/servers/slapd/back-ldbm/init.c b/servers/slapd/back-ldbm/init.c index eaf886baf8..65fda43785 100644 --- a/servers/slapd/back-ldbm/init.c +++ b/servers/slapd/back-ldbm/init.c @@ -3,9 +3,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" #include "back-ldbm.h" @@ -17,9 +18,9 @@ ldbm_back_init( char *argv[ 4 ]; int i; -#ifdef LDAP_CRYPT +#ifdef SLAPD_CRYPT extern pthread_mutex_t crypt_mutex; -#endif /* LDAP_CRYPT */ +#endif /* SLAPD_CRYPT */ /* allocate backend-specific stuff */ li = (struct ldbminfo *) ch_calloc( 1, sizeof(struct ldbminfo) ); @@ -65,9 +66,9 @@ ldbm_back_init( pthread_mutex_init( &li->li_cache.c_mutex, pthread_mutexattr_default ); pthread_mutex_init( &li->li_nextid_mutex, pthread_mutexattr_default ); pthread_mutex_init( &li->li_dbcache_mutex, pthread_mutexattr_default ); -#ifdef LDAP_CRYPT +#ifdef SLAPD_CRYPT pthread_mutex_init( &crypt_mutex, pthread_mutexattr_default ); -#endif /* LDAP_CRYPT */ +#endif /* SLAPD_CRYPT */ pthread_cond_init( &li->li_dbcache_cv, pthread_condattr_default ); for ( i = 0; i < MAXDBCACHE; i++ ) { pthread_mutex_init( &li->li_dbcache[i].dbc_mutex, diff --git a/servers/slapd/back-ldbm/kerberos.c b/servers/slapd/back-ldbm/kerberos.c index c369c2bc13..14ab368db5 100644 --- a/servers/slapd/back-ldbm/kerberos.c +++ b/servers/slapd/back-ldbm/kerberos.c @@ -2,20 +2,17 @@ #include "portable.h" +#ifdef HAVE_KERBEROS + #include -#include -#include -#include + +#include +#include +#include + #include "slap.h" #include "back-ldbm.h" -#ifdef KERBEROS -#ifdef KERBEROS_V -#include -#else -#include -#endif /* KERBEROS_V */ - #define LDAP_KRB_PRINCIPAL "ldapserver" extern char *ldap_srvtab; diff --git a/servers/slapd/back-ldbm/modify.c b/servers/slapd/back-ldbm/modify.c index 455dd8c175..666547f1c9 100644 --- a/servers/slapd/back-ldbm/modify.c +++ b/servers/slapd/back-ldbm/modify.c @@ -3,9 +3,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" #include "back-ldbm.h" #include "proto-back-ldbm.h" diff --git a/servers/slapd/back-ldbm/modrdn.c b/servers/slapd/back-ldbm/modrdn.c index 62a2acd18b..1555383045 100644 --- a/servers/slapd/back-ldbm/modrdn.c +++ b/servers/slapd/back-ldbm/modrdn.c @@ -3,9 +3,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" #include "back-ldbm.h" #include "proto-back-ldbm.h" diff --git a/servers/slapd/back-ldbm/nextid.c b/servers/slapd/back-ldbm/nextid.c index b680890a79..b16100a3f0 100644 --- a/servers/slapd/back-ldbm/nextid.c +++ b/servers/slapd/back-ldbm/nextid.c @@ -3,9 +3,13 @@ #include "portable.h" #include -#include -#include + +#include + +#ifdef HAVE_SYS_PARAM_H #include +#endif + #include "slap.h" #include "back-ldbm.h" diff --git a/servers/slapd/back-ldbm/search.c b/servers/slapd/back-ldbm/search.c index 2bf35034bf..705d6b47d6 100644 --- a/servers/slapd/back-ldbm/search.c +++ b/servers/slapd/back-ldbm/search.c @@ -3,9 +3,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" #include "back-ldbm.h" #include "proto-back-ldbm.h" diff --git a/servers/slapd/back-ldbm/unbind.c b/servers/slapd/back-ldbm/unbind.c index 56e3e426a4..6330b4db20 100644 --- a/servers/slapd/back-ldbm/unbind.c +++ b/servers/slapd/back-ldbm/unbind.c @@ -3,8 +3,9 @@ #include "portable.h" #include -#include -#include + +#include + #include "slap.h" int diff --git a/servers/slapd/back-passwd/config.c b/servers/slapd/back-passwd/config.c index 252717ab73..839af28cab 100644 --- a/servers/slapd/back-passwd/config.c +++ b/servers/slapd/back-passwd/config.c @@ -3,11 +3,11 @@ #include "portable.h" #include -#include -#include -#include -#include -#include "portable.h" + +#include +#include +#include + #include "slap.h" passwd_back_config( diff --git a/servers/slapd/back-passwd/search.c b/servers/slapd/back-passwd/search.c index 3e9a0f9a8c..7c32656ec2 100644 --- a/servers/slapd/back-passwd/search.c +++ b/servers/slapd/back-passwd/search.c @@ -3,12 +3,13 @@ #include "portable.h" #include -#include -#include -#include -#include + +#include +#include +#include + #include -#include "portable.h" + #include "slap.h" extern time_t currenttime; diff --git a/servers/slapd/back-shell/abandon.c b/servers/slapd/back-shell/abandon.c index 090ba26a4b..36e81963a9 100644 --- a/servers/slapd/back-shell/abandon.c +++ b/servers/slapd/back-shell/abandon.c @@ -3,10 +3,11 @@ #include "portable.h" #include -#include -#include -#include #include + +#include +#include + #include "slap.h" #include "shell.h" diff --git a/servers/slapd/back-shell/add.c b/servers/slapd/back-shell/add.c index e9840e9eaa..c798e8c6c1 100644 --- a/servers/slapd/back-shell/add.c +++ b/servers/slapd/back-shell/add.c @@ -3,9 +3,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" #include "shell.h" diff --git a/servers/slapd/back-shell/bind.c b/servers/slapd/back-shell/bind.c index 2d8e5a0a13..33bcd9df97 100644 --- a/servers/slapd/back-shell/bind.c +++ b/servers/slapd/back-shell/bind.c @@ -3,9 +3,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" #include "shell.h" diff --git a/servers/slapd/back-shell/compare.c b/servers/slapd/back-shell/compare.c index 642524f04d..ed93c411d9 100644 --- a/servers/slapd/back-shell/compare.c +++ b/servers/slapd/back-shell/compare.c @@ -3,9 +3,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" #include "shell.h" diff --git a/servers/slapd/back-shell/config.c b/servers/slapd/back-shell/config.c index fc22aac49a..10aee26a2c 100644 --- a/servers/slapd/back-shell/config.c +++ b/servers/slapd/back-shell/config.c @@ -3,9 +3,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" #include "shell.h" diff --git a/servers/slapd/back-shell/delete.c b/servers/slapd/back-shell/delete.c index e794a23a62..75760ed271 100644 --- a/servers/slapd/back-shell/delete.c +++ b/servers/slapd/back-shell/delete.c @@ -3,9 +3,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" #include "shell.h" diff --git a/servers/slapd/back-shell/fork.c b/servers/slapd/back-shell/fork.c index 1b25031cbb..14eaca4349 100644 --- a/servers/slapd/back-shell/fork.c +++ b/servers/slapd/back-shell/fork.c @@ -3,9 +3,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" forkandexec( diff --git a/servers/slapd/back-shell/init.c b/servers/slapd/back-shell/init.c index b4087cb8a8..0865887123 100644 --- a/servers/slapd/back-shell/init.c +++ b/servers/slapd/back-shell/init.c @@ -3,8 +3,9 @@ #include "portable.h" #include -#include -#include + +#include + #include "slap.h" #include "shell.h" diff --git a/servers/slapd/back-shell/modify.c b/servers/slapd/back-shell/modify.c index b61dc8234d..ce2c7bfd07 100644 --- a/servers/slapd/back-shell/modify.c +++ b/servers/slapd/back-shell/modify.c @@ -3,9 +3,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" #include "shell.h" diff --git a/servers/slapd/back-shell/modrdn.c b/servers/slapd/back-shell/modrdn.c index a4735164d0..f3f00217ad 100644 --- a/servers/slapd/back-shell/modrdn.c +++ b/servers/slapd/back-shell/modrdn.c @@ -3,9 +3,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" #include "shell.h" diff --git a/servers/slapd/back-shell/result.c b/servers/slapd/back-shell/result.c index f1ac898526..3d18e23baa 100644 --- a/servers/slapd/back-shell/result.c +++ b/servers/slapd/back-shell/result.c @@ -3,9 +3,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" #include "shell.h" diff --git a/servers/slapd/back-shell/search.c b/servers/slapd/back-shell/search.c index cbc3243d21..969215883b 100644 --- a/servers/slapd/back-shell/search.c +++ b/servers/slapd/back-shell/search.c @@ -3,9 +3,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" #include "shell.h" diff --git a/servers/slapd/back-shell/unbind.c b/servers/slapd/back-shell/unbind.c index df836f3e8f..93c6889468 100644 --- a/servers/slapd/back-shell/unbind.c +++ b/servers/slapd/back-shell/unbind.c @@ -3,9 +3,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" #include "shell.h" diff --git a/servers/slapd/backend.c b/servers/slapd/backend.c index 93675af31b..d40093b087 100644 --- a/servers/slapd/backend.c +++ b/servers/slapd/backend.c @@ -4,13 +4,15 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include + #include "slap.h" -#ifdef LDAP_LDBM +#ifdef SLAPD_LDBM extern int ldbm_back_bind(); extern int ldbm_back_unbind(); extern int ldbm_back_search(); @@ -26,12 +28,12 @@ extern int ldbm_back_close(); extern int ldbm_back_group(); #endif -#ifdef LDAP_PASSWD +#ifdef SLAPD_PASSWD extern int passwd_back_search(); extern int passwd_back_config(); #endif -#ifdef LDAP_SHELL +#ifdef SLAPD_SHELL extern int shell_back_bind(); extern int shell_back_unbind(); extern int shell_back_search(); @@ -75,7 +77,7 @@ new_backend( be->be_timelimit = deftime; foundit = 0; -#ifdef LDAP_LDBM +#ifdef SLAPD_LDBM if ( strcasecmp( type, "ldbm" ) == 0 ) { be->be_bind = ldbm_back_bind; be->be_unbind = ldbm_back_unbind; @@ -89,7 +91,7 @@ new_backend( be->be_config = ldbm_back_config; be->be_init = ldbm_back_init; be->be_close = ldbm_back_close; -#ifdef ACLGROUP +#ifdef SLAPD_ACLGROUPS be->be_group = ldbm_back_group; #endif be->be_type = "ldbm"; @@ -97,7 +99,7 @@ new_backend( } #endif -#ifdef LDAP_PASSWD +#ifdef SLAPD_PASSWD if ( strcasecmp( type, "passwd" ) == 0 ) { be->be_bind = NULL; be->be_unbind = NULL; @@ -111,7 +113,7 @@ new_backend( be->be_config = passwd_back_config; be->be_init = NULL; be->be_close = NULL; -#ifdef ACLGROUP +#ifdef SLAPD_ACLGROUPS be->be_group = NULL; #endif be->be_type = "passwd"; @@ -119,7 +121,7 @@ new_backend( } #endif -#ifdef LDAP_SHELL +#ifdef SLAPD_SHELL if ( strcasecmp( type, "shell" ) == 0 ) { be->be_bind = shell_back_bind; be->be_unbind = shell_back_unbind; @@ -133,7 +135,7 @@ new_backend( be->be_config = shell_back_config; be->be_init = shell_back_init; be->be_close = NULL; -#ifdef ACLGROUP +#ifdef SLAPD_ACLGROUPS be->be_group = NULL; #endif be->be_type = "shell"; @@ -257,7 +259,7 @@ be_unbind( } } -#ifdef ACLGROUP +#ifdef SLAPD_ACLGROUPS int be_group(Backend *be, char *bdn, char *edn) { diff --git a/servers/slapd/bind.c b/servers/slapd/bind.c index 4fa8478535..12a913bd15 100644 --- a/servers/slapd/bind.c +++ b/servers/slapd/bind.c @@ -15,9 +15,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" extern Backend *select_backend(); @@ -52,7 +53,7 @@ do_bind( * } */ -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 /* * in version 3.0 there is an extra SEQUENCE tag after the * BindRequest SEQUENCE tag. @@ -81,13 +82,13 @@ do_bind( "decoding error" ); return; } -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 if ( conn->c_version == 30 ) { switch ( method ) { case LDAP_AUTH_SIMPLE_30: method = LDAP_AUTH_SIMPLE; break; -#ifdef KERBEROS +#ifdef HAVE_KERBEROS case LDAP_AUTH_KRBV41_30: method = LDAP_AUTH_KRBV41; break; diff --git a/servers/slapd/ch_malloc.c b/servers/slapd/ch_malloc.c index 9f5cf56073..9ce0ed80ec 100644 --- a/servers/slapd/ch_malloc.c +++ b/servers/slapd/ch_malloc.c @@ -3,8 +3,10 @@ #include "portable.h" #include -#include -#include + +#include +#include + #include "slap.h" char * diff --git a/servers/slapd/charray.c b/servers/slapd/charray.c index 71ef9e6345..7edb80c848 100644 --- a/servers/slapd/charray.c +++ b/servers/slapd/charray.c @@ -3,9 +3,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" void diff --git a/servers/slapd/compare.c b/servers/slapd/compare.c index d836a43365..d31f2655a4 100644 --- a/servers/slapd/compare.c +++ b/servers/slapd/compare.c @@ -13,8 +13,9 @@ #include "portable.h" #include -#include -#include + +#include + #include "slap.h" extern Backend *select_backend(); diff --git a/servers/slapd/config.c b/servers/slapd/config.c index 55660182c6..66e8567962 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -3,9 +3,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" #include "ldapconfig.h" diff --git a/servers/slapd/configinfo.c b/servers/slapd/configinfo.c index f6dcfe9d5f..744d611ad8 100644 --- a/servers/slapd/configinfo.c +++ b/servers/slapd/configinfo.c @@ -13,9 +13,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" #include "ldapconfig.h" diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index bbfdd4344e..661877ffb4 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -1,12 +1,13 @@ #include "portable.h" #include + +#include +#include +#include #include #include -#include -#include -#include -#include + #include "slap.h" extern Operation *op_add(); @@ -18,11 +19,6 @@ extern long ops_completed; extern pthread_mutex_t ops_mutex; extern pthread_t listener_tid; -#ifdef DECL_SYS_ERRLIST -extern int sys_nerr; -extern char *sys_errlist[]; -#endif - struct co_arg { Connection *co_conn; Operation *co_op; @@ -52,7 +48,7 @@ connection_operation( struct co_arg *arg ) do_bind( arg->co_conn, arg->co_op ); break; -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 case LDAP_REQ_UNBIND_30: #endif case LDAP_REQ_UNBIND: @@ -63,7 +59,7 @@ connection_operation( struct co_arg *arg ) do_add( arg->co_conn, arg->co_op ); break; -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 case LDAP_REQ_DELETE_30: #endif case LDAP_REQ_DELETE: @@ -86,7 +82,7 @@ connection_operation( struct co_arg *arg ) do_search( arg->co_conn, arg->co_op ); break; -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 case LDAP_REQ_ABANDON_30: #endif case LDAP_REQ_ABANDON: @@ -177,7 +173,7 @@ connection_activity( return; } -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 if ( conn->c_version == 30 ) { (void) ber_skip_tag( ber, &len ); } @@ -205,7 +201,7 @@ connection_activity( pthread_attr_init( &attr ); pthread_attr_setdetachstate( &attr, PTHREAD_CREATE_DETACHED ); -#ifndef THREAD_MIT_PTHREADS +#if !defined(HAVE_PTHREADS_D4) && !defined(HAVE_DCE) /* POSIX_THREADS or compatible * This is a draft 10 or standard pthreads implementation */ @@ -217,7 +213,7 @@ connection_activity( active_threads++; pthread_mutex_unlock( &active_threads_mutex ); } -#else /* !THREAD_MIT_PTHREAD */ +#else /* pthread draft4 */ /* * This is a draft 4 or earlier pthreads implementation */ @@ -229,6 +225,6 @@ connection_activity( active_threads++; pthread_mutex_unlock( &active_threads_mutex ); } -#endif /* !THREAD_MIT_PTHREAD */ +#endif /* pthread draft4 */ pthread_attr_destroy( &attr ); } diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index 1dfc8682b1..d95c0a059e 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -8,43 +8,33 @@ #include "portable.h" #include + +#include +#include +#include +#include #include -#include -#include -#include #include -#include -#include -#include -#include -#ifdef _AIX -#include -#endif +#include + #include "slap.h" #include "ldapconfig.h" -#ifdef NEED_FILIO -#include -#else /* NEED_FILIO */ -#include -#endif /* NEED_FILIO */ -#ifdef USE_SYSCONF -#include -#endif /* USE_SYSCONF */ -#ifdef TCP_WRAPPERS +#ifdef HAVE_SYS_FILIO_H +#include +#elif HAVE_SYS_IOCTL_H +#include +#endif + +#ifdef HAVE_TCPD #include int allow_severity = LOG_INFO; int deny_severity = LOG_NOTICE; -#endif /* TCP_WRAPPERS */ +#endif /* TCP Wrappers */ extern Operation *op_add(); -#ifdef DECL_SYS_ERRLIST -extern int sys_nerr; -extern char *sys_errlist[]; -#endif - extern time_t currenttime; extern pthread_mutex_t currenttime_mutex; extern int active_threads; @@ -79,14 +69,14 @@ slapd_daemon( FILE *fp; int on = 1; -#ifdef USE_SYSCONF +#ifdef HAVE_SYSCONF dtblsize = sysconf( _SC_OPEN_MAX ); -#else /* USE_SYSCONF */ +#elif HAVE_GETDTABLESIZE dtblsize = getdtablesize(); -#endif /* USE_SYSCONF */ - /* - * Add greg@greg.rim.or.jp - */ +#else + dtblsize = FD_SETSIZE +#endif + #ifdef FD_SETSIZE if(dtblsize > FD_SETSIZE) { dtblsize = FD_SETSIZE; @@ -151,14 +141,14 @@ slapd_daemon( } (void) SIGNAL( SIGPIPE, SIG_IGN ); -#ifdef linux +#ifdef HAVE_LINUX_THREADS /* * LinuxThreads are implemented using SIGUSR1/USR2, * so we'll use SIGSTKFLT and SIGUNUSED */ (void) SIGNAL( SIGSTKFLT, (void *) do_nothing ); (void) SIGNAL( SIGUNUSED, (void *) set_shutdown ); -#else /* !linux */ +#else /* !linux */ (void) SIGNAL( SIGUSR1, (void *) do_nothing ); (void) SIGNAL( SIGUSR2, (void *) set_shutdown ); #endif /* !linux */ @@ -284,7 +274,7 @@ slapd_daemon( char *s; client_addr = inet_ntoa( from.sin_addr ); -#if defined(REVERSE_LOOKUP) || defined(TCP_WRAPPERS) +#if defined(SLAPD_RLOOKUPS) || defined(HAVE_TCPD) hp = gethostbyaddr( (char *) &(from.sin_addr.s_addr), sizeof(from.sin_addr.s_addr), AF_INET ); @@ -309,7 +299,7 @@ slapd_daemon( client_addr = NULL; } -#ifdef TCP_WRAPPERS +#ifdef HAVE_TCPD if(!hosts_ctl("slapd", client_name, client_addr, STRING_UNKNOWN)) { @@ -325,7 +315,7 @@ slapd_daemon( pthread_mutex_unlock( &new_conn_mutex ); continue; } -#endif /* TCP_WRAPPERS */ +#endif /* HAVE_TCPD */ Statslog( LDAP_DEBUG_STATS, "conn=%d fd=%d connection from %s (%s) accepted.\n", @@ -424,7 +414,7 @@ set_shutdown() { Debug( LDAP_DEBUG_ANY, "slapd got shutdown signal\n", 0, 0, 0 ); slapd_shutdown = 1; -#ifdef linux +#ifdef HAVE_LINUX_THREADS /* * LinuxThreads are implemented using SIGUSR1/USR2, * so we'll use SIGSTKFLT and SIGUNUSED @@ -444,7 +434,7 @@ static void do_nothing() { Debug( LDAP_DEBUG_TRACE, "slapd got do_nothing signal\n", 0, 0, 0 ); -#ifdef linux +#ifdef HAVE_LINUX_THREADS /* * LinuxThreads are implemented using SIGUSR1/USR2, * so we'll use SIGSTKFLT and SIGUNUSED diff --git a/servers/slapd/delete.c b/servers/slapd/delete.c index bab22d924f..eecf64090f 100644 --- a/servers/slapd/delete.c +++ b/servers/slapd/delete.c @@ -13,9 +13,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" extern Backend *select_backend(); diff --git a/servers/slapd/detach.c b/servers/slapd/detach.c index bb28bc96a2..dd6db49d69 100644 --- a/servers/slapd/detach.c +++ b/servers/slapd/detach.c @@ -13,20 +13,14 @@ #include "portable.h" #include -#include -#ifdef SVR4 + +#include +#include + #include -#endif /* svr4 */ #include #include #include -#include -#include "portable.h" - -#ifdef USE_SYSCONF -#include -#endif /* USE_SYSCONF */ - detach() { @@ -35,11 +29,13 @@ detach() extern int ldap_debug; #endif -#ifdef USE_SYSCONF +#ifdef HAVE_SYSCONF nbits = sysconf( _SC_OPEN_MAX ); -#else /* USE_SYSCONF */ +#elif HAVE_GETDTABLESIZE nbits = getdtablesize(); -#endif /* USE_SYSCONF */ +#else + nbits = FD_SETSIZE +#endif #ifdef FD_SETSIZE if ( nbits > FD_SETSIZE ) { @@ -51,7 +47,7 @@ detach() if ( ldap_debug == 0 ) { #endif for ( i = 0; i < 5; i++ ) { -#if defined( sunos5 ) && defined( THREAD_SUNOS5_LWP ) +#if defined( HAVE_LWP_THR ) switch ( fork1() ) { #else switch ( fork() ) { @@ -88,14 +84,14 @@ detach() (void) dup2( sd, 2 ); close( sd ); -#ifdef USE_SETSID +#ifdef HAVE_SETSID setsid(); -#else /* USE_SETSID */ +#else /* HAVE_SETSID */ if ( (sd = open( "/dev/tty", O_RDWR )) != -1 ) { (void) ioctl( sd, TIOCNOTTY, NULL ); (void) close( sd ); } -#endif /* USE_SETSID */ +#endif /* HAVE_SETSID */ #ifdef LDAP_DEBUG } #endif diff --git a/servers/slapd/dn.c b/servers/slapd/dn.c index de10e368c7..d67aca70ac 100644 --- a/servers/slapd/dn.c +++ b/servers/slapd/dn.c @@ -3,11 +3,12 @@ #include "portable.h" #include -#include -#include -#include -#include -#include + +#include +#include +#include +#include + #include "slap.h" static char **dn_explode(); diff --git a/servers/slapd/entry.c b/servers/slapd/entry.c index 562cc47b68..c0474e2023 100644 --- a/servers/slapd/entry.c +++ b/servers/slapd/entry.c @@ -3,10 +3,11 @@ #include "portable.h" #include -#include -#include -#include -#include + +#include +#include +#include + #include "slap.h" void entry_free(); diff --git a/servers/slapd/filter.c b/servers/slapd/filter.c index 49f8166f2b..be8a8ea242 100644 --- a/servers/slapd/filter.c +++ b/servers/slapd/filter.c @@ -3,9 +3,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" static int get_filter_list(); @@ -56,7 +57,7 @@ get_filter( Connection *conn, BerElement *ber, Filter **filt, char **fstr ) err = 0; *fstr = NULL; f->f_choice = ber_peek_tag( ber, &len ); -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 if ( conn->c_version == 30 ) { switch ( f->f_choice ) { case LDAP_FILTER_EQUALITY: @@ -194,7 +195,7 @@ get_filter_list( Connection *conn, BerElement *ber, Filter **f, char **fstr ) Debug( LDAP_DEBUG_FILTER, "begin get_filter_list\n", 0, 0, 0 ); -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 if ( conn->c_version == 30 ) { (void) ber_skip_tag( ber, &len ); } @@ -235,7 +236,7 @@ get_substring_filter( Debug( LDAP_DEBUG_FILTER, "begin get_substring_filter\n", 0, 0, 0 ); -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 if ( conn->c_version == 30 ) { (void) ber_skip_tag( ber, &len ); } @@ -253,7 +254,7 @@ get_substring_filter( sprintf( *fstr, "(%s=", f->f_sub_type ); for ( tag = ber_first_element( ber, &len, &last ); tag != LBER_DEFAULT; tag = ber_next_element( ber, &len, last ) ) { -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 if ( conn->c_version == 30 ) { rc = ber_scanf( ber, "{a}", &val ); } else @@ -271,7 +272,7 @@ get_substring_filter( value_normalize( val, syntax ); switch ( tag ) { -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 case LDAP_SUBSTRING_INITIAL_30: #endif case LDAP_SUBSTRING_INITIAL: @@ -285,7 +286,7 @@ get_substring_filter( strcat( *fstr, val ); break; -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 case LDAP_SUBSTRING_ANY_30: #endif case LDAP_SUBSTRING_ANY: @@ -297,7 +298,7 @@ get_substring_filter( strcat( *fstr, val ); break; -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 case LDAP_SUBSTRING_FINAL_30: #endif case LDAP_SUBSTRING_FINAL: diff --git a/servers/slapd/filterentry.c b/servers/slapd/filterentry.c index 495fcb2ca6..ac0a943d02 100644 --- a/servers/slapd/filterentry.c +++ b/servers/slapd/filterentry.c @@ -3,10 +3,11 @@ #include "portable.h" #include -#include -#include -#include -#include + +#include +#include +#include + #include "slap.h" extern Attribute *attr_find(); diff --git a/servers/slapd/init.c b/servers/slapd/init.c index 7ba8318758..81384199e3 100644 --- a/servers/slapd/init.c +++ b/servers/slapd/init.c @@ -3,13 +3,11 @@ #include "portable.h" #include -#include -#include -#include -#include -#include -#include -#include + +#include +#include +#include + #include "portable.h" #include "slap.h" diff --git a/servers/slapd/lock.c b/servers/slapd/lock.c index 2e3cb917fd..debc102e2e 100644 --- a/servers/slapd/lock.c +++ b/servers/slapd/lock.c @@ -3,15 +3,13 @@ #include "portable.h" #include -#include -#include -#include "portable.h" -#ifdef USE_LOCKF -#include -#endif + +#include +#include +#include + #include #include -#include #include "slap.h" FILE * diff --git a/servers/slapd/main.c b/servers/slapd/main.c index 258923e61e..59fb391b1f 100644 --- a/servers/slapd/main.c +++ b/servers/slapd/main.c @@ -1,14 +1,11 @@ #include "portable.h" #include -#include -#include -#include -#include -#include -#include -#include -#include "portable.h" + +#include +#include +#include + #include "slap.h" #include "ldapconfig.h" @@ -184,7 +181,7 @@ main( argc, argv ) pthread_attr_init( &attr ); pthread_attr_setdetachstate( &attr, PTHREAD_CREATE_DETACHED ); -#ifndef THREAD_MIT_PTHREADS +#if !defined(HAVE_PTHREADS_D4) && !defined(HAVE_DCE) /* POSIX_THREADS or compatible * This is a draft 10 or standard pthreads implementation */ @@ -194,7 +191,7 @@ main( argc, argv ) "listener pthread_create failed\n", 0, 0, 0 ); exit( 1 ); } -#else /* !THREAD_MIT_PTHREADS */ +#else /* draft4 */ /* * This is a draft 4 or earlier pthreads implementation */ @@ -204,7 +201,7 @@ main( argc, argv ) "listener pthread_create failed\n", 0, 0, 0 ); exit( 1 ); } -#endif /* !THREAD_MIT_PTHREADS */ +#endif /* !draft4 */ pthread_attr_destroy( &attr ); pthread_join( listener_tid, (void *) &status ); pthread_exit( 0 ); @@ -236,7 +233,7 @@ main( argc, argv ) #endif flen = sizeof(from); if ( getpeername( 0, (struct sockaddr *) &from, &flen ) == 0 ) { -#ifdef REVERSE_LOOKUP +#ifdef SLAPD_RLOOKUPS hp = gethostbyaddr( (char *) &(from.sin_addr.s_addr), sizeof(from.sin_addr.s_addr), AF_INET ); #else diff --git a/servers/slapd/modify.c b/servers/slapd/modify.c index 2820a3ed19..1406b985b5 100644 --- a/servers/slapd/modify.c +++ b/servers/slapd/modify.c @@ -13,11 +13,11 @@ #include "portable.h" #include -#include -#include -#include -#include -#include + +#include +#include +#include + #include "slap.h" extern Backend *select_backend(); diff --git a/servers/slapd/modrdn.c b/servers/slapd/modrdn.c index 75af6e13e8..4928727817 100644 --- a/servers/slapd/modrdn.c +++ b/servers/slapd/modrdn.c @@ -13,9 +13,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" extern Backend *select_backend(); diff --git a/servers/slapd/monitor.c b/servers/slapd/monitor.c index c43b61ac46..05940823ca 100644 --- a/servers/slapd/monitor.c +++ b/servers/slapd/monitor.c @@ -20,10 +20,11 @@ #include "portable.h" #include -#include -#include -#include -#include + +#include +#include +#include + #include "slap.h" #include "ldapconfig.h" @@ -194,7 +195,7 @@ monitor_info( Connection *conn, Operation *op ) val.bv_len = strlen( buf ); attr_merge( e, "nbackends", vals ); -#ifdef THREAD_SUNOS5_LWP +#ifdef HAVE_LWP_THR sprintf( buf, "%d", thr_getconcurrency() ); val.bv_val = buf; val.bv_len = strlen( buf ); diff --git a/servers/slapd/operation.c b/servers/slapd/operation.c index a960c30695..b08d679298 100644 --- a/servers/slapd/operation.c +++ b/servers/slapd/operation.c @@ -3,9 +3,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" extern time_t currenttime; diff --git a/servers/slapd/phonetic.c b/servers/slapd/phonetic.c index 996c68160c..485e3718a7 100644 --- a/servers/slapd/phonetic.c +++ b/servers/slapd/phonetic.c @@ -3,15 +3,15 @@ #include "portable.h" #include -#include -#include -#include -#include -#include -#include "portable.h" + +#include +#include +#include +#include + #include "slap.h" -#if !defined(METAPHONE) && !defined(SOUNDEX) +#if !defined(METAPHONE) && !defined(SLAPD_PHONETIC) #define METAPHONE #endif @@ -79,7 +79,7 @@ word_dup( char *w ) #define MAXPHONEMELEN 4 #endif -#if defined(SOUNDEX) +#if defined(SLAPD_PHONETIC) /* lifted from isode-8.0 */ char * @@ -430,4 +430,4 @@ phonetic( char *Word ) } #endif /* metaphone */ -#endif /* soundex */ +#endif /* SLAPD_PHONETIC */ diff --git a/servers/slapd/repl.c b/servers/slapd/repl.c index cd0198ebd7..4450be5866 100644 --- a/servers/slapd/repl.c +++ b/servers/slapd/repl.c @@ -3,10 +3,12 @@ #include "portable.h" #include -#include -#include + +#include +#include + #include -#include + #include "slap.h" extern pthread_mutex_t replog_mutex; diff --git a/servers/slapd/result.c b/servers/slapd/result.c index 185cc0269d..07bf54540f 100644 --- a/servers/slapd/result.c +++ b/servers/slapd/result.c @@ -3,19 +3,14 @@ #include "portable.h" #include + +#include +#include +#include #include #include -#include -#include -#include -#include -#include -#include "slap.h" -#ifdef DECL_SYS_ERRLIST -extern int sys_nerr; -extern char *sys_errlist[]; -#endif +#include "slap.h" extern int active_threads; extern pthread_mutex_t active_threads_mutex; @@ -63,7 +58,7 @@ send_ldap_result2( break; } -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 if ( (ber = ber_alloc_t( conn->c_version == 30 ? 0 : LBER_USE_DER )) == NULLBER ) { #else @@ -73,13 +68,13 @@ send_ldap_result2( return; } -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS if ( op->o_cldap ) { rc = ber_printf( ber, "{is{t{ess}}}", op->o_msgid, "", tag, err, matched ? matched : "", text ? text : "" ); } else #endif -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 if ( conn->c_version == 30 ) { rc = ber_printf( ber, "{it{{ess}}}", op->o_msgid, tag, err, matched ? matched : "", text ? text : "" ); @@ -124,7 +119,7 @@ send_ldap_result2( active_threads--; conn->c_writewaiter = 1; -#ifdef linux +#ifdef HAVE_LINUX_THREADS pthread_kill( listener_tid, SIGSTKFLT ); #else /* !linux */ pthread_kill( listener_tid, SIGUSR1 ); @@ -159,7 +154,7 @@ send_ldap_result( char *text ) { -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS if ( op->o_cldap ) { SAFEMEMCPY( (char *)conn->c_sb.sb_useaddr, &op->o_clientaddr, sizeof( struct sockaddr )); @@ -213,7 +208,7 @@ send_search_entry( edn = dn_normalize_case( strdup( e->e_dn ) ); -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 if ( (ber = ber_alloc_t( conn->c_version == 30 ? 0 : LBER_USE_DER )) == NULLBER ) #else @@ -226,7 +221,7 @@ send_search_entry( goto error_return; } -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 if ( conn->c_version == 30 ) { rc = ber_printf( ber, "{it{{s{", op->o_msgid, LDAP_RES_SEARCH_ENTRY, e->e_dn ); @@ -315,7 +310,7 @@ send_search_entry( free(edn); -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 if ( conn->c_version == 30 ) { rc = ber_printf( ber, "}}}}" ); } else diff --git a/servers/slapd/schema.c b/servers/slapd/schema.c index fc5f0214fa..a324a60d1d 100644 --- a/servers/slapd/schema.c +++ b/servers/slapd/schema.c @@ -3,9 +3,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" extern Attribute *attr_find(); diff --git a/servers/slapd/schemaparse.c b/servers/slapd/schemaparse.c index 70edf66b8b..8f72136abb 100644 --- a/servers/slapd/schemaparse.c +++ b/servers/slapd/schemaparse.c @@ -3,9 +3,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" extern char **str2charray(); diff --git a/servers/slapd/search.c b/servers/slapd/search.c index 721c013f84..a1c34b76da 100644 --- a/servers/slapd/search.c +++ b/servers/slapd/search.c @@ -13,9 +13,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" #include "ldapconfig.h" diff --git a/servers/slapd/shell-backends/Makefile.in b/servers/slapd/shell-backends/Makefile.in index aab59ca8fc..8789dede37 100644 --- a/servers/slapd/shell-backends/Makefile.in +++ b/servers/slapd/shell-backends/Makefile.in @@ -7,6 +7,11 @@ OBJS = passwd-shell.o shellutil.o LDAP_INCDIR= ../../../include LDAP_LIBDIR= ../../../libraries +BUILD_OPT = "--enable-shell" +BUILD_SRV = @BUILD_SHELL@ + +all-local: $(PROGRAMS) + passwd-shell: pwd-version.o $(CC) $(LDFLAGS) -o $@ $(OBJS) pwd-version.o $(LIBS) diff --git a/servers/slapd/shell-backends/passwd-shell.c b/servers/slapd/shell-backends/passwd-shell.c index fd354e0fe4..2d7df71c74 100644 --- a/servers/slapd/shell-backends/passwd-shell.c +++ b/servers/slapd/shell-backends/passwd-shell.c @@ -15,27 +15,21 @@ #include "portable.h" -#include #include -#include #include #include -#include + +#include + #include #include + #include "shellutil.h" #include "passwd-shell.h" -#ifdef LDAP_DEBUG -void debug_printf(); -#else /* LDAP_DEBUG */ -#define debug_printf() -#endif /* LDAP_DEBUG */ - - -static void pwdfile_search( struct ldop *op, FILE *ofp ); -static struct ldentry *pw2entry( struct ldop *op, struct passwd *pw ); +static void pwdfile_search LDAP_P(( struct ldop *op, FILE *ofp )); +static struct ldentry *pw2entry LDAP_P(( struct ldop *op, struct passwd *pw )); static char tmpbuf[ MAXLINELEN * 2 ]; diff --git a/servers/slapd/shell-backends/shellutil.c b/servers/slapd/shell-backends/shellutil.c index e1a6d030a4..4f7b469043 100644 --- a/servers/slapd/shell-backends/shellutil.c +++ b/servers/slapd/shell-backends/shellutil.c @@ -16,12 +16,19 @@ #include "portable.h" -#include #include -#include + +#ifdef STDC_HEADERS #include -#include +#include +#else #include +#endif + +#include + +#include + #include #include #include "shellutil.h" @@ -316,19 +323,30 @@ ecalloc( unsigned nelem, unsigned elsize ) /* VARARGS */ void -debug_printf( va_alist /* char *fmt, args... */ ) +debug_printf +#ifdef STDC_HEADERS + ( char *fmt, ... ) +#else + ( va_alist ) va_dcl +#endif { - char *fmt; va_list ap; +#ifndef STDC_HEADERS + char *fmt; +#endif - if ( debugflg ) { - va_start( ap ); - fmt = va_arg( ap, char * ); - fprintf( stderr, "%s: ", progname ); - vfprintf( stderr, fmt, ap ); - va_end( ap ); - } + if ( debugflg ) { +#ifdef STDC_HEADERS + va_start( ap, fmt ); +#else + va_start( ap ); + fmt = va_arg( ap, char * ); +#endif + fprintf( stderr, "%s: ", progname ); + vfprintf( stderr, fmt, ap ); + va_end( ap ); + } } diff --git a/servers/slapd/shell-backends/shellutil.h b/servers/slapd/shell-backends/shellutil.h index 8c52ab5dcf..58775b2f99 100644 --- a/servers/slapd/shell-backends/shellutil.h +++ b/servers/slapd/shell-backends/shellutil.h @@ -75,7 +75,7 @@ struct ldentry { #ifdef LDAP_DEBUG -void debug_printf(); +void debug_printf LDAP_P((char *, ...)); #else /* LDAP_DEBUG */ #define debug_printf() #endif /* LDAP_DEBUG */ diff --git a/servers/slapd/slap.h b/servers/slapd/slap.h index f5dee02400..fad750b28d 100644 --- a/servers/slapd/slap.h +++ b/servers/slapd/slap.h @@ -139,7 +139,7 @@ struct access { char *a_dnattr; long a_access; -#ifdef SLAPD_ACLGROUP +#ifdef SLAPD_ACLGROUPS char *a_group; #endif @@ -211,7 +211,7 @@ typedef struct backend { IFP be_init; /* backend init routine */ IFP be_close; /* backend close routine */ -#ifdef ACLGROUP +#ifdef SLAPD_ACLGROUPS IFP be_group; /* backend group member test */ #endif } Backend; diff --git a/servers/slapd/str2filter.c b/servers/slapd/str2filter.c index 46b80f5fe6..5aea1d55b3 100644 --- a/servers/slapd/str2filter.c +++ b/servers/slapd/str2filter.c @@ -3,9 +3,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "slap.h" static char *find_matching_paren(); diff --git a/servers/slapd/strdup.c b/servers/slapd/strdup.c index ec7398d4a8..d9c24e69cb 100644 --- a/servers/slapd/strdup.c +++ b/servers/slapd/strdup.c @@ -1,8 +1,8 @@ #include "portable.h" -#if defined( ultrix ) || defined( nextstep ) +#ifndef HAVE_STRDUP -#include +#include char *strdup( char *s ) { @@ -16,4 +16,4 @@ char *strdup( char *s ) return( p ); } -#endif /* ultrix || nextstep */ +#endif /* !strdup */ diff --git a/servers/slapd/tempnam.c b/servers/slapd/tempnam.c index 53c0e50228..9aa21870b8 100644 --- a/servers/slapd/tempnam.c +++ b/servers/slapd/tempnam.c @@ -1,10 +1,8 @@ #include "portable.h" -#if defined( nextstep ) +#ifndef HAVE_TEMPNAME -#include - -char *tempnam( char *dir, char *pfx ); +#include char *tempnam( char *dir, char *pfx ) { diff --git a/servers/slapd/unbind.c b/servers/slapd/unbind.c index 487fbbead5..1b0d820e68 100644 --- a/servers/slapd/unbind.c +++ b/servers/slapd/unbind.c @@ -16,8 +16,9 @@ #include "portable.h" #include -#include -#include + +#include + #include "slap.h" extern Backend *select_backend(); diff --git a/servers/slapd/value.c b/servers/slapd/value.c index 5be4338ed0..f5ee5f4777 100644 --- a/servers/slapd/value.c +++ b/servers/slapd/value.c @@ -1,13 +1,16 @@ /* value.c - routines for dealing with values */ #include "portable.h" + #include -#include -#include -#include -#include + +#include +#include +#include +#include + #include -#include "portable.h" + #include "slap.h" int @@ -100,7 +103,7 @@ value_normalize( *d = '\0'; } -#define MIN( a, b ) (a < b ? a : b ) +#define LDAP_MIN( a, b ) ((a) < (b) ? (a) : (b) ) int value_cmp( @@ -134,7 +137,7 @@ value_cmp( break; case SYNTAX_BIN: - rc = memcmp( v1->bv_val, v2->bv_val, MIN( v1->bv_len, + rc = memcmp( v1->bv_val, v2->bv_val, LDAP_MIN( v1->bv_len, v2->bv_len ) ); break; } From 43e6fc8e765445a93793e1f899efbd36e8c04f4e Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 21 Oct 1998 23:52:29 +0000 Subject: [PATCH 125/148] SLDAP compiles, needs LDBM work to link --- aclocal.m4 | 6 +++--- configure | 6 +++--- include/ac/ctype.h | 16 ++++++++++++++++ include/ac/errno.h | 5 +++++ include/ac/regex.h | 14 +++++++++----- include/ac/signal.h | 14 ++++++++++++++ include/portable.h.nt | 3 +++ 7 files changed, 53 insertions(+), 11 deletions(-) create mode 100644 include/ac/ctype.h create mode 100644 include/ac/signal.h diff --git a/aclocal.m4 b/aclocal.m4 index b6e6ca9700..6e8e2e667c 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -347,13 +347,13 @@ AC_DEFUN([OL_C_UPPER_LOWER], AC_MSG_CHECKING([if toupper() requires islower()]) AC_CACHE_VAL(ol_cv_c_upper_lower,[ AC_TRY_RUN([ -#include +#include main() { if ('C' == toupper('C')) - exit 0; + exit(0); else - exit 1; + exit(1); }], [ol_cv_c_upper_lower=no], [ol_cv_c_upper_lower=yes], diff --git a/configure b/configure index 516047020c..0ee9272d2c 100755 --- a/configure +++ b/configure @@ -5444,13 +5444,13 @@ else #line 5445 "configure" #include "confdefs.h" -#include +#include main() { if ('C' == toupper('C')) - exit 0; + exit(0); else - exit 1; + exit(1); } EOF if { (eval echo configure:5457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null diff --git a/include/ac/ctype.h b/include/ac/ctype.h new file mode 100644 index 0000000000..e16a5ec80f --- /dev/null +++ b/include/ac/ctype.h @@ -0,0 +1,16 @@ +/* Generic ctype.h */ + +#ifndef _AC_CTYPE_H +#define _AC_CTYPE_H + +#include + +#ifdef C_UPPER_LOWER +# define TOUPPER(c) (islower(c) ? toupper(c) : (c)) +# define TOLOWER(c) (islower(c) ? toupper(c) : (c)) +#else +# define TOUPPER(c) toupper(c) +# define TOLOWER(c) tolower(c) +#endif + +#endif /* _AC_CTYPE_H */ diff --git a/include/ac/errno.h b/include/ac/errno.h index edeb90764e..b4854c8ba0 100644 --- a/include/ac/errno.h +++ b/include/ac/errno.h @@ -9,6 +9,11 @@ # include #endif +#ifdef DECL_SYS_ERRLIST +extern int sys_nerr; +extern char *sys_errlist[]; +#endif + /* use _POSIX_VERSION for POSIX.1 code */ #endif /* _AC_ERRNO_H */ diff --git a/include/ac/regex.h b/include/ac/regex.h index c646a08d93..cc21e66215 100644 --- a/include/ac/regex.h +++ b/include/ac/regex.h @@ -8,12 +8,16 @@ #include #endif -#ifdef HAVE_REGEX_H +#ifndef HAVE_REGEX_H +/* NO POSIX REGEX!! + you'll need to install a POSIX compatible REGEX library. + Either Henry Spencer's or GNU regex will do. + + For NT: http://people.delphi.com/gjc/hs_regex.html +*/ +#else /* have regex.h, assume it's POSIX compliant */ # include -#else - /* no regex.h, use compatibility library */ -# include -#endif /* ! regex.h */ +#endif /* regex.h */ #endif /* _AC_REGEX_H_ */ diff --git a/include/ac/signal.h b/include/ac/signal.h new file mode 100644 index 0000000000..56597a0bfe --- /dev/null +++ b/include/ac/signal.h @@ -0,0 +1,14 @@ +/* Generic signal.h */ + +#ifndef _AC_SIGNAL_H +#define _AC_SIGNAL_H + +#include + +#ifdef HAVE_SIGSET +#define SIGNAL sigset +#else +#define SIGNAL signal +#endif + +#endif /* _AC_SIGNAL_H */ diff --git a/include/portable.h.nt b/include/portable.h.nt index b81d8d1656..d715fb1bbe 100644 --- a/include/portable.h.nt +++ b/include/portable.h.nt @@ -31,6 +31,9 @@ is provided ``as is'' without express or implied warranty. #ifndef _LDAP_PORTABLE_H #define _LDAP_PORTABLE_H +/* we installed Henry Spencer's REGEX */ +#define HAVE_REGEX_H 1 + /* win32 specific stuff */ #define strcasecmp stricmp #define strncasecmp strnicmp From c4b1286fa9423129da4f089389a448aeeef16f8d Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 22 Oct 1998 00:40:49 +0000 Subject: [PATCH 126/148] SLAPD and tools compile and link! LTHREAD still needs work. --- configure | 25 +- configure.in | 1 + include/ldbm.h | 127 +++---- include/portable.h.in | 3 + libraries/libldap/abandon.c | 8 +- libraries/libldap/cldap.c | 23 +- libraries/libldap/error.c | 4 +- libraries/libldap/kbind.c | 8 +- libraries/libldap/result.c | 16 +- libraries/libldap/search.c | 8 +- libraries/libldap/test.c | 46 +-- libraries/libldap/tmplout.c | 68 ++-- libraries/libldbm/ldbm.c | 507 ++++++++++++------------- servers/slapd/tools/centipede.c | 33 +- servers/slapd/tools/chlog2replog.c | 5 +- servers/slapd/tools/edb2ldif.c | 8 +- servers/slapd/tools/ldapsyntax.c | 6 +- servers/slapd/tools/ldbmcat.c | 13 +- servers/slapd/tools/ldbmtest.c | 33 +- servers/slapd/tools/ldif.c | 8 +- servers/slapd/tools/ldif2id2children.c | 7 +- servers/slapd/tools/ldif2id2entry.c | 7 +- servers/slapd/tools/ldif2ldbm.c | 8 +- 23 files changed, 487 insertions(+), 485 deletions(-) diff --git a/configure b/configure index 0ee9272d2c..fb40b92de9 100755 --- a/configure +++ b/configure @@ -5862,6 +5862,7 @@ for ac_func in \ lockf \ memcpy \ memmove \ + mkstemp \ mktime \ select \ setpwfile \ @@ -5881,12 +5882,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5885: checking for $ac_func" >&5 +echo "configure:5886: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5937,12 +5938,12 @@ done for ac_func in getopt strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5941: checking for $ac_func" >&5 +echo "configure:5942: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5995,13 +5996,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:5999: checking declaration of sys_errlist" >&5 +echo "configure:6000: 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 < @@ -6011,7 +6012,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:6015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -6032,20 +6033,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:6036: checking existence of sys_errlist" >&5 +echo "configure:6037: 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 < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:6049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index e112c59a52..b93b64f0a1 100644 --- a/configure.in +++ b/configure.in @@ -740,6 +740,7 @@ AC_CHECK_FUNCS( \ lockf \ memcpy \ memmove \ + mkstemp \ mktime \ select \ setpwfile \ diff --git a/include/ldbm.h b/include/ldbm.h index e9788fcbbf..0f4c07c3ad 100644 --- a/include/ldbm.h +++ b/include/ldbm.h @@ -3,39 +3,61 @@ #ifndef _LDBM_H_ #define _LDBM_H_ -#ifdef LDBM_USE_GDBM +#ifdef LDBM_USE_DBBTREE /***************************************************************** * * - * use gdbm if possible * + * use berkeley db btree package * * * *****************************************************************/ -#include +#include +#include +#include -typedef datum Datum; +#ifdef HAVE_DB185_H +# include +#else +# include +# ifdef HAVE_BERKELEY_DB2 +# define R_NOOVERWRITE DB_NOOVERWRITE +# define DEFAULT_DB_PAGE_SIZE 1024 +# endif +#endif -typedef GDBM_FILE LDBM; -extern gdbm_error gdbm_errno; +typedef DBT Datum; +#define dsize size +#define dptr data + +typedef DB *LDBM; + +#define DB_TYPE DB_BTREE /* for ldbm_open */ -#define LDBM_READER GDBM_READER -#define LDBM_WRITER GDBM_WRITER -#define LDBM_WRCREAT GDBM_WRCREAT -#define LDBM_NEWDB GDBM_NEWDB -#define LDBM_FAST GDBM_FAST +#ifdef HAVE_BERKELEY_DB2 +# define LDBM_READER DB_RDONLY +# define LDBM_WRITER 0x00000 /* hopefully */ +# define LDBM_WRCREAT (DB_NOMMAP|DB_CREATE|DB_THREAD) +# define LDBM_NEWDB (DB_TRUNCATE|DB_CREATE|DB_THREAD) +#else +# define LDBM_READER O_RDONLY +# define LDBM_WRITER O_RDWR +# define LDBM_WRCREAT (O_RDWR|O_CREAT) +# define LDBM_NEWDB (O_RDWR|O_TRUNC|O_CREAT) +#endif -#define LDBM_SUFFIX ".gdbm" +# define LDBM_FAST 0 + +#define LDBM_SUFFIX ".dbb" +#define LDBM_ORDERED 1 /* for ldbm_insert */ -#define LDBM_INSERT GDBM_INSERT -#define LDBM_REPLACE GDBM_REPLACE +#define LDBM_INSERT R_NOOVERWRITE +#define LDBM_REPLACE 0 #define LDBM_SYNC 0x80000000 -#else /* end of gdbm */ - -#ifdef LDBM_USE_DBHASH +#elif defined( LDBM_USE_DBHASH ) /***************************************************************** * * @@ -47,7 +69,7 @@ extern gdbm_error gdbm_errno; #include #include -#ifdef LDBM_USE_DB2_COMPAT185 +#ifdef HAVE_DB185_H # include #else # include @@ -86,69 +108,38 @@ typedef DB *LDBM; #define LDBM_REPLACE 0 #define LDBM_SYNC 0x80000000 -extern int errno; - -#else /* end of db hash */ - -#ifdef LDBM_USE_DBBTREE +#elif defined( HAVE_GDBM ) /***************************************************************** * * - * use berkeley db btree package * + * use gdbm if possible * * * *****************************************************************/ -#include -#include -#include +#include -#ifdef LDBM_USE_DB2_COMPAT185 -# include -#else -# include -# ifdef LDBM_USE_DB2 -# define R_NOOVERWRITE DB_NOOVERWRITE -# define DEFAULT_DB_PAGE_SIZE 1024 -# endif -#endif +typedef datum Datum; +typedef GDBM_FILE LDBM; -typedef DBT Datum; -#define dsize size -#define dptr data - -typedef DB *LDBM; - -#define DB_TYPE DB_BTREE +extern gdbm_error gdbm_errno; /* for ldbm_open */ -#ifdef LDBM_USE_DB2 -# define LDBM_READER DB_RDONLY -# define LDBM_WRITER 0x00000 /* hopefully */ -# define LDBM_WRCREAT (DB_NOMMAP|DB_CREATE|DB_THREAD) -# define LDBM_NEWDB (DB_TRUNCATE|DB_CREATE|DB_THREAD) -#else -# define LDBM_READER O_RDONLY -# define LDBM_WRITER O_RDWR -# define LDBM_WRCREAT (O_RDWR|O_CREAT) -# define LDBM_NEWDB (O_RDWR|O_TRUNC|O_CREAT) -#endif +#define LDBM_READER GDBM_READER +#define LDBM_WRITER GDBM_WRITER +#define LDBM_WRCREAT GDBM_WRCREAT +#define LDBM_NEWDB GDBM_NEWDB +#define LDBM_FAST GDBM_FAST -# define LDBM_FAST 0 - -#define LDBM_SUFFIX ".dbb" -#define LDBM_ORDERED 1 +#define LDBM_SUFFIX ".gdbm" /* for ldbm_insert */ -#define LDBM_INSERT R_NOOVERWRITE -#define LDBM_REPLACE 0 +#define LDBM_INSERT GDBM_INSERT +#define LDBM_REPLACE GDBM_REPLACE #define LDBM_SYNC 0x80000000 -extern int errno; -#else /* end of db btree */ - -#ifdef LDBM_USE_NDBM +#elif defined( HAVE_NDBM ) /***************************************************************** * * @@ -157,6 +148,7 @@ extern int errno; *****************************************************************/ #include + #ifdef HAVE_FCNTL_H #include #endif @@ -179,10 +171,7 @@ typedef DBM *LDBM; #define LDBM_REPLACE DBM_REPLACE #define LDBM_SYNC 0 -#endif /* ndbm */ -#endif /* db hash */ -#endif /* db btree */ -#endif /* gdbm */ +#endif int ldbm_errno( LDBM ldbm ); LDBM ldbm_open( char *name, int rw, int mode, int dbcachesize ); @@ -194,7 +183,7 @@ Datum ldbm_fetch( LDBM ldbm, Datum key ); int ldbm_store( LDBM ldbm, Datum key, Datum data, int flags ); int ldbm_delete( LDBM ldbm, Datum key ); -#if LDBM_USE_DB2 +#if HAVE_BERKELEY_DB2 void *ldbm_malloc( size_t size ); Datum ldbm_firstkey( LDBM ldbm, DBC **dbch ); Datum ldbm_nextkey( LDBM ldbm, Datum key, DBC *dbcp ); diff --git a/include/portable.h.in b/include/portable.h.in index 3b8fd80dac..6dd9df1537 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -248,6 +248,9 @@ is provided ``as is'' without express or implied warranty. /* Define if you have the memmove function. */ #undef HAVE_MEMMOVE +/* Define if you have the mkstemp function. */ +#undef HAVE_MKSTEMP + /* Define if you have the mktime function. */ #undef HAVE_MKTIME diff --git a/libraries/libldap/abandon.c b/libraries/libldap/abandon.c index e9d718c99d..533695f3b5 100644 --- a/libraries/libldap/abandon.c +++ b/libraries/libldap/abandon.c @@ -99,18 +99,18 @@ do_abandon( LDAP *ld, int origid, int msgid ) err = -1; ld->ld_errno = LDAP_NO_MEMORY; } else { -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS if ( ld->ld_sb.sb_naddr > 0 ) { err = ber_printf( ber, "{isti}", ++ld->ld_msgid, ld->ld_cldapdn, LDAP_REQ_ABANDON, msgid ); } else { -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ err = ber_printf( ber, "{iti}", ++ld->ld_msgid, LDAP_REQ_ABANDON, msgid ); -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS } -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ if ( err == -1 ) { ld->ld_errno = LDAP_ENCODING_ERROR; diff --git a/libraries/libldap/cldap.c b/libraries/libldap/cldap.c index dc4794cb3d..7dc16eba74 100644 --- a/libraries/libldap/cldap.c +++ b/libraries/libldap/cldap.c @@ -7,7 +7,7 @@ #include "portable.h" -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS #ifndef lint static char copyright[] = "@(#) Copyright (c) 1990, 1994 Regents of the University of Michigan.\nAll rights reserved.\n"; @@ -40,17 +40,14 @@ struct cldap_retinfo { long cri_timeout; }; -#ifdef NEEDPROTOS -static int add_addr( LDAP *ld, struct sockaddr *sap ); -static int cldap_result( LDAP *ld, int msgid, LDAPMessage **res, - struct cldap_retinfo *crip, char *base ); -static int cldap_parsemsg( LDAP *ld, int msgid, BerElement *ber, - LDAPMessage **res, char *base ); -#else /* NEEDPROTOS */ -static int add_addr(); -static int cldap_result(); -static int cldap_parsemsg(); -#endif /* NEEDPROTOS */ +static int add_addr LDAP_P(( + LDAP *ld, struct sockaddr *sap )); +static int cldap_result LDAP_P(( + LDAP *ld, int msgid, LDAPMessage **res, + struct cldap_retinfo *crip, char *base )); +static int cldap_parsemsg LDAP_P(( + LDAP *ld, int msgid, BerElement *ber, + LDAPMessage **res, char *base )); /* * cldap_open - initialize and connect to an ldap server. A magic cookie to @@ -525,4 +522,4 @@ cldap_parsemsg( LDAP *ld, int msgid, BerElement *ber, *res = chain; return(( *res == NULLMSG ) ? rc : ldap_result2error( ld, *res, 0 )); } -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ diff --git a/libraries/libldap/error.c b/libraries/libldap/error.c index 80dcd809fa..26c8778047 100644 --- a/libraries/libldap/error.c +++ b/libraries/libldap/error.c @@ -80,7 +80,7 @@ ldap_err2string( int err ) return( "Unknown error" ); } -#ifndef NO_USERINTERFACE +#ifdef LDAP_LIBUI void ldap_perror( LDAP *ld, char *s ) { @@ -119,7 +119,7 @@ ldap_perror( LDAP *ld, char *s ) { } -#endif /* NO_USERINTERFACE */ +#endif /* !LDAP_LIBUI */ int diff --git a/libraries/libldap/kbind.c b/libraries/libldap/kbind.c index a9cd60b99a..9ef667be2f 100644 --- a/libraries/libldap/kbind.c +++ b/libraries/libldap/kbind.c @@ -255,10 +255,10 @@ ldap_get_kerberosv4_credentials( LDAP *ld, char *who, char *service, int *len ) Debug( LDAP_DEBUG_TRACE, "ldap_get_kerberosv4_credentials\n", 0, 0, 0 ); if ( (err = krb_get_tf_realm( tkt_string(), realm )) != KSUCCESS ) { -#ifndef NO_USERINTERFACE +#ifdef LDAP_LIBUI fprintf( stderr, "krb_get_tf_realm failed (%s)\n", krb_err_txt[err] ); -#endif /* NO_USERINTERFACE */ +#endif /* LDAP_LIBUI */ ld->ld_errno = LDAP_INVALID_CREDENTIALS; return( NULL ); } @@ -271,9 +271,9 @@ ldap_get_kerberosv4_credentials( LDAP *ld, char *who, char *service, int *len ) if ( (err = krb_mk_req( &ktxt, service, krbinstance, realm, 0 )) != KSUCCESS ) { -#ifndef NO_USERINTERFACE +#ifdef LDAP_LIBUI fprintf( stderr, "krb_mk_req failed (%s)\n", krb_err_txt[err] ); -#endif /* NO_USERINTERFACE */ +#endif /* LDAP_LIBUI */ ld->ld_errno = LDAP_INVALID_CREDENTIALS; return( NULL ); } diff --git a/libraries/libldap/result.c b/libraries/libldap/result.c index 7dafad5e8b..15eddb924c 100644 --- a/libraries/libldap/result.c +++ b/libraries/libldap/result.c @@ -38,7 +38,7 @@ static void merge_error_info LDAP_P(( LDAP *ld, LDAPRequest *parentr, LDAPReques static int read1msg LDAP_P(( LDAP *ld, int msgid, int all, Sockbuf *sb, LDAPMessage **result )); #endif /* LDAP_REFERRALS */ -#if defined( CLDAP ) || !defined( LDAP_REFERRALS ) +#if defined( LDAP_CONNECTIONLESS ) || !defined( LDAP_REFERRALS ) static int ldap_select1 LDAP_P(( LDAP *ld, struct timeval *timeout )); #endif @@ -588,7 +588,7 @@ merge_error_info( LDAP *ld, LDAPRequest *parentr, LDAPRequest *lr ) -#if defined( CLDAP ) || !defined( LDAP_REFERRALS ) +#if defined( LDAP_CONNECTIONLESS ) || !defined( LDAP_REFERRALS ) #if !defined( MACOS ) && !defined( DOS ) && !defined( _WIN32 ) static int ldap_select1( LDAP *ld, struct timeval *timeout ) @@ -597,11 +597,13 @@ ldap_select1( LDAP *ld, struct timeval *timeout ) static int tblsize; if ( tblsize == 0 ) { -#ifdef USE_SYSCONF +#ifdef HAVE_SYSCONF tblsize = sysconf( _SC_OPEN_MAX ); -#else /* !USE_SYSCONF */ +#elif HAVE_GETDTABLESIZE tblsize = getdtablesize(); -#endif /* !USE_SYSCONF */ +#else + tblsize = FD_SETSIZE; +#endif #ifdef FD_SETSIZE if ( tblsize > FD_SETSIZE ) { tblsize = FD_SETSIZE; @@ -782,7 +784,7 @@ ldap_mark_abandoned( LDAP *ld, int msgid ) } -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS int cldap_getmsg( LDAP *ld, struct timeval *timeout, BerElement *ber ) { @@ -808,4 +810,4 @@ cldap_getmsg( LDAP *ld, struct timeval *timeout, BerElement *ber ) return( tag ); } -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ diff --git a/libraries/libldap/search.c b/libraries/libldap/search.c index da6e7d3763..b74635d3a5 100644 --- a/libraries/libldap/search.c +++ b/libraries/libldap/search.c @@ -117,19 +117,19 @@ ldap_build_search_req( LDAP *ld, char *base, int scope, char *filter, base = ""; } -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS if ( ld->ld_sb.sb_naddr > 0 ) { err = ber_printf( ber, "{ist{seeiib", ++ld->ld_msgid, ld->ld_cldapdn, LDAP_REQ_SEARCH, base, scope, ld->ld_deref, ld->ld_sizelimit, ld->ld_timelimit, attrsonly ); } else { -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ err = ber_printf( ber, "{it{seeiib", ++ld->ld_msgid, LDAP_REQ_SEARCH, base, scope, ld->ld_deref, ld->ld_sizelimit, ld->ld_timelimit, attrsonly ); -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS } -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ if ( err == -1 ) { ld->ld_errno = LDAP_ENCODING_ERROR; diff --git a/libraries/libldap/test.c b/libraries/libldap/test.c index 84f478da80..d81481de0f 100644 --- a/libraries/libldap/test.c +++ b/libraries/libldap/test.c @@ -1,8 +1,9 @@ #include #include #include -#ifdef MACOS #include + +#ifdef MACOS #ifdef THINK_C #include #include @@ -31,21 +32,20 @@ #include "lber.h" #include "ldap.h" +/* including the "internal" defs is legit and nec. since this test routine has + * a-priori knowledge of libldap internal workings. + * hodges@stanford.edu 5-Feb-96 + */ +#include "ldap-int.h" + #if !defined( PCNFS ) && !defined( WINSOCK ) && !defined( MACOS ) #define MOD_USE_BVALS #endif /* !PCNFS && !WINSOCK && !MACOS */ -#ifdef NEEDPROTOS -static void handle_result( LDAP *ld, LDAPMessage *lm ); -static void print_ldap_result( LDAP *ld, LDAPMessage *lm, char *s ); -static void print_search_entry( LDAP *ld, LDAPMessage *res ); -static void free_list( char **list ); -#else -static void handle_result(); -static void print_ldap_result(); -static void print_search_entry(); -static void free_list(); -#endif /* NEEDPROTOS */ +static void handle_result LDAP_P(( LDAP *ld, LDAPMessage *lm )); +static void print_ldap_result LDAP_P(( LDAP *ld, LDAPMessage *lm, char *s )); +static void print_search_entry LDAP_P(( LDAP *ld, LDAPMessage *res )); +static void free_list LDAP_P(( char **list )); #define NOCACHEERRMSG "don't compile with -DNO_CACHE if you desire local caching" @@ -281,7 +281,7 @@ main( #endif /* WINSOCK */ int argc, char **argv ) { - LDAP *ld; + LDAP *ld = NULL; int i, c, port, cldapflg, errflg, method, id, msgtype; char line[256], command1, command2, command3; char passwd[64], dn[256], rdn[64], attr[64], value[256]; @@ -316,11 +316,11 @@ main( while (( c = getopt( argc, argv, "uh:d:s:p:t:T:" )) != -1 ) { switch( c ) { case 'u': -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS cldapflg++; -#else /* CLDAP */ - printf( "Compile with -DCLDAP for UDP support\n" ); -#endif /* CLDAP */ +#else /* LDAP_CONNECTIONLESS */ + printf( "Compile with -DLDAP_CONNECTIONLESS for UDP support\n" ); +#endif /* LDAP_CONNECTIONLESS */ break; case 'd': @@ -377,9 +377,9 @@ main( host == NULL ? "(null)" : host, port ); if ( cldapflg ) { -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS ld = cldap_open( host, port ); -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ } else { ld = ldap_open( host, port ); } @@ -567,10 +567,10 @@ main( break; case 'q': /* quit */ -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS if ( cldapflg ) cldap_close( ld ); -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ #ifdef LDAP_REFERRALS if ( !cldapflg ) #else /* LDAP_REFERRALS */ @@ -636,7 +636,7 @@ main( attrsonly = atoi( line ); if ( cldapflg ) { -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS getline( line, sizeof(line), stdin, "Requestor DN (for logging)? " ); if ( cldap_search_s( ld, dn, scope, filter, types, @@ -648,7 +648,7 @@ main( handle_result( ld, res ); res = NULLMSG; } -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ } else { if (( id = ldap_search( ld, dn, scope, filter, types, attrsonly )) == -1 ) { diff --git a/libraries/libldap/tmplout.c b/libraries/libldap/tmplout.c index 330527b421..0c5613de94 100644 --- a/libraries/libldap/tmplout.c +++ b/libraries/libldap/tmplout.c @@ -8,6 +8,7 @@ #include #include #include + #ifdef MACOS #include "macos.h" #else /* MACOS */ @@ -29,41 +30,36 @@ #include "ldap.h" #include "disptmpl.h" -#ifdef NEEDPROTOS -static int do_entry2text( LDAP *ld, char *buf, char *base, LDAPMessage *entry, +#include "ldapconfig.h" + +static int do_entry2text LDAP_P(( + LDAP *ld, char *buf, char *base, LDAPMessage *entry, struct ldap_disptmpl *tmpl, char **defattrs, char ***defvals, writeptype writeproc, void *writeparm, char *eol, int rdncount, - unsigned long opts, char *urlprefix ); -static int do_entry2text_search( LDAP *ld, char *dn, char *base, + unsigned long opts, char *urlprefix )); +static int do_entry2text_search LDAP_P(( + LDAP *ld, char *dn, char *base, LDAPMessage *entry, struct ldap_disptmpl *tmpllist, char **defattrs, char ***defvals, writeptype writeproc, void *writeparm, char *eol, - int rdncount, unsigned long opts, char *urlprefix ); -static int do_vals2text( LDAP *ld, char *buf, char **vals, char *label, + int rdncount, unsigned long opts, char *urlprefix )); +static int do_vals2text LDAP_P(( + LDAP *ld, char *buf, char **vals, char *label, int labelwidth, unsigned long syntaxid, writeptype writeproc, - void *writeparm, char *eol, int rdncount, char *urlprefix ); -static int max_label_len( struct ldap_disptmpl *tmpl ); -static int output_label( char *buf, char *label, int width, - writeptype writeproc, void *writeparm, char *eol, int html ); -static int output_dn( char *buf, char *dn, int width, int rdncount, - writeptype writeproc, void *writeparm, char *eol, char *urlprefix ); -static void strcat_escaped( char *s1, char *s2 ); -static char *time2text( char *ldtimestr, int dateonly ); -static long gtime( struct tm *tm ); -static int searchaction( LDAP *ld, char *buf, char *base, LDAPMessage *entry, + void *writeparm, char *eol, int rdncount, char *urlprefix )); +static int max_label_len LDAP_P(( struct ldap_disptmpl *tmpl )); +static int output_label LDAP_P(( + char *buf, char *label, int width, + writeptype writeproc, void *writeparm, char *eol, int html )); +static int output_dn LDAP_P(( + char *buf, char *dn, int width, int rdncount, + writeptype writeproc, void *writeparm, char *eol, char *urlprefix )); +static void strcat_escaped LDAP_P(( char *s1, char *s2 )); +static char *time2text LDAP_P(( char *ldtimestr, int dateonly )); +static long gtime LDAP_P(( struct tm *tm )); +static int searchaction LDAP_P(( + LDAP *ld, char *buf, char *base, LDAPMessage *entry, char *dn, struct ldap_tmplitem *tip, int labelwidth, int rdncount, - writeptype writeproc, void *writeparm, char *eol, char *urlprefix ); -#else /* NEEDPROTOS */ -static int do_entry2text(); -static int do_entry2text_search(); -static int do_vals2text(); -static int max_label_len(); -static int output_label(); -static int output_dn(); -static void strcat_escaped(); -static char *time2text(); -static long gtime(); -static int searchaction(); -#endif /* NEEDPROTOS */ + writeptype writeproc, void *writeparm, char *eol, char *urlprefix )); #define DEF_LABEL_WIDTH 15 #define SEARCH_TIMEOUT_SECS 120 @@ -475,12 +471,12 @@ do_entry2text_search( ocattrs[0] = OCATTRNAME; ocattrs[1] = NULL; -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS if ( LDAP_IS_CLDAP( ld )) err = cldap_search_s( ld, dn, LDAP_SCOPE_BASE, "objectClass=*", ocattrs, 0, &ldmp, NULL ); else -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ err = ldap_search_st( ld, dn, LDAP_SCOPE_BASE, "objectClass=*", ocattrs, 0, &timeout, &ldmp ); @@ -509,12 +505,12 @@ do_entry2text_search( fetchattrs = ldap_tmplattrs( tmpl, NULL, 1, LDAP_SYN_OPT_DEFER ); } -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS if ( LDAP_IS_CLDAP( ld )) err = cldap_search_s( ld, dn, LDAP_SCOPE_BASE, "objectClass=*", fetchattrs, 0, &ldmp, NULL ); else -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ err = ldap_search_st( ld, dn, LDAP_SCOPE_BASE, "objectClass=*", fetchattrs, 0, &timeout, &ldmp ); @@ -987,7 +983,7 @@ searchaction( LDAP *ld, char *buf, char *base, LDAPMessage *entry, char *dn, struct ldap_tmplitem *tip, int labelwidth, int rdncount, writeptype writeproc, void *writeparm, char *eol, char *urlprefix ) { - int err, lderr, i, count, html; + int err = 0, lderr, i, count, html; char **vals, **members; char *value, *filtpattern, *attr, *selectname; char *retattrs[2], filter[ 256 ]; @@ -1047,12 +1043,12 @@ searchaction( LDAP *ld, char *buf, char *base, LDAPMessage *entry, char *dn, timeout.tv_sec = SEARCH_TIMEOUT_SECS; timeout.tv_usec = 0; -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS if ( LDAP_IS_CLDAP( ld )) lderr = cldap_search_s( ld, base, LDAP_SCOPE_SUBTREE, filter, retattrs, 0, &ldmp, NULL ); else -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ lderr = ldap_search_st( ld, base, LDAP_SCOPE_SUBTREE, filter, retattrs, 0, &timeout, &ldmp ); diff --git a/libraries/libldbm/ldbm.c b/libraries/libldbm/ldbm.c index 33bd1888a7..57db9b0677 100644 --- a/libraries/libldbm/ldbm.c +++ b/libraries/libldbm/ldbm.c @@ -6,15 +6,260 @@ * - DB_DBT_MALLOC ; 1998/03/22, /KSp */ -#ifdef LDAP_LDBM +#include "portable.h" + +#ifdef SLAPD_LDBM #include +#include + #include "ldbm.h" -#ifdef LDBM_USE_GDBM +#if defined( LDBM_USE_DBHASH ) || defined( LDBM_USE_DBBTREE ) -#include -#include +/***************************************************************** + * * + * use berkeley db hash or btree package * + * * + *****************************************************************/ + +#ifdef HAVE_BERKELEY_DB2 +/************************************************* + * * + * A malloc routine for use with DB_DBT_MALLOC * + * * + *************************************************/ + +void * +ldbm_malloc( size_t size ) +{ + return( calloc( 1, size )); +} + +#endif + + +LDBM +ldbm_open( char *name, int rw, int mode, int dbcachesize ) +{ + LDBM ret = NULL; + +#ifdef HAVE_BERKELEY_DB2 + DB_INFO dbinfo; + + memset( &dbinfo, 0, sizeof( dbinfo )); + dbinfo.db_cachesize = dbcachesize; + dbinfo.db_pagesize = DEFAULT_DB_PAGE_SIZE; + dbinfo.db_malloc = ldbm_malloc; + + db_open( name, DB_TYPE, rw, mode, NULL, &dbinfo, &ret ); + +#else + void *info; + BTREEINFO binfo; + HASHINFO hinfo; + + if ( DB_TYPE == DB_HASH ) { + memset( (char *) &hinfo, '\0', sizeof(hinfo) ); + hinfo.cachesize = dbcachesize; + info = &hinfo; + } else if ( DB_TYPE == DB_BTREE ) { + memset( (char *) &binfo, '\0', sizeof(binfo) ); + binfo.cachesize = dbcachesize; + info = &binfo; + } else { + info = NULL; + } + + ret = dbopen( name, rw, mode, DB_TYPE, info ); + +#endif + + return( ret ); +} + +void +ldbm_close( LDBM ldbm ) +{ +#ifdef HAVE_BERKELEY_DB2 + (*ldbm->close)( ldbm, 0 ); +#else + (*ldbm->close)( ldbm ); +#endif +} + +void +ldbm_sync( LDBM ldbm ) +{ + (*ldbm->sync)( ldbm, 0 ); +} + +void +ldbm_datum_free( LDBM ldbm, Datum data ) +{ + free( data.dptr ); +} + +Datum +ldbm_datum_dup( LDBM ldbm, Datum data ) +{ + Datum dup; + +#ifdef HAVE_BERKELEY_DB2 + memset( &dup, 0, sizeof( dup )); +#endif + + if ( data.dsize == 0 ) { + dup.dsize = 0; + dup.dptr = NULL; + + return( dup ); + } + dup.dsize = data.dsize; + if ( dup.dptr = (char *) malloc( data.dsize ) ) + memcpy( dup.dptr, data.dptr, data.dsize ); + + return( dup ); +} + +Datum +ldbm_fetch( LDBM ldbm, Datum key ) +{ + Datum data; + int rc; + +#ifdef HAVE_BERKELEY_DB2 + memset( &data, 0, sizeof( data )); + + data.flags = DB_DBT_MALLOC; + + if ( (rc = (*ldbm->get)( ldbm, NULL, &key, &data, 0 )) != 0 ) { + if ( data.dptr ) free( data.dptr ); +#else + if ( (rc = (*ldbm->get)( ldbm, &key, &data, 0 )) == 0 ) { + data = ldbm_datum_dup( ldbm, data ); + } else { +#endif + data.dptr = NULL; + data.dsize = 0; + } + + return( data ); +} + +int +ldbm_store( LDBM ldbm, Datum key, Datum data, int flags ) +{ + int rc; + +#ifdef HAVE_BERKELEY_DB2 + rc = (*ldbm->put)( ldbm, NULL, &key, &data, flags & ~LDBM_SYNC ); + rc = (-1 ) * rc; +#else + rc = (*ldbm->put)( ldbm, &key, &data, flags & ~LDBM_SYNC ); +#endif + if ( flags & LDBM_SYNC ) + (*ldbm->sync)( ldbm, 0 ); + return( rc ); +} + +int +ldbm_delete( LDBM ldbm, Datum key ) +{ + int rc; + +#ifdef HAVE_BERKELEY_DB2 + rc = (*ldbm->del)( ldbm, NULL, &key, 0 ); + rc = (-1 ) * rc; +#else + rc = (*ldbm->del)( ldbm, &key, 0 ); +#endif + (*ldbm->sync)( ldbm, 0 ); + return( rc ); +} + +Datum +#ifdef HAVE_BERKELEY_DB2 +ldbm_firstkey( LDBM ldbm, DBC **dbch ) +#else +ldbm_firstkey( LDBM ldbm ) +#endif +{ + Datum key, data; + int rc; + +#ifdef HAVE_BERKELEY_DB2 + DBC *dbci; + + memset( &key, 0, sizeof( key )); + memset( &data, 0, sizeof( data )); + + key.flags = data.flags = DB_DBT_MALLOC; + + /* acquire a cursor for the DB */ + if ( (*ldbm->cursor)( ldbm, NULL, &dbci )) { + return( key ); + } else { + *dbch = dbci; + if ( (*dbci->c_get)( dbci, &key, &data, DB_NEXT ) == 0 ) { + if ( data.dptr ) free( data.dptr ); +#else + if ( (rc = (*ldbm->seq)( ldbm, &key, &data, R_FIRST )) == 0 ) { + key = ldbm_datum_dup( ldbm, key ); +#endif + } else { + key.dptr = NULL; + key.dsize = 0; + } + +#ifdef HAVE_BERKELEY_DB2 + } +#endif + + return( key ); +} + +Datum +#ifdef HAVE_BERKELEY_DB2 +ldbm_nextkey( LDBM ldbm, Datum key, DBC *dbcp ) +#else +ldbm_nextkey( LDBM ldbm, Datum key ) +#endif +{ + Datum data; + int rc; + +#ifdef HAVE_BERKELEY_DB2 + void *oldKey = key.dptr; + + memset( &data, 0, sizeof( data )); + + data.flags = DB_DBT_MALLOC; + + if ( (*dbcp->c_get)( dbcp, &key, &data, DB_NEXT ) == 0 ) { + if ( data.dptr ) free( data.dptr ); +#else + if ( (rc = (*ldbm->seq)( ldbm, &key, &data, R_NEXT )) == 0 ) { + key = ldbm_datum_dup( ldbm, key ); +#endif + } else { + key.dptr = NULL; + key.dsize = 0; + } +#ifdef HAVE_BERKELEY_DB2 + if ( oldKey ) free( oldKey ); +#endif + + return( key ); +} + +int +ldbm_errno( LDBM ldbm ) +{ + return( errno ); +} + +#elif defined( HAVE_GDBM ) /***************************************************************** * * @@ -120,257 +365,7 @@ ldbm_errno( LDBM ldbm ) return( (int) gdbm_errno ); } -#else -#if defined( LDBM_USE_DBHASH ) || defined( LDBM_USE_DBBTREE ) - -/***************************************************************** - * * - * use berkeley db hash or btree package * - * * - *****************************************************************/ - -#ifdef LDBM_USE_DB2 -/************************************************* - * * - * A malloc routine for use with DB_DBT_MALLOC * - * * - *************************************************/ - -#include - - -void * -ldbm_malloc( size_t size ) -{ - return( calloc( 1, size )); -} - -#endif - - -LDBM -ldbm_open( char *name, int rw, int mode, int dbcachesize ) -{ - LDBM ret = NULL; - -#ifdef LDBM_USE_DB2 - DB_INFO dbinfo; - - memset( &dbinfo, 0, sizeof( dbinfo )); - dbinfo.db_cachesize = dbcachesize; - dbinfo.db_pagesize = DEFAULT_DB_PAGE_SIZE; - dbinfo.db_malloc = ldbm_malloc; - - db_open( name, DB_TYPE, rw, mode, NULL, &dbinfo, &ret ); - -#else - void *info; - BTREEINFO binfo; - HASHINFO hinfo; - - if ( DB_TYPE == DB_HASH ) { - memset( (char *) &hinfo, '\0', sizeof(hinfo) ); - hinfo.cachesize = dbcachesize; - info = &hinfo; - } else if ( DB_TYPE == DB_BTREE ) { - memset( (char *) &binfo, '\0', sizeof(binfo) ); - binfo.cachesize = dbcachesize; - info = &binfo; - } else { - info = NULL; - } - - ret = dbopen( name, rw, mode, DB_TYPE, info ); - -#endif - - return( ret ); -} - -void -ldbm_close( LDBM ldbm ) -{ -#ifdef LDBM_USE_DB2 - (*ldbm->close)( ldbm, 0 ); -#else - (*ldbm->close)( ldbm ); -#endif -} - -void -ldbm_sync( LDBM ldbm ) -{ - (*ldbm->sync)( ldbm, 0 ); -} - -void -ldbm_datum_free( LDBM ldbm, Datum data ) -{ - free( data.dptr ); -} - -Datum -ldbm_datum_dup( LDBM ldbm, Datum data ) -{ - Datum dup; - -#ifdef LDBM_USE_DB2 - memset( &dup, 0, sizeof( dup )); -#endif - - if ( data.dsize == 0 ) { - dup.dsize = 0; - dup.dptr = NULL; - - return( dup ); - } - dup.dsize = data.dsize; - if ( dup.dptr = (char *) malloc( data.dsize ) ) - memcpy( dup.dptr, data.dptr, data.dsize ); - - return( dup ); -} - -Datum -ldbm_fetch( LDBM ldbm, Datum key ) -{ - Datum data; - int rc; - -#ifdef LDBM_USE_DB2 - memset( &data, 0, sizeof( data )); - - data.flags = DB_DBT_MALLOC; - - if ( (rc = (*ldbm->get)( ldbm, NULL, &key, &data, 0 )) != 0 ) { - if ( data.dptr ) free( data.dptr ); -#else - if ( (rc = (*ldbm->get)( ldbm, &key, &data, 0 )) == 0 ) { - data = ldbm_datum_dup( ldbm, data ); - } else { -#endif - data.dptr = NULL; - data.dsize = 0; - } - - return( data ); -} - -int -ldbm_store( LDBM ldbm, Datum key, Datum data, int flags ) -{ - int rc; - -#ifdef LDBM_USE_DB2 - rc = (*ldbm->put)( ldbm, NULL, &key, &data, flags & ~LDBM_SYNC ); - rc = (-1 ) * rc; -#else - rc = (*ldbm->put)( ldbm, &key, &data, flags & ~LDBM_SYNC ); -#endif - if ( flags & LDBM_SYNC ) - (*ldbm->sync)( ldbm, 0 ); - return( rc ); -} - -int -ldbm_delete( LDBM ldbm, Datum key ) -{ - int rc; - -#ifdef LDBM_USE_DB2 - rc = (*ldbm->del)( ldbm, NULL, &key, 0 ); - rc = (-1 ) * rc; -#else - rc = (*ldbm->del)( ldbm, &key, 0 ); -#endif - (*ldbm->sync)( ldbm, 0 ); - return( rc ); -} - -Datum -#ifdef LDBM_USE_DB2 -ldbm_firstkey( LDBM ldbm, DBC **dbch ) -#else -ldbm_firstkey( LDBM ldbm ) -#endif -{ - Datum key, data; - int rc; - -#ifdef LDBM_USE_DB2 - DBC *dbci; - - memset( &key, 0, sizeof( key )); - memset( &data, 0, sizeof( data )); - - key.flags = data.flags = DB_DBT_MALLOC; - - /* acquire a cursor for the DB */ - if ( (*ldbm->cursor)( ldbm, NULL, &dbci )) { - return( key ); - } else { - *dbch = dbci; - if ( (*dbci->c_get)( dbci, &key, &data, DB_NEXT ) == 0 ) { - if ( data.dptr ) free( data.dptr ); -#else - if ( (rc = (*ldbm->seq)( ldbm, &key, &data, R_FIRST )) == 0 ) { - key = ldbm_datum_dup( ldbm, key ); -#endif - } else { - key.dptr = NULL; - key.dsize = 0; - } - -#ifdef LDBM_USE_DB2 - } -#endif - - return( key ); -} - -Datum -#ifdef LDBM_USE_DB2 -ldbm_nextkey( LDBM ldbm, Datum key, DBC *dbcp ) -#else -ldbm_nextkey( LDBM ldbm, Datum key ) -#endif -{ - Datum data; - int rc; - -#ifdef LDBM_USE_DB2 - void *oldKey = key.dptr; - - memset( &data, 0, sizeof( data )); - - data.flags = DB_DBT_MALLOC; - - if ( (*dbcp->c_get)( dbcp, &key, &data, DB_NEXT ) == 0 ) { - if ( data.dptr ) free( data.dptr ); -#else - if ( (rc = (*ldbm->seq)( ldbm, &key, &data, R_NEXT )) == 0 ) { - key = ldbm_datum_dup( ldbm, key ); -#endif - } else { - key.dptr = NULL; - key.dsize = 0; - } -#ifdef LDBM_USE_DB2 - if ( oldKey ) free( oldKey ); -#endif - - return( key ); -} - -int -ldbm_errno( LDBM ldbm ) -{ - return( errno ); -} - -#else - -#ifdef LDBM_USE_NDBM +#elif defined( HAVE_NDBM ) /***************************************************************** * * @@ -459,6 +454,4 @@ ldbm_errno( LDBM ldbm ) } #endif /* ndbm */ -#endif /* db */ -#endif /* gdbm */ #endif /* ldbm */ diff --git a/servers/slapd/tools/centipede.c b/servers/slapd/tools/centipede.c index 5de9388b56..ce1203d2bb 100644 --- a/servers/slapd/tools/centipede.c +++ b/servers/slapd/tools/centipede.c @@ -3,11 +3,14 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include +#include + #include #include + #include #include @@ -558,10 +561,10 @@ diff_centroids( int amax, acur, dmax, dcur; char **vals; -#ifdef LDBM_USE_DB2 +#ifdef HAVE_BERKELEY_DB2 DBC *ocursorp; DBC *ncursorp; -#endif /* LDBM_USE_DB2 */ +#endif /* HAVE_BERKELEY_DB2 */ if ( verbose ) { printf( "Generating mods for differential %s centroid...", attr ); @@ -607,7 +610,7 @@ diff_centroids( olast.dptr = NULL; nlast.dptr = NULL; -#ifdef LDBM_USE_DB2 +#ifdef HAVE_BERKELEY_DB2 for ( okey = ldbm_firstkey( oldbm, &ocursorp ), nkey = ldbm_firstkey( nldbm, &ncursorp ); okey.dptr != NULL && nkey.dptr != NULL; ) @@ -629,7 +632,7 @@ diff_centroids( } nlast = nkey; -#ifdef LDBM_USE_DB2 +#ifdef HAVE_BERKELEY_DB2 okey = ldbm_nextkey( oldbm, olast, ocursorp ); nkey = ldbm_nextkey( nldbm, nlast, ncursorp ); #else @@ -648,7 +651,7 @@ diff_centroids( } nlast = nkey; -#ifdef LDBM_USE_DB2 +#ifdef HAVE_BERKELEY_DB2 nkey = ldbm_nextkey( nldbm, nlast, ncursorp ); #else nkey = ldbm_nextkey( nldbm, nlast ); @@ -665,7 +668,7 @@ diff_centroids( } olast = okey; -#ifdef LDBM_USE_DB2 +#ifdef HAVE_BERKELEY_DB2 okey = ldbm_nextkey( oldbm, olast, ocursorp ); #else okey = ldbm_nextkey( oldbm, olast ); @@ -679,7 +682,7 @@ diff_centroids( return( NULL ); } -#ifdef LDBM_USE_DB2 +#ifdef HAVE_BERKELEY_DB2 okey = ldbm_nextkey( oldbm, olast, ocursorp ); #else okey = ldbm_nextkey( oldbm, olast ); @@ -698,7 +701,7 @@ diff_centroids( return( NULL ); } -#ifdef LDBM_USE_DB2 +#ifdef HAVE_BERKELEY_DB2 nkey = ldbm_nextkey( nldbm, nlast, ncursorp ); #else nkey = ldbm_nextkey( nldbm, nlast ); @@ -723,7 +726,7 @@ diff_centroids( /* generate list of values to add */ lastkey.dptr = NULL; -#ifdef LDBM_USE_DB2 +#ifdef HAVE_BERKELEY_DB2 for ( key = ldbm_firstkey( nldbm, &ncursorp ); key.dptr != NULL; key = ldbm_nextkey( nldbm, lastkey, ncursorp ) ) #else @@ -754,7 +757,7 @@ diff_centroids( /* generate list of values to delete */ lastkey.dptr = NULL; -#ifdef LDBM_USE_DB2 +#ifdef HAVE_BERKELEY_DB2 for ( key = ldbm_firstkey( oldbm, &ocursorp ); key.dptr != NULL; key = ldbm_nextkey( oldbm, lastkey, ocursorp ) ) #else @@ -821,7 +824,7 @@ full_centroid( char **vals; int vcur, vmax; -#ifdef LDBM_USE_DB2 +#ifdef HAVE_BERKELEY_DB2 DBC *cursorp; #endif @@ -852,7 +855,7 @@ full_centroid( lastkey.dptr = NULL; vals = NULL; vcur = vmax = 0; -#ifdef LDBM_USE_DB2 +#ifdef HAVE_BERKELEY_DB2 for ( key = ldbm_firstkey( ldbm, &cursorp ); key.dptr != NULL; key = ldbm_nextkey( ldbm, lastkey, cursorp ) ) #else diff --git a/servers/slapd/tools/chlog2replog.c b/servers/slapd/tools/chlog2replog.c index cd982936c8..85a9433bab 100644 --- a/servers/slapd/tools/chlog2replog.c +++ b/servers/slapd/tools/chlog2replog.c @@ -19,9 +19,10 @@ #include "portable.h" #include -#include #include -#include + +#include +#include #include #include diff --git a/servers/slapd/tools/edb2ldif.c b/servers/slapd/tools/edb2ldif.c index 29bbf1f497..5e2b3d9a30 100644 --- a/servers/slapd/tools/edb2ldif.c +++ b/servers/slapd/tools/edb2ldif.c @@ -13,10 +13,12 @@ #include "portable.h" #include -#include -#include #include -#include + +#include +#include +#include + #include #include diff --git a/servers/slapd/tools/ldapsyntax.c b/servers/slapd/tools/ldapsyntax.c index 69703a33d0..421f4fcd00 100644 --- a/servers/slapd/tools/ldapsyntax.c +++ b/servers/slapd/tools/ldapsyntax.c @@ -13,8 +13,10 @@ #include "portable.h" #include -#include -#include + +#include +#include + #include #include #include diff --git a/servers/slapd/tools/ldbmcat.c b/servers/slapd/tools/ldbmcat.c index b89a54f489..59cd4d1179 100644 --- a/servers/slapd/tools/ldbmcat.c +++ b/servers/slapd/tools/ldbmcat.c @@ -1,10 +1,11 @@ #include "portable.h" #include -#include -#include -#include -#include + +#include +#include +#include + #include "ldbm.h" #include "../slap.h" @@ -26,7 +27,7 @@ main( argc, argv ) char *file, *s; int printid = 1; -#ifdef LDBM_USE_DB2 +#ifdef HAVE_BERKELEY_DB2 DBC *cursorp; #endif @@ -48,7 +49,7 @@ main( argc, argv ) last.dptr = NULL; -#ifdef LDBM_USE_DB2 +#ifdef HAVE_BERKELEY_DB2 for ( key = ldbm_firstkey( dbp, &cursorp ); key.dptr != NULL; key = ldbm_nextkey( dbp, last, cursorp ) ) #else diff --git a/servers/slapd/tools/ldbmtest.c b/servers/slapd/tools/ldbmtest.c index fd2f1a0059..5be56d64f6 100644 --- a/servers/slapd/tools/ldbmtest.c +++ b/servers/slapd/tools/ldbmtest.c @@ -1,17 +1,22 @@ #include "portable.h" #include -#include #include -#include -#include -#include -#include +#include + +#include +#include +#include +#include +#include + #include -#include #include #include -#include + +#ifdef HAVE_FCNTL_H +#include +#endif #include "ldapconfig.h" #include "../slap.h" @@ -66,7 +71,7 @@ main( argc, argv ) int i; extern char *optarg; -#ifdef LDBM_USE_DB2 +#ifdef HAVE_BERKELEY_DB2 DBC *cursorp; #endif @@ -157,7 +162,7 @@ main( argc, argv ) } savekey.dptr = NULL; -#ifdef LDBM_USE_DB2 +#ifdef HAVE_BERKELEY_DB2 for ( key = ldbm_firstkey( dbc->dbc_db, &cursorp ); key.dptr != NULL; key = ldbm_nextkey( dbc->dbc_db, key, cursorp ) ) @@ -327,7 +332,7 @@ main( argc, argv ) last.dptr = NULL; -#ifdef LDBM_USE_DB2 +#ifdef HAVE_BERKELEY_DB2 for ( key = ldbm_firstkey( dbp, &cursorp ); key.dptr != NULL; key = ldbm_nextkey( dbp, last, cursorp ) ) @@ -520,10 +525,12 @@ edit_entry( c, data ) int fd, pid; char tmpname[20]; FILE *fp; +#ifndef HAVE_WAITPID WAITSTATUSTYPE status; +#endif strcpy( tmpname, "/tmp/dbtestXXXXXX" ); -#ifdef ultrix +#ifndef HAVE_MKSTEMP if ( (fd = open( mktemp( tmpname ), O_RDWR, 0600 )) == -1 ) { perror( tmpname ); return; @@ -557,8 +564,8 @@ edit_entry( c, data ) fclose( fp ); -#ifdef USE_WAITPID - if ( waitpid( (pid_t) -1, 0, WAIT_FLAGS ) < 0 ) { +#ifdef HAVE_WAITPID + if ( waitpid( (pid_t) -1, NULL, WAIT_FLAGS ) < 0 ) { #else if ( wait3( &status, WAIT_FLAGS, 0 ) < 0 ) { #endif diff --git a/servers/slapd/tools/ldif.c b/servers/slapd/tools/ldif.c index adcb4b8534..6f68b77d72 100644 --- a/servers/slapd/tools/ldif.c +++ b/servers/slapd/tools/ldif.c @@ -1,10 +1,10 @@ #include "portable.h" #include -#include -#include -#include -#include + +#include +#include + #include "lber.h" #include "ldap.h" #include "ldif.h" diff --git a/servers/slapd/tools/ldif2id2children.c b/servers/slapd/tools/ldif2id2children.c index 795a26f151..67be503f64 100644 --- a/servers/slapd/tools/ldif2id2children.c +++ b/servers/slapd/tools/ldif2id2children.c @@ -1,9 +1,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "../slap.h" #include "../back-ldbm/back-ldbm.h" diff --git a/servers/slapd/tools/ldif2id2entry.c b/servers/slapd/tools/ldif2id2entry.c index 057b085307..de32fc9d53 100644 --- a/servers/slapd/tools/ldif2id2entry.c +++ b/servers/slapd/tools/ldif2id2entry.c @@ -1,9 +1,10 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include "../slap.h" #include "../back-ldbm/back-ldbm.h" diff --git a/servers/slapd/tools/ldif2ldbm.c b/servers/slapd/tools/ldif2ldbm.c index 01021b6840..d1da293c09 100644 --- a/servers/slapd/tools/ldif2ldbm.c +++ b/servers/slapd/tools/ldif2ldbm.c @@ -1,10 +1,12 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include + #include + #include "../slap.h" #include "../back-ldbm/back-ldbm.h" #include "ldapconfig.h" From 71b34373b7ee42dcff81f0538934dd30e76c9d9a Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 22 Oct 1998 01:45:30 +0000 Subject: [PATCH 127/148] Moved strdup/tempnam to liblutil --- configure | 360 ++++++++--------- configure.in | 13 +- include/lthread.h | 211 +++++----- libraries/liblthread/thread.c | 361 ++++++++---------- libraries/liblutil/Makefile.in | 2 +- .../slapd => libraries/liblutil}/strdup.c | 2 +- .../slapd => libraries/liblutil}/tempnam.c | 0 servers/slapd/Makefile.in | 4 +- servers/slapd/tools/Makefile.in | 4 +- 9 files changed, 456 insertions(+), 501 deletions(-) rename {servers/slapd => libraries/liblutil}/strdup.c (89%) rename {servers/slapd => libraries/liblutil}/tempnam.c (100%) diff --git a/configure b/configure index fb40b92de9..1a8c4fe359 100755 --- a/configure +++ b/configure @@ -2701,7 +2701,7 @@ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lpthread if test $with_preemptive = auto ; then +LIBS="-lpthread if test $ol_with_preemptive = auto ; then ol_with_preemptive=yes fi -lmach -lexc -lc $LIBS" @@ -3150,6 +3150,10 @@ EOF EOF LTHREAD_LIBS="$LTHREAD_LIBS -llwp" + + if test $ol_with_preemptive = auto ; then + ol_with_preemptive=yes + fi fi fi @@ -3157,17 +3161,17 @@ EOF do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3161: checking for $ac_hdr" >&5 +echo "configure:3165: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3195,7 +3199,7 @@ done if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6 -echo "configure:3199: checking for lwp_create in -llwp" >&5 +echo "configure:3203: checking for lwp_create in -llwp" >&5 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3203,7 +3207,7 @@ else ac_save_LIBS="$LIBS" LIBS="-llwp $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3243,8 +3247,8 @@ EOF LTHREAD_LIBS="$LTHREAD_LIBS -llwp" - if test $with_preemptive = auto ; then - with_preemptive=yes + if test $ol_with_preemptive = auto ; then + ol_with_preemptive=no fi fi fi @@ -3266,17 +3270,17 @@ if test $ol_with_threads = manual ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3270: checking for $ac_hdr" >&5 +echo "configure:3274: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3280: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3305,12 +3309,12 @@ done for ac_func in sched_yield pthread_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3309: checking for $ac_func" >&5 +echo "configure:3313: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3359,7 +3363,7 @@ done echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 -echo "configure:3363: checking for LinuxThreads" >&5 +echo "configure:3367: checking for LinuxThreads" >&5 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3380,17 +3384,17 @@ echo "$ac_t""$ol_cv_linux_threads" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3384: checking for $ac_hdr" >&5 +echo "configure:3388: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3420,17 +3424,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3424: checking for $ac_hdr" >&5 +echo "configure:3428: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3460,17 +3464,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3464: checking for $ac_hdr" >&5 +echo "configure:3468: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3518,13 +3522,13 @@ fi ol_link_ldbm=no if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then echo $ac_n "checking for DB2 library""... $ac_c" 1>&6 -echo "configure:3522: checking for DB2 library" >&5 +echo "configure:3526: checking for DB2 library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6 -echo "configure:3528: checking for db_open in -ldb" >&5 +echo "configure:3532: checking for db_open in -ldb" >&5 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3532,7 +3536,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3574,17 +3578,17 @@ for ac_hdr in db.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3578: checking for $ac_hdr" >&5 +echo "configure:3582: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3612,13 +3616,13 @@ done if test $ac_cv_header_db_h = yes ; then echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6 -echo "configure:3616: checking if db.h is DB2" >&5 +echo "configure:3620: checking if db.h is DB2" >&5 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3650,7 +3654,7 @@ fi echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6 -echo "configure:3654: checking for Berkeley DB2" >&5 +echo "configure:3658: checking for Berkeley DB2" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3696,18 +3700,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6 -echo "configure:3700: checking for Berkeley DB library" >&5 +echo "configure:3704: checking for Berkeley DB library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:3706: checking for dbopen" >&5 +echo "configure:3710: checking for dbopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -3749,7 +3753,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:3753: checking for dbopen in -ldb" >&5 +echo "configure:3757: checking for dbopen in -ldb" >&5 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3757,7 +3761,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3803,17 +3807,17 @@ for ac_hdr in db_185.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3807: checking for $ac_hdr" >&5 +echo "configure:3811: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3849,7 +3853,7 @@ fi echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6 -echo "configure:3853: checking for Berkeley DB" >&5 +echo "configure:3857: checking for Berkeley DB" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3902,17 +3906,17 @@ if test $ol_with_ldbm_api = manual ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3906: checking for $ac_hdr" >&5 +echo "configure:3910: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3947,18 +3951,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then echo $ac_n "checking for GDBM library""... $ac_c" 1>&6 -echo "configure:3951: checking for GDBM library" >&5 +echo "configure:3955: checking for GDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6 -echo "configure:3957: checking for gdbm_open" >&5 +echo "configure:3961: checking for gdbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gdbm_open=yes" else @@ -4000,7 +4004,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:4004: checking for gdbm_open in -lgdbm" >&5 +echo "configure:4008: checking for gdbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4008,7 +4012,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4054,17 +4058,17 @@ echo "$ac_t""$ol_cv_lib_gdbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4058: checking for $ac_hdr" >&5 +echo "configure:4062: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4072: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4091,7 +4095,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:4095: checking for db" >&5 +echo "configure:4099: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4125,18 +4129,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = ndbm ; then echo $ac_n "checking for NDBM library""... $ac_c" 1>&6 -echo "configure:4129: checking for NDBM library" >&5 +echo "configure:4133: checking for NDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:4135: checking for dbm_open" >&5 +echo "configure:4139: checking for dbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -4178,7 +4182,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6 -echo "configure:4182: checking for dbm_open in -lndbm" >&5 +echo "configure:4186: checking for dbm_open in -lndbm" >&5 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4186,7 +4190,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lndbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4217,7 +4221,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:4221: checking for dbm_open in -ldbm" >&5 +echo "configure:4225: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4225,7 +4229,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4273,17 +4277,17 @@ echo "$ac_t""$ol_cv_lib_ndbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4277: checking for $ac_hdr" >&5 +echo "configure:4281: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4310,7 +4314,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:4314: checking for db" >&5 +echo "configure:4318: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4358,7 +4362,7 @@ fi if test $ol_enable_wrappers = yes ; then echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6 -echo "configure:4362: checking for hosts_access in -lwrap" >&5 +echo "configure:4366: checking for hosts_access in -lwrap" >&5 ac_lib_var=`echo wrap'_'hosts_access | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4366,7 +4370,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lwrap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4423,17 +4427,17 @@ for ac_hdr in termcap.h ncurses.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4427: checking for $ac_hdr" >&5 +echo "configure:4431: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4437: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4441: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4462,7 +4466,7 @@ done if test $ol_link_termcap = no ; then echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6 -echo "configure:4466: checking for tputs in -ltermcap" >&5 +echo "configure:4470: checking for tputs in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4470,7 +4474,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4514,7 +4518,7 @@ fi if test $ol_link_termcap = no ; then echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 -echo "configure:4518: checking for initscr in -lncurses" >&5 +echo "configure:4522: checking for initscr in -lncurses" >&5 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4522,7 +4526,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4575,12 +4579,12 @@ fi # FreeBSD (and others) have crypt(3) in -lcrypt if test $ol_enable_crypt != no ; then echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:4579: checking for crypt" >&5 +echo "configure:4583: checking for crypt" >&5 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -4622,7 +4626,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:4626: checking for crypt in -lcrypt" >&5 +echo "configure:4630: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4630,7 +4634,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4683,12 +4687,12 @@ EOF fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:4687: checking for ANSI C header files" >&5 +echo "configure:4691: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4696,7 +4700,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4704: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4713,7 +4717,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -4731,7 +4735,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -4752,7 +4756,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -4763,7 +4767,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:4767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -4791,12 +4795,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:4795: checking for $ac_hdr that defines DIR" >&5 +echo "configure:4799: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -4804,7 +4808,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:4808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -4829,7 +4833,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:4833: checking for opendir in -ldir" >&5 +echo "configure:4837: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4837,7 +4841,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4870,7 +4874,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:4874: checking for opendir in -lx" >&5 +echo "configure:4878: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4878,7 +4882,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4912,12 +4916,12 @@ fi fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:4916: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:4920: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4933,7 +4937,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:4937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -4977,17 +4981,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4981: checking for $ac_hdr" >&5 +echo "configure:4985: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4995: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5015,12 +5019,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5019: checking for uid_t in sys/types.h" >&5 +echo "configure:5023: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -5049,7 +5053,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:5053: checking type of array argument to getgroups" >&5 +echo "configure:5057: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5057,7 +5061,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -5096,7 +5100,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -5120,12 +5124,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:5124: checking for mode_t" >&5 +echo "configure:5128: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5153,12 +5157,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:5157: checking for off_t" >&5 +echo "configure:5161: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5186,12 +5190,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:5190: checking for pid_t" >&5 +echo "configure:5194: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5219,12 +5223,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:5223: checking return type of signal handlers" >&5 +echo "configure:5227: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5241,7 +5245,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:5245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -5260,12 +5264,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:5264: checking for size_t" >&5 +echo "configure:5268: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5293,12 +5297,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5297: checking for uid_t in sys/types.h" >&5 +echo "configure:5301: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -5327,12 +5331,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:5331: checking for st_blksize in struct stat" >&5 +echo "configure:5335: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5340,7 +5344,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:5344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -5361,12 +5365,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:5365: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:5369: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5375,7 +5379,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:5379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -5396,12 +5400,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:5400: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:5404: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5409,7 +5413,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:5413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -5432,7 +5436,7 @@ fi echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6 -echo "configure:5436: checking if toupper() requires islower()" >&5 +echo "configure:5440: checking if toupper() requires islower()" >&5 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5441,7 +5445,7 @@ else ol_cv_c_upper_lower=safe else cat > conftest.$ac_ext < @@ -5453,7 +5457,7 @@ main() exit(1); } EOF -if { (eval echo configure:5457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ol_cv_c_upper_lower=no else @@ -5476,12 +5480,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:5480: checking for working const" >&5 +echo "configure:5484: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -5553,7 +5557,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:5557: checking for 8-bit clean memcmp" >&5 +echo "configure:5561: 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 @@ -5561,7 +5565,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -5589,12 +5593,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:5593: checking for strftime" >&5 +echo "configure:5597: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -5639,7 +5643,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:5643: checking for strftime in -lintl" >&5 +echo "configure:5647: 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 @@ -5647,7 +5651,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5685,12 +5689,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:5689: checking for vprintf" >&5 +echo "configure:5693: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -5737,12 +5741,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:5741: checking for _doprnt" >&5 +echo "configure:5745: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -5790,7 +5794,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:5794: checking for wait3 that fills in rusage" >&5 +echo "configure:5798: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5798,7 +5802,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -5829,7 +5833,7 @@ main() { } } EOF -if { (eval echo configure:5833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -5882,12 +5886,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5886: checking for $ac_func" >&5 +echo "configure:5890: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5938,12 +5942,12 @@ done for ac_func in getopt strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5942: checking for $ac_func" >&5 +echo "configure:5946: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5996,13 +6000,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:6000: checking declaration of sys_errlist" >&5 +echo "configure:6004: 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 < @@ -6012,7 +6016,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:6016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -6033,20 +6037,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:6037: checking existence of sys_errlist" >&5 +echo "configure:6041: 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 < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:6050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index b93b64f0a1..9f14034f8c 100644 --- a/configure.in +++ b/configure.in @@ -338,7 +338,7 @@ if test $ol_with_threads = auto -o $ol_with_threads = posix ; then AC_DEFINE(HAVE_DCE) ol_link_threads=posix LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc"],, - if test $with_preemptive = auto ; then + if test $ol_with_preemptive = auto ; then ol_with_preemptive=yes fi [-lmach -lexc -lc]) @@ -462,6 +462,10 @@ if test $ol_with_threads = auto -o $ol_with_threads = lwp ; then AC_DEFINE(HAVE_LWP) AC_DEFINE(HAVE_LWP_THR) LTHREAD_LIBS="$LTHREAD_LIBS -llwp" + + if test $ol_with_preemptive = auto ; then + ol_with_preemptive=yes + fi fi fi @@ -474,8 +478,8 @@ if test $ol_with_threads = auto -o $ol_with_threads = lwp ; then AC_DEFINE(HAVE_LWP) LTHREAD_LIBS="$LTHREAD_LIBS -llwp" - if test $with_preemptive = auto ; then - with_preemptive=yes + if test $ol_with_preemptive = auto ; then + ol_with_preemptive=no fi fi fi @@ -756,10 +760,11 @@ AC_CHECK_FUNCS( \ strtol \ strtoul \ sysconf \ + tempnam \ waitpid \ ) -AC_REPLACE_FUNCS(getopt strdup) +AC_REPLACE_FUNCS(getopt strdup tempnam) dnl ---------------------------------------------------------------- # Check Configuration diff --git a/include/lthread.h b/include/lthread.h index de2dd3497f..3e611313f2 100644 --- a/include/lthread.h +++ b/include/lthread.h @@ -5,14 +5,50 @@ #include "portable.h" +#if defined( HAVE_PTHREADS ) +/********************************** + * * + * definitions for POSIX Threads * + * * + **********************************/ + +#include +#ifdef HAVE_SCHED_H +#include +#endif + LDAP_BEGIN_DECL -#if defined ( THREAD_NEXT_CTHREADS ) +#if defined( HAVE_DCE ) +/* dce threads are preemptive */ -#define _THREAD +#define pthread_attr_init( a ) pthread_attr_create( a ) +#define pthread_attr_destroy( a ) pthread_attr_delete( a ) +#define pthread_attr_setdetachstate( a, b ) \ + pthread_attr_setdetach_np( a, b ) + +#elif !defined(HAVE_PTHREADS_D4) +#define pthread_mutexattr_default NULL +#define pthread_condattr_default NULL + +#ifdef HAVE_SCHED_YIELD +#define pthread_yield sched_yield +#endif +#endif + +LDAP_END_DECL + +#elif defined ( HAVE_MACH_CTHREADS ) +/********************************** + * * + * definitions for Mach CThreads * + * * + **********************************/ #include +LDAP_BEGIN_DECL + typedef cthread_fn_t VFP; typedef int pthread_attr_t; typedef cthread_t pthread_t; @@ -40,18 +76,65 @@ typedef struct mutex pthread_mutex_t; typedef int pthread_condattr_t; typedef struct condition pthread_cond_t; -#elif defined( THREAD_SUNOS4_LWP ) -/*********************************** - * * - * thread definitions for sunos4 * - * * - ***********************************/ +LDAP_END_DECL -#define _THREAD +#elif defined( HAVE_LWP_THR ) +/************************************** + * * + * thread definitions for Solaris LWP * + * * + **************************************/ + +#include +#include + +LDAP_BEGIN_DECL + +typedef void *(*VFP)(); + +/* default attr states */ +#define pthread_mutexattr_default NULL +#define pthread_condattr_default NULL + +/* thread state - joinable or not */ +#define PTHREAD_CREATE_JOINABLE 0 +#define PTHREAD_CREATE_DETACHED THR_DETACHED +/* thread scope - who is in scheduling pool */ +#define PTHREAD_SCOPE_PROCESS 0 +#define PTHREAD_SCOPE_SYSTEM THR_BOUND +/* mutex and condition variable scope - process or system */ +#define PTHREAD_SHARE_PRIVATE USYNC_THREAD +#define PTHREAD_SHARE_PROCESS USYNC_PROCESS + + +#if !defined(__SunOS_5_6) +/* thread attributes and thread type */ +typedef int pthread_attr_t; +typedef thread_t pthread_t; + +/* mutex attributes and mutex type */ +typedef int pthread_mutexattr_t; +typedef mutex_t pthread_mutex_t; + +/* condition variable attributes and condition variable type */ +typedef int pthread_condattr_t; +typedef cond_t pthread_cond_t; +#endif /* ! sunos56 */ + +LDAP_END_DECL + +#elif defined( HAVE_LWP ) +/************************************* + * * + * thread definitions for SunOS LWP * + * * + *************************************/ #include #include +LDAP_BEGIN_DECL + typedef void *(*VFP)(); /* thread attributes and thread type */ @@ -84,110 +167,9 @@ typedef struct lwpcv { cv_t lcv_cv; } pthread_cond_t; -#else /* end sunos4 */ +LDAP_END_DECL -#if defined( THREAD_SUNOS5_LWP ) -/*********************************** - * * - * thread definitions for sunos5 * - * * - ***********************************/ - -#define _THREAD - -#include -#include - -typedef void *(*VFP)(); - -/* sunos5 threads are preemptive */ -#define PTHREAD_PREEMPTIVE 1 - -#if !defined(__SunOS_5_6) -/* thread attributes and thread type */ -typedef int pthread_attr_t; -typedef thread_t pthread_t; -#endif /* ! sunos56 */ - -/* default attr states */ -#define pthread_mutexattr_default NULL -#define pthread_condattr_default NULL - -/* thread state - joinable or not */ -#define PTHREAD_CREATE_JOINABLE 0 -#define PTHREAD_CREATE_DETACHED THR_DETACHED -/* thread scope - who is in scheduling pool */ -#define PTHREAD_SCOPE_PROCESS 0 -#define PTHREAD_SCOPE_SYSTEM THR_BOUND - -#if !defined(__SunOS_5_6) -/* mutex attributes and mutex type */ -typedef int pthread_mutexattr_t; -typedef mutex_t pthread_mutex_t; -#endif /* ! sunos56 */ - -/* mutex and condition variable scope - process or system */ -#define PTHREAD_SHARE_PRIVATE USYNC_THREAD -#define PTHREAD_SHARE_PROCESS USYNC_PROCESS - -#if !defined(__SunOS_5_6) -/* condition variable attributes and condition variable type */ -typedef int pthread_condattr_t; -typedef cond_t pthread_cond_t; -#endif /* ! sunos56 */ - -#else /* end sunos5 */ - -#if defined( THREAD_MIT_PTHREADS ) -/*********************************** - * * - * definitions for mit pthreads * - * * - ***********************************/ - -#define _THREAD - -#include - -#else /* end mit pthreads */ - -#if defined( THREAD_DCE_PTHREADS ) -/*********************************** - * * - * definitions for mit pthreads * - * * - ***********************************/ - -#define _THREAD - -#include - -/* dce threads are preemptive */ -#define PTHREAD_PREEMPTIVE 1 - -#define pthread_attr_init( a ) pthread_attr_create( a ) -#define pthread_attr_destroy( a ) pthread_attr_delete( a ) -#define pthread_attr_setdetachstate( a, b ) \ - pthread_attr_setdetach_np( a, b ) - -#else /* end dce pthreads */ - -#if defined( POSIX_THREADS ) - -#define _THREAD - -#include - -#define pthread_mutexattr_default NULL -#define pthread_condattr_default NULL - -#endif /* posix threads */ -#endif /* dce pthreads */ -#endif /* mit pthreads */ -#endif /* sunos5 */ -#endif /* sunos4 */ - -#ifndef _THREAD +#else /*********************************** * * @@ -196,6 +178,8 @@ typedef cond_t pthread_cond_t; * * ***********************************/ +LDAP_BEGIN_DECL + typedef void *(*VFP)(); /* thread attributes and thread type */ @@ -225,8 +209,7 @@ typedef int pthread_mutex_t; typedef int pthread_condattr_t; typedef int pthread_cond_t; -#endif /* no threads support */ - LDAP_END_DECL +#endif /* no threads support */ #endif /* _LTHREAD_H */ diff --git a/libraries/liblthread/thread.c b/libraries/liblthread/thread.c index 8e4e4995be..0e7ebdd305 100644 --- a/libraries/liblthread/thread.c +++ b/libraries/liblthread/thread.c @@ -1,11 +1,28 @@ /* thread.c - glue routines to provide a consistent thread interface */ -#define DISABLE_BRIDGE #include "portable.h" #include -#if defined( THREAD_NEXT_CTHREADS ) +#if defined( HAVE_PTHREADS ) + +#ifdef HAVE_DCE +/*********************************************************************** + * * + * pthreads package with DCE - no mapping to do (except to create a * + * pthread_kill() routine) * + * * + ***********************************************************************/ + +/* ARGSUSED */ +void +pthread_kill( pthread_t tid, int sig ) +{ + kill( getpid(), sig ); +} +#endif /* DCE */ + +#elif defined( HAVE_MACH_CTHREADS ) /*********************************************************************** * * @@ -155,13 +172,150 @@ pthread_cond_broadcast( pthread_cond_t *cv ) return( 0 ); } -#elif defined( THREAD_SUNOS4_LWP ) +#elif defined( HAVE_LWP_THR ) -/*********************************************************************** - * * - * under sunos 4 - use the built in non-preemptive lwp threads package * - * * - ***********************************************************************/ +/******************* + * * + * Solaris Threads * + * * + *******************/ + +#if !defined(__SunOS_5_6) +int +pthread_attr_init( pthread_attr_t *attr ) +{ + *attr = 0; + return( 0 ); +} + +int +pthread_attr_destroy( pthread_attr_t *attr ) +{ + *attr = 0; + return( 0 ); +} + +int +pthread_attr_getdetachstate( pthread_attr_t *attr, int *detachstate ) +{ + *detachstate = *attr; + return( 0 ); +} + +int +pthread_attr_setdetachstate( pthread_attr_t *attr, int detachstate ) +{ + *attr = detachstate; + return( 0 ); +} + +/* ARGSUSED */ +int +pthread_create( + pthread_t *tid, + pthread_attr_t *attr, + VFP func, + void *arg +) +{ + return( thr_create( NULL, 0, func, arg, *attr, tid ) ); +} +#endif /* ! sunos56 */ + +void +pthread_yield() +{ + thr_yield(); +} + +#if !defined(__SunOS_5_6) +void +pthread_exit() +{ + thr_exit( NULL ); +} + +void +pthread_join( pthread_t tid, int *status ) +{ + thr_join( tid, NULL, (void **) status ); +} + +void +pthread_kill( pthread_t tid, int sig ) +{ + thr_kill( tid, sig ); +} + +/* ARGSUSED */ +int +pthread_mutex_init( pthread_mutex_t *mp, pthread_mutexattr_t *attr ) +{ + return( mutex_init( mp, attr ? *attr : USYNC_THREAD, NULL ) ); +} + +int +pthread_mutex_destroy( pthread_mutex_t *mp ) +{ + return( mutex_destroy( mp ) ); +} + +int +pthread_mutex_lock( pthread_mutex_t *mp ) +{ + return( mutex_lock( mp ) ); +} + +int +pthread_mutex_unlock( pthread_mutex_t *mp ) +{ + return( mutex_unlock( mp ) ); +} + +int +pthread_mutex_trylock( pthread_mutex_t *mp ) +{ + return( mutex_trylock( mp ) ); +} + +int +pthread_cond_init( pthread_cond_t *cv, pthread_condattr_t *attr ) +{ + return( cond_init( cv, attr ? *attr : USYNC_THREAD, NULL ) ); +} + +int +pthread_cond_destroy( pthread_cond_t *cv ) +{ + return( cond_destroy( cv ) ); +} + +int +pthread_cond_wait( pthread_cond_t *cv, pthread_mutex_t *mp ) +{ + return( cond_wait( cv, mp ) ); +} + +int +pthread_cond_signal( pthread_cond_t *cv ) +{ + return( cond_signal( cv ) ); +} + +int +pthread_cond_broadcast( pthread_cond_t *cv ) +{ + return( cond_broadcast( cv ) ); +} +#endif /* ! sunos56 */ + +#elif defined( HAVE_LWP ) + +/************* + * * + * SunOS LWP * + * * + *************/ extern stkalign_t *get_stack(); static void lwp_create_stack(); @@ -321,200 +475,9 @@ pthread_cond_broadcast( pthread_cond_t *cv ) return( cv->lcv_created ? cv_broadcast( cv->lcv_cv ) : 0 ); } -#else /* end sunos4 */ - -# if defined( THREAD_SUNOS5_LWP ) - -/*********************************************************************** - * * - * under sunos 5 - use the built in preemptive solaris threads package * - * * - ***********************************************************************/ - -#if !defined(__SunOS_5_6) -int -pthread_attr_init( pthread_attr_t *attr ) -{ - *attr = 0; - return( 0 ); -} - -int -pthread_attr_destroy( pthread_attr_t *attr ) -{ - *attr = 0; - return( 0 ); -} - -int -pthread_attr_getdetachstate( pthread_attr_t *attr, int *detachstate ) -{ - *detachstate = *attr; - return( 0 ); -} - -int -pthread_attr_setdetachstate( pthread_attr_t *attr, int detachstate ) -{ - *attr = detachstate; - return( 0 ); -} - -/* ARGSUSED */ -int -pthread_create( - pthread_t *tid, - pthread_attr_t *attr, - VFP func, - void *arg -) -{ - return( thr_create( NULL, 0, func, arg, *attr, tid ) ); -} -#endif /* ! sunos56 */ - -void -pthread_yield() -{ - thr_yield(); -} - -#if !defined(__SunOS_5_6) -void -pthread_exit() -{ - thr_exit( NULL ); -} - -void -pthread_join( pthread_t tid, int *status ) -{ - thr_join( tid, NULL, (void **) status ); -} - -void -pthread_kill( pthread_t tid, int sig ) -{ - thr_kill( tid, sig ); -} - -/* ARGSUSED */ -int -pthread_mutex_init( pthread_mutex_t *mp, pthread_mutexattr_t *attr ) -{ - return( mutex_init( mp, attr ? *attr : USYNC_THREAD, NULL ) ); -} - -int -pthread_mutex_destroy( pthread_mutex_t *mp ) -{ - return( mutex_destroy( mp ) ); -} - -int -pthread_mutex_lock( pthread_mutex_t *mp ) -{ - return( mutex_lock( mp ) ); -} - -int -pthread_mutex_unlock( pthread_mutex_t *mp ) -{ - return( mutex_unlock( mp ) ); -} - -int -pthread_mutex_trylock( pthread_mutex_t *mp ) -{ - return( mutex_trylock( mp ) ); -} - -int -pthread_cond_init( pthread_cond_t *cv, pthread_condattr_t *attr ) -{ - return( cond_init( cv, attr ? *attr : USYNC_THREAD, NULL ) ); -} - -int -pthread_cond_destroy( pthread_cond_t *cv ) -{ - return( cond_destroy( cv ) ); -} - -int -pthread_cond_wait( pthread_cond_t *cv, pthread_mutex_t *mp ) -{ - return( cond_wait( cv, mp ) ); -} - -int -pthread_cond_signal( pthread_cond_t *cv ) -{ - return( cond_signal( cv ) ); -} - -int -pthread_cond_broadcast( pthread_cond_t *cv ) -{ - return( cond_broadcast( cv ) ); -} -#endif /* ! sunos56 */ - - -#else /* end sunos5 threads */ - -#if defined( THREAD_MIT_PTHREADS ) - -/*********************************************************************** - * * - * pthreads package by Chris Provenzano of MIT - provides all the * - * pthreads calls already, so no mapping to do * - * * - ***********************************************************************/ - -#else /* end mit pthreads */ - -#if defined( THREAD_DCE_PTHREADS ) - -/*********************************************************************** - * * - * pthreads package with DCE - no mapping to do (except to create a * - * pthread_kill() routine) * - * * - ***********************************************************************/ - -/* ARGSUSED */ -void -pthread_kill( pthread_t tid, int sig ) -{ - kill( getpid(), sig ); -} #else -#if defined ( POSIX_THREADS ) - -#ifdef HAVE_SCHED_YIELD -#ifdef HAVE_SCHED_H -#include -#endif /* HAVE_SCHED_H */ - -/* POSIX Threads (final) does have a pthread_yield function */ -void pthread_yield( void ) -{ - sched_yield(); -} - -#endif /* HAVE_SCHED_YIELD */ - -#endif /* posix threads */ -#endif /* dce pthreads */ -#endif /* mit pthreads */ -#endif /* sunos5 lwp */ -#endif /* sunos4 lwp */ - -#ifndef _THREAD - /*********************************************************************** * * * no threads package defined for this system - fake ok returns from * diff --git a/libraries/liblutil/Makefile.in b/libraries/liblutil/Makefile.in index d5911abe54..9596b2af7b 100644 --- a/libraries/liblutil/Makefile.in +++ b/libraries/liblutil/Makefile.in @@ -4,7 +4,7 @@ LIBRARY = liblutil.a SRCS = base64.c md5.c sha1.c -OBJS = base64.o md5.o sha1.o +OBJS = base64.o md5.o sha1.o @LIBOBJS@ LDAP_INCDIR= ../../include LDAP_LIBDIR= ../../libraries diff --git a/servers/slapd/strdup.c b/libraries/liblutil/strdup.c similarity index 89% rename from servers/slapd/strdup.c rename to libraries/liblutil/strdup.c index d9c24e69cb..a7140dbd86 100644 --- a/servers/slapd/strdup.c +++ b/libraries/liblutil/strdup.c @@ -4,7 +4,7 @@ #include -char *strdup( char *s ) +char *strdup( const char *s ) { char *p; diff --git a/servers/slapd/tempnam.c b/libraries/liblutil/tempnam.c similarity index 100% rename from servers/slapd/tempnam.c rename to libraries/liblutil/tempnam.c diff --git a/servers/slapd/Makefile.in b/servers/slapd/Makefile.in index c75bf99eb1..eb685ff960 100644 --- a/servers/slapd/Makefile.in +++ b/servers/slapd/Makefile.in @@ -8,14 +8,14 @@ SRCS = main.c daemon.c connection.c search.c filter.c add.c charray.c \ dn.c compare.c modify.c delete.c modrdn.c ch_malloc.c \ value.c ava.c bind.c unbind.c abandon.c filterentry.c \ phonetic.c acl.c str2filter.c aclparse.c init.c \ - detach.c strdup.c tempnam.c repl.c lock.c \ + detach.c repl.c lock.c \ schema.c schemaparse.c monitor.c configinfo.c OBJS = main.o daemon.o connection.o search.o filter.o add.o charray.o \ attr.o entry.o config.o backend.o result.o operation.o \ dn.o compare.o modify.o delete.o modrdn.o ch_malloc.o \ value.o ava.o bind.o unbind.o abandon.o filterentry.o \ phonetic.o acl.o str2filter.o aclparse.o init.o \ - detach.o strdup.o tempnam.o repl.o lock.o \ + detach.o repl.o lock.o \ schema.o schemaparse.o monitor.o configinfo.o LDAP_INCDIR= ../../include diff --git a/servers/slapd/tools/Makefile.in b/servers/slapd/tools/Makefile.in index 7b76fb9346..67c8dcae7d 100644 --- a/servers/slapd/tools/Makefile.in +++ b/servers/slapd/tools/Makefile.in @@ -25,13 +25,13 @@ SRCS = centipede.c ldbmcat.c ldbmtest.c sizecount.c \ ldif.c ldif2id2children.c ldif2id2entry.c ldif2index.c ldif2ldbm.c EDB2LDIFSRCS = edb2ldif.c ldapsyntax.c -EDB2LDIFOBJS = edb2ldif.o ldapsyntax.o ../strdup.o +EDB2LDIFOBJS = edb2ldif.o ldapsyntax.o OBJS2 = ../config.o ../ch_malloc.o ../backend.o ../charray.o \ ../aclparse.o ../schema.o ../result.o ../filterentry.o \ ../acl.o ../phonetic.o ../attr.o ../value.o ../entry.o \ ../dn.o ../filter.o ../str2filter.o ../ava.o ../init.o \ - ../schemaparse.o ../strdup.o + ../schemaparse.o all-local: build-ldbm build-edb2ldif build-chlog2replog From 5b62482fac5183d5a137f7e99b23012df16d4793 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 22 Oct 1998 03:03:07 +0000 Subject: [PATCH 128/148] The world compiles and links.... Need to sort out remaining ifnames and run testsuite. --- acconfig.h | 6 +- clients/ud/auth.c | 6 +- clients/ud/edit.c | 8 +- clients/ud/find.c | 2 +- clients/ud/group.c | 5 +- clients/ud/help.c | 2 +- clients/ud/main.c | 12 +- clients/ud/mod.c | 11 +- clients/ud/print.c | 2 +- clients/ud/string_to_key.c | 26 +-- clients/ud/util.c | 10 +- configure | 359 +++++++++++++++++----------------- configure.in | 3 +- include/lthread.h | 6 +- include/portable.h.in | 9 +- libraries/libldap/bind.c | 6 +- libraries/libldap/cache.c | 33 +++- libraries/libldap/cldap.c | 8 +- libraries/libldap/compare.c | 4 +- libraries/libldap/getdn.c | 16 -- libraries/libldap/kbind.c | 8 +- libraries/libldap/ldap-int.h | 8 +- libraries/libldap/open.c | 6 +- libraries/libldap/os-ip.c | 4 +- libraries/libldap/request.c | 2 +- libraries/libldap/result.c | 4 +- libraries/libldap/sbind.c | 4 +- libraries/libldap/search.c | 4 +- libraries/libldap/test.c | 76 +++---- libraries/libldap/tmplout.c | 25 +-- libraries/libldap/unbind.c | 4 +- libraries/liblthread/thread.c | 2 +- servers/slurpd/admin.c | 3 +- servers/slurpd/args.c | 17 +- servers/slurpd/ch_malloc.c | 5 +- servers/slurpd/config.c | 30 ++- servers/slurpd/detach.c | 29 ++- servers/slurpd/fm.c | 19 +- servers/slurpd/globals.c | 10 +- servers/slurpd/ldap_op.c | 27 +-- servers/slurpd/lock.c | 24 +-- servers/slurpd/main.c | 43 ++-- servers/slurpd/re.c | 13 +- servers/slurpd/reject.c | 10 +- servers/slurpd/replica.c | 7 +- servers/slurpd/replog.c | 15 +- servers/slurpd/ri.c | 27 +-- servers/slurpd/rq.c | 4 - servers/slurpd/sanity.c | 12 +- servers/slurpd/slurp.h | 15 +- servers/slurpd/st.c | 6 +- servers/slurpd/tsleep.c | 7 +- 52 files changed, 461 insertions(+), 543 deletions(-) diff --git a/acconfig.h b/acconfig.h index ec41bf6bd8..9e495f99d7 100644 --- a/acconfig.h +++ b/acconfig.h @@ -35,9 +35,6 @@ /* define if you have Sun LWP (SunOS style) */ #undef HAVE_LWP -/* define if you have Sun LWP (Solaris style) */ -#undef HAVE_LWP_THR - /* define if you have -lncurses */ #undef HAVE_NCURSES @@ -62,6 +59,9 @@ /* define if you have -ltermcap */ #undef HAVE_TERMCAP +/* define if you have Sun LWP (Solaris style) */ +#undef HAVE_THR + /* define this for connectionless LDAP support */ #undef LDAP_CONNECTIONLESS diff --git a/clients/ud/auth.c b/clients/ud/auth.c index 0e48fa6b86..2f64d81c66 100644 --- a/clients/ud/auth.c +++ b/clients/ud/auth.c @@ -14,11 +14,11 @@ #include #include -#include -#include -#include +#include #include +#include +#include #include #include diff --git a/clients/ud/edit.c b/clients/ud/edit.c index d9458e0db2..01dc1e0417 100644 --- a/clients/ud/edit.c +++ b/clients/ud/edit.c @@ -14,8 +14,8 @@ #include #include -#include +#include #include #include #include @@ -172,16 +172,16 @@ static load_editor() } if ((pid = fork()) == 0) { /* child - edit the Directory entry */ - (void) signal(SIGINT, SIG_IGN); + (void) SIGNAL(SIGINT, SIG_IGN); (void) execlp(editor, editor, entry_temp_file, NULL); /*NOTREACHED*/ (void) fatal(editor); } else if (pid > 0) { /* parent - wait until the child proc is done editing */ - handler = signal(SIGINT, SIG_IGN); + handler = SIGNAL(SIGINT, SIG_IGN); (void) wait(&status); - (void) signal(SIGINT, handler); + (void) SIGNAL(SIGINT, handler); } else { fatal("fork"); diff --git a/clients/ud/find.c b/clients/ud/find.c index 960fa0f337..e7ad965c50 100644 --- a/clients/ud/find.c +++ b/clients/ud/find.c @@ -13,8 +13,8 @@ #include "portable.h" #include -#include +#include #include #include diff --git a/clients/ud/group.c b/clients/ud/group.c index c628e94083..5e3d2a0263 100644 --- a/clients/ud/group.c +++ b/clients/ud/group.c @@ -14,8 +14,9 @@ #include "portable.h" #include -#include -#include + +#include +#include #include #include diff --git a/clients/ud/help.c b/clients/ud/help.c index 381a8958b7..5905c74157 100644 --- a/clients/ud/help.c +++ b/clients/ud/help.c @@ -13,8 +13,8 @@ #include "portable.h" #include -#include +#include #include #include diff --git a/clients/ud/main.c b/clients/ud/main.c index a089742df2..53465fc602 100644 --- a/clients/ud/main.c +++ b/clients/ud/main.c @@ -20,10 +20,10 @@ #include #include -#include #include #include +#include #include #include #include @@ -657,7 +657,7 @@ initialize_client() lpp = DEFAULT_TTY_HEIGHT; col_size = DEFAULT_TTY_WIDTH; - (void) signal(SIGINT, attn); + (void) SIGNAL (SIGINT, attn); #ifndef NO_TERMCAP { @@ -682,7 +682,7 @@ initialize_client() col_size = DEFAULT_TTY_WIDTH; } } - (void) signal(SIGWINCH, chwinsz); + (void) SIGNAL (SIGWINCH, chwinsz); } #endif @@ -694,7 +694,7 @@ RETSIGTYPE attn() fflush(stdout); printf("\n\n INTERRUPTED!\n"); - (void) signal(SIGINT, attn); + (void) SIGNAL (SIGINT, attn); longjmp(env, 1); } @@ -704,7 +704,7 @@ RETSIGTYPE chwinsz() { struct winsize win; - (void) signal(SIGWINCH, SIG_IGN); + (void) SIGNAL (SIGWINCH, SIG_IGN); if (ioctl(fileno(stdout), TIOCGWINSZ, &win) != -1) { if (win.ws_row != 0) lpp = win.ws_row; @@ -712,6 +712,6 @@ RETSIGTYPE chwinsz() col_size = win.ws_col; } - (void) signal(SIGWINCH, chwinsz); + (void) SIGNAL (SIGWINCH, chwinsz); } #endif diff --git a/clients/ud/mod.c b/clients/ud/mod.c index 551941800d..a5e5369ca9 100644 --- a/clients/ud/mod.c +++ b/clients/ud/mod.c @@ -13,13 +13,10 @@ #include "portable.h" #include -#include -#include -#include -#ifndef __STDC__ -#include -#endif -#include + +#include +#include +#include #include #include diff --git a/clients/ud/print.c b/clients/ud/print.c index d6eb2bdeff..5b7cb87910 100644 --- a/clients/ud/print.c +++ b/clients/ud/print.c @@ -13,8 +13,8 @@ #include "portable.h" #include -#include +#include #include #include diff --git a/clients/ud/string_to_key.c b/clients/ud/string_to_key.c index cea78a7a6c..d886969e5e 100644 --- a/clients/ud/string_to_key.c +++ b/clients/ud/string_to_key.c @@ -1,6 +1,6 @@ #include "portable.h" -#if defined(KERBEROS) && !defined(openbsd) +#if defined(HAVE_KERBEROS) && !defined(openbsd) /* * $Source: /repo/OpenLDAP/pkg/ldap/clients/ud/string_to_key.c,v $ * $Author: kurt $ @@ -26,35 +26,19 @@ * spm 8/85 MIT project athena */ -#ifdef KERBEROS_V -#include -#include -#else -#include -#include -#endif /* KERBEROS_V */ - #include - -/* #include "des_internal.h" */ -#if 1 -#ifdef KERBEROS_V -#include -#else -#include -#endif /* KERBEROS_V */ -#endif /* 1 */ +#include extern int des_debug; extern int des_debug_print(); extern void des_fixup_key_parity(); -#ifndef AFSKERBEROS +#ifndef HAVE_AFS_KERBEROS #define WORLDPEACEINOURTIME #endif #if defined(WORLDPEACEINOURTIME) /* Use original, not ifs version */ -#ifndef KERBEROS_V +#ifndef HAVE_KERBEROS_V /* * convert an arbitrary length string to a DES key */ @@ -141,7 +125,7 @@ des_string_to_key(str,key) *((unsigned long *) key+1)); } -#endif /* KERBEROS_V */ +#endif /* HAVE_KERBEROS_V */ #else /* Use ifs version */ #if 0 diff --git a/clients/ud/util.c b/clients/ud/util.c index 32e686e390..458179799a 100644 --- a/clients/ud/util.c +++ b/clients/ud/util.c @@ -14,13 +14,13 @@ #include #include -#include -#include +#include +#include +#include #include #include #include -#include #include #include @@ -80,7 +80,7 @@ char *prompt; fi = stdin; else setbuf(fi, (char *)NULL); - sig = signal(SIGINT, SIG_IGN); + sig = SIGNAL (SIGINT, SIG_IGN); if (fi != stdin) { if (GETATTR(fileno(fi), &ttyb) < 0) perror("GETATTR"); @@ -134,7 +134,7 @@ char *prompt; if (SETATTR(fileno(fi), &ttyb) < 0) perror("SETATTR"); } - (void) signal(SIGINT, sig); + (void) SIGNAL (SIGINT, sig); if (fi != stdin) (void) fclose(fi); else diff --git a/configure b/configure index 1a8c4fe359..99e68c4afe 100755 --- a/configure +++ b/configure @@ -3142,11 +3142,7 @@ fi if test $have_lwp = yes ; then cat >> confdefs.h <<\EOF -#define HAVE_LWP 1 -EOF - - cat >> confdefs.h <<\EOF -#define HAVE_LWP_THR 1 +#define HAVE_THR 1 EOF LTHREAD_LIBS="$LTHREAD_LIBS -llwp" @@ -3161,17 +3157,17 @@ EOF do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3165: checking for $ac_hdr" >&5 +echo "configure:3161: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3199,7 +3195,7 @@ done if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6 -echo "configure:3203: checking for lwp_create in -llwp" >&5 +echo "configure:3199: checking for lwp_create in -llwp" >&5 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3207,7 +3203,7 @@ else ac_save_LIBS="$LIBS" LIBS="-llwp $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3270,17 +3266,17 @@ if test $ol_with_threads = manual ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3274: checking for $ac_hdr" >&5 +echo "configure:3270: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3280: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3309,12 +3305,12 @@ done for ac_func in sched_yield pthread_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3313: checking for $ac_func" >&5 +echo "configure:3309: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3363,7 +3359,7 @@ done echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 -echo "configure:3367: checking for LinuxThreads" >&5 +echo "configure:3363: checking for LinuxThreads" >&5 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3384,17 +3380,17 @@ echo "$ac_t""$ol_cv_linux_threads" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3388: checking for $ac_hdr" >&5 +echo "configure:3384: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3424,17 +3420,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3428: checking for $ac_hdr" >&5 +echo "configure:3424: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3464,17 +3460,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3468: checking for $ac_hdr" >&5 +echo "configure:3464: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3522,13 +3518,13 @@ fi ol_link_ldbm=no if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then echo $ac_n "checking for DB2 library""... $ac_c" 1>&6 -echo "configure:3526: checking for DB2 library" >&5 +echo "configure:3522: checking for DB2 library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6 -echo "configure:3532: checking for db_open in -ldb" >&5 +echo "configure:3528: checking for db_open in -ldb" >&5 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3536,7 +3532,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3578,17 +3574,17 @@ for ac_hdr in db.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3582: checking for $ac_hdr" >&5 +echo "configure:3578: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3616,13 +3612,13 @@ done if test $ac_cv_header_db_h = yes ; then echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6 -echo "configure:3620: checking if db.h is DB2" >&5 +echo "configure:3616: checking if db.h is DB2" >&5 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3654,7 +3650,7 @@ fi echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6 -echo "configure:3658: checking for Berkeley DB2" >&5 +echo "configure:3654: checking for Berkeley DB2" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3700,18 +3696,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6 -echo "configure:3704: checking for Berkeley DB library" >&5 +echo "configure:3700: checking for Berkeley DB library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:3710: checking for dbopen" >&5 +echo "configure:3706: checking for dbopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -3753,7 +3749,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:3757: checking for dbopen in -ldb" >&5 +echo "configure:3753: checking for dbopen in -ldb" >&5 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3761,7 +3757,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3807,17 +3803,17 @@ for ac_hdr in db_185.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3811: checking for $ac_hdr" >&5 +echo "configure:3807: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3853,7 +3849,7 @@ fi echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6 -echo "configure:3857: checking for Berkeley DB" >&5 +echo "configure:3853: checking for Berkeley DB" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3906,17 +3902,17 @@ if test $ol_with_ldbm_api = manual ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3910: checking for $ac_hdr" >&5 +echo "configure:3906: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3951,18 +3947,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then echo $ac_n "checking for GDBM library""... $ac_c" 1>&6 -echo "configure:3955: checking for GDBM library" >&5 +echo "configure:3951: checking for GDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6 -echo "configure:3961: checking for gdbm_open" >&5 +echo "configure:3957: checking for gdbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gdbm_open=yes" else @@ -4004,7 +4000,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:4008: checking for gdbm_open in -lgdbm" >&5 +echo "configure:4004: checking for gdbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4012,7 +4008,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4058,17 +4054,17 @@ echo "$ac_t""$ol_cv_lib_gdbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4062: checking for $ac_hdr" >&5 +echo "configure:4058: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4072: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4095,7 +4091,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:4099: checking for db" >&5 +echo "configure:4095: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4129,18 +4125,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = ndbm ; then echo $ac_n "checking for NDBM library""... $ac_c" 1>&6 -echo "configure:4133: checking for NDBM library" >&5 +echo "configure:4129: checking for NDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:4139: checking for dbm_open" >&5 +echo "configure:4135: checking for dbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -4182,7 +4178,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6 -echo "configure:4186: checking for dbm_open in -lndbm" >&5 +echo "configure:4182: checking for dbm_open in -lndbm" >&5 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4190,7 +4186,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lndbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4221,7 +4217,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:4225: checking for dbm_open in -ldbm" >&5 +echo "configure:4221: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4229,7 +4225,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4277,17 +4273,17 @@ echo "$ac_t""$ol_cv_lib_ndbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4281: checking for $ac_hdr" >&5 +echo "configure:4277: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4314,7 +4310,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:4318: checking for db" >&5 +echo "configure:4314: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4362,7 +4358,7 @@ fi if test $ol_enable_wrappers = yes ; then echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6 -echo "configure:4366: checking for hosts_access in -lwrap" >&5 +echo "configure:4362: checking for hosts_access in -lwrap" >&5 ac_lib_var=`echo wrap'_'hosts_access | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4370,7 +4366,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lwrap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4427,17 +4423,17 @@ for ac_hdr in termcap.h ncurses.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4431: checking for $ac_hdr" >&5 +echo "configure:4427: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4441: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4437: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4466,7 +4462,7 @@ done if test $ol_link_termcap = no ; then echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6 -echo "configure:4470: checking for tputs in -ltermcap" >&5 +echo "configure:4466: checking for tputs in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4474,7 +4470,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4518,7 +4514,7 @@ fi if test $ol_link_termcap = no ; then echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 -echo "configure:4522: checking for initscr in -lncurses" >&5 +echo "configure:4518: checking for initscr in -lncurses" >&5 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4526,7 +4522,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4579,12 +4575,12 @@ fi # FreeBSD (and others) have crypt(3) in -lcrypt if test $ol_enable_crypt != no ; then echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:4583: checking for crypt" >&5 +echo "configure:4579: checking for crypt" >&5 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -4626,7 +4622,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:4630: checking for crypt in -lcrypt" >&5 +echo "configure:4626: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4634,7 +4630,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4687,12 +4683,12 @@ EOF fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:4691: checking for ANSI C header files" >&5 +echo "configure:4687: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4700,7 +4696,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4704: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4717,7 +4713,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -4735,7 +4731,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -4756,7 +4752,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -4767,7 +4763,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:4771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -4795,12 +4791,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:4799: checking for $ac_hdr that defines DIR" >&5 +echo "configure:4795: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -4808,7 +4804,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:4812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -4833,7 +4829,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:4837: checking for opendir in -ldir" >&5 +echo "configure:4833: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4841,7 +4837,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4874,7 +4870,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:4878: checking for opendir in -lx" >&5 +echo "configure:4874: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4882,7 +4878,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4916,12 +4912,12 @@ fi fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:4920: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:4916: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4937,7 +4933,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:4941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -4981,17 +4977,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4985: checking for $ac_hdr" >&5 +echo "configure:4981: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4995: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5019,12 +5015,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5023: checking for uid_t in sys/types.h" >&5 +echo "configure:5019: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -5053,7 +5049,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:5057: checking type of array argument to getgroups" >&5 +echo "configure:5053: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5061,7 +5057,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -5100,7 +5096,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -5124,12 +5120,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:5128: checking for mode_t" >&5 +echo "configure:5124: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5157,12 +5153,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:5161: checking for off_t" >&5 +echo "configure:5157: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5190,12 +5186,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:5194: checking for pid_t" >&5 +echo "configure:5190: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5223,12 +5219,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:5227: checking return type of signal handlers" >&5 +echo "configure:5223: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5245,7 +5241,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:5249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -5264,12 +5260,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:5268: checking for size_t" >&5 +echo "configure:5264: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5297,12 +5293,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5301: checking for uid_t in sys/types.h" >&5 +echo "configure:5297: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -5331,12 +5327,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:5335: checking for st_blksize in struct stat" >&5 +echo "configure:5331: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5344,7 +5340,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:5348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -5365,12 +5361,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:5369: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:5365: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5379,7 +5375,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:5383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -5400,12 +5396,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:5404: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:5400: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5413,7 +5409,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:5417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -5436,7 +5432,7 @@ fi echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6 -echo "configure:5440: checking if toupper() requires islower()" >&5 +echo "configure:5436: checking if toupper() requires islower()" >&5 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5445,7 +5441,7 @@ else ol_cv_c_upper_lower=safe else cat > conftest.$ac_ext < @@ -5457,7 +5453,7 @@ main() exit(1); } EOF -if { (eval echo configure:5461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ol_cv_c_upper_lower=no else @@ -5480,12 +5476,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:5484: checking for working const" >&5 +echo "configure:5480: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -5557,7 +5553,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:5561: checking for 8-bit clean memcmp" >&5 +echo "configure:5557: 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 @@ -5565,7 +5561,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -5593,12 +5589,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:5597: checking for strftime" >&5 +echo "configure:5593: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -5643,7 +5639,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:5647: checking for strftime in -lintl" >&5 +echo "configure:5643: 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 @@ -5651,7 +5647,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5689,12 +5685,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:5693: checking for vprintf" >&5 +echo "configure:5689: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -5741,12 +5737,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:5745: checking for _doprnt" >&5 +echo "configure:5741: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -5794,7 +5790,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:5798: checking for wait3 that fills in rusage" >&5 +echo "configure:5794: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5802,7 +5798,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -5833,7 +5829,7 @@ main() { } } EOF -if { (eval echo configure:5837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -5882,16 +5878,17 @@ for ac_func in \ strtol \ strtoul \ sysconf \ + tempnam \ waitpid \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5890: checking for $ac_func" >&5 +echo "configure:5887: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5939,15 +5936,15 @@ fi done -for ac_func in getopt strdup +for ac_func in getopt strdup tempnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5946: checking for $ac_func" >&5 +echo "configure:5943: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6000,13 +5997,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:6004: checking declaration of sys_errlist" >&5 +echo "configure:6001: 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 < @@ -6016,7 +6013,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:6020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -6037,20 +6034,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:6041: checking existence of sys_errlist" >&5 +echo "configure:6038: 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 < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:6054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index 9f14034f8c..77052383f7 100644 --- a/configure.in +++ b/configure.in @@ -459,8 +459,7 @@ if test $ol_with_threads = auto -o $ol_with_threads = lwp ; then AC_CHECK_LIB(thread, thr_create, [have_lwp=yes], [have_lwp=no]) if test $have_lwp = yes ; then - AC_DEFINE(HAVE_LWP) - AC_DEFINE(HAVE_LWP_THR) + AC_DEFINE(HAVE_THR) LTHREAD_LIBS="$LTHREAD_LIBS -llwp" if test $ol_with_preemptive = auto ; then diff --git a/include/lthread.h b/include/lthread.h index 3e611313f2..b79498929d 100644 --- a/include/lthread.h +++ b/include/lthread.h @@ -78,7 +78,7 @@ typedef struct condition pthread_cond_t; LDAP_END_DECL -#elif defined( HAVE_LWP_THR ) +#elif defined( HAVE_THR ) /************************************** * * * thread definitions for Solaris LWP * @@ -178,6 +178,10 @@ LDAP_END_DECL * * ***********************************/ +#ifndef NO_THREADS +#define NO_THREADS 1 +#endif + LDAP_BEGIN_DECL typedef void *(*VFP)(); diff --git a/include/portable.h.in b/include/portable.h.in index 6dd9df1537..4ae6665892 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -134,9 +134,6 @@ is provided ``as is'' without express or implied warranty. /* define if you have Sun LWP (SunOS style) */ #undef HAVE_LWP -/* define if you have Sun LWP (Solaris style) */ -#undef HAVE_LWP_THR - /* define if you have -lncurses */ #undef HAVE_NCURSES @@ -161,6 +158,9 @@ is provided ``as is'' without express or implied warranty. /* define if you have -ltermcap */ #undef HAVE_TERMCAP +/* define if you have Sun LWP (Solaris style) */ +#undef HAVE_THR + /* define this for connectionless LDAP support */ #undef LDAP_CONNECTIONLESS @@ -308,6 +308,9 @@ is provided ``as is'' without express or implied warranty. /* Define if you have the sysconf function. */ #undef HAVE_SYSCONF +/* Define if you have the tempnam function. */ +#undef HAVE_TEMPNAM + /* Define if you have the waitpid function. */ #undef HAVE_WAITPID diff --git a/libraries/libldap/bind.c b/libraries/libldap/bind.c index be796f1920..aec1a3b568 100644 --- a/libraries/libldap/bind.c +++ b/libraries/libldap/bind.c @@ -45,7 +45,7 @@ ldap_bind( LDAP *ld, char *dn, char *passwd, int authmethod ) * name DistinguishedName, -- who * authentication CHOICE { * simple [0] OCTET STRING -- passwd -#ifdef KERBEROS +#ifdef HAVE_KERBEROS * krbv42ldap [1] OCTET STRING * krbv42dsa [2] OCTET STRING #endif @@ -60,7 +60,7 @@ ldap_bind( LDAP *ld, char *dn, char *passwd, int authmethod ) case LDAP_AUTH_SIMPLE: return( ldap_simple_bind( ld, dn, passwd ) ); -#ifdef KERBEROS +#ifdef HAVE_KERBEROS case LDAP_AUTH_KRBV41: return( ldap_kerberos_bind1( ld, dn ) ); @@ -97,7 +97,7 @@ ldap_bind_s( LDAP *ld, char *dn, char *passwd, int authmethod ) case LDAP_AUTH_SIMPLE: return( ldap_simple_bind_s( ld, dn, passwd ) ); -#ifdef KERBEROS +#ifdef HAVE_KERBEROS case LDAP_AUTH_KRBV4: return( ldap_kerberos_bind_s( ld, dn ) ); diff --git a/libraries/libldap/cache.c b/libraries/libldap/cache.c index f851f6bb09..8216461c1e 100644 --- a/libraries/libldap/cache.c +++ b/libraries/libldap/cache.c @@ -7,7 +7,6 @@ #include "portable.h" -#ifndef NO_CACHE #ifndef lint static char copyright[] = "@(#) Copyright (c) 1993 The Regents of the University of Michigan.\nAll rights reserved.\n"; @@ -24,6 +23,8 @@ static char copyright[] = "@(#) Copyright (c) 1993 The Regents of the University #include "ldap.h" #include "ldap-int.h" +#ifndef LDAP_NOCACHE + static int cache_hash LDAP_P(( BerElement *ber )); static LDAPMessage *msg_dup LDAP_P(( LDAPMessage *msg )); static int request_cmp LDAP_P(( BerElement *req1, BerElement *req2 )); @@ -32,9 +33,12 @@ static long msg_size LDAP_P(( LDAPMessage *msg )); static void check_cache_memused LDAP_P(( LDAPCache *lc )); static void uncache_entry_or_req LDAP_P(( LDAP *ld, char *dn, int msgid )); +#endif + int ldap_enable_cache( LDAP *ld, long timeout, long maxmem ) { +#ifndef LDAP_NOCACHE if ( ld->ld_cache == NULLLDCACHE ) { if (( ld->ld_cache = (LDAPCache *)malloc( sizeof( LDAPCache ))) == NULLLDCACHE ) { @@ -50,15 +54,20 @@ ldap_enable_cache( LDAP *ld, long timeout, long maxmem ) check_cache_memused( ld->ld_cache ); ld->ld_cache->lc_enabled = 1; return( 0 ); +#else + return( -1 ); +#endif } void ldap_disable_cache( LDAP *ld ) { +#ifndef LDAP_NOCACHE if ( ld->ld_cache != NULLLDCACHE ) { ld->ld_cache->lc_enabled = 0; } +#endif } @@ -66,26 +75,31 @@ ldap_disable_cache( LDAP *ld ) void ldap_set_cache_options( LDAP *ld, unsigned long opts ) { +#ifndef LDAP_NOCACHE if ( ld->ld_cache != NULLLDCACHE ) { ld->ld_cache->lc_options = opts; } +#endif } void ldap_destroy_cache( LDAP *ld ) { +#ifndef LDAP_NOCACHE if ( ld->ld_cache != NULLLDCACHE ) { ldap_flush_cache( ld ); free( (char *)ld->ld_cache ); ld->ld_cache = NULLLDCACHE; } +#endif } void ldap_flush_cache( LDAP *ld ) { +#ifndef LDAP_NOCACHE int i; LDAPMessage *m, *next; @@ -110,29 +124,36 @@ ldap_flush_cache( LDAP *ld ) } ld->ld_cache->lc_memused = sizeof( LDAPCache ); } +#endif } void ldap_uncache_request( LDAP *ld, int msgid ) { +#ifndef LDAP_NOCACHE Debug( LDAP_DEBUG_TRACE, "ldap_uncache_request %d ld_cache %lx\n", msgid, (long) ld->ld_cache, 0 ); uncache_entry_or_req( ld, NULL, msgid ); +#endif } void ldap_uncache_entry( LDAP *ld, char *dn ) { +#ifndef LDAP_NOCACHE Debug( LDAP_DEBUG_TRACE, "ldap_uncache_entry %s ld_cache %lx\n", dn, (long) ld->ld_cache, 0 ); uncache_entry_or_req( ld, dn, 0 ); +#endif } +#ifndef LDAP_NOCACHE + static void uncache_entry_or_req( LDAP *ld, char *dn, /* if non-NULL, uncache entry */ @@ -189,10 +210,12 @@ uncache_entry_or_req( LDAP *ld, } } +#endif void ldap_add_request_to_cache( LDAP *ld, unsigned long msgtype, BerElement *request ) { +#ifndef LDAP_NOCACHE LDAPMessage *new; long len; @@ -229,12 +252,14 @@ ldap_add_request_to_cache( LDAP *ld, unsigned long msgtype, BerElement *request } else { ld->ld_errno = LDAP_NO_MEMORY; } +#endif } void ldap_add_result_to_cache( LDAP *ld, LDAPMessage *result ) { +#ifndef LDAP_NOCACHE LDAPMessage *m, **mp, *req, *new, *prev; int err, keep; @@ -335,6 +360,7 @@ ldap_add_result_to_cache( LDAP *ld, LDAPMessage *result ) Debug( LDAP_DEBUG_TRACE, "artc: msgid not in request list\n", 0, 0, 0 ); } +#endif } @@ -348,6 +374,7 @@ ldap_add_result_to_cache( LDAP *ld, LDAPMessage *result ) int ldap_check_cache( LDAP *ld, unsigned long msgtype, BerElement *request ) { +#ifndef LDAP_NOCACHE LDAPMessage *m, *new, *prev, *next; BerElement reqber; int first, hash; @@ -421,8 +448,12 @@ ldap_check_cache( LDAP *ld, unsigned long msgtype, BerElement *request ) Debug( LDAP_DEBUG_TRACE, "cc: result returned from cache\n", 0, 0, 0 ); return( 0 ); +#else + return( -1 ); +#endif } +#ifndef LDAP_NOCACHE static int cache_hash( BerElement *ber ) diff --git a/libraries/libldap/cldap.c b/libraries/libldap/cldap.c index 7dc16eba74..8ab0318572 100644 --- a/libraries/libldap/cldap.c +++ b/libraries/libldap/cldap.c @@ -228,7 +228,7 @@ cldap_search_s( LDAP *ld, char *base, int scope, char *filter, char **attrs, attrsonly )) == -1 ) { return( ld->ld_errno ); } -#ifndef NO_CACHE +#ifndef LDAP_NOCACHE if ( ld->ld_cache != NULL && ld->ld_responses != NULL ) { Debug( LDAP_DEBUG_TRACE, "cldap_search_s res from cache\n", 0, 0, 0 ); @@ -236,7 +236,7 @@ cldap_search_s( LDAP *ld, char *base, int scope, char *filter, char **attrs, ld->ld_responses = ld->ld_responses->lm_next; return( ldap_result2error( ld, *res, 0 )); } -#endif /* NO_CACHE */ +#endif /* LDAP_NOCACHE */ ret = cldap_result( ld, msgid, res, &cri, base ); } while (ret == -1); @@ -492,11 +492,11 @@ cldap_parsemsg( LDAP *ld, int msgid, BerElement *ber, } #endif /* LDAP_DEBUG */ -#ifndef NO_CACHE +#ifndef LDAP_NOCACHE if ( ld->ld_cache != NULL ) { ldap_add_result_to_cache( ld, ldm ); } -#endif /* NO_CACHE */ +#endif /* LDAP_NOCACHE */ if ( chain == NULL ) { chain = ldm; diff --git a/libraries/libldap/compare.c b/libraries/libldap/compare.c index e9f78cbfae..4d89f59e7a 100644 --- a/libraries/libldap/compare.c +++ b/libraries/libldap/compare.c @@ -59,7 +59,7 @@ ldap_compare( LDAP *ld, char *dn, char *attr, char *value ) return( -1 ); } -#ifndef NO_CACHE +#ifndef LDAP_NOCACHE if ( ld->ld_cache != NULL ) { if ( ldap_check_cache( ld, LDAP_REQ_COMPARE, ber ) == 0 ) { ber_free( ber, 1 ); @@ -68,7 +68,7 @@ ldap_compare( LDAP *ld, char *dn, char *attr, char *value ) } ldap_add_request_to_cache( ld, LDAP_REQ_COMPARE, ber ); } -#endif /* NO_CACHE */ +#endif /* LDAP_NOCACHE */ /* send the message */ return ( ldap_send_initial_request( ld, LDAP_REQ_COMPARE, dn, ber )); diff --git a/libraries/libldap/getdn.c b/libraries/libldap/getdn.c index 54b8e8a92c..19ef4d45e7 100644 --- a/libraries/libldap/getdn.c +++ b/libraries/libldap/getdn.c @@ -245,19 +245,3 @@ ldap_is_dns_dn( char *dn ) strchr( dn, ',' ) == NULL ); } - -#if defined( ultrix ) || defined( NeXT ) - -char *strdup( char *s ) -{ - char *p; - - if ( (p = (char *) malloc( strlen( s ) + 1 )) == NULL ) - return( NULL ); - - strcpy( p, s ); - - return( p ); -} - -#endif /* ultrix */ diff --git a/libraries/libldap/kbind.c b/libraries/libldap/kbind.c index 9ef667be2f..2831226ed8 100644 --- a/libraries/libldap/kbind.c +++ b/libraries/libldap/kbind.c @@ -11,7 +11,7 @@ static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of Michigan.\nAll rights reserved.\n"; #endif -#ifdef KERBEROS +#ifdef HAVE_KERBEROS #include #include @@ -103,11 +103,11 @@ ldap_kerberos_bind1( LDAP *ld, char *dn ) free( cred ); -#ifndef NO_CACHE +#ifndef LDAP_NOCACHE if ( ld->ld_cache != NULL ) { ldap_flush_cache( ld ); } -#endif /* !NO_CACHE */ +#endif /* !LDAP_NOCACHE */ /* send the message */ return ( ldap_send_initial_request( ld, LDAP_REQ_BIND, dn, ber )); @@ -290,4 +290,4 @@ ldap_get_kerberosv4_credentials( LDAP *ld, char *who, char *service, int *len ) } #endif /* !AUTHMAN */ -#endif /* KERBEROS */ +#endif /* HAVE_KERBEROS */ diff --git a/libraries/libldap/ldap-int.h b/libraries/libldap/ldap-int.h index 45d1eaf7ae..bb65762987 100644 --- a/libraries/libldap/ldap-int.h +++ b/libraries/libldap/ldap-int.h @@ -32,14 +32,14 @@ void ldap_add_result_to_cache LDAP_P(( LDAP *ld, LDAPMessage *result )); int ldap_check_cache LDAP_P(( LDAP *ld, unsigned long msgtype, BerElement *request )); -#ifdef KERBEROS +#ifdef HAVE_KERBEROS /* * in kerberos.c */ char *ldap_get_kerberosv4_credentials LDAP_P(( LDAP *ld, char *who, char *service, int *len )); -#endif /* KERBEROS */ +#endif /* HAVE_KERBEROS */ /* @@ -56,9 +56,9 @@ int ldap_connect_to_host( Sockbuf *sb, char *host, unsigned long address, int po int async ); void ldap_close_connection( Sockbuf *sb ); -#ifdef KERBEROS +#ifdef HAVE_KERBEROS char *ldap_host_connected_to( Sockbuf *sb ); -#endif /* KERBEROS */ +#endif /* HAVE_KERBEROS */ #ifdef LDAP_REFERRALS int do_ldap_select( LDAP *ld, struct timeval *timeout ); diff --git a/libraries/libldap/open.c b/libraries/libldap/open.c index a851939586..3ea3eea14a 100644 --- a/libraries/libldap/open.c +++ b/libraries/libldap/open.c @@ -208,14 +208,14 @@ open_ldap_connection( LDAP *ld, Sockbuf *sb, char *host, int defport, } if ( krbinstancep != NULL ) { -#ifdef KERBEROS +#ifdef HAVE_KERBEROS if (( *krbinstancep = ldap_host_connected_to( sb )) != NULL && ( p = strchr( *krbinstancep, '.' )) != NULL ) { *p = '\0'; } -#else /* KERBEROS */ +#else /* HAVE_KERBEROS */ krbinstancep = NULL; -#endif /* KERBEROS */ +#endif /* HAVE_KERBEROS */ } return( 0 ); diff --git a/libraries/libldap/os-ip.c b/libraries/libldap/os-ip.c index 9c16fa9215..7105dc1c77 100644 --- a/libraries/libldap/os-ip.c +++ b/libraries/libldap/os-ip.c @@ -146,7 +146,7 @@ ldap_close_connection( Sockbuf *sb ) } -#ifdef KERBEROS +#ifdef HAVE_KERBEROS char * ldap_host_connected_to( Sockbuf *sb ) { @@ -175,7 +175,7 @@ ldap_host_connected_to( Sockbuf *sb ) return( NULL ); } -#endif /* KERBEROS */ +#endif /* HAVE_KERBEROS */ #ifdef LDAP_REFERRALS diff --git a/libraries/libldap/request.c b/libraries/libldap/request.c index da782a8e72..a3dfc559bf 100644 --- a/libraries/libldap/request.c +++ b/libraries/libldap/request.c @@ -32,7 +32,7 @@ static void free_servers LDAP_P(( LDAPServer *srvlist )); #ifdef LDAP_DNS -#tatic LDAPServer *dn2servers LDAP_P(( LDAP *ld, char *dn )); +static LDAPServer *dn2servers LDAP_P(( LDAP *ld, char *dn )); #endif /* LDAP_DNS */ #ifdef LDAP_REFERRALS diff --git a/libraries/libldap/result.c b/libraries/libldap/result.c index 15eddb924c..dd0c5e71a2 100644 --- a/libraries/libldap/result.c +++ b/libraries/libldap/result.c @@ -438,11 +438,11 @@ lr->lr_res_matched ? lr->lr_res_matched : "" ); new->lm_msgtype = tag; new->lm_ber = ber_dup( &ber ); -#ifndef NO_CACHE +#ifndef LDAP_NOCACHE if ( ld->ld_cache != NULL ) { ldap_add_result_to_cache( ld, new ); } -#endif /* NO_CACHE */ +#endif /* LDAP_NOCACHE */ /* is this the one we're looking for? */ if ( msgid == LDAP_RES_ANY || id == msgid ) { diff --git a/libraries/libldap/sbind.c b/libraries/libldap/sbind.c index a64d0ff778..17347d7cb2 100644 --- a/libraries/libldap/sbind.c +++ b/libraries/libldap/sbind.c @@ -69,11 +69,11 @@ ldap_simple_bind( LDAP *ld, char *dn, char *passwd ) return( -1 ); } -#ifndef NO_CACHE +#ifndef LDAP_NOCACHE if ( ld->ld_cache != NULL ) { ldap_flush_cache( ld ); } -#endif /* !NO_CACHE */ +#endif /* !LDAP_NOCACHE */ /* send the message */ return( ldap_send_initial_request( ld, LDAP_REQ_BIND, dn, ber )); diff --git a/libraries/libldap/search.c b/libraries/libldap/search.c index b74635d3a5..f588e2816a 100644 --- a/libraries/libldap/search.c +++ b/libraries/libldap/search.c @@ -61,7 +61,7 @@ ldap_search( LDAP *ld, char *base, int scope, char *filter, return( -1 ); } -#ifndef NO_CACHE +#ifndef LDAP_NOCACHE if ( ld->ld_cache != NULL ) { if ( ldap_check_cache( ld, LDAP_REQ_SEARCH, ber ) == 0 ) { ber_free( ber, 1 ); @@ -70,7 +70,7 @@ ldap_search( LDAP *ld, char *base, int scope, char *filter, } ldap_add_request_to_cache( ld, LDAP_REQ_SEARCH, ber ); } -#endif /* NO_CACHE */ +#endif /* LDAP_NOCACHE */ /* send the message */ return ( ldap_send_initial_request( ld, LDAP_REQ_SEARCH, base, ber )); diff --git a/libraries/libldap/test.c b/libraries/libldap/test.c index d81481de0f..dda28530e0 100644 --- a/libraries/libldap/test.c +++ b/libraries/libldap/test.c @@ -1,33 +1,17 @@ +#include "portable.h" + #include -#include -#include #include -#ifdef MACOS -#ifdef THINK_C -#include -#include -#include -#endif /* THINK_C */ -#include "macos.h" -#else /* MACOS */ -#if defined( DOS ) || defined( _WIN32 ) -#include "msdos.h" -#if defined( WINSOCK ) || defined( _WIN32 ) -#include "console.h" -#endif /* WINSOCK */ -#else /* DOS */ -#include -#include -#include +#include +#include +#include +#include +#include + #include #include -#ifndef VMS #include -#include -#endif /* VMS */ -#endif /* DOS */ -#endif /* MACOS */ #include "lber.h" #include "ldap.h" @@ -47,7 +31,7 @@ static void print_ldap_result LDAP_P(( LDAP *ld, LDAPMessage *lm, char *s )); static void print_search_entry LDAP_P(( LDAP *ld, LDAPMessage *res )); static void free_list LDAP_P(( char **list )); -#define NOCACHEERRMSG "don't compile with -DNO_CACHE if you desire local caching" +#define NOCACHEERRMSG "don't compile with -DLDAP_NOCACHE if you desire local caching" char *dnsuffix; @@ -243,7 +227,7 @@ bind_prompt( LDAP *ld, char **dnp, char **passwdp, int *authmethodp, static char dn[256], passwd[256]; if ( !freeit ) { -#ifdef KERBEROS +#ifdef HAVE_KERBEROS getline( dn, sizeof(dn), stdin, "re-bind method (0->simple, 1->krbv41, 2->krbv42, 3->krbv41&2)? " ); if (( *authmethodp = atoi( dn )) == 3 ) { @@ -251,9 +235,9 @@ bind_prompt( LDAP *ld, char **dnp, char **passwdp, int *authmethodp, } else { *authmethodp |= 0x80; } -#else /* KERBEROS */ +#else /* HAVE_KERBEROS */ *authmethodp = LDAP_AUTH_SIMPLE; -#endif /* KERBEROS */ +#endif /* HAVE_KERBEROS */ getline( dn, sizeof(dn), stdin, "re-bind dn? " ); strcat( dn, dnsuffix ); @@ -440,13 +424,13 @@ main( break; case 'b': /* asynch bind */ -#ifdef KERBEROS +#ifdef HAVE_KERBEROS getline( line, sizeof(line), stdin, "method (0->simple, 1->krbv41, 2->krbv42)? " ); method = atoi( line ) | 0x80; -#else /* KERBEROS */ +#else /* HAVE_KERBEROS */ method = LDAP_AUTH_SIMPLE; -#endif /* KERBEROS */ +#endif /* HAVE_KERBEROS */ getline( dn, sizeof(dn), stdin, "dn? " ); strcat( dn, dnsuffix ); @@ -466,7 +450,7 @@ main( break; case 'B': /* synch bind */ -#ifdef KERBEROS +#ifdef HAVE_KERBEROS getline( line, sizeof(line), stdin, "method 0->simple 1->krbv41 2->krbv42 3->krb? " ); method = atoi( line ); @@ -474,9 +458,9 @@ main( method = LDAP_AUTH_KRBV4; else method = method | 0x80; -#else /* KERBEROS */ +#else /* HAVE_KERBEROS */ method = LDAP_AUTH_SIMPLE; -#endif /* KERBEROS */ +#endif /* HAVE_KERBEROS */ getline( dn, sizeof(dn), stdin, "dn? " ); strcat( dn, dnsuffix ); @@ -749,9 +733,9 @@ main( break; case 'e': /* enable cache */ -#ifdef NO_CACHE +#ifdef LDAP_NOCACHE printf( NOCACHEERRMSG ); -#else /* NO_CACHE */ +#else /* LDAP_NOCACHE */ getline( line, sizeof(line), stdin, "Cache timeout (secs)? " ); i = atoi( line ); getline( line, sizeof(line), stdin, "Maximum memory to use (bytes)? " ); @@ -760,25 +744,25 @@ main( } else { printf( "ldap_enable_cache failed\n" ); } -#endif /* NO_CACHE */ +#endif /* LDAP_NOCACHE */ break; case 'x': /* uncache entry */ -#ifdef NO_CACHE +#ifdef LDAP_NOCACHE printf( NOCACHEERRMSG ); -#else /* NO_CACHE */ +#else /* LDAP_NOCACHE */ getline( line, sizeof(line), stdin, "DN? " ); ldap_uncache_entry( ld, line ); -#endif /* NO_CACHE */ +#endif /* LDAP_NOCACHE */ break; case 'X': /* uncache request */ -#ifdef NO_CACHE +#ifdef LDAP_NOCACHE printf( NOCACHEERRMSG ); -#else /* NO_CACHE */ +#else /* LDAP_NOCACHE */ getline( line, sizeof(line), stdin, "request msgid? " ); ldap_uncache_request( ld, atoi( line )); -#endif /* NO_CACHE */ +#endif /* LDAP_NOCACHE */ break; case 'o': /* set ldap options */ @@ -833,9 +817,9 @@ main( break; case 'O': /* set cache options */ -#ifdef NO_CACHE +#ifdef LDAP_NOCACHE printf( NOCACHEERRMSG ); -#else /* NO_CACHE */ +#else /* LDAP_NOCACHE */ getline( line, sizeof(line), stdin, "cache errors (0=smart, 1=never, 2=always)?" ); switch( atoi( line )) { case 0: @@ -852,7 +836,7 @@ main( default: printf( "not a valid cache option\n" ); } -#endif /* NO_CACHE */ +#endif /* LDAP_NOCACHE */ break; case '?': /* help */ diff --git a/libraries/libldap/tmplout.c b/libraries/libldap/tmplout.c index 0c5613de94..6983b50280 100644 --- a/libraries/libldap/tmplout.c +++ b/libraries/libldap/tmplout.c @@ -3,28 +3,17 @@ * 12 April 1994 by Mark C Smith */ +#include "portable.h" + #include -#include -#include -#include #include -#ifdef MACOS -#include "macos.h" -#else /* MACOS */ -#ifdef DOS -#include -#include "msdos.h" -#else /* DOS */ -#include -#include -#include -#endif /* DOS */ -#endif /* MACOS */ +#include +#include +#include +#include -#ifdef VMS -#include -#endif /* VMS */ +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/unbind.c b/libraries/libldap/unbind.c index 239ee81d75..449026ce7e 100644 --- a/libraries/libldap/unbind.c +++ b/libraries/libldap/unbind.c @@ -74,10 +74,10 @@ ldap_ld_free( LDAP *ld, int close ) ldap_msgfree( lm ); } -#ifndef NO_CACHE +#ifndef LDAP_NOCACHE if ( ld->ld_cache != NULL ) ldap_destroy_cache( ld ); -#endif /* !NO_CACHE */ +#endif /* !LDAP_NOCACHE */ if ( ld->ld_error != NULL ) free( ld->ld_error ); if ( ld->ld_matched != NULL ) diff --git a/libraries/liblthread/thread.c b/libraries/liblthread/thread.c index 0e7ebdd305..1ba34ff86b 100644 --- a/libraries/liblthread/thread.c +++ b/libraries/liblthread/thread.c @@ -172,7 +172,7 @@ pthread_cond_broadcast( pthread_cond_t *cv ) return( 0 ); } -#elif defined( HAVE_LWP_THR ) +#elif defined( HAVE_THR ) /******************* * * diff --git a/servers/slurpd/admin.c b/servers/slurpd/admin.c index c056cd1d8b..af28544d18 100644 --- a/servers/slurpd/admin.c +++ b/servers/slurpd/admin.c @@ -18,7 +18,8 @@ #include "portable.h" #include -#include + +#include #include "slurp.h" #include "globals.h" diff --git a/servers/slurpd/args.c b/servers/slurpd/args.c index ec4f0b52b7..678954bf14 100644 --- a/servers/slurpd/args.c +++ b/servers/slurpd/args.c @@ -17,8 +17,9 @@ #include "portable.h" #include -#include -#include + +#include +#include #include #include @@ -32,11 +33,11 @@ usage( char *name ) { fprintf( stderr, "usage: %s\t[-d debug-level] [-s syslog-level]\n", name ); fprintf( stderr, "\t\t[-f slapd-config-file] [-r replication-log-file]\n" ); -#ifdef KERBEROS +#ifdef HAVE_KERBEROS fprintf( stderr, "\t\t[-t tmp-dir] [-o] [-k srvtab-file]\n" ); -#else /* KERBEROS */ +#else /* HAVE_KERBEROS */ fprintf( stderr, "\t\t[-t tmp-dir] [-o]\n" ); -#endif /* KERBEROS */ +#endif /* HAVE_KERBEROS */ } @@ -106,11 +107,11 @@ doargs( g->slurpd_rdir = strdup( optarg ); break; case 'k': /* name of kerberos srvtab file */ -#ifdef KERBEROS +#ifdef HAVE_KERBEROS g->default_srvtab = strdup( optarg ); -#else /* KERBEROS */ +#else /* HAVE_KERBEROS */ fprintf( stderr, "must compile with KERBEROS to use -k option\n" ); -#endif /* KERBEROS */ +#endif /* HAVE_KERBEROS */ break; case 'h': usage( g->myname ); diff --git a/servers/slurpd/ch_malloc.c b/servers/slurpd/ch_malloc.c index 22b83b9f4d..7b3ddcd840 100644 --- a/servers/slurpd/ch_malloc.c +++ b/servers/slurpd/ch_malloc.c @@ -17,8 +17,9 @@ #include "portable.h" #include -#include -#include + +#include + #include "../slapd/slap.h" diff --git a/servers/slurpd/config.c b/servers/slurpd/config.c index 617943cbac..7c97aaaac8 100644 --- a/servers/slurpd/config.c +++ b/servers/slurpd/config.c @@ -18,9 +18,9 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include #include #include @@ -31,19 +31,11 @@ #define MAXARGS 100 /* Forward declarations */ -#ifdef NEEDPROTOS -static void add_replica( char **, int ); -static int parse_replica_line( char **, int, Ri *); -static void parse_line( char *, int *, char ** ); -static char *getline( FILE * ); -static char *strtok_quote( char *, char * ); -#else /* NEEDPROTOS */ -static void add_replica(); -static int parse_replica_line(); -static void parse_line(); -static char *getline(); -static char *strtok_quote(); -#endif /* NEEDPROTOS */ +static void add_replica LDAP_P(( char **, int )); +static int parse_replica_line LDAP_P(( char **, int, Ri *)); +static void parse_line LDAP_P(( char *, int *, char ** )); +static char *getline LDAP_P(( FILE * )); +static char *strtok_quote LDAP_P(( char *, char * )); /* current config file line # */ static int lineno; @@ -359,13 +351,13 @@ parse_replica_line( strlen( BINDMETHSTR ))) { val = cargv[ i ] + strlen( BINDMETHSTR ) + 1; if ( !strcasecmp( val, KERBEROSSTR )) { -#ifdef KERBEROS +#ifdef HAVE_KERBEROS ri->ri_bind_method = AUTH_KERBEROS; if ( ri->ri_srvtab == NULL ) { ri->ri_srvtab = strdup( sglob->default_srvtab ); } gots |= GOT_METHOD; -#else /* KERBEROS */ +#else /* HAVE_KERBEROS */ fprintf( stderr, "Error: a bind method of \"kerberos\" was\n" ); fprintf( stderr, "specified in the slapd configuration file,\n" ); fprintf( stderr, "but slurpd was not built with kerberos.\n" ); @@ -373,7 +365,7 @@ parse_replica_line( fprintf( stderr, "kerberos support if you wish to use\n" ); fprintf( stderr, "bindmethod=kerberos\n" ); exit( 1 ); -#endif /* KERBEROS */ +#endif /* HAVE_KERBEROS */ } else if ( !strcasecmp( val, SIMPLESTR )) { ri->ri_bind_method = AUTH_SIMPLE; gots |= GOT_METHOD; diff --git a/servers/slurpd/detach.c b/servers/slurpd/detach.c index bb28bc96a2..0f0d36f580 100644 --- a/servers/slurpd/detach.c +++ b/servers/slurpd/detach.c @@ -13,21 +13,18 @@ #include "portable.h" #include + +#include +#include + #include -#ifdef SVR4 #include -#endif /* svr4 */ #include #include #include -#include + #include "portable.h" -#ifdef USE_SYSCONF -#include -#endif /* USE_SYSCONF */ - - detach() { int i, sd, nbits; @@ -35,11 +32,13 @@ detach() extern int ldap_debug; #endif -#ifdef USE_SYSCONF +#ifdef HAVE_SYSCONF nbits = sysconf( _SC_OPEN_MAX ); -#else /* USE_SYSCONF */ +#elif HAVE_GETDTABLESIZE nbits = getdtablesize(); -#endif /* USE_SYSCONF */ +#else + nbits = FD_SETSIZE; +#endif #ifdef FD_SETSIZE if ( nbits > FD_SETSIZE ) { @@ -51,7 +50,7 @@ detach() if ( ldap_debug == 0 ) { #endif for ( i = 0; i < 5; i++ ) { -#if defined( sunos5 ) && defined( THREAD_SUNOS5_LWP ) +#if HAVE_THR switch ( fork1() ) { #else switch ( fork() ) { @@ -88,14 +87,14 @@ detach() (void) dup2( sd, 2 ); close( sd ); -#ifdef USE_SETSID +#ifdef HAVE_SETSID setsid(); -#else /* USE_SETSID */ +#else /* HAVE_SETSID */ if ( (sd = open( "/dev/tty", O_RDWR )) != -1 ) { (void) ioctl( sd, TIOCNOTTY, NULL ); (void) close( sd ); } -#endif /* USE_SETSID */ +#endif /* HAVE_SETSID */ #ifdef LDAP_DEBUG } #endif diff --git a/servers/slurpd/fm.c b/servers/slurpd/fm.c index 14815549d9..8397836533 100644 --- a/servers/slurpd/fm.c +++ b/servers/slurpd/fm.c @@ -17,8 +17,9 @@ #include "portable.h" #include + #include -#include +#include #include "slurp.h" #include "globals.h" @@ -40,11 +41,6 @@ static void populate_queue LDAP_P(( char *f )); static void set_shutdown LDAP_P((void)); void do_nothing LDAP_P((void)); -#ifdef DECL_SYS_ERRLIST -extern char *sys_errlist[]; -#endif /* DECL_SYS_ERRLIST */ - - /* * Main file manager routine. Watches for new data to be appended to the @@ -67,14 +63,11 @@ fm( * SIG(UNUSED|USR2) - causes slurpd to read its administrative interface file. * (not yet implemented). */ -#ifdef SIGSTKFLT +#ifdef HAVE_LINUX_THREADS (void) SIGNAL( SIGSTKFLT, (void *) do_nothing ); -#else - (void) SIGNAL( SIGUSR1, (void *) do_nothing ); -#endif -#ifdef SIGUNUSED (void) SIGNAL( SIGUNUSED, (void *) do_admin ); #else + (void) SIGNAL( SIGUSR1, (void *) do_nothing ); (void) SIGNAL( SIGUSR2, (void *) do_admin ); #endif (void) SIGNAL( SIGTERM, (void *) set_shutdown ); @@ -154,7 +147,7 @@ set_shutdown() int i; sglob->slurpd_shutdown = 1; /* set flag */ -#ifdef SIGSTKFLT +#ifdef HAVE_LINUX_THREADS pthread_kill( sglob->fm_tid, SIGSTKFLT ); /* wake up file mgr */ #else pthread_kill( sglob->fm_tid, SIGUSR1 ); /* wake up file mgr */ @@ -179,7 +172,7 @@ set_shutdown() void do_nothing() { -#ifdef SIGSTKFLT +#ifdef HAVE_LINUX_THREADS (void) SIGNAL( SIGSTKFLT, (void *) do_nothing ); #else (void) SIGNAL( SIGUSR1, (void *) do_nothing ); diff --git a/servers/slurpd/globals.c b/servers/slurpd/globals.c index 89403fc490..7e2c7081bf 100644 --- a/servers/slurpd/globals.c +++ b/servers/slurpd/globals.c @@ -14,7 +14,7 @@ * globals.c - initialization code for global data */ -#include +#include "portable.h" #include @@ -62,13 +62,13 @@ Globals *init_globals() fprintf( stderr, "Cannot initialize queue\n" ); exit( 1 ); } -#ifdef KERBEROS +#ifdef HAVE_KERBEROS g->default_srvtab = SRVTAB; -#endif /* KERBEROS */ -#if defined( THREAD_SUNOS4_LWP ) +#endif /* HAVE_KERBEROS */ +#if defined( HAVE_LWP ) g->tsl_list = NULL; mon_create( &g->tsl_mon ); -#endif /* THREAD_SUNOS4_LWP */ +#endif /* HAVE_LWP */ return g; } diff --git a/servers/slurpd/ldap_op.c b/servers/slurpd/ldap_op.c index 90ef27449f..636b120793 100644 --- a/servers/slurpd/ldap_op.c +++ b/servers/slurpd/ldap_op.c @@ -17,17 +17,12 @@ #include "portable.h" #include + +#include #include #include -#include -#ifdef KERBEROS -#ifdef KERBEROS_V -#include -#else -#include -#endif /* KERBEROS_V */ -#endif /* KERBEROS */ +#include #include #include @@ -53,11 +48,7 @@ static int do_unbind LDAP_P(( Ri * )); /* External references */ -#ifdef DECL_SYS_ERRLIST -extern char *sys_errlist[]; -#endif /* DECL_SYS_ERRLIST */ - -extern char *ch_malloc( unsigned long ); +extern char *ch_malloc LDAP_P(( unsigned long )); static char *kattrs[] = {"kerberosName", NULL }; static struct timeval kst = {30L, 0L}; @@ -591,7 +582,7 @@ do_bind( int rc; int ldrc; char msgbuf[ 1024]; -#ifdef KERBEROS +#ifdef HAVE_KERBEROS int retval = 0; int kni, got_tgt; char **krbnames; @@ -599,7 +590,7 @@ do_bind( char realm[ REALM_SZ ]; char name[ ANAME_SZ ]; char instance[ INST_SZ ]; -#endif /* KERBEROS */ +#endif /* HAVE_KERBEROS */ *lderr = 0; @@ -638,12 +629,12 @@ do_bind( switch ( ri->ri_bind_method ) { case AUTH_KERBEROS: -#ifndef KERBEROS +#ifndef HAVE_KERBEROS Debug( LDAP_DEBUG_ANY, "Error: Kerberos bind for %s:%d, but not compiled w/kerberos\n", ri->ri_hostname, ri->ri_port, 0 ); return( BIND_ERR_KERBEROS_FAILED ); -#else /* KERBEROS */ +#else /* HAVE_KERBEROS */ /* * Bind using kerberos. * If "bindprincipal" was given in the config file, then attempt @@ -719,7 +710,7 @@ kexit: if ( krbnames != NULL ) { } return( retval); break; -#endif /* KERBEROS */ +#endif /* HAVE_KERBEROS */ case AUTH_SIMPLE: /* * Bind with a plaintext password. diff --git a/servers/slurpd/lock.c b/servers/slurpd/lock.c index 6e14c1bfa0..2e42fd8b2d 100644 --- a/servers/slurpd/lock.c +++ b/servers/slurpd/lock.c @@ -17,15 +17,14 @@ #include "portable.h" #include -#include -#include + +#include +#include +#include + #include #include -#include -#include "portable.h" -#ifdef USE_LOCKF -#include -#endif + #include "../slapd/slap.h" @@ -50,11 +49,12 @@ lock_fopen( } /* acquire the lock */ -#ifdef USE_LOCKF - while ( lockf( fileno( *lfp ), F_LOCK, 0 ) != 0 ) { +#ifdef HAVE_LOCKF + while ( lockf( fileno( *lfp ), F_LOCK, 0 ) != 0 ) #else - while ( flock( fileno( *lfp ), LOCK_EX ) != 0 ) { + while ( flock( fileno( *lfp ), LOCK_EX ) != 0 ) #endif + { ; /* NULL */ } @@ -62,7 +62,7 @@ lock_fopen( if ( (fp = fopen( fname, type )) == NULL ) { Debug( LDAP_DEBUG_ANY, "Error: could not open \"%s\"\n", fname, 0, 0 ); -#ifdef USE_LOCKF +#ifdef HAVE_LOCKF lockf( fileno( *lfp ), F_ULOCK, 0 ); #else flock( fileno( *lfp ), LOCK_UN ); @@ -82,7 +82,7 @@ lock_fclose( ) { /* unlock */ -#ifdef USE_LOCKF +#ifdef HAVE_LOCKF lockf( fileno( lfp ), F_ULOCK, 0 ); #else flock( fileno( lfp ), LOCK_UN ); diff --git a/servers/slurpd/main.c b/servers/slurpd/main.c index 1cd84b06ee..85383dd9fc 100644 --- a/servers/slurpd/main.c +++ b/servers/slurpd/main.c @@ -28,9 +28,10 @@ extern void fm(); extern int start_replica_thread( Ri * ); extern Globals *init_globals(); extern int sanity(); -#if defined( THREAD_SUNOS4_LWP ) + +#if defined( HAVE_LWP ) extern void start_lwp_scheduler(); -#endif /* THREAD_SUNOS4_LWP */ +#endif /* HAVE_LWP */ main( int argc, @@ -41,11 +42,11 @@ main( int status; int i; -#ifndef _THREAD +#ifdef NO_THREADS /* Haven't yet written the non-threaded version */ fprintf( stderr, "slurpd currently requires threads support\n" ); exit( 1 ); -#endif /* !_THREAD */ +#else /* * Create and initialize globals. init_globals() also initializes @@ -95,21 +96,20 @@ main( * and if not in one-shot mode. */ #ifdef LDAP_DEBUG - if (( ldap_debug == 0 ) && !sglob->one_shot_mode ) { + if (( ldap_debug == 0 ) && !sglob->one_shot_mode ) #else /* LDAP_DEBUG */ - if ( !sglob->one_shot_mode ) { + if ( !sglob->one_shot_mode ) #endif /* LDAP_DEBUG */ - detach(); + { + detach(); } -#ifdef _THREAD - -#if defined( THREAD_SUNOS4_LWP ) +#if defined( HAVE_LWP ) /* * Need to start a scheduler thread under SunOS 4 */ start_lwp_scheduler(); -#endif /* THREAD_SUNOS4_LWP */ +#endif /* HAVE_LWP */ /* @@ -123,7 +123,8 @@ main( * Start the main file manager thread (in fm.c). */ pthread_attr_init( &attr ); -#ifndef THREAD_MIT_PTHREADS + +#if !defined(HAVE_PTHREADS_D4) && !defined(HAVE_DCE) /* POSIX_THREADS or compatible * This is a draft 10 or standard pthreads implementation */ @@ -134,7 +135,7 @@ main( exit( 1 ); } -#else /* !THREAD_MIT_PTHREADS */ +#else /* !PTHREADS_FINAL */ /* * This is a draft 4 or earlier pthreads implementation */ @@ -145,13 +146,14 @@ main( exit( 1 ); } -#endif /* !THREAD_MIT_PTHREADS */ +#endif /* !PTHREADS_FINAL */ + pthread_attr_destroy( &attr ); /* * Wait for the fm thread to finish. */ -#ifdef POSIX_THREADS +#ifdef HAVE_PTHREADS_FINAL pthread_join( sglob->fm_tid, (void *) NULL ); #else pthread_join( sglob->fm_tid, (void *) &status ); @@ -160,7 +162,7 @@ main( * Wait for the replica threads to finish. */ for ( i = 0; sglob->replicas[ i ] != NULL; i++ ) { -#ifdef POSIX_THREADS +#ifdef HAVE_PTHREADS_FINAL pthread_join( sglob->replicas[ i ]->ri_tid, (void *) NULL ); #else pthread_join( sglob->replicas[ i ]->ri_tid, (void *) &status ); @@ -170,12 +172,5 @@ main( sglob->slurpd_shutdown = 1; pthread_exit( 0 ); -#else /* !_THREAD */ - /* - * Non-threaded case. - */ - exit( 0 ); - -#endif /* !_THREAD */ - +#endif /* !NO_THREADS */ } diff --git a/servers/slurpd/re.c b/servers/slurpd/re.c index 64f9225ddb..36a37538fe 100644 --- a/servers/slurpd/re.c +++ b/servers/slurpd/re.c @@ -21,9 +21,10 @@ #include "portable.h" #include + +#include +#include #include -#include -#include #include "../slapd/slap.h" #include "slurp.h" @@ -33,10 +34,6 @@ extern char *str_getline LDAP_P(( char **next )); extern void ch_free LDAP_P(( char *p )); -#ifdef DECL_SYS_ERRLIST -extern char *sys_errlist[]; -#endif /* DECL_SYS_ERRLIST */ - /* Forward references */ static Rh *get_repl_hosts LDAP_P(( char *, int *, char ** )); static int gettype LDAP_P(( char * )); @@ -84,10 +81,10 @@ Re_free( "Warning: freeing re (dn: %s) with nonzero refcnt\n", re->re_dn, 0, 0 ); } -#if !defined( THREAD_SUNOS4_LWP ) +#if !defined( HAVE_LWP ) /* This seems to have problems under SunOS lwp */ pthread_mutex_destroy( &re->re_mutex ); -#endif /* THREAD_SUNOS4_LWP */ +#endif /* HAVE_LWP */ ch_free( re->re_timestamp ); if (( rh = re->re_replicas ) != NULL ) { for ( i = 0; rh[ i ].rh_hostname != NULL; i++ ) { diff --git a/servers/slurpd/reject.c b/servers/slurpd/reject.c index 95ae7b7e62..aa7266740b 100644 --- a/servers/slurpd/reject.c +++ b/servers/slurpd/reject.c @@ -20,19 +20,17 @@ #include "portable.h" #include + +#include +#include + #include #include #include -#include #include "slurp.h" #include "globals.h" -#ifdef DECL_SYS_ERRLIST -extern char *sys_errlist[]; -#endif /* DECL_SYS_ERRLIST */ - - /* * Write a replication record to a reject file. The reject file has the * same name as the replica's private copy of the file but with ".rej" diff --git a/servers/slurpd/replica.c b/servers/slurpd/replica.c index 38da5edaf8..9652827950 100644 --- a/servers/slurpd/replica.c +++ b/servers/slurpd/replica.c @@ -63,7 +63,7 @@ start_replica_thread( pthread_attr_setdetachstate( &attr, PTHREAD_CREATE_DETACHED ); #endif -#ifndef THREAD_MIT_PTHREADS +#if !defined(HAVE_PTHREAD_D4) && !defined(HAVE_DCE) /* POSIX_THREADS or compatible * This is a draft 10 or standard pthreads implementation */ @@ -74,7 +74,7 @@ start_replica_thread( pthread_attr_destroy( &attr ); return -1; } -#else /* !THREAD_MIT_PTHREADS */ +#else /* !final */ /* * This is a draft 4 or earlier pthreads implementation */ @@ -85,7 +85,8 @@ start_replica_thread( pthread_attr_destroy( &attr ); return -1; } -#endif /* !THREAD_MIT_PTHREADS */ +#endif /* !final */ + pthread_attr_destroy( &attr ); return 0; } diff --git a/servers/slurpd/replog.c b/servers/slurpd/replog.c index a9ecdb7ecc..5573215cc5 100644 --- a/servers/slurpd/replog.c +++ b/servers/slurpd/replog.c @@ -17,16 +17,17 @@ #include "portable.h" -#include #include -#include + +#include +#include +#include #include -#include +#include + #include #include #include -#include -#include #include "slurp.h" #include "globals.h" @@ -43,10 +44,6 @@ extern char *ch_malloc LDAP_P(( unsigned long )); int file_nonempty LDAP_P(( char * )); -#ifdef DECL_SYS_ERRLIST -extern char *sys_errlist[]; -#endif - /* * Forward declarations */ diff --git a/servers/slurpd/ri.c b/servers/slurpd/ri.c index e11fc30f7b..0560a49e79 100644 --- a/servers/slurpd/ri.c +++ b/servers/slurpd/ri.c @@ -20,31 +20,20 @@ #include "portable.h" #include -#include +#include #include "slurp.h" #include "globals.h" /* External references */ -#ifdef NEEDPROTOS -extern void write_reject( Ri *, Re *, int, char * ); -extern void do_nothing(); -#else /* NEEDPROTOS */ -extern void write_reject(); -extern void do_nothing(); -#endif /* NEEDPROTOS */ +extern void write_reject LDAP_P(( Ri *, Re *, int, char * )); +extern void do_nothing LDAP_P(()); /* Forward references */ -#ifdef NEEDPROTOS -static int ismine( Ri *, Re * ); -static int isnew( Ri *, Re * ); -void tsleep( time_t ); -#else /* NEEDPROTOS */ -static int ismine(); -static int isnew(); -void tsleep(); -#endif /* NEEDPROTOS */ +static int ismine LDAP_P(( Ri *, Re * )); +static int isnew LDAP_P(( Ri *, Re * )); +void tsleep LDAP_P(( time_t )); /* @@ -61,7 +50,7 @@ Ri_process( int rc ; char *errmsg; -#ifdef SIGSTKFLT +#ifdef HAVE_LINUX_THREADS (void) SIGNAL( SIGSTKFLT, (void *) do_nothing ); #else (void) SIGNAL( SIGUSR1, (void *) do_nothing ); @@ -162,7 +151,7 @@ Ri_wake( if ( ri == NULL ) { return; } -#ifdef SIGSTKFLT +#ifdef HAVE_LINUX_THREADS pthread_kill( ri->ri_tid, SIGSTKFLT ); (void) SIGNAL( SIGSTKFLT, (void *) do_nothing ); #else diff --git a/servers/slurpd/rq.c b/servers/slurpd/rq.c index 260872b7d9..e34572797b 100644 --- a/servers/slurpd/rq.c +++ b/servers/slurpd/rq.c @@ -42,10 +42,6 @@ /* externs */ extern void Re_dump LDAP_P(( Re *re )); -#ifdef DECL_SYS_ERRLIST -extern char *sys_errlist[]; -#endif /* DECL_SYS_ERRLIST */ - /* * Lock the replication queue. */ diff --git a/servers/slurpd/sanity.c b/servers/slurpd/sanity.c index 240e479e4a..db0d2ed045 100644 --- a/servers/slurpd/sanity.c +++ b/servers/slurpd/sanity.c @@ -21,12 +21,12 @@ #include "portable.h" #include -#include -#include + +#include +#include #include "slurp.h" #include "globals.h" -#include "portable.h" #define FC_DIRBAD 1 #define FC_DIRUNREAD 2 @@ -39,11 +39,7 @@ /* * Forward declarations */ -#ifdef NEEDPROTOS -static unsigned int filecheck( char * ); -#else /* NEEDPROTOS */ -static unsigned int filecheck(); -#endif /* NEEDPROTOS */ +static unsigned int filecheck LDAP_P(( char * )); diff --git a/servers/slurpd/slurp.h b/servers/slurpd/slurp.h index d493745d22..efc9856502 100644 --- a/servers/slurpd/slurp.h +++ b/servers/slurpd/slurp.h @@ -15,14 +15,15 @@ #ifndef _SLURPD_H_ #define _SLURPD_H_ -#define LDAP_SYSLOG - #include "portable.h" -#include -#include -#include +#define LDAP_SYSLOG + +#include +#include + #include + #include "lber.h" #include "ldap.h" #include "lthread.h" @@ -319,7 +320,7 @@ typedef struct st { int (*st_unlock)(); /* read status info from disk */ } St; -#if defined( THREAD_SUNOS4_LWP ) +#if defined( HAVE_LWP ) typedef struct tl { thread_t tl_tid; /* thread being managed */ time_t tl_wake; /* time thread should be resumed */ @@ -330,7 +331,7 @@ typedef struct tsl { tl_t *tsl_list; mon_t tsl_mon; } tsl_t; -#endif /* THREAD_SUNOS4_LWP */ +#endif /* HAVE_LWP */ diff --git a/servers/slurpd/st.c b/servers/slurpd/st.c index 64029e2dbb..d18f5381fd 100644 --- a/servers/slurpd/st.c +++ b/servers/slurpd/st.c @@ -20,15 +20,11 @@ #include #include -#include +#include #include "slurp.h" #include "globals.h" -#ifdef DECL_SYS_ERRLIST -extern char *sys_errlist[]; -#endif /* DECL_SYS_ERRLIST */ - /* * Add information about replica host specified by Ri to list * of hosts. diff --git a/servers/slurpd/tsleep.c b/servers/slurpd/tsleep.c index 3cb34708e4..bfbdffbfa2 100644 --- a/servers/slurpd/tsleep.c +++ b/servers/slurpd/tsleep.c @@ -25,13 +25,14 @@ */ #include "portable.h" + #include #include "slurp.h" #include "globals.h" -#if defined( THREAD_SUNOS4_LWP ) +#if defined( HAVE_LWP ) extern stkalign_t *get_stack( int * ); extern void free_stack( int ); @@ -141,7 +142,7 @@ start_lwp_scheduler() } -#else /* THREAD_SUNOS4_LWP */ +#else /* !HAVE_LWP */ /* * Here we assume we have fully preemptive threads, and that sleep() @@ -154,7 +155,7 @@ tsleep( { sleep( interval ); } -#endif /* THREAD_SUNOS4_LWP */ +#endif /* !HAVE_LWP */ From 8bf1d472e4263d29330cade18522f0406b9ef270 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 22 Oct 1998 05:03:43 +0000 Subject: [PATCH 129/148] More changes... but tests still fail. --- include/ac/syslog.h | 4 +++- servers/slapd/entry.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/ac/syslog.h b/include/ac/syslog.h index 76f8b35828..d5d4e26201 100644 --- a/include/ac/syslog.h +++ b/include/ac/syslog.h @@ -7,7 +7,9 @@ #ifdef HAVE_SYSLOG_H #include -#if defined( LOG_NDELAY ) +#if defined( LOG_NDELAY ) && defined( LOG_NOWAIT ) +# define OPENLOG_OPTIONS ( LOG_PID | LOG_NDELAY | LOG_NOWAIT ) +#elif defined( LOG_NDELAY ) # define OPENLOG_OPTIONS ( LOG_PID | LOG_NDELAY ) #elif defined( LOG_NOWAIT ) # define OPENLOG_OPTIONS ( LOG_PID | LOG_NOWAIT ) diff --git a/servers/slapd/entry.c b/servers/slapd/entry.c index c0474e2023..4e9868cfe2 100644 --- a/servers/slapd/entry.c +++ b/servers/slapd/entry.c @@ -195,8 +195,10 @@ entry_free( Entry *e ) Attribute *a, *next; /* XXX check that no reader/writer locks exist */ +#ifdef DEBUG assert( !pthread_rdwr_wchk_np(&e->e_rdwr) && !pthread_rdwr_rchk_np(&e->e_rdwr) ); +#endif if ( e->e_dn != NULL ) { free( e->e_dn ); From 56dd54f67f1de00953ce9dda3aa1087bf416b619 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 22 Oct 1998 18:47:56 +0000 Subject: [PATCH 130/148] Changed THREAD_PREEMPTIVE to PREEMPTIVE_THREADS. Updated portable.h.nt. Still having problems with tests. --- acconfig.h | 6 +- configure | 312 +++++++++++++++++++++-------------------- configure.in | 3 +- include/lthread.h | 9 +- include/portable.h.in | 6 +- include/portable.h.nt | 29 ++-- servers/slapd/daemon.c | 2 +- 7 files changed, 191 insertions(+), 176 deletions(-) diff --git a/acconfig.h b/acconfig.h index 9e495f99d7..72737b44fa 100644 --- a/acconfig.h +++ b/acconfig.h @@ -104,6 +104,9 @@ /* define this if you want no thread support */ #undef NO_THREADS +/* define this if the thread package is preemptive */ +#undef PREEMPTIVE_THREADS + /* define this for ACL Group support */ #undef SLAPD_ACLGROUPS @@ -131,8 +134,5 @@ /* define this to use SLAPD shell backend */ #undef SLAPD_SHELL -/* define this if the thread package is preemptive */ -#undef THREAD_PREEMPTIVE - /* Leave that blank line there!! Autoheader needs it. */ diff --git a/configure b/configure index 99e68c4afe..f6e6ddf6df 100755 --- a/configure +++ b/configure @@ -3252,7 +3252,7 @@ fi if test $ol_with_preemptive = yes ; then cat >> confdefs.h <<\EOF -#define THREAD_PREEMPTIVE 1 +#define PREEMPTIVE_THREADS 1 EOF fi @@ -3510,6 +3510,10 @@ if test $ol_link_threads = no ; then cat >> confdefs.h <<\EOF #define NO_THREADS 1 +EOF + + cat >> confdefs.h <<\EOF +#define PREEMPTIVE_THREADS 1 EOF LTHREAD_LIBS="" @@ -3518,13 +3522,13 @@ fi ol_link_ldbm=no if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then echo $ac_n "checking for DB2 library""... $ac_c" 1>&6 -echo "configure:3522: checking for DB2 library" >&5 +echo "configure:3526: checking for DB2 library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6 -echo "configure:3528: checking for db_open in -ldb" >&5 +echo "configure:3532: checking for db_open in -ldb" >&5 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3532,7 +3536,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3574,17 +3578,17 @@ for ac_hdr in db.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3578: checking for $ac_hdr" >&5 +echo "configure:3582: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3612,13 +3616,13 @@ done if test $ac_cv_header_db_h = yes ; then echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6 -echo "configure:3616: checking if db.h is DB2" >&5 +echo "configure:3620: checking if db.h is DB2" >&5 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3650,7 +3654,7 @@ fi echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6 -echo "configure:3654: checking for Berkeley DB2" >&5 +echo "configure:3658: checking for Berkeley DB2" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3696,18 +3700,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6 -echo "configure:3700: checking for Berkeley DB library" >&5 +echo "configure:3704: checking for Berkeley DB library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:3706: checking for dbopen" >&5 +echo "configure:3710: checking for dbopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -3749,7 +3753,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:3753: checking for dbopen in -ldb" >&5 +echo "configure:3757: checking for dbopen in -ldb" >&5 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3757,7 +3761,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3803,17 +3807,17 @@ for ac_hdr in db_185.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3807: checking for $ac_hdr" >&5 +echo "configure:3811: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3849,7 +3853,7 @@ fi echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6 -echo "configure:3853: checking for Berkeley DB" >&5 +echo "configure:3857: checking for Berkeley DB" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3902,17 +3906,17 @@ if test $ol_with_ldbm_api = manual ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3906: checking for $ac_hdr" >&5 +echo "configure:3910: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3947,18 +3951,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then echo $ac_n "checking for GDBM library""... $ac_c" 1>&6 -echo "configure:3951: checking for GDBM library" >&5 +echo "configure:3955: checking for GDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6 -echo "configure:3957: checking for gdbm_open" >&5 +echo "configure:3961: checking for gdbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gdbm_open=yes" else @@ -4000,7 +4004,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:4004: checking for gdbm_open in -lgdbm" >&5 +echo "configure:4008: checking for gdbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4008,7 +4012,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4054,17 +4058,17 @@ echo "$ac_t""$ol_cv_lib_gdbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4058: checking for $ac_hdr" >&5 +echo "configure:4062: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4072: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4091,7 +4095,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:4095: checking for db" >&5 +echo "configure:4099: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4125,18 +4129,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = ndbm ; then echo $ac_n "checking for NDBM library""... $ac_c" 1>&6 -echo "configure:4129: checking for NDBM library" >&5 +echo "configure:4133: checking for NDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:4135: checking for dbm_open" >&5 +echo "configure:4139: checking for dbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -4178,7 +4182,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6 -echo "configure:4182: checking for dbm_open in -lndbm" >&5 +echo "configure:4186: checking for dbm_open in -lndbm" >&5 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4186,7 +4190,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lndbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4217,7 +4221,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:4221: checking for dbm_open in -ldbm" >&5 +echo "configure:4225: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4225,7 +4229,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4273,17 +4277,17 @@ echo "$ac_t""$ol_cv_lib_ndbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4277: checking for $ac_hdr" >&5 +echo "configure:4281: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4310,7 +4314,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:4314: checking for db" >&5 +echo "configure:4318: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4358,7 +4362,7 @@ fi if test $ol_enable_wrappers = yes ; then echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6 -echo "configure:4362: checking for hosts_access in -lwrap" >&5 +echo "configure:4366: checking for hosts_access in -lwrap" >&5 ac_lib_var=`echo wrap'_'hosts_access | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4366,7 +4370,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lwrap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4423,17 +4427,17 @@ for ac_hdr in termcap.h ncurses.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4427: checking for $ac_hdr" >&5 +echo "configure:4431: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4437: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4441: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4462,7 +4466,7 @@ done if test $ol_link_termcap = no ; then echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6 -echo "configure:4466: checking for tputs in -ltermcap" >&5 +echo "configure:4470: checking for tputs in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4470,7 +4474,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4514,7 +4518,7 @@ fi if test $ol_link_termcap = no ; then echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 -echo "configure:4518: checking for initscr in -lncurses" >&5 +echo "configure:4522: checking for initscr in -lncurses" >&5 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4522,7 +4526,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4575,12 +4579,12 @@ fi # FreeBSD (and others) have crypt(3) in -lcrypt if test $ol_enable_crypt != no ; then echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:4579: checking for crypt" >&5 +echo "configure:4583: checking for crypt" >&5 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -4622,7 +4626,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:4626: checking for crypt in -lcrypt" >&5 +echo "configure:4630: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4630,7 +4634,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4683,12 +4687,12 @@ EOF fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:4687: checking for ANSI C header files" >&5 +echo "configure:4691: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4696,7 +4700,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4704: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4713,7 +4717,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -4731,7 +4735,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -4752,7 +4756,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -4763,7 +4767,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:4767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -4791,12 +4795,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:4795: checking for $ac_hdr that defines DIR" >&5 +echo "configure:4799: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -4804,7 +4808,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:4808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -4829,7 +4833,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:4833: checking for opendir in -ldir" >&5 +echo "configure:4837: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4837,7 +4841,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4870,7 +4874,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:4874: checking for opendir in -lx" >&5 +echo "configure:4878: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4878,7 +4882,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4912,12 +4916,12 @@ fi fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:4916: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:4920: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4933,7 +4937,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:4937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -4977,17 +4981,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4981: checking for $ac_hdr" >&5 +echo "configure:4985: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4995: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5015,12 +5019,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5019: checking for uid_t in sys/types.h" >&5 +echo "configure:5023: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -5049,7 +5053,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:5053: checking type of array argument to getgroups" >&5 +echo "configure:5057: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5057,7 +5061,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -5096,7 +5100,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -5120,12 +5124,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:5124: checking for mode_t" >&5 +echo "configure:5128: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5153,12 +5157,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:5157: checking for off_t" >&5 +echo "configure:5161: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5186,12 +5190,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:5190: checking for pid_t" >&5 +echo "configure:5194: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5219,12 +5223,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:5223: checking return type of signal handlers" >&5 +echo "configure:5227: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5241,7 +5245,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:5245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -5260,12 +5264,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:5264: checking for size_t" >&5 +echo "configure:5268: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5293,12 +5297,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5297: checking for uid_t in sys/types.h" >&5 +echo "configure:5301: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -5327,12 +5331,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:5331: checking for st_blksize in struct stat" >&5 +echo "configure:5335: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5340,7 +5344,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:5344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -5361,12 +5365,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:5365: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:5369: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5375,7 +5379,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:5379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -5396,12 +5400,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:5400: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:5404: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5409,7 +5413,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:5413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -5432,7 +5436,7 @@ fi echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6 -echo "configure:5436: checking if toupper() requires islower()" >&5 +echo "configure:5440: checking if toupper() requires islower()" >&5 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5441,7 +5445,7 @@ else ol_cv_c_upper_lower=safe else cat > conftest.$ac_ext < @@ -5453,7 +5457,7 @@ main() exit(1); } EOF -if { (eval echo configure:5457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ol_cv_c_upper_lower=no else @@ -5476,12 +5480,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:5480: checking for working const" >&5 +echo "configure:5484: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -5553,7 +5557,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:5557: checking for 8-bit clean memcmp" >&5 +echo "configure:5561: 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 @@ -5561,7 +5565,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -5589,12 +5593,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:5593: checking for strftime" >&5 +echo "configure:5597: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -5639,7 +5643,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:5643: checking for strftime in -lintl" >&5 +echo "configure:5647: 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 @@ -5647,7 +5651,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5685,12 +5689,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:5689: checking for vprintf" >&5 +echo "configure:5693: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -5737,12 +5741,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:5741: checking for _doprnt" >&5 +echo "configure:5745: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -5790,7 +5794,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:5794: checking for wait3 that fills in rusage" >&5 +echo "configure:5798: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5798,7 +5802,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -5829,7 +5833,7 @@ main() { } } EOF -if { (eval echo configure:5833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -5883,12 +5887,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5887: checking for $ac_func" >&5 +echo "configure:5891: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5939,12 +5943,12 @@ done for ac_func in getopt strdup tempnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5943: checking for $ac_func" >&5 +echo "configure:5947: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5997,13 +6001,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:6001: checking declaration of sys_errlist" >&5 +echo "configure:6005: 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 < @@ -6013,7 +6017,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:6017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -6034,20 +6038,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:6038: checking existence of sys_errlist" >&5 +echo "configure:6042: 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 < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:6051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index 77052383f7..cbe71429a0 100644 --- a/configure.in +++ b/configure.in @@ -485,7 +485,7 @@ if test $ol_with_threads = auto -o $ol_with_threads = lwp ; then fi if test $ol_with_preemptive = yes ; then - AC_DEFINE(THREAD_PREEMPTIVE,1) + AC_DEFINE(PREEMPTIVE_THREADS,1) fi if test $ol_with_threads = manual ; then @@ -514,6 +514,7 @@ if test $ol_link_threads = no ; then fi AC_DEFINE(NO_THREADS,1) + AC_DEFINE(PREEMPTIVE_THREADS,1) LTHREAD_LIBS="" fi diff --git a/include/lthread.h b/include/lthread.h index b79498929d..cf27dbd88d 100644 --- a/include/lthread.h +++ b/include/lthread.h @@ -20,8 +20,6 @@ LDAP_BEGIN_DECL #if defined( HAVE_DCE ) -/* dce threads are preemptive */ - #define pthread_attr_init( a ) pthread_attr_create( a ) #define pthread_attr_destroy( a ) pthread_attr_delete( a ) #define pthread_attr_setdetachstate( a, b ) \ @@ -178,11 +176,16 @@ LDAP_END_DECL * * ***********************************/ +LDAP_BEGIN_DECL + #ifndef NO_THREADS #define NO_THREADS 1 #endif -LDAP_BEGIN_DECL +#ifndef PREEMPTIVE_THREADS +/* treat no threads as preemptive */ +#define PREEMPTIVE_THREADS 1 +#endif typedef void *(*VFP)(); diff --git a/include/portable.h.in b/include/portable.h.in index 4ae6665892..831e522fe0 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -191,6 +191,9 @@ is provided ``as is'' without express or implied warranty. /* define this if you want no thread support */ #undef NO_THREADS +/* define this if the thread package is preemptive */ +#undef PREEMPTIVE_THREADS + /* define this for ACL Group support */ #undef SLAPD_ACLGROUPS @@ -218,9 +221,6 @@ is provided ``as is'' without express or implied warranty. /* define this to use SLAPD shell backend */ #undef SLAPD_SHELL -/* define this if the thread package is preemptive */ -#undef THREAD_PREEMPTIVE - /* Define if you have the bcopy function. */ #undef HAVE_BCOPY diff --git a/include/portable.h.nt b/include/portable.h.nt index d715fb1bbe..ae613ff498 100644 --- a/include/portable.h.nt +++ b/include/portable.h.nt @@ -48,6 +48,11 @@ typedef char * caddr_t; /* we have */ #define HAVE_IO_H 1 +/* we have */ +#define HAVE_PROCESS_H 1 + +/* --------------------------------------------------- */ + /* Define if on AIX 3. System headers sometimes define this. We just want to avoid a redefinition error message. */ @@ -120,9 +125,8 @@ typedef char * caddr_t; /* Define to `int' if doesn't define. */ #define uid_t long -/* Define if your processor stores words with the most significant - byte first (like Motorola and SPARC, unlike Intel and VAX). */ -/* #undef WORDS_BIGENDIAN */ +/* define this if toupper() requires tolower() */ +#define C_UPPER_LOWER /* define this if sys_errlist is not defined in stdio.h or errno.h */ /* #undef DECL_SYS_ERRLIST */ @@ -151,9 +155,6 @@ typedef char * caddr_t; /* define if you have Sun LWP (SunOS style) */ /* #undef HAVE_LWP */ -/* define if you have Sun LWP (Solaris style) */ -/* #undef HAVE_LWP_THR */ - /* define if you have -lncurses */ /* #undef HAVE_NCURSES */ @@ -178,6 +179,9 @@ typedef char * caddr_t; /* define if you have -ltermcap */ /* #undef HAVE_TERMCAP */ +/* define if you have Solaris LWP Threads */ +/* #undef HAVE_THR */ + /* define this for connectionless LDAP support */ /* #undef LDAP_CONNECTIONLESS */ @@ -185,7 +189,7 @@ typedef char * caddr_t; #define LDAP_DEBUG 1 /* define this for LDAP DNS support */ -/* #undef LDAP_DNS */ +#define LDAP_DNS 1 /* define this to remove -lldap cache support */ /* #undef LDAP_NOCACHE */ @@ -194,7 +198,7 @@ typedef char * caddr_t; #define LDAP_REFERRALS 1 /* define this for LDAP User Interface support */ -#define LDAP_LIBUI 1 +/* #undef LDAP_LIBUI */ /* define this to use DBBTREE w/ LDBM backend */ /* #undef LDBM_USE_DBBTREE */ @@ -208,6 +212,9 @@ typedef char * caddr_t; /* define this if you want no thread support */ #define NO_THREADS 1 +/* define this if the thread package is preemptive */ +#define PREEMPTIVE_THREADS 1 + /* define this for ACL Group support */ #define SLAPD_ACLGROUPS @@ -235,9 +242,6 @@ typedef char * caddr_t; /* define this to use SLAPD shell backend */ /* #undef SLAPD_SHELL */ -/* define this if the thread package is preemptive */ -/* #undef THREAD_PREEMPTIVE */ - /* Define if you have the bcopy function. */ /* #undef HAVE_BCOPY */ @@ -265,6 +269,9 @@ typedef char * caddr_t; /* Define if you have the memmove function. */ #define HAVE_MEMMOVE 1 +/* Define if you have the mkstemp function. */ +/* #undef HAVE_MKSTEMP */ + /* Define if you have the mktime function. */ #define HAVE_MKTIME 1 diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index d95c0a059e..d863a6a9c5 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -212,7 +212,7 @@ slapd_daemon( Debug( LDAP_DEBUG_CONNS, "before select active_threads %d\n", active_threads, 0, 0 ); -#if defined(THREAD_PREEMPTIVE) || defined(NO_THREADS) +#ifdef PREEMPTIVE_THREADS tvp = NULL; #else tvp = active_threads ? &zero : NULL; From 18a3335172a50be2527efa97d5e15a529049abd0 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 22 Oct 1998 19:37:05 +0000 Subject: [PATCH 131/148] Blindly added Autoconf support to ldapd. --- configure | 173 ++++++++++++++++++----------------- configure.in | 41 +++++---- include/ac/syslog.h | 7 +- include/portable.h.in | 3 + include/portable.h.nt | 3 + servers/ldapd/abandon.c | 8 +- servers/ldapd/add.c | 9 +- servers/ldapd/association.c | 23 +++-- servers/ldapd/bind.c | 32 ++++--- servers/ldapd/certificate.c | 13 ++- servers/ldapd/common.h | 24 ++--- servers/ldapd/compare.c | 10 +- servers/ldapd/delete.c | 10 +- servers/ldapd/detach.c | 35 ++++--- servers/ldapd/error.c | 10 +- servers/ldapd/kerberos.c | 14 +-- servers/ldapd/main.c | 136 ++++++++++++++++----------- servers/ldapd/message.c | 21 +++-- servers/ldapd/modify.c | 12 ++- servers/ldapd/modrdn.c | 10 +- servers/ldapd/proto-ldapd.h | 134 ++++++++++++++------------- servers/ldapd/request.c | 67 +++++++------- servers/ldapd/result.c | 39 ++++---- servers/ldapd/search.c | 94 ++++++++++--------- servers/ldapd/setproctitle.c | 2 + servers/ldapd/syntax.c | 18 ++-- servers/ldapd/util.c | 15 ++- 27 files changed, 526 insertions(+), 437 deletions(-) diff --git a/configure b/configure index f6e6ddf6df..2f0cf6241d 100755 --- a/configure +++ b/configure @@ -4958,40 +4958,41 @@ EOF fi for ac_hdr in \ - stddef.h \ - errno.h \ - fcntl.h \ - filio.h \ - getopt.h \ - limits.h \ - malloc.h \ - regex.h \ - sgtty.h \ - sys/file.h \ - sys/errno.h \ - sys/ioctl.h \ - sys/param.h \ - sys/socket.h\ - sys/time.h \ - sys/types.h \ - syslog.h \ - termios.h \ - unistd.h \ + stddef.h \ + errno.h \ + fcntl.h \ + filio.h \ + getopt.h \ + limits.h \ + malloc.h \ + regex.h \ + sgtty.h \ + sys/file.h \ + sys/errno.h \ + sys/ioctl.h \ + sys/param.h \ + sys/socket.h \ + sys/syslog.h \ + sys/time.h \ + sys/types.h \ + syslog.h \ + termios.h \ + unistd.h \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4985: checking for $ac_hdr" >&5 +echo "configure:4986: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4995: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5019,12 +5020,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5023: checking for uid_t in sys/types.h" >&5 +echo "configure:5024: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -5053,7 +5054,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:5057: checking type of array argument to getgroups" >&5 +echo "configure:5058: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5061,7 +5062,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -5100,7 +5101,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -5124,12 +5125,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:5128: checking for mode_t" >&5 +echo "configure:5129: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5157,12 +5158,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:5161: checking for off_t" >&5 +echo "configure:5162: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5190,12 +5191,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:5194: checking for pid_t" >&5 +echo "configure:5195: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5223,12 +5224,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:5227: checking return type of signal handlers" >&5 +echo "configure:5228: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5245,7 +5246,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:5249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -5264,12 +5265,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:5268: checking for size_t" >&5 +echo "configure:5269: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5297,12 +5298,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5301: checking for uid_t in sys/types.h" >&5 +echo "configure:5302: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -5331,12 +5332,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:5335: checking for st_blksize in struct stat" >&5 +echo "configure:5336: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5344,7 +5345,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:5348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -5365,12 +5366,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:5369: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:5370: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5379,7 +5380,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:5383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -5400,12 +5401,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:5404: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:5405: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5413,7 +5414,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:5417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -5436,7 +5437,7 @@ fi echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6 -echo "configure:5440: checking if toupper() requires islower()" >&5 +echo "configure:5441: checking if toupper() requires islower()" >&5 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5445,7 +5446,7 @@ else ol_cv_c_upper_lower=safe else cat > conftest.$ac_ext < @@ -5457,7 +5458,7 @@ main() exit(1); } EOF -if { (eval echo configure:5461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ol_cv_c_upper_lower=no else @@ -5480,12 +5481,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:5484: checking for working const" >&5 +echo "configure:5485: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -5557,7 +5558,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:5561: checking for 8-bit clean memcmp" >&5 +echo "configure:5562: 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 @@ -5565,7 +5566,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -5593,12 +5594,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:5597: checking for strftime" >&5 +echo "configure:5598: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -5643,7 +5644,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:5647: checking for strftime in -lintl" >&5 +echo "configure:5648: 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 @@ -5651,7 +5652,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5689,12 +5690,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:5693: checking for vprintf" >&5 +echo "configure:5694: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -5741,12 +5742,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:5745: checking for _doprnt" >&5 +echo "configure:5746: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -5794,7 +5795,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:5798: checking for wait3 that fills in rusage" >&5 +echo "configure:5799: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5802,7 +5803,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -5833,7 +5834,7 @@ main() { } } EOF -if { (eval echo configure:5837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -5887,12 +5888,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5891: checking for $ac_func" >&5 +echo "configure:5892: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5943,12 +5944,12 @@ done for ac_func in getopt strdup tempnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5947: checking for $ac_func" >&5 +echo "configure:5948: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6001,13 +6002,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:6005: checking declaration of sys_errlist" >&5 +echo "configure:6006: 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 < @@ -6017,7 +6018,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:6021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -6038,20 +6039,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:6042: checking existence of sys_errlist" >&5 +echo "configure:6043: 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 < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:6055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index cbe71429a0..3c1ed4fc77 100644 --- a/configure.in +++ b/configure.in @@ -685,26 +685,27 @@ dnl Checks for header files. AC_HEADER_STDC AC_HEADER_DIRENT AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS( \ - stddef.h \ - errno.h \ - fcntl.h \ - filio.h \ - getopt.h \ - limits.h \ - malloc.h \ - regex.h \ - sgtty.h \ - sys/file.h \ - sys/errno.h \ - sys/ioctl.h \ - sys/param.h \ - sys/socket.h\ - sys/time.h \ - sys/types.h \ - syslog.h \ - termios.h \ - unistd.h \ +AC_CHECK_HEADERS( \ + stddef.h \ + errno.h \ + fcntl.h \ + filio.h \ + getopt.h \ + limits.h \ + malloc.h \ + regex.h \ + sgtty.h \ + sys/file.h \ + sys/errno.h \ + sys/ioctl.h \ + sys/param.h \ + sys/socket.h \ + sys/syslog.h \ + sys/time.h \ + sys/types.h \ + syslog.h \ + termios.h \ + unistd.h \ ) dnl ---------------------------------------------------------------- diff --git a/include/ac/syslog.h b/include/ac/syslog.h index d5d4e26201..c7afb100ba 100644 --- a/include/ac/syslog.h +++ b/include/ac/syslog.h @@ -4,8 +4,11 @@ #ifndef _AC_SYSLOG_H_ #define _AC_SYSLOG_H_ -#ifdef HAVE_SYSLOG_H +#if defined( HAVE_SYSLOG_H ) #include +#elif defined ( HAVE_SYS_SYSLOG_H ) +#include +#endif #if defined( LOG_NDELAY ) && defined( LOG_NOWAIT ) # define OPENLOG_OPTIONS ( LOG_PID | LOG_NDELAY | LOG_NOWAIT ) @@ -17,6 +20,4 @@ # define OPENLOG_OPTIONS ( LOG_PID ) #endif -#endif /* syslog.h */ - #endif /* _AC_SYSLOG_H_ */ diff --git a/include/portable.h.in b/include/portable.h.in index 831e522fe0..c306baebc4 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -410,6 +410,9 @@ is provided ``as is'' without express or implied warranty. /* Define if you have the header file. */ #undef HAVE_SYS_SOCKET_H +/* Define if you have the header file. */ +#undef HAVE_SYS_SYSLOG_H + /* Define if you have the header file. */ #undef HAVE_SYS_TIME_H diff --git a/include/portable.h.nt b/include/portable.h.nt index ae613ff498..13a155fc44 100644 --- a/include/portable.h.nt +++ b/include/portable.h.nt @@ -428,6 +428,9 @@ typedef char * caddr_t; /* Define if you have the header file. */ /* #undef HAVE_SYS_SOCKET_H */ +/* Define if you have the header file. */ +/* #undef HAVE_SYS_SYSLOG_H */ + /* Define if you have the header file. */ /* #undef HAVE_SYS_TIME_H */ diff --git a/servers/ldapd/abandon.c b/servers/ldapd/abandon.c index 3e51192590..899bf3f449 100644 --- a/servers/ldapd/abandon.c +++ b/servers/ldapd/abandon.c @@ -10,15 +10,19 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include + +#include + #include #include #include #include #include #include -#include -#include + #include "lber.h" #include "ldap.h" #include "common.h" diff --git a/servers/ldapd/add.c b/servers/ldapd/add.c index cc76223a73..08bf49404b 100644 --- a/servers/ldapd/add.c +++ b/servers/ldapd/add.c @@ -10,20 +10,23 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include + +#include + #include #include #include #include #include #include -#include -#include #include "lber.h" #include "ldap.h" #include "common.h" -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 extern int ldap_compat; #define ADDTAG (ldap_compat == 20 ? OLD_LDAP_RES_ADD : LDAP_RES_ADD) #else diff --git a/servers/ldapd/association.c b/servers/ldapd/association.c index ab15d0460a..a24871b7db 100644 --- a/servers/ldapd/association.c +++ b/servers/ldapd/association.c @@ -10,27 +10,32 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include -#include + +#include +#include +#include +#include + #include #include -#include -#include -#include -#include -#include #include "lber.h" #include "ldap.h" + #if ISODEPACKAGE == IC #include #else #include #endif #include "common.h" -#ifdef SVR4 -#if !defined(_AIX) && !defined(__osf__) -#include + +#ifdef HAVE_SYS_IOCTL_H +#include #endif +#ifdef HAVE_SYS_FILIO_H +#include #endif #ifdef __hpux diff --git a/servers/ldapd/bind.c b/servers/ldapd/bind.c index db76ff0bf7..defcb19e0a 100644 --- a/servers/ldapd/bind.c +++ b/servers/ldapd/bind.c @@ -10,21 +10,23 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include -#include -#include -#include -#include + +#include + #include #include #include #include #include + #include "lber.h" #include "ldap.h" #include "common.h" -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 extern int ldap_compat; #define BINDTAG (ldap_compat == 20 ? OLD_LDAP_RES_BIND : LDAP_RES_BIND) #else @@ -75,7 +77,7 @@ do_bind( LDAP_PROTOCOL_ERROR, NULL, "Decoding error" ); return( 0 ); } -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 if ( ldap_compat == 30 ) method = ber_skip_tag( ber, &len ); else @@ -141,7 +143,7 @@ do_bind_real( struct DSError dse; char *dn = dsaconn->c_dn; int err; -#ifdef KERBEROS +#ifdef HAVE_KERBEROS u_long nonce; #endif extern DN ldap_str2dn(); @@ -155,10 +157,10 @@ do_bind_real( } switch ( dsaconn->c_method ) { -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 case OLD_LDAP_AUTH_SIMPLE: #endif -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 case LDAP_AUTH_SIMPLE_30: #endif case LDAP_AUTH_SIMPLE: /* x.500 simple authentication */ @@ -176,11 +178,11 @@ do_bind_real( ba.dba_version = DBA_VERSION_V1988; break; -#ifdef KERBEROS -#ifdef COMPAT20 +#ifdef HAVE_KERBEROS +#ifdef LDAP_COMPAT20 case OLD_LDAP_AUTH_KRBV4: #endif -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 case LDAP_AUTH_KRBV41_30: #endif case LDAP_AUTH_KRBV41: /* kerberos authentication to ldap server */ @@ -188,10 +190,10 @@ do_bind_real( dsaconn->c_credlen ) ); break; -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 case OLD_LDAP_AUTH_KRBV42: #endif -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 case LDAP_AUTH_KRBV42_30: #endif case LDAP_AUTH_KRBV42: /* kerberos authentication to x500 dsa */ @@ -254,7 +256,7 @@ do_bind_real( Debug( LDAP_DEBUG_TRACE, "dap_bind successful\n", 0, 0, 0 ); -#ifdef KERBEROS +#ifdef HAVE_KERBEROS /* XXX why doesn't this work?? if ( dsaconn->c_method == LDAP_AUTH_KRBV42 && kerberos_check_mutual( &br, nonce ) != 0 ) { diff --git a/servers/ldapd/certificate.c b/servers/ldapd/certificate.c index 228d65a6e8..1299b0cf55 100644 --- a/servers/ldapd/certificate.c +++ b/servers/ldapd/certificate.c @@ -3,18 +3,21 @@ * donated by Eric Rosenquist and BNR */ +#include "portable.h" + #include -#include -#include -#include -#include -#include + +#include +#include +#include + #include #include #include #include #include #include + #include "lber.h" #include "ldap.h" #include "common.h" diff --git a/servers/ldapd/common.h b/servers/ldapd/common.h index 9239a72f7d..82ef371fbc 100644 --- a/servers/ldapd/common.h +++ b/servers/ldapd/common.h @@ -10,6 +10,9 @@ * is provided ``as is'' without express or implied warranty. */ +#ifndef _LDAPD_COMMON_H +#define _LDAPD_COMMON_H 1 + /* * This structure represents an association to a dsa. There is one of * these for each association open (a new association is made for each @@ -41,32 +44,17 @@ struct msg { LDAPMod *m_mods; /* for modify operations only */ BerElement *m_ber; /* the unparsed ber for the op */ struct conn *m_conn; /* connection structure */ -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS int m_cldap; /* connectionless transport? (CLDAP) */ struct sockaddr m_clientaddr; /* client address (if using CLDAP) */ DN m_searchbase; /* base used in search */ -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ struct msg *m_next; }; #define DEFAULT_TIMEOUT 3600 /* idle client connections */ #define DEFAULT_REFERRAL_TIMEOUT 900 /* DSA connections */ -#ifdef NEEDPROTOS #include "proto-ldapd.h" -#else -extern struct msg *add_msg(); -extern struct msg *get_msg(); -extern struct msg *get_cldap_msg(); -extern int del_msg(); -extern struct conn *conn_getfd(); -extern struct conn *conn_find(); -extern struct conn *conn_dup(); -extern void conn_del(); - -extern AttributeValue ldap_str2AttrV(); -extern DN ldap_str2dn(); -extern void ldap_str2alg(); -extern void ldap_print_algid(); -#endif /* don't need protos */ +#endif diff --git a/servers/ldapd/compare.c b/servers/ldapd/compare.c index 88ac1604f7..7cf0833d10 100644 --- a/servers/ldapd/compare.c +++ b/servers/ldapd/compare.c @@ -10,20 +10,24 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include + +#include + #include #include #include #include #include #include -#include -#include + #include "lber.h" #include "ldap.h" #include "common.h" -#ifdef COMPAT20 +#ifdef HAVE_COMPAT20 extern int ldap_compat; #define COMPTAG (ldap_compat == 20 ? OLD_LDAP_RES_COMPARE : LDAP_RES_COMPARE) #else diff --git a/servers/ldapd/delete.c b/servers/ldapd/delete.c index 57fe76ec07..008f341ee3 100644 --- a/servers/ldapd/delete.c +++ b/servers/ldapd/delete.c @@ -10,20 +10,24 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include + #include #include #include #include #include #include -#include -#include + +#include + #include "lber.h" #include "ldap.h" #include "common.h" -#ifdef COMPAT20 +#ifdef HAVE_COMPAT20 extern int ldap_compat; #define DELTAG (ldap_compat == 20 ? OLD_LDAP_RES_DELETE : LDAP_RES_DELETE) #else diff --git a/servers/ldapd/detach.c b/servers/ldapd/detach.c index ff435eea82..672ccfda13 100644 --- a/servers/ldapd/detach.c +++ b/servers/ldapd/detach.c @@ -10,20 +10,17 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include -#include -#ifdef SVR4 + +#include +#include + #include -#endif /* svr4 */ #include #include #include -#include -#include "portable.h" - -#ifdef USE_SYSCONF -#include -#endif /* USE_SYSCONF */ detach() @@ -33,11 +30,19 @@ detach() extern int ldap_debug; #endif -#ifdef USE_SYSCONF +#ifdef HAVE_SYSCONF nbits = sysconf( _SC_OPEN_MAX ); -#else /* USE_SYSCONF */ +#elif HAVE_GETDTABLESIZE nbits = getdtablesize(); -#endif /* USE_SYSCONF */ +#else + nbits = FD_SETSIZE +#endif + +#ifdef FD_SETSIZE + if( nbits > FD_SETSIZE ) { + nbits = FD_SETSIZE; + } +#endif /* FD_SETSIZE */ #ifdef LDAP_DEBUG if ( ldap_debug == 0 ) { @@ -74,14 +79,14 @@ detach() (void) dup2( sd, 2 ); close( sd ); -#ifdef USE_SETSID +#ifdef HAVE_SETSID setsid(); -#else /* USE_SETSID */ +#else /* HAVE_SETSID */ if ( (sd = open( "/dev/tty", O_RDWR )) != -1 ) { (void) ioctl( sd, TIOCNOTTY, NULL ); (void) close( sd ); } -#endif /* USE_SETSID */ +#endif /* HAVE_SETSID */ #ifdef LDAP_DEBUG } #endif diff --git a/servers/ldapd/error.c b/servers/ldapd/error.c index e35448c3f1..5974817988 100644 --- a/servers/ldapd/error.c +++ b/servers/ldapd/error.c @@ -10,14 +10,18 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include + +#include +#include + #include #include #include #include -#include -#include -#include + #include "lber.h" #include "ldap.h" diff --git a/servers/ldapd/kerberos.c b/servers/ldapd/kerberos.c index 937236e29a..5f7d9767a1 100644 --- a/servers/ldapd/kerberos.c +++ b/servers/ldapd/kerberos.c @@ -10,20 +10,22 @@ * is provided ``as is'' without express or implied warranty. */ -#ifdef KERBEROS +#include "portable.h" + +#ifdef HAVE_KERBEROS #include -#include -#include "krb.h" -#include -#include -#include + +#include +#include + #include #if ISODEPACKAGE == IC #include #else #include #endif + #include "lber.h" #include "ldap.h" #include "common.h" diff --git a/servers/ldapd/main.c b/servers/ldapd/main.c index 5626a34c4f..f5f421e512 100644 --- a/servers/ldapd/main.c +++ b/servers/ldapd/main.c @@ -17,36 +17,37 @@ * University of Minnesota Microcomputer Workstation and Networks Center */ +#include "portable.h" + #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef _AIX -#include -#endif -#include + +#include +#include +#include +#include +#include +#include +#include + #include #include -#include "portable.h" + #include "lber.h" #include "ldap.h" #include "common.h" -#ifdef USE_SYSCONF -#include -#endif /* USE_SYSCONF */ +#ifdef HAVE_TCPD +#include + +int allow_severity = LOG_INFO; +int deny_severity = LOG_NOTICE; +#endif /* TCP_WRAPPERS */ void log_and_exit(); static set_socket(); static do_queries(); -static SIG_FN wait4child(); -#ifdef CLDAP +static RETSIGTYPE wait4child(); +#ifdef LDAP_CONNECTIONLESS static udp_init(); #endif @@ -54,18 +55,18 @@ static udp_init(); int ldap_debug; #endif int version; -#ifdef COMPAT +#ifdef LDAP_COMPAT int ldap_compat; #endif int dosyslog; int do_tcp = 1; -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS int do_udp = 0; #endif int idletime = DEFAULT_TIMEOUT; int referral_connection_timeout = DEFAULT_REFERRAL_TIMEOUT; struct timeval conn_start_tv; -#ifdef KERBEROS +#ifdef HAVE_KERBEROS char *krb_ldap_service = "ldapserver"; char *krb_x500_service = "x500dsa"; char *krb_x500_instance; @@ -82,13 +83,13 @@ static usage( name ) char *name; { fprintf( stderr, "usage: %s [-d debuglvl] [-p port] [-l] [-c dsa] [-r referraltimeout]", name ); -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS fprintf( stderr, " [ -U | -t timeout ]" ); #else fprintf( stderr, " [ -t timeout ]" ); #endif fprintf( stderr, " [-I]" ); -#ifdef KERBEROS +#ifdef HAVE_KERBEROS fprintf( stderr, " [-i dsainstance]" ); #endif fprintf( stderr, "\n" ); @@ -99,7 +100,7 @@ int argc; char **argv; { int tcps, ns; -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS int udps; #endif int myport = LDAP_PORT; @@ -111,7 +112,7 @@ char **argv; int len; int dsapargc; char **dsapargv; - SIG_FN wait4child(); + RETSIGTYPE wait4child(); #ifndef NOSETPROCTITLE char title[80]; extern char **Argv; @@ -139,7 +140,7 @@ char **argv; dsapargv[2] = 0; dsapargv[3] = 0; dsapargc = 1; -#ifdef KERBEROS +#ifdef HAVE_KERBEROS kerberos_keyfile = ""; #endif @@ -178,7 +179,7 @@ char **argv; idletime = atoi( optarg ); break; -#ifdef KERBEROS +#ifdef HAVE_KERBEROS case 'f': /* kerberos key file */ kerberos_keyfile = strdup( optarg ); break; @@ -194,7 +195,7 @@ char **argv; RunFromInetd = 1; break; -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS case 'U': /* UDP only (no TCP) */ do_tcp = 0; do_udp = 1; @@ -206,7 +207,7 @@ char **argv; break; #endif /* NOTYET */ -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ default: usage( argv[0] ); @@ -219,7 +220,7 @@ char **argv; exit( 1 ); } -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS if ( do_udp && !do_tcp && idletime != DEFAULT_TIMEOUT ) { usage( argv[ 0 ] ); exit( 1 ); @@ -228,11 +229,19 @@ char **argv; Debug( LDAP_DEBUG_TRACE, "%s", Versionstr, 0, 0 ); -#ifdef USE_SYSCONF +#ifdef HAVE_SYSCONF dtblsize = sysconf( _SC_OPEN_MAX ); -#else /* USE_SYSCONF */ +#elif HAVE_GETDTABLESIZE dtblsize = getdtablesize(); -#endif /* USE_SYSCONF */ +#else + dtblsize = FD_SETSIZE; +#endif + +#ifdef FD_SETSIZE + if( dtblsize > FD_SETSIZE ) { + dtblsize = FD_SETSIZE; + } +#endif /* FD_SETSIZE */ #ifndef NOSETPROCTITLE /* for setproctitle */ @@ -292,17 +301,17 @@ char **argv; len = sizeof( socktype ); getsockopt( ns, SOL_SOCKET, SO_TYPE, &socktype, &len ); if ( socktype == SOCK_DGRAM ) { -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS Debug( LDAP_DEBUG_ARGS, "CLDAP request from unknown (%s)\n", inet_ntoa( from.sin_addr ), 0, 0 ); conn_start_tv.tv_sec = 0; udp_init( 0, 0 ); do_queries( ns, 1 ); -#else /* CLDAP */ +#else /* LDAP_CONNECTIONLESS */ Debug( LDAP_DEBUG_ARGS, - "Compile with -DCLDAP for UDP support\n",0,0,0 ); -#endif /* CLDAP */ + "Compile with -DLDAP_CONNECTIONLESS for UDP support\n",0,0,0 ); +#endif /* LDAP_CONNECTIONLESS */ exit( 0 ); } @@ -336,7 +345,7 @@ char **argv; if ( do_tcp ) tcps = set_socket( myport, 0 ); -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS if ( do_udp ) udps = udp_init( myport, 1 ); #endif @@ -347,7 +356,7 @@ char **argv; */ #ifndef NOSETPROCTITLE -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS sprintf( title, "listening %s/%s %d", do_tcp ? "tcp" : "", do_udp ? "udp" : "", myport ); #else @@ -360,7 +369,7 @@ char **argv; FD_ZERO( &readfds ); if ( do_tcp ) FD_SET( tcps, &readfds ); -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS if ( do_udp ) FD_SET( udps, &readfds ); #endif @@ -372,7 +381,7 @@ char **argv; continue; } -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS if ( do_udp && FD_ISSET( udps, &readfds ) ) { do_queries( udps, 1 ); } @@ -393,10 +402,31 @@ char **argv; hp = gethostbyaddr( (char *) &(from.sin_addr.s_addr), sizeof(from.sin_addr.s_addr), AF_INET ); + +#ifdef HAVE_TCPD + if ( !hosts_ctl("ldapd", (hp == NULL) ? "unknown" : hp->h_name, + inet_ntoa( from.sin_addr ), STRING_UNKNOWN ) { + + Debug( LDAP_DEBUG_ARGS, "connection from %s (%s) denied.\n", + (hp == NULL) ? "unknown" : hp->h_name, + inet_ntoa( from.sin_addr ), 0 ); + + if ( dosyslog ) { + syslog( LOG_NOTICE, "connection from %s (%s) denied.", + (hp == NULL) ? "unknown" : hp->h_name, + inet_ntoa( from.sin_addr ) ); + } + + close(ns); + continue; + } +#endif /* TCP_WRAPPERS */ + Debug( LDAP_DEBUG_ARGS, "connection from %s (%s)\n", (hp == NULL) ? "unknown" : hp->h_name, inet_ntoa( from.sin_addr ), 0 ); + if ( dosyslog ) { syslog( LOG_INFO, "connection from %s (%s)", (hp == NULL) ? "unknown" : hp->h_name, @@ -462,10 +492,10 @@ do_queries( int rc, i; struct timeval timeout; Sockbuf sb; -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS struct sockaddr saddr, faddr; struct sockaddr *saddrlist[ 1 ]; -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ Debug( LDAP_DEBUG_TRACE, "do_queries%s\n", udp ? " udp" : "", 0, 0 ); @@ -487,7 +517,7 @@ do_queries( (void) memset( (void *) &sb, '\0', sizeof( sb ) ); sb.sb_sd = clientsock; sb.sb_naddr = ( udp ) ? 1 : 0; -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS sb.sb_addrs = (void **)saddrlist; sb.sb_fromaddr = &faddr; sb.sb_useaddr = saddrlist[ 0 ] = &saddr; @@ -611,18 +641,20 @@ static set_socket( return( s ); } -static SIG_FN wait4child() +static RETSIGTYPE wait4child() { - WAITSTATUSTYPE status; +#ifndef HAVE_WAITPID + WAITSTATUSTYPE status; +#endif Debug( LDAP_DEBUG_TRACE, "parent: catching child status\n", 0, 0, 0 ); -#ifdef USE_WAITPID - while( waitpid( (pid_t) -1, 0, WAIT_FLAGS ) > 0 ) +#ifdef HAVE_WAITPID + while( waitpid( (pid_t) -1, NULL, WAIT_FLAGS ) > 0 ) ; /* NULL */ #else - while ( wait3( &status, WAIT_FLAGS, 0 ) > 0 ) - ; /* NULL */ + while ( wait3( &status, WAIT_FLAGS, 0 ) > 0 ) + ; /* NULL */ #endif (void) SIGNAL( SIGCHLD, (void *) wait4child ); @@ -648,7 +680,7 @@ log_and_exit( int exitcode ) } -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS static int udp_init( int port, diff --git a/servers/ldapd/message.c b/servers/ldapd/message.c index 19e07f64a4..4456295c2e 100644 --- a/servers/ldapd/message.c +++ b/servers/ldapd/message.c @@ -10,13 +10,16 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include -#include -#include -#include -#include + +#include +#include + #include #include + #include "lber.h" #include "ldap.h" #include "common.h" @@ -49,7 +52,7 @@ struct msg *add_msg( new->m_conn->c_refcnt++; new->m_next = NULL; -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS new->m_cldap = udp; new->m_searchbase = NULLDN; @@ -106,11 +109,11 @@ del_msg( struct msg *m ) conn_free( cur->m_conn ); modlist_free( cur->m_mods ); ber_free( cur->m_ber, 1 ); -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS if ( cur->m_searchbase != NULLDN ) { dn_free( cur->m_searchbase ); } -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ free( (char *) cur ); return( 0 ); @@ -146,7 +149,7 @@ send_msg( } -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS struct msg * get_cldap_msg( int msgid, @@ -169,4 +172,4 @@ get_cldap_msg( return( tmp ); } -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ diff --git a/servers/ldapd/modify.c b/servers/ldapd/modify.c index bbfd5ed82a..d2197c4039 100644 --- a/servers/ldapd/modify.c +++ b/servers/ldapd/modify.c @@ -10,16 +10,20 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include -#include + +#include +#include + #include #include #include #include #include #include -#include -#include + #include "lber.h" #include "ldap.h" #include "common.h" @@ -39,7 +43,7 @@ extern short ldap_rtl_syntax; extern short ldap_octetstring_syntax; -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 extern int ldap_compat; #define MODTAG (ldap_compat == 20 ? OLD_LDAP_RES_MODIFY : LDAP_RES_MODIFY) #else diff --git a/servers/ldapd/modrdn.c b/servers/ldapd/modrdn.c index d3d939eeb5..33ae4f8406 100644 --- a/servers/ldapd/modrdn.c +++ b/servers/ldapd/modrdn.c @@ -10,20 +10,24 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include + +#include + #include #include #include #include #include #include -#include -#include + #include "lber.h" #include "ldap.h" #include "common.h" -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 extern int ldap_compat; #define MODRDNTAG (ldap_compat == 20 ? OLD_LDAP_RES_MODRDN : LDAP_RES_MODRDN) #else diff --git a/servers/ldapd/proto-ldapd.h b/servers/ldapd/proto-ldapd.h index 9556c84e3d..a317c1ccfd 100644 --- a/servers/ldapd/proto-ldapd.h +++ b/servers/ldapd/proto-ldapd.h @@ -1,158 +1,160 @@ -#ifndef _PROTO_LDAPD -#define _PROTO_LDAPD +#ifndef _PROTO_LDAPD_H +#define _PROTO_LDAPD_H + +#include /* * abandon.c */ -int do_abandon( struct conn *dsaconn, BerElement *ber, int msgid ); +int do_abandon LDAP_P(( struct conn *dsaconn, BerElement *ber, int msgid )); /* * add.c */ -int do_add( Sockbuf *clientsb, struct msg *m, BerElement *ber ); +int do_add LDAP_P(( Sockbuf *clientsb, struct msg *m, BerElement *ber )); /* * association.c */ -struct conn *conn_dup( struct conn *cn ); -int conn_init(); -void conn_free( struct conn *conn ); -void conn_del( struct conn *conn ); -void conn_badfds(); -struct conn *conn_getfd( fd_set *fds ); -void conn_add( struct conn *new ); -struct conn *conn_find( struct conn *c ); -void conn_add( struct conn *new ); -void conn_close(); -int isclosed( int ad ); +struct conn *conn_dup LDAP_P(( struct conn *cn )); +int conn_init LDAP_P(()); +void conn_free LDAP_P(( struct conn *conn )); +void conn_del LDAP_P(( struct conn *conn )); +void conn_badfds LDAP_P(()); +struct conn *conn_getfd LDAP_P(( fd_set *fds )); +void conn_add LDAP_P(( struct conn *new )); +struct conn *conn_find LDAP_P(( struct conn *c )); +void conn_add LDAP_P(( struct conn *new )); +void conn_close LDAP_P(()); +int isclosed LDAP_P(( int ad )); /* * bind.c */ -int do_bind( Sockbuf *clientsb, struct msg *m, BerElement *ber, int *bound ); -int do_bind_real( struct conn *dsaconn, int *bound, char **matched ); +int do_bind LDAP_P(( Sockbuf *clientsb, struct msg *m, BerElement *ber, int *bound )); +int do_bind_real LDAP_P(( struct conn *dsaconn, int *bound, char **matched )); /* * certificate.c */ -int ldap_certif_print( PS ps, struct certificate *parm, int format ); -void ldap_print_algid( PS ps, struct alg_id *parm, int format ); -struct certificate *ldap_str2cert( char *str ); -void ldap_str2alg( char *str, struct alg_id *alg ); -void certif_init(); +int ldap_certif_print LDAP_P(( PS ps, struct certificate *parm, int format )); +void ldap_print_algid LDAP_P(( PS ps, struct alg_id *parm, int format )); +struct certificate *ldap_str2cert LDAP_P(( char *str )); +void ldap_str2alg LDAP_P(( char *str, struct alg_id *alg )); +void certif_init LDAP_P(()); /* * compare.c */ -int do_compare( Sockbuf *clientsb, struct msg *m, BerElement *ber ); +int do_compare LDAP_P(( Sockbuf *clientsb, struct msg *m, BerElement *ber )); /* * delete.c */ -int do_delete( Sockbuf *clientsb, struct msg *m, BerElement *ber ); +int do_delete LDAP_P(( Sockbuf *clientsb, struct msg *m, BerElement *ber )); /* * error.c */ -void print_error( struct DSError *e ); -int x500err2ldaperr( struct DSError *e, char **matched ); +void print_error LDAP_P(( struct DSError *e )); +int x500err2ldaperr LDAP_P(( struct DSError *e, char **matched )); /* * kerberos.c */ -int kerberosv4_ldap_auth( char *cred, long len ); +int kerberosv4_ldap_auth LDAP_P(( char *cred, long len )); /* * main.c */ -void log_and_exit( int exitcode ); +void log_and_exit LDAP_P(( int exitcode )); /* * message.c */ -struct msg *add_msg( int msgid, int msgtype, BerElement *ber, - struct conn *dsaconn, int udp, struct sockaddr *clientaddr ); -struct msg *get_msg( int uniqid ); -int del_msg( struct msg *m ); -void send_msg( struct conn *conn, Sockbuf *clientsb, int err, char *str ); -struct msg * get_cldap_msg( int msgid, int msgtype, struct sockaddr *fromaddr ); +struct msg *add_msg LDAP_P(( int msgid, int msgtype, BerElement *ber, + struct conn *dsaconn, int udp, struct sockaddr *clientaddr )); +struct msg *get_msg LDAP_P(( int uniqid )); +int del_msg LDAP_P(( struct msg *m )); +void send_msg LDAP_P(( struct conn *conn, Sockbuf *clientsb, int err, char *str )); +struct msg * get_cldap_msg LDAP_P(( int msgid, int msgtype, struct sockaddr *fromaddr )); /* * modify.c */ -int do_modify( Sockbuf *clientsb, struct msg *m, BerElement *ber ); -Attr_Sequence get_as( Sockbuf *clientsb, unsigned long op, struct msg *m, - char *type, struct berval **bvals ); -void modlist_free( LDAPMod *mods ); +int do_modify LDAP_P(( Sockbuf *clientsb, struct msg *m, BerElement *ber )); +Attr_Sequence get_as LDAP_P(( Sockbuf *clientsb, unsigned long op, struct msg *m, + char *type, struct berval **bvals )); +void modlist_free LDAP_P(( LDAPMod *mods )); /* * modrdn.c */ -int do_modrdn( Sockbuf *clientsb, struct msg *m, BerElement *ber ); +int do_modrdn LDAP_P(( Sockbuf *clientsb, struct msg *m, BerElement *ber )); /* * request.c */ -void client_request( Sockbuf *clientsb, struct conn *dsaconn, int udp ); -int do_request( Sockbuf *clientsb, struct msg *m, BerElement *ber, - int *bound ); -int initiate_dap_operation( int op, struct msg *m, void *arg ); +void client_request LDAP_P(( Sockbuf *clientsb, struct conn *dsaconn, int udp )); +int do_request LDAP_P(( Sockbuf *clientsb, struct msg *m, BerElement *ber, + int *bound )); +int initiate_dap_operation LDAP_P(( int op, struct msg *m, void *arg )); /* * result.c */ -void dsa_response( struct conn *dsaconn, Sockbuf *clientsb ); -int send_ldap_msgresult( Sockbuf *sb, unsigned long tag, struct msg *m, - int err, char *matched, char *text ); -int send_ldap_result( Sockbuf *sb, unsigned long tag, int msgid, int err, - char *matched, char *text ); +void dsa_response LDAP_P(( struct conn *dsaconn, Sockbuf *clientsb )); +int send_ldap_msgresult LDAP_P(( Sockbuf *sb, unsigned long tag, struct msg *m, + int err, char *matched, char *text )); +int send_ldap_result LDAP_P(( Sockbuf *sb, unsigned long tag, int msgid, int err, + char *matched, char *text )); /* * search.c */ -int do_search( Sockbuf *clientsb, struct msg *m, BerElement *ber ); +int do_search LDAP_P(( Sockbuf *clientsb, struct msg *m, BerElement *ber )); /* * syntax.c */ -void get_syntaxes(); -int dn_print_real( PS ps, DN dn, int format); -void ldap_dn_print( PS ps, DN dn, DN base, int format); -int encode_dn( BerElement *ber, DN dn, DN base); -int encode_attrs( BerElement *ber, Attr_Sequence as ); -AttributeValue bv_octet2AttrV( struct berval *bv ); -AttributeValue bv_asn2AttrV( struct berval *bv ); -AttributeValue ldap_strdn2AttrV( char *dnstr ); -DN ldap_str2dn( char *str ); -RDN ldap_str2rdn( char *rdnstr ); -AttributeValue ldap_str_at2AttrV( char *str, AttributeType type ); -AttributeValue ldap_str2AttrV( char *value, short syntax ); +void get_syntaxes LDAP_P(()); +int dn_print_real LDAP_P(( PS ps, DN dn, int format)); +void ldap_dn_print LDAP_P(( PS ps, DN dn, DN base, int format)); +int encode_dn LDAP_P(( BerElement *ber, DN dn, DN base)); +int encode_attrs LDAP_P(( BerElement *ber, Attr_Sequence as )); +AttributeValue bv_octet2AttrV LDAP_P(( struct berval *bv )); +AttributeValue bv_asn2AttrV LDAP_P(( struct berval *bv )); +AttributeValue ldap_strdn2AttrV LDAP_P(( char *dnstr )); +DN ldap_str2dn LDAP_P(( char *str )); +RDN ldap_str2rdn LDAP_P(( char *rdnstr )); +AttributeValue ldap_str_at2AttrV LDAP_P(( char *str, AttributeType type )); +AttributeValue ldap_str2AttrV LDAP_P(( char *value, short syntax )); /* * util.c */ -void bprint( char *data, int len ); -void charlist_free( char **cl ); -int get_ava( BerElement *ber, AVA *tava ); -int chase_referral( Sockbuf *clientsb, struct msg *m, struct DSError *err, - char **matched ); +void bprint LDAP_P(( char *data, int len )); +void charlist_free LDAP_P(( char **cl )); +int get_ava LDAP_P(( BerElement *ber, AVA *tava )); +int chase_referral LDAP_P(( Sockbuf *clientsb, struct msg *m, struct DSError *err, + char **matched )); #endif /* _proto_ldapd */ diff --git a/servers/ldapd/request.c b/servers/ldapd/request.c index 51b1d13fa1..77d59eb2f5 100644 --- a/servers/ldapd/request.c +++ b/servers/ldapd/request.c @@ -10,25 +10,22 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include -#include -#include -#include -#include -#include -#include -#include -#include -#include + +#include +#include +#include +#include +#include +#include + #include #include #include #include -#ifdef __hpux -#include -#else -#include -#endif + #include "lber.h" #include "ldap.h" #include "common.h" @@ -74,7 +71,7 @@ client_request( static int bound; extern char *bound_dn, *bound_pw; struct PSAPaddr *psap_cpy(); -#ifdef COMPAT +#ifdef LDAP_COMPAT extern int ldap_compat; #endif @@ -92,7 +89,7 @@ client_request( log_and_exit( 1 ); } -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS if ( udp && dosyslog ) { syslog( LOG_INFO, "UDP request from unknown (%s)", inet_ntoa( ((struct sockaddr_in *) @@ -105,7 +102,7 @@ client_request( trace_ber( tag, len, ber.ber_buf, stderr, 1, 1 ); #endif -#ifdef COMPAT +#ifdef LDAP_COMPAT /* * This tag should be a normal SEQUENCE tag. In release 2.0 this * tag is 0x10. In the new stuff this is 0x30. To distinguish @@ -159,7 +156,7 @@ client_request( return; } -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS if ( udp ) { char *logdn = NULL; @@ -172,16 +169,16 @@ client_request( free( logdn ); } } -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 if ( ldap_compat == 30 ) tag = ber_skip_tag( &ber, &len ); else #endif tag = ber_peek_tag( &ber, &len ); if ( !udp && bound == 0 && tag != LDAP_REQ_BIND -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 && tag != OLD_LDAP_REQ_BIND #endif ) { @@ -191,7 +188,7 @@ client_request( return; } -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS if (udp && tag != LDAP_REQ_SEARCH && tag != LDAP_REQ_ABANDON ) { send_ldap_result( clientsb, tag, msgid, LDAP_OPERATIONS_ERROR, NULL, "Only search is supported over UDP/CLDAP" ); @@ -216,7 +213,7 @@ client_request( copyofber = ber_dup( &ber ); m = add_msg( msgid, tag, copyofber, dsaconn, udp, -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS (struct sockaddr *)clientsb->sb_fromaddr ); #else NULL ); @@ -257,17 +254,17 @@ do_request( Debug( LDAP_DEBUG_TRACE, "do_request\n", 0, 0, 0 ); switch ( m->m_msgtype ) { -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 case OLD_LDAP_REQ_BIND: #endif case LDAP_REQ_BIND: resp_required = do_bind( clientsb, m, ber, bound ); break; -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 case OLD_LDAP_REQ_UNBIND: #endif -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 case LDAP_REQ_UNBIND_30: #endif case LDAP_REQ_UNBIND: @@ -275,55 +272,55 @@ do_request( log_and_exit( 0 ); break; -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 case OLD_LDAP_REQ_ADD: #endif case LDAP_REQ_ADD: resp_required = do_add( clientsb, m, ber ); break; -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 case OLD_LDAP_REQ_DELETE: #endif -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 case LDAP_REQ_DELETE_30: #endif case LDAP_REQ_DELETE: resp_required = do_delete( clientsb, m, ber ); break; -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 case OLD_LDAP_REQ_MODRDN: #endif case LDAP_REQ_MODRDN: resp_required = do_modrdn( clientsb, m, ber ); break; -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 case OLD_LDAP_REQ_MODIFY: #endif case LDAP_REQ_MODIFY: resp_required = do_modify( clientsb, m, ber ); break; -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 case OLD_LDAP_REQ_COMPARE: #endif case LDAP_REQ_COMPARE: resp_required = do_compare( clientsb, m, ber ); break; -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 case OLD_LDAP_REQ_SEARCH: #endif case LDAP_REQ_SEARCH: resp_required = do_search( clientsb, m, ber ); break; -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 case OLD_LDAP_REQ_ABANDON: #endif -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 case LDAP_REQ_ABANDON_30: #endif case LDAP_REQ_ABANDON: diff --git a/servers/ldapd/result.c b/servers/ldapd/result.c index 3f77032342..22eb9b933c 100644 --- a/servers/ldapd/result.c +++ b/servers/ldapd/result.c @@ -10,25 +10,24 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include -#include -#include -#include -#include + +#include +#include +#include + #include #include #include -#ifdef __hpux -#include -#else -#include -#endif + #include "lber.h" #include "ldap.h" #include "common.h" extern int dosyslog; -#ifdef COMPAT +#ifdef LDAP_COMPAT extern int ldap_compat; #endif @@ -131,7 +130,7 @@ dsa_response( return; } if ( m->m_msgtype == LDAP_REQ_SEARCH -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 || m->m_msgtype == OLD_LDAP_REQ_SEARCH #endif ) @@ -154,7 +153,7 @@ dsa_response( int bound, rc; switch ( m->m_msgtype ) { -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 case OLD_LDAP_REQ_ADD: case OLD_LDAP_REQ_MODIFY: case OLD_LDAP_REQ_MODRDN: @@ -162,7 +161,7 @@ dsa_response( case OLD_LDAP_REQ_COMPARE: case OLD_LDAP_REQ_SEARCH: #endif -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 case LDAP_REQ_DELETE_30: #endif case LDAP_REQ_ADD: @@ -283,7 +282,7 @@ send_ldap_msgresult( char *text ) { -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS if ( m->m_cldap ) { SAFEMEMCPY( (char *)sb->sb_useaddr, &m->m_clientaddr, sizeof( struct sockaddr )); @@ -308,19 +307,19 @@ send_ldap_result( { BerElement *ber; int rc; -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS int cldap; #endif extern int version; -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS cldap = ( sb->sb_naddr > 0 ); #endif Debug( LDAP_DEBUG_TRACE, "send_ldap_result\n", 0, 0, 0 ); if ( tag == LBER_DEFAULT ) -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 tag = ldap_compat == 20 ? OLD_LBER_SEQUENCE : LBER_SEQUENCE; #else tag = LBER_SEQUENCE; @@ -332,20 +331,20 @@ send_ldap_result( } if ( version != 1 ) { -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 if ( ldap_compat == 20 ) { rc = ber_printf( ber, "t{it{tess}}", OLD_LBER_SEQUENCE, msgid, tag, LBER_INTEGER, err, matched ? matched : "", text ); } else #endif -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 if ( ldap_compat == 30 ) { rc = ber_printf( ber, "{it{{ess}}}", msgid, tag, err, matched ? matched : "", text ); } else #endif -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS if ( cldap ) { rc = ber_printf( ber, "{is{t{ess}}}", msgid, "", tag, err, matched ? matched : "", text ); diff --git a/servers/ldapd/search.c b/servers/ldapd/search.c index b250d6371a..c923ce4720 100644 --- a/servers/ldapd/search.c +++ b/servers/ldapd/search.c @@ -10,16 +10,20 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include -#include + +#include +#include + #include #include #include #include #include #include -#include -#include + #include "lber.h" #include "ldap.h" #include "common.h" @@ -28,7 +32,7 @@ static get_filter(); static get_filter_list(); static get_substring_filter(); -#ifdef COMPAT +#ifdef LDAP_COMPAT extern int version; extern int ldap_compat; #define SEARCHRESTAG (ldap_compat == 20 ? OLD_LDAP_RES_SEARCH_RESULT : LDAP_RES_SEARCH_RESULT) @@ -182,11 +186,11 @@ do_search( rc = initiate_dap_operation( OP_SEARCH, m, &sa ); -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS if ( m->m_cldap ) m->m_searchbase = sa.sra_baseobject; else -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ dn_free( sa.sra_baseobject ); filter_free( sa.sra_filter ); @@ -240,14 +244,14 @@ static get_filter( BerElement *ber, Filter *filt ) err = 0; switch (tag = ber_peek_tag( ber, &len )) { -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 case OLD_LDAP_FILTER_EQUALITY: #endif case LDAP_FILTER_EQUALITY: Debug( LDAP_DEBUG_ARGS, "EQUALITY\n", 0, 0, 0 ); f->flt_type = FILTER_ITEM; f->FUITEM.fi_type = FILTERITEM_EQUALITY; -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 if ( ldap_compat == 30 ) (void) ber_skip_tag( ber, &len ); #endif @@ -258,7 +262,7 @@ static get_filter( BerElement *ber, Filter *filt ) } break; -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 case OLD_LDAP_FILTER_SUBSTRINGS: #endif case LDAP_FILTER_SUBSTRINGS: @@ -266,14 +270,14 @@ static get_filter( BerElement *ber, Filter *filt ) err = get_substring_filter( ber, f ); break; -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 case OLD_LDAP_FILTER_GE: #endif case LDAP_FILTER_GE: Debug( LDAP_DEBUG_ARGS, "GE\n", 0, 0, 0 ); f->flt_type = FILTER_ITEM; f->FUITEM.fi_type = FILTERITEM_GREATEROREQUAL; -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 if ( ldap_compat == 30 ) (void) ber_skip_tag( ber, &len ); #endif @@ -283,14 +287,14 @@ static get_filter( BerElement *ber, Filter *filt ) } break; -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 case OLD_LDAP_FILTER_LE: #endif case LDAP_FILTER_LE: Debug( LDAP_DEBUG_ARGS, "LE\n", 0, 0, 0 ); f->flt_type = FILTER_ITEM; f->FUITEM.fi_type = FILTERITEM_LESSOREQUAL; -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 if ( ldap_compat == 30 ) (void) ber_skip_tag( ber, &len ); #endif @@ -301,10 +305,10 @@ static get_filter( BerElement *ber, Filter *filt ) } break; -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 case OLD_LDAP_FILTER_PRESENT: #endif -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 case LDAP_FILTER_PRESENT_30: #endif case LDAP_FILTER_PRESENT: @@ -312,7 +316,7 @@ static get_filter( BerElement *ber, Filter *filt ) f->flt_type = FILTER_ITEM; f->FUITEM.fi_type = FILTERITEM_PRESENT; len = sizeof(typestr); -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 if ( ldap_compat == 30 ) (void) ber_skip_tag( ber, &len ); #endif @@ -323,14 +327,14 @@ static get_filter( BerElement *ber, Filter *filt ) return( LDAP_UNDEFINED_TYPE ); break; -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 case OLD_LDAP_FILTER_APPROX: #endif case LDAP_FILTER_APPROX: Debug( LDAP_DEBUG_ARGS, "APPROX\n", 0, 0, 0 ); f->flt_type = FILTER_ITEM; f->FUITEM.fi_type = FILTERITEM_APPROX; -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 if ( ldap_compat == 30 ) (void) ber_skip_tag( ber, &len ); #endif @@ -341,7 +345,7 @@ static get_filter( BerElement *ber, Filter *filt ) } break; -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 case OLD_LDAP_FILTER_AND: #endif case LDAP_FILTER_AND: @@ -350,7 +354,7 @@ static get_filter( BerElement *ber, Filter *filt ) err = get_filter_list( ber, f ); break; -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 case OLD_LDAP_FILTER_OR: #endif case LDAP_FILTER_OR: @@ -359,7 +363,7 @@ static get_filter( BerElement *ber, Filter *filt ) err = get_filter_list( ber, f ); break; -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 case OLD_LDAP_FILTER_NOT: #endif case LDAP_FILTER_NOT: @@ -389,7 +393,7 @@ static get_filter_list( BerElement *ber, Filter f ) Debug( LDAP_DEBUG_TRACE, "get_filter_list\n", 0, 0, 0 ); -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 if ( ldap_compat == 30 ) (void) ber_skip_tag( ber, &len ); #endif @@ -422,7 +426,7 @@ static get_substring_filter( BerElement *ber, Filter f ) Debug( LDAP_DEBUG_TRACE, "get_substring_filter\n", 0, 0, 0 ); -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 if ( ldap_compat == 30 ) (void) ber_skip_tag( ber, &len ); #endif @@ -444,7 +448,7 @@ static get_substring_filter( BerElement *ber, Filter f ) tag = ber_next_element( ber, &len, last ) ) { AV_Sequence avs, any_end; -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 if ( ldap_compat == 30 ) { if ( ber_scanf( ber, "{a}", &valstr ) == LBER_ERROR ) { return( LDAP_PROTOCOL_ERROR ); @@ -466,10 +470,10 @@ static get_substring_filter( BerElement *ber, Filter f ) return( LDAP_OPERATIONS_ERROR ); switch ( tag ) { -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 case OLD_LDAP_SUBSTRING_INITIAL: #endif -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 case LDAP_SUBSTRING_INITIAL_30: #endif case LDAP_SUBSTRING_INITIAL: @@ -482,10 +486,10 @@ static get_substring_filter( BerElement *ber, Filter f ) f->FUITEM.UNSUB.fi_sub_initial = avs; break; -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 case OLD_LDAP_SUBSTRING_ANY: #endif -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 case LDAP_SUBSTRING_ANY_30: #endif case LDAP_SUBSTRING_ANY: @@ -500,10 +504,10 @@ static get_substring_filter( BerElement *ber, Filter f ) any_end = avs; break; -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 case OLD_LDAP_SUBSTRING_FINAL: #endif -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 case LDAP_SUBSTRING_FINAL_30: #endif case LDAP_SUBSTRING_FINAL: @@ -546,7 +550,7 @@ search_result( correlate_search_results( sr ); } -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS if ( m->m_cldap ) { if ((ber = der_alloc()) == NULLBER ) { send_ldap_msgresult( sb, SEARCHRESTAG, m, @@ -565,9 +569,9 @@ search_result( for ( e = sr->CSR_entries; e != NULLENTRYINFO; e = e->ent_next ) { Debug( LDAP_DEBUG_ARGS, "\tentry:\n", 0, 0, 0 ); -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS if ( !m->m_cldap ) -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ if ( (ber = der_alloc()) == NULLBER ) { send_ldap_msgresult( sb, SEARCHRESTAG, m, @@ -575,7 +579,7 @@ search_result( return; } -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 if ( version == 1 ) { if ( ber_printf( ber, "t{it{", OLD_LBER_SEQUENCE, m->m_msgid, OLD_LDAP_RES_SEARCH_ENTRY ) == -1 ) { @@ -585,7 +589,7 @@ search_result( } } else #endif -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 if ( ldap_compat == 30 ) { if ( ber_printf( ber, "{it{{", m->m_msgid, LDAP_RES_SEARCH_ENTRY ) == -1 ) { @@ -595,11 +599,11 @@ search_result( } } else #endif -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS if ( m->m_cldap ) rc = ber_printf( ber, "t{", LDAP_RES_SEARCH_ENTRY ); else -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ rc = ber_printf( ber, "{it{", m->m_msgid, LDAP_RES_SEARCH_ENTRY ); @@ -609,10 +613,10 @@ search_result( return; } -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS if ( m->m_cldap ) rc = encode_dn( ber, e->ent_dn, m->m_searchbase ); -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ else rc = encode_dn( ber, e->ent_dn, NULLDN ); @@ -628,7 +632,7 @@ search_result( return; } -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 if ( version == 1 ) { if ( ber_printf( ber, "}}" ) == -1 ) { send_ldap_msgresult( sb, SEARCHRESTAG, m, @@ -638,7 +642,7 @@ search_result( } } else #endif -#ifdef COMPAT30 +#ifdef LDAP_COMPAT30 if ( ldap_compat == 30 ) { if ( ber_printf( ber, "}}}" ) == -1 ) { send_ldap_msgresult( sb, SEARCHRESTAG, m, @@ -648,11 +652,11 @@ search_result( } } else #endif -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS if ( m->m_cldap ) rc = ber_printf( ber, "}" ); else -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ rc = ber_printf( ber, "}}" ); if ( rc == -1 ) { @@ -667,7 +671,7 @@ search_result( ber->ber_buf, stderr, 0, 0 ); #endif -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS if ( !m->m_cldap ) #endif (void) ber_flush( sb, ber, 1 ); @@ -688,7 +692,7 @@ search_result( Debug( LDAP_DEBUG_ARGS, "\tresult:\n", 0, 0, 0 ); -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS if ( m->m_cldap ) { if ( ber_printf( ber, "t{ess}}}", SEARCHRESTAG, rc, "", "" ) == -1 ) { diff --git a/servers/ldapd/setproctitle.c b/servers/ldapd/setproctitle.c index e1022ee75b..a3f4bc3a3e 100644 --- a/servers/ldapd/setproctitle.c +++ b/servers/ldapd/setproctitle.c @@ -1,3 +1,5 @@ +#include "portable.h" + #ifndef NOSETPROCTITLE /* * Copyright (c) 1990,1991 Regents of the University of Michigan. diff --git a/servers/ldapd/syntax.c b/servers/ldapd/syntax.c index 8569478eeb..5124e1400f 100644 --- a/servers/ldapd/syntax.c +++ b/servers/ldapd/syntax.c @@ -10,17 +10,21 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include -#include -#include + +#include +#include +#include + #include #include #include #include #include #include -#include -#include + #include "lber.h" #include "ldap.h" #include "common.h" @@ -544,7 +548,7 @@ int encode_attrs( BerElement *ber, Attr_Sequence as ) { PS ps; -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 extern int ldap_compat; #endif @@ -555,7 +559,7 @@ encode_attrs( BerElement *ber, Attr_Sequence as ) if ( str_setup( ps, NULLCP, 0, 0 ) == NOTOK ) return( -1 ); -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 if ( ber_printf( ber, "t{", ldap_compat == 20 ? OLD_LBER_SEQUENCE : LBER_SEQUENCE ) == -1 ) { #else @@ -570,7 +574,7 @@ encode_attrs( BerElement *ber, Attr_Sequence as ) AttrT_print( ps, as->attr_type, EDBOUT ); *ps->ps_ptr = '\0'; -#ifdef COMPAT20 +#ifdef LDAP_COMPAT20 if ( ber_printf( ber, "t{st[", ldap_compat == 20 ? OLD_LBER_SEQUENCE : LBER_SEQUENCE, ps->ps_base, ldap_compat == 20 ? OLD_LBER_SET : LBER_SET ) == -1 ) { diff --git a/servers/ldapd/util.c b/servers/ldapd/util.c index 27ecea9a5a..965d1cd78c 100644 --- a/servers/ldapd/util.c +++ b/servers/ldapd/util.c @@ -10,15 +10,20 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include -#include -#include -#include + +#include +#include +#include +#include + #include -#include -#include + #include #include + #include "lber.h" #include "ldap.h" #include "common.h" From 12a81157a10d4a2a68ef2f00db6bf21f8e7ee10f Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 22 Oct 1998 20:04:24 +0000 Subject: [PATCH 132/148] Add project/workspace files for testavl. Resolved compiler warnings on NT. --- include/avl.h | 3 ++ libraries/libavl/libavl.dsp | 2 +- libraries/libavl/testavl.c | 16 +++---- libraries/libavl/testavl.dsp | 83 ++++++++++++++++++++++++++++++++++++ libraries/libavl/testavl.dsw | 29 +++++++++++++ 5 files changed, 124 insertions(+), 9 deletions(-) create mode 100644 libraries/libavl/testavl.dsp create mode 100644 libraries/libavl/testavl.dsw diff --git a/include/avl.h b/include/avl.h index 1239a61238..19ed4408ad 100644 --- a/include/avl.h +++ b/include/avl.h @@ -45,6 +45,9 @@ typedef struct avlnode { /* typedef int (*IFP)LDAP_P((caddr_t, caddr_t)); */ typedef int (*IFP)(); +LDAP_F int +avl_free LDAP_P(( Avlnode *root, IFP dfree )); + LDAP_F int avl_insert LDAP_P((Avlnode **, caddr_t, IFP, IFP)); diff --git a/libraries/libavl/libavl.dsp b/libraries/libavl/libavl.dsp index 384cfaca53..49eef86391 100644 --- a/libraries/libavl/libavl.dsp +++ b/libraries/libavl/libavl.dsp @@ -57,7 +57,7 @@ LIB32=link.exe -lib # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" +# PROP Intermediate_Dir "Debug\libavl" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c # ADD CPP /nologo /W3 /GX /Z7 /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c diff --git a/libraries/libavl/testavl.c b/libraries/libavl/testavl.c index 9d7b9c7d13..5e69e6f3f6 100644 --- a/libraries/libavl/testavl.c +++ b/libraries/libavl/testavl.c @@ -1,14 +1,18 @@ /* testavl.c - Test Tim Howes AVL code */ -#define DISABLE_BRIDGE #include "portable.h" #include +#include + #include #include #include "avl.h" +static void ravl_print LDAP_P(( Avlnode *root, int depth )); +static void myprint LDAP_P(( Avlnode *root )); + main( argc, argv ) int argc; char **argv; @@ -17,7 +21,6 @@ char **argv; char command[ 10 ]; char name[ 80 ]; char *p; - int free(), strcmp(); printf( "> " ); while ( fgets( command, sizeof( command ), stdin ) != NULL ) { @@ -78,9 +81,7 @@ char **argv; /* NOTREACHED */ } -static ravl_print( root, depth ) -Avlnode *root; -int depth; +static void ravl_print( Avlnode *root, int depth ) { int i; @@ -96,15 +97,14 @@ int depth; ravl_print( root->avl_left, depth+1 ); } -myprint( root ) -Avlnode *root; +static void myprint( Avlnode *root ) { printf( "********\n" ); if ( root == 0 ) printf( "\tNULL\n" ); else - ( void ) ravl_print( root, 0 ); + ravl_print( root, 0 ); printf( "********\n" ); } diff --git a/libraries/libavl/testavl.dsp b/libraries/libavl/testavl.dsp new file mode 100644 index 0000000000..4743ec79d4 --- /dev/null +++ b/libraries/libavl/testavl.dsp @@ -0,0 +1,83 @@ +# Microsoft Developer Studio Project File - Name="testavl" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=testavl - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "testavl.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "testavl.mak" CFG="testavl - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "testavl - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "testavl - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "testavl - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "testavl - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "testavl_" +# PROP BASE Intermediate_Dir "testavl_" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "testavl_" +# PROP Intermediate_Dir "testavl_" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "testavl - Win32 Release" +# Name "testavl - Win32 Debug" +# End Target +# End Project diff --git a/libraries/libavl/testavl.dsw b/libraries/libavl/testavl.dsw new file mode 100644 index 0000000000..e8b8116c6f --- /dev/null +++ b/libraries/libavl/testavl.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "testavl"=.\testavl.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + From f320dcbcb902c0119ce9eda09a9da693c971f264 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 22 Oct 1998 20:19:48 +0000 Subject: [PATCH 133/148] re-add sys/stat.h include for GDBM --- libraries/libldbm/ldbm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/libldbm/ldbm.c b/libraries/libldbm/ldbm.c index 57db9b0677..ab76aaffed 100644 --- a/libraries/libldbm/ldbm.c +++ b/libraries/libldbm/ldbm.c @@ -261,6 +261,8 @@ ldbm_errno( LDBM ldbm ) #elif defined( HAVE_GDBM ) +#include + /***************************************************************** * * * use gdbm * From d3123eada880cc9c1eb04d82ffcfaf7a027e2f88 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 22 Oct 1998 20:44:42 +0000 Subject: [PATCH 134/148] Quick NT port of liblter test utilities. Updated AVL NT port. --- libraries/libavl/libavl.dsp | 4 +- libraries/libavl/testavl.dsp | 14 ++++-- libraries/libavl/testavl.dsw | 15 ++++++ libraries/liblber/dtest.c | 14 +++--- libraries/liblber/dtest.dsp | 89 +++++++++++++++++++++++++++++++++++ libraries/liblber/dtest.dsw | 44 +++++++++++++++++ libraries/liblber/etest.c | 19 ++++---- libraries/liblber/etest.dsp | 89 +++++++++++++++++++++++++++++++++++ libraries/liblber/etest.dsw | 44 +++++++++++++++++ libraries/liblber/idtest.c | 1 - libraries/liblber/idtest.dsp | 89 +++++++++++++++++++++++++++++++++++ libraries/liblber/idtest.dsw | 44 +++++++++++++++++ libraries/liblber/liblber.dsp | 2 +- 13 files changed, 441 insertions(+), 27 deletions(-) create mode 100644 libraries/liblber/dtest.dsp create mode 100644 libraries/liblber/dtest.dsw create mode 100644 libraries/liblber/etest.dsp create mode 100644 libraries/liblber/etest.dsw create mode 100644 libraries/liblber/idtest.dsp create mode 100644 libraries/liblber/idtest.dsw diff --git a/libraries/libavl/libavl.dsp b/libraries/libavl/libavl.dsp index 49eef86391..107059441a 100644 --- a/libraries/libavl/libavl.dsp +++ b/libraries/libavl/libavl.dsp @@ -56,7 +56,7 @@ LIB32=link.exe -lib # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" +# PROP Output_Dir "..\Debug" # PROP Intermediate_Dir "Debug\libavl" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c @@ -66,7 +66,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\Debug\libavl.lib" +# ADD LIB32 /nologo !ENDIF diff --git a/libraries/libavl/testavl.dsp b/libraries/libavl/testavl.dsp index 4743ec79d4..b6501e9acd 100644 --- a/libraries/libavl/testavl.dsp +++ b/libraries/libavl/testavl.dsp @@ -36,8 +36,8 @@ RSC=rc.exe # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" +# PROP Output_Dir "Release\testavl" +# PROP Intermediate_Dir "Release\testavl" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c @@ -59,11 +59,11 @@ LINK32=link.exe # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 -# PROP Output_Dir "testavl_" -# PROP Intermediate_Dir "testavl_" +# PROP Output_Dir "Debug\testavl" +# PROP Intermediate_Dir "Debug\testavl" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe @@ -79,5 +79,9 @@ LINK32=link.exe # Name "testavl - Win32 Release" # Name "testavl - Win32 Debug" +# Begin Source File + +SOURCE=.\testavl.c +# End Source File # End Target # End Project diff --git a/libraries/libavl/testavl.dsw b/libraries/libavl/testavl.dsw index e8b8116c6f..8829d3b5b6 100644 --- a/libraries/libavl/testavl.dsw +++ b/libraries/libavl/testavl.dsw @@ -3,6 +3,18 @@ Microsoft Developer Studio Workspace File, Format Version 5.00 ############################################################################### +Project: "libavl"=.\libavl.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + Project: "testavl"=.\testavl.dsp - Package Owner=<4> Package=<5> @@ -11,6 +23,9 @@ Package=<5> Package=<4> {{{ + Begin Project Dependency + Project_Dep_Name libavl + End Project Dependency }}} ############################################################################### diff --git a/libraries/liblber/dtest.c b/libraries/liblber/dtest.c index 04cd27d2b2..5b60292cee 100644 --- a/libraries/liblber/dtest.c +++ b/libraries/liblber/dtest.c @@ -11,33 +11,30 @@ * is provided ``as is'' without express or implied warranty. */ -#define DISABLE_BRIDGE #include "portable.h" #include #include + #include +#include #ifdef MACOS #include -#else /* MACOS */ -#include -#include #endif /* MACOS */ #include "lber.h" -static usage( char *name ) +static void usage( char *name ) { fprintf( stderr, "usage: %s fmt\n", name ); } main( int argc, char **argv ) { - long i, i2, num; + long i; unsigned long len; int tag; - char *str, *s1, *s2; BerElement ber; Sockbuf sb; extern char *optarg; @@ -47,9 +44,10 @@ main( int argc, char **argv ) cshow( stdout ); #endif /* MACOS */ - bzero( &sb, sizeof(sb) ); + memset( &sb, 0, sizeof(sb) ); sb.sb_sd = 0; sb.sb_ber.ber_buf = NULL; + if ( (tag = ber_get_next( &sb, &len, &ber )) == -1 ) { perror( "ber_get_next" ); exit( 1 ); diff --git a/libraries/liblber/dtest.dsp b/libraries/liblber/dtest.dsp new file mode 100644 index 0000000000..e4c1c3ec83 --- /dev/null +++ b/libraries/liblber/dtest.dsp @@ -0,0 +1,89 @@ +# Microsoft Developer Studio Project File - Name="dtest" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=dtest - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "dtest.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "dtest.mak" CFG="dtest - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "dtest - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "dtest - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "dtest - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release\dtest" +# PROP Intermediate_Dir "Release\dtest" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 liblber.lib ws2_32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "dtest - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "dtest___" +# PROP BASE Intermediate_Dir "dtest___" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug\dtest" +# PROP Intermediate_Dir "Debug\dtest" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 liblber.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\Debug" + +!ENDIF + +# Begin Target + +# Name "dtest - Win32 Release" +# Name "dtest - Win32 Debug" +# Begin Source File + +SOURCE=.\dtest.c +# End Source File +# End Target +# End Project diff --git a/libraries/liblber/dtest.dsw b/libraries/liblber/dtest.dsw new file mode 100644 index 0000000000..ba86f70635 --- /dev/null +++ b/libraries/liblber/dtest.dsw @@ -0,0 +1,44 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "dtest"=.\dtest.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name liblber + End Project Dependency +}}} + +############################################################################### + +Project: "liblber"=.\liblber.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libraries/liblber/etest.c b/libraries/liblber/etest.c index eca656730e..ee890ac601 100644 --- a/libraries/liblber/etest.c +++ b/libraries/liblber/etest.c @@ -7,29 +7,28 @@ #include "portable.h" #include + +#include #include #ifdef MACOS -#include -#include -#include #include -#else /* MACOS */ -#include -#include #endif /* MACOS */ #include "lber.h" -static usage( char *name ) +static void usage( char *name ) { fprintf( stderr, "usage: %s fmtstring\n", name ); } main( int argc, char **argv ) { - int i, num, len; - char *s, *p; +#ifdef notdef + int i, len; + char *s, *p; +#endif + int num; Seqorset *sos = NULLSEQORSET; BerElement *ber; Sockbuf sb; @@ -40,7 +39,7 @@ main( int argc, char **argv ) exit( 1 ); } - bzero( &sb, sizeof(sb) ); + memset( &sb, 0, sizeof(sb) ); sb.sb_sd = 1; sb.sb_ber.ber_buf = NULL; diff --git a/libraries/liblber/etest.dsp b/libraries/liblber/etest.dsp new file mode 100644 index 0000000000..574f154bb5 --- /dev/null +++ b/libraries/liblber/etest.dsp @@ -0,0 +1,89 @@ +# Microsoft Developer Studio Project File - Name="etest" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=etest - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "etest.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "etest.mak" CFG="etest - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "etest - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "etest - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "etest - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release\etest" +# PROP Intermediate_Dir "Release\etest" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 liblber.lib ws2_32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "etest - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "etest___" +# PROP BASE Intermediate_Dir "etest___" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug\etest" +# PROP Intermediate_Dir "Debug\etest" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 liblber.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\Debug" + +!ENDIF + +# Begin Target + +# Name "etest - Win32 Release" +# Name "etest - Win32 Debug" +# Begin Source File + +SOURCE=.\etest.c +# End Source File +# End Target +# End Project diff --git a/libraries/liblber/etest.dsw b/libraries/liblber/etest.dsw new file mode 100644 index 0000000000..2cf4d7231b --- /dev/null +++ b/libraries/liblber/etest.dsw @@ -0,0 +1,44 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "etest"=.\etest.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name liblber + End Project Dependency +}}} + +############################################################################### + +Project: "liblber"=.\liblber.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libraries/liblber/idtest.c b/libraries/liblber/idtest.c index 54fa08b29a..937cfd5f14 100644 --- a/libraries/liblber/idtest.c +++ b/libraries/liblber/idtest.c @@ -11,7 +11,6 @@ * is provided ``as is'' without express or implied warranty. */ -#define DISABLE_BRIDGE #include "portable.h" #include diff --git a/libraries/liblber/idtest.dsp b/libraries/liblber/idtest.dsp new file mode 100644 index 0000000000..1d2543be80 --- /dev/null +++ b/libraries/liblber/idtest.dsp @@ -0,0 +1,89 @@ +# Microsoft Developer Studio Project File - Name="idtest" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=idtest - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "idtest.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "idtest.mak" CFG="idtest - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "idtest - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "idtest - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "idtest - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release\idtest" +# PROP Intermediate_Dir "Release\idtest" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 liblber.lib ws2_32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "idtest - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "idtest___" +# PROP BASE Intermediate_Dir "idtest___" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug\idtest" +# PROP Intermediate_Dir "Debug\idtest" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 liblber.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\Debug" + +!ENDIF + +# Begin Target + +# Name "idtest - Win32 Release" +# Name "idtest - Win32 Debug" +# Begin Source File + +SOURCE=.\idtest.c +# End Source File +# End Target +# End Project diff --git a/libraries/liblber/idtest.dsw b/libraries/liblber/idtest.dsw new file mode 100644 index 0000000000..c0323785ed --- /dev/null +++ b/libraries/liblber/idtest.dsw @@ -0,0 +1,44 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "idtest"=.\idtest.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name liblber + End Project Dependency +}}} + +############################################################################### + +Project: "liblber"=.\liblber.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libraries/liblber/liblber.dsp b/libraries/liblber/liblber.dsp index d4321a73d6..e0457f90f6 100644 --- a/libraries/liblber/liblber.dsp +++ b/libraries/liblber/liblber.dsp @@ -57,7 +57,7 @@ LIB32=link.exe -lib # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "..\Debug" -# PROP Intermediate_Dir "Debug" +# PROP Intermediate_Dir "Debug\liblber" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c # ADD CPP /nologo /W3 /GX /Z7 /Od /I "..\..\include" /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c From fefe72b348183e912c44bdd0f5ee56444b7f8354 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 22 Oct 1998 20:57:44 +0000 Subject: [PATCH 135/148] NT doesn't appear to have a resolver routines... --- include/portable.h.nt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/portable.h.nt b/include/portable.h.nt index 13a155fc44..6b8562c66b 100644 --- a/include/portable.h.nt +++ b/include/portable.h.nt @@ -189,7 +189,7 @@ typedef char * caddr_t; #define LDAP_DEBUG 1 /* define this for LDAP DNS support */ -#define LDAP_DNS 1 +/* #undef LDAP_DNS */ /* define this to remove -lldap cache support */ /* #undef LDAP_NOCACHE */ From 0549966661e1320df0991baa61829fda23dfe3da Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 22 Oct 1998 20:58:37 +0000 Subject: [PATCH 136/148] Tried to port to NT... but no resolver routines. --- libraries/libldap/getdxbyname.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/libraries/libldap/getdxbyname.c b/libraries/libldap/getdxbyname.c index 153b111963..0290cf4037 100644 --- a/libraries/libldap/getdxbyname.c +++ b/libraries/libldap/getdxbyname.c @@ -1,6 +1,3 @@ -#include "portable.h" - -#ifdef LDAP_DNS /* * Copyright (c) 1995 Regents of the University of Michigan. * All rights reserved. @@ -8,10 +5,14 @@ * ldap_getdxbyname - retrieve DX records from the DNS (from TXT records for now) */ +#include "portable.h" + +#ifdef LDAP_DNS + #include #include -#include +#include #include #include #include @@ -22,10 +23,6 @@ static char ** decode_answer LDAP_P(( unsigned char *answer, int len )); -extern int h_errno; -extern char *h_errlist[]; - - #define MAX_TO_SORT 32 From 309ed6442f9fa5f9249534811f49f32536f4a531 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 22 Oct 1998 21:06:55 +0000 Subject: [PATCH 137/148] Fix ltest/ttest linking. --- libraries/libldap/Makefile.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/libldap/Makefile.in b/libraries/libldap/Makefile.in index 7e57c6f0cb..d18c4e0a9f 100644 --- a/libraries/libldap/Makefile.in +++ b/libraries/libldap/Makefile.in @@ -21,13 +21,13 @@ OBJS = bind.o open.o result.o error.o compare.o search.o \ getdn.o getentry.o getattr.o getvalues.o addentry.o \ request.o getdxbyname.o os-ip.o url.o charset.o -LIBS = -L. -L../liblber -lldap -llber $(AC_LIBS) +LIBS = -L$(LDAP_LIBDIR) -lldap -llber $(AC_LIBS) LIBLBER = ../liblber/liblber.a ltest: $(LIBRARY) test.o $(LIBLBER) $(CC) $(LDFLAGS) -o $@ test.o $(LIBS) ttest: $(LIBRARY) tmpltest.o $(LIBLBER) - $(CC) $(LDFLAGS) -o $@ test.o $(LIBS) + $(CC) $(LDFLAGS) -o $@ tmpltest.o $(LIBS) CFFILES= ldapfilter.conf ldapfriendly ldaptemplates.conf ldapsearchprefs.conf From 569087f1ba70a225ee45fc59bdf90fe16882f737 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 22 Oct 1998 21:23:15 +0000 Subject: [PATCH 138/148] Add ltest/test workspaces/project files for NT/VC++ port. --- libraries/libldap/libldap.dsp | 2 +- libraries/libldap/ltest.dsp | 87 ++++++++++++++++++++++++++++++++++ libraries/libldap/ltest.dsw | 74 +++++++++++++++++++++++++++++ libraries/libldap/test.c | 11 ++++- libraries/libldap/tmplout.c | 2 + libraries/libldap/ttest.dsp | 89 +++++++++++++++++++++++++++++++++++ libraries/libldap/ttest.dsw | 44 +++++++++++++++++ 7 files changed, 306 insertions(+), 3 deletions(-) create mode 100644 libraries/libldap/ltest.dsp create mode 100644 libraries/libldap/ltest.dsw create mode 100644 libraries/libldap/ttest.dsp create mode 100644 libraries/libldap/ttest.dsw diff --git a/libraries/libldap/libldap.dsp b/libraries/libldap/libldap.dsp index c26a3a985f..2d90c6392b 100644 --- a/libraries/libldap/libldap.dsp +++ b/libraries/libldap/libldap.dsp @@ -57,7 +57,7 @@ LIB32=link.exe -lib # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "..\Debug" -# PROP Intermediate_Dir "Debug" +# PROP Intermediate_Dir "Debug\libldap" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c # ADD CPP /nologo /W3 /GX /Z7 /Od /I "..\..\include" /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c diff --git a/libraries/libldap/ltest.dsp b/libraries/libldap/ltest.dsp new file mode 100644 index 0000000000..ca59106786 --- /dev/null +++ b/libraries/libldap/ltest.dsp @@ -0,0 +1,87 @@ +# Microsoft Developer Studio Project File - Name="ltest" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=ltest - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ltest.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ltest.mak" CFG="ltest - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ltest - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "ltest - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ltest - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release\ltest" +# PROP Intermediate_Dir "Release\ltest" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 libldap.lib liblber.lib liblutil.lib hs_regex.lib ws2_32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "ltest - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "ltest___" +# PROP BASE Intermediate_Dir "ltest___" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug\ltest" +# PROP Intermediate_Dir "Debug\ltest" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 libldap.lib liblber.lib liblutil.lib hs_regex.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\Debug" + +!ENDIF + +# Begin Target + +# Name "ltest - Win32 Release" +# Name "ltest - Win32 Debug" +# Begin Source File + +SOURCE=.\test.c +# End Source File +# End Target +# End Project diff --git a/libraries/libldap/ltest.dsw b/libraries/libldap/ltest.dsw new file mode 100644 index 0000000000..6cc5a01052 --- /dev/null +++ b/libraries/libldap/ltest.dsw @@ -0,0 +1,74 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "liblber"=..\liblber\liblber.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "libldap"=.\libldap.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "liblutil"=..\liblutil\liblutil.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ltest"=.\ltest.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libldap + End Project Dependency + Begin Project Dependency + Project_Dep_Name liblber + End Project Dependency + Begin Project Dependency + Project_Dep_Name liblutil + End Project Dependency +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libraries/libldap/test.c b/libraries/libldap/test.c index dda28530e0..340fae9b96 100644 --- a/libraries/libldap/test.c +++ b/libraries/libldap/test.c @@ -10,7 +10,14 @@ #include #include + +#ifdef HAVE_SYS_FILE_H #include +#endif +#ifdef HAVE_IO_H +#include +#endif + #include #include "lber.h" @@ -133,7 +140,7 @@ file_read( char *path, struct berval *bv ) eof = feof( fp ); fclose( fp ); - if ( rlen != bv->bv_len ) { + if ( (unsigned long) rlen != bv->bv_len ) { perror( path ); free( bv->bv_val ); return( -1 ); @@ -959,7 +966,7 @@ print_search_entry( LDAP *ld, LDAPMessage *res ) int j, nonascii; nonascii = 0; - for ( j = 0; j < vals[i]->bv_len; j++ ) + for ( j = 0; (unsigned long) j < vals[i]->bv_len; j++ ) if ( !isascii( vals[i]->bv_val[j] ) ) { nonascii = 1; break; diff --git a/libraries/libldap/tmplout.c b/libraries/libldap/tmplout.c index 6983b50280..308745ec84 100644 --- a/libraries/libldap/tmplout.c +++ b/libraries/libldap/tmplout.c @@ -13,7 +13,9 @@ #include #include +#ifdef HAVE_SYS_FILE_H #include +#endif #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/ttest.dsp b/libraries/libldap/ttest.dsp new file mode 100644 index 0000000000..a4c5ec2a63 --- /dev/null +++ b/libraries/libldap/ttest.dsp @@ -0,0 +1,89 @@ +# Microsoft Developer Studio Project File - Name="ttest" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=ttest - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ttest.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ttest.mak" CFG="ttest - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ttest - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "ttest - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ttest - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release\ttest" +# PROP Intermediate_Dir "Release\ttest" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 libldap.lib liblber.lib ws2_32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "ttest - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "ttest___" +# PROP BASE Intermediate_Dir "ttest___" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug\ttest" +# PROP Intermediate_Dir "Debug\ttest" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 libldap.lib liblber.lib hs_regex.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\Debug" + +!ENDIF + +# Begin Target + +# Name "ttest - Win32 Release" +# Name "ttest - Win32 Debug" +# Begin Source File + +SOURCE=.\tmpltest.c +# End Source File +# End Target +# End Project diff --git a/libraries/libldap/ttest.dsw b/libraries/libldap/ttest.dsw new file mode 100644 index 0000000000..a58e476839 --- /dev/null +++ b/libraries/libldap/ttest.dsw @@ -0,0 +1,44 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "libldap"=.\libldap.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ttest"=.\ttest.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libldap + End Project Dependency +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + From 984a661277ddf23190bca787210a09c373e6561e Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 22 Oct 1998 21:35:53 +0000 Subject: [PATCH 139/148] clean up includes --- libraries/liblber/bprint.c | 2 +- libraries/liblber/decode.c | 1 - libraries/liblber/encode.c | 3 +-- libraries/liblber/io.c | 10 ++++------ libraries/libldap/addentry.c | 2 +- libraries/libldap/disptmpl.c | 5 ++--- libraries/libldap/dsparse.c | 2 +- libraries/libldap/free.c | 2 +- libraries/libldap/friendly.c | 2 +- libraries/libldap/getattr.c | 2 +- libraries/libldap/getdn.c | 2 +- libraries/libldap/getentry.c | 2 +- libraries/libldap/getfilter.c | 2 +- libraries/libldap/getvalues.c | 2 +- libraries/libldap/ldap-int.h | 4 +++- libraries/libldap/search.c | 2 +- libraries/libldap/sort.c | 2 +- libraries/libldap/srchpref.c | 4 ++-- libraries/libldap/ttest.dsw | 15 +++++++++++++++ libraries/libldap/url.c | 2 +- 20 files changed, 40 insertions(+), 28 deletions(-) diff --git a/libraries/liblber/bprint.c b/libraries/liblber/bprint.c index 1dbc833b99..882facd70d 100644 --- a/libraries/liblber/bprint.c +++ b/libraries/liblber/bprint.c @@ -3,8 +3,8 @@ #if defined( LDAP_DEBUG ) && defined( LDAP_LIBUI ) #include -#include +#include #include #endif /* LDAP_DEBUG && LDAP_LIBUI */ diff --git a/libraries/liblber/decode.c b/libraries/liblber/decode.c index 03a5c74d85..b99f97ac9d 100644 --- a/libraries/liblber/decode.c +++ b/libraries/liblber/decode.c @@ -23,7 +23,6 @@ #endif #include -#include #include #include "lber.h" diff --git a/libraries/liblber/encode.c b/libraries/liblber/encode.c index 561e0f162d..af320f372c 100644 --- a/libraries/liblber/encode.c +++ b/libraries/liblber/encode.c @@ -15,7 +15,6 @@ #include #include -#include #ifdef STDC_HEADERS #include @@ -23,8 +22,8 @@ #include #endif -#include #include +#include #include "lber.h" diff --git a/libraries/liblber/io.c b/libraries/liblber/io.c index bbe6c82dd1..0b9a59d1cf 100644 --- a/libraries/liblber/io.c +++ b/libraries/liblber/io.c @@ -16,13 +16,11 @@ #include #include -#include -#include -#include - -#include -#include +#include +#include #include +#include +#include #ifdef HAVE_IO_H #include diff --git a/libraries/libldap/addentry.c b/libraries/libldap/addentry.c index 3b5c752a88..ce85e8cb35 100644 --- a/libraries/libldap/addentry.c +++ b/libraries/libldap/addentry.c @@ -13,8 +13,8 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #include #include -#include +#include #include #include #include diff --git a/libraries/libldap/disptmpl.c b/libraries/libldap/disptmpl.c index 291316dcb6..f4aa230313 100644 --- a/libraries/libldap/disptmpl.c +++ b/libraries/libldap/disptmpl.c @@ -17,17 +17,16 @@ #include #include -#include +#include #include #include +#include #ifdef HAVE_SYS_FILE_H #include #endif -#include - #include "lber.h" #include "ldap.h" #include "disptmpl.h" diff --git a/libraries/libldap/dsparse.c b/libraries/libldap/dsparse.c index 6fc1e6e296..86ccf71360 100644 --- a/libraries/libldap/dsparse.c +++ b/libraries/libldap/dsparse.c @@ -19,8 +19,8 @@ #include #include -#include +#include #include #include diff --git a/libraries/libldap/free.c b/libraries/libldap/free.c index adf1d7b3c9..d0e47686e5 100644 --- a/libraries/libldap/free.c +++ b/libraries/libldap/free.c @@ -14,8 +14,8 @@ static char copyright[] = "@(#) Copyright (c) 1994 The Regents of the University #include #include -#include +#include #include #include diff --git a/libraries/libldap/friendly.c b/libraries/libldap/friendly.c index fc90fc9cdc..686ac882aa 100644 --- a/libraries/libldap/friendly.c +++ b/libraries/libldap/friendly.c @@ -13,8 +13,8 @@ static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of #include #include -#include +#include #include #include #include diff --git a/libraries/libldap/getattr.c b/libraries/libldap/getattr.c index 6e95b7d5f3..2975e674e0 100644 --- a/libraries/libldap/getattr.c +++ b/libraries/libldap/getattr.c @@ -13,8 +13,8 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #include #include -#include +#include #include #include #include diff --git a/libraries/libldap/getdn.c b/libraries/libldap/getdn.c index 19ef4d45e7..fc2b326477 100644 --- a/libraries/libldap/getdn.c +++ b/libraries/libldap/getdn.c @@ -13,8 +13,8 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #include #include -#include +#include #include #include #include diff --git a/libraries/libldap/getentry.c b/libraries/libldap/getentry.c index df25d7a3ab..5d7776dea1 100644 --- a/libraries/libldap/getentry.c +++ b/libraries/libldap/getentry.c @@ -13,8 +13,8 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #include #include -#include +#include #include #include #include diff --git a/libraries/libldap/getfilter.c b/libraries/libldap/getfilter.c index 68bd3fd26a..fa286bc960 100644 --- a/libraries/libldap/getfilter.c +++ b/libraries/libldap/getfilter.c @@ -13,8 +13,8 @@ static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of #include #include -#include +#include #include #include #include diff --git a/libraries/libldap/getvalues.c b/libraries/libldap/getvalues.c index 3abd28560a..c3131ade09 100644 --- a/libraries/libldap/getvalues.c +++ b/libraries/libldap/getvalues.c @@ -13,8 +13,8 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #include #include -#include +#include #include #include #include diff --git a/libraries/libldap/ldap-int.h b/libraries/libldap/ldap-int.h index bb65762987..5a3fe703a2 100644 --- a/libraries/libldap/ldap-int.h +++ b/libraries/libldap/ldap-int.h @@ -22,7 +22,7 @@ #endif /* LDAP_DNS */ #endif /* LDAP_REFERRALS */ - +LDAP_BEGIN_DECL /* * in cache.c */ @@ -133,4 +133,6 @@ int ldap_t61_to_8859( char **bufp, unsigned long *buflenp, int free_input ); extern int ldap_8859_to_t61( char **bufp, unsigned long *buflenp, int free_input ); #endif /* LDAP_CHARSET_8859 == LDAP_DEFAULT_CHARSET */ + +LDAP_END_DECL #endif /* STR_TRANSLATION && LDAP_DEFAULT_CHARSET */ diff --git a/libraries/libldap/search.c b/libraries/libldap/search.c index f588e2816a..191d346710 100644 --- a/libraries/libldap/search.c +++ b/libraries/libldap/search.c @@ -12,9 +12,9 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #endif #include -#include #include +#include #include #include #include diff --git a/libraries/libldap/sort.c b/libraries/libldap/sort.c index fbf1dd4be3..7e90d9fcd6 100644 --- a/libraries/libldap/sort.c +++ b/libraries/libldap/sort.c @@ -16,8 +16,8 @@ #include #include -#include +#include #include #include diff --git a/libraries/libldap/srchpref.c b/libraries/libldap/srchpref.c index 8e6fd26e30..a603e6edb3 100644 --- a/libraries/libldap/srchpref.c +++ b/libraries/libldap/srchpref.c @@ -17,11 +17,11 @@ #include #include -#include +#include #include -#include #include +#include #ifdef HAVE_SYS_FILE_H #include diff --git a/libraries/libldap/ttest.dsw b/libraries/libldap/ttest.dsw index a58e476839..3691b92d33 100644 --- a/libraries/libldap/ttest.dsw +++ b/libraries/libldap/ttest.dsw @@ -3,6 +3,18 @@ Microsoft Developer Studio Workspace File, Format Version 5.00 ############################################################################### +Project: "liblber"=..\liblber\liblber.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + Project: "libldap"=.\libldap.dsp - Package Owner=<4> Package=<5> @@ -26,6 +38,9 @@ Package=<4> Begin Project Dependency Project_Dep_Name libldap End Project Dependency + Begin Project Dependency + Project_Dep_Name liblber + End Project Dependency }}} ############################################################################### diff --git a/libraries/libldap/url.c b/libraries/libldap/url.c index badf882110..83ccbdc546 100644 --- a/libraries/libldap/url.c +++ b/libraries/libldap/url.c @@ -25,8 +25,8 @@ static char copyright[] = "@(#) Copyright (c) 1996 Regents of the University of #include #include -#include +#include #include #include #include From 3449d4b8c043d5021d606ef62a3d3109f6cb3a65 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 22 Oct 1998 23:36:20 +0000 Subject: [PATCH 140/148] Change WINSOCK defines. --- include/ac/socket.h | 2 -- include/portable.h.nt | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/ac/socket.h b/include/ac/socket.h index b86b46dc59..c8c7e28140 100644 --- a/include/ac/socket.h +++ b/include/ac/socket.h @@ -25,8 +25,6 @@ #ifdef HAVE_WINSOCK2 #include -#define EMSGSIZE WSAEMSGSIZE -#define EHOSTUNREACH WSAEHOSTUNREACH #elif HAVE_WINSOCK #include #endif diff --git a/include/portable.h.nt b/include/portable.h.nt index 6b8562c66b..dac09fdc43 100644 --- a/include/portable.h.nt +++ b/include/portable.h.nt @@ -45,6 +45,9 @@ typedef char * caddr_t; /* we have winsock2 */ #define HAVE_WINSOCK2 1 +/* we have winsock */ +#define HAVE_WINSOCK 1 + /* we have */ #define HAVE_IO_H 1 From 5c296dc0bafe1e4ac9c4a36df9d7fe9bfbd17573 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 23 Oct 1998 17:42:19 +0000 Subject: [PATCH 141/148] Minor changes to support NT. --- include/ac/socket.h | 4 +++- libraries/libldap/open.c | 38 ++++++++++++++++++++++++++++++++++++++ libraries/libldap/os-ip.c | 9 ++++++++- libraries/libldap/unbind.c | 2 ++ 4 files changed, 51 insertions(+), 2 deletions(-) diff --git a/include/ac/socket.h b/include/ac/socket.h index c8c7e28140..a27da0db87 100644 --- a/include/ac/socket.h +++ b/include/ac/socket.h @@ -27,6 +27,8 @@ #include #elif HAVE_WINSOCK #include +#else +#define WSACleanup() #endif #ifdef HAVE_PCNFS @@ -48,7 +50,7 @@ #define tcp_close( s ) netclose( s ); netshut() #endif /* NCSA */ #ifdef WINSOCK -#define tcp_close( s ) closesocket( s ); WSACleanup(); +#define tcp_close( s ) closesocket( s ); #endif /* WINSOCK */ #else /* DOS */ #define tcp_close( s ) close( s ) diff --git a/libraries/libldap/open.c b/libraries/libldap/open.c index 3ea3eea14a..f92147f415 100644 --- a/libraries/libldap/open.c +++ b/libraries/libldap/open.c @@ -111,14 +111,51 @@ ldap_init( char *defhost, int defport ) Debug( LDAP_DEBUG_TRACE, "ldap_init\n", 0, 0, 0 ); +#ifdef HAVE_WINSOCK2 +{ WORD wVersionRequested; + WSADATA wsaData; + int err; + + wVersionRequested = MAKEWORD( 2, 0 ); + + err = WSAStartup( wVersionRequested, &wsaData ); + if ( err != 0 ) { + /* Tell the user that we couldn't find a usable */ + /* WinSock DLL. */ + return NULL; + } + + /* Confirm that the WinSock DLL supports 2.0.*/ + /* Note that if the DLL supports versions greater */ + /* than 2.0 in addition to 2.0, it will still return */ + /* 2.0 in wVersion since that is the version we */ + /* requested. */ + + if ( LOBYTE( wsaData.wVersion ) != 2 || + HIBYTE( wsaData.wVersion ) != 0 ) + { + /* Tell the user that we couldn't find a usable */ + /* WinSock DLL. */ + WSACleanup( ); + return NULL; + } +} /* The WinSock DLL is acceptable. Proceed. */ + +#elif HAVE_WINSOCK + if ( WSAStartup( 0x0101, &wsadata ) != 0 ) { + return( NULL ); + } +#endif if ( (ld = (LDAP *) calloc( 1, sizeof(LDAP) )) == NULL ) { + WSACleanup( ); return( NULL ); } #ifdef LDAP_REFERRALS if (( ld->ld_selectinfo = ldap_new_select_info()) == NULL ) { free( (char*)ld ); + WSACleanup( ); return( NULL ); } ld->ld_options = LDAP_OPT_REFERRALS; @@ -130,6 +167,7 @@ ldap_init( char *defhost, int defport ) ldap_free_select_info( ld->ld_selectinfo ); #endif /* LDAP_REFERRALS */ free( (char*)ld ); + WSACleanup( ); return( NULL ); } diff --git a/libraries/libldap/os-ip.c b/libraries/libldap/os-ip.c index 7105dc1c77..e87cb0cb46 100644 --- a/libraries/libldap/os-ip.c +++ b/libraries/libldap/os-ip.c @@ -58,7 +58,11 @@ ldap_connect_to_host( Sockbuf *sb, char *host, unsigned long address, if ( host != NULL && ( address = inet_addr( host )) == -1 ) { if ( (hp = gethostbyname( host )) == NULL ) { +#ifdef HAVE_WINSOCK + errno = WSAGetLastError(); +#else errno = EHOSTUNREACH; /* not exactly right, but... */ +#endif return( -1 ); } use_hp = 1; @@ -91,6 +95,9 @@ ldap_connect_to_host( Sockbuf *sb, char *host, unsigned long address, rc = 0; break; } else { +#ifdef HAVE_WINSOCK + errno = WSAGetLastError(); +#endif #ifdef notyet #ifdef LDAP_REFERRALS #ifdef EAGAIN @@ -111,7 +118,7 @@ ldap_connect_to_host( Sockbuf *sb, char *host, unsigned long address, perror( (char *)inet_ntoa( sin.sin_addr )); } #endif - close( s ); + tcp_close( s ); if ( !use_hp ) { break; } diff --git a/libraries/libldap/unbind.c b/libraries/libldap/unbind.c index 449026ce7e..2fc2727c3d 100644 --- a/libraries/libldap/unbind.c +++ b/libraries/libldap/unbind.c @@ -105,6 +105,8 @@ ldap_ld_free( LDAP *ld, int close ) free( (char *) ld ); + WSACleanup(); + return( err ); } From 6c6d3d8f0c1288ed37981b8b30b18a6f9429b9fa Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sat, 24 Oct 1998 20:18:31 +0000 Subject: [PATCH 142/148] update locking codes, remove old platform specific defines --- include/ac/socket.h | 4 ++ libraries/liblber/dtest.c | 4 +- libraries/liblber/etest.c | 6 +-- libraries/libldap/cldap.c | 4 -- libraries/libldap/friendly.c | 2 - libraries/libldap/getfilter.c | 6 --- libraries/libldap/open.c | 8 ---- libraries/libldap/result.c | 82 +---------------------------------- libraries/libldap/test.c | 61 +++----------------------- libraries/libldap/tmplout.c | 5 --- libraries/libldap/tmpltest.c | 4 +- servers/slapd/lock.c | 12 ++--- servers/slurpd/lock.c | 18 ++++---- 13 files changed, 33 insertions(+), 183 deletions(-) diff --git a/include/ac/socket.h b/include/ac/socket.h index a27da0db87..3530b4896b 100644 --- a/include/ac/socket.h +++ b/include/ac/socket.h @@ -39,6 +39,10 @@ #define INADDR_LOOPBACK ((unsigned long) 0x7f000001) #endif +#ifndef MAXHOSTNAMELEN +#define MAXHOSTNAMELEN 64 +#endif + #ifdef MACOS #define tcp_close( s ) tcpclose( s ) #else /* MACOS */ diff --git a/libraries/liblber/dtest.c b/libraries/liblber/dtest.c index 5b60292cee..57f43c3dbf 100644 --- a/libraries/liblber/dtest.c +++ b/libraries/liblber/dtest.c @@ -19,7 +19,7 @@ #include #include -#ifdef MACOS +#ifdef HAVE_CONSOLE_H #include #endif /* MACOS */ @@ -39,7 +39,7 @@ main( int argc, char **argv ) Sockbuf sb; extern char *optarg; -#ifdef MACOS +#ifdef HAVE_CONSOLE_H ccommand( &argv ); cshow( stdout ); #endif /* MACOS */ diff --git a/libraries/liblber/etest.c b/libraries/liblber/etest.c index ee890ac601..ae1321b568 100644 --- a/libraries/liblber/etest.c +++ b/libraries/liblber/etest.c @@ -11,9 +11,9 @@ #include #include -#ifdef MACOS +#ifdef HAVE_CONSOLE_H #include -#endif /* MACOS */ +#endif /* HAVE_CONSOLE_H */ #include "lber.h" @@ -43,7 +43,7 @@ main( int argc, char **argv ) sb.sb_sd = 1; sb.sb_ber.ber_buf = NULL; -#ifdef MACOS +#ifdef HAVE_CONSOLE_H ccommand( &argv ); cshow( stdout ); diff --git a/libraries/libldap/cldap.c b/libraries/libldap/cldap.c index 8ab0318572..3f2fe861a0 100644 --- a/libraries/libldap/cldap.c +++ b/libraries/libldap/cldap.c @@ -28,10 +28,6 @@ static char copyright[] = "@(#) Copyright (c) 1990, 1994 Regents of the Universi #define DEF_CLDAP_TIMEOUT 3 #define DEF_CLDAP_TRIES 4 -#ifndef INADDR_LOOPBACK -#define INADDR_LOOPBACK ((unsigned long) 0x7f000001) -#endif - struct cldap_retinfo { int cri_maxtries; diff --git a/libraries/libldap/friendly.c b/libraries/libldap/friendly.c index 686ac882aa..0f5aa6acad 100644 --- a/libraries/libldap/friendly.c +++ b/libraries/libldap/friendly.c @@ -32,9 +32,7 @@ ldap_friendly_name( char *filename, char *uname, FriendlyMap **map ) char buf[BUFSIZ]; if ( map == NULL ) { -#if !defined( MACOS ) && !defined( DOS ) errno = EINVAL; -#endif return( uname ); } diff --git a/libraries/libldap/getfilter.c b/libraries/libldap/getfilter.c index fa286bc960..3e5ea7b511 100644 --- a/libraries/libldap/getfilter.c +++ b/libraries/libldap/getfilter.c @@ -127,9 +127,7 @@ ldap_init_getfilter_buf( char *buf, long buflen ) ldap_getfilter_free( lfdp ); fprintf( stderr, "bad regular expresssion %s, %s\n", nextflp->lfl_pattern, error ); -#if !defined( MACOS ) && !defined( DOS ) errno = EINVAL; -#endif #endif /* LDAP_LIBUI */ free_strarray( tok ); return( NULL ); @@ -179,9 +177,7 @@ ldap_init_getfilter_buf( char *buf, long buflen ) } else { free_strarray( tok ); ldap_getfilter_free( lfdp ); -#if !defined( MACOS ) && !defined( DOS ) errno = EINVAL; -#endif return( NULL ); } free( tok[ 2 ] ); @@ -198,9 +194,7 @@ ldap_init_getfilter_buf( char *buf, long buflen ) default: free_strarray( tok ); ldap_getfilter_free( lfdp ); -#if !defined( MACOS ) && !defined( DOS ) errno = EINVAL; -#endif return( NULL ); } } diff --git a/libraries/libldap/open.c b/libraries/libldap/open.c index f92147f415..7fa90682ee 100644 --- a/libraries/libldap/open.c +++ b/libraries/libldap/open.c @@ -30,14 +30,6 @@ static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of int ldap_debug; #endif -#ifndef INADDR_LOOPBACK -#define INADDR_LOOPBACK ((unsigned long) 0x7f000001) -#endif - -#ifndef MAXHOSTNAMELEN -#define MAXHOSTNAMELEN 64 -#endif - /* * ldap_open - initialize and connect to an ldap server. A magic cookie to diff --git a/libraries/libldap/result.c b/libraries/libldap/result.c index dd0c5e71a2..dd6f5dbd44 100644 --- a/libraries/libldap/result.c +++ b/libraries/libldap/result.c @@ -170,12 +170,8 @@ wait4msg( LDAP *ld, int msgid, int all, struct timeval *timeout, if ( ld->ld_sb.sb_ber.ber_ptr >= ld->ld_sb.sb_ber.ber_end ) { rc = ldap_select1( ld, tvp ); -#if !defined( MACOS ) && !defined( DOS ) if ( rc == 0 || ( rc == -1 && (( ld->ld_options & LDAP_OPT_RESTART ) == 0 || errno != EINTR ))) { -#else - if ( rc == -1 || rc == 0 ) { -#endif ld->ld_errno = (rc == -1 ? LDAP_SERVER_DOWN : LDAP_TIMEOUT); return( rc ); @@ -207,7 +203,7 @@ wait4msg( LDAP *ld, int msgid, int all, struct timeval *timeout, rc = do_ldap_select( ld, tvp ); -#if defined( LDAP_DEBUG ) && !defined( MACOS ) && !defined( DOS ) +#ifdef LDAP_DEBUG if ( rc == -1 ) { Debug( LDAP_DEBUG_TRACE, "do_ldap_select returned -1: errno %d\n", @@ -215,12 +211,8 @@ wait4msg( LDAP *ld, int msgid, int all, struct timeval *timeout, } #endif -#if !defined( MACOS ) && !defined( DOS ) if ( rc == 0 || ( rc == -1 && (( ld->ld_options & LDAP_OPT_RESTART ) == 0 || errno != EINTR ))) { -#else - if ( rc == -1 || rc == 0 ) { -#endif ld->ld_errno = (rc == -1 ? LDAP_SERVER_DOWN : LDAP_TIMEOUT); return( rc ); @@ -589,7 +581,7 @@ merge_error_info( LDAP *ld, LDAPRequest *parentr, LDAPRequest *lr ) #if defined( LDAP_CONNECTIONLESS ) || !defined( LDAP_REFERRALS ) -#if !defined( MACOS ) && !defined( DOS ) && !defined( _WIN32 ) + static int ldap_select1( LDAP *ld, struct timeval *timeout ) { @@ -616,77 +608,7 @@ ldap_select1( LDAP *ld, struct timeval *timeout ) return( select( tblsize, &readfds, 0, 0, timeout ) ); } -#endif /* !MACOS */ - -#ifdef MACOS -static int -ldap_select1( LDAP *ld, struct timeval *timeout ) -{ - return( tcpselect( ld->ld_sb.sb_sd, timeout )); -} -#endif /* MACOS */ - - -#if ( defined( DOS ) && defined( WINSOCK )) || defined( _WIN32 ) -static int -ldap_select1( LDAP *ld, struct timeval *timeout ) -{ - fd_set readfds; - int rc; - - FD_ZERO( &readfds ); - FD_SET( ld->ld_sb.sb_sd, &readfds ); - - rc = select( 1, &readfds, 0, 0, timeout ); - return( rc == SOCKET_ERROR ? -1 : rc ); -} -#endif /* WINSOCK || _WIN32 */ - - -#ifdef DOS -#ifdef PCNFS -static int -ldap_select1( LDAP *ld, struct timeval *timeout ) -{ - fd_set readfds; - int res; - - FD_ZERO( &readfds ); - FD_SET( ld->ld_sb.sb_sd, &readfds ); - - res = select( FD_SETSIZE, &readfds, NULL, NULL, timeout ); - if ( res == -1 && errno == EINTR) { - /* We've been CTRL-C'ed at this point. It'd be nice to - carry on but PC-NFS currently won't let us! */ - printf("\n*** CTRL-C ***\n"); - exit(-1); - } - return( res ); -} -#endif /* PCNFS */ - -#ifdef NCSA -static int -ldap_select1( LDAP *ld, struct timeval *timeout ) -{ - int rc; - clock_t endtime; - - if ( timeout != NULL ) { - endtime = timeout->tv_sec * CLK_TCK + - timeout->tv_usec * CLK_TCK / 1000000 + clock(); - } - - do { - Stask(); - rc = netqlen( ld->ld_sb.sb_sd ); - } while ( rc <= 0 && ( timeout == NULL || clock() < endtime )); - - return( rc > 0 ? 1 : 0 ); -} -#endif /* NCSA */ -#endif /* DOS */ #endif /* !LDAP_REFERRALS */ diff --git a/libraries/libldap/test.c b/libraries/libldap/test.c index 340fae9b96..34c1eb9250 100644 --- a/libraries/libldap/test.c +++ b/libraries/libldap/test.c @@ -29,10 +29,6 @@ */ #include "ldap-int.h" -#if !defined( PCNFS ) && !defined( WINSOCK ) && !defined( MACOS ) -#define MOD_USE_BVALS -#endif /* !PCNFS && !WINSOCK && !MACOS */ - static void handle_result LDAP_P(( LDAP *ld, LDAPMessage *lm )); static void print_ldap_result LDAP_P(( LDAP *ld, LDAPMessage *lm, char *s )); static void print_search_entry LDAP_P(( LDAP *ld, LDAPMessage *res )); @@ -42,7 +38,7 @@ static void free_list LDAP_P(( char **list )); char *dnsuffix; -#ifndef WINSOCK +#ifndef HAVE_GETLINE static char * getline( char *line, int len, FILE *fp, char *prompt ) { @@ -55,7 +51,7 @@ getline( char *line, int len, FILE *fp, char *prompt ) return( line ); } -#endif /* WINSOCK */ +#endif static char ** get_list( char *prompt ) @@ -103,7 +99,6 @@ free_list( char **list ) } -#ifdef MOD_USE_BVALS static int file_read( char *path, struct berval *bv ) { @@ -148,7 +143,6 @@ file_read( char *path, struct berval *bv ) return( bv->bv_len ); } -#endif /* MOD_USE_BVALS */ static LDAPMod ** @@ -158,9 +152,7 @@ get_modlist( char *prompt1, char *prompt2, char *prompt3 ) int num; LDAPMod tmp; LDAPMod **result; -#ifdef MOD_USE_BVALS struct berval **bvals; -#endif /* MOD_USE_BVALS */ num = 0; result = NULL; @@ -179,7 +171,7 @@ get_modlist( char *prompt1, char *prompt2, char *prompt3 ) tmp.mod_type = strdup( buf ); tmp.mod_values = get_list( prompt3 ); -#ifdef MOD_USE_BVALS + if ( tmp.mod_values != NULL ) { int i; @@ -205,7 +197,6 @@ get_modlist( char *prompt1, char *prompt2, char *prompt3 ) tmp.mod_bvalues = bvals; tmp.mod_op |= LDAP_MOD_BVALUES; } -#endif /* MOD_USE_BVALS */ if ( result == NULL ) result = (LDAPMod **) malloc( sizeof(LDAPMod *) ); @@ -265,12 +256,7 @@ bind_prompt( LDAP *ld, char **dnp, char **passwdp, int *authmethodp, int -#ifdef WINSOCK -ldapmain( -#else /* WINSOCK */ -main( -#endif /* WINSOCK */ - int argc, char **argv ) +main( int argc, char **argv ) { LDAP *ld = NULL; int i, c, port, cldapflg, errflg, method, id, msgtype; @@ -290,15 +276,6 @@ main( extern char *optarg; extern int optind; -#ifdef MACOS - if (( argv = get_list( "cmd line arg?" )) == NULL ) { - exit( 1 ); - } - for ( argc = 0; argv[ argc ] != NULL; ++argc ) { - ; - } -#endif /* MACOS */ - host = NULL; port = LDAP_PORT; dnsuffix = ""; @@ -337,7 +314,6 @@ main( port = atoi( optarg ); break; -#if !defined(MACOS) && !defined(DOS) case 't': /* copy ber's to given file */ copyfname = strdup( optarg ); copyoptions = LBER_TO_FILE; @@ -347,7 +323,6 @@ main( copyfname = strdup( optarg ); copyoptions = (LBER_TO_FILE | LBER_TO_FILE_ONLY); break; -#endif default: ++errflg; @@ -380,7 +355,6 @@ main( exit(1); } -#if !defined(MACOS) && !defined(DOS) if ( copyfname != NULL ) { if ( (ld->ld_sb.sb_fd = open( copyfname, O_WRONLY | O_CREAT, 0600 )) == -1 ) { @@ -389,7 +363,6 @@ main( } ld->ld_sb.sb_options = copyoptions; } -#endif bound = 0; timeout.tv_sec = 0; @@ -947,13 +920,9 @@ print_search_entry( LDAP *ld, LDAPMessage *res ) ufn = ldap_dn2ufn( dn ); printf( "\tUFN: %s\n", ufn ); -#ifdef WINSOCK - ldap_memfree( dn ); - ldap_memfree( ufn ); -#else /* WINSOCK */ + free( dn ); free( ufn ); -#endif /* WINSOCK */ for ( a = ldap_first_attribute( ld, e, &ber ); a != NULL; a = ldap_next_attribute( ld, e, ber ) ) { @@ -992,23 +961,3 @@ print_search_entry( LDAP *ld, LDAPMessage *res ) || res->lm_chain != NULLMSG ) print_ldap_result( ld, res, "search" ); } - - -#ifdef WINSOCK -void -ldap_perror( LDAP *ld, char *s ) -{ - char *errs; - - if ( ld == NULL ) { - perror( s ); - return; - } - - errs = ldap_err2string( ld->ld_errno ); - printf( "%s: %s\n", s, errs == NULL ? "unknown error" : errs ); - if ( ld->ld_error != NULL && *ld->ld_error != '\0' ) { - printf( "%s: additional info: %s\n", s, ld->ld_error ); - } -} -#endif /* WINSOCK */ diff --git a/libraries/libldap/tmplout.c b/libraries/libldap/tmplout.c index 308745ec84..823b36a30c 100644 --- a/libraries/libldap/tmplout.c +++ b/libraries/libldap/tmplout.c @@ -911,11 +911,6 @@ time2text( char *ldtimestr, int dateonly ) /* gtime.c - inverse gmtime */ - -#if !defined( MACOS ) && !defined( _WIN32 ) && !defined( DOS ) -#include -#endif /* !MACOS */ - /* gtime(): the inverse of localtime(). This routine was supplied by Mike Accetta at CMU many years ago. */ diff --git a/libraries/libldap/tmpltest.c b/libraries/libldap/tmpltest.c index aa860b9a37..5bd25241b4 100644 --- a/libraries/libldap/tmpltest.c +++ b/libraries/libldap/tmpltest.c @@ -6,7 +6,7 @@ #include #include -#ifdef MACOS +#ifdef HAVE_CONSOLE_H #include #endif /* MACOS */ @@ -27,7 +27,7 @@ main( int argc, char **argv ) struct ldap_searchobj *so, *sop; int err; -#ifdef MACOS +#ifdef HAVE_CONSOLE_H ccommand( &argv ); for ( argc = 0; argv[ argc ] != NULL; ++argc ) { ; diff --git a/servers/slapd/lock.c b/servers/slapd/lock.c index debc102e2e..aee7c31cfb 100644 --- a/servers/slapd/lock.c +++ b/servers/slapd/lock.c @@ -27,10 +27,10 @@ lock_fopen( char *fname, char *type, FILE **lfp ) } /* acquire the lock */ -#ifdef USE_LOCKF - while ( lockf( fileno( *lfp ), F_LOCK, 0 ) != 0 ) { -#else +#ifdef HAVE_FLOCK while ( flock( fileno( *lfp ), LOCK_EX ) != 0 ) { +#else + while ( lockf( fileno( *lfp ), F_LOCK, 0 ) != 0 ) { #endif ; /* NULL */ } @@ -38,10 +38,10 @@ lock_fopen( char *fname, char *type, FILE **lfp ) /* open the log file */ if ( (fp = fopen( fname, type )) == NULL ) { Debug( LDAP_DEBUG_ANY, "could not open \"%s\"\n", fname, 0, 0 ); -#ifdef USE_LOCKF - lockf( fileno( *lfp ), F_ULOCK, 0 ); -#else +#ifdef HAVE_FLOCK flock( fileno( *lfp ), LOCK_UN ); +#else + lockf( fileno( *lfp ), F_ULOCK, 0 ); #endif return( NULL ); } diff --git a/servers/slurpd/lock.c b/servers/slurpd/lock.c index 2e42fd8b2d..048c42529c 100644 --- a/servers/slurpd/lock.c +++ b/servers/slurpd/lock.c @@ -49,10 +49,10 @@ lock_fopen( } /* acquire the lock */ -#ifdef HAVE_LOCKF - while ( lockf( fileno( *lfp ), F_LOCK, 0 ) != 0 ) -#else +#ifdef HAVE_FLOCK while ( flock( fileno( *lfp ), LOCK_EX ) != 0 ) +#else + while ( lockf( fileno( *lfp ), F_LOCK, 0 ) != 0 ) #endif { ; /* NULL */ @@ -62,10 +62,10 @@ lock_fopen( if ( (fp = fopen( fname, type )) == NULL ) { Debug( LDAP_DEBUG_ANY, "Error: could not open \"%s\"\n", fname, 0, 0 ); -#ifdef HAVE_LOCKF - lockf( fileno( *lfp ), F_ULOCK, 0 ); -#else +#ifdef HAVE_FLOCK flock( fileno( *lfp ), LOCK_UN ); +#else + lockf( fileno( *lfp ), F_ULOCK, 0 ); #endif return( NULL ); } @@ -82,10 +82,10 @@ lock_fclose( ) { /* unlock */ -#ifdef HAVE_LOCKF - lockf( fileno( lfp ), F_ULOCK, 0 ); -#else +#ifdef HAVE_FLOCK flock( fileno( lfp ), LOCK_UN ); +#else + lockf( fileno( lfp ), F_ULOCK, 0 ); #endif fclose( lfp ); From 198461b7ff40b814212ef84e90782f2b10cd4ec4 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sat, 24 Oct 1998 20:25:50 +0000 Subject: [PATCH 143/148] minor cleanup --- libraries/libldap/open.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/libldap/open.c b/libraries/libldap/open.c index 7fa90682ee..ef3ceccde4 100644 --- a/libraries/libldap/open.c +++ b/libraries/libldap/open.c @@ -218,7 +218,7 @@ open_ldap_connection( LDAP *ld, Sockbuf *sb, char *host, int defport, curhost = hostname; } *r++ = '\0'; - port = htons( (short)atoi( r )); + port = htons( (short) atoi( r ) ); } else { port = defport; } From e671bb2e579e01c529d9ec962420b6f302821ed5 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sat, 24 Oct 1998 20:46:54 +0000 Subject: [PATCH 144/148] We're assuming STDC all the way. --- include/ac/errno.h | 6 +++--- include/ac/socket.h | 1 + include/ac/string.h | 21 +++++++++------------ include/ac/time.h | 8 +++----- 4 files changed, 16 insertions(+), 20 deletions(-) diff --git a/include/ac/errno.h b/include/ac/errno.h index b4854c8ba0..b083cbbdf5 100644 --- a/include/ac/errno.h +++ b/include/ac/errno.h @@ -3,10 +3,10 @@ #ifndef _AC_ERRNO_H #define _AC_ERRNO_H -#if defined( HAVE_SYS_ERRNO_H ) -# include -#elif defined( HAVE_ERRNO_H ) +#if defined( HAVE_ERRNO_H ) # include +#elif defined( HAVE_SYS_ERRNO_H ) +# include #endif #ifdef DECL_SYS_ERRLIST diff --git a/include/ac/socket.h b/include/ac/socket.h index 3530b4896b..1527d02e5f 100644 --- a/include/ac/socket.h +++ b/include/ac/socket.h @@ -88,6 +88,7 @@ #define PDP_ENDIAN 3412 /* LSB first in word, MSW first in long */ /* assume autoconf's AC_C_BIGENDIAN has been run */ +/* if it hasn't, we assume (maybe falsely) the order is LITTLE ENDIAN */ #ifdef WORDS_BIGENDIAN #define BYTE_ORDER BIG_ENDIAN #else diff --git a/include/ac/string.h b/include/ac/string.h index cbe24c190f..2a923e9356 100644 --- a/include/ac/string.h +++ b/include/ac/string.h @@ -3,7 +3,7 @@ #ifndef _AC_STRING_H #define _AC_STRING_H -#if STDC_HEADERS +#ifdef STDC_HEADERS # include #else # ifndef HAVE_STRCHR @@ -18,18 +18,15 @@ # endif #endif -#ifdef HAVE_MEMMOVE -# define SAFEMEMCPY( d, s, n ) memmove((s), (d), (n)) +#if defined( HAVE_MEMMOVE ) +#define SAFEMEMCPY( d, s, n ) memmove((s), (d), (n)) +#elif defined( HAVE_BCOPY ) +#define SAFEMEMCPY( d, s, n ) bcopy((s), (d), (n)) +#elif defined( MACOS ) +#define SAFEMEMCPY( d, s, n ) BlockMoveData((Ptr)(s), (Ptr)(d), (n)) #else -# ifdef HAVE_BCOPY -# define SAFEMEMCPY( d, s, n ) bcopy((s), (d), (n)) -# else -# ifdef MACOS -# define SAFEMEMCPY( d, s, n ) BlockMoveData((Ptr)(s), (Ptr)(d), (n)) -# else -# define SAFEMEMCPY( d, s, n ) memmove((s), (d), (n)) -# endif -# endif +/* nothing left but memcpy() */ +#define SAFEMEMCPY( d, s, n ) memcpy((s), (d), (n)) #endif #endif /* _AC_STRING_H */ diff --git a/include/ac/time.h b/include/ac/time.h index 9cc89f43b4..ba18790a4c 100644 --- a/include/ac/time.h +++ b/include/ac/time.h @@ -6,12 +6,10 @@ #if TIME_WITH_SYS_TIME # include # include +#elif HAVE_SYS_TIME_H +# include #else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif +# include #endif #endif /* _AC_TIME_H */ From c277fff67ffb161fa4f506383c289a9fc4017092 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sat, 24 Oct 1998 21:39:29 +0000 Subject: [PATCH 145/148] Still looking for the ldapsearch bug... and cleaning up things along the way. --- configure | 163 ++++++++++++++++++++------------------- configure.in | 5 ++ libraries/libldbm/ldbm.c | 1 + 3 files changed, 90 insertions(+), 79 deletions(-) diff --git a/configure b/configure index 2f0cf6241d..8c6062121e 100755 --- a/configure +++ b/configure @@ -4790,17 +4790,22 @@ EOF fi + +if test $ac_cv_header_stdc != yes; then + echo "configure: warning: could not locate Standard C headers" 1>&2 +fi + ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:4799: checking for $ac_hdr that defines DIR" >&5 +echo "configure:4804: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -4808,7 +4813,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:4812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -4833,7 +4838,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:4837: checking for opendir in -ldir" >&5 +echo "configure:4842: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4841,7 +4846,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4874,7 +4879,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:4878: checking for opendir in -lx" >&5 +echo "configure:4883: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4882,7 +4887,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4916,12 +4921,12 @@ fi fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:4920: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:4925: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4937,7 +4942,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:4941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -4982,17 +4987,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4986: checking for $ac_hdr" >&5 +echo "configure:4991: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5020,12 +5025,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5024: checking for uid_t in sys/types.h" >&5 +echo "configure:5029: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -5054,7 +5059,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:5058: checking type of array argument to getgroups" >&5 +echo "configure:5063: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5062,7 +5067,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -5101,7 +5106,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -5125,12 +5130,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:5129: checking for mode_t" >&5 +echo "configure:5134: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5158,12 +5163,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:5162: checking for off_t" >&5 +echo "configure:5167: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5191,12 +5196,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:5195: checking for pid_t" >&5 +echo "configure:5200: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5224,12 +5229,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:5228: checking return type of signal handlers" >&5 +echo "configure:5233: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5246,7 +5251,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:5250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -5265,12 +5270,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:5269: checking for size_t" >&5 +echo "configure:5274: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5298,12 +5303,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5302: checking for uid_t in sys/types.h" >&5 +echo "configure:5307: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -5332,12 +5337,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:5336: checking for st_blksize in struct stat" >&5 +echo "configure:5341: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5345,7 +5350,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:5349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -5366,12 +5371,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:5370: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:5375: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5380,7 +5385,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:5384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -5401,12 +5406,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:5405: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:5410: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5414,7 +5419,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:5418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -5437,7 +5442,7 @@ fi echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6 -echo "configure:5441: checking if toupper() requires islower()" >&5 +echo "configure:5446: checking if toupper() requires islower()" >&5 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5446,7 +5451,7 @@ else ol_cv_c_upper_lower=safe else cat > conftest.$ac_ext < @@ -5458,7 +5463,7 @@ main() exit(1); } EOF -if { (eval echo configure:5462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ol_cv_c_upper_lower=no else @@ -5481,12 +5486,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:5485: checking for working const" >&5 +echo "configure:5490: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5544: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -5558,7 +5563,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:5562: checking for 8-bit clean memcmp" >&5 +echo "configure:5567: 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 @@ -5566,7 +5571,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -5594,12 +5599,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:5598: checking for strftime" >&5 +echo "configure:5603: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -5644,7 +5649,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:5648: checking for strftime in -lintl" >&5 +echo "configure:5653: 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 @@ -5652,7 +5657,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5690,12 +5695,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:5694: checking for vprintf" >&5 +echo "configure:5699: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -5742,12 +5747,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:5746: checking for _doprnt" >&5 +echo "configure:5751: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -5795,7 +5800,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:5799: checking for wait3 that fills in rusage" >&5 +echo "configure:5804: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5803,7 +5808,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -5834,7 +5839,7 @@ main() { } } EOF -if { (eval echo configure:5838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -5888,12 +5893,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5892: checking for $ac_func" >&5 +echo "configure:5897: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5944,12 +5949,12 @@ done for ac_func in getopt strdup tempnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5948: checking for $ac_func" >&5 +echo "configure:5953: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6002,13 +6007,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:6006: checking declaration of sys_errlist" >&5 +echo "configure:6011: 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 < @@ -6018,7 +6023,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:6022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -6039,20 +6044,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:6043: checking existence of sys_errlist" >&5 +echo "configure:6048: 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 < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:6056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index 3c1ed4fc77..e938e98fae 100644 --- a/configure.in +++ b/configure.in @@ -683,6 +683,11 @@ fi dnl ---------------------------------------------------------------- dnl Checks for header files. AC_HEADER_STDC + +if test $ac_cv_header_stdc != yes; then + AC_MSG_WARN([could not locate Standard C headers]) +fi + AC_HEADER_DIRENT AC_HEADER_SYS_WAIT AC_CHECK_HEADERS( \ diff --git a/libraries/libldbm/ldbm.c b/libraries/libldbm/ldbm.c index ab76aaffed..df3bb6d57c 100644 --- a/libraries/libldbm/ldbm.c +++ b/libraries/libldbm/ldbm.c @@ -11,6 +11,7 @@ #ifdef SLAPD_LDBM #include +#include #include #include "ldbm.h" From 44268993962acd16029f7339595fbea202432482 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sat, 24 Oct 1998 22:06:36 +0000 Subject: [PATCH 146/148] remove some lint... --- clients/tools/ldapsearch.dsp | 2 +- libraries/liblber/decode.c | 2 +- libraries/liblber/encode.c | 2 +- libraries/liblber/io.c | 11 +++++------ libraries/liblber/liblber.dsp | 2 +- libraries/libldap/libldap.dsp | 2 +- libraries/libldif/libldif.dsp | 2 +- libraries/liblutil/liblutil.dsp | 2 +- 8 files changed, 12 insertions(+), 13 deletions(-) diff --git a/clients/tools/ldapsearch.dsp b/clients/tools/ldapsearch.dsp index 9927479c89..87e9db537a 100644 --- a/clients/tools/ldapsearch.dsp +++ b/clients/tools/ldapsearch.dsp @@ -67,7 +67,7 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W4 /Gm /GX /Zi /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe diff --git a/libraries/liblber/decode.c b/libraries/liblber/decode.c index b99f97ac9d..9162339cc7 100644 --- a/libraries/liblber/decode.c +++ b/libraries/liblber/decode.c @@ -160,7 +160,7 @@ ber_getnint( BerElement *ber, long *num, int len ) sign = (0x80 & *(p+diff) ); if ( sign && len < sizeof(long) ) { for ( i = 0; i < diff; i++ ) { - *(p+i) = (char) 0xff; + *(p+i) = (unsigned char) 0xff; } } *num = AC_NTOHL( netnum ); diff --git a/libraries/liblber/encode.c b/libraries/liblber/encode.c index af320f372c..c31bd3ce21 100644 --- a/libraries/liblber/encode.c +++ b/libraries/liblber/encode.c @@ -127,7 +127,7 @@ ber_put_len( BerElement *ber, unsigned long len, int nosos ) if ( len & mask ) break; } - lenlen = ++i; + lenlen = (unsigned char) ++i; if ( lenlen > 4 ) return( -1 ); lenlen |= 0x80; diff --git a/libraries/liblber/io.c b/libraries/liblber/io.c index 0b9a59d1cf..798448f421 100644 --- a/libraries/liblber/io.c +++ b/libraries/liblber/io.c @@ -137,9 +137,8 @@ ber_filbuf( Sockbuf *sb, long len ) #endif /* LDAP_CONNECTIONLESS */ } else { rc = read( sb->sb_sd, sb->sb_ber.ber_buf, - ((sb->sb_options & LBER_NO_READ_AHEAD) && - (len < READBUFSIZ)) ? - len : READBUFSIZ ); + ((sb->sb_options & LBER_NO_READ_AHEAD) && (len < READBUFSIZ)) ? + len : READBUFSIZ ); } if ( rc > 0 ) { @@ -164,7 +163,7 @@ BerRead( Sockbuf *sb, char *buf, long len ) break; return( c ); } - *buf++ = c; + *buf++ = (char) c; nread++; len--; } @@ -335,7 +334,7 @@ ber_alloc_t( int options ) if ( (ber = (BerElement *) calloc( 1, sizeof(BerElement) )) == NULLBER ) return( NULLBER ); ber->ber_tag = LBER_DEFAULT; - ber->ber_options = options; + ber->ber_options = (char) options; return( ber ); } @@ -371,7 +370,7 @@ ber_init( BerElement *ber, int options ) { (void) memset( (char *)ber, '\0', sizeof( BerElement )); ber->ber_tag = LBER_DEFAULT; - ber->ber_options = options; + ber->ber_options = (char) options; } diff --git a/libraries/liblber/liblber.dsp b/libraries/liblber/liblber.dsp index e0457f90f6..996c57c717 100644 --- a/libraries/liblber/liblber.dsp +++ b/libraries/liblber/liblber.dsp @@ -60,7 +60,7 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "Debug\liblber" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /Z7 /Od /I "..\..\include" /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /W4 /GX /Z7 /Od /I "..\..\include" /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo diff --git a/libraries/libldap/libldap.dsp b/libraries/libldap/libldap.dsp index 2d90c6392b..4d6d5fccc5 100644 --- a/libraries/libldap/libldap.dsp +++ b/libraries/libldap/libldap.dsp @@ -60,7 +60,7 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "Debug\libldap" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /Z7 /Od /I "..\..\include" /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /W4 /GX /Z7 /Od /I "..\..\include" /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo diff --git a/libraries/libldif/libldif.dsp b/libraries/libldif/libldif.dsp index e9fb0c2b97..72402a4370 100644 --- a/libraries/libldif/libldif.dsp +++ b/libraries/libldif/libldif.dsp @@ -60,7 +60,7 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "Debug" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /Z7 /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /W4 /GX /Z7 /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo diff --git a/libraries/liblutil/liblutil.dsp b/libraries/liblutil/liblutil.dsp index 59de922e50..25674c47b0 100644 --- a/libraries/liblutil/liblutil.dsp +++ b/libraries/liblutil/liblutil.dsp @@ -60,7 +60,7 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "Debug" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /Z7 /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /W4 /GX /Z7 /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo From af77c232f57dc70c472e10828ae121c4cda50e39 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sun, 25 Oct 1998 00:35:35 +0000 Subject: [PATCH 147/148] Found the really, really stupid bug. The SAFEMEMCPY macro in string.h was hosed for memmove/memcpy cases. --- clients/gopher/go500.c | 12 +++++------ clients/gopher/go500gw.c | 10 ++++----- clients/rcpt500/query.c | 2 +- clients/ud/auth.c | 3 ++- clients/ud/edit.c | 11 +++++----- clients/ud/group.c | 4 ++-- clients/ud/mod.c | 9 ++++---- clients/ud/print.c | 5 +++-- include/ac/string.h | 24 +++++++++++---------- include/lutil_sha1.h | 2 +- libraries/libldap/os-ip.c | 2 +- libraries/libldap/sort.c | 6 +++--- servers/slapd/back-ldbm/bind.c | 8 +++++-- servers/slapd/connection.c | 4 ++-- servers/slapd/daemon.c | 28 ++++++++++++------------- servers/slapd/main.c | 4 ++-- servers/slapd/tools/ldbmtest.c | 2 +- servers/slurpd/admin.c | 4 ++-- servers/slurpd/fm.c | 38 +++++++++++++++++----------------- servers/slurpd/main.c | 4 ++-- servers/slurpd/replica.c | 4 ++-- servers/slurpd/ri.c | 8 +++---- 22 files changed, 101 insertions(+), 93 deletions(-) diff --git a/clients/gopher/go500.c b/clients/gopher/go500.c index 792b45a56e..6a8a70c528 100644 --- a/clients/gopher/go500.c +++ b/clients/gopher/go500.c @@ -13,13 +13,13 @@ #include "portable.h" #include -#include -#include -#include -#include +#include +#include #include +#include #include +#include #include #include @@ -176,7 +176,7 @@ char **argv; s = set_socket( port ); /* arrange to reap children */ - (void) signal( SIGCHLD, (void *) wait4child ); + (void) SIGNAL( SIGCHLD, wait4child ); } else { myport = GO500_PORT; @@ -315,7 +315,7 @@ wait4child() ; /* NULL */ #endif - (void) signal( SIGCHLD, (void *) wait4child ); + (void) SIGNAL( SIGCHLD, wait4child ); } static diff --git a/clients/gopher/go500gw.c b/clients/gopher/go500gw.c index 2260d6061a..4600d5af89 100644 --- a/clients/gopher/go500gw.c +++ b/clients/gopher/go500gw.c @@ -13,13 +13,13 @@ #include "portable.h" #include -#include -#include -#include +#include +#include #include #include #include +#include #include #include @@ -198,7 +198,7 @@ char **argv; s = set_socket( port ); /* arrange to reap children */ - (void) signal( SIGCHLD, (void *) wait4child ); + (void) SIGNAL( SIGCHLD, wait4child ); } if ( inetd ) { @@ -339,7 +339,7 @@ wait4child() ; /* NULL */ #endif - (void) signal( SIGCHLD, (void *) wait4child ); + (void) SIGNAL( SIGCHLD, wait4child ); } static do_queries( s ) diff --git a/clients/rcpt500/query.c b/clients/rcpt500/query.c index 65c57df2d3..85b0f5b5f8 100644 --- a/clients/rcpt500/query.c +++ b/clients/rcpt500/query.c @@ -322,7 +322,7 @@ do_read( ldp, dn, reply, tmpll ) rc = ldap_entry2text_search( ldp, dn, searchbase, NULLMSG, tmpll, - defattrs, defvals, (void *)append_text, (void *)reply, "\n", + defattrs, defvals, append_text, (void *)reply, "\n", rdncount, LDAP_DISP_OPT_DOSEARCHACTIONS ); return( rc ); diff --git a/clients/ud/auth.c b/clients/ud/auth.c index 2f64d81c66..8f14aa7a2f 100644 --- a/clients/ud/auth.c +++ b/clients/ud/auth.c @@ -40,6 +40,8 @@ static int kinit(); static int valid_tgt(); #endif +static void set_bound_dn(); + auth(who, implicit) char *who; int implicit; @@ -68,7 +70,6 @@ int implicit; extern void printbase(); /* used to pretty-print a base */ extern int bind_status; extern void Free(); - static void set_bound_dn(); #ifdef DEBUG if (debug & D_TRACE) diff --git a/clients/ud/edit.c b/clients/ud/edit.c index 01dc1e0417..f8a094361a 100644 --- a/clients/ud/edit.c +++ b/clients/ud/edit.c @@ -33,6 +33,12 @@ extern LDAP *ld; extern LDAPMessage *find(); +static int load_editor(); +static int modifiable(); +static int print_attrs_and_values(); +static int ovalues(); +static int write_entry(); + static char *entry_temp_file; #ifdef DEBUG @@ -46,8 +52,6 @@ char *who; char *dn, **rdns; /* distinguished name */ char name[MED_BUF_SIZE]; /* entry to modify */ extern int bind_status; - static int load_editor(); - static int write_entry(); #ifdef DEBUG if (debug & D_TRACE) @@ -114,7 +118,6 @@ static load_editor() static char template[MED_BUF_SIZE]; extern char * mktemp(); extern int isgroup(), fatal(); - static int print_attrs_and_values(); int pid; int status; int rc; @@ -195,7 +198,6 @@ FILE *fp; struct attribute attrs[]; short flag; { - static int modifiable(); register int i, j; for (i = 0; attrs[i].quipu_name != NULL; i++) { @@ -242,7 +244,6 @@ static write_entry() LDAPMod *mods[MAX_ATTRS + 1]; LDAPMod *modp = NULL; - static int ovalues(); extern char * code_to_str(); extern void free_mod_struct(); diff --git a/clients/ud/group.c b/clients/ud/group.c index 5e3d2a0263..eee8a6b621 100644 --- a/clients/ud/group.c +++ b/clients/ud/group.c @@ -37,6 +37,8 @@ extern LDAP *ld; extern void Free(); +static char * bind_and_fetch(); + void add_group(name) char *name; { @@ -209,7 +211,6 @@ void remove_group(name) char *name; { char *dn, tmp[BUFSIZ]; - static char * bind_and_fetch(); #ifdef DEBUG if (debug & D_TRACE) { @@ -260,7 +261,6 @@ char *name; char *values[2], *group_name; LDAPMod mod, *mods[2]; static char *actions[] = { "join", "resign from", NULL }; - static char * bind_and_fetch(); #ifdef DEBUG if (debug & D_TRACE) { diff --git a/clients/ud/mod.c b/clients/ud/mod.c index a5e5369ca9..c946bb8045 100644 --- a/clients/ud/mod.c +++ b/clients/ud/mod.c @@ -27,6 +27,10 @@ extern int verbose; extern LDAP *ld; extern LDAPMessage *find(); +extern void * Malloc(); + +static char * get_URL(); +static int check_URL(); #ifdef DEBUG extern int debug; @@ -382,9 +386,6 @@ char *id, *prompt; static char line[LINE_SIZE]; /* raw line from user */ static char buffer[MAX_DESC_LINES * LINE_SIZE]; /* holds ALL of the lines we get */ - extern void * Malloc(); - static char * get_URL(); - #ifdef DEBUG if (debug & D_TRACE) printf("->get_value(%s, %s)\n", id, prompt); @@ -754,8 +755,6 @@ int group; static char * get_URL() { char *rvalue, label[MED_BUF_SIZE], url[MED_BUF_SIZE]; - static int check_URL(); - extern void * Malloc(); if (verbose) { printf(" First, enter the URL. (Example: http://www.us.itd.umich.edu/users/).\n"); diff --git a/clients/ud/print.c b/clients/ud/print.c index 5b7cb87910..5ff0f6b2d9 100644 --- a/clients/ud/print.c +++ b/clients/ud/print.c @@ -34,6 +34,9 @@ extern void * Malloc(); extern void Free(); extern char * my_ldap_dn2ufn(); +static char *time2text(); +static long gtime(); + /* * When displaying entries, display only these attributes, and in this * order. @@ -193,7 +196,6 @@ print_an_entry() char is_a_group, **order; char *sub_list[MAX_VALUES], buf[SMALL_BUF_SIZE]; extern int col_size, isaurl(), isadn(); - static char *time2text(); #ifdef DEBUG if (debug & D_TRACE) @@ -557,7 +559,6 @@ time2text( char *ldtimestr, int dateonly ) struct tm t; char *p, *timestr, zone, *fmterr = "badly formatted time"; time_t gmttime; - static long gtime(); memset( (char *)&t, 0, sizeof( struct tm )); if ( strlen( ldtimestr ) < 13 ) { diff --git a/include/ac/string.h b/include/ac/string.h index 2a923e9356..147976fc68 100644 --- a/include/ac/string.h +++ b/include/ac/string.h @@ -13,20 +13,22 @@ char *strchr (), *strrchr (); # ifndef HAVE_MEMCPY -# define memcpy(d, s, n) bcopy ((s), (d), (n)) -# define memmove(d, s, n) bcopy ((s), (d), (n)) +# define memcpy(d, s, n) bcopy ((s), (d), (n)) +# define memmove(d, s, n) bcopy ((s), (d), (n)) # endif #endif -#if defined( HAVE_MEMMOVE ) -#define SAFEMEMCPY( d, s, n ) memmove((s), (d), (n)) -#elif defined( HAVE_BCOPY ) -#define SAFEMEMCPY( d, s, n ) bcopy((s), (d), (n)) -#elif defined( MACOS ) -#define SAFEMEMCPY( d, s, n ) BlockMoveData((Ptr)(s), (Ptr)(d), (n)) -#else -/* nothing left but memcpy() */ -#define SAFEMEMCPY( d, s, n ) memcpy((s), (d), (n)) +#ifndef SAFEMEMCPY +# if defined( HAVE_MEMMOVE ) +# define SAFEMEMCPY( d, s, n ) memmove((d), (s), (n)) +# elif defined( HAVE_BCOPY ) +# define SAFEMEMCPY( d, s, n ) bcopy((s), (d), (n)) +# elif defined( MACOS ) +# define SAFEMEMCPY( d, s, n ) BlockMoveData((Ptr)(s), (Ptr)(d), (n)) +# else + /* nothing left but memcpy() */ +# define SAFEMEMCPY( d, s, n ) memcpy((d), (s), (n)) +# endif #endif #endif /* _AC_STRING_H */ diff --git a/include/lutil_sha1.h b/include/lutil_sha1.h index f4ed0a7538..b20d490305 100644 --- a/include/lutil_sha1.h +++ b/include/lutil_sha1.h @@ -49,4 +49,4 @@ LDAP_F char *ldap_SHA1Data LDAP_END_DECL -#endif _LDAP_SHA1_H_ +#endif /* _LDAP_SHA1_H_ */ diff --git a/libraries/libldap/os-ip.c b/libraries/libldap/os-ip.c index e87cb0cb46..d5bd6715bf 100644 --- a/libraries/libldap/os-ip.c +++ b/libraries/libldap/os-ip.c @@ -139,7 +139,7 @@ ldap_connect_to_host( Sockbuf *sb, char *host, unsigned long address, #endif /* notyet */ Debug( LDAP_DEBUG_TRACE, "sd %d connected to: %s\n", - s, inet_ntoa( sin.sin_addr ), 0 ); + s, (char *) inet_ntoa( sin.sin_addr ), 0 ); } return( rc ); diff --git a/libraries/libldap/sort.c b/libraries/libldap/sort.c index 7e90d9fcd6..2ac3c31a81 100644 --- a/libraries/libldap/sort.c +++ b/libraries/libldap/sort.c @@ -79,7 +79,7 @@ ldap_sort_entries( LDAP *ld, LDAPMessage **chain, char *attr, /* NULL => sort by DN */ - int (*cmp)() + int (*cmp) LDAP_P((char *, char *)) ) { int i, count; @@ -113,7 +113,7 @@ ldap_sort_entries( last = e; et_cmp_fn = cmp; - qsort( et, count, sizeof(struct entrything), (void *) et_cmp ); + qsort( et, count, sizeof(struct entrything), et_cmp ); ep = chain; for ( i = 0; i < count; i++ ) { @@ -140,7 +140,7 @@ ldap_sort_values( for ( nel = 0; vals[nel] != NULL; nel++ ) ; /* NULL */ - qsort( vals, nel, sizeof(char *), (void *) cmp ); + qsort( vals, nel, sizeof(char *), cmp ); return( 0 ); } diff --git a/servers/slapd/back-ldbm/bind.c b/servers/slapd/back-ldbm/bind.c index f27872456e..d1224a2dfd 100644 --- a/servers/slapd/back-ldbm/bind.c +++ b/servers/slapd/back-ldbm/bind.c @@ -63,7 +63,9 @@ crypted_value_find( char *userpassword = vals[i]->bv_val + sizeof("{MD5}") - 1; ldap_MD5Init(&MD5context); - ldap_MD5Update(&MD5context, cred->bv_val, strlen(cred->bv_val)); + ldap_MD5Update(&MD5context, + (unsigned char *) cred->bv_val, + strlen(cred->bv_val)); ldap_MD5Final(MD5digest, &MD5context); if (b64_ntop(MD5digest, sizeof(MD5digest), @@ -86,7 +88,9 @@ crypted_value_find( char *userpassword = vals[i]->bv_val + sizeof("{SHA}") - 1; ldap_SHA1Init(&SHA1context); - ldap_SHA1Update(&SHA1context, cred->bv_val, strlen(cred->bv_val)); + ldap_SHA1Update(&SHA1context, + (unsigned char *) cred->bv_val, + strlen(cred->bv_val)); ldap_SHA1Final(SHA1digest, &SHA1context); if (b64_ntop(SHA1digest, sizeof(SHA1digest), diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index 661877ffb4..15f2dfd0bd 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -206,7 +206,7 @@ connection_activity( * This is a draft 10 or standard pthreads implementation */ if ( pthread_create( &arg->co_op->o_tid, &attr, - (void *) connection_operation, (void *) arg ) != 0 ) { + connection_operation, (void *) arg ) != 0 ) { Debug( LDAP_DEBUG_ANY, "pthread_create failed\n", 0, 0, 0 ); } else { pthread_mutex_lock( &active_threads_mutex ); @@ -218,7 +218,7 @@ connection_activity( * This is a draft 4 or earlier pthreads implementation */ if ( pthread_create( &arg->co_op->o_tid, attr, - (void *) connection_operation, (void *) arg ) != 0 ) { + connection_operation, (void *) arg ) != 0 ) { Debug( LDAP_DEBUG_ANY, "pthread_create failed\n", 0, 0, 0 ); } else { pthread_mutex_lock( &active_threads_mutex ); diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index d863a6a9c5..b9a11efb70 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -146,15 +146,15 @@ slapd_daemon( * LinuxThreads are implemented using SIGUSR1/USR2, * so we'll use SIGSTKFLT and SIGUNUSED */ - (void) SIGNAL( SIGSTKFLT, (void *) do_nothing ); - (void) SIGNAL( SIGUNUSED, (void *) set_shutdown ); + (void) SIGNAL( SIGSTKFLT, do_nothing ); + (void) SIGNAL( SIGUNUSED, set_shutdown ); #else /* !linux */ - (void) SIGNAL( SIGUSR1, (void *) do_nothing ); - (void) SIGNAL( SIGUSR2, (void *) set_shutdown ); + (void) SIGNAL( SIGUSR1, do_nothing ); + (void) SIGNAL( SIGUSR2, set_shutdown ); #endif /* !linux */ - (void) SIGNAL( SIGTERM, (void *) set_shutdown ); - (void) SIGNAL( SIGINT, (void *) set_shutdown ); - (void) SIGNAL( SIGHUP, (void *) set_shutdown ); + (void) SIGNAL( SIGTERM, set_shutdown ); + (void) SIGNAL( SIGINT, set_shutdown ); + (void) SIGNAL( SIGHUP, set_shutdown ); Debug( LDAP_DEBUG_ANY, "slapd starting\n", 0, 0, 0 ); #ifdef SLAPD_PIDFILE @@ -420,14 +420,14 @@ set_shutdown() * so we'll use SIGSTKFLT and SIGUNUSED */ pthread_kill( listener_tid, SIGSTKFLT ); - (void) SIGNAL( SIGUNUSED, (void *) set_shutdown ); + (void) SIGNAL( SIGUNUSED, set_shutdown ); #else /* !linux */ pthread_kill( listener_tid, SIGUSR1 ); - (void) SIGNAL( SIGUSR2, (void *) set_shutdown ); + (void) SIGNAL( SIGUSR2, set_shutdown ); #endif /* !linux */ - (void) SIGNAL( SIGTERM, (void *) set_shutdown ); - (void) SIGNAL( SIGINT, (void *) set_shutdown ); - (void) SIGNAL( SIGHUP, (void *) set_shutdown ); + (void) SIGNAL( SIGTERM, set_shutdown ); + (void) SIGNAL( SIGINT, set_shutdown ); + (void) SIGNAL( SIGHUP, set_shutdown ); } static void @@ -439,8 +439,8 @@ do_nothing() * LinuxThreads are implemented using SIGUSR1/USR2, * so we'll use SIGSTKFLT and SIGUNUSED */ - (void) SIGNAL( SIGSTKFLT, (void *) do_nothing ); + (void) SIGNAL( SIGSTKFLT, do_nothing ); #else /* !linux */ - (void) SIGNAL( SIGUSR1, (void *) do_nothing ); + (void) SIGNAL( SIGUSR1, do_nothing ); #endif /* !linux */ } diff --git a/servers/slapd/main.c b/servers/slapd/main.c index 59fb391b1f..bb4c286703 100644 --- a/servers/slapd/main.c +++ b/servers/slapd/main.c @@ -185,7 +185,7 @@ main( argc, argv ) /* POSIX_THREADS or compatible * This is a draft 10 or standard pthreads implementation */ - if ( pthread_create( &listener_tid, &attr, (void *) slapd_daemon, + if ( pthread_create( &listener_tid, &attr, slapd_daemon, (void *) port ) != 0 ) { Debug( LDAP_DEBUG_ANY, "listener pthread_create failed\n", 0, 0, 0 ); @@ -195,7 +195,7 @@ main( argc, argv ) /* * This is a draft 4 or earlier pthreads implementation */ - if ( pthread_create( &listener_tid, attr, (void *) slapd_daemon, + if ( pthread_create( &listener_tid, attr, slapd_daemon, (void *) port ) != 0 ) { Debug( LDAP_DEBUG_ANY, "listener pthread_create failed\n", 0, 0, 0 ); diff --git a/servers/slapd/tools/ldbmtest.c b/servers/slapd/tools/ldbmtest.c index 5be56d64f6..9649eff22b 100644 --- a/servers/slapd/tools/ldbmtest.c +++ b/servers/slapd/tools/ldbmtest.c @@ -474,7 +474,7 @@ get_idlist( fp, data ) p->b_nids = i; } - qsort( (void *) p->b_ids, i, sizeof(ID), (void *) dnid_cmp ); + qsort( (void *) p->b_ids, i, sizeof(ID), dnid_cmp ); } data->dptr = (char *) p; diff --git a/servers/slurpd/admin.c b/servers/slurpd/admin.c index af28544d18..5af8d53cce 100644 --- a/servers/slurpd/admin.c +++ b/servers/slurpd/admin.c @@ -35,9 +35,9 @@ * slurpd receives a USR2 signal, it will dump its replication * queue to the disk file given by SLURPD_DUMPFILE. */ -void +RETSIGTYPE do_admin() { sglob->rq->rq_dump( sglob->rq ); - (void) SIGNAL( SIGUSR2, (void *) do_admin ); + (void) SIGNAL( SIGUSR2, do_admin ); } diff --git a/servers/slurpd/fm.c b/servers/slurpd/fm.c index 8397836533..2aed9e602e 100644 --- a/servers/slurpd/fm.c +++ b/servers/slurpd/fm.c @@ -28,7 +28,7 @@ /* * Externs */ -extern void do_admin LDAP_P((void)); +extern RETSIGTYPE do_admin LDAP_P((int)); extern int file_nonempty LDAP_P(( char * )); extern int acquire_lock LDAP_P((char *, FILE **, FILE ** )); extern int relinquish_lock LDAP_P((char *, FILE *, FILE * )); @@ -38,8 +38,8 @@ extern int relinquish_lock LDAP_P((char *, FILE *, FILE * )); */ static char *get_record LDAP_P(( FILE * )); static void populate_queue LDAP_P(( char *f )); -static void set_shutdown LDAP_P((void)); -void do_nothing LDAP_P((void)); +static RETSIGTYPE set_shutdown LDAP_P((int)); +RETSIGTYPE do_nothing LDAP_P((int)); /* @@ -64,15 +64,15 @@ fm( * (not yet implemented). */ #ifdef HAVE_LINUX_THREADS - (void) SIGNAL( SIGSTKFLT, (void *) do_nothing ); - (void) SIGNAL( SIGUNUSED, (void *) do_admin ); + (void) SIGNAL( SIGSTKFLT, do_nothing ); + (void) SIGNAL( SIGUNUSED, do_admin ); #else - (void) SIGNAL( SIGUSR1, (void *) do_nothing ); - (void) SIGNAL( SIGUSR2, (void *) do_admin ); + (void) SIGNAL( SIGUSR1, do_nothing ); + (void) SIGNAL( SIGUSR2, do_admin ); #endif - (void) SIGNAL( SIGTERM, (void *) set_shutdown ); - (void) SIGNAL( SIGINT, (void *) set_shutdown ); - (void) SIGNAL( SIGHUP, (void *) set_shutdown ); + (void) SIGNAL( SIGTERM, set_shutdown ); + (void) SIGNAL( SIGINT, set_shutdown ); + (void) SIGNAL( SIGHUP, set_shutdown ); if ( sglob->one_shot_mode ) { if ( file_nonempty( sglob->slapd_replogfile )) { @@ -141,8 +141,8 @@ fm( /* * Set a global flag which signals that we're shutting down. */ -static void -set_shutdown() +static RETSIGTYPE +set_shutdown(int x) { int i; @@ -158,9 +158,9 @@ set_shutdown() (sglob->replicas[ i ])->ri_wake( sglob->replicas[ i ]); } sglob->rq->rq_unlock( sglob->rq ); /* unlock queue */ - (void) SIGNAL( SIGTERM, (void *) set_shutdown ); /* reinstall handlers */ - (void) SIGNAL( SIGINT, (void *) set_shutdown ); - (void) SIGNAL( SIGHUP, (void *) set_shutdown ); + (void) SIGNAL( SIGTERM, set_shutdown ); /* reinstall handlers */ + (void) SIGNAL( SIGINT, set_shutdown ); + (void) SIGNAL( SIGHUP, set_shutdown ); } @@ -169,13 +169,13 @@ set_shutdown() /* * A do-nothing signal handler. */ -void -do_nothing() +RETSIGTYPE +do_nothing(int i) { #ifdef HAVE_LINUX_THREADS - (void) SIGNAL( SIGSTKFLT, (void *) do_nothing ); + (void) SIGNAL( SIGSTKFLT, do_nothing ); #else - (void) SIGNAL( SIGUSR1, (void *) do_nothing ); + (void) SIGNAL( SIGUSR1, do_nothing ); #endif } diff --git a/servers/slurpd/main.c b/servers/slurpd/main.c index 85383dd9fc..d780ed3038 100644 --- a/servers/slurpd/main.c +++ b/servers/slurpd/main.c @@ -128,7 +128,7 @@ main( /* POSIX_THREADS or compatible * This is a draft 10 or standard pthreads implementation */ - if ( pthread_create( &(sglob->fm_tid), &attr, (void *) fm, (void *) NULL ) + if ( pthread_create( &(sglob->fm_tid), &attr, fm, (void *) NULL ) != 0 ) { Debug( LDAP_DEBUG_ANY, "file manager pthread_create failed\n", 0, 0, 0 ); @@ -139,7 +139,7 @@ main( /* * This is a draft 4 or earlier pthreads implementation */ - if ( pthread_create( &(sglob->fm_tid), attr, (void *) fm, (void *) NULL ) + if ( pthread_create( &(sglob->fm_tid), attr, fm, (void *) NULL ) != 0 ) { Debug( LDAP_DEBUG_ANY, "file manager pthread_create failed\n", 0, 0, 0 ); diff --git a/servers/slurpd/replica.c b/servers/slurpd/replica.c index 9652827950..7ce0c54f2b 100644 --- a/servers/slurpd/replica.c +++ b/servers/slurpd/replica.c @@ -67,7 +67,7 @@ start_replica_thread( /* POSIX_THREADS or compatible * This is a draft 10 or standard pthreads implementation */ - if ( pthread_create( &(ri->ri_tid), &attr, (void *) replicate, + if ( pthread_create( &(ri->ri_tid), &attr, replicate, (void *) ri ) != 0 ) { Debug( LDAP_DEBUG_ANY, "replica \"%s:%d\" pthread_create failed\n", ri->ri_hostname, ri->ri_port, 0 ); @@ -78,7 +78,7 @@ start_replica_thread( /* * This is a draft 4 or earlier pthreads implementation */ - if ( pthread_create( &(ri->ri_tid), attr, (void *) replicate, + if ( pthread_create( &(ri->ri_tid), attr, replicate, (void *) ri ) != 0 ) { Debug( LDAP_DEBUG_ANY, "replica \"%s:%d\" pthread_create failed\n", ri->ri_hostname, ri->ri_port, 0 ); diff --git a/servers/slurpd/ri.c b/servers/slurpd/ri.c index 0560a49e79..4356c85cee 100644 --- a/servers/slurpd/ri.c +++ b/servers/slurpd/ri.c @@ -51,9 +51,9 @@ Ri_process( char *errmsg; #ifdef HAVE_LINUX_THREADS - (void) SIGNAL( SIGSTKFLT, (void *) do_nothing ); + (void) SIGNAL( SIGSTKFLT, do_nothing ); #else - (void) SIGNAL( SIGUSR1, (void *) do_nothing ); + (void) SIGNAL( SIGUSR1, do_nothing ); #endif (void) SIGNAL( SIGPIPE, SIG_IGN ); if ( ri == NULL ) { @@ -153,10 +153,10 @@ Ri_wake( } #ifdef HAVE_LINUX_THREADS pthread_kill( ri->ri_tid, SIGSTKFLT ); - (void) SIGNAL( SIGSTKFLT, (void *) do_nothing ); + (void) SIGNAL( SIGSTKFLT, do_nothing ); #else pthread_kill( ri->ri_tid, SIGUSR1 ); - (void) SIGNAL( SIGUSR1, (void *) do_nothing ); + (void) SIGNAL( SIGUSR1, do_nothing ); #endif } From c530ba9ceea7bbe0227e6b567392a7fe5ea75d3f Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sun, 25 Oct 1998 01:04:47 +0000 Subject: [PATCH 148/148] merge with main branch --- clients/gopher/go500gw.c | 5 +- clients/gopher/setproctitle.c | 1 + clients/ud/util.c | 2 +- include/avl.h | 4 +- include/disptmpl.h | 12 +- include/lber.h | 1 + include/ldap.h | 12 +- include/ldapconfig.h.edit | 2 + servers/slapd/Makefile.in | 4 +- servers/slapd/acl.c | 2 +- servers/slapd/back-ldbm/Makefile.in | 4 +- servers/slapd/back-ldbm/alias.c | 232 ++++++++++++++++++++++ servers/slapd/back-ldbm/group.c | 31 +-- servers/slapd/back-ldbm/id2entry.c | 2 +- servers/slapd/back-ldbm/proto-back-ldbm.h | 15 +- servers/slapd/back-ldbm/search.c | 52 ++++- servers/slapd/backend.c | 21 ++ servers/slapd/bind.c | 14 +- servers/slapd/config.c | 51 +++++ servers/slapd/delete.c | 4 + servers/slapd/modify.c | 5 + servers/slapd/proto-slap.h | 5 + servers/slapd/result.c | 3 + servers/slapd/search.c | 4 + servers/slapd/slap.h | 4 + servers/slapd/str2filter.c | 2 +- servers/slapd/suffixalias.c | 54 +++++ 27 files changed, 496 insertions(+), 52 deletions(-) create mode 100644 servers/slapd/back-ldbm/alias.c create mode 100644 servers/slapd/suffixalias.c diff --git a/clients/gopher/go500gw.c b/clients/gopher/go500gw.c index 4600d5af89..df804c5024 100644 --- a/clients/gopher/go500gw.c +++ b/clients/gopher/go500gw.c @@ -778,15 +778,16 @@ char *query; e = ldap_first_entry( ld, res ); oc = ldap_get_values( ld, e, "objectClass" ); - if ( isnonleaf( ld, oc, dn ) ) { - dn = ldap_get_dn( ld, e ); + dn = ldap_get_dn( ld, e ); + if ( isnonleaf( ld, oc, dn ) ) { rc = do_menu( ld, fp, dn ); free( dn ); return( rc ); } + free( dn ); ldap_value_free( oc ); } diff --git a/clients/gopher/setproctitle.c b/clients/gopher/setproctitle.c index 1d1ae3b6d2..555b8a9286 100644 --- a/clients/gopher/setproctitle.c +++ b/clients/gopher/setproctitle.c @@ -23,6 +23,7 @@ int Argc; /* original argc */ /* VARARGS */ setproctitle( fmt, a, b, c ) char *fmt; +char *a, *b, *c; { static char *endargv = (char *)0; char *s; diff --git a/clients/ud/util.c b/clients/ud/util.c index 458179799a..ea0bbd1256 100644 --- a/clients/ud/util.c +++ b/clients/ud/util.c @@ -464,7 +464,7 @@ char *cp; return(tmp); } -char * code_to_str(i) +char * code_to_str(int i) { switch(i) { case LDAP_MOD_ADD : return("ADD"); diff --git a/include/avl.h b/include/avl.h index 19ed4408ad..eb8b8836fc 100644 --- a/include/avl.h +++ b/include/avl.h @@ -33,7 +33,7 @@ typedef struct avlnode { #define NULLAVL ((Avlnode *) NULL) /* balance factor values */ -#define LH -1 +#define LH (-1) #define EH 0 #define RH 1 @@ -79,7 +79,7 @@ avl_apply LDAP_P((Avlnode *, IFP, caddr_t, int, int)); #define AVL_INORDER 2 #define AVL_POSTORDER 3 /* what apply returns if it ran out of nodes */ -#define AVL_NOMORE -6 +#define AVL_NOMORE (-6) LDAP_END_DECL diff --git a/include/disptmpl.h b/include/disptmpl.h index dc39dc39f6..8ba58eff6f 100644 --- a/include/disptmpl.h +++ b/include/disptmpl.h @@ -125,13 +125,13 @@ struct ldap_tmplitem { #define NULLTMPLITEM ((struct ldap_tmplitem *)0) #define LDAP_SET_TMPLITEM_APPDATA( ti, datap ) \ - (ti)->ti_appdata = (void *)(datap) + ( (ti)->ti_appdata = (void *)(datap) ) #define LDAP_GET_TMPLITEM_APPDATA( ti, type ) \ - (type)((ti)->ti_appdata) + ( (type)((ti)->ti_appdata) ) #define LDAP_IS_TMPLITEM_OPTION_SET( ti, option ) \ - (((ti)->ti_options & option ) != 0 ) + ( ((ti)->ti_options & (option) ) != 0 ) /* @@ -201,13 +201,13 @@ struct ldap_disptmpl { #define NULLDISPTMPL ((struct ldap_disptmpl *)0) #define LDAP_SET_DISPTMPL_APPDATA( dt, datap ) \ - (dt)->dt_appdata = (void *)(datap) + ( (dt)->dt_appdata = (void *)(datap) ) #define LDAP_GET_DISPTMPL_APPDATA( dt, type ) \ - (type)((dt)->dt_appdata) + ( (type)((dt)->dt_appdata) ) #define LDAP_IS_DISPTMPL_OPTION_SET( dt, option ) \ - (((dt)->dt_options & option ) != 0 ) + ( ((dt)->dt_options & (option) ) != 0 ) #define LDAP_TMPL_ERR_VERSION 1 #define LDAP_TMPL_ERR_MEM 2 diff --git a/include/lber.h b/include/lber.h index 2617c86979..6f7c165e37 100644 --- a/include/lber.h +++ b/include/lber.h @@ -171,6 +171,7 @@ LDAP_F int ber_printf LDAP_P(( BerElement *ber, char *fmt, ... )); /* * in io.c: */ + LDAP_F long ber_read LDAP_P(( BerElement *ber, char *buf, unsigned long len )); LDAP_F long ber_write LDAP_P(( BerElement *ber, char *buf, unsigned long len, int nosos )); diff --git a/include/ldap.h b/include/ldap.h index 605356408d..0f90b1d508 100644 --- a/include/ldap.h +++ b/include/ldap.h @@ -57,16 +57,16 @@ extern int ldap_syslog_level; #ifdef LDAP_SYSLOG #define Debug( level, fmt, arg1, arg2, arg3 ) \ { \ - if ( ldap_debug & level ) \ - fprintf( stderr, fmt, arg1, arg2, arg3 ); \ + if ( ldap_debug & (level) ) \ + fprintf( stderr, (fmt), (arg1), (arg2), (arg3) ); \ if ( ldap_syslog & level ) \ - syslog( ldap_syslog_level, fmt, arg1, arg2, arg3 ); \ + syslog( ldap_syslog_level, (fmt), (arg1), (arg2), (arg3) ); \ } #else /* LDAP_SYSLOG */ #ifndef WINSOCK #define Debug( level, fmt, arg1, arg2, arg3 ) \ - if ( ldap_debug & level ) \ - fprintf( stderr, fmt, arg1, arg2, arg3 ); + if ( ldap_debug & (level) ) \ + fprintf( stderr, (fmt), (arg1), (arg2), (arg3) ); #else /* !WINSOCK */ extern void Debug( int level, char* fmt, ... ); #endif /* !WINSOCK */ @@ -479,7 +479,7 @@ typedef struct friendly { /* * handy macro to check whether LDAP struct is set up for CLDAP or not */ -#define LDAP_IS_CLDAP( ld ) ( ld->ld_sb.sb_naddr > 0 ) +#define LDAP_IS_CLDAP( ld ) ( (ld)->ld_sb.sb_naddr > 0 ) /* diff --git a/include/ldapconfig.h.edit b/include/ldapconfig.h.edit index ac0a858a51..8a053cad5b 100644 --- a/include/ldapconfig.h.edit +++ b/include/ldapconfig.h.edit @@ -284,6 +284,8 @@ Please try again later.\r\n" */ /* location of the default slapd config file */ #define SLAPD_DEFAULT_CONFIGFILE "%SYSCONFDIR%/slapd.conf" + /* default max deref depth for aliases */ +#define SLAPD_DEFAULT_MAXDEREFDEPTH 15 /* default sizelimit on number of entries from a search */ #define SLAPD_DEFAULT_SIZELIMIT 500 /* default timelimit to spend on a search */ diff --git a/servers/slapd/Makefile.in b/servers/slapd/Makefile.in index eb685ff960..55d3cedf34 100644 --- a/servers/slapd/Makefile.in +++ b/servers/slapd/Makefile.in @@ -9,14 +9,14 @@ SRCS = main.c daemon.c connection.c search.c filter.c add.c charray.c \ value.c ava.c bind.c unbind.c abandon.c filterentry.c \ phonetic.c acl.c str2filter.c aclparse.c init.c \ detach.c repl.c lock.c \ - schema.c schemaparse.c monitor.c configinfo.c + suffixAlias.c schema.c schemaparse.c monitor.c configinfo.c OBJS = main.o daemon.o connection.o search.o filter.o add.o charray.o \ attr.o entry.o config.o backend.o result.o operation.o \ dn.o compare.o modify.o delete.o modrdn.o ch_malloc.o \ value.o ava.o bind.o unbind.o abandon.o filterentry.o \ phonetic.o acl.o str2filter.o aclparse.o init.o \ detach.o repl.o lock.o \ - schema.o schemaparse.o monitor.o configinfo.o + suffixalias.o schema.o schemaparse.o monitor.o configinfo.o LDAP_INCDIR= ../../include LDAP_LIBDIR= ../../libraries diff --git a/servers/slapd/acl.c b/servers/slapd/acl.c index cbd734612d..15d02dfd52 100644 --- a/servers/slapd/acl.c +++ b/servers/slapd/acl.c @@ -366,7 +366,7 @@ acl_access_allowed( /* b->a_group is an unexpanded entry name, expanded it should be an * entry with objectclass group* and we test to see if odn is one of - * the values in the attribute uniquegroup + * the values in the attribute group */ Debug( LDAP_DEBUG_ARGS, "<= check a_group: %s\n", b->a_group, 0, 0); diff --git a/servers/slapd/back-ldbm/Makefile.in b/servers/slapd/back-ldbm/Makefile.in index 0e2d15b61e..9ad580055f 100644 --- a/servers/slapd/back-ldbm/Makefile.in +++ b/servers/slapd/back-ldbm/Makefile.in @@ -1,11 +1,11 @@ SRCS = idl.c add.c search.c cache.c dbcache.c dn2id.c id2entry.c \ index.c id2children.c nextid.c abandon.c compare.c group.c \ modify.c modrdn.c delete.c init.c config.c bind.c attr.c \ - filterindex.c unbind.c kerberos.c close.c + filterindex.c unbind.c kerberos.c close.c alias.c OBJS = idl.o add.o search.o cache.o dbcache.o dn2id.o id2entry.o \ index.o id2children.o nextid.o abandon.o compare.o group.o \ modify.o modrdn.o delete.o init.o config.o bind.o attr.o \ - filterindex.o unbind.o kerberos.o close.o + filterindex.o unbind.o kerberos.o close.o alias.o LDAP_INCDIR= ../../../include LDAP_LIBDIR= ../../../libraries diff --git a/servers/slapd/back-ldbm/alias.c b/servers/slapd/back-ldbm/alias.c new file mode 100644 index 0000000000..b9c0d9481d --- /dev/null +++ b/servers/slapd/back-ldbm/alias.c @@ -0,0 +1,232 @@ +/* + * Copyright (c) 1998 Will Ballantyne, ITSD, Government of BC + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that this notice is preserved and that due credit is given + * to ITSD, Government of BC. The name of ITSD + * may not be used to endorse or promote products derived from this + * software without specific prior written permission. This software + * is provided ``as is'' without express or implied warranty. + */ + +#include +#include +#include "slap.h" +#include "back-ldbm.h" +#include "proto-back-ldbm.h" + +/* + * given an alias object, dereference it to its end point. + * entry returned has reader lock + */ +Entry *derefAlias_r ( Backend *be, + Connection *conn, + Operation *op, + Entry *e) +{ + Attribute *a; + int depth; + char **pastAliases; + char *matched; + + Debug( LDAP_DEBUG_TRACE, "<= checking for alias for dn %s\n", e->e_dn, 0, 0 ); + + /* + * try to deref fully, up to a maximum depth. If the max depth exceeded + * then send an error + */ + for ( depth = 0; + ( ( a = attr_find( e->e_attrs, "aliasedobjectname" ) ) != NULL) && + ( depth < be->be_maxDerefDepth ); + ++depth) + { + + /* + * make sure there is a defined aliasedobjectname. + * can only have one value so just use first value (0) in the attr list. + */ + if (a->a_vals[0] && a->a_vals[0]->bv_val) { + char *newDN, *oldDN; + + Debug( LDAP_DEBUG_TRACE, "<= %s is an alias for %s\n", + e->e_dn, a->a_vals[0]->bv_val, 0 ); + newDN = strdup (a->a_vals[0]->bv_val); + oldDN = strdup (e->e_dn); + + /* + * ok, so what happens if there is an alias in the DN of a dereferenced + * alias object? + */ + if ( (e = dn2entry_r( be, newDN, &matched )) == NULL ) { + + /* could not deref return error */ + Debug( LDAP_DEBUG_TRACE, + "<= %s is a dangling alias to %s\n", + oldDN, newDN, 0 ); + send_ldap_result( conn, op, LDAP_ALIAS_PROBLEM, "", + "Dangling Alias" ); + + if(matched != NULL) free(matched); + } + free (newDN); + free (oldDN); + } + else { + /* + * there was an aliasedobjectname defined but no data. + * this can't happen, right? + */ + Debug( LDAP_DEBUG_TRACE, + "<= %s has no data in aliasedobjectname attribute\n", + e->e_dn, 0, 0 ); + send_ldap_result( conn, op, LDAP_ALIAS_PROBLEM, "", + "Alias missing aliasedobjectname" ); + } + } + + /* + * warn if we pulled out due to exceeding the maximum deref depth + */ + if ( depth >= be->be_maxDerefDepth ) { + Debug( LDAP_DEBUG_TRACE, + "<= %s exceeded maximum deref depth %d\n", + e->e_dn, be->be_maxDerefDepth, 0 ); + send_ldap_result( conn, op, LDAP_ALIAS_PROBLEM, "", + "Maximum alias dereference depth exceeded" ); + } + + return e; +} + +/* + * given a DN fully deref it and return the real DN or original DN if it fails + */ +char *derefDN ( Backend *be, + Connection *conn, + Operation *op, + char *dn +) +{ + struct ldbminfo *li = (struct ldbminfo *) be->be_private; + char *matched; + char *newDN; + int depth; + Entry *eMatched; + Entry *eDeref; + Entry *eNew; + + + Debug( LDAP_DEBUG_TRACE, + "<= dereferencing dn %s\n", + dn, 0, 0 ); + + newDN = strdup ( dn ); + + /* while we don't have a matched dn, deref the DN */ + for ( depth = 0; + ( (eMatched = dn2entry_r( be, newDN, &matched )) == NULL) && + (depth < be->be_maxDerefDepth); + ++depth ) { + + /* free reader lock */ + cache_return_entry_r(&li->li_cache, eMatched); + + if (*matched) { + char *submatch; + + /* + * make sure there actually is an entry for the matched part + */ + if ( (eMatched = dn2entry_r( be, matched, &submatch )) != NULL) { + char *remainder; /* part before the aliased part */ + int rlen = strlen(newDN) - strlen(matched); + + Debug( LDAP_DEBUG_TRACE, "<= matched %s\n", matched, 0, 0 ); + + remainder = ch_malloc (rlen + 1); + strncpy ( remainder, newDN, rlen ); + remainder[rlen] = '\0'; + + Debug( LDAP_DEBUG_TRACE, "<= remainder %s\n", remainder, 0, 0 ); + + if ((eNew = derefAlias_r( be, conn, op, eMatched )) == NULL) { + free (matched); + free (newDN); + free (remainder); + break; /* no associated entry, dont deref */ + } + else { + + Debug( LDAP_DEBUG_TRACE, "<= l&g we have %s vs %s \n", matched, eNew->e_dn, 0 ); + + if (!strcasecmp (matched, eNew->e_dn)) { + /* newDN same as old so not an alias, no need to go further */ + free (newDN); + free (matched); + free (remainder); + break; + } + + /* + * we have dereferenced the aliased part so put + * the new dn together + */ + free (newDN); + free (matched); + + newDN = ch_malloc (strlen(eMatched->e_dn) + rlen + 1); + strcpy (newDN, remainder); + strcat (newDN, eMatched->e_dn); + Debug( LDAP_DEBUG_TRACE, "<= expanded to %s\n", newDN, 0, 0 ); + + free (remainder); + + /* free reader lock */ + cache_return_entry_r(&li->li_cache, eNew); + } + /* free reader lock */ + cache_return_entry_r(&li->li_cache, eMatched); + } + else { + if(submatch != NULL) free(submatch); + break; /* there was no entry for the matched part */ + } + } + else { + break; /* there was no matched part */ + } + } + + /* + * the final part of the DN might be an alias + * so try to dereference it. + */ + if ( (eNew = dn2entry_r( be, newDN, &matched )) != NULL) { + if ((eDeref = derefAlias_r( be, conn, op, eNew )) != NULL) { + free (newDN); + newDN = strdup (eDeref->e_dn); + /* free reader lock */ + cache_return_entry_r(&li->li_cache, eDeref); + } + /* free reader lock */ + cache_return_entry_r(&li->li_cache, eNew); + } + + /* + * warn if we exceeded the max depth as the resulting DN may not be dereferenced + */ + if (depth >= be->be_maxDerefDepth) { + Debug( LDAP_DEBUG_TRACE, + "<= max deref depth exceeded in derefDN for %s, result %s\n", + dn, newDN, 0 ); + send_ldap_result( conn, op, LDAP_ALIAS_PROBLEM, "", + "Maximum alias dereference depth exceeded for base" ); + } + + Debug( LDAP_DEBUG_TRACE, "<= returning deref DN of %s\n", newDN, 0, 0 ); + + free(matched); + + return newDN; +} diff --git a/servers/slapd/back-ldbm/group.c b/servers/slapd/back-ldbm/group.c index 16106d8904..536a48dd6b 100644 --- a/servers/slapd/back-ldbm/group.c +++ b/servers/slapd/back-ldbm/group.c @@ -17,7 +17,7 @@ extern Attribute *attr_find(); #ifdef SLAPD_ACLGROUPS /* return 0 IFF edn is a value in uniqueMember attribute * of entry with bdn AND that entry has an objectClass - * value of groupOfUniqueNames + * value of groupOfNames */ int ldbm_back_group( @@ -30,7 +30,7 @@ ldbm_back_group( Entry *e; char *matched; Attribute *objectClass; - Attribute *uniqueMember; + Attribute *member; int rc; Debug( LDAP_DEBUG_TRACE, "=> ldbm_back_group: bdn: %s\n", bdn, 0, 0 ); @@ -47,39 +47,40 @@ ldbm_back_group( /* check for deleted */ - /* find it's objectClass and uniqueMember attribute values + /* find it's objectClass and member attribute values * make sure this is a group entry - * finally test if we can find edn in the uniqueMember attribute value list * + * finally test if we can find edn in the member attribute value list * */ rc = 1; if ((objectClass = attr_find(e->e_attrs, "objectclass")) == NULL) { Debug( LDAP_DEBUG_TRACE, "<= ldbm_back_group: failed to find objectClass\n", 0, 0, 0 ); } - else if ((uniqueMember = attr_find(e->e_attrs, "uniquemember")) == NULL) { - Debug( LDAP_DEBUG_TRACE, "<= ldbm_back_group: failed to find uniqueMember\n", 0, 0, 0 ); + else if ((member = attr_find(e->e_attrs, "member")) == NULL) { + Debug( LDAP_DEBUG_TRACE, "<= ldbm_back_group: failed to find member\n", 0, 0, 0 ); } else { struct berval bvObjectClass; - struct berval bvUniqueMembers; + struct berval bvMembers; - Debug( LDAP_DEBUG_ARGS, "<= ldbm_back_group: found objectClass and uniqueMembers\n", 0, 0, 0 ); + Debug( LDAP_DEBUG_ARGS, "<= ldbm_back_group: found objectClass and members\n", 0, 0, 0 ); - bvObjectClass.bv_val = "groupofuniquenames"; + bvObjectClass.bv_val = "groupofnames"; bvObjectClass.bv_len = strlen( bvObjectClass.bv_val ); - bvUniqueMembers.bv_val = edn; - bvUniqueMembers.bv_len = strlen( edn ); + bvMembers.bv_val = edn; + bvMembers.bv_len = strlen( edn ); if (value_find(objectClass->a_vals, &bvObjectClass, SYNTAX_CIS, 1) != 0) { - Debug( LDAP_DEBUG_TRACE, "<= ldbm_back_group: failed to find objectClass in groupOfUniqueNames\n", + Debug( LDAP_DEBUG_TRACE, + "<= ldbm_back_group: failed to find objectClass in groupOfNames\n", 0, 0, 0 ); } - else if (value_find(uniqueMember->a_vals, &bvUniqueMembers, SYNTAX_CIS, 1) != 0) { - Debug( LDAP_DEBUG_ACL, "<= ldbm_back_group: %s not in %s: groupOfUniqueNames\n", + else if (value_find(Member->a_vals, &bvMembers, SYNTAX_CIS, 1) != 0) { + Debug( LDAP_DEBUG_ACL, "<= ldbm_back_group: %s not in %s: groupOfNames\n", edn, bdn, 0 ); } else { - Debug( LDAP_DEBUG_ACL, "<= ldbm_back_group: %s is in %s: groupOfUniqueNames\n", + Debug( LDAP_DEBUG_ACL, "<= ldbm_back_group: %s is in %s: groupOfNames\n", edn, bdn, 0 ); rc = 0; } diff --git a/servers/slapd/back-ldbm/id2entry.c b/servers/slapd/back-ldbm/id2entry.c index 5e7582daf7..b2f0aebf8d 100644 --- a/servers/slapd/back-ldbm/id2entry.c +++ b/servers/slapd/back-ldbm/id2entry.c @@ -48,7 +48,7 @@ id2entry_add( Backend *be, Entry *e ) /* store it */ flags = LDBM_REPLACE; - if ( li->li_flush_wrt ) flags != LDBM_SYNC; + if ( li->li_flush_wrt ) flags |= LDBM_SYNC; rc = ldbm_cache_store( db, key, data, flags ); pthread_mutex_unlock( &entry2str_mutex ); diff --git a/servers/slapd/back-ldbm/proto-back-ldbm.h b/servers/slapd/back-ldbm/proto-back-ldbm.h index 371e8bf9c2..96eabe5850 100644 --- a/servers/slapd/back-ldbm/proto-back-ldbm.h +++ b/servers/slapd/back-ldbm/proto-back-ldbm.h @@ -5,6 +5,20 @@ LDAP_BEGIN_DECL +/* + * alias.c + */ +Entry *derefAlias_r LDAP_P(( + Backend *be, + Connection *conn, + Operation *op, + Entry *e )); +char *derefDN LDAP_P(( + Backend *be, + Connection *conn, + Operation *op, + char *dn )); + /* * attr.c */ @@ -45,7 +59,6 @@ int ldbm_cache_delete LDAP_P(( struct dbcache *db, Datum key )); int dn2id_add LDAP_P(( Backend *be, char *dn, ID id )); ID dn2id LDAP_P(( Backend *be, char *dn )); int dn2id_delete LDAP_P(( Backend *be, char *dn )); -/*Entry * dn2entry LDAP_P(( Backend *be, char *dn, char **matched ));*/ Entry * dn2entry_r LDAP_P(( Backend *be, char *dn, char **matched )); Entry * dn2entry_w LDAP_P(( Backend *be, char *dn, char **matched )); diff --git a/servers/slapd/back-ldbm/search.c b/servers/slapd/back-ldbm/search.c index 705d6b47d6..5f0cf3a6fb 100644 --- a/servers/slapd/back-ldbm/search.c +++ b/servers/slapd/back-ldbm/search.c @@ -62,6 +62,7 @@ ldbm_back_search( int rmaxsize, nrefs; char *rbuf, *rcur, *r; int nentries = 0; + char *realBase; Debug(LDAP_DEBUG_ARGS, "=> ldbm_back_search\n", 0, 0, 0); @@ -79,19 +80,37 @@ ldbm_back_search( be->be_sizelimit : slimit; } + /* + * check and apply aliasing where the dereferencing applies to + * the subordinates of the base + */ + realBase = strdup (base); + switch ( deref ) { + case LDAP_DEREF_FINDING: + case LDAP_DEREF_ALWAYS: + free (realBase); + realBase = derefDN ( be, conn, op, base ); + break; + } + + (void) dn_normalize (realBase); + + Debug( LDAP_DEBUG_TRACE, "using base %s\n", + realBase, 0, 0 ); + switch ( scope ) { case LDAP_SCOPE_BASE: - candidates = base_candidates( be, conn, op, base, filter, + candidates = base_candidates( be, conn, op, realBase, filter, attrs, attrsonly, &matched, &err ); break; case LDAP_SCOPE_ONELEVEL: - candidates = onelevel_candidates( be, conn, op, base, filter, + candidates = onelevel_candidates( be, conn, op, realBase, filter, attrs, attrsonly, &matched, &err ); break; case LDAP_SCOPE_SUBTREE: - candidates = subtree_candidates( be, conn, op, base, filter, + candidates = subtree_candidates( be, conn, op, realBase, filter, attrs, attrsonly, &matched, NULL, &err, 1 ); break; @@ -160,15 +179,15 @@ ldbm_back_search( int i, len; if ( ref->a_vals == NULL ) { - Debug( LDAP_DEBUG_ANY, "null ref in (%s)\n", 0, - 0, 0 ); + Debug( LDAP_DEBUG_ANY, "null ref in (%s)\n", + e->e_dn, 0, 0 ); } else { for ( i = 0; ref->a_vals[i] != NULL; i++ ) { /* referral + newline + null */ MAKE_SPACE( ref->a_vals[i]->bv_len + 2 ); *rcur++ = '\n'; strncpy( rcur, ref->a_vals[i]->bv_val, - ref->a_vals[i]->bv_len ); + ref->a_vals[i]->bv_len ); rcur = rcur + ref->a_vals[i]->bv_len; *rcur = '\0'; nrefs++; @@ -187,15 +206,15 @@ ldbm_back_search( if ( scope == LDAP_SCOPE_ONELEVEL ) { if ( (dn = dn_parent( be, e->e_dn )) != NULL ) { (void) dn_normalize( dn ); - scopeok = (dn == base) ? 1 : (! strcasecmp( dn, base )); + scopeok = (dn == realBase) ? 1 : (! strcasecmp( dn, realBase )); } else { - scopeok = (base == NULL || *base == '\0'); + scopeok = (realBase == NULL || *realBase == '\0'); } free( dn ); } else if ( scope == LDAP_SCOPE_SUBTREE ) { dn = strdup( e->e_dn ); (void) dn_normalize( dn ); - scopeok = dn_issuffix( dn, base ); + scopeok = dn_issuffix( dn, realBase ); free( dn ); } @@ -211,6 +230,21 @@ ldbm_back_search( return( 0 ); } + /* + * check and apply aliasing where the dereferencing applies to + * the subordinates of the base + */ + switch ( deref ) { + case LDAP_DEREF_SEARCHING: + case LDAP_DEREF_ALWAYS: + { + Entry *newe = derefAlias_r( be, conn, op, e ); + cache_return_entry_r( &li->li_cache, e ); + e = newe; + } + break; + } + switch ( send_search_entry( be, conn, op, e, attrs, attrsonly ) ) { case 0: /* entry sent ok */ diff --git a/servers/slapd/backend.c b/servers/slapd/backend.c index d40093b087..eab281a624 100644 --- a/servers/slapd/backend.c +++ b/servers/slapd/backend.c @@ -190,6 +190,27 @@ select_backend( char * dn ) } } + /* if no proper suffix could be found then check for aliases */ + for ( i = 0; i < nbackends; i++ ) { + for ( j = 0; + backends[i].be_suffixAlias != NULL && + backends[i].be_suffixAlias[j] != NULL; + j += 2 ) + { + len = strlen( backends[i].be_suffixAlias[j] ); + + if ( len > dnlen ) { + continue; + } + + if ( strcasecmp( backends[i].be_suffixAlias[j], + dn + (dnlen - len) ) == 0 ) { + return( &backends[i] ); + } + } + } + + return( NULL ); } diff --git a/servers/slapd/bind.c b/servers/slapd/bind.c index 12a913bd15..5c1e264636 100644 --- a/servers/slapd/bind.c +++ b/servers/slapd/bind.c @@ -22,6 +22,7 @@ #include "slap.h" extern Backend *select_backend(); +extern char *suffixAlias(); extern char *default_referral; @@ -146,14 +147,21 @@ do_bind( free( cred.bv_val ); } if ( cred.bv_len == 0 ) { - send_ldap_result( conn, op, LDAP_SUCCESS, NULL, NULL ); + send_ldap_result( conn, op, LDAP_SUCCESS, + NULL, NULL ); + } else if ( default_referral && *default_referral ) { + send_ldap_result( conn, op, LDAP_PARTIAL_RESULTS, + NULL, default_referral ); } else { - send_ldap_result( conn, op, LDAP_PARTIAL_RESULTS, NULL, - default_referral ); + send_ldap_result( conn, op, LDAP_INVALID_CREDENTIALS, + NULL, default_referral ); } return; } + /* alias suffix */ + dn = suffixAlias ( dn, op, be ); + if ( be->be_bind != NULL ) { if ( (*be->be_bind)( be, conn, op, dn, method, &cred ) == 0 ) { pthread_mutex_lock( &conn->c_dnmutex ); diff --git a/servers/slapd/config.c b/servers/slapd/config.c index 66e8567962..f7aa3b688c 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -84,6 +84,9 @@ read_config( char *fname, Backend **bep, FILE *pfp ) *bep = new_backend( cargv[1] ); be = *bep; + /* assign a default depth limit for alias deref */ + be->be_maxDerefDepth = SLAPD_DEFAULT_MAXDEREFDEPTH; + /* set size limit */ } else if ( strcasecmp( cargv[0], "sizelimit" ) == 0 ) { if ( cargc < 2 ) { @@ -134,6 +137,54 @@ read_config( char *fname, Backend **bep, FILE *pfp ) charray_add( &be->be_suffix, dn ); } + /* set database suffixAlias */ + } else if ( strcasecmp( cargv[0], "suffixAlias" ) == 0 ) { + if ( cargc < 2 ) { + Debug( LDAP_DEBUG_ANY, + "%s: line %d: missing alias and aliased_dn in \"suffixAlias \" line\n", + fname, lineno, 0 ); + exit( 1 ); + } else if ( cargc < 3 ) { + Debug( LDAP_DEBUG_ANY, + "%s: line %d: missing aliased_dn in \"suffixAlias \" line\n", + fname, lineno, 0 ); + exit( 1 ); + } else if ( cargc > 3 ) { + Debug( LDAP_DEBUG_ANY, + "%s: line %d: extra cruft in suffixAlias line (ignored)\n", + fname, lineno, 0 ); + } + if ( be == NULL ) { + Debug( LDAP_DEBUG_ANY, +"%s: line %d: suffixAlias line must appear inside a database definition (ignored)\n", + fname, lineno, 0 ); + } else { + dn = strdup( cargv[1] ); + (void) dn_normalize( dn ); + charray_add( &be->be_suffixAlias, dn ); + + dn = strdup( cargv[2] ); + (void) dn_normalize( dn ); + charray_add( &be->be_suffixAlias, dn ); + } + + /* set max deref depth */ + } else if ( strcasecmp( cargv[0], "maxDerefDepth" ) == 0 ) { + if ( cargc < 2 ) { + Debug( LDAP_DEBUG_ANY, + "%s: line %d: missing depth in \"maxDerefDepth \" line\n", + fname, lineno, 0 ); + exit( 1 ); + } + if ( be == NULL ) { + Debug( LDAP_DEBUG_ANY, +"%s: line %d: depth line must appear inside a database definition (ignored)\n", + fname, lineno, 0 ); + } else { + be->be_maxDerefDepth = atoi (cargv[1]); + } + + /* set magic "root" dn for this database */ } else if ( strcasecmp( cargv[0], "rootdn" ) == 0 ) { if ( cargc < 2 ) { diff --git a/servers/slapd/delete.c b/servers/slapd/delete.c index eecf64090f..477e6f35f1 100644 --- a/servers/slapd/delete.c +++ b/servers/slapd/delete.c @@ -20,6 +20,7 @@ #include "slap.h" extern Backend *select_backend(); +extern char *suffixAlias(); extern char *default_referral; @@ -65,6 +66,9 @@ do_delete( return; } + /* alias suffix if approp */ + dn = suffixAlias ( dn, op, be ); + /* * do the delete if 1 && (2 || 3) * 1) there is a delete function implemented in this backend; diff --git a/servers/slapd/modify.c b/servers/slapd/modify.c index 1406b985b5..235acc536b 100644 --- a/servers/slapd/modify.c +++ b/servers/slapd/modify.c @@ -29,6 +29,8 @@ extern int global_lastmod; static void modlist_free(); static void add_lastmods(); +extern char *suffixAlias(); + void do_modify( @@ -149,6 +151,9 @@ do_modify( return; } + /* alias suffix if approp */ + dn = suffixAlias ( dn, op, be ); + /* * do the modify if 1 && (2 || 3) * 1) there is a modify function implemented in this backend; diff --git a/servers/slapd/proto-slap.h b/servers/slapd/proto-slap.h index 3b08579d76..a1f32ac54e 100644 --- a/servers/slapd/proto-slap.h +++ b/servers/slapd/proto-slap.h @@ -212,4 +212,9 @@ int value_ncmp LDAP_P(( struct berval *v1, struct berval *v2, int syntax, int le int value_find LDAP_P(( struct berval **vals, struct berval *v, int syntax, int normalize )); +/* + * suffixAlias.c + */ +char *suffixAlias LDAP_P(( char *dn, Operation *op, Backend *be )); + #endif /* _proto_slap */ diff --git a/servers/slapd/result.c b/servers/slapd/result.c index 07bf54540f..06df02159d 100644 --- a/servers/slapd/result.c +++ b/servers/slapd/result.c @@ -37,6 +37,9 @@ send_ldap_result2( int rc, sd; unsigned long tag, bytes; + if ( err == LDAP_PARTIAL_RESULTS && (text == NULL || *text == '\0') ) + err = LDAP_NO_SUCH_OBJECT; + Debug( LDAP_DEBUG_TRACE, "send_ldap_result %d:%s:%s\n", err, matched ? matched : "", text ? text : "" ); diff --git a/servers/slapd/search.c b/servers/slapd/search.c index a1c34b76da..004678e82d 100644 --- a/servers/slapd/search.c +++ b/servers/slapd/search.c @@ -22,6 +22,7 @@ extern int get_filter(); extern Backend *select_backend(); +extern char *suffixAlias(); extern char *default_referral; @@ -164,6 +165,9 @@ do_search( conn, op ) return; } + /* translate the base if it matches an aliased base part */ + base = suffixAlias ( base, op, be ); + /* actually do the search and send the result(s) */ if ( be->be_search != NULL ) { (*be->be_search)( be, conn, op, base, scope, deref, sizelimit, diff --git a/servers/slapd/slap.h b/servers/slapd/slap.h index fad750b28d..150d384e7c 100644 --- a/servers/slapd/slap.h +++ b/servers/slapd/slap.h @@ -183,9 +183,11 @@ struct objclass { typedef struct backend { char **be_suffix; /* the DN suffixes of data in this backend */ + char **be_suffixAlias; /* the DN suffix aliases of data in this backend */ char *be_rootdn; /* the magic "root" dn for this db */ char *be_rootpw; /* the magic "root" password for this db */ int be_readonly; /* 1 => db is in "read only" mode */ + int be_maxDerefDepth; /* limit for depth of an alias deref */ int be_sizelimit; /* size limit for this backend */ int be_timelimit; /* time limit for this backend */ struct acl *be_acl; /* access control list for this backend */ @@ -226,6 +228,8 @@ typedef struct op { unsigned long o_tag; /* tag of the request */ time_t o_time; /* time op was initiated */ char *o_dn; /* dn bound when op was initiated */ + char *o_suffix; /* suffix if aliased */ + char *o_suffixAliased; /* pending suffix translation */ int o_authtype; /* auth method used to bind dn */ /* values taken from ldap.h */ /* LDAP_AUTH_* */ diff --git a/servers/slapd/str2filter.c b/servers/slapd/str2filter.c index 5aea1d55b3..60ced1aee2 100644 --- a/servers/slapd/str2filter.c +++ b/servers/slapd/str2filter.c @@ -17,7 +17,7 @@ static int str2subvals(); Filter * str2filter( char *str ) { - Filter *f; + Filter *f = NULL; char *end; Debug( LDAP_DEBUG_FILTER, "str2filter \"%s\"\n", str, 0, 0 ); diff --git a/servers/slapd/suffixalias.c b/servers/slapd/suffixalias.c new file mode 100644 index 0000000000..f7c9534afe --- /dev/null +++ b/servers/slapd/suffixalias.c @@ -0,0 +1,54 @@ +/* + * Copyright (c) 1998 Will Ballantyne, ITSD, Government of BC + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that this notice is preserved and that due credit is given + * to ITSD, Government of BC. The name of ITSD + * may not be used to endorse or promote products derived from this + * software without specific prior written permission. This software + * is provided ``as is'' without express or implied warranty. + */ + +#include +#include +#include "slap.h" + +/* + * given a dn (or root part), return an aliased dn if any of the + * alias suffixes match + */ +char *suffixAlias ( dn, op, be ) + char *dn; + Operation *op; + Backend *be; +{ + int i, dnLength; + + dnLength = strlen ( dn ); + op->o_suffix = NULL; + op->o_suffixAliased = NULL; + for ( i = 0; + be->be_suffixAlias != NULL && be->be_suffixAlias[i] != NULL; + i += 2) { + int aliasLength = strlen (be->be_suffixAlias[i]); + if (aliasLength > dnLength) { + continue; + } + + if (!strcasecmp(be->be_suffixAlias[i], + dn + (dnLength - aliasLength))) { + char *oldDN = dn; + op->o_suffixAliased = strdup ( be->be_suffixAlias[i] ); + dn = ch_malloc ( (dnLength - aliasLength) + + strlen (be->be_suffixAlias[ i+1 ]) + 1); + strncpy (dn, oldDN, dnLength - aliasLength); + strcpy (dn + (dnLength - aliasLength), be->be_suffixAlias[ i+1 ]); + op->o_suffix = strdup (dn); + Debug( LDAP_DEBUG_ARGS, "ALIAS: converted %s to %s", oldDN, dn, 0); + free (oldDN); + break; + } + } + return dn; +}