Bug 214728 - Cleaning up obsolete macros in the build
Cleaning up obsolete macros in the build
Status: CLOSED CURRENTRELEASE
Product: 389
Classification: Community
Component: Unknown (Show other bugs)
1.0.2
All Linux
medium Severity medium
: ---
: ---
Assigned To: Noriko Hosoi
Viktor Ashirov
:
Depends On:
Blocks: 152373 240316 FDS1.1.0
  Show dependency treegraph
 
Reported: 2006-11-08 20:05 EST by Noriko Hosoi
Modified: 2015-12-07 11:36 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-07 11:36:07 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
email discussion (12.47 KB, text/html)
2006-11-08 20:05 EST, Noriko Hosoi
no flags Details
cvs diffs (14.58 KB, patch)
2006-11-08 20:12 EST, Noriko Hosoi
no flags Details | Diff
cvs diffs (makefiles containing NS_DS) (3.28 KB, patch)
2006-11-08 20:35 EST, Noriko Hosoi
no flags Details | Diff
cvs diffs (source code containing NET_SSL) (16.97 KB, patch)
2006-11-08 21:11 EST, Noriko Hosoi
no flags Details | Diff
cvs diffs (makefiles containing NET_SSL) (2.25 KB, patch)
2006-11-08 21:13 EST, Noriko Hosoi
no flags Details | Diff
cvs diffs (source code containing UPGRADEDB) (26.40 KB, patch)
2006-11-09 13:50 EST, Noriko Hosoi
no flags Details | Diff
cvs diff (makefiles congaining UPGRADEDB) (719 bytes, patch)
2006-11-09 13:56 EST, Noriko Hosoi
no flags Details | Diff
cvs diffs (source code containing NSPR20) (5.98 KB, patch)
2006-11-09 14:32 EST, Noriko Hosoi
no flags Details | Diff
cvs diffs (makefiles containing NSPR20) (36.08 KB, patch)
2006-11-09 14:35 EST, Noriko Hosoi
no flags Details | Diff
cvs diffs (source code containing LDAPDB_THREAD_SAFE) (3.80 KB, patch)
2006-11-09 14:42 EST, Noriko Hosoi
no flags Details | Diff
cvs diff (makefile containing LDAPDB_THREAD_SAFE) (538 bytes, patch)
2006-11-09 14:44 EST, Noriko Hosoi
no flags Details | Diff
cvs diffs (source code containing CLIENT_AUTH) (2.62 KB, patch)
2006-11-09 16:27 EST, Noriko Hosoi
no flags Details | Diff
cvs diff (makefile containing CLIENT_AUTH) (3.99 KB, patch)
2006-11-09 16:29 EST, Noriko Hosoi
no flags Details | Diff
cvs diffs (source code containing MCC_HTTPD) (3.79 KB, patch)
2006-11-09 16:50 EST, Noriko Hosoi
no flags Details | Diff
cvs diff (makefile containing MCC_HTTPD) (4.01 KB, patch)
2006-11-09 16:54 EST, Noriko Hosoi
no flags Details | Diff
cvs diffs (source code containing NS_DOMESTIC) (1.86 KB, patch)
2006-11-09 17:40 EST, Noriko Hosoi
no flags Details | Diff
cvs diffs (makefile containing NS_DOMESTIC) (4.00 KB, patch)
2006-11-09 17:41 EST, Noriko Hosoi
no flags Details | Diff
cvs diffs (source code containing CYRUS_SASL and BUILD_GSSAPI) (6.87 KB, patch)
2006-11-09 19:26 EST, Noriko Hosoi
no flags Details | Diff
cvs commit messages (26.59 KB, text/plain)
2006-11-09 20:56 EST, Noriko Hosoi
no flags Details

  None (edit)
Description Noriko Hosoi 2006-11-08 20:05:50 EST
Description of problem:
There are obsolete macros defined in Makefiles.
Comment 1 Noriko Hosoi 2006-11-08 20:05:50 EST
Created attachment 140734 [details]
email discussion
Comment 2 Noriko Hosoi 2006-11-08 20:12:50 EST
Created attachment 140735 [details]
cvs diffs

Files:
./include/nt/regparms.h
./ldap/clients/dsgw/dsgwutil.c
./ldap/servers/slapd/errormap.c
./ldap/servers/slapd/prerrstrs.h
./ldap/servers/slapd/secerrstrs.h
./ldap/servers/slapd/sslerrstrs.h
./lib/libsi18n/makstrdb.c

Changes:
1) eliminating a macro NS_DS
2) updating *errstrs.h (from NSS) based upon NSS_3_11_3_RTM.

Note: the following 2 files are not used in the server any more.
./include/nt/regparms.h
./ldap/clients/dsgw/dsgwutil.c
Comment 3 Noriko Hosoi 2006-11-08 20:35:43 EST
Created attachment 140736 [details]
cvs diffs (makefiles containing NS_DS)

Files:
./Makefile.am
./nsconfig.mk
./ldap/servers/slapd/ntwdog/Makefile
./ldap/servers/slapd/ntperfdll/Makefile
./ldap/cm/newinstnt/Makefile

Changes:
eliminating NS_DS
Comment 4 Noriko Hosoi 2006-11-08 21:11:26 EST
Created attachment 140738 [details]
cvs diffs (source code containing NET_SSL)

Files:
./httpd/src/ntnsapi.c
./ldap/admin/lib/dsalib_pw.c
./ldap/clients/dsgw/dsgw.h
./ldap/include/proto-ntutil.h
./ldap/libraries/libutil/ntstubs.c
./ldap/servers/plugins/pwdstorage/pwdstorage.h
./ldap/servers/plugins/pwdstorage/sha_pwd.c
./ldap/servers/plugins/pwdstorage/ssha_pwd.c
./ldap/servers/slapd/daemon.c
./ldap/servers/slapd/globals.c
./ldap/servers/slapd/libglobs.c
./ldap/servers/slapd/localhost.c
./ldap/servers/slapd/main.c
./ldap/servers/slapd/ntuserpin.c
./ldap/servers/slapd/plugin_internal_op.c
./ldap/servers/slapd/pw.c
./ldap/servers/slapd/result.c
./ldap/servers/slapd/slap.h
./ldap/servers/slapd/ssl.c
./lib/base/file.cpp

Changes:
eliminating NET_SSL macro
Comment 5 Noriko Hosoi 2006-11-08 21:13:41 EST
Created attachment 140739 [details]
cvs diffs (makefiles containing NET_SSL)

Files:
Makefile.am
ldap/nsldap.mk
nsconfig.mk

Changes:
eliminating NET_SSL from makefiles
Comment 6 Noriko Hosoi 2006-11-09 13:50:11 EST
Created attachment 140806 [details]
cvs diffs (source code containing UPGRADEDB)

Files:
./ldap/admin/src/create_instance.c
./ldap/servers/slapd/back-ldbm/dblayer.c
./ldap/servers/slapd/back-ldbm/import.c
./ldap/servers/slapd/back-ldbm/import.h
./ldap/servers/slapd/back-ldbm/import-threads.c
./ldap/servers/slapd/back-ldbm/init.c
./ldap/servers/slapd/back-ldbm/ldif2ldbm.c
./ldap/servers/slapd/back-ldbm/proto-back-ldbm.h
./ldap/servers/slapd/back-ldbm/upgrade.c
./ldap/servers/slapd/main.c
./ldap/servers/slapd/pblock.c
./ldap/servers/slapd/protect_db.c
./ldap/servers/slapd/protect_db.h
./ldap/servers/slapd/slap.h
./ldap/servers/slapd/slapi-private.h
./ldap/servers/slapd/task.c

Changes:
eliminating macro UPGRADEDB from the source codes.
Comment 7 Noriko Hosoi 2006-11-09 13:56:42 EST
Created attachment 140808 [details]
cvs diff (makefiles congaining UPGRADEDB)

File:
ldap/nsldap.mk

Changes:
eliminating macro UPGRADEDB from makefiles.
Comment 8 Noriko Hosoi 2006-11-09 14:32:30 EST
Created attachment 140812 [details]
cvs diffs (source code containing NSPR20)

Files:
./include/libaccess/usrcache.h
./ldap/servers/slapd/detach.c
./ldap/servers/slapd/slapi2nspr.c
./lib/ldaputil/ldapdb.c
./lib/base/systhr.cpp
./lib/libaccess/aclerror.cpp
./lib/libaccess/authdb.cpp
./lib/libaccess/utest/ustubs.cpp

Changes:
eliminating macro NSPR20 from source codes.
Comment 9 Noriko Hosoi 2006-11-09 14:35:20 EST
Created attachment 140814 [details]
cvs diffs (makefiles containing NSPR20)

Files:
please take a look at the diff file.

Changes:
eliminating macro NSPR20 from makefiles
Comment 10 Noriko Hosoi 2006-11-09 14:42:52 EST
Created attachment 140816 [details]
cvs diffs (source code containing LDAPDB_THREAD_SAFE)

Files:
./include/ldaputil/ldapdb.h
./lib/ldaputil/ldapdb.c

Changes:
eliminating macro LDAPDB_THREAD_SAFE from source codes.
Comment 11 Noriko Hosoi 2006-11-09 14:44:50 EST
Created attachment 140818 [details]
cvs diff (makefile containing LDAPDB_THREAD_SAFE)

File:
./lib/ldaputil/Makefile

Changes:
eliminating macro LDAPDB_THREAD_SAFE from makefiles
Comment 12 Noriko Hosoi 2006-11-09 16:27:48 EST
Created attachment 140836 [details]
cvs diffs (source code containing CLIENT_AUTH)

Files:
./include/libaccess/nsautherr.h
./include/libaccess/nsauth.h

Changes:
eliminating macro CLIENT_AUTH from source codes.
Comment 13 Noriko Hosoi 2006-11-09 16:29:13 EST
Created attachment 140837 [details]
cvs diff (makefile containing CLIENT_AUTH)

File:
./nsconfig.mk

Changes:
eliminating macro CLIENT_AUTH from nsconfig.mk.
Comment 14 Noriko Hosoi 2006-11-09 16:50:42 EST
Created attachment 140841 [details]
cvs diffs (source code containing MCC_HTTPD)

Files:
./include/base/systems.h
./ldap/clients/dsgw/Versiongw.c
./lib/base/system.cpp

Changes:
eliminating macro MCC_HTTPD from the source codes.
Comment 15 Noriko Hosoi 2006-11-09 16:54:11 EST
Created attachment 140843 [details]
cvs diff (makefile containing MCC_HTTPD)

File:
./nsconfig.mk

Changes:
eliminating macro MCC_HTTPD from makefiles
Comment 16 Noriko Hosoi 2006-11-09 17:40:20 EST
Created attachment 140850 [details]
cvs diffs (source code containing NS_DOMESTIC)

Files:
./ldap/servers/slapd/ssl.c

Changes:
eliminating NS_DOMESTIC from the source code.
Comment 17 Noriko Hosoi 2006-11-09 17:41:45 EST
Created attachment 140851 [details]
cvs diffs (makefile containing NS_DOMESTIC)

Files:
./nsconfig.mk

Changes:
eliminating NS_DOMESTIC from nsconfig.mk
Comment 18 Noriko Hosoi 2006-11-09 17:52:48 EST
SPAPI:
I searched the macro from the source root containing all the dependent
platforms, and only nsconfig.mk in ldapserver, adminutil, and setuputil passes
it for nothing.  So, I think it's safe to remove it.
$ find . -name "*.[ch]" | xargs egrep SPAPI20
$ find . -name "*.cpp" | xargs egrep SPAPI20
$ find . -name "*.cc" | xargs egrep SPAPI20
$ find . -name "*.C" | xargs egrep SPAPI20
$ find . -name "*.java" | xargs egrep SPAPI20
$ find . -name "*.properties" | xargs egrep SPAPI20
$ find . -name "*.xml" | xargs egrep SPAPI20
$ find . -name "*.html" | xargs egrep SPAPI20
$ find . -name "*.mk" | xargs egrep SPAPI20
./adminserver/nsconfig.mk:MCC_SERVER += -DSPAPI20 -DBUILD_NUM=$(GET_BUILD_NUM)
./ldapserver/nsconfig.mk:MCC_SERVER += -DSPAPI20 -DBUILD_NUM=$(GET_BUILD_NUM)
./setuputil/nsconfig.mk:MCC_SERVER += -DSPAPI20 -DBUILD_NUM=$(GET_BUILD_NUM)
Comment 19 Noriko Hosoi 2006-11-09 17:53:58 EST
(In reply to comment #18)
> SPAPI:
> I searched the macro from the source root containing all the dependent
> platforms, and only nsconfig.mk in ldapserver, adminutil, and setuputil passes
> it for nothing.  So, I think it's safe to remove it.

That is, we could remove it from adminutil and setuputil's nsconfig.mk, as well.
Comment 20 Noriko Hosoi 2006-11-09 18:00:47 EST
(In reply to comment #18)
> SPAPI:
> I searched the macro from the source root containing all the dependent
> platforms, 

Oops.  "s/platforms/components/"
Comment 21 Noriko Hosoi 2006-11-09 18:03:57 EST
SERVER_BUILD:
I searched the macro from the source root containing all the dependent
components, and only NSS secinit.c refers the macro.  And nsconfig.mk in
adminutil, adminserver, ldapserver, and setuputil as well as config/*.mk in
ldapsearch define the macro, which is not used in the build.  So, I think it's
safe to remove it from ldapserver, adminutil, adminserver, and setuputil.

$ find . -name "*.[ch]" | xargs egrep SERVER_BUILD
./mozilla/security/nss/lib/util/secinit.c:#if !defined(SERVER_BUILD)
$ find . -name "*.cpp" | xargs egrep SERVER_BUILD
$ find . -name "*.cc" | xargs egrep SERVER_BUILD
$ find . -name "*.C" | xargs egrep SERVER_BUILD
$ find . -name "*.xml" | xargs egrep SERVER_BUILD
$ find . -name "*.html" | xargs egrep SERVER_BUILD
$ find . -name "*.java" | xargs egrep SERVER_BUILD
$ find . -name "*.properties" | xargs egrep SERVER_BUILD
$ find . -name "Makefile" | xargs egrep SERVER_BUILD
$ find . -name "*.mk" | xargs egrep SERVER_BUILD
./adminutil/nsconfig.mk:NSDEFS=SERVER_BUILD=1 XCFLAGS=$(MCL_CFLAGS)
USE_PTHREADS=$(USE_PTHREADS) \
./adminutil/nsconfig.mk:NSPR_DEFINES = -DSERVER_BUILD
USE_PTHREADS=$(USE_PTHREADS) \
./adminserver/nsconfig.mk:NSDEFS=SERVER_BUILD=1 XCFLAGS=$(MCL_CFLAGS)
USE_PTHREADS=$(USE_PTHREADS) \
./adminserver/nsconfig.mk:NSPR_DEFINES = -DSERVER_BUILD
./ldapserver/config/Linux2.4.mk:ifdef SERVER_BUILD
./ldapserver/config/Linux2.6.mk:ifdef SERVER_BUILD
./ldapserver/config/WINNT5.0.mk:ifeq ($(SERVER_BUILD), 1)
./ldapserver/config/WINNT5.0.mk:OS_CFLAGS += -DSERVER_BUILD
./ldapserver/config/WINNT5.0.mk:OS_DEFS= SERVER_BUILD=$(SERVER_BUILD)
NSPR_VERSION=$(VERSION) NS_PRODUCT=$(NS_PRODUCT)
./ldapserver/config/SunOS5.mk:ifeq ($(SERVER_BUILD),1)
./ldapserver/config/HP-UX.mk:ifdef SERVER_BUILD
./ldapserver/config/config.mk:ifndef SERVER_BUILD
./ldapserver/config/config.mk:DEFINES += -DSERVER_BUILD
./ldapserver/nsconfig.mk:NSDEFS=SERVER_BUILD=1 XCFLAGS=$(MCL_CFLAGS)
USE_PTHREADS=$(USE_PTHREADS) \
./ldapserver/nsconfig.mk:NSPR_DEFINES = -DSERVER_BUILD
./setuputil/nsconfig.mk:NSDEFS=SERVER_BUILD=1 XCFLAGS=$(MCL_CFLAGS)
USE_PTHREADS=$(USE_PTHREADS) \
./setuputil/nsconfig.mk:NSPR_DEFINES = -DSERVER_BUILD
Comment 22 Nathan Kinder 2006-11-09 18:59:17 EST
The changes look good!  We should also remove CYRUS_SASL and BUILD_GSSAPI.  We
also need to remove these defines from Makefile.am and regenerate the build
files using autogen.sh.
Comment 23 Noriko Hosoi 2006-11-09 19:26:31 EST
Created attachment 140856 [details]
cvs diffs (source code containing CYRUS_SASL and BUILD_GSSAPI)

(In reply to comment #22)
> The changes look good!  We should also remove CYRUS_SASL and BUILD_GSSAPI. 
We
> also need to remove these defines from Makefile.am and regenerate the build
> files using autogen.sh.

Good point!  I'm cleaning them up, too.

Files:
./ldap/servers/slapd/saslbind.c 
./ldap/servers/slapd/sasl_io.c

Changes:
eliminating macro CYRUS_SASL and BUILD_GSSAPI from the source codes.
Comment 24 Noriko Hosoi 2006-11-09 19:38:34 EST
(In reply to comment #22)
> The changes look good!  We should also remove CYRUS_SASL and BUILD_GSSAPI.  We
> also need to remove these defines from Makefile.am and regenerate the build
> files using autogen.sh.

Right...  This is the diff for the Makefile.am...
Index: Makefile.am
===================================================================
RCS file: /cvs/dirsec/ldapserver/Makefile.am,v
retrieving revision 1.10
diff -t -w -U4 -r1.10 Makefile.am
--- Makefile.am 3 Nov 2006 22:33:15 -0000       1.10
+++ Makefile.am 10 Nov 2006 00:29:49 -0000
@@ -6,12 +6,9 @@
 #------------------------
 BUILDNUM := $(shell perl $(srcdir)/buildnum.pl)
 PLATFORM_DEFINES = @platform_defs@
 DEBUG_DEFINES = @debug_defs@
-DS_DEFINES = -DNS_DS -DNET_SSL -DLDAP_DEBUG -DLDAP_DONT_USE_SMARTHEAP \
-        -DUPGRADEDB -DNSPR20 -DLDAPDB_THREAD_SAFE -DCLIENT_AUTH \
-        -DMCC_HTTPD -DNS_DOMESTIC -DSPAPI20 -DSERVER_BUILD \
-        -DBUILD_NUM=$(BUILDNUM)
+DS_DEFINES = -DLDAP_DEBUG -DLDAP_DONT_USE_SMARTHEAP -DBUILD_NUM=$(BUILDNUM)
 DS_INCLUDES = -I$(srcdir)/ldap/include -I$(srcdir)/ldap/servers/slapd
-I$(srcdir)/include -I.
 AM_CPPFLAGS = $(PLATFORM_DEFINES) $(DEBUG_DEFINES) $(DS_DEFINES) $(DS_INCLUDES)
PLUGIN_CPPFLAGS = $(AM_CPPFLAGS) @ldapsdk_inc@ @nss_inc@ @nspr_inc@

And Makefile.in generated by autogen.sh is going to be checked in, as well.
Comment 25 Nathan Kinder 2006-11-09 19:42:08 EST
The new changes look good!
Comment 26 Noriko Hosoi 2006-11-09 20:56:55 EST
Created attachment 140858 [details]
cvs commit messages

Reviewed by Nathan.  (Thank you soooooo much!)

Checked in into HEAD.
Comment 27 Noriko Hosoi 2007-11-29 17:32:44 EST
Checked source tree:
$ pwd
/share/dev4/ds/ds80/builds/20071129.1/earthquake_rhel4/ldapserver

$ find . -name "*.[ch]" | xargs egrep "\<NS_DS\>" 
$ find . -name "*.[ch]" | xargs egrep "\<NET_SSL\>"
./ldap/servers/slapd/daemon.c:  /* Previously there was a ton of code #defined
on NET_SSL.
./ldap/servers/slapd/tools/ldaptool.h:#if defined(NET_SSL)
./ldap/servers/slapd/tools/ldaptool.h:#if defined(NET_SSL)
$ find . -name "*.[ch]" | xargs egrep "\<UPGRADEDB\>"
$ find . -name "*.[ch]" | xargs egrep "\<NSPR20\>"
./ldap/servers/slapd/slapi2nspr.c: * slapi2nspr.c - expose a subset of the
NSPR20/21 API to SLAPI plugin writers
$ find . -name "*.[ch]" | xargs egrep "\<LDAPDB_THREAD_SAFE\>"
$ find . -name "*.[ch]" | xargs egrep "\<CLIENT_AUTH\>"
$ find . -name "*.[ch]" | xargs egrep "\<MCC_HTTPD\>"
$ find . -name "*.[ch]" | xargs egrep "\<NS_DOMESTIC\>"
$ find . -name "*.[ch]" | xargs egrep "\<SPAPI20\>"
$ find . -name "*.[ch]" | xargs egrep "\<CYRUS_SASL\>"
$ find . -name "*.[ch]" | xargs egrep "\<BUILD_GSSAPI\>"

tools/libtool.h is only used by ldclt.  We'd better clean it up, but it's harmless.

Verified.

Note You need to log in before you can comment on or make changes to this bug.