From 98809e86ce58e163a3939db820a4b983e6176ae4 Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Wed, 20 Jun 2012 19:31:14 -0500 Subject: [PATCH] Move base into lib This involves reverting dd267e8fc3378b2021d30d643f8cde9f16a259f1, but that gets lost in the move. This builds on Ubuntu and Windows at this time. --- Makefile.am | 2 +- NTMakefile | 2 +- cf/Makefile.am.common | 2 +- configure.ac | 2 +- lib/Makefile.am | 3 ++- lib/NTMakefile | 2 +- {base => lib/base}/Makefile.am | 2 +- {base => lib/base}/NTMakefile | 4 ++-- {base => lib/base}/array.c | 0 {base => lib/base}/baselocl.h | 2 ++ {base => lib/base}/bool.c | 0 {base => lib/base}/bsearch.c | 0 {base => lib/base}/data.c | 0 {base => lib/base}/db.c | 7 +++---- {base => lib/base}/dict.c | 0 {base => lib/base}/error.c | 0 {base => lib/base}/heimbase.c | 0 {base => lib/base}/heimbase.h | 0 {base => lib/base}/heimbasepriv.h | 0 {base => lib/base}/heimqueue.h | 0 {base => lib/base}/json.c | 0 {base => lib/base}/null.c | 0 {base => lib/base}/number.c | 0 {base => lib/base}/roken_rename.h | 0 {base => lib/base}/string.c | 0 {base => lib/base}/test_base.c | 0 {base => lib/base}/version-script.map | 0 lib/hx509/Makefile.am | 2 +- lib/krb5/Makefile.am | 2 +- lib/roken/NTMakefile | 7 +++---- lib/roken/roken.h.in | 2 ++ 31 files changed, 22 insertions(+), 19 deletions(-) rename {base => lib/base}/Makefile.am (95%) rename {base => lib/base}/NTMakefile (97%) rename {base => lib/base}/array.c (100%) rename {base => lib/base}/baselocl.h (99%) rename {base => lib/base}/bool.c (100%) rename {base => lib/base}/bsearch.c (100%) rename {base => lib/base}/data.c (100%) rename {base => lib/base}/db.c (99%) rename {base => lib/base}/dict.c (100%) rename {base => lib/base}/error.c (100%) rename {base => lib/base}/heimbase.c (100%) rename {base => lib/base}/heimbase.h (100%) rename {base => lib/base}/heimbasepriv.h (100%) rename {base => lib/base}/heimqueue.h (100%) rename {base => lib/base}/json.c (100%) rename {base => lib/base}/null.c (100%) rename {base => lib/base}/number.c (100%) rename {base => lib/base}/roken_rename.h (100%) rename {base => lib/base}/string.c (100%) rename {base => lib/base}/test_base.c (100%) rename {base => lib/base}/version-script.map (100%) diff --git a/Makefile.am b/Makefile.am index 8d875cb9b..447670123 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,7 +6,7 @@ if KCM kcm_dir = kcm endif -SUBDIRS= include lib/roken base lib kuser kdc admin kadmin kpasswd +SUBDIRS= include lib kuser kdc admin kadmin kpasswd SUBDIRS+= $(kcm_dir) appl tools tests packages etc po if HEIMDAL_DOCUMENTATION diff --git a/NTMakefile b/NTMakefile index fcd60a3d3..00c5a54f0 100644 --- a/NTMakefile +++ b/NTMakefile @@ -33,7 +33,7 @@ thirdparty=thirdparty !endif -SUBDIRS = include lib\roken base lib kuser kdc admin kadmin kpasswd appl doc \ +SUBDIRS = include lib kuser kdc admin kadmin kpasswd appl doc \ tools tests packages etc $(thirdparty) packages\windows\installer !include windows/NTMakefile.w32 diff --git a/cf/Makefile.am.common b/cf/Makefile.am.common index cb1f55da7..f69b86f8e 100644 --- a/cf/Makefile.am.common +++ b/cf/Makefile.am.common @@ -244,7 +244,7 @@ LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la endif -LIB_heimbase = $(top_builddir)/base/libheimbase.la +LIB_heimbase = $(top_builddir)/lib/base/libheimbase.la if DCE LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la diff --git a/configure.ac b/configure.ac index b82af4fa6..f88da7822 100644 --- a/configure.ac +++ b/configure.ac @@ -609,7 +609,7 @@ AC_CONFIG_FILES(Makefile \ include/hcrypto/Makefile \ include/kadm5/Makefile \ lib/Makefile \ - base/Makefile \ + lib/base/Makefile \ lib/asn1/Makefile \ lib/com_err/Makefile \ lib/hcrypto/Makefile \ diff --git a/lib/Makefile.am b/lib/Makefile.am index bed19304a..dc65d96e8 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -23,6 +23,7 @@ endif SUBDIRS = \ roken \ + base \ vers \ $(dir_editline) \ $(dir_com_err) \ @@ -42,4 +43,4 @@ SUBDIRS = \ $(dir_otp) \ $(dir_dce) -EXTRA_DIST = NTMakefile heimdal \ No newline at end of file +EXTRA_DIST = NTMakefile heimdal diff --git a/lib/NTMakefile b/lib/NTMakefile index 8530ab9a1..da43aa2a0 100644 --- a/lib/NTMakefile +++ b/lib/NTMakefile @@ -40,7 +40,7 @@ dir_dce = kdfs dir_hcrypto = hcrypto !endif -SUBDIRS = vers com_err sl wind asn1 sqlite \ +SUBDIRS = roken base vers com_err sl wind asn1 sqlite \ $(dir_hcrypto) hx509 krb5 heimdal ntlm kafs gssapi hdb \ kadm5 $(dir_45) $(dir_otp) $(dir_dce) ..\packages\windows\assembly diff --git a/base/Makefile.am b/lib/base/Makefile.am similarity index 95% rename from base/Makefile.am rename to lib/base/Makefile.am index 105a03608..229838132 100644 --- a/base/Makefile.am +++ b/lib/base/Makefile.am @@ -52,4 +52,4 @@ EXTRA_DIST = NTMakefile version-script.map base64.c: $(RM) base64.c - $(LN_S) $(srcdir)/../lib/roken/base64.c . + $(LN_S) $(srcdir)/../roken/base64.c . diff --git a/base/NTMakefile b/lib/base/NTMakefile similarity index 97% rename from base/NTMakefile rename to lib/base/NTMakefile index 87abf3b93..541309810 100644 --- a/base/NTMakefile +++ b/lib/base/NTMakefile @@ -29,11 +29,11 @@ # POSSIBILITY OF SUCH DAMAGE. # -RELDIR=base +RELDIR=lib\base intcflags=-I$(SRCDIR) -I$(OBJ) -!include ../windows/NTMakefile.w32 +!include ../../windows/NTMakefile.w32 INCFILES=$(INCDIR)\heimbase.h diff --git a/base/array.c b/lib/base/array.c similarity index 100% rename from base/array.c rename to lib/base/array.c diff --git a/base/baselocl.h b/lib/base/baselocl.h similarity index 99% rename from base/baselocl.h rename to lib/base/baselocl.h index c7b10bfa8..ce9b37d28 100644 --- a/base/baselocl.h +++ b/lib/base/baselocl.h @@ -60,6 +60,8 @@ #define bindtextdomain(package, localedir) #endif +#include + #include "heimqueue.h" #include "heim_threads.h" #include "heimbase.h" diff --git a/base/bool.c b/lib/base/bool.c similarity index 100% rename from base/bool.c rename to lib/base/bool.c diff --git a/base/bsearch.c b/lib/base/bsearch.c similarity index 100% rename from base/bsearch.c rename to lib/base/bsearch.c diff --git a/base/data.c b/lib/base/data.c similarity index 100% rename from base/data.c rename to lib/base/data.c diff --git a/base/db.c b/lib/base/db.c similarity index 99% rename from base/db.c rename to lib/base/db.c index ae7244c5d..3ce577dfe 100644 --- a/base/db.c +++ b/lib/base/db.c @@ -53,11 +53,10 @@ #include #include #include -#ifndef WIN32 -#include -#endif -#ifdef HAVE_IO_H +#ifdef WIN32 #include +#else +#include #endif #ifdef HAVE_UNISTD_H #include diff --git a/base/dict.c b/lib/base/dict.c similarity index 100% rename from base/dict.c rename to lib/base/dict.c diff --git a/base/error.c b/lib/base/error.c similarity index 100% rename from base/error.c rename to lib/base/error.c diff --git a/base/heimbase.c b/lib/base/heimbase.c similarity index 100% rename from base/heimbase.c rename to lib/base/heimbase.c diff --git a/base/heimbase.h b/lib/base/heimbase.h similarity index 100% rename from base/heimbase.h rename to lib/base/heimbase.h diff --git a/base/heimbasepriv.h b/lib/base/heimbasepriv.h similarity index 100% rename from base/heimbasepriv.h rename to lib/base/heimbasepriv.h diff --git a/base/heimqueue.h b/lib/base/heimqueue.h similarity index 100% rename from base/heimqueue.h rename to lib/base/heimqueue.h diff --git a/base/json.c b/lib/base/json.c similarity index 100% rename from base/json.c rename to lib/base/json.c diff --git a/base/null.c b/lib/base/null.c similarity index 100% rename from base/null.c rename to lib/base/null.c diff --git a/base/number.c b/lib/base/number.c similarity index 100% rename from base/number.c rename to lib/base/number.c diff --git a/base/roken_rename.h b/lib/base/roken_rename.h similarity index 100% rename from base/roken_rename.h rename to lib/base/roken_rename.h diff --git a/base/string.c b/lib/base/string.c similarity index 100% rename from base/string.c rename to lib/base/string.c diff --git a/base/test_base.c b/lib/base/test_base.c similarity index 100% rename from base/test_base.c rename to lib/base/test_base.c diff --git a/base/version-script.map b/lib/base/version-script.map similarity index 100% rename from base/version-script.map rename to lib/base/version-script.map diff --git a/lib/hx509/Makefile.am b/lib/hx509/Makefile.am index 34687c709..a113deb34 100644 --- a/lib/hx509/Makefile.am +++ b/lib/hx509/Makefile.am @@ -96,7 +96,7 @@ libhx509_la_LIBADD = \ $(LIB_hcrypto) \ $(top_builddir)/lib/asn1/libasn1.la \ $(top_builddir)/lib/wind/libwind.la \ - $(top_builddir)/base/libheimbase.la \ + $(top_builddir)/lib/base/libheimbase.la \ $(LIBADD_roken) \ $(LIB_dlopen) diff --git a/lib/krb5/Makefile.am b/lib/krb5/Makefile.am index 727d05f1d..795e4db9c 100644 --- a/lib/krb5/Makefile.am +++ b/lib/krb5/Makefile.am @@ -67,7 +67,7 @@ libkrb5_la_LIBADD = \ $(top_builddir)/lib/asn1/libasn1.la \ $(top_builddir)/lib/ipc/libheim-ipcc.la \ $(top_builddir)/lib/wind/libwind.la \ - $(top_builddir)/base/libheimbase.la \ + $(top_builddir)/lib/base/libheimbase.la \ $(LIB_pkinit) \ $(use_sqlite) \ $(LIB_com_err) \ diff --git a/lib/roken/NTMakefile b/lib/roken/NTMakefile index 90162b5af..c69f15765 100644 --- a/lib/roken/NTMakefile +++ b/lib/roken/NTMakefile @@ -163,12 +163,11 @@ INCFILES = \ $(INCDIR)\stdbool.h \ $(INCDIR)\syslog.h \ $(INCDIR)\vis.h \ +!ifndef HAVE_STDINT_H + $(INCDIR)\stdint.h \ +!endif $(INCDIR)\xdbm.h -#!ifndef HAVE_STDINT_H -#INCFILES += $(INCDIR)\stdint.h -#!endif - clean:: -$(RM) $(XHEADERS) diff --git a/lib/roken/roken.h.in b/lib/roken/roken.h.in index d46af44de..db4433a7e 100644 --- a/lib/roken/roken.h.in +++ b/lib/roken/roken.h.in @@ -104,7 +104,9 @@ typedef int rk_socket_t; #endif #ifdef _MSC_VER +#ifndef HAVE_STDINT_H #include +#endif /* Declarations for Microsoft Visual C runtime on Windows */