]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
Update Alpha2 with NT4 changes.
authorKurt Zeilenga <kurt@openldap.org>
Fri, 6 Nov 1998 01:48:50 +0000 (01:48 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 6 Nov 1998 01:48:50 +0000 (01:48 +0000)
clients/tools/ldapdelete.c
clients/tools/ldapmodrdn.c
include/ac/stdarg.h [new file with mode: 0644]
libraries/liblber/decode.c
libraries/liblber/encode.c
libraries/libldap/os-ip.c

index 93b9f0de61983ad9b720095f44022053b0766596..9a0bf901a8486e9a7400184806a487748c504e34 100644 (file)
@@ -8,6 +8,7 @@
 
 #include <ac/socket.h>
 #include <ac/string.h>
+#include <ac/unistd.h>
 
 #include <lber.h>
 #include <ldap.h>
index a00d259d340120a8e0adb81086f94b9172c19b0f..76b6154f9fd84fb01edf201f26a05cbf9ef6a41c 100644 (file)
@@ -8,6 +8,7 @@
 #include <ac/ctype.h>
 #include <ac/string.h>
 #include <ac/time.h>
+#include <ac/unistd.h>
 
 #include <lber.h>
 #include <ldap.h>
diff --git a/include/ac/stdarg.h b/include/ac/stdarg.h
new file mode 100644 (file)
index 0000000..8b805c8
--- /dev/null
@@ -0,0 +1,14 @@
+/* Generic stdarg.h */
+
+#ifndef _AC_STDARG_H
+#define _AC_STDARG_H 1
+
+#if defined( HAVE_STDARG_H ) && \
+       ( defined( __STDC__ ) || defined( _WIN32 ) )
+#      include <stdarg.h>
+#      define HAVE_STDARG 1
+#else
+#      include <varargs.h>
+#endif
+
+#endif /* _AC_STDARG_H */
index 80f11de4363a8691842ed9a19962ec50d5e02731..e67b288b5572c286140967f449dbecf38b931e00 100644 (file)
 #include <stdlib.h>
 #endif
 
-#if defined( HAVE_STDARG_H ) && __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
+#include <ac/stdarg.h>
 
 #include <ac/string.h>
 #include <ac/socket.h>
@@ -370,7 +366,7 @@ ber_next_element( BerElement *ber, unsigned long *len, char *last )
 /* VARARGS */
 unsigned long
 ber_scanf
-#if defined( HAVE_STDARG_H ) && __STDC__
+#if HAVE_STDARG
        ( BerElement *ber, char *fmt, ... )
 #else
        ( va_alist )
@@ -378,7 +374,7 @@ va_dcl
 #endif
 {
        va_list         ap;
-#if !(defined( HAVE_STDARG_H ) && __STDC__)
+#ifndef HAVE_STDARG
        BerElement      *ber;
        char            *fmt;
 #endif
@@ -389,7 +385,7 @@ va_dcl
        long            *l;
        unsigned long   rc, tag, len;
 
-#if defined( HAVE_STDARG_H ) && __STDC__
+#ifdef HAVE_STDARG
        va_start( ap, fmt );
 #else
        va_start( ap );
index f2aee16a790eab628215d8dba622714bc01c4067..b320a2eb569237519bcd67bcfb7666895ab84feb 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 
-#if defined( HAVE_STDARG_H ) && __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
+#include <ac/stdarg.h>
 #include <ac/socket.h>
 #include <ac/string.h>
 
@@ -509,7 +504,7 @@ ber_put_set( BerElement *ber )
 /* VARARGS */
 int
 ber_printf
-#if defined( HAVE_STDARG_H ) && __STDC__
+#ifdef HAVE_STDARG
        ( BerElement *ber, char *fmt, ... )
 #else
        ( va_alist )
@@ -517,7 +512,7 @@ va_dcl
 #endif
 {
        va_list         ap;
-#if !(defined( HAVE_STDARG_H ) && __STDC__)
+#ifndef HAVE_STDARG
        BerElement      *ber;
        char            *fmt;
 #endif
@@ -526,7 +521,7 @@ va_dcl
        int             rc, i;
        unsigned long   len;
 
-#if defined( HAVE_STDARG_H ) && __STDC__
+#ifdef HAVE_STDARG
        va_start( ap, fmt );
 #else
        va_start( ap );
index 0083cc0591ed17c5bd29ce38281200bafef9ca9e..9d15b1c3429727dba2dcd3edc52fb6bab6473cb2 100644 (file)
@@ -56,7 +56,7 @@ ldap_connect_to_host( Sockbuf *sb, char *host, unsigned long address,
 
        connected = use_hp = 0;
 
-       if ( host != NULL && ( address = inet_addr( host )) == -1UL ) {
+       if ( host != NULL && ( address = inet_addr( host )) == (unsigned long) -1L ) {
                if ( (hp = gethostbyname( host )) == NULL ) {
 #ifdef HAVE_WINSOCK
                        errno = WSAGetLastError();