bug-coreutils
[Top][All Lists]
Advanced

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

FYI: [PATCH] accommodate gnulib header removals


From: Jim Meyering
Subject: FYI: [PATCH] accommodate gnulib header removals
Date: Sun, 19 Oct 2008 16:11:05 +0200

With today's change to gnulib, coreutils needed the following patch:

I didn't change su.c (to remove the hard-coded declarations) for two reasons:
  - su.c is no longer being maintained here
  - on some gnu/linux systems, the system declarations were not visible,
      and the new ones in gnulib's unistd.h were not visible either

>From 31a884dab7510d84a689ef8092132c93e3dcc4ad Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sun, 19 Oct 2008 13:35:16 +0200
Subject: [PATCH] accommodate gnulib header removals

* src/copy.c: Don't include "euidaccess.h" or "lchmod.h".
* src/cp.c: Don't include "lchmod.h".
* src/ls.c: Don't include "dirfd.h".
* src/mkdir.c: Don't include "lchmod.h".
* src/pwd.c: Don't include "dirfd.h".
* src/remove.c: Don't include "dirfd.h" or "euidaccess.h".
* src/test.c: Don't include "euidaccess.h".
* gl/modules/getloadavg.diff: Adjust diff for changed context.
* src/uptime.c (uptime): Remove declaration.
---
 gl/modules/getloadavg.diff |   15 ++++++---------
 src/copy.c                 |    2 --
 src/cp.c                   |    1 -
 src/ls.c                   |    1 -
 src/mkdir.c                |    1 -
 src/pwd.c                  |    1 -
 src/remove.c               |    2 --
 src/test.c                 |    1 -
 src/uptime.c               |    2 --
 9 files changed, 6 insertions(+), 20 deletions(-)

diff --git a/gl/modules/getloadavg.diff b/gl/modules/getloadavg.diff
index 99d9043..cd03f62 100644
--- a/gl/modules/getloadavg.diff
+++ b/gl/modules/getloadavg.diff
@@ -1,16 +1,13 @@
-Index: modules/getloadavg
-===================================================================
-RCS file: /sources/gnulib/gnulib/modules/getloadavg,v
-retrieving revision 1.13
-diff -u -p -r1.13 getloadavg
---- modules/getloadavg 22 Sep 2006 12:47:55 -0000      1.13
-+++ modules/getloadavg 23 Sep 2006 16:41:36 -0000
-@@ -14,7 +14,7 @@ stdbool
+diff --git a/modules/getloadavg b/modules/getloadavg
+index 2fbeb40..b79aaca 100644
+--- a/modules/getloadavg
++++ b/modules/getloadavg
+@@ -16,7 +16,7 @@ stdbool
  fcntl-safer

  configure.ac:
 -gl_GETLOADAVG([$gl_source_base])
 +gl_GETLOADAVG([lib])
+ gl_STDLIB_MODULE_INDICATOR([getloadavg])

  Makefile.am:
-
diff --git a/src/copy.c b/src/copy.c
index 5a58475..bc1b20e 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -35,7 +35,6 @@
 #include "buffer-lcm.h"
 #include "copy.h"
 #include "cp-hash.h"
-#include "euidaccess.h"
 #include "error.h"
 #include "fcntl--.h"
 #include "file-set.h"
@@ -45,7 +44,6 @@
 #include "hash.h"
 #include "hash-triple.h"
 #include "ignore-value.h"
-#include "lchmod.h"
 #include "quote.h"
 #include "same.h"
 #include "savedir.h"
diff --git a/src/cp.c b/src/cp.c
index 58c9c09..95eba0c 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -30,7 +30,6 @@
 #include "error.h"
 #include "filenamecat.h"
 #include "ignore-value.h"
-#include "lchmod.h"
 #include "quote.h"
 #include "stat-time.h"
 #include "utimens.h"
diff --git a/src/ls.c b/src/ls.c
index efe42e3..f454d0e 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -87,7 +87,6 @@
 #include "acl.h"
 #include "argmatch.h"
 #include "dev-ino.h"
-#include "dirfd.h"
 #include "error.h"
 #include "filenamecat.h"
 #include "hard-locale.h"
diff --git a/src/mkdir.c b/src/mkdir.c
index e408f29..ca543aa 100644
--- a/src/mkdir.c
+++ b/src/mkdir.c
@@ -24,7 +24,6 @@

 #include "system.h"
 #include "error.h"
-#include "lchmod.h"
 #include "mkdir-p.h"
 #include "modechange.h"
 #include "prog-fprintf.h"
diff --git a/src/pwd.c b/src/pwd.c
index 3c7b4fc..ac59155 100644
--- a/src/pwd.c
+++ b/src/pwd.c
@@ -20,7 +20,6 @@
 #include <sys/types.h>

 #include "system.h"
-#include "dirfd.h"
 #include "error.h"
 #include "long-options.h"
 #include "quote.h"
diff --git a/src/remove.c b/src/remove.c
index e92f78c..28684b2 100644
--- a/src/remove.c
+++ b/src/remove.c
@@ -24,9 +24,7 @@

 #include "system.h"
 #include "cycle-check.h"
-#include "dirfd.h"
 #include "error.h"
-#include "euidaccess.h"
 #include "euidaccess-stat.h"
 #include "file-type.h"
 #include "hash.h"
diff --git a/src/test.c b/src/test.c
index 1fe7da0..14d20fd 100644
--- a/src/test.c
+++ b/src/test.c
@@ -38,7 +38,6 @@
 #endif

 #include "system.h"
-#include "euidaccess.h"
 #include "quote.h"
 #include "stat-time.h"
 #include "strnumcmp.h"
diff --git a/src/uptime.c b/src/uptime.c
index 8687a57..95fea4b 100644
--- a/src/uptime.c
+++ b/src/uptime.c
@@ -46,8 +46,6 @@
   proper_name ("David MacKenzie"), \
   proper_name ("Kaveh Ghazi")

-int getloadavg ();
-
 static void
 print_uptime (size_t n, const STRUCT_UTMP *this)
 {
--
1.6.0.2.554.g3041b




reply via email to

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