From bc0955ad3c26524eef366a9e66a889d38a05b12f Mon Sep 17 00:00:00 2001 From: jbj Date: Sun, 26 Sep 1999 17:28:00 +0000 Subject: [PATCH] Solaris compilation. CVS patchset: 3332 CVS date: 1999/09/26 17:28:00 --- Makefile.am | 12 +++++++----- build/Makefile.am | 3 ++- lib/Makefile.am | 3 ++- lib/rpmmalloc.c | 2 ++ misc/err.c | 1 + misc/err.h | 2 -- python/Makefile.in | 2 +- rpmio/rpmmalloc.c | 2 ++ scripts/Makefile.in | 2 +- system.h | 5 +++-- tools/Makefile.am | 17 +++++++++-------- tools/rpminject.c | 2 ++ 12 files changed, 32 insertions(+), 21 deletions(-) diff --git a/Makefile.am b/Makefile.am index 4817cb7..a2024fa 100644 --- a/Makefile.am +++ b/Makefile.am @@ -17,11 +17,13 @@ INCLUDES = \ -I$(top_srcdir)/build \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/popt \ - @INCPATH@ + @INCPATH@ \ + -I$(top_srcdir)/misc mylibs= $(top_builddir)/build/librpmbuild.la \ $(top_builddir)/lib/librpm.la \ - $(top_builddir)/popt/libpopt.la + $(top_builddir)/popt/libpopt.la \ + @LIBMISC@ LDFLAGS = @LDFLAGS_STATIC@ @@ -42,9 +44,9 @@ noinst_HEADERS = \ acconfig.h build.h system.h rpm_SOURCES = build.c rpm.c -rpm_LDADD = $(mylibs) @LIBMISC@ +rpm_LDADD = $(mylibs) -$(PROGRAMS): $(mylibs) @LIBMISC@ +$(PROGRAMS): $(mylibs) .PHONY: lclint lclint: @@ -57,7 +59,7 @@ rpm2cpio_LDADD = $(mylibs) rpmconvert_SOURCES = convertdb.c oldrpmdb.c ## Libmisc.a is required for rpmconvert. -rpmconvert_LDADD = $(mylibs) @LIBMISC@ -lgdbm +rpmconvert_LDADD = $(mylibs) -lgdbm install-data-local: @$(mkinstalldirs) $(DESTDIR)$(varprefix)/lib/rpm diff --git a/build/Makefile.am b/build/Makefile.am index 9efe29c..4bdf48e 100644 --- a/build/Makefile.am +++ b/build/Makefile.am @@ -6,7 +6,8 @@ INCLUDES = \ -I$(top_srcdir) \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/popt \ - @INCPATH@ + @INCPATH@ \ + -I$(top_srcdir)/misc pkgincdir = $(pkgincludedir) pkginc_HEADERS = rpmbuild.h rpmspec.h diff --git a/lib/Makefile.am b/lib/Makefile.am index fd61040..e20f122 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -6,7 +6,8 @@ INCLUDES = \ -I$(top_srcdir) \ -I$(top_srcdir)/build \ -I$(top_srcdir)/popt \ - @INCPATH@ + @INCPATH@ \ + -I$(top_srcdir)/misc pkgincdir = $(pkgincludedir) pkginc_HEADERS = \ diff --git a/lib/rpmmalloc.c b/lib/rpmmalloc.c index 7ba9d67..a22922c 100644 --- a/lib/rpmmalloc.c +++ b/lib/rpmmalloc.c @@ -1,5 +1,7 @@ #include "system.h" +#include /* XXX !HAVE_ERR_H: get from misc */ + void *vmefail(void) { err(EXIT_FAILURE, "virtual memory exhausted"); diff --git a/misc/err.c b/misc/err.c index 8035838..e5f181a 100644 --- a/misc/err.c +++ b/misc/err.c @@ -31,6 +31,7 @@ #define __ptr_t void * #endif +#include #include #define VA(call) \ diff --git a/misc/err.h b/misc/err.h index 6170006..993192e 100644 --- a/misc/err.h +++ b/misc/err.h @@ -20,8 +20,6 @@ #ifndef _ERR_H #define _ERR_H 1 -#include - #define __need___va_list #include #ifndef __GNUC_VA_LIST diff --git a/python/Makefile.in b/python/Makefile.in index 534c9a5..35ffdf9 100644 --- a/python/Makefile.in +++ b/python/Makefile.in @@ -189,7 +189,7 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best DEP_FILES = .deps/hash.P .deps/rpmmodule.P .deps/upgrade.P SOURCES = $(librpmmodule_la_SOURCES) $(rpmmodule_so_SOURCES) diff --git a/rpmio/rpmmalloc.c b/rpmio/rpmmalloc.c index 7ba9d67..a22922c 100644 --- a/rpmio/rpmmalloc.c +++ b/rpmio/rpmmalloc.c @@ -1,5 +1,7 @@ #include "system.h" +#include /* XXX !HAVE_ERR_H: get from misc */ + void *vmefail(void) { err(EXIT_FAILURE, "virtual memory exhausted"); diff --git a/scripts/Makefile.in b/scripts/Makefile.in index 9fca2b0..014f025 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -164,7 +164,7 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: diff --git a/system.h b/system.h index 39b7eca..1aa03ab 100644 --- a/system.h +++ b/system.h @@ -212,15 +212,16 @@ void *vmefail(void); #endif /* HAVE_MCHECK_H && defined(__GNUC__) */ /* Retrofit glibc __progname */ -char *__progname; #if defined __GLIBC__ && __GLIBC__ >= 2 #define setprogname(pn) #else +#define __progname program_name #define setprogname(pn) \ - { if ((__progname = strrchr(pn, '/')) __progname++; \ + { if ((__progname = strrchr(pn, '/')) != NULL) __progname++; \ else __progname = pn; \ } #endif +char *__progname; #if HAVE_NETDB_H #ifndef __LCLINT__ diff --git a/tools/Makefile.am b/tools/Makefile.am index 472bdfe..6ed5b29 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -6,33 +6,34 @@ INCLUDES = \ -I$(top_srcdir) \ -I$(top_srcdir)/build \ -I$(top_srcdir)/lib \ - -I$(top_srcdir)/misc \ -I$(top_srcdir)/popt \ - @INCPATH@ + @INCPATH@ \ + -I$(top_srcdir)/misc EXTRA_DIST = fstrcmp.c message.c str-list.c rpmchecksig.c mylibs= $(top_builddir)/build/.libs/librpmbuild.a \ $(top_builddir)/lib/.libs/librpm.a \ - $(top_builddir)/popt/.libs/libpopt.a + $(top_builddir)/popt/.libs/libpopt.a \ + @LIBMISC@ -LDADD = $(top_builddir)/lib/.libs/librpm.a +LDADD = $(top_builddir)/lib/.libs/librpm.a @LIBMISC@ noinst_PROGRAMS = \ dump dumpdb javadeps rpmarchive rpmheader rpminject rpmlead rpmsignature -rpminject_LDADD = $(mylibs) @LIBMISC@ +rpminject_LDADD = $(mylibs) pkgbindir = @RPMCONFIGDIR@ pkgbin_PROGRAMS = rpmgettext rpmputtext rpmgettext_SOURCES = rpmgettext.c -rpmgettext_LDADD = $(mylibs) @LIBMISC@ +rpmgettext_LDADD = $(mylibs) rpmputtext_SOURCES = rpmgettext.c -rpmputtext_LDADD = $(mylibs) @LIBMISC@ +rpmputtext_LDADD = $(mylibs) ## Dumpdb requires fprint.o (in libmisc) and this requires realpath ## (from libmisc). -dumpdb_LDADD = $(mylibs) @LIBMISC@ +dumpdb_LDADD = $(mylibs) $(PROGRAMS): $(mylibs) diff --git a/tools/rpminject.c b/tools/rpminject.c index 67bec53..2389a5b 100644 --- a/tools/rpminject.c +++ b/tools/rpminject.c @@ -7,6 +7,8 @@ #include "signature.h" #include "header.h" +#include /* XXX !HAVE_ERR_H: get from misc */ + typedef enum injmode_e { INJ_UNKNOWN, INJ_ADD, INJ_DELETE, INJ_MODIFY } injmode_t; injmode_t injmode = INJ_UNKNOWN; -- 2.7.4