From c2ace2da95fdd6719f2b9217848a25244b845454 Mon Sep 17 00:00:00 2001 From: jbj Date: Sat, 3 Apr 1999 17:13:35 +0000 Subject: [PATCH] Portability fiddles (Tim Mooney). CVS patchset: 2940 CVS date: 1999/04/03 17:13:35 --- Makefile.am | 5 ++++- configure.in | 20 ++++++++++++++++++++ lib/rpmio.h | 2 +- lib/rpmlib.h | 5 +++++ lib/transaction.c | 3 ++- po/rpm.pot | 2 +- scripts/Makefile.in | 1 + 7 files changed, 34 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index be421ec81..fc7ee9e14 100644 --- a/Makefile.am +++ b/Makefile.am @@ -7,6 +7,8 @@ EXTRA_DIST = CHANGES CREDITS GROUPS README.amiga INSTALL RPM-PGP-KEY \ docs/[a-z]* gendiff $(man_MANS) po/*.in po/*.po po/rpm.pot \ rpm.magic rpmpopt rpm.spec rpm.8ru rpm2cpio.8ru +EXTRA_PROGRAMS = rpmconvert + SUBDIRS = popt build lib po intl misc tools scripts tests . INCLUDES = -I$(top_srcdir)/build -I$(top_srcdir)/lib -I$(top_srcdir)/intl @INCPATH@ @@ -22,7 +24,8 @@ rpmbin_PROGRAMS = rpm bin_PROGRAMS = rpm2cpio bin_SCRIPTS = gendiff -noinst_PROGRAMS = rpmconvert + +noinst_PROGRAMS = @BUILD_RPM_CONVERT@ man_MANS = rpm.8 rpm2cpio.8 # rpm.8ru rpm2cpio.8ru diff --git a/configure.in b/configure.in index 142c6f2df..92d54dbc6 100644 --- a/configure.in +++ b/configure.in @@ -344,6 +344,13 @@ dnl ==> AM_GNU_GETTEXT does this (and more) dnl AC_CHECK_HEADERS(unistd.h limits.h locale.h malloc.h string.h sys/param.h) AM_GNU_GETTEXT +dnl TVM: +dnl horrible *temporary* hack to make sure that if we found gettext() in +dnl -lintl that we add -lintl *back* to $LIBS. +dnl +if test X$gt_cv_func_gettext_libintl = Xyes ; then + LIBS="-lintl $LIBS" +fi dnl Checks for header files we can live without. AC_HEADER_STDC @@ -364,6 +371,19 @@ AC_CHECK_HEADERS(mntent.h sys/mnttab.h sys/systemcfg.h) AC_CHECK_HEADERS(sys/mount.h sys/mntctl.h sys/vmount.h) AC_CHECK_HEADERS(bzlib.h libio.h zlib.h) +dnl whether or not we should try build convertdb +BUILD_RPM_CONVERT=yes +AC_CHECK_HEADERS(gdbm.h,BUILD_RPM_CONVERT=yes,BUILD_RPM_CONVERT=no) +AC_MSG_CHECKING(if convertdb should be built) +if test X"$BUILD_RPM_CONVERT" = X"yes"; then + BUILD_RPM_CONVERT=rpmconvert + AC_MSG_RESULT(yes) +else + BUILD_RPM_CONVERT= + AC_MSG_RESULT(no) +fi +AC_SUBST(BUILD_RPM_CONVERT) + dnl DU 4.0 fiddles. AC_CHECK_HEADERS(glob.h) AC_MSG_CHECKING(for struct statfs) diff --git a/lib/rpmio.h b/lib/rpmio.h index afa52def7..1f8cf8fee 100644 --- a/lib/rpmio.h +++ b/lib/rpmio.h @@ -13,7 +13,7 @@ typedef /*@abstract@*/ struct _FD { void * fd_url; } *FD_t; -#endif H_RPMIO +#endif /* H_RPMIO */ #ifndef H_RPMIO_F #define H_RPMIO_F diff --git a/lib/rpmlib.h b/lib/rpmlib.h index c6761e16f..30f4d31d8 100644 --- a/lib/rpmlib.h +++ b/lib/rpmlib.h @@ -476,7 +476,12 @@ struct oldrpmlead { /* for version 1 packages */ typedef void (*rpmErrorCallBackType)(void); +#if defined(__GNUC__) void rpmError(int code, char * format, ...) __attribute__ ((__format__ (__printf__, 2, 3))); +#else +void rpmError(int code, char * format, ...); +#endif + int rpmErrorCode(void); char *rpmErrorCodeString(void); char *rpmErrorString(void); diff --git a/lib/transaction.c b/lib/transaction.c index 78eed9998..111a97286 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -13,7 +13,7 @@ #include "rpmdb.h" /* XXX FIXME: merge with existing (broken?) tests in system.h */ -/* DU 4.0 fiddles */ +/* portability fiddles */ #if STATFS_IN_SYS_VFS # include #else @@ -1178,6 +1178,7 @@ void handleOverlappedFiles(struct fileInfo * fi, hashTable ht, break; default: + break; } ds->needed -= BLOCK_ROUND(fixupSize, ds->block); diff --git a/po/rpm.pot b/po/rpm.pot index ed9ffa392..69cae140b 100644 --- a/po/rpm.pot +++ b/po/rpm.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 1999-04-02 23:54-0500\n" +"POT-Creation-Date: 1999-04-03 11:41-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/scripts/Makefile.in b/scripts/Makefile.in index 5c42c3392..fdc8bfb86 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -69,6 +69,7 @@ target_triplet = @target@ AR = @AR@ AS = @AS@ AWK = @AWK@ +BUILD_RPM_CONVERT = @BUILD_RPM_CONVERT@ BZIP2BIN = @BZIP2BIN@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@