maint: rely on gnulib's new sys_resource module
authorJim Meyering <meyering@redhat.com>
Fri, 4 May 2012 09:18:28 +0000 (11:18 +0200)
committerJim Meyering <meyering@redhat.com>
Fri, 4 May 2012 10:13:26 +0000 (12:13 +0200)
* 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
m4/jm-macros.m4
src/sort.c

index 41b9cc2..eab6606 100644 (file)
@@ -226,6 +226,7 @@ gnulib_modules="
   strtoumax
   symlink
   sys_ioctl
+  sys_resource
   sys_stat
   sys_wait
   termios
index 94cdf82..016172f 100644 (file)
@@ -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
   ])
index 60ff415..493e7f1 100644 (file)
@@ -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)