]> git.sur5r.net Git - openldap/commitdiff
Update copyright of build environment, includes, and liblber/libldap.
authorKurt Zeilenga <kurt@openldap.org>
Thu, 31 Dec 1998 20:32:03 +0000 (20:32 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 31 Dec 1998 20:32:03 +0000 (20:32 +0000)
104 files changed:
COPYRIGHT
Makefile.in
acconfig.h
acinclude.m4
aclocal.m4
build/dir.mk
build/info.mk [new file with mode: 0644]
build/lib-shared.mk
build/lib-static.mk
build/lib.mk
build/man.mk
build/openldap.m4
build/rules.mk
build/srv.mk
build/top.mk
configure.in
include/ac/alloca.h [new file with mode: 0644]
include/ac/bytes.h
include/ac/ctype.h [new file with mode: 0644]
include/ac/dirent.h [new file with mode: 0644]
include/ac/errno.h [new file with mode: 0644]
include/ac/krb.h [new file with mode: 0644]
include/ac/regex.h [new file with mode: 0644]
include/ac/setproctitle.h
include/ac/signal.h
include/ac/socket.h
include/ac/stdarg.h
include/ac/string.h
include/ac/syslog.h [new file with mode: 0644]
include/ac/termios.h
include/ac/time.h [new file with mode: 0644]
include/ac/unistd.h
include/ac/wait.h [new file with mode: 0644]
include/avl.h
include/disptmpl.h
include/getopt-compat.h [new file with mode: 0644]
include/lber.h
include/ldap.h
include/ldap_cdefs.h
include/ldapconfig.h.edit
include/ldapconfig.h.nt
include/ldbm.h
include/ldif.h
include/lthread.h
include/lthread_rdwr.h [new file with mode: 0644]
include/lutil.h
include/lutil_md5.h
include/lutil_sha1.h
include/portable.h.bot
include/portable.h.in
include/portable.h.top
include/srchpref.h
include/sysexits-compat.h
libraries/liblber/Makefile.in
libraries/liblber/Version.c
libraries/liblber/bprint.c
libraries/liblber/decode.c
libraries/liblber/dtest.c
libraries/liblber/encode.c
libraries/liblber/etest.c
libraries/liblber/idtest.c
libraries/liblber/io.c
libraries/libldap/Makefile.in
libraries/libldap/Version.c
libraries/libldap/abandon.c
libraries/libldap/add.c
libraries/libldap/addentry.c
libraries/libldap/bind.c
libraries/libldap/cache.c
libraries/libldap/charset.c
libraries/libldap/cldap.c
libraries/libldap/compare.c
libraries/libldap/delete.c
libraries/libldap/disptmpl.c
libraries/libldap/dsparse.c
libraries/libldap/error.c
libraries/libldap/free.c
libraries/libldap/friendly.c
libraries/libldap/getattr.c
libraries/libldap/getdn.c
libraries/libldap/getdxbyname.c
libraries/libldap/getentry.c
libraries/libldap/getfilter.c
libraries/libldap/getvalues.c
libraries/libldap/init.c
libraries/libldap/kbind.c
libraries/libldap/ldap-int.h
libraries/libldap/modify.c
libraries/libldap/modrdn.c
libraries/libldap/open.c
libraries/libldap/os-ip.c
libraries/libldap/request.c
libraries/libldap/result.c
libraries/libldap/sbind.c
libraries/libldap/search.c
libraries/libldap/sort.c
libraries/libldap/srchpref.c
libraries/libldap/strdup.c
libraries/libldap/test.c
libraries/libldap/tmplout.c
libraries/libldap/tmpltest.c
libraries/libldap/ufn.c
libraries/libldap/unbind.c
libraries/libldap/url.c

index 656e04b5ec93a3b66527ace42dd5caa152eb8286..52e83ca31cde7c0be9291125a97712eaa2650cfc 100644 (file)
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,4 +1,4 @@
-Copyright 1998 The OpenLDAP Foundation, Redwood City, California, USA
+Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
 All rights reserved.
 
 Redistribution and use in source and binary forms are permitted only
 All rights reserved.
 
 Redistribution and use in source and binary forms are permitted only
index 91866269b1d71a31e3f28f9983efe7440bef7f08..f564426626e315c0a150b3b1cba9cbc4ba9542a3 100644 (file)
@@ -1,6 +1,13 @@
 # Master Makefile for OpenLDAP
 # Master Makefile for OpenLDAP
-# Copyright 1998 The OpenLDAP Foundation,  All Rights Reserved.
-# COPYING RESTRICTIONS APPLY, See COPYRIGHT file
+##
+## Copyright 1998,1999 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.
+##
 
 SUBDIRS= include libraries clients servers # contrib
 CLEANDIRS= tests doc
 
 SUBDIRS= include libraries clients servers # contrib
 CLEANDIRS= tests doc
index f900d8952e943db6d8d98a9f438a9a1697e28c7d..d5d43c58e2f0af239f7fbaf7c4cc2e161c49722e 100644 (file)
@@ -1,4 +1,7 @@
 /* acconfig.h
 /* acconfig.h
+  Copyright 1998 The OpenLDAP Foundation,  All Rights Reserved.
+  COPYING RESTRICTIONS APPLY, See COPYRIGHT file
+
    Descriptive text for the C preprocessor macros that
    the distributed Autoconf macros can define.
 
    Descriptive text for the C preprocessor macros that
    the distributed Autoconf macros can define.
 
index 2861ae0daae43f0c63a6689183d3f2323197194d..0cb4fecf5ecba12f6b90111ed1b11de03eed7e21 100644 (file)
@@ -1,3 +1,5 @@
+dnl Copyright 1998 The OpenLDAP Foundation,  All Rights Reserved.
+dnl COPYING RESTRICTIONS APPLY, See COPYRIGHT file
 dnl
 dnl OpenLDAP Autoconf Macros
 dnl
 dnl
 dnl OpenLDAP Autoconf Macros
 dnl
index 73203f14384a2cbe80b2502af53dd71da8fa04a3..65d59a0af85b26e7cd3142fd68adb0ae2cf6b315 100644 (file)
@@ -10,6 +10,8 @@ dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 dnl PARTICULAR PURPOSE.
 
 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 dnl PARTICULAR PURPOSE.
 
+dnl Copyright 1998 The OpenLDAP Foundation,  All Rights Reserved.
+dnl COPYING RESTRICTIONS APPLY, See COPYRIGHT file
 dnl
 dnl OpenLDAP Autoconf Macros
 dnl
 dnl
 dnl OpenLDAP Autoconf Macros
 dnl
index 70a8f6692be5ff0812249a9f8c00717bfe700cf1..ebf4d813e75034d4c7af226bb60db3eedcf663a3 100644 (file)
@@ -1,3 +1,6 @@
+## Copyright 1998,1999 The OpenLDAP Foundation
+## COPYING RESTRICTIONS APPLY.  See COPYRIGHT File in top level directory
+## of this package for details.
 ##---------------------------------------------------------------------------
 ##
 ## Makes subdirectories
 ##---------------------------------------------------------------------------
 ##
 ## Makes subdirectories
diff --git a/build/info.mk b/build/info.mk
new file mode 100644 (file)
index 0000000..0fed4f8
--- /dev/null
@@ -0,0 +1,9 @@
+## Copyright 1998,1999 The OpenLDAP Foundation
+## COPYING RESTRICTIONS APPLY.  See COPYRIGHT File in top level directory
+## of this package for details.
+##---------------------------------------------------------------------------
+##
+## Makefile Template for Non-Source Directories
+##
+
+Makefile: $(top_srcdir)/build/info.mk
index 76774428f87cf1fbffb866bf0ac03b7827d5cff4..59fc6e9637b14ddc9db1d0bf142459a050a3da58 100644 (file)
@@ -1,3 +1,6 @@
+## Copyright 1998,1999 The OpenLDAP Foundation
+## COPYING RESTRICTIONS APPLY.  See COPYRIGHT File in top level directory
+## of this package for details.
 ##---------------------------------------------------------------------------
 ##
 ## Makefile Template for Shared Libraries
 ##---------------------------------------------------------------------------
 ##
 ## Makefile Template for Shared Libraries
index a4862ff0a32ccc28c51fed5758ce7a6591e0d96a..76bcee07aa999ba53a2ec21be4a349643c967422 100644 (file)
@@ -1,3 +1,6 @@
+## Copyright 1998,1999 The OpenLDAP Foundation
+## COPYING RESTRICTIONS APPLY.  See COPYRIGHT File in top level directory
+## of this package for details.
 ##---------------------------------------------------------------------------
 ##
 ## Makefile Template for Static Libraries
 ##---------------------------------------------------------------------------
 ##
 ## Makefile Template for Static Libraries
index d92d72503dfcf316ddec72a88bf27a68cfcbc1df..842967089c9bbfe7cedb9d4b76ee5e8aeaa91d7c 100644 (file)
@@ -1,3 +1,6 @@
+## Copyright 1998,1999 The OpenLDAP Foundation
+## COPYING RESTRICTIONS APPLY.  See COPYRIGHT File in top level directory
+## of this package for details.
 ##---------------------------------------------------------------------------
 ##
 ## Makefile Template for Libraries
 ##---------------------------------------------------------------------------
 ##
 ## Makefile Template for Libraries
index 3fd3bdfa992300f955b3e5375256a4849357113e..f93c1e5fb3fd1d0bd28dd98ef546457a1ba221f2 100644 (file)
@@ -1,3 +1,6 @@
+## Copyright 1998,1999 The OpenLDAP Foundation
+## COPYING RESTRICTIONS APPLY.  See COPYRIGHT File in top level directory
+## of this package for details.
 ##---------------------------------------------------------------------------
 ##
 ## Makefile Template for Manual Pages
 ##---------------------------------------------------------------------------
 ##
 ## Makefile Template for Manual Pages
index 31439d60dad98cf6b521c5956d566473aad8b774..7ef07906e864af5515ace2b528bec7e3a0526fc1 100644 (file)
@@ -1,3 +1,5 @@
+dnl Copyright 1998 The OpenLDAP Foundation,  All Rights Reserved.
+dnl COPYING RESTRICTIONS APPLY, See COPYRIGHT file
 dnl
 dnl OpenLDAP Autoconf Macros
 dnl
 dnl
 dnl OpenLDAP Autoconf Macros
 dnl
index 370a9c587ae645bb5048cbf732451bea0bd279ac..6594584c2a10f0d67fb9482dadeefc32247dc1dc 100644 (file)
@@ -1,3 +1,6 @@
+## Copyright 1998,1999 The OpenLDAP Foundation
+## COPYING RESTRICTIONS APPLY.  See COPYRIGHT File in top level directory
+## of this package for details.
 ##---------------------------------------------------------------------------
 ##
 ## Makefile Template for Programs
 ##---------------------------------------------------------------------------
 ##
 ## Makefile Template for Programs
index 5b4e373da92b9ecc2f92ab69d2d7468335feea79..4e5f819a64f46cfa9edb7266d64464631c19d494 100644 (file)
@@ -1,3 +1,6 @@
+## Copyright 1998,1999 The OpenLDAP Foundation
+## COPYING RESTRICTIONS APPLY.  See COPYRIGHT File in top level directory
+## of this package for details.
 ##---------------------------------------------------------------------------
 ##
 ## Makefile Template for Servers
 ##---------------------------------------------------------------------------
 ##
 ## Makefile Template for Servers
index 59f6732c2b373363598fd9878bc745737863fd2b..c0516a8e2d8d17ade6f4cb8c353811cc65b75bd5 100644 (file)
@@ -1,7 +1,11 @@
 ##
 ##
-## Copyright 1998 The OpenLDAP Foundation
-## COPYING RESTRICTIONS APPLY.  See COPYRIGHT File in top level directory
-## of this package for details.
+## Copyright 1998,1999 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.
 ##
 PACKAGE= @PACKAGE@
 VERSION= @VERSION@
 ##
 PACKAGE= @PACKAGE@
 VERSION= @VERSION@
index 8b058b0e931ed53818c755372eda7d2e8d8fbdf1..0bbb59347c1d6865f0f6a5d3f0dfdc9a12e3efbe 100644 (file)
@@ -1,10 +1,11 @@
-dnl Copyright 1998 The OpenLDAP Foundation.  All Rights Reserved.
+dnl
+dnl Copyright 1998,1999 The OpenLDAP Foundation.  All Rights Reserved.
 dnl 
 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 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
 
 dnl Configure.in for OpenLDAP
 AC_INIT(include/ldap.h)dnl
 
 dnl Configure.in for OpenLDAP
 AC_INIT(include/ldap.h)dnl
diff --git a/include/ac/alloca.h b/include/ac/alloca.h
new file mode 100644 (file)
index 0000000..69e823d
--- /dev/null
@@ -0,0 +1,33 @@
+/* Generic alloca.h */
+/*
+ * Copyright 1998,1999 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.
+ */
+
+#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 <alloca.h>
+# else
+#  ifdef _AIX
+#pragma alloca
+#  else
+#   ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+#   endif
+#  endif
+# endif
+#endif
+
+
+#endif /* _AC_ALLOCA_H */
index 5d479442c5a64ae1f98cfd1a86d05adf3b854972..74265604a3b68670125c97fe0a3d9540b692286b 100644 (file)
@@ -1,4 +1,13 @@
 /* Generic bytes.h */
 /* Generic bytes.h */
+/*
+ * Copyright 1998,1999 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.
+ */
 
 #ifndef _AC_BYTES_H
 #define _AC_BYTES_H
 
 #ifndef _AC_BYTES_H
 #define _AC_BYTES_H
diff --git a/include/ac/ctype.h b/include/ac/ctype.h
new file mode 100644 (file)
index 0000000..b58d96f
--- /dev/null
@@ -0,0 +1,25 @@
+/* Generic ctype.h */
+/*
+ * Copyright 1998,1999 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.
+ */
+
+#ifndef _AC_CTYPE_H
+#define _AC_CTYPE_H
+
+#include <ctype.h>
+
+#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/dirent.h b/include/ac/dirent.h
new file mode 100644 (file)
index 0000000..e58dda8
--- /dev/null
@@ -0,0 +1,32 @@
+/* Generic dirent.h */
+/*
+ * Copyright 1998,1999 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.
+ */
+
+#ifndef _AC_DIRENT_H
+#define _AC_DIRENT_H
+
+#if HAVE_DIRENT_H
+# include <dirent.h>
+# define NAMLEN(dirent) strlen((dirent)->d_name)
+#else
+# define dirent direct
+# define NAMLEN(dirent) (dirent)->d_namlen
+# if HAVE_SYS_NDIR_H
+#  include <sys/ndir.h>
+# endif
+# if HAVE_SYS_DIR_H
+#  include <sys/dir.h>
+# endif
+# if HAVE_NDIR_H
+#  include <ndir.h>
+# endif
+#endif
+
+#endif /* _AC_DIRENT_H */
diff --git a/include/ac/errno.h b/include/ac/errno.h
new file mode 100644 (file)
index 0000000..49e03fb
--- /dev/null
@@ -0,0 +1,28 @@
+/* Generic errno.h */
+/*
+ * Copyright 1998,1999 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.
+ */
+
+#ifndef _AC_ERRNO_H
+#define _AC_ERRNO_H
+
+#if defined( HAVE_ERRNO_H )
+# include <errno.h>
+#elif defined( HAVE_SYS_ERRNO_H )
+# include <sys/errno.h>
+#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/krb.h b/include/ac/krb.h
new file mode 100644 (file)
index 0000000..05a2774
--- /dev/null
@@ -0,0 +1,30 @@
+/* Generic krb.h */
+/*
+ * Copyright 1998,1999 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.
+ */
+
+#ifndef _AC_KRB_H
+#define _AC_KRB_H
+
+#if defined( HAVE_KERBEROS )
+
+#if defined( HAVE_KERBEROSIV_KRB_H )
+#include <kerberosIV/krb.h>
+#elif defined( HAVE_KRB_H )
+#include <krb.h>
+#endif
+
+#if defined( HAVE_KERBEROSIV_DES_H )
+#include <kerberosIV/des.h>
+#elif defined( HAVE_DES_H )
+#include <des.h>
+#endif
+
+#endif /* HAVE_KERBEROS */
+#endif /* _AC_KRB_H */
diff --git a/include/ac/regex.h b/include/ac/regex.h
new file mode 100644 (file)
index 0000000..87033a8
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Generic Regex
+ */
+/*
+ * Copyright 1998,1999 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.
+ */
+#ifndef _AC_REGEX_H_
+#define _AC_REGEX_H_
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#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 <regex.h>
+#endif /* regex.h */
+
+#endif /* _AC_REGEX_H_ */
index ac1c6a2472fce921878f7c82d7d81a67d6a1d81e..2866d211f561bc2c20d371c2b03d860ce7f204d1 100644 (file)
@@ -1,4 +1,13 @@
 /* Generic setproctitle.h */
 /* Generic setproctitle.h */
+/*
+ * Copyright 1998,1999 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.
+ */
 
 #ifndef _AC_SETPROCTITLE_H
 #define _AC_SETPROCTITLE_H
 
 #ifndef _AC_SETPROCTITLE_H
 #define _AC_SETPROCTITLE_H
index b850e75894fafebf800c016650b65f0c1418de4e..3ab614f581d83653c08b875e9d5969f893ab99cf 100644 (file)
@@ -1,4 +1,13 @@
 /* Generic signal.h */
 /* Generic signal.h */
+/*
+ * Copyright 1998,1999 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.
+ */
 
 #ifndef _AC_SIGNAL_H
 #define _AC_SIGNAL_H
 
 #ifndef _AC_SIGNAL_H
 #define _AC_SIGNAL_H
index ced2879abf504025c903d85769e29982ccc6ea8e..fff336918e3076c4f2ff2c65e7a66017a9870460 100644 (file)
@@ -1,6 +1,15 @@
 /*
  * Generic socket.h
  */
 /*
  * Generic socket.h
  */
+/*
+ * Copyright 1998,1999 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.
+ */
 
 #ifndef _AC_SOCKET_H_
 #define _AC_SOCKET_H_
 
 #ifndef _AC_SOCKET_H_
 #define _AC_SOCKET_H_
index acd5483c0e9185d4a0f5127c18cfd36ef9810858..2f9671be08909668bcc83c51e2d4327c126f803b 100644 (file)
@@ -1,4 +1,13 @@
 /* Generic stdarg.h */
 /* Generic stdarg.h */
+/*
+ * Copyright 1998,1999 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.
+ */
 
 #ifndef _AC_STDARG_H
 #define _AC_STDARG_H 1
 
 #ifndef _AC_STDARG_H
 #define _AC_STDARG_H 1
index 6a64074e6fa8623f69b6726897825767398ca3a4..7a799e0d7fb436edecc05e4e4c1d2fe4a44b85ea 100644 (file)
@@ -1,4 +1,13 @@
 /* Generic string.h */
 /* Generic string.h */
+/*
+ * Copyright 1998,1999 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.
+ */
 
 #ifndef _AC_STRING_H
 #define _AC_STRING_H
 
 #ifndef _AC_STRING_H
 #define _AC_STRING_H
diff --git a/include/ac/syslog.h b/include/ac/syslog.h
new file mode 100644 (file)
index 0000000..0b22624
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Generic syslog.h
+ */
+/*
+ * Copyright 1998,1999 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.
+ */
+#ifndef _AC_SYSLOG_H_
+#define _AC_SYSLOG_H_
+
+#if defined( HAVE_SYSLOG_H )
+#include <syslog.h>
+#elif defined ( HAVE_SYS_SYSLOG_H )
+#include <sys/syslog.h>
+#endif
+
+#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 )
+#else
+#      define OPENLOG_OPTIONS ( LOG_PID )
+#endif
+
+#endif /* _AC_SYSLOG_H_ */
index 8788d73029604dfdfd7ccc79d250ae42bcb07bcb..e56eedb0d36bb6b73d8d3ec12826a79d99718d69 100644 (file)
@@ -1,4 +1,13 @@
 /* Generic termios.h */
 /* Generic termios.h */
+/*
+ * Copyright 1998,1999 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.
+ */
 
 #ifndef _AC_TERMIOS_H
 #define _AC_TERMIOS_H
 
 #ifndef _AC_TERMIOS_H
 #define _AC_TERMIOS_H
diff --git a/include/ac/time.h b/include/ac/time.h
new file mode 100644 (file)
index 0000000..8bdf4c5
--- /dev/null
@@ -0,0 +1,24 @@
+/* Generic time.h */
+/*
+ * Copyright 1998,1999 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.
+ */
+
+#ifndef _AC_TIME_H
+#define _AC_TIME_H
+
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#elif HAVE_SYS_TIME_H
+# include <sys/time.h>
+#else
+# include <time.h>
+#endif
+
+#endif /* _AC_TIME_H */
index 0e2f40acd2ffb6b0f6aff0042984f030e13ea1d3..f0d9c1ad7265fd0b215ee36e6bb295a02b68b7e0 100644 (file)
@@ -1,4 +1,13 @@
 /* Generic unistd.h */
 /* Generic unistd.h */
+/*
+ * Copyright 1998,1999 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.
+ */
 
 #ifndef _AC_UNISTD_H
 #define _AC_UNISTD_H
 
 #ifndef _AC_UNISTD_H
 #define _AC_UNISTD_H
diff --git a/include/ac/wait.h b/include/ac/wait.h
new file mode 100644 (file)
index 0000000..30da216
--- /dev/null
@@ -0,0 +1,34 @@
+/* Generic wait.h */
+/*
+ * Copyright 1998,1999 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.
+ */
+
+#ifndef _AC_WAIT_H
+#define _AC_WAIT_H
+
+#include <sys/types.h>
+
+#if HAVE_SYS_WAIT_H
+# include <sys/wait.h>
+#endif
+
+#ifndef WEXITSTATUS
+# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
+#endif
+#ifndef WIFEXITED
+# 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 */
index 651b9026d809519c30a678df0b692a48df5428a1..b514b3060ff6b16952df019dafa26db713a65bf4 100644 (file)
@@ -1,5 +1,13 @@
-/* avl.h - avl tree definitions */
 /*
 /*
+ * Copyright 1998,1999 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.
+ */
+/* Portions
  * Copyright (c) 1993 Regents of the University of Michigan.
  * All rights reserved.
  *
  * Copyright (c) 1993 Regents of the University of Michigan.
  * All rights reserved.
  *
@@ -10,6 +18,7 @@
  * software without specific prior written permission. This software
  * is provided ``as is'' without express or implied warranty.
  */
  * software without specific prior written permission. This software
  * is provided ``as is'' without express or implied warranty.
  */
+/* avl.h - avl tree definitions */
 
 
 #ifndef _AVL
 
 
 #ifndef _AVL
index c4e06ef2fe83de567525f3444419259f41b1aa13..1ab3449b1b2dfdbaf7b517f4666b2bd12cbf6e86 100644 (file)
@@ -1,4 +1,13 @@
 /*
 /*
+ * Copyright 1998,1999 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.
+ */
+/* Portions
  * Copyright (c) 1993, 1994 Regents of the University of Michigan.
  * All rights reserved.
  *
  * Copyright (c) 1993, 1994 Regents of the University of Michigan.
  * All rights reserved.
  *
 #ifndef _DISPTMPL_H
 #define _DISPTMPL_H
 
 #ifndef _DISPTMPL_H
 #define _DISPTMPL_H
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+#include <ldap_cdefs.h>
 
 
+LDAP_BEGIN_DECL
 
 #define LDAP_TEMPLATE_VERSION  1
 
 
 #define LDAP_TEMPLATE_VERSION  1
 
@@ -126,13 +134,13 @@ struct ldap_tmplitem {
 #define NULLTMPLITEM   ((struct ldap_tmplitem *)0)
 
 #define LDAP_SET_TMPLITEM_APPDATA( ti, datap ) \
 #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 )  \
 
 #define LDAP_GET_TMPLITEM_APPDATA( ti, type )  \
-       (type)((ti)->ti_appdata)
+       ( (type)((ti)->ti_appdata) )
 
 #define LDAP_IS_TMPLITEM_OPTION_SET( ti, option )      \
 
 #define LDAP_IS_TMPLITEM_OPTION_SET( ti, option )      \
-       (((ti)->ti_options & option ) != 0 )
+       ( ((ti)->ti_options & (option) ) != 0 )
 
 
 /*
 
 
 /*
@@ -202,13 +210,13 @@ struct ldap_disptmpl {
 #define NULLDISPTMPL   ((struct ldap_disptmpl *)0)
 
 #define LDAP_SET_DISPTMPL_APPDATA( dt, datap ) \
 #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 )  \
 
 #define LDAP_GET_DISPTMPL_APPDATA( dt, type )  \
-       (type)((dt)->dt_appdata)
+       ( (type)((dt)->dt_appdata) )
 
 #define LDAP_IS_DISPTMPL_OPTION_SET( dt, option )      \
 
 #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
 
 #define LDAP_TMPL_ERR_VERSION  1
 #define LDAP_TMPL_ERR_MEM      2
@@ -221,110 +229,95 @@ struct ldap_disptmpl {
 #define LDAP_DTMPL_BUFSIZ      8192
 
 
 #define LDAP_DTMPL_BUFSIZ      8192
 
 
-#ifndef NEEDPROTOS
-
-typedef int (*writeptype)();
+typedef int (*writeptype) LDAP_P(( void *writeparm, char *p, int len ));
 
 
-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 LDAP_P(( char *file, struct ldap_disptmpl **tmpllistp ));
 
 
-#else /* !NEEDPROTOS */
+LDAP_F int
+ldap_init_templates_buf LDAP_P(( char *buf,
+       long buflen,
+       struct ldap_disptmpl **tmpllistp ));
 
 
-typedef int (*writeptype)( void *writeparm, char *p, int len );
+LDAP_F void
+ldap_free_templates LDAP_P(( struct ldap_disptmpl *tmpllist ));
 
 
-LDAPFUNCDECL int
-ldap_init_templates( char *file, struct ldap_disptmpl **tmpllistp );
+LDAP_F struct ldap_disptmpl *
+ldap_first_disptmpl LDAP_P(( struct ldap_disptmpl *tmpllist ));
 
 
-LDAPFUNCDECL int
-ldap_init_templates_buf( char *buf, long buflen,
-       struct ldap_disptmpl **tmpllistp );
+LDAP_F struct ldap_disptmpl *
+ldap_next_disptmpl LDAP_P(( struct ldap_disptmpl *tmpllist,
+       struct ldap_disptmpl *tmpl ));
 
 
-LDAPFUNCDECL void
-ldap_free_templates( struct ldap_disptmpl *tmpllist );
+LDAP_F struct ldap_disptmpl *
+ldap_name2template LDAP_P(( char *name,
+       struct ldap_disptmpl *tmpllist ));
 
 
-LDAPFUNCDECL struct ldap_disptmpl *
-ldap_first_disptmpl( struct ldap_disptmpl *tmpllist );
+LDAP_F struct ldap_disptmpl *
+ldap_oc2template LDAP_P(( char **oclist,
+       struct ldap_disptmpl *tmpllist ));
 
 
-LDAPFUNCDECL struct ldap_disptmpl *
-ldap_next_disptmpl( struct ldap_disptmpl *tmpllist,
-       struct ldap_disptmpl *tmpl );
+LDAP_F char **
+ldap_tmplattrs LDAP_P(( struct ldap_disptmpl *tmpl,
+       char **includeattrs,
+       int exclude,
+       unsigned long syntaxmask ));
 
 
-LDAPFUNCDECL struct ldap_disptmpl *
-ldap_name2template( char *name, struct ldap_disptmpl *tmpllist );
+LDAP_F struct ldap_tmplitem *
+ldap_first_tmplrow LDAP_P(( struct ldap_disptmpl *tmpl ));
 
 
-LDAPFUNCDECL struct ldap_disptmpl *
-ldap_oc2template( char **oclist, struct ldap_disptmpl *tmpllist );
+LDAP_F struct ldap_tmplitem *
+ldap_next_tmplrow 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_first_tmplcol LDAP_P(( struct ldap_disptmpl *tmpl,
+       struct ldap_tmplitem *row ));
 
 
-LDAPFUNCDECL struct ldap_tmplitem *
-ldap_first_tmplrow( struct ldap_disptmpl *tmpl );
+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_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,
        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,
        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,
        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,
        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,
        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,
        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 */
 #endif /* _DISPTMPL_H */
diff --git a/include/getopt-compat.h b/include/getopt-compat.h
new file mode 100644 (file)
index 0000000..a32e8b5
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * Copyright 1998,1999 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.
+ */
+/*
+ * getopt(3) declarations
+ */
+#ifndef _GETOPT_COMPAT_H
+#define _GETOPT_COMPAT_H
+
+#include <ldap_cdefs.h>
+
+extern char *optarg;
+extern int optind, opterr, optopt;
+
+LDAP_F int getopt LDAP_P((int, char * const [], const char *));
+
+#endif /* _GETOPT_COMPAT_H */
index 557b00d46b593d1ac502e6faca229e21f964dc9b..b2e690681f76000542c73d2a92ebf0e5d4fc294e 100644 (file)
@@ -1,4 +1,13 @@
 /*
 /*
+ * Copyright 1998,1999 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.
+ */
+/* Portions
  * Copyright (c) 1990 Regents of the University of Michigan.
  * All rights reserved.
  *
  * Copyright (c) 1990 Regents of the University of Michigan.
  * All rights reserved.
  *
index 54b956fb6c4fd5c2dd4be664e894c12b6b3051e3..8b93f57c32d8cdba6da048b08746838e4027e91d 100644 (file)
@@ -1,4 +1,13 @@
 /*
 /*
+ * Copyright 1998,1999 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.
+ */
+/* Portions
  * Copyright (c) 1990 Regents of the University of Michigan.
  * All rights reserved.
  *
  * Copyright (c) 1990 Regents of the University of Michigan.
  * All rights reserved.
  *
index 96579288df7e17ab392a82c8b3f74b2d652e48c3..3fab219e5e1507845a62e5a094cbbd0179d084fe 100644 (file)
@@ -1,3 +1,12 @@
+/*
+ * Copyright 1998,1999 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.
+ */
 /* LDAP C Defines */
 
 #ifndef _LDAP_CDEFS_H
 /* LDAP C Defines */
 
 #ifndef _LDAP_CDEFS_H
index f384d3b0466d66e0d2e1dfa30fe3368734dc0e7b..4acdfd8cd406f04b7e59ff838793f8074dd52f7f 100644 (file)
@@ -1,4 +1,13 @@
 /*
 /*
+ * Copyright 1998,1999 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.
+ */
+/* Portions
  * Copyright (c) 1994 Regents of the University of Michigan.
  * All rights reserved.
  *
  * Copyright (c) 1994 Regents of the University of Michigan.
  * All rights reserved.
  *
index 6a5dbf5e5260f6b752e42bc448477e4b58894cb2..94881f00823842312b319e42704c2503b732e652 100644 (file)
@@ -1,4 +1,13 @@
 /*
 /*
+ * Copyright 1998,1999 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.
+ */
+/* Portions
  * Copyright (c) 1994 Regents of the University of Michigan.
  * All rights reserved.
  *
  * Copyright (c) 1994 Regents of the University of Michigan.
  * All rights reserved.
  *
index 95bd55ffa7ca277a137e4bbc4e40792ab8ac46a0..d1b93fb4a3403a54ad3573709401dec62d4f6e92 100644 (file)
@@ -1,41 +1,72 @@
+/*
+ * Copyright 1998,1999 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.
+ */
 /* ldbm.h - ldap dbm compatibility routine header file */
 
 #ifndef _LDBM_H_
 #define _LDBM_H_
 
 /* ldbm.h - ldap dbm compatibility routine header file */
 
 #ifndef _LDBM_H_
 #define _LDBM_H_
 
-#ifdef LDBM_USE_GDBM
+#ifdef LDBM_USE_DBBTREE
 
 /*****************************************************************
  *                                                               *
 
 /*****************************************************************
  *                                                               *
- * use gdbm if possible                                          *
+ * use berkeley db btree package                                 *
  *                                                               *
  *****************************************************************/
 
  *                                                               *
  *****************************************************************/
 
-#include <gdbm.h>
+#include <sys/types.h>
+#include <limits.h>
+#include <fcntl.h>
 
 
-typedef datum          Datum;
+#ifdef HAVE_DB185_H
+#      include <db_185.h>
+#else
+#      include <db.h>
+#      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 */
 
 /* 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 */
 
 /* 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
 
 #define LDBM_SYNC      0x80000000
 
-#else /* end of gdbm */
-
-#ifdef LDBM_USE_DBHASH
+#elif defined( LDBM_USE_DBHASH )
 
 /*****************************************************************
  *                                                               *
 
 /*****************************************************************
  *                                                               *
@@ -46,7 +77,16 @@ extern gdbm_error    gdbm_errno;
 #include <sys/types.h>
 #include <limits.h>
 #include <fcntl.h>
 #include <sys/types.h>
 #include <limits.h>
 #include <fcntl.h>
-#include <db.h>
+
+#ifdef HAVE_DB185_H
+#      include <db_185.h>
+#else
+#      include <db.h>
+#      ifdef LDBM_USE_DB2
+#              define R_NOOVERWRITE DB_NOOVERWRITE
+#              define DEFAULT_DB_PAGE_SIZE 1024
+#      endif
+#endif
 
 typedef DBT    Datum;
 #define dsize  size
 
 typedef DBT    Datum;
 #define dsize  size
@@ -57,11 +97,18 @@ typedef DB  *LDBM;
 #define DB_TYPE                DB_HASH
 
 /* for ldbm_open */
 #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"
 
 
 #define LDBM_SUFFIX    ".dbh"
 
@@ -70,51 +117,38 @@ typedef DB *LDBM;
 #define LDBM_REPLACE   0
 #define LDBM_SYNC      0x80000000
 
 #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 <sys/types.h>
-#include <limits.h>
-#include <fcntl.h>
-#include <db.h>
+#include <gdbm.h>
 
 
-typedef DBT    Datum;
-#define dsize  size
-#define dptr   data
+typedef datum          Datum;
 
 
-typedef DB     *LDBM;
+typedef GDBM_FILE      LDBM;
 
 
-#define DB_TYPE                DB_BTREE
+extern gdbm_error      gdbm_errno;
 
 /* for ldbm_open */
 
 /* 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
+#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_SUFFIX    ".dbb"
-#define LDBM_ORDERED   1
+#define LDBM_SUFFIX    ".gdbm"
 
 /* for ldbm_insert */
 
 /* 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
 
 #define LDBM_SYNC      0x80000000
 
-extern int     errno;
 
 
-#else /* end of db btree */
-
-#ifdef LDBM_USE_NDBM
+#elif defined( HAVE_NDBM )
 
 /*****************************************************************
  *                                                               *
 
 /*****************************************************************
  *                                                               *
@@ -123,7 +157,8 @@ extern int  errno;
  *****************************************************************/
 
 #include <ndbm.h>
  *****************************************************************/
 
 #include <ndbm.h>
-#ifndef O_RDONLY
+
+#ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
 
 #include <fcntl.h>
 #endif
 
@@ -145,11 +180,9 @@ typedef DBM        *LDBM;
 #define LDBM_REPLACE   DBM_REPLACE
 #define LDBM_SYNC      0
 
 #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 );
 void   ldbm_close( LDBM ldbm );
 void   ldbm_sync( 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 +191,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_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 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 );
+#else
+       Datum   ldbm_firstkey( LDBM ldbm );
+       Datum   ldbm_nextkey( LDBM ldbm, Datum key );
+#endif
 
 #endif /* _ldbm_h_ */
 
 #endif /* _ldbm_h_ */
index dd2b339193ec723426f90939b17008dd723ae97c..e4e4ef33a9ca1494dd5e8b81a328c5dc0b697982 100644 (file)
@@ -1,4 +1,13 @@
 /*
 /*
+ * Copyright 1998,1999 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.
+ */
+/* Portions
  * Copyright (c) 1996 Regents of the University of Michigan.
  * All rights reserved.
  *
  * Copyright (c) 1996 Regents of the University of Michigan.
  * All rights reserved.
  *
@@ -13,9 +22,9 @@
 #ifndef _LDIF_H
 #define _LDIF_H
 
 #ifndef _LDIF_H
 #define _LDIF_H
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+#include <ldap_cdefs.h>
+
+LDAP_BEGIN_DECL
 
 #define LINE_WIDTH      76      /* maximum length of LDIF lines */
 
 
 #define LINE_WIDTH      76      /* maximum length of LDIF lines */
 
@@ -34,23 +43,13 @@ extern "C" {
  */
 #define LDIF_SIZE_NEEDED(tlen,vlen) \
     ((tlen) + 4 + LDIF_BASE64_LEN(vlen) \
  */
 #define LDIF_SIZE_NEEDED(tlen,vlen) \
     ((tlen) + 4 + LDIF_BASE64_LEN(vlen) \
-    + ((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 */
-
-#ifdef __cplusplus
-}
-#endif
+    + ((LDIF_BASE64_LEN(vlen) + (tlen) + 3) / LINE_WIDTH * 2 ))
+
+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 ));
+
+LDAP_END_DECL
 
 #endif /* _LDIF_H */
 
 #endif /* _LDIF_H */
index b97398dd0850ee51ae7b8c7340f6d1179ccce021..974f717dcd202932ab1d90080f7dc852578c2d8e 100644 (file)
@@ -1,3 +1,12 @@
+/*
+ * Copyright 1998,1999 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.
+ */
 /* lthread.h - ldap threads header file */
 
 #ifndef _LTHREAD_H
 /* lthread.h - ldap threads header file */
 
 #ifndef _LTHREAD_H
diff --git a/include/lthread_rdwr.h b/include/lthread_rdwr.h
new file mode 100644 (file)
index 0000000..c4beb36
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * Copyright 1998,1999 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.
+ */
+
+#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_cdefs.h>
+
+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;
+
+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
+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
+
+#endif /* _LTHREAD_RDWR_H */
index 7de0041a583ace7900a4ae3af32c6021d865740e..dfe1d9d9adf92916b9d38a976bb49efe1caa0a7b 100644 (file)
@@ -1,3 +1,13 @@
+/*
+ * Copyright 1998,1999 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.
+ */
+
 #ifndef _LUTIL_H
 #define _LUTIL_H 1
 
 #ifndef _LUTIL_H
 #define _LUTIL_H 1
 
index c0a9ba48bf7749ccba32c8674d59560aedadb09a..892f30ba326b21923c4f96021e425ef28208fbfc 100644 (file)
@@ -1,3 +1,13 @@
+/*
+ * Copyright 1998,1999 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.
+ */
+
 /* See md5.c for explanation and copyright information.  */
 
 #ifndef _LUTIL_MD5_H_
 /* See md5.c for explanation and copyright information.  */
 
 #ifndef _LUTIL_MD5_H_
index 8b3d81ee9ddb893251571039a7009707cf6bb45e..cdcabf4e415c6cbfcd68696a94d4158f92b7f6a3 100644 (file)
@@ -1,3 +1,13 @@
+/*
+ * Copyright 1998,1999 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 version is based on:
  *     $OpenBSD: sha1.h,v 1.8 1997/07/15 01:54:23 millert Exp $        */
 
 /* This version is based on:
  *     $OpenBSD: sha1.h,v 1.8 1997/07/15 01:54:23 millert Exp $        */
 
index 5994b212992b6dac8dcdf02754e06020d25ca6e4..c45e2ce833f24263e1de8a4c0249060b0b608529 100644 (file)
@@ -1,4 +1,13 @@
 /* portable.h.bot begin */
 /* portable.h.bot begin */
+/*
+ * Copyright 1998,1999 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.
+ */
 
 #ifdef HAVE_STDDEF_H
 #      include <stddef.h>
 
 #ifdef HAVE_STDDEF_H
 #      include <stddef.h>
index f531273a203678a09bff0e5cdd23b36bfd6cc60c..3a3c3f58c1732bc120ae2a5c318c41776b0bbfbd 100644 (file)
@@ -1,33 +1,14 @@
 /* include/portable.h.in.  Generated automatically from configure.in by autoheader.  */
 /* portable.h.top begin */
 /*
 /* include/portable.h.in.  Generated automatically from configure.in by autoheader.  */
 /* portable.h.top begin */
 /*
-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.
-*/
+ * Copyright 1998,1999 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.
+ */
 
 #ifndef _LDAP_PORTABLE_H
 #define _LDAP_PORTABLE_H
 
 #ifndef _LDAP_PORTABLE_H
 #define _LDAP_PORTABLE_H
@@ -612,6 +593,15 @@ is provided ``as is'' without express or implied warranty.
 /* Define if you have the socket library (-lsocket).  */
 #undef HAVE_LIBSOCKET
 /* portable.h.bot begin */
 /* Define if you have the socket library (-lsocket).  */
 #undef HAVE_LIBSOCKET
 /* portable.h.bot begin */
+/*
+ * Copyright 1998,1999 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.
+ */
 
 #ifdef HAVE_STDDEF_H
 #      include <stddef.h>
 
 #ifdef HAVE_STDDEF_H
 #      include <stddef.h>
index 4f413c0da5c090e56ffd43db6a360ecf7fb89378..3a43d452d2ccf53407d461ff1e9a99405b449be7 100644 (file)
@@ -1,32 +1,13 @@
 /* portable.h.top begin */
 /*
 /* portable.h.top begin */
 /*
-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.
-*/
+ * Copyright 1998,1999 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.
+ */
 
 #ifndef _LDAP_PORTABLE_H
 #define _LDAP_PORTABLE_H
 
 #ifndef _LDAP_PORTABLE_H
 #define _LDAP_PORTABLE_H
index a1d65cffb0a4e0ea1281ab90ac245b12107e5f5d..cff3f95705e48c97c0700e832e537dc921ea87c2 100644 (file)
@@ -1,4 +1,13 @@
 /*
 /*
+ * Copyright 1998,1999 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.
+ */
+/* Portions
  * Copyright (c) 1993, 1994 Regents of the University of Michigan.
  * All rights reserved.
  *
  * Copyright (c) 1993, 1994 Regents of the University of Michigan.
  * All rights reserved.
  *
 #ifndef _SRCHPREF_H
 #define _SRCHPREF_H
 
 #ifndef _SRCHPREF_H
 #define _SRCHPREF_H
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+#include <ldap_cdefs.h>
 
 
+LDAP_BEGIN_DECL
 
 struct ldap_searchattr {
        char                            *sa_attrlabel;
 
 struct ldap_searchattr {
        char                            *sa_attrlabel;
@@ -60,7 +68,7 @@ struct ldap_searchobj {
 #define LDAP_SEARCHOBJ_OPT_INTERNAL    0x00000001
 
 #define LDAP_IS_SEARCHOBJ_OPTION_SET( so, option )     \
 #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
 
 #define LDAP_SEARCHPREF_VERSION_ZERO   0
 #define LDAP_SEARCHPREF_VERSION                1
@@ -71,36 +79,26 @@ struct ldap_searchobj {
 #define LDAP_SEARCHPREF_ERR_FILE       4
 
 
 #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();
-
-#else /* !NEEDPROTOS */
-
-LDAPFUNCDECL int
-ldap_init_searchprefs( char *file, struct ldap_searchobj **solistp );
+LDAP_F int
+ldap_init_searchprefs LDAP_P(( char *file,
+       struct ldap_searchobj **solistp ));
 
 
-LDAPFUNCDECL int
-ldap_init_searchprefs_buf( char *buf, long buflen,
-       struct ldap_searchobj **solistp );
+LDAP_F int
+ldap_init_searchprefs_buf LDAP_P(( char *buf,
+       long buflen,
+       struct ldap_searchobj **solistp ));
 
 
-LDAPFUNCDECL void
-ldap_free_searchprefs( struct ldap_searchobj *solist );
+LDAP_F void
+ldap_free_searchprefs LDAP_P(( struct ldap_searchobj *solist ));
 
 
-LDAPFUNCDECL struct ldap_searchobj *
-ldap_first_searchobj( struct ldap_searchobj *solist );
+LDAP_F struct ldap_searchobj *
+ldap_first_searchobj LDAP_P(( struct ldap_searchobj *solist ));
 
 
-LDAPFUNCDECL struct ldap_searchobj *
-ldap_next_searchobj( struct ldap_searchobj *sollist,
-       struct ldap_searchobj *so );
+LDAP_F struct ldap_searchobj *
+ldap_next_searchobj LDAP_P(( struct ldap_searchobj *sollist,
+       struct ldap_searchobj *so ));
 
 
-#endif /* !NEEDPROTOS */
 
 
+LDAP_END_DECL
 
 
-#ifdef __cplusplus
-}
-#endif
 #endif /* _SRCHPREF_H */
 #endif /* _SRCHPREF_H */
index 9be67fa417304543997abb77282a833fcd71a857..09f24cc756a8d8e1785cd2d2456086b0dc109cf2 100644 (file)
@@ -1,4 +1,13 @@
 /*
 /*
+ * Copyright 1998,1999 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.
+ */
+/* Portions
  * Copyright (c) 1987 Regents of the University of California.
  * All rights reserved.
  *
  * Copyright (c) 1987 Regents of the University of California.
  * All rights reserved.
  *
index 1c0bfcb79b7a9339ba346e2b2038950150c7561b..40b08df2e88842de21470cb763ad38c91b8ee3b5 100644 (file)
@@ -1,3 +1,5 @@
+## Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+## COPYING RESTRICTIONS APPLY, see COPYRIGHT file
 ##
 ## LIBLBER
 ##
 ##
 ## LIBLBER
 ##
index ae3b655c4a33b8dc52c6f75eb05ae09090613970..61093cd8328ff4b539f3bbd5096bcd92b81432f2 100644 (file)
@@ -1,4 +1,8 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/* Portions
  * Copyright (c) 1991 Regents of the University of Michigan.
  * All rights reserved.
  *
  * Copyright (c) 1991 Regents of the University of Michigan.
  * All rights reserved.
  *
index e4b6fd27ea2b9ee5def85b5ab39d3c5eef286e19..21c8cf83e3a2e69a80da5825487b19fbc9ebe369 100644 (file)
@@ -1,20 +1,30 @@
+/*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+
+#include "portable.h"
+
+#if defined( LDAP_DEBUG ) && defined( LDAP_LIBUI )
 #include <stdio.h>
 #include <stdio.h>
-#include <string.h>
-#include <ctype.h>
+
+#include <ac/ctype.h>
+#include <ac/string.h>
+#endif /* LDAP_DEBUG && LDAP_LIBUI  */
+
 #include "lber.h"
 
 /*
  * Print arbitrary stuff, for debugging.
  */
 
 #include "lber.h"
 
 /*
  * Print arbitrary stuff, for debugging.
  */
 
-#ifdef LDAP_DEBUG
-
-#ifndef NO_USERINTERFACE
-#define BPLEN  48
 
 void
 lber_bprint( char *data, int len )
 {
 
 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;
     static char        hexdig[] = "0123456789abcdef";
     char       out[ BPLEN ];
     int                i = 0;
@@ -49,12 +59,7 @@ lber_bprint( char *data, int len )
        }
        out[ i++ ] = ' ';
     }
        }
        out[ i++ ] = ' ';
     }
+
+#endif /* LDAP_DEBUG && LDAP_LIBUI  */
 }
 }
-#else /* NO_USERINTERFACE */
-void
-lber_bprint( char *data, int len )
-{
-}
-#endif /* NO_USERINTERFACE */
 
 
-#endif
index aab968200776c7ea104ae6da8a47611407c3bb8a..219713953506093c3eab7c23066627a39269cb1e 100644 (file)
@@ -1,5 +1,9 @@
 /* decode.c - ber input decoding routines */
 /*
 /* decode.c - ber input decoding routines */
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/* Portions
  * Copyright (c) 1990 Regents of the University of Michigan.
  * All rights reserved.
  *
  * Copyright (c) 1990 Regents of the University of Michigan.
  * All rights reserved.
  *
index 6c9a33727f89494a1e4b657f6519d7fcb5b6212f..07bab698962afa8759cb980ea03c870606f1c2de 100644 (file)
@@ -1,5 +1,9 @@
 /* dtest.c - lber decoding test program */
 /*
 /* dtest.c - lber decoding test program */
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/* Portions
  * Copyright (c) 1990 Regents of the University of Michigan.
  * All rights reserved.
  *
  * Copyright (c) 1990 Regents of the University of Michigan.
  * All rights reserved.
  *
index b320a2eb569237519bcd67bcfb7666895ab84feb..51b76912c4e92d85f8b86f0ac7a1a523724ee62d 100644 (file)
@@ -1,5 +1,9 @@
 /* encode.c - ber output encoding routines */
 /*
 /* encode.c - ber output encoding routines */
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/* Portions
  * Copyright (c) 1990 Regents of the University of Michigan.
  * All rights reserved.
  *
  * Copyright (c) 1990 Regents of the University of Michigan.
  * All rights reserved.
  *
index e46d506450834f864e30e5de5dc3e9f6a2415dbf..46192aa88366b3b1bcde596881de8215161c81e0 100644 (file)
@@ -1,5 +1,9 @@
 /* test.c - lber encoding test program */
 /*
 /* test.c - lber encoding test program */
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/* Portions
  * Copyright (c) 1990 Regents of the University of Michigan.
  * All rights reserved.
  */
  * Copyright (c) 1990 Regents of the University of Michigan.
  * All rights reserved.
  */
index 8d68fd603600c36b6601a3e317684ce8733ef6bf..6a5f9b2ed350b6e361d9184d47f103b48e51f261 100644 (file)
@@ -1,5 +1,9 @@
 /* idtest.c - ber decoding test program using isode libraries */
 /*
 /* idtest.c - ber decoding test program using isode libraries */
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/* Portions
  * Copyright (c) 1990 Regents of the University of Michigan.
  * All rights reserved.
  *
  * Copyright (c) 1990 Regents of the University of Michigan.
  * All rights reserved.
  *
index 70e5651c882b207a46c08ae9590e6ce09b36c66a..378d2b685e09092aff712ec26de38b7fd59ba665 100644 (file)
@@ -1,5 +1,9 @@
 /* io.c - ber general i/o routines */
 /*
 /* io.c - ber general i/o routines */
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/* Portions
  * Copyright (c) 1990 Regents of the University of Michigan.
  * All rights reserved.
  *
  * Copyright (c) 1990 Regents of the University of Michigan.
  * All rights reserved.
  *
index f957929202d6a8adf0dbea6d25c6c1add6fdcfae..818e4f2be9905548b37b9c729ebd8f95748b8758 100644 (file)
@@ -1,3 +1,5 @@
+## Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+## COPYING RESTRICTIONS APPLY, see COPYRIGHT file
 ##
 ## Makefile.in for LDAP -lldap
 ##
 ##
 ## Makefile.in for LDAP -lldap
 ##
index 87512f7910facc80beac7802da77acf200e6d974..9a043d706b449a02635b6779d2f1dd51a65b6f6b 100644 (file)
@@ -1,4 +1,8 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/* Portions
  * Copyright (c) 1991 Regents of the University of Michigan.
  * All rights reserved.
  *
  * Copyright (c) 1991 Regents of the University of Michigan.
  * All rights reserved.
  *
index 18324260bd0f06edea8dfb01814772a6c474e2d6..51a12d2e54e1e2ee9b162552eb08c8e50b6b62d2 100644 (file)
@@ -1,41 +1,29 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1990 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  abandon.c
  */
 
  *  Copyright (c) 1990 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  abandon.c
  */
 
-#ifndef lint 
-static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
+#include "portable.h"
 
 #include <stdio.h>
 
 #include <stdio.h>
-#include <string.h>
-
-#if !defined( MACOS ) && !defined( DOS )
-#include <sys/types.h>
-#include <sys/socket.h>
-#endif
-
-#if defined( DOS ) || defined( _WIN32 )
-#include <malloc.h>
-#include "msdos.h"
-#endif /* DOS */
-
-#ifdef MACOS
 #include <stdlib.h>
 #include <stdlib.h>
-#include "macos.h"
-#endif /* MACOS */
+
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/time.h>
 
 #include "lber.h"
 #include "ldap.h"
 #include "ldap-int.h"
 
 
 #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:
  *
 /*
  * ldap_abandon - perform an ldap (and X.500) abandon operation. Parameters:
  *
@@ -107,22 +95,22 @@ do_abandon( LDAP *ld, int origid, int msgid )
        err = 0;
        if ( sendabandon ) {
                /* create a message to send */
        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 {
                        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 {
                        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 );
                                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;
 
                        if ( err == -1 ) {
                                ld->ld_errno = LDAP_ENCODING_ERROR;
@@ -151,10 +139,10 @@ do_abandon( LDAP *ld, int origid, int msgid )
 #ifdef LDAP_REFERRALS
        if ( lr != NULL ) {
                if ( sendabandon ) {
 #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 ) {
                }
                if ( origid == msgid ) {
-                       free_request( ld, lr );
+                       ldap_free_request( ld, lr );
                }
        }
 #endif /* LDAP_REFERRALS */
                }
        }
 #endif /* LDAP_REFERRALS */
index b79cd09b9d4a4eddf1f07cab297b3d55a6a3d797..53d766a63cc20c8c545ff050c85d135e7eb3271c 100644 (file)
@@ -1,30 +1,21 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1990 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  add.c
  */
 
  *  Copyright (c) 1990 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  add.c
  */
 
-#ifndef lint 
-static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
+#include "portable.h"
 
 #include <stdio.h>
 
 #include <stdio.h>
-#include <string.h>
-
-#ifdef MACOS
-#include "macos.h"
-#endif /* MACOS */
-
-#if defined( DOS ) || defined( _WIN32 )
-#include <malloc.h>
-#include "msdos.h"
-#endif /* DOS */
 
 
-#if !defined( MACOS ) && !defined( DOS )
-#include <sys/types.h>
-#include <sys/socket.h>
-#endif /* !MACOS && !DOS */
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/time.h>
 
 #include "lber.h"
 #include "ldap.h"
 
 #include "lber.h"
 #include "ldap.h"
@@ -69,7 +60,7 @@ ldap_add( LDAP *ld, char *dn, LDAPMod **attrs )
        Debug( LDAP_DEBUG_TRACE, "ldap_add\n", 0, 0, 0 );
 
        /* create a message to send */
        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 );
        }
 
                return( -1 );
        }
 
@@ -103,7 +94,7 @@ ldap_add( LDAP *ld, char *dn, LDAPMod **attrs )
        }
 
        /* send the message */
        }
 
        /* 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
 }
 
 int
index a0fc4174e6cb133d41399606c6835db21a1fa5d6..0b4e0545694b8d01c13e524d0bc3c25b53325ee2 100644 (file)
@@ -1,29 +1,23 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1990 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  addentry.c
  */
 
  *  Copyright (c) 1990 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  addentry.c
  */
 
-#ifndef lint 
-static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
+#include "portable.h"
 
 #include <stdio.h>
 
 #include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#ifdef MACOS
 #include <stdlib.h>
 #include <stdlib.h>
-#include "macos.h"
-#else /* MACOS */
-#if defined( DOS ) || defined( _WIN32 )
-#include <malloc.h>
-#include "msdos.h"
-#else /* DOS */
-#include <sys/types.h>
-#include <sys/socket.h>
-#endif /* DOS */
-#endif /* MACOS */
+
+#include <ac/ctype.h>
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/time.h>
 
 #include "lber.h"
 #include "ldap.h"
 
 #include "lber.h"
 #include "ldap.h"
index 0a0487349eac0d66780f8a90517aca6e1e685b85..3d0278fc8be54ffbd2f5493c737efd647c32e3fe 100644 (file)
@@ -1,31 +1,22 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1990 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  bind.c
  */
 
  *  Copyright (c) 1990 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  bind.c
  */
 
-#ifndef lint 
-static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
+#include "portable.h"
 
 #include <stdio.h>
 
 #include <stdio.h>
-#include <string.h>
-#ifdef MACOS
 #include <stdlib.h>
 #include <stdlib.h>
-#include "macos.h"
-#else /* MACOS */
-#ifdef DOS
-#include "msdos.h"
-#ifdef NCSA
-#include "externs.h"
-#endif /* NCSA */
-#else /* DOS */
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#endif /* DOS */
-#endif /* MACOS */
+
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/time.h>
 
 #include "lber.h"
 #include "ldap.h"
 
 #include "lber.h"
 #include "ldap.h"
@@ -54,7 +45,7 @@ ldap_bind( LDAP *ld, char *dn, char *passwd, int authmethod )
         *              name            DistinguishedName,       -- who
         *              authentication  CHOICE {
         *                      simple          [0] OCTET STRING -- passwd
         *              name            DistinguishedName,       -- who
         *              authentication  CHOICE {
         *                      simple          [0] OCTET STRING -- passwd
-#ifdef KERBEROS
+#ifdef HAVE_KERBEROS
         *                      krbv42ldap      [1] OCTET STRING
         *                      krbv42dsa       [2] OCTET STRING
 #endif
         *                      krbv42ldap      [1] OCTET STRING
         *                      krbv42dsa       [2] OCTET STRING
 #endif
@@ -69,7 +60,7 @@ ldap_bind( LDAP *ld, char *dn, char *passwd, int authmethod )
        case LDAP_AUTH_SIMPLE:
                return( ldap_simple_bind( ld, dn, passwd ) );
 
        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 ) );
 
        case LDAP_AUTH_KRBV41:
                return( ldap_kerberos_bind1( ld, dn ) );
 
@@ -106,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 ) );
 
        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 ) );
 
        case LDAP_AUTH_KRBV4:
                return( ldap_kerberos_bind_s( ld, dn ) );
 
index 197f4fb9e38182c3b7cd36b4ed6e0d05ec828ffe..1a021cbc711b97864b56a3ff4e6a18ebb567e52b 100644 (file)
@@ -1,63 +1,43 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1993 The Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  cache.c - local caching support for LDAP
  */
 
  *  Copyright (c) 1993 The Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  cache.c - local caching support for LDAP
  */
 
-#ifndef NO_CACHE
-
-#ifndef lint 
-static char copyright[] = "@(#) Copyright (c) 1993 The Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
+#include "portable.h"
 
 #include <stdio.h>
 
 #include <stdio.h>
-#include <string.h>
-#ifdef MACOS
 #include <stdlib.h>
 #include <stdlib.h>
-#include <time.h>
-#include "macos.h"
-#else /* MACOS */
-#if defined( DOS ) || defined( _WIN32 )
-#include <malloc.h>
-#include "msdos.h"
-#ifdef NCSA
-#include "externs.h"
-#endif /* NCSA */
-#ifdef WINSOCK
-#include <time.h>
-#endif /* WINSOCK */
-#else /* DOS */
-#include <sys/types.h>
-#include <sys/socket.h>
-#endif /* DOS */
-#endif /* MACOS */
+
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/time.h>
+
 #include "lber.h"
 #include "ldap.h"
 #include "ldap-int.h"
 
 #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 */
+#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 ));
+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 ));
+
+#endif
 
 int
 ldap_enable_cache( LDAP *ld, long timeout, long maxmem )
 {
 
 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 ) {
        if ( ld->ld_cache == NULLLDCACHE ) {
                if (( ld->ld_cache = (LDAPCache *)malloc( sizeof( LDAPCache )))
                    == NULLLDCACHE ) {
@@ -73,15 +53,20 @@ ldap_enable_cache( LDAP *ld, long timeout, long maxmem )
        check_cache_memused( ld->ld_cache );
        ld->ld_cache->lc_enabled = 1;
        return( 0 );
        check_cache_memused( ld->ld_cache );
        ld->ld_cache->lc_enabled = 1;
        return( 0 );
+#else 
+       return( -1 );
+#endif
 }
 
 
 void
 ldap_disable_cache( LDAP *ld )
 {
 }
 
 
 void
 ldap_disable_cache( LDAP *ld )
 {
+#ifndef LDAP_NOCACHE
        if ( ld->ld_cache != NULLLDCACHE ) {
                ld->ld_cache->lc_enabled = 0;
        }
        if ( ld->ld_cache != NULLLDCACHE ) {
                ld->ld_cache->lc_enabled = 0;
        }
+#endif
 }
 
 
 }
 
 
@@ -89,26 +74,31 @@ ldap_disable_cache( LDAP *ld )
 void
 ldap_set_cache_options( LDAP *ld, unsigned long opts )
 {
 void
 ldap_set_cache_options( LDAP *ld, unsigned long opts )
 {
+#ifndef LDAP_NOCACHE
        if ( ld->ld_cache != NULLLDCACHE ) {
                ld->ld_cache->lc_options = opts;
        }
        if ( ld->ld_cache != NULLLDCACHE ) {
                ld->ld_cache->lc_options = opts;
        }
+#endif
 }
        
 
 void
 ldap_destroy_cache( LDAP *ld )
 {
 }
        
 
 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;
        }
        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 )
 {
 }
 
 
 void
 ldap_flush_cache( LDAP *ld )
 {
+#ifndef LDAP_NOCACHE
        int             i;
        LDAPMessage     *m, *next;
 
        int             i;
        LDAPMessage     *m, *next;
 
@@ -133,29 +123,36 @@ ldap_flush_cache( LDAP *ld )
                }
                ld->ld_cache->lc_memused = sizeof( LDAPCache );
        }
                }
                ld->ld_cache->lc_memused = sizeof( LDAPCache );
        }
+#endif
 }
 
 
 void
 ldap_uncache_request( LDAP *ld, int msgid )
 {
 }
 
 
 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 );
+#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 );
 
        uncache_entry_or_req( ld, NULL, msgid );
+#endif
 }
 
 
 void
 ldap_uncache_entry( LDAP *ld, char *dn )
 {
 }
 
 
 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 );
+#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 );
 
        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 */
 static void
 uncache_entry_or_req( LDAP *ld,
        char *dn,               /* if non-NULL, uncache entry */
@@ -165,8 +162,8 @@ uncache_entry_or_req( LDAP *ld,
        LDAPMessage     *m, *prev, *next;
 
        Debug( LDAP_DEBUG_TRACE,
        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;
 
        if ( ld->ld_cache == NULLLDCACHE ) {
            return;
@@ -212,14 +209,16 @@ uncache_entry_or_req( LDAP *ld,
        }
 }
 
        }
 }
 
+#endif
 
 void
 
 void
-add_request_to_cache( LDAP *ld, unsigned long msgtype, BerElement *request )
+ldap_add_request_to_cache( LDAP *ld, unsigned long msgtype, BerElement *request )
 {
 {
+#ifndef LDAP_NOCACHE
        LDAPMessage     *new;
        long            len;
 
        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 ||
 
        ld->ld_errno = LDAP_SUCCESS;
        if ( ld->ld_cache == NULLLDCACHE ||
@@ -229,7 +228,7 @@ add_request_to_cache( LDAP *ld, unsigned long msgtype, BerElement *request )
 
        if (( new = (LDAPMessage *) calloc( 1, sizeof(LDAPMessage) ))
            != NULL ) {
 
        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;
                }
                        free( (char *)new );
                        return;
                }
@@ -252,16 +251,18 @@ add_request_to_cache( LDAP *ld, unsigned long msgtype, BerElement *request )
        } else {
                ld->ld_errno = LDAP_NO_MEMORY;
        }
        } else {
                ld->ld_errno = LDAP_NO_MEMORY;
        }
+#endif
 }
 
 
 void
 }
 
 
 void
-add_result_to_cache( LDAP *ld, LDAPMessage *result )
+ldap_add_result_to_cache( LDAP *ld, LDAPMessage *result )
 {
 {
+#ifndef LDAP_NOCACHE
        LDAPMessage     *m, **mp, *req, *new, *prev;
        int             err, keep;
 
        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 ||
                result->lm_msgid, result->lm_msgtype, 0 );
 
        if ( ld->ld_cache == NULLLDCACHE ||
@@ -358,6 +359,7 @@ add_result_to_cache( LDAP *ld, LDAPMessage *result )
                Debug( LDAP_DEBUG_TRACE, "artc: msgid not in request list\n",
                    0, 0, 0 );
        }
                Debug( LDAP_DEBUG_TRACE, "artc: msgid not in request list\n",
                    0, 0, 0 );
        }
+#endif
 }
 
 
 }
 
 
@@ -369,14 +371,15 @@ add_result_to_cache( LDAP *ld, LDAPMessage *result )
  * will find them.
  */
 int
  * will find them.
  */
 int
-check_cache( LDAP *ld, unsigned long msgtype, BerElement *request )
+ldap_check_cache( LDAP *ld, unsigned long msgtype, BerElement *request )
 {
 {
+#ifndef LDAP_NOCACHE
        LDAPMessage     *m, *new, *prev, *next;
        BerElement      reqber;
        int             first, hash;
        unsigned long   validtime;
 
        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 )) {
 
        if ( ld->ld_cache == NULLLDCACHE ||
            ( ld->ld_cache->lc_enabled == 0 )) {
@@ -444,8 +447,12 @@ check_cache( LDAP *ld, unsigned long msgtype, BerElement *request )
 
        Debug( LDAP_DEBUG_TRACE, "cc: result returned from cache\n", 0, 0, 0 );
        return( 0 );
 
        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 )
 
 static int
 cache_hash( BerElement *ber )
@@ -524,7 +531,9 @@ request_cmp( BerElement *req1, BerElement *req2 )
        /*
         * check remaining length and bytes if necessary
         */
        /*
         * 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 ));
                return( -1 );   /* different lengths */
        }
        return( memcmp( r1.ber_ptr, r2.ber_ptr, (size_t)len ));
index d5b74006f561a78f590fb970600163f4e8218643..d5832930dc9343047e9e991761c5e0a49bfc3baa 100644 (file)
@@ -1,38 +1,29 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1995 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  charset.c
  */
 
  *  Copyright (c) 1995 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  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
 
 
 #ifdef STR_TRANSLATION
 
-#ifndef lint 
-static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
-
 #include <stdio.h>
 #include <stdio.h>
-#include <string.h>
-
-#ifdef MACOS
 #include <stdlib.h>
 #include <stdlib.h>
-#include "macos.h"
-#endif /* MACOS */
 
 
-#if !defined(MACOS) && !defined(DOS) && !defined( _WIN32 ) && !defined(VMS)
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/time.h>
+
+#ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
 #endif
 #include <sys/param.h>
 #endif
+
 #include "lber.h"
 #include "ldap.h"
 #include "ldap-int.h"
 #include "lber.h"
 #include "ldap.h"
 #include "ldap-int.h"
@@ -159,7 +150,7 @@ ldap_translate_to_t61( LDAP *ld, char **bufp, unsigned long *lenp,
 
 #include <stdio.h>
 #include <stdlib.h>
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
+#include <ac/string.h>
 
 /* Character set used: ISO 8859-1, ISO 8859-2, ISO 8859-3, ... */
 /* #define  ISO_8859      1 */
 
 /* Character set used: ISO 8859-1, ISO 8859-2, ISO 8859-3, ... */
 /* #define  ISO_8859      1 */
@@ -171,17 +162,10 @@ ldap_translate_to_t61( LDAP *ld, char **bufp, unsigned long *lenp,
 typedef unsigned char  Byte;
 typedef struct { Byte  a, b; } Couple;
 
 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.
 
 /*
    Character choosed as base in diacritics alone: NO-BREAK SPACE.
index 7a6081712da8a01a4184aa443f635d9860822224..a41643a883252f9d4cef8b9d9a62196c2d74d2d0 100644 (file)
@@ -1,4 +1,8 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1990, 1994 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  Copyright (c) 1990, 1994 Regents of the University of Michigan.
  *  All rights reserved.
  *
@@ -9,10 +13,6 @@
 
 #ifdef LDAP_CONNECTIONLESS
 
 
 #ifdef LDAP_CONNECTIONLESS
 
-#ifndef lint 
-static char copyright[] = "@(#) Copyright (c) 1990, 1994 Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
 
 #include <stdio.h>
 #include <stdlib.h>
 
index 74388f1ceaee99faf49eb85bf54c9d81e2372958..148de5d9498e222c4ff05bae67e644b49cbb9992 100644 (file)
@@ -1,25 +1,21 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1990 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  compare.c
  */
 
  *  Copyright (c) 1990 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  compare.c
  */
 
-#ifndef lint 
-static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
+#include "portable.h"
 
 #include <stdio.h>
 
 #include <stdio.h>
-#include <string.h>
-
-#ifdef MACOS
-#include "macos.h"
-#endif /* MACOS */
 
 
-#if !defined( MACOS ) && !defined( DOS )
-#include <sys/types.h>
-#include <sys/socket.h>
-#endif
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/time.h>
 
 #include "lber.h"
 #include "ldap.h"
 
 #include "lber.h"
 #include "ldap.h"
@@ -52,7 +48,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 */
        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 );
        }
 
                return( -1 );
        }
 
@@ -63,19 +59,19 @@ ldap_compare( LDAP *ld, char *dn, char *attr, char *value )
                return( -1 );
        }
 
                return( -1 );
        }
 
-#ifndef NO_CACHE
+#ifndef LDAP_NOCACHE
        if ( ld->ld_cache != NULL ) {
        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 );
                }
                        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 */
+#endif /* LDAP_NOCACHE */
 
        /* send the message */
 
        /* 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
 }
 
 int
index 47e240ea6a9bae564f909200967bd18d732217fc..dce4cfac88244411cad9d143e5e77e42f45af0d1 100644 (file)
@@ -1,29 +1,21 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1990 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  delete.c
  */
 
  *  Copyright (c) 1990 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  delete.c
  */
 
-#ifndef lint 
-static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
+#include "portable.h"
 
 #include <stdio.h>
 
 #include <stdio.h>
-#include <string.h>
-
-#ifdef MACOS
-#include "macos.h"
-#endif /* MACOS */
-
-#if defined( DOS ) || defined( _WIN32 )
-#include "msdos.h"
-#endif /* DOS */
 
 
-#if !defined( MACOS ) && !defined( DOS )
-#include <sys/types.h>
-#include <sys/socket.h>
-#endif
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/time.h>
 
 #include "lber.h"
 #include "ldap.h"
 
 #include "lber.h"
 #include "ldap.h"
@@ -51,7 +43,7 @@ ldap_delete( LDAP *ld, char *dn )
        Debug( LDAP_DEBUG_TRACE, "ldap_delete\n", 0, 0, 0 );
 
        /* create a message to send */
        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 );
        }
 
                return( -1 );
        }
 
@@ -63,7 +55,7 @@ ldap_delete( LDAP *ld, char *dn )
        }
 
        /* send the message */
        }
 
        /* send the message */
-       return ( send_initial_request( ld, LDAP_REQ_DELETE, dn, ber ));
+       return ( ldap_send_initial_request( ld, LDAP_REQ_DELETE, dn, ber ));
 }
 
 
 }
 
 
index ee97405e7e5d18919445d75f524d691261aacf7d..f2325e4c87c7ba132cb9937974f91899d3ca4ffc 100644 (file)
@@ -1,4 +1,8 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  * Copyright (c) 1993, 1994 Regents of the University of Michigan.
  * All rights reserved.
  *
  * Copyright (c) 1993, 1994 Regents of the University of Michigan.
  * All rights reserved.
  *
index 365f343a631017e39066d5fec0038b38bd753d7e..13451a4de102f12f38e511caa355c338f936e1fd 100644 (file)
@@ -1,4 +1,8 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  * Copyright (c) 1993, 1994 Regents of the University of Michigan.
  * All rights reserved.
  *
  * Copyright (c) 1993, 1994 Regents of the University of Michigan.
  * All rights reserved.
  *
index 4a9a9a4ebd330ffe65eff83641e513a684429ae5..f7dfb6d4128b9d7eab4565e989a191a30d1e26c9 100644 (file)
@@ -1,3 +1,8 @@
+/*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+
 #include "portable.h"
 
 #include <stdio.h>
 #include "portable.h"
 
 #include <stdio.h>
index d7a13228e6db9c5245e2fd95313aa4233533fd03..b76216380fdf8cd2390fc884fb18c9009dffe144 100644 (file)
@@ -1,4 +1,8 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1994 The Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  Copyright (c) 1994 The Regents of the University of Michigan.
  *  All rights reserved.
  *
  *           link in lots of extra code when not using certain features
  */
 
  *           link in lots of extra code when not using certain features
  */
 
-#ifndef lint 
-static char copyright[] = "@(#) Copyright (c) 1994 The Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
-
+#include "portable.h"
 
 #include <stdio.h>
 
 #include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#ifdef MACOS
 #include <stdlib.h>
 #include <stdlib.h>
-#include "macos.h"
-#else /* MACOS */
-#ifdef DOS
-#include <malloc.h>
-#include "msdos.h"
-#else /* DOS */
-#include <sys/types.h>
-#include <stdlib.h>
-#endif /* DOS */
-#endif /* MACOS */
+
+#include <ac/ctype.h>
+#include <ac/string.h>
+#include <ac/time.h>
 
 #include "lber.h"
 #include "ldap.h"
 
 #include "lber.h"
 #include "ldap.h"
index 2e09325fd9b2796608cf22ee4e654db7ff028b32..4e40f17ca12aec286cde2e24210ae3a6e9f21c83 100644 (file)
@@ -1,4 +1,8 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1990 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  Copyright (c) 1990 Regents of the University of Michigan.
  *  All rights reserved.
  *
@@ -7,10 +11,6 @@
 
 #include "portable.h"
 
 
 #include "portable.h"
 
-#ifndef lint 
-static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
 
 #include <stdio.h>
 #include <stdlib.h>
 
index 50caa774c5330cf05e4d547f2c329333b43f2015..68bb3458c3a03d30dea2b4726b3015cde92226f9 100644 (file)
@@ -1,29 +1,23 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1990 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  getattr.c
  */
 
  *  Copyright (c) 1990 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  getattr.c
  */
 
-#ifndef lint 
-static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
+#include "portable.h"
 
 #include <stdio.h>
 
 #include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#ifdef MACOS
 #include <stdlib.h>
 #include <stdlib.h>
-#include "macos.h"
-#else /* MACOS */
-#if defined( DOS ) || defined( _WIN32 )
-#include <malloc.h>
-#include "msdos.h"
-#else /* DOS */
-#include <sys/types.h>
-#include <sys/socket.h>
-#endif /* DOS */
-#endif /* MACOS */
+
+#include <ac/ctype.h>
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/time.h>
 
 #include "lber.h"
 #include "ldap.h"
 
 #include "lber.h"
 #include "ldap.h"
@@ -36,7 +30,7 @@ ldap_first_attribute( LDAP *ld, LDAPMessage *entry, BerElement **ber )
 
        Debug( LDAP_DEBUG_TRACE, "ldap_first_attribute\n", 0, 0, 0 );
 
 
        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 );
        }
 
                return( NULL );
        }
 
index 82736d092c1b4f222f0e93596e11491fd29a463d..2291a121db96942d0db505b24c19482f7ffdac34 100644 (file)
@@ -1,4 +1,8 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1994 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  Copyright (c) 1994 Regents of the University of Michigan.
  *  All rights reserved.
  *
@@ -7,10 +11,6 @@
 
 #include "portable.h"
 
 
 #include "portable.h"
 
-#ifndef lint 
-static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
 
 #include <stdio.h>
 #include <stdlib.h>
 
index 26c79bf6a18994a93b38fea960484c904ea525d5..f48a3269bb61d79c93d0a7f991122be98cfcca64 100644 (file)
@@ -1,4 +1,8 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1995 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  Copyright (c) 1995 Regents of the University of Michigan.
  *  All rights reserved.
  *
index f3f896e7b8675eed8abe012c6a4f80c5d95b868a..79309258822a6e9b02625006d40aefcb686c88cf 100644 (file)
@@ -1,29 +1,23 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1990 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  getentry.c
  */
 
  *  Copyright (c) 1990 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  getentry.c
  */
 
-#ifndef lint 
-static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
+#include "portable.h"
 
 #include <stdio.h>
 
 #include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#ifdef MACOS
 #include <stdlib.h>
 #include <stdlib.h>
-#include "macos.h"
-#else /* MACOS */
-#if defined( DOS ) || defined( _WIN32 )
-#include <malloc.h>
-#include "msdos.h"
-#else /* DOS */
-#include <sys/types.h>
-#include <sys/socket.h>
-#endif /* DOS */
-#endif /* MACOS */
+
+#include <ac/ctype.h>
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/time.h>
 
 #include "lber.h"
 #include "ldap.h"
 
 #include "lber.h"
 #include "ldap.h"
index cf5215ceafa637c9f631048d4038c2be48ce43eb..e46dda350351b3c4a078eeac4fb6bb743d25b61a 100644 (file)
@@ -1,4 +1,8 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1993 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  Copyright (c) 1993 Regents of the University of Michigan.
  *  All rights reserved.
  *
@@ -7,10 +11,6 @@
 
 #include "portable.h"
 
 
 #include "portable.h"
 
-#ifndef lint 
-static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
 
 #include <stdio.h>
 #include <stdlib.h>
 
index 55102be8ab6f1c753b218fe137732169b27c69b8..d9e8961dff490dee41e9df9a79e32f8afad3a294 100644 (file)
@@ -1,29 +1,23 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1990 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  getvalues.c
  */
 
  *  Copyright (c) 1990 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  getvalues.c
  */
 
-#ifndef lint 
-static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
+#include "portable.h"
 
 #include <stdio.h>
 
 #include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#ifdef MACOS
 #include <stdlib.h>
 #include <stdlib.h>
-#include "macos.h"
-#else /* MACOS */
-#if defined( DOS ) || defined( _WIN32 )
-#include <malloc.h>
-#include "msdos.h"
-#else /* DOS */
-#include <sys/types.h>
-#include <sys/socket.h>
-#endif /* DOS */
-#endif /* MACOS */
+
+#include <ac/ctype.h>
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/time.h>
 
 #include "lber.h"
 #include "ldap.h"
 
 #include "lber.h"
 #include "ldap.h"
index 036ca8d232298df10c4b8bf63504b83ee90f734c..4ff58daf2e5c3d9b1f8cda67fbc6d073945e34a6 100644 (file)
@@ -1,3 +1,7 @@
+/*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
 #include "portable.h"
 
 #include <stdio.h>
 #include "portable.h"
 
 #include <stdio.h>
index 8bf63e912d77192780e8b72421cd6688daa91bb8..4417a129b4ad03b0c421ab9a9b820101100fae5c 100644 (file)
@@ -1,4 +1,8 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1993 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  Copyright (c) 1993 Regents of the University of Michigan.
  *  All rights reserved.
  *
@@ -7,10 +11,6 @@
 
 #include "portable.h"
 
 
 #include "portable.h"
 
-#ifndef lint 
-static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
-
 #ifdef HAVE_KERBEROS
 
 #include <stdio.h>
 #ifdef HAVE_KERBEROS
 
 #include <stdio.h>
index 15c1d4acf00acc7231d25486e4296a1c16f81f45..0e8ac97b7327539e241253781dd2b304e99eeb91 100644 (file)
@@ -1,4 +1,8 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1995 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  Copyright (c) 1995 Regents of the University of Michigan.
  *  All rights reserved.
  *
index 316dde787f7af9c61d80837fb169c542788ada09..551a84e2b7f87bcf18f6f0df3c081729805998ac 100644 (file)
@@ -1,25 +1,21 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1990 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  modify.c
  */
 
  *  Copyright (c) 1990 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  modify.c
  */
 
-#ifndef lint 
-static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
+#include "portable.h"
 
 #include <stdio.h>
 
 #include <stdio.h>
-#include <string.h>
-
-#ifdef MACOS
-#include "macos.h"
-#endif /* MACOS */
 
 
-#if !defined( MACOS ) && !defined( DOS )
-#include <sys/types.h>
-#include <sys/socket.h>
-#endif
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/time.h>
 
 #include "lber.h"
 #include "ldap.h"
 
 #include "lber.h"
 #include "ldap.h"
@@ -69,7 +65,7 @@ ldap_modify( LDAP *ld, char *dn, LDAPMod **mods )
        Debug( LDAP_DEBUG_TRACE, "ldap_modify\n", 0, 0, 0 );
 
        /* create a message to send */
        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 );
        }
 
                return( -1 );
        }
 
@@ -105,7 +101,7 @@ ldap_modify( LDAP *ld, char *dn, LDAPMod **mods )
        }
 
        /* send the message */
        }
 
        /* 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
 }
 
 int
index f4624a919a0b222c76baac3a4a4f06082f6ee9c7..a172f2989a9c726927fc0ef47e5ff99b318da62d 100644 (file)
@@ -1,25 +1,21 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1990 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  modrdn.c
  */
 
  *  Copyright (c) 1990 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  modrdn.c
  */
 
-#ifndef lint 
-static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
+#include "portable.h"
 
 #include <stdio.h>
 
 #include <stdio.h>
-#include <string.h>
-
-#ifdef MACOS
-#include "macos.h"
-#endif /* MACOS */
 
 
-#if !defined( MACOS ) && !defined( DOS )
-#include <sys/types.h>
-#include <sys/socket.h>
-#endif
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/time.h>
 
 #include "lber.h"
 #include "ldap.h"
 
 #include "lber.h"
 #include "ldap.h"
@@ -53,7 +49,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 */
        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 );
        }
 
                return( -1 );
        }
 
@@ -65,7 +61,7 @@ ldap_modrdn2( LDAP *ld, char *dn, char *newrdn, int deleteoldrdn )
        }
 
        /* send the message */
        }
 
        /* 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
 }
 
 int
index 624d06bdfa90465e35476704d00eb4ada8b6d90c..ef64cf3ed3841627fcab0ad0a0b0461ef5fd2878 100644 (file)
@@ -1,4 +1,8 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1995 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  Copyright (c) 1995 Regents of the University of Michigan.
  *  All rights reserved.
  *
@@ -7,10 +11,6 @@
 
 #include "portable.h"
 
 
 #include "portable.h"
 
-#ifndef lint 
-static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
 
 #include <stdio.h>
 #include <stdlib.h>
 
index b2bcfafc2e6587838f63aa09fbe274e2ec02ed10..4459d46d22b689dc9e80ec77d8c1d7e7d73393e8 100644 (file)
@@ -1,4 +1,8 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1995 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  Copyright (c) 1995 Regents of the University of Michigan.
  *  All rights reserved.
  *
index f747d65e60496e6a2f0d81163e6a7632a9c50ccf..fbb09a1bab3a65e13333f31973527b892cf65ece 100644 (file)
@@ -1,4 +1,8 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1995 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  Copyright (c) 1995 Regents of the University of Michigan.
  *  All rights reserved.
  *
@@ -7,10 +11,6 @@
 
 #include "portable.h"
 
 
 #include "portable.h"
 
-#ifndef lint 
-static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
 
 #include <stdio.h>
 #include <stdlib.h>
 
index e5b4baaee5e2ea58546e87ee65b229d71ec45be6..c8c7b7126018616a1996ede7691d167461a179a8 100644 (file)
@@ -1,4 +1,8 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1990 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  Copyright (c) 1990 Regents of the University of Michigan.
  *  All rights reserved.
  *
@@ -7,10 +11,6 @@
 
 #include "portable.h"
 
 
 #include "portable.h"
 
-#ifndef lint 
-static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
 
 #include <stdio.h>
 #include <stdlib.h>
 
index 656c722f155fcbc3e9b119da616154c6c19bea0b..5121f713fec2c89d331df14ff0340a90f8c26178 100644 (file)
@@ -1,25 +1,21 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1993 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  sbind.c
  */
 
  *  Copyright (c) 1993 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  sbind.c
  */
 
-#ifndef lint 
-static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
+#include "portable.h"
 
 #include <stdio.h>
 
 #include <stdio.h>
-#include <string.h>
-
-#ifdef MACOS
-#include "macos.h"
-#endif /* MACOS */
 
 
-#if !defined( MACOS ) && !defined( DOS )
-#include <sys/types.h>
-#include <sys/socket.h>
-#endif
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/time.h>
 
 #include "lber.h"
 #include "ldap.h"
 
 #include "lber.h"
 #include "ldap.h"
@@ -61,7 +57,7 @@ ldap_simple_bind( LDAP *ld, char *dn, char *passwd )
                passwd = "";
 
        /* create a message to send */
                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 );
        }
 
                return( -1 );
        }
 
@@ -73,14 +69,14 @@ ldap_simple_bind( LDAP *ld, char *dn, char *passwd )
                return( -1 );
        }
 
                return( -1 );
        }
 
-#ifndef NO_CACHE
+#ifndef LDAP_NOCACHE
        if ( ld->ld_cache != NULL ) {
                ldap_flush_cache( ld );
        }
        if ( ld->ld_cache != NULL ) {
                ldap_flush_cache( ld );
        }
-#endif /* !NO_CACHE */
+#endif /* !LDAP_NOCACHE */
 
        /* send the message */
 
        /* send the message */
-       return( send_initial_request( ld, LDAP_REQ_BIND, dn, ber ));
+       return( ldap_send_initial_request( ld, LDAP_REQ_BIND, dn, ber ));
 }
 
 /*
 }
 
 /*
index 496394858403cf435ddf022477a5697a8f4e2d14..794831fc9a24be76b99a0d3c26b131bf8fe803e6 100644 (file)
@@ -1,4 +1,8 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1990 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  Copyright (c) 1990 Regents of the University of Michigan.
  *  All rights reserved.
  *
@@ -7,10 +11,6 @@
 
 #include "portable.h"
 
 
 #include "portable.h"
 
-#ifndef lint 
-static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
 
 #include <stdio.h>
 #include <stdlib.h>
 
index 272e84db23384c4feeee70848254b8fd51cdbf83..0e2996cac06dbffc25e0c06387d1e1e789439d90 100644 (file)
@@ -1,4 +1,8 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/* Portions
  * Copyright (c) 1994 Regents of the University of Michigan.
  * All rights reserved.
  *
  * Copyright (c) 1994 Regents of the University of Michigan.
  * All rights reserved.
  *
index 50af66a2a29903e866a599f4440e4be050849109..45cf8a59fe3ecb68e014dee4880d2b62692d817b 100644 (file)
@@ -1,4 +1,8 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/* Portions
  * Copyright (c) 1993, 1994 Regents of the University of Michigan.
  * All rights reserved.
  *
  * Copyright (c) 1993, 1994 Regents of the University of Michigan.
  * All rights reserved.
  *
index 42385b64683927e2164e4f4217f7168f19392dd2..614bec6fb1664ed7b94ea649ee843f5fdba278af 100644 (file)
@@ -1,3 +1,8 @@
+/*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+
 #include "portable.h"
 
 #include <stdlib.h>
 #include "portable.h"
 
 #include <stdlib.h>
index cbcd88b2fb4af6a1605bfcef25f30a9addeeb089..35f03d94a25ecffc538813bf41b7c82b3a54424a 100644 (file)
@@ -1,3 +1,8 @@
+/*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+
 #include "portable.h"
 
 #include <stdio.h>
 #include "portable.h"
 
 #include <stdio.h>
index e596a9b94726ce35d001751af1b96ac058de7c4e..5c8bf0ba3a6a06ca7ad28ab6670fc0a9dbe4332e 100644 (file)
@@ -1,3 +1,7 @@
+/*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
 /*
  * tmplout.c:  display template library output routines for LDAP clients
  * 12 April 1994 by Mark C Smith
 /*
  * tmplout.c:  display template library output routines for LDAP clients
  * 12 April 1994 by Mark C Smith
index 9855317b560cc01d265f28616a87dfaae3e0ef2f..9d9f5b3d14ee68441bccbe18141da4a316b7e998 100644 (file)
@@ -1,3 +1,7 @@
+/*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
 #include "portable.h"
 
 #include <stdio.h>
 #include "portable.h"
 
 #include <stdio.h>
index 02ac4d0a75ffb6b7309c445871e78b1d1df0fcc4..b269bd034474f483b9b59468577d89e18f902fd0 100644 (file)
@@ -1,4 +1,8 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1990 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  Copyright (c) 1990 Regents of the University of Michigan.
  *  All rights reserved.
  *
@@ -7,10 +11,6 @@
 
 #include "portable.h"
 
 
 #include "portable.h"
 
-#ifndef lint 
-static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
-
 #include <stdio.h>
 #include <ac/string.h>
 #include <ctype.h>
 #include <stdio.h>
 #include <ac/string.h>
 #include <ctype.h>
index e7b5c401e6f2c8b28be7b23950286e5a4649ad73..5cbeec90614ee986d099d97786b04681dcabed45 100644 (file)
@@ -1,31 +1,22 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1990 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  unbind.c
  */
 
  *  Copyright (c) 1990 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  unbind.c
  */
 
-#ifndef lint 
-static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
+#include "portable.h"
 
 #include <stdio.h>
 
 #include <stdio.h>
-#include <string.h>
-#ifdef MACOS
 #include <stdlib.h>
 #include <stdlib.h>
-#include "macos.h"
-#else /* MACOS */
-#if defined( DOS ) || defined( _WIN32 )
-#include "msdos.h"
-#ifdef NCSA
-#include "externs.h"
-#endif /* NCSA */
-#else /* DOS */
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-#endif /* DOS */
-#endif /* MACOS */
+
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/time.h>
 
 #include "lber.h"
 #include "ldap.h"
 
 #include "lber.h"
 #include "ldap.h"
@@ -55,17 +46,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 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 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 ) {
                }
 #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 {
                }
 #endif /* LDAP_REFERRALS */
        } else {
@@ -83,10 +74,10 @@ ldap_ld_free( LDAP *ld, int close )
                ldap_msgfree( lm );
        }
 
                ldap_msgfree( lm );
        }
 
-#ifndef NO_CACHE
+#ifndef LDAP_NOCACHE
        if ( ld->ld_cache != NULL )
                ldap_destroy_cache( ld );
        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 )
        if ( ld->ld_error != NULL )
                free( ld->ld_error );
        if ( ld->ld_matched != NULL )
@@ -106,7 +97,7 @@ ldap_ld_free( LDAP *ld, int close )
 
 #ifdef LDAP_REFERRALS
        if ( ld->ld_selectinfo != NULL )
 
 #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 )
 #endif /* LDAP_REFERRALS */
 
        if ( ld->ld_defhost != NULL )
@@ -114,6 +105,8 @@ ldap_ld_free( LDAP *ld, int close )
 
        free( (char *) ld );
 
 
        free( (char *) ld );
 
+       WSACleanup();
+
        return( err );
 }
 
        return( err );
 }
 
@@ -125,14 +118,14 @@ ldap_unbind_s( LDAP *ld )
 
 
 int
 
 
 int
-send_unbind( LDAP *ld, Sockbuf *sb )
+ldap_send_unbind( LDAP *ld, Sockbuf *sb )
 {
        BerElement      *ber;
 
 {
        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 */
 
        /* 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 );
        }
 
                return( ld->ld_errno );
        }
 
index 69f8da23891f50d4336799b7ba5292f7c24b2004..0c22d7478274abe19a27cdb951e7940509de4800 100644 (file)
@@ -1,4 +1,8 @@
 /*
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1996 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  Copyright (c) 1996 Regents of the University of Michigan.
  *  All rights reserved.
  *
 
 #include "portable.h"
 
 
 #include "portable.h"
 
-#ifndef lint 
-static char copyright[] = "@(#) Copyright (c) 1996 Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
 
 #include <stdio.h>
 #include <stdlib.h>