Commit Graph

473 Commits

Author SHA1 Message Date
Hallvard Furuseth
7e6ad5100c Protoized, moved extern definitions to .h files, fixed related bugs.
Most function and variable definitions are now preceded by its extern
definition, for error checking.  Retyped a number of functions, usually
to return void.  Fixed a number of printf format errors.

API changes (in ldap/include):
  Added avl_dup_ok, avl_prefixapply, removed ber_fatten (probably typo
  for ber_flatten), retyped ldap_sort_strcasecmp, grew lutil.h.

A number of `extern' declarations are left (some added by protoize), to
be cleaned away later.  Mostly strdup(), strcasecmp(), mktemp(), optind,
optarg, errno.
1998-11-15 22:40:11 +00:00
Kurt Zeilenga
1c91859e9b Remove #ifdef sunos in lthread HAVE_LWP code. 1998-11-15 22:05:28 +00:00
Hallvard Furuseth
63a818078c Added declarations of common str*() functions 1998-11-15 21:52:56 +00:00
Kurt Zeilenga
d0942df6c9 Add check to see if errno is always thread specific.
If it is not, then everything must use threading libraries.
1998-11-15 20:55:17 +00:00
Kurt Zeilenga
e4a210b017 fix typo in previous commit. 1998-11-15 15:05:22 +00:00
Kurt Zeilenga
5310070b38 don't assume NULL is zero. 1998-11-15 06:55:20 +00:00
Kurt Zeilenga
a8f7f0b3c7 Use "generic" ac headers. 1998-11-15 06:54:30 +00:00
Kurt Zeilenga
f2aa11550e Pthread library check. Autoconf uses same cache variable based
upon library and function, but not secondary libraries.  Must use
different functions in such cases.
1998-11-13 04:28:56 +00:00
Hallvard Furuseth
4ed85bbbb4 Removed space in front of #endif'; make depend' did not like it. 1998-11-13 03:06:54 +00:00
Kurt Zeilenga
3206b1b794 Eliminate #ifdef DOS 1998-11-12 23:28:47 +00:00
Kurt Zeilenga
5c2334c8a4 Updates based upon latest NT UserDirectory changes:
configure checks for getpwuid(), sys/resource.h, and pwd.h
	Fix !TERMIOS && !SGTTY ifdef in ud/util.c
1998-11-12 23:25:53 +00:00
Kurt Zeilenga
8f11966bff Modified UD as necessary to compile and link under NT. 1998-11-12 23:19:16 +00:00
Kurt Zeilenga
a9d6d0c6a1 Move extern declarations to headers.
Update NT portable.h and features.h
1998-11-12 21:07:28 +00:00
Kurt Zeilenga
8c5a6151b1 Rework prototype ifdef to use __NO_PROTOTYPES and __NEED_PROTOTYPES
to force no prototypes or require them.
Remove _WIN32 clause.  Will update portable.h.nt to define __NEED_PROTOTYPES.
1998-11-12 20:30:42 +00:00
Kurt Zeilenga
c32792b489 Include ldif.h to pickup declaration of str_getline()
Fix pointer truncation to int by including prototypes in forward declarations.
1998-11-12 20:17:01 +00:00
Kurt Zeilenga
f1fde41ff8 remove an entry from its parent's children ID list when it's deleted.
Provided by "Gary D. Williams" <sasgwi@unx.sas.com>
1998-11-12 18:39:33 +00:00
Hallvard Furuseth
14a5b7f5bd Forced commit to correct previous log, files were not changed.
inet_addr() on OSF1 returns (unsigned int)0xffffffff, not int.
If it had returned int, the old code would have worked.
1998-11-12 03:03:57 +00:00
Hallvard Furuseth
ce5dcbc522 Check if inet_addr() returns 0xffffffff as well as -1.
It returns (int)0xffffffff on OSF1 which has 64-bit long, so
`unsigned long address; ... if((address = inet_addr(str)) == -1)' fails.
1998-11-12 02:24:43 +00:00
Hallvard Furuseth
523fd2c891 Fix most `wider type truncated to int' bugs on OSF1 due to implicit decls:
#include <stdlib.h>    to get malloc & co various places,
 #include <ac/string.h> to get strlen & co in (liblutil/setproctitle.c),
 declare ch_malloc & co (slurp.h), avl_find_lin (avl.h), Malloc (ud/edit.c).
Also changed ch_malloc & co from char* to void* functions.
1998-11-11 23:37:38 +00:00
Hallvard Furuseth
5a14af5f84 Memory leaks: Values from ldap_get_dn were not freed. 1998-11-11 22:10:05 +00:00
Hallvard Furuseth
ede86e4da8 Memory leaks: Values from ldap_dn2ufn and ldap_get_dn were not freed. 1998-11-11 21:27:21 +00:00
Hallvard Furuseth
f0688d71a1 Locks were not always released, in particular if something went wrong.
Fixed in slurpd and the slapd main dir.  Slapd clients were not examined.
It also "felt right" to swap the order of closing dfp and rfp in slurpd
copy_replog(), so the last acquired lock is unlocked first.
1998-11-11 19:17:25 +00:00
Hallvard Furuseth
f165bb2b96 strlen() needed string.h. 1998-11-11 16:35:58 +00:00
Hallvard Furuseth
fc03c3f07a Fix HAVE_PTHREAD_D4 -> HAVE_PTHREADS_D4 1998-11-11 15:53:04 +00:00
Hallvard Furuseth
dfc9a1c2ff &deref_kv -> deref_kv; som compilers don't like &array 1998-11-11 15:42:22 +00:00
Kurt Zeilenga
d6e05ecbd7 Update NT4 port. 1998-11-11 05:50:51 +00:00
Kurt Zeilenga
dcec4bf292 Add/Remove defines to make current with ldapconfig.h.edit 1.8 1998-11-11 03:13:55 +00:00
Kurt Zeilenga
10a013f8ce Create feature file for NT build environment. 1998-11-11 03:03:03 +00:00
Kurt Zeilenga
e03d88fcc4 Don't include portable.h. Headers can and should assume portable.h
has been included.
1998-11-11 01:38:02 +00:00
Kurt Zeilenga
376e1e02ff Update configure to handle DEC OSF1 3.2 special cases.
-thread & -pthread are still treated as libraries, will need
additional work to use them as CFLAGS.
Eliminated HAVE_DCE define (was redundant) and its use.  Code
now relies on draft4 and function existance tests.
1998-11-11 00:24:22 +00:00
Kurt Zeilenga
1fc810bfe5 Added support for ldap.conf file. See ldap.conf(5) for details.
Modified clients to reduce use of ldapconfig.h.edit.
ldap_{get,set}_option support is relatively complete.  Needs
to be extended to support other "features" of OpenLDAP.
1998-11-10 23:37:30 +00:00
Kurt Zeilenga
962b8dc246 HAVE_PTHREAD_ATTR_SETDETACHSTATE_NP should be HAVE_PTHREAD_ATTR_SETDETACH_NP 1998-11-10 22:42:19 +00:00
Hallvard Furuseth
12b9ad0954 Removed LDAP_P in unhex' prototype; unhex(char) is incompatible with unhex(). 1998-11-10 22:18:22 +00:00
Kurt Zeilenga
120f75219d Update apitest with to toy with additional ldap options and extensions. 1998-11-10 20:27:47 +00:00
Kurt Zeilenga
078c192c63 Add support for OSF1 c89's -thread option to enable threads.
Fix old -pthread -lmach ... support to check for -lc_r instead of -lc.
1998-11-10 19:48:52 +00:00
Kurt Zeilenga
e6ac1f46c3 Add support for runtime determination of API extensions. 1998-11-09 23:21:38 +00:00
Kurt Zeilenga
fd3000d5dc Initialize openldap_ldap_global_options struct (not yet used). 1998-11-09 23:02:27 +00:00
Kurt Zeilenga
1f4b479b2b Update thread detection:
ifndef HAVE_PTHREAD_KILL pthread_kill() code and prototype.
  Fix HAVE_FUNC_PTHREAD defines from previous change.
1998-11-09 21:15:56 +00:00
Kurt Zeilenga
8cb0ff3a68 Fix rwlock pthread draft4 compatibility.
Fix pthread_attr_init/destroy pthread draft4 compatibility.
1998-11-09 20:50:52 +00:00
Kurt Zeilenga
a48b606a2f Initial LDAP_API_FEATURE_X_OPENLDAP commit:
configure generates ldap_features.h based from ldap_features.h.in
  LDAP_REFERRALS -> LDAP_API_FEATURE_OPENLDAP_V2_REFERRALS
  LDAP_DNS -> LDAP_API_FEATURE_OPENLDAP_V2_DNS
1998-11-09 19:41:09 +00:00
Kurt Zeilenga
5960272713 Split out ldapoptions from struct ldap to facilate global options.
Add openldap_ldap_initialize() call to ldap_init/ldap_open/ldap_get/set_options.
1998-11-09 18:40:37 +00:00
Kurt Zeilenga
a5ee7b5842 Add -lresolv check for LDAP_DNS.
Updated portable.h.nt based upon portable.h.in (1.11).
1998-11-08 19:37:03 +00:00
Kurt Zeilenga
3551c882c7 Don't try to use TIOCGWINSZ unless it's defined.
initialize_client() should return void.  Fix and forward declaration.
1998-11-08 17:26:23 +00:00
Hallvard Furuseth
214d545db9 Removed bad LDAP* argument to disambiguate() 1998-11-08 05:01:17 +00:00
Hallvard Furuseth
c7010a3ca0 Undo last change (I commited the wrong version) 1998-11-08 04:59:11 +00:00
Hallvard Furuseth
177c37a43c ld could be used uninitialized 1998-11-08 03:01:51 +00:00
Hallvard Furuseth
8761bbb6e9 ber_scanf() returns unsigned long, not int 1998-11-08 02:56:47 +00:00
Hallvard Furuseth
ee4ee470d5 dtest.c needed lber-int.h (struct berelement) 1998-11-08 02:31:31 +00:00
Hallvard Furuseth
745dfd0298 missing 2nd argument to faxtotpc() 1998-11-08 02:08:18 +00:00
Hallvard Furuseth
3bc58b5eec Removed bad LDAP* argument to disambiguate() 1998-11-08 01:16:36 +00:00