From: Kurt Zeilenga Date: Mon, 31 Aug 1998 20:49:27 +0000 (+0000) Subject: Add support for OpenBSD. Provided by djg@gregor.com. X-Git-Tag: PHP3_TOOL_0_0~91 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b015c8db24f559345942fef9c18ea68461dd977e;p=openldap Add support for OpenBSD. Provided by djg@gregor.com. --- diff --git a/Makefile b/Makefile index 888b30a507..ccc67028bb 100644 --- a/Makefile +++ b/Makefile @@ -295,6 +295,9 @@ makeconfig: .makefiles buildtools NetBSD) \ PLATFORM="netbsd" \ ;; \ + OpenBSD) \ + PLATFORM="openbsd" \ + ;; \ FreeBSD) \ MAJRELEASE=`echo $$OSRELEASE | sed 's/\..*//'` ; \ if [ $$MAJRELEASE -lt 3 ]; then \ diff --git a/build/platforms/openbsd-cc/Make-platform b/build/platforms/openbsd-cc/Make-platform new file mode 100644 index 0000000000..6de18cad99 --- /dev/null +++ b/build/platforms/openbsd-cc/Make-platform @@ -0,0 +1,38 @@ +# LDAP OpenBSD cc Make-platform file +# on OpenBSD, cc is gcc +# + + +# +# add any platform-specific overrides below here +# + +# +# ------------------------------------------------------------------------- +# you will probably not need to edit anything below this point +# ------------------------------------------------------------------------- +CC = gcc + +PLATFORMCFLAGS= -Dopenbsd + +.include + +.if (${KERBEROS} == "yes") +KERBEROS=-DKERBEROS +KRBINCLUDEFLAG = -I/usr/include/kerberosIV +KRBLIBS = -lkrb -ldes +.endif + +LDBMBACKEND=-DLDBM_USE_DBBTREE + +THREADS=-DNO_THREADS + +LDAP_SENDMAIL=/usr/sbin/sendmail +LDAP_EDITOR=/usr/bin/vi +LDAP_FINGER=/usr/bin/finger + +LDAP_CRYPT=-DLDAP_CRYPT -DLDAP_SHA + +LDAP_TCP_WRAPPERS=-DTCP_WRAPPERS +LDAP_TCP_WRAPPERS_LIB=-lwrap + diff --git a/build/platforms/openbsd-gcc/Make-platform b/build/platforms/openbsd-gcc/Make-platform new file mode 100644 index 0000000000..d23e5fb472 --- /dev/null +++ b/build/platforms/openbsd-gcc/Make-platform @@ -0,0 +1,39 @@ +# +# LDAP OpenBSD 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= -Dopenbsd + +.include + +.if (${KERBEROS} == "yes") +KERBEROS=-DKERBEROS +KRBINCLUDEFLAG = -I/usr/include/kerberosIV +KRBLIBS = -lkrb -ldes +.endif + +# Use DB BTREE +LDBMBACKEND=-DLDBM_USE_DBBTREE + +THREADS=-DNO_THREADS + +LDAP_SENDMAIL=/usr/sbin/sendmail +LDAP_EDITOR=/usr/bin/vi +LDAP_FINGER=/usr/bin/finger + +LDAP_CRYPT=-DLDAP_CRYPT -DLDAP_SHA + +LDAP_TCP_WRAPPERS=-DTCP_WRAPPERS +LDAP_TCP_WRAPPERS_LIB=-lwrap + diff --git a/clients/ud/string_to_key.c b/clients/ud/string_to_key.c index 1d6649c064..d140d36b39 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. @@ -26,7 +26,7 @@ #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 $"; +"$Id: string_to_key.c,v 1.1.3.1 1998/08/08 22:43:17 kurt Exp $"; #endif #include diff --git a/include/portable.h b/include/portable.h index 1f082a4f9b..8456f25a61 100644 --- a/include/portable.h +++ b/include/portable.h @@ -110,7 +110,7 @@ * Are sys_errlist and sys_nerr declared in stdio.h? */ #ifndef SYSERRLIST_IN_STDIO -#if defined( freebsd ) || defined( netbsd ) || \ +#if defined( freebsd ) || defined( netbsd ) || defined( openbsd ) || \ defined( __GLIBC__ ) && ( __GLIBC__ > 1 ) #define SYSERRLIST_IN_STDIO #endif diff --git a/libraries/liblthread/rdwr.c b/libraries/liblthread/rdwr.c index 7fa59d1326..40a022ea9f 100644 --- a/libraries/liblthread/rdwr.c +++ b/libraries/liblthread/rdwr.c @@ -17,6 +17,7 @@ * * Library of functions implementing reader/writer locks */ +#include #include #include