From 682c9534adb618becfa7565a4f45eea5e8f2bb2a Mon Sep 17 00:00:00 2001 From: jbj Date: Sat, 4 Aug 2001 16:18:58 +0000 Subject: [PATCH] - fix: autoconf glob tests (#50845). CVS patchset: 5003 CVS date: 2001/08/04 16:18:58 --- CHANGES | 1 + aclocal.m4 | 18 +++++++++--------- autogen.sh | 4 ++-- configure.in | 15 ++++++--------- lib/header.c | 23 ++++++++++++++++++++--- python/Makefile.in | 4 ++-- 6 files changed, 40 insertions(+), 25 deletions(-) diff --git a/CHANGES b/CHANGES index 39d512b..76b4266 100644 --- a/CHANGES +++ b/CHANGES @@ -202,6 +202,7 @@ - detailed build package error messages. - fix: i18n tags not terminated correctly with NUL (#50304). - add explicit casts to work around a s390 compiler problem. + - fix: autoconf glob tests (#50845). 4.0 -> 4.0.[12] - add doxygen and lclint annotations most everywhere. diff --git a/aclocal.m4 b/aclocal.m4 index c9a563a..7e3984c 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,6 +1,6 @@ -dnl aclocal.m4 generated automatically by aclocal 1.4-p4 +dnl aclocal.m4 generated automatically by aclocal 1.4-p5 -dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -19,7 +19,7 @@ dnl PARTICULAR PURPOSE. dnl Usage: dnl AM_INIT_AUTOMAKE(package,version, [no-define]) -AC_DEFUN(AM_INIT_AUTOMAKE, +AC_DEFUN([AM_INIT_AUTOMAKE], [AC_REQUIRE([AC_PROG_INSTALL]) PACKAGE=[$1] AC_SUBST(PACKAGE) @@ -47,7 +47,7 @@ AC_REQUIRE([AC_PROG_MAKE_SET])]) # Check to make sure that the build environment is sane. # -AC_DEFUN(AM_SANITY_CHECK, +AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 @@ -88,7 +88,7 @@ AC_MSG_RESULT(yes)]) dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) dnl The program must properly implement --version. -AC_DEFUN(AM_MISSING_PROG, +AC_DEFUN([AM_MISSING_PROG], [AC_MSG_CHECKING(for working $2) # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. @@ -104,7 +104,7 @@ AC_SUBST($1)]) # Like AC_CONFIG_HEADER, but automatically create stamp file. -AC_DEFUN(AM_CONFIG_HEADER, +AC_DEFUN([AM_CONFIG_HEADER], [AC_PREREQ([2.12]) AC_CONFIG_HEADER([$1]) dnl When config.status generates a header, we must update the stamp-h file. @@ -146,7 +146,7 @@ AC_DEFUN([AC_ISC_POSIX], # serial 1 -AC_DEFUN(AM_C_PROTOTYPES, +AC_DEFUN([AM_C_PROTOTYPES], [AC_REQUIRE([AM_PROG_CC_STDC]) AC_REQUIRE([AC_PROG_CPP]) AC_MSG_CHECKING([for function prototypes]) @@ -183,7 +183,7 @@ AC_SUBST(ANSI2KNR)dnl # program @code{ansi2knr}, which comes with Ghostscript. # @end defmac -AC_DEFUN(AM_PROG_CC_STDC, +AC_DEFUN([AM_PROG_CC_STDC], [AC_REQUIRE([AC_PROG_CC]) AC_BEFORE([$0], [AC_C_INLINE]) AC_BEFORE([$0], [AC_C_CONST]) @@ -3580,7 +3580,7 @@ ifelse([AC_DISABLE_FAST_INSTALL]) dnl From Jim Meyering. Use this if you use the GNU error.[ch]. dnl FIXME: Migrate into libit -AC_DEFUN(AM_FUNC_ERROR_AT_LINE, +AC_DEFUN([AM_FUNC_ERROR_AT_LINE], [AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line, [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");], am_cv_lib_error_at_line=yes, diff --git a/autogen.sh b/autogen.sh index e635515..cf68382 100755 --- a/autogen.sh +++ b/autogen.sh @@ -5,12 +5,12 @@ export LDFLAGS LTV="libtoolize (GNU libtool) 1.4" ACV="Autoconf version 2.13" -AMV="automake (GNU automake) 1.4-p4" +AMV="automake (GNU automake) 1.4-p5" USAGE=" This script documents the versions of the tools I'm using to build rpm: libtool-1.4 autoconf-2.13 - automake-1.4-p4 + automake-1.4-p5 Simply edit this script to change the libtool/autoconf/automake versions checked if you need to, as rpm should build (and has built) with all recent versions of libtool/autoconf/automake. diff --git a/configure.in b/configure.in index ffa1a0d..326e57d 100644 --- a/configure.in +++ b/configure.in @@ -21,6 +21,8 @@ LIBOBJS= dnl Checks for programs. AC_PROG_CC +AC_AIX +AC_MINIX AC_PROG_CXX AS=${AS-as} AC_SUBST(AS) @@ -143,8 +145,6 @@ dnl AC_DEFINE_UNQUOTED(MKDIR_P, "${MKDIR_P}") AC_SUBST(MKDIR_P) -AC_AIX -AC_MINIX AC_ISC_POSIX dnl This test must precede tests of compiler characteristics like @@ -736,8 +736,7 @@ AC_ARG_WITH(glob, [ --with-glob use the internal GNU glob ], [AC_CHECK_FUNCS(glob, rpm_cv_glob=no, rpm_cv_glob=yes)]) if test $rpm_cv_glob = no ; then - AC_MSG_CHECKING(for GNU extensions to glob) -if test "${rpm_cv_glob_ext+set}" = set; then + AC_CACHE_CHECK([for GNU extensions to glob], rpm_cv_glob_ext, [ rm -f t mkdir t mkdir t/p @@ -753,19 +752,17 @@ main() { } ], rpm_cv_glob_ext=yes, rpm_cv_glob_ext=no, rpm_cv_glob_ext=no) rm -r t - AC_MSG_RESULT([$rpm_cv_glob_ext]) -fi - if test $rpm_cv_glob_ext = no ; then + ]) + if test "$rpm_cv_glob_ext" = no ; then echo " --> using the included GNU glob instead." >&AC_FD_MSG rpm_cv_glob=yes fi fi -if test $rpm_cv_glob = yes; then +if test "$rpm_cv_glob" = yes; then AC_DEFINE(USE_GNU_GLOB) LIBOBJS="$LIBOBJS glob.o fnmatch.o" fi - dnl dnl Auto-detect whether python bindings should be built. dnl diff --git a/lib/header.c b/lib/header.c index 6d3a2f6..5fd51fb 100644 --- a/lib/header.c +++ b/lib/header.c @@ -365,8 +365,14 @@ static int regionSwab(/*@null@*/ indexEntry entry, int il, int dl, if (ieprev.info.type == RPM_I18NSTRING_TYPE) tdel = ieprev.length; - tprev = (ie.info.tag < HEADER_I18NTABLE) - ? (dataStart - REGION_TAG_COUNT) : t; + if (ie.info.tag >= HEADER_I18NTABLE) { + tprev = t; + } else { + tprev = dataStart; + /* XXX HEADER_IMAGE tags don't include region sub-tag. */ + if (ie.info.tag != HEADER_IMMUTABLE) + tprev -= REGION_TAG_COUNT; + } /* Perform endian conversions */ switch (ntohl(pe->type)) { @@ -394,8 +400,17 @@ static int regionSwab(/*@null@*/ indexEntry entry, int il, int dl, } tdel = (tprev ? (t - tprev) : 0); tl += tdel; + + /* XXX + * There are two hacks here: + * 1) tl is 16b (i.e. REGION_TAG_COUNT) short while doing headerReload(). + * 2) the 8/98 rpm bug with inserting i18n tags needs to use tl, not dl. + */ + if (tl+REGION_TAG_COUNT == dl) + tl += REGION_TAG_COUNT; if (tl > dl) dl = tl; + return dl; } @@ -779,8 +794,10 @@ Header headerLoad(void * uh) /*@=assignexpose@*/ entry->length = pvlen - sizeof(il) - sizeof(dl); rdlen = regionSwab(entry+1, il, 0, pe, dataStart, entry->info.offset); +#if 0 /* XXX don't check, the 8/98 i18n bug fails here. */ if (rdlen != dl) goto errxit; +#endif entry->rdlen = rdlen; entry++; h->indexUsed++; @@ -803,7 +820,7 @@ Header headerLoad(void * uh) if (hdrchkData(off)) goto errxit; - if (off) { + if (off) { int_32 * stei = memcpy(alloca(nb), dataStart + off, nb); rdl = -ntohl(stei[2]); /* negative offset */ ril = rdl/sizeof(*pe); diff --git a/python/Makefile.in b/python/Makefile.in index 4c376d5..6ce456f 100644 --- a/python/Makefile.in +++ b/python/Makefile.in @@ -1,6 +1,6 @@ -# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am +# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am -# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -- 2.7.4