Skip to contentSkip to conversation

Define LDAP_DEPRECATED in the build

PATCH In review Jeff Moyer 2 participants 2 messages Nov 9, 2006

Subsystems (2)
lore
Share & tools
lore

Jeff Moyer

author
#0 lore raw

PATCH 1/1 Define LDAP_DEPRECATED in the build

Without this, newer 64 bit installs will have problems with the sources (since return codes default to int's).

-Jeff

lib/Makefile +2 -1
index a35b208..148828d 100644
@@ -18,7 +18,8 @@ OBJS = cache.o mount_clnt.o mount_xdr.o 
 LIB = autofs.a
 NSSWITCH = nsswitch
 
-CFLAGS += -I../include -fPIC -D_GNU_SOURCE -DHAVE_TCP_WRAPPER -DNFS3_SUPPORTED
+CFLAGS += -I../include -fPIC -D_GNU_SOURCE -DHAVE_TCP_WRAPPER \
+	-DNFS3_SUPPORTED -DLDAP_DEPRECATED
 
 .PHONY: all install clean
 
modules/Makefile +1 -1
index f87721a..e37d980 100644
@@ -87,7 +87,7 @@ lookup_hesiod.so: lookup_hesiod.c
 	$(STRIP) lookup_hesiod.so
 
 lookup_ldap.so: lookup_ldap.c
-	$(CC) $(SOLDFLAGS) $(CFLAGS) $(LDAP_FLAGS) -o lookup_ldap.so \
+	$(CC) $(SOLDFLAGS) $(CFLAGS) $(LDAP_FLAGS) -DLDAP_DEPRECATED -o lookup_ldap.so \
 		lookup_ldap.c $(AUTOFS_LIB) $(LIBLDAP)
 	$(STRIP) lookup_ldap.so
 
samples/Makefile +1 -1
index d69d6e7..029ea9e 100644
@@ -10,7 +10,7 @@ ifeq ($(LDAP), 1)
   BINS = autofs-ldap-auto-master
 endif
 
-CFLAGS += -I../include
+CFLAGS += -I../include -DLDAP_DEPRECATED
 LIBS = -lldap -llber
 
 all: $(BINS) rc.autofs
maintainer
#1 lore raw
Quoted 2 lines · Jeff Moyer

Without this, newer 64 bit installs will have problems with the sources (since return codes default to int's).

A patch to add this to the LDAP_FLAGS var has already been added to the 4.1 tree.

[raven@raven autofs-4.1.4]$ find . -exec grep -Hn LDAP_DEPRECATED {} \;
./configure.in:121: LDAP_FLAGS="$LDAP_FLAGS -DLDAP_DEPRECATED=1"
./configure:3415: LDAP_FLAGS="$LDAP_FLAGS -DLDAP_DEPRECATED=1"
[raven@raven autofs-4.1.4]$

Quoted 44 lines
(quoted diff) +0 -1
-Jeff
lib/Makefile +2 -1
index a35b208..148828d 100644
@@ -18,7 +18,8 @@ OBJS = cache.o mount_clnt.o mount_xdr.o 
 LIB = autofs.a
 NSSWITCH = nsswitch
 
-CFLAGS += -I../include -fPIC -D_GNU_SOURCE -DHAVE_TCP_WRAPPER -DNFS3_SUPPORTED
+CFLAGS += -I../include -fPIC -D_GNU_SOURCE -DHAVE_TCP_WRAPPER \
+	-DNFS3_SUPPORTED -DLDAP_DEPRECATED
 
 .PHONY: all install clean
 
modules/Makefile +1 -1
index f87721a..e37d980 100644
@@ -87,7 +87,7 @@ lookup_hesiod.so: lookup_hesiod.c
 	$(STRIP) lookup_hesiod.so
 
 lookup_ldap.so: lookup_ldap.c
-	$(CC) $(SOLDFLAGS) $(CFLAGS) $(LDAP_FLAGS) -o lookup_ldap.so \
+	$(CC) $(SOLDFLAGS) $(CFLAGS) $(LDAP_FLAGS) -DLDAP_DEPRECATED -o lookup_ldap.so \
 		lookup_ldap.c $(AUTOFS_LIB) $(LIBLDAP)
 	$(STRIP) lookup_ldap.so
 
samples/Makefile +1 -1
index d69d6e7..029ea9e 100644
@@ -10,7 +10,7 @@ ifeq ($(LDAP), 1)
   BINS = autofs-ldap-auto-master
 endif
 
-CFLAGS += -I../include
+CFLAGS += -I../include -DLDAP_DEPRECATED
 LIBS = -lldap -llber
 
 all: $(BINS) rc.autofs