Commit Graph

84 Commits

Author SHA1 Message Date
Kurt Zeilenga
657959b04d Add RCS Id to "generic" headers (experimental) 1999-08-29 20:35:22 +00:00
Kurt Zeilenga
32aa582abe Make sock_errstr expect an error value instead of relying on current
errno.
1999-08-29 20:32:34 +00:00
Howard Chu
74543e6c68 Defined tcp_read and tcp_write. Use them in daemon.c 1999-08-29 04:01:16 +00:00
Howard Chu
193d30bf84 In previous commit - change strerror() to STRERROR().
Use strerror() if available.
1999-08-29 02:59:29 +00:00
Howard Chu
801bac51c9 per Hallvard's advice: fixed definition of sock_errstr(). 1999-08-29 02:54:58 +00:00
Howard Chu
35a3c5017f Define sock_errno() and sock_errstr() for Unix and winsock. 1999-08-29 01:56:51 +00:00
Howard Chu
9a58202116 Define strerror() if it doesn't exist. 1999-08-29 01:56:00 +00:00
Kurt Zeilenga
2d2719123d Rename filter entry's strcpy_special() to strcpy_regex() to better
reflect its purpose.  Modify switch to support REG_EXTENDED expressions.
Use REG_EXTENDED instead of REG_BASIC everywhere.
Modify <ac/regex.h> to support <gnuregex.h> for testing purposes.
Requires: env CPPFLAGS="-DHAVE_GNUREGEX_H=1" LIBS=-lgnuregex ./configure
1999-08-24 01:13:30 +00:00
Kurt Zeilenga
b8a3a153bb Axe <varargs.h> support. Assume STDC C translator is available
to build OpenLDAP.
1999-08-24 00:27:53 +00:00
Kurt Zeilenga
c51f35fe0f Add hacks to allow debugging with CSRI malloc.
(test001-populate runs without leak)
Free global entry string buffer on shutdown.
1999-08-19 17:06:28 +00:00
Kurt Zeilenga
bd9323efc3 Use LDAP_P in prototype for ldap_pvt_inet_aton 1999-08-04 18:27:15 +00:00
Kurt Zeilenga
b3ce9d497c non-blocking connect needs special handling under Winsock. 1999-08-04 00:40:03 +00:00
Kurt Zeilenga
2b79ff2c48 Initial inet_aton() detection. 1999-08-03 20:02:44 +00:00
Kurt Zeilenga
df8f7cbb9b s/exit(1)/exit(EXIT_FAILURE)/
s/exit(0)/exit(EXIT_SUCCESS)/
add <ac/stdlib.h> where needed and other minor header adjustments
1999-08-03 18:14:24 +00:00
Hallvard Furuseth
e7738c2df7 s/LDAP_CONST/const/ in ldap_pvt_asser() prototype 1999-08-01 21:41:46 +00:00
Hallvard Furuseth
e259fc72e0 Define EXIT_SUCCESS and EXIT_FAILURE if necessary 1999-08-01 21:18:38 +00:00
Hallvard Furuseth
b10d32ab18 Add missing LDAP_CONST in ber_pvt_assert() prototype 1999-08-01 21:08:14 +00:00
Hallvard Furuseth
d5840e809f Always include <stdlib.h>, to avoid massive breakage when !STDC_HEADERS.
If someone really lacks stdlib.h, they should introduce HAVE_STDLIB_H.
1999-08-01 18:44:32 +00:00
Kurt Zeilenga
b738f2a4db Check for netinet/tcp.h
Update res_search check and place behind --enable-dns.
1999-07-27 00:31:08 +00:00
Kurt Zeilenga
095f78b392 Use AC_CACHE_CHECK instead of AC_CACHE_VAR.
Rework sys_errlist detection to set HAVE_SYS_ERRLIST if sys_errlist
exists.  If it declaration is needed, DECL_SYS_ERRLIST is also set.
1999-07-24 00:04:05 +00:00
Kurt Zeilenga
d147e609d2 Implement TCP_NODELAY on both client and server side. 1999-07-22 21:49:35 +00:00
Hallvard Furuseth
e2bfb420d7 Fix use and decl of ber_pvt_assert. Fix ac/stdio.h -> stdio.h. 1999-07-13 03:50:39 +00:00
Kurt Zeilenga
f49cee0571 Add prototypes for strerror/strerror_r. 1999-06-29 02:58:14 +00:00
Kurt Zeilenga
669b8f4047 ber_int_t, ber_tag_t, ber_socket_t, ber_len_t
added lber_types.h.nt, lber_types.h.in
removal of NULLxxx internal macros (in favor of NULL).
ch_free added to slapd,slurpd/ch_malloc.c
#define free ch_free (should be removed after s/free/ch_free/g) in proto-slap.h
ch_malloc and friends use ber_memalloc and friends
1999-06-18 23:53:05 +00:00
Juan Gomez
34f068f131 Drop support for alloca(). 1999-06-11 18:56:28 +00:00
Kurt Zeilenga
be991c81df Add test for BeOS's closesocket 1999-06-09 00:10:26 +00:00
Kurt Zeilenga
12ed7e46ef Use LDAP_F and LDAP_P macros.
Fix LDAP_HI 0x377 vs 0377 bug.
1999-06-07 18:35:30 +00:00
Kurt Zeilenga
5f7f095b1c Undo assert fix included in last commit.
Add extra AC_HTONL for win32 alpha.
1999-06-04 22:27:28 +00:00
Kurt Zeilenga
6956207270 Remove <memory.h> from stdlib.h (mem* fns should be in string.h). 1999-06-03 00:45:50 +00:00
Kurt Zeilenga
5a8170253a Add <ac/stdlib.h> to genericize memory allocators.
Remove memory.h/malloc.h inclusion from <ac/string.h>.
Need to s/<stdlib.h>/<ac/stdlib.h> everywhere.
1999-06-02 23:39:55 +00:00
Kurt Zeilenga
117d3275ac Genericize byte types into autoconf namespace. 1999-05-31 05:39:10 +00:00
Kurt Zeilenga
9417618276 Remove redundant WSAEWOULDBLOCK declaration. 1999-05-31 05:37:09 +00:00
Kurt Zeilenga
83408503a7 Eliminate DECL_STRDUP check in favor of simple fix to <ac/string.h> header.
Add #undef and other protection of macros.
1999-05-24 23:01:57 +00:00
Kurt Zeilenga
5a5fc0872b Protect strcasecmp from macro w/ args expansion. 1999-05-21 03:10:52 +00:00
Kurt Zeilenga
dc07e765f2 Vienna Bulk Commit
This commit includes many changes.  All changes compile under NT but
have not been tested under UNIX.

A Summary of changes (likely incomplete):

NT changes:
	Removed lint.
	Clean up configuration support for "Debug", "Release", "SDebug",
		and "SRelease" configurations.
	Share output directories for clients, libraries,
		and slapd.  (maybe they should be combined further
		and moved to build/{,S}{Debug,Release}).
	Enable threading when _MT is defined.
	Enable debuging when _DEBUG is defined.
	Disable setting of NDEBUG under Release/SRelease.  Asserts
		are disabled in <ac/assert.h> when LDAP_DEBUG is not
		defined.
	Added 'build/main.dsp' Master project.
	Removed non-slapd projects from slapd.dsp (see main.dsp).
	Removed replaced many uses of _WIN32 macro with feature based
		macros.

ldap_cdefs.h changes
	#define LDAP_CONST const
		(see below)
	#define LDAP_F(type) LDAP_F_PRE type LDAP_F_POST
		To allow specifiers to be added before and after
		the type declaration.  (For DLL handling)

LBER/LDAP changes
	Namespace changes:
		s/lber_/ber_/ for here and there.
		s/NAME_ERROR/LDAP_NAME_ERROR/g
	Deleted NULLMSG and other NULL* macros for namespace reasons.
	"const" libraries.  Installed headers (ie: lber.h, ldap.h)
		use LDAP_CONST macro.  Normally set to 'const' when
		__STDC__.  Can be set externally to enable/disable
		'constification' of external interface.  Internal
		interface always uses 'const'.  Did not fix warnings
		in -lldif (in lieu of new LDIF parser).

	Added _ext API implementations (excepting search and bind).
		Need to implement ldap_int_get_controls() for reponses
		with controls.

	Added numberous assert() checks.

LDAP_R
	_MT defines HAVE_NT_THREADS
	Added numberous assert() checks.
	Changed ldap_pthread_t back to unsigned long.  Used cast
	to HANDLE in _join().

LDBM
	Replaced _WIN32 with HAVE_SYSLOG

ud
	Added version string if MKVERSION is not defined.  (MKVERSION
		needs to be set under UNIX).

slapd
	Made connection sockbuf field a pointer to a sockbuf.  This
		removed slap.h dependency on lber-int.h.  lber-int.h now only
		included by those files needing to mess with the sockbuf.
	Used ber_* functions/macros to access sockbuf internals whenever
		possible.
	Added version string if MKVERSION is not defined.  (MKVERSION
		needs to be set under UNIX).
	Removed FD_SET unsigned lint

slapd/tools
	Used EXEEXT to added ".exe" to routines.  Need to define EXEEXT
		under UNIX.

ldappasswd
	Added ldappasswd.dsp.  Ported to NT.  Used getpid() to seed rand().

nt_debug
	Minor cleanup.  Added "portable.h" include and used <ac/*.h> where
	appropriate.  Added const to char* format argument.
1999-05-19 01:12:33 +00:00
Kurt Zeilenga
29a7d6229a Wrap externs with parens to protect against inproper macro expansion. 1999-05-18 20:52:36 +00:00
Kurt Zeilenga
135d850ee6 Generate #error instead of just letting the compile fail. 1999-04-30 00:48:47 +00:00
Kurt Zeilenga
b06c4a5576 Winsock changes:
Centralize #define EWOULDBLOCK WSAEWOULDBLOCK to ac/errno.h
Move WSAStartup to slapd_daemon(), add WSACleanup() to match.
1999-04-28 21:21:14 +00:00
Hallvard Furuseth
e78f4140d7 Use macros for the dummy definitions of sys_errlist/sys_errno 1999-04-06 01:25:03 +00:00
Gary Williams
92d4ccf906 NT port 1999-04-01 16:38:11 +00:00
Kurt Zeilenga
b9109a9f20 add wait macros. add LDAP_SIGCHLD. and other misc NT cleanups. 1999-03-29 09:04:35 +00:00
Kurt Zeilenga
db721ca821 Add ioctl_t for arg type (Unix requires 'int', Winsock requires 'u_long'). 1999-03-29 05:28:29 +00:00
Kurt Zeilenga
ff23537bcb Rework ac/socket.h for HAVE_WINSOCK:
tcp_close -> closesocket
  ioctl -> ioctlsocket
Modify codes to use tcp_close() instead of close() for sockets.
Modify ioctl codes to be compatible with WINSOCK.
1999-03-29 05:15:59 +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
5c931bdffa If we are using lutil_lock functions then define NEED_SIMPLE_LOCKING or
liblutil/lockf.c wont be compiled.
1999-03-28 18:07:44 +00:00
Kurt Zeilenga
11add79cb1 Update locking codes. 1999-03-26 17:43:23 +00:00
Ben Collins
cfe36cb71f Added extra checks to locking definitions 1999-03-26 15:10:06 +00:00
Kurt Zeilenga
f999e1350d Provide global assert solution. <ac/assert.h> (new) is now included
by portable.h with NDEBUG undefined.  This makes assert() is always
available and automatically disables itself when LDAP_DEBUG is undefined.
I've included a basic assert() for pre-STDC compilers.  It relies on
abort() which may not actually be available.  (well replace abort()
with whatever is appropriate if and when we're faced with a pre-STDC
compiler that doesn't have assert()).
1999-03-20 03:13:24 +00:00
Kurt Zeilenga
5f3c7a88dc Add 'extern' to externals. 1999-03-15 01:06:02 +00:00
Ben Collins
13f169ee54 Only declare strdup() if DECL_STRDUP is defined 1999-03-15 00:19:46 +00:00