coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/2] maint: rely on gnulib's new sys_resource module


From: Jim Meyering
Subject: [PATCH 1/2] maint: rely on gnulib's new sys_resource module
Date: Fri, 04 May 2012 12:15:07 +0200

Updating to latest gnulib, I saw a new syntax-check failure:

    src/sort.c:55:#if HAVE_SYS_RESOURCE_H
    maint.mk: do not test the above HAVE_<header>_H symbol(s);
      with the corresponding gnulib module, they are always true
    make[3]: *** [sc_prohibit_always_true_header_tests] Error 1

That was due to the addition of that new module to gnulib.
It merely means that with this addition, we should no longer
be testing the HAVE_SYS_RESOURCE_H cpp conditional.
Here's the fix, then the update.

Bruno, I'm happy to confirm that config.cache did not change
(modulo the addition of ac_cv_func__fseeki64), in spite of
your many cross-compiling m4/*.m4 changes in gnulib.

>From c999133e539cd01860338bf6d0f33d825ae94490 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Fri, 4 May 2012 11:18:28 +0200
Subject: [PATCH 1/2] maint: rely on gnulib's new sys_resource module

* bootstrap.conf (gnulib_modules): Add sys_resource.
* src/sort.c: Remove #if HAVE_SYS_RESOURCE_H guard around inclusion
of <sys/resource.h> and move the inclusion "up" into the alphabetized
list of its peers.  This also avoids a failure of the
sc_prohibit_always_true_header_tests syntax-check rule.
* m4/jm-macros.m4 (gl_CHECK_ALL_HEADERS): Remove sys/resource.h.
---
 bootstrap.conf  | 1 +
 m4/jm-macros.m4 | 1 -
 src/sort.c      | 4 +---
 3 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/bootstrap.conf b/bootstrap.conf
index 41b9cc2..eab6606 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -226,6 +226,7 @@ gnulib_modules="
   strtoumax
   symlink
   sys_ioctl
+  sys_resource
   sys_stat
   sys_wait
   termios
diff --git a/m4/jm-macros.m4 b/m4/jm-macros.m4
index 94cdf82..016172f 100644
--- a/m4/jm-macros.m4
+++ b/m4/jm-macros.m4
@@ -189,7 +189,6 @@ AC_DEFUN([gl_CHECK_ALL_HEADERS],
     priv.h
     stropts.h
     sys/param.h
-    sys/resource.h
     sys/systeminfo.h
     syslog.h
   ])
diff --git a/src/sort.c b/src/sort.c
index 60ff415..493e7f1 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -24,6 +24,7 @@

 #include <getopt.h>
 #include <pthread.h>
+#include <sys/resource.h>
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <signal.h>
@@ -52,9 +53,6 @@
 #include "xnanosleep.h"
 #include "xstrtol.h"

-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
 #ifndef RLIMIT_DATA
 struct rlimit { size_t rlim_cur; };
 # define getrlimit(Resource, Rlp) (-1)
--
1.7.10.1.456.g16798d0


>From bdc99991d3fea883de7b2d0262e4f3e467930ce6 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Fri, 4 May 2012 11:02:59 +0200
Subject: [PATCH 2/2] build: update gnulib submodule to latest

---
 gnulib | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnulib b/gnulib
index d4cecf1..639607d 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit d4cecf1ee37f6b611ef092c9c7fa3761d02ce2c3
+Subproject commit 639607db00b96f33b0e18afa27188456c6ccad0a
--
1.7.10.1.456.g16798d0



reply via email to

[Prev in Thread] Current Thread [Next in Thread]