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.
Showing
- include/ac/unistd.h 4 additions, 38 deletionsinclude/ac/unistd.h
- include/lutil_lockf.h 2 additions, 2 deletionsinclude/lutil_lockf.h
- libraries/liblutil/lockf.c 60 additions, 7 deletionslibraries/liblutil/lockf.c
- servers/slapd/lock.c 3 additions, 3 deletionsservers/slapd/lock.c
- servers/slurpd/lock.c 3 additions, 3 deletionsservers/slurpd/lock.c
Please register or sign in to comment