rpms/R/FC-6 R-2.4.0-patched-2006-11-03.patch,NONE,1.1

Tom Callaway (spot) fedora-extras-commits at redhat.com
Sat Nov 4 06:19:58 UTC 2006


Author: spot

Update of /cvs/extras/rpms/R/FC-6
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16000/FC-6

Added Files:
	R-2.4.0-patched-2006-11-03.patch 
Log Message:

Patch from upstream


R-2.4.0-patched-2006-11-03.patch:

--- NEW FILE R-2.4.0-patched-2006-11-03.patch ---
diff -urp R-2.4.0.old/config.site R-2.4.0/config.site
--- R-2.4.0.old/config.site	2006-09-04 09:41:48.000000000 -0500
+++ R-2.4.0/config.site	2006-10-28 14:36:13.000000000 -0500
@@ -43,12 +43,16 @@
 ## If unspecified, a search is made for gcc and cc (in that order).
 ## To override this choice, specify the name of the command which runs
 ## the compiler here, for example 'c89'.
+## It is also convenient to set the architecture here, e.g. 'gcc -m32'.
+## NB, as from R 2.5.0 configure will append flags for C99 compliance,
+## e.g. CC=gcc -std=gnu99
+## To avoid this, set contradictory flags (such as -ansi) as part of CFLAGS.
 ## CC=
 
 ## Debugging and optimization options for the C compiler.
 ## Use this to specify CFLAGS for the version of the C compiler
 ## specified above.
-## If unspecified, defaults to '-g -O2 -std=gnu99' for gcc, 
+## If unspecified, defaults to '-g -O2' for gcc, 
 ## and '-g' in all other cases except icc (for which see R-admin.html).
 ## CFLAGS=
 
diff -urp R-2.4.0.old/configure R-2.4.0/configure
--- R-2.4.0.old/configure	2006-10-03 05:01:50.000000000 -0500
+++ R-2.4.0/configure	2006-11-03 19:41:47.000000000 -0600
@@ -4629,6 +4629,182 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS con
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
+## next is a macro borrowed from autoconf 2.60
+   echo "$as_me:$LINENO: checking for $CC option to accept ISO C99" >&5
+echo $ECHO_N "checking for $CC option to accept ISO C99... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_c99+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <stdio.h>
+
+struct incomplete_array
+{
+  int datasize;
+  double data[];
+};
+
+struct named_init {
+  int number;
+  const wchar_t *name;
+  double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict(ccp restrict text)
+{
+  // See if C++-style comments work.
+  // Iterate through items via the restricted pointer.
+  // Also check for declarations in for loops.
+  for (unsigned int i = 0; *(text+i) != '\0'; ++i)
+    continue;
+  return 0;
+}
+
+// Check varargs and va_copy work.
+static void
+test_varargs(const char *format, ...)
+{
+  va_list args;
+  va_start(args, format);
+  va_list args_copy;
+  va_copy(args_copy, args);
+
+  const char *str;
+  int number;
+  float fnumber;
+
+  while (*format)
+    {
+      switch (*format++)
+	{
+	case 's': // string
+	  str = va_arg(args_copy, const char *);
+	  break;
+	case 'd': // int
+	  number = va_arg(args_copy, int);
+	  break;
+	case 'f': // float
+	  fnumber = (float) va_arg(args_copy, double);
+	  break;
+	default:
+	  break;
+	}
+    }
+  va_end(args_copy);
+  va_end(args);
+}
+
+int
+main ()
+{
+
+  // Check bool and long long datatypes.
+  _Bool success = false;
+  long long int bignum = -1234567890LL;
+  unsigned long long int ubignum = 1234567890uLL;
+
+  // Check restrict.
+  if (test_restrict("String literal") != 0)
+    success = true;
+  char *restrict newvar = "Another string";
+
+  // Check varargs.
+  test_varargs("s, d' f .", "string", 65, 34.234);
+
+  // Check incomplete arrays work.
+  struct incomplete_array *ia =
+    malloc(sizeof(struct incomplete_array) + (sizeof(double) * 10));
+  ia->datasize = 10;
+  for (int i = 0; i < ia->datasize; ++i)
+    ia->data[i] = (double) i * 1.234;
+
+  // Check named initialisers.
+  struct named_init ni = {
+    .number = 34,
+    .name = L"Test wide string",
+    .average = 543.34343,
+  };
+
+  ni.number = 58;
+
+  int dynamic_array[ni.number];
+  dynamic_array[43] = 543;
+
+  // work around unused variable warnings
+  return  bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x';
+
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -std=gnu99 -c99 -qlanglvl=extc99
+do
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_c99=$ac_arg
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c99" in
+  x)
+    echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+  xno)
+    echo "$as_me:$LINENO: result: unsupported" >&5
+echo "${ECHO_T}unsupported" >&6 ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c99"
+    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c99" >&5
[...9677 lines suppressed...]
-48.24 496.53 (Rural Male) 0 0 0 t
-48.24 389.83 (Rural Female) 0 0 0 t
-48.24 283.13 (Urban Male) 0 0 0 t
-48.24 176.43 (Urban Female) 0 0 0 t
+63.36 469.38 (Rural Male) 0 0 0 t
+63.36 379.24 (Rural Female) 0 0 0 t
+63.36 289.10 (Urban Male) 0 0 0 t
+63.36 198.96 (Urban Female) 0 0 0 t
 0.75 setlinewidth
 [] 0 setdash
 1 setlinecap
 1 setlinejoin
 10.00 setmiterlimit
 np
-206.83 91.44 m
-553.53 0 l
+220.11 128.16 m
+526.75 0 l
 o
 np
-206.83 91.44 m
+220.11 128.16 m
 0 -10.80 l
 o
 np
-299.08 91.44 m
+307.90 128.16 m
 0 -10.80 l
 o
 np
-391.34 91.44 m
+395.69 128.16 m
 0 -10.80 l
 o
 np
-483.60 91.44 m
+483.48 128.16 m
 0 -10.80 l
 o
 np
-575.85 91.44 m
+571.27 128.16 m
 0 -10.80 l
 o
 np
-668.11 91.44 m
+659.06 128.16 m
 0 -10.80 l
 o
 np
-760.36 91.44 m
+746.86 128.16 m
 0 -10.80 l
 o
-206.83 52.56 (10) .5 0 0 t
-299.08 52.56 (20) .5 0 0 t
-391.34 52.56 (30) .5 0 0 t
-483.60 52.56 (40) .5 0 0 t
-575.85 52.56 (50) .5 0 0 t
-668.11 52.56 (60) .5 0 0 t
-760.36 52.56 (70) .5 0 0 t
-np
-168.93 91.44 m
-624.72 0 l
-0 426.80 l
--624.72 0 l
-0 -426.80 l
+220.11 89.28 (10) .5 0 0 t
+307.90 89.28 (20) .5 0 0 t
+395.69 89.28 (30) .5 0 0 t
+483.48 89.28 (40) .5 0 0 t
+571.27 89.28 (50) .5 0 0 t
+659.06 89.28 (60) .5 0 0 t
+746.86 89.28 (70) .5 0 0 t
+np
+184.05 128.16 m
+594.48 0 l
+0 360.56 l
+-594.48 0 l
+0 -360.56 l
 o
 18.00 18.00 823.89 577.28 cl
 /ps 22 def /Font2 findfont 22 s
 0 0 0 rgb
-481.29 539.86 (Death Rates in Virginia - 1940) .5 0 0 t
+481.29 525.10 (Death Rates in Virginia - 1940) .5 0 0 t
 ep
 %%Page: 5 5
 bp
@@ -3771,8 +3771,8 @@ np
 0 -7.20 l
 o
 /ps 12 def /Font1 findfont 12 s
-78.70 65.52 (1   e-11) .5 0 0 t
-222.02 65.52 (1   e+53) .5 0 0 t
+78.70 65.52 (1e-11) .5 0 0 t
+222.02 65.52 (1e+53) .5 0 0 t
 365.35 65.52 (1e+117) .5 0 0 t
 508.68 65.52 (1e+181) .5 0 0 t
 652.00 65.52 (1e+245) .5 0 0 t
@@ -3800,8 +3800,8 @@ np
 77.04 436.50 m
 -7.20 0 l
 o
-59.76 92.27 (1   e-10) .5 0 90 t
-59.76 178.32 (1   e+49) .5 0 90 t
+59.76 92.27 (1e-10) .5 0 90 t
+59.76 178.32 (1e+49) .5 0 90 t
 59.76 264.38 (1e+108) .5 0 90 t
 59.76 350.44 (1e+167) .5 0 90 t
 59.76 436.50 (1e+226) .5 0 90 t
diff -urp R-2.4.0.old/tests/reg-tests-1.R R-2.4.0/tests/reg-tests-1.R
--- R-2.4.0.old/tests/reg-tests-1.R	2006-09-25 21:05:07.000000000 -0500
+++ R-2.4.0/tests/reg-tests-1.R	2006-10-28 14:36:01.000000000 -0500
@@ -4494,3 +4494,20 @@ test <- 1:10
 try(test[2:4] <- ls) # fails
 stopifnot(!exists("*tmp*", where=1))
 ## was true < 2.4.0
+
+
+## merge on zero-row data frames
+L3 <- LETTERS[1:3]
+d <- data.frame(cbind(x=1, y=1), fac=sample(L3, 1, repl=TRUE))
+e <- d[-1,]
+merge(d, e, by.x = "x", by.y = "x", all.x = TRUE)
+##
+
+
+## PR#9313
+library(stats4)
+g <- function(x, y) -cos(x) + abs(y)
+fit1 <- mle(g, start = list(x = 0, y = 7))
+fit2 <- mle(g, start = list(y = 7, x = 0))
+stopifnot(all.equal(coef(fit1), coef(fit2)))
+## Found different solutions in 2.4.0, as names were not remapped in fit2
diff -urp R-2.4.0.old/tests/reg-tests-2.R R-2.4.0/tests/reg-tests-2.R
--- R-2.4.0.old/tests/reg-tests-2.R	2006-09-22 21:05:09.000000000 -0500
+++ R-2.4.0/tests/reg-tests-2.R	2006-10-28 14:36:01.000000000 -0500
@@ -1988,3 +1988,15 @@ format(matrix(1:16, 4), big.mark = ",")
 
 
 ### end of tests added in 2.4.0 ###
+
+
+## Platform-specific behaviour in lowess reported to R-help
+## 2006-10-12 by Frank Harrell
+x <- c(0,7,8,14,15,120,242)
+y <- c(122,128,130,158,110,110,92)
+lowess(x, y, iter=0)
+lowess(x, y)
+## MAD of iterated residuals was zero, and result depended on the platform.
+
+
+### end of tests added in 2.4.1 ###
diff -urp R-2.4.0.old/tests/reg-tests-2.Rout.save R-2.4.0/tests/reg-tests-2.Rout.save
--- R-2.4.0.old/tests/reg-tests-2.Rout.save	2006-09-25 21:05:07.000000000 -0500
+++ R-2.4.0/tests/reg-tests-2.Rout.save	2006-10-28 14:36:01.000000000 -0500
@@ -1,6 +1,6 @@
 
-R version 2.4.0 beta (2005-09-25 r39509)
-Copyright (C)  The R Foundation for Statistical Computing
+R version 2.5.0 Under development (unstable) (2006-10-15 r39637)
+Copyright (C) 2006 The R Foundation for Statistical Computing
 ISBN 3-900051-07-0
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
@@ -5572,3 +5572,27 @@ Residual standard error: 1.735 on 44 deg
 > 
 > ### end of tests added in 2.4.0 ###
 > 
+> 
+> ## Platform-specific behaviour in lowess reported to R-help
+> ## 2006-10-12 by Frank Harrell
+> x <- c(0,7,8,14,15,120,242)
+> y <- c(122,128,130,158,110,110,92)
+> lowess(x, y, iter=0)
+$x
+[1]   0   7   8  14  15 120 242
+
+$y
+[1] 121.95735 128.00000 131.06649 136.93673 126.76467 109.99903  92.00003
+
+> lowess(x, y)
+$x
+[1]   0   7   8  14  15 120 242
+
+$y
+[1] 122 128 128 158 110 110  92
+
+> ## MAD of iterated residuals was zero, and result depended on the platform.
+> 
+> 
+> ### end of tests added in 2.4.1 ###
+> 
diff -urp R-2.4.0.old/VERSION R-2.4.0/VERSION
--- R-2.4.0.old/VERSION	2006-10-03 05:00:12.000000000 -0500
+++ R-2.4.0/VERSION	2006-10-03 07:19:25.000000000 -0500
@@ -1 +1 @@
-2.4.0
+2.4.0 Patched




More information about the scm-commits mailing list