Commit Graph

10 Commits

Author SHA1 Message Date
Gary Williams
e5635b2662 NT port 1999-04-01 16:32:11 +00:00
Kurt Zeilenga
598b7473fe All implementations of lutil_lockf (aka ldap_lockf) block until
the lock is acquired.  Add comments to that effect.  Remove
unnecessary busy loops from slapd/lock.c and slurpd/lock.c.
1999-03-28 22:43:43 +00:00
Kurt Zeilenga
7adc0a65d0 Update lutil_lockf (aka: ldap_lockf) to hide implementation in
library, not header.  Eliminate need for <ac/unistd.h> to sometimes
include <fcntl.h> and/or <sys/file.h>.  Change lock API to expect
fd not FILE*.  Allows wider use and eliminates requirement that
lutil_lockf.h depencency on stdio.h.
Implemented lockf, fcntl, and flock locking in lutil/lockf.c.
Additional implementations (including no-op) may be needed.
Update slapd/lock.c and slurpd/lock.c to use new API.
1999-03-28 21:39:02 +00:00
Ben Collins
0924180fa8 Used new ldap_(un)lockf() functions 1999-03-13 20:34:27 +00:00
Kurt Zeilenga
b5494457d8 Remove extern declarations of library functions from source.c.
This could cause problems on odd systems.  The generic
  headers should be extended as needed to include necessary
  system headers or, if necessary, make explicit declarations.
Extended ac/string.h header to look for string.h/strings.h if
  STDC_HEADERS is not defined.  Also provide basic declarations for
  str*() functions.  This could cause problems on odd systems.
Extended ac/unistd.h header to define basic declaration for misc
  functions that might be missing from headers.   This includes
  externs for getenv(), getopt(), mktemp(), tempname().
Protect fax500.h from multiple inclusion.  Moved includes of
  system/generic headers back to source files.
Made mail500 helper functions static.
Fixed includes of ctype.h, signal.h, etc. to use generics.
lutil/tempname.c: was including stdlib.h twice, one should stdio.h.
Wrapped <sys/resource.h> with HAVE_SYS_RESOURCE_H.
lber/io.c/ber_get_next(): Changed noctets back to signed.
  Used with BerRead which expects signed int as second arg and
  returns signed int.
1998-11-16 05:07:27 +00:00
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
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
48b3cd0f3f USE_LOCKF -> HAVE_FLOCK 1998-11-04 19:43:51 +00:00
Kurt Zeilenga
2a869f5a99 merged with autoconf branch 1998-10-25 01:41:42 +00:00
Kurt Zeilenga
42e0d83cb3 Initial revision 1998-08-09 00:43:13 +00:00