r1349 - in trunk: . autoconf

tushar at linuxfromscratch.org tushar at linuxfromscratch.org
Mon Jan 16 22:16:39 PST 2006


Author: tushar
Date: 2006-01-16 23:16:39 -0700 (Mon, 16 Jan 2006)
New Revision: 1349

Added:
   trunk/autoconf/
   trunk/autoconf/autoconf-2.13-fedora_macro_fixes-1.patch
   trunk/autoconf/autoconf-2.13-race.patch
Log:
Add autoconf 2.13 patches

Added: trunk/autoconf/autoconf-2.13-fedora_macro_fixes-1.patch
===================================================================
--- trunk/autoconf/autoconf-2.13-fedora_macro_fixes-1.patch	2006-01-17 05:38:23 UTC (rev 1348)
+++ trunk/autoconf/autoconf-2.13-fedora_macro_fixes-1.patch	2006-01-17 06:16:39 UTC (rev 1349)
@@ -0,0 +1,177 @@
+Submitted By: Tushar Teredesai <tushar at linuxfromscratch.org>
+Date: 2006-01-17
+Initial Package Version: 2.13
+Origin: Fedora
+Upstream Status: Not submitted, old version.
+Description: Misc macro fixes from Fedora
+diff -Naur autoconf-2.13.orig/acgeneral.m4 autoconf-2.13/acgeneral.m4
+--- autoconf-2.13.orig/acgeneral.m4	1999-01-05 07:27:37.000000000 -0600
++++ autoconf-2.13/acgeneral.m4	2005-11-08 00:03:44.561391488 -0600
+@@ -1817,10 +1817,6 @@
+ [cat > conftest.$ac_ext <<EOF
+ [#]line __oline__ "configure"
+ #include "confdefs.h"
+-ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
+-extern "C" void exit(int);
+-#endif
+-])dnl
+ [$1]
+ EOF
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+@@ -1988,12 +1984,12 @@
+ AC_MSG_CHECKING(size of $1)
+ AC_CACHE_VAL(AC_CV_NAME,
+ [AC_TRY_RUN([#include <stdio.h>
+-main()
++int main()
+ {
+   FILE *f=fopen("conftestval", "w");
+-  if (!f) exit(1);
++  if (!f) return(1);
+   fprintf(f, "%d\n", sizeof($1));
+-  exit(0);
++  return(0);
+ }], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl
+ AC_MSG_RESULT($AC_CV_NAME)
+ AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
+@@ -2160,20 +2156,38 @@
+ dnl AC_OUTPUT_MAKE_DEFS()
+ define(AC_OUTPUT_MAKE_DEFS,
+ [# Transform confdefs.h into DEFS.
+-dnl Using a here document instead of a string reduces the quoting nightmare.
+ # Protect against shell expansion while executing Makefile rules.
+ # Protect against Makefile macro expansion.
+-cat > conftest.defs <<\EOF
++#
++# If the first sed substitution is executed (which looks for macros that
++# take arguments), then we branch to the quote section.  Otherwise,
++# look for a macro that doesn't take arguments.
++cat >confdef2opt.sed <<\_ACEOF
+ changequote(<<, >>)dnl
+-s%<<#define>> \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+-s%[ 	`~<<#>>$^&*(){}\\|;'"<>?]%\\&%g
+-s%\[%\\&%g
+-s%\]%\\&%g
+-s%\$%$$%g
+-changequote([, ])dnl
+-EOF
+-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+-rm -f conftest.defs
++t clear
++: clear
++s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	(][^ 	(]*([^)]*)\)[ 	]*\(.*\),-D\1=\2,g
++t quote
++s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\),-D\1=\2,g
++t quote
++d
++: quote
++s,[ 	`~#$^&*(){}\\|;'"<>?],\\&,g
++s,\[,\\&,g
++s,\],\\&,g
++s,\$,$$,g
++p
++changequote([, ])dnl
++_ACEOF
++# We use echo to avoid assuming a particular line-breaking character.
++# The extra dot is to prevent the shell from consuming trailing
++# line-breaks from the sub-command output.  A line-break within
++# single-quotes doesn't work because, if this script is created in a
++# platform that uses two characters for line-breaks (e.g., DOS), tr
++# would break.
++ac_LF_and_DOT=`echo; echo .`
++DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
++rm -f confdef2opt.sed
+ ])
+ 
+ dnl Do the variable substitutions to create the Makefiles or whatever.
+diff -Naur autoconf-2.13.orig/acspecific.m4 autoconf-2.13/acspecific.m4
+--- autoconf-2.13.orig/acspecific.m4	1999-01-05 07:27:52.000000000 -0600
++++ autoconf-2.13/acspecific.m4	2005-11-08 00:04:26.863960520 -0600
+@@ -152,8 +152,41 @@
+     CXXFLAGS=
+   fi
+ fi
++
++AC_PROG_CXX_EXIT_DECLARATION
+ ])
+ 
++
++# AC_PROG_CXX_EXIT_DECLARATION
++# -----------------------------
++# Find a valid prototype for exit and declare it in confdefs.h.
++AC_DEFUN(AC_PROG_CXX_EXIT_DECLARATION,
++[for ac_declaration in \
++   ''\
++   '#include <stdlib.h>' \
++   'extern "C" void std::exit (int) throw (); using std::exit;' \
++   'extern "C" void std::exit (int); using std::exit;' \
++   'extern "C" void exit (int) throw ();' \
++   'extern "C" void exit (int);' \
++   'void exit (int);'
++do
++  AC_TRY_COMPILE([#include <stdlib.h>
++$ac_declaration], 
++                 [exit (42);],
++                 [],
++                 [continue])
++  AC_TRY_COMPILE([$ac_declaration],
++                 [exit (42);],
++                 [break])
++done
++if test -n "$ac_declaration"; then
++  echo '#ifdef __cplusplus' >>confdefs.h
++  echo $ac_declaration      >>confdefs.h
++  echo '#endif'             >>confdefs.h
++fi
++])# AC_PROG_CXX_EXIT_DECLARATION
++
++
+ dnl Determine a Fortran 77 compiler to use.  If `F77' is not already set
+ dnl in the environment, check for `g77', `f77' and `f2c', in that order.
+ dnl Set the output variable `F77' to the name of the compiler found.
+@@ -1010,7 +1043,7 @@
+ ])
+ 
+ AC_DEFUN(AC_FUNC_MMAP,
+-[AC_CHECK_HEADERS(unistd.h)
++[AC_CHECK_HEADERS(stdlib.h unistd.h sys/stat.h sys/types.h)
+ AC_CHECK_FUNCS(getpagesize)
+ AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped,
+ [AC_TRY_RUN([
+@@ -1039,11 +1072,24 @@
+ #include <fcntl.h>
+ #include <sys/mman.h>
+ 
++#if HAVE_SYS_TYPES_H
++# include <sys/types.h>
++#endif
++
++#if HAVE_STDLIB_H
++# include <stdlib.h>
++#endif
++
++#if HAVE_SYS_STAT_H
++# include <sys/stat.h>
++#endif
++
++#if HAVE_UNISTD_H
++# include <unistd.h>
++#endif
++
+ /* This mess was copied from the GNU getpagesize.h.  */
+ #ifndef HAVE_GETPAGESIZE
+-# ifdef HAVE_UNISTD_H
+-#  include <unistd.h>
+-# endif
+ 
+ /* Assume that all systems that can run configure have sys/param.h.  */
+ # ifndef HAVE_SYS_PARAM_H
+@@ -1373,6 +1419,8 @@
+   r.ru_majflt = r.ru_minflt = 0;
+   switch (fork()) {
+   case 0: /* Child.  */
++    /* Unless we actually _do_ something, the kernel sometimes doesn't chalk up any system time to this process. */
++    if(fork()) { i = 123; wait(NULL); } else { i = 234; exit(0); }
+     sleep(1); /* Give up the CPU.  */
+     _exit(0);
+   case -1: _exit(0); /* What can we do?  */

Added: trunk/autoconf/autoconf-2.13-race.patch
===================================================================
--- trunk/autoconf/autoconf-2.13-race.patch	2006-01-17 05:38:23 UTC (rev 1348)
+++ trunk/autoconf/autoconf-2.13-race.patch	2006-01-17 06:16:39 UTC (rev 1349)
@@ -0,0 +1,55 @@
+Submitted By: Tushar Teredesai <tushar at linuxfromscratch.org>
+Date: 2006-01-17
+Initial Package Version: 2.13
+Origin: Fedora
+Upstream Status: Not submitted, old version.
+Description: Use mktemp to create temporary files
+--- autoconf-2.12/autoconf.sh.race	Thu Aug 27 19:01:23 1998
++++ autoconf-2.12/autoconf.sh	Thu Aug 27 19:05:04 1998
+@@ -45,7 +45,7 @@
+ esac
+ 
+ : ${TMPDIR=/tmp}
+-tmpout=${TMPDIR}/acout.$$
++tmpout=`mktemp ${TMPDIR}/acout.XXXXXX`
+ localdir=
+ show_version=no
+ 
+@@ -97,10 +97,10 @@
+ 
+ trap 'rm -f $tmpin $tmpout; exit 1' 1 2 15
+ 
+-tmpin=${TMPDIR}/acin.$$ # Always set this, to avoid bogus errors from some rm's.
++tmpin=`mktemp ${TMPDIR}/acin.XXXXXX`
++# Always set this, to avoid bogus errors from some rm's.
+ if test z$infile = z-; then
+   infile=$tmpin
+-  cat > $infile
+ elif test ! -r "$infile"; then
+   echo "autoconf: ${infile}: No such file or directory" >&2
+   exit 1
+--- autoconf-2.12/autoheader.sh.race	Thu Aug 27 19:05:19 1998
++++ autoconf-2.12/autoheader.sh	Thu Aug 27 19:08:18 1998
+@@ -194,9 +194,9 @@
+   # Some fgrep's have limits on the number of lines that can be in the
+   # pattern on the command line, so use a temporary file containing the
+   # pattern.
+-  (fgrep_tmp=${TMPDIR-/tmp}/autoh$$
++  (fgrep_tmp=`mktemp ${TMPDIR-/tmp}/autoh$$.XXXXXX`
+    trap "rm -f $fgrep_tmp; exit 1" 1 2 15
+-   cat > $fgrep_tmp <<EOF
++   cat >> $fgrep_tmp <<EOF
+ $syms
+ EOF
+    fgrep -f $fgrep_tmp
+--- autoconf-2.12/autoupdate.sh.race	Thu Aug 27 19:09:12 1998
++++ autoconf-2.12/autoupdate.sh	Thu Aug 27 19:10:05 1998
+@@ -26,7 +26,7 @@
+ Usage: autoupdate [-h] [--help] [-m dir] [--macrodir=dir] 
+        [--version] [template-file]" 
+ 
+-sedtmp=/tmp/acups.$$
++sedtmp=`mktemp /tmp/acups.XXXXXX`
+ # For debugging.
+ #sedtmp=/tmp/acups
+ show_version=no




More information about the patches mailing list