coreutils
[Top][All Lists]
Advanced

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

[PATCH 2/2] maint: tweak sc_tight_scope rule


From: Jim Meyering
Subject: [PATCH 2/2] maint: tweak sc_tight_scope rule
Date: Tue, 26 Apr 2011 09:40:40 +0200

FYI, I've added a NEWS entry for the AIX fix, and in a separate commit
tweaked src/Makefile.am sc_tight_scope rule:

>From 740516cd1205b58ad07f2318335d8177586a4ca4 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Tue, 26 Apr 2011 09:09:43 +0200
Subject: [PATCH 1/2] dd: work around compilation failure on AIX 5.1 and 5.2

* src/dd.c (O_NOCACHE): Undefine.  This symbol is defined
via AIX's <fcntl.h>, yet used as an enum name in dd.c.
Reported by Gary V. Vaughan in http://debbugs.gnu.org/8555
* NEWS (Portability): Mention this.
---
 NEWS     |    4 ++++
 src/dd.c |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/NEWS b/NEWS
index 3307e71..025b564 100644
--- a/NEWS
+++ b/NEWS
@@ -20,6 +20,10 @@ GNU coreutils NEWS                                    -*- 
outline -*-
       Sparse files are relatively unusual, and the copying code incurs
       the performance penalty of the now-mandatory sync only for them.

+** Portability
+
+  dd once again compiles on AIX 5.1 and 5.2
+

 * Noteworthy changes in release 8.11 (2011-04-13) [stable]

diff --git a/src/dd.c b/src/dd.c
index cb626fc..072410e 100644
--- a/src/dd.c
+++ b/src/dd.c
@@ -66,6 +66,10 @@
 # define O_CIO 0
 #endif

+/* On AIX 5.1 and AIX 5.2, O_NOCACHE is defined via <fcntl.h>
+   and would interfere with our use of that name, below.  */
+#undef O_NOCACHE
+
 #if ! HAVE_FDATASYNC
 # define fdatasync(fd) (errno = ENOSYS, -1)
 #endif
--
1.7.5.rc3.316.gd1ff9


>From 74e5ad9cf7c515b69ae9d5a83168c70eb2604fec Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Tue, 26 Apr 2011 09:27:32 +0200
Subject: [PATCH 2/2] maint: tweak sc_tight_scope rule

* src/Makefile.am (sc_tight_scope): Remove useless quotes,
change 1>&2 to >&2, and combine a few short lines.
---
 src/Makefile.am |   20 ++++++++------------
 1 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index de0000d..548f5ed 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -730,21 +730,17 @@ sc_tight_scope: $(bin_PROGRAMS)
          perl -lne '/^extern (?:enum )?\S+ \**(\S*) \(/ and print $$1' \
                $$hdr;                                                  \
        ) | $(ASSORT) -u | sed 's/^/^/;s/$$/$$/' > $$t;                 \
-       nm -e *.$(OBJEXT)                                               \
-           | sed -n 's/.* T //p'                                       \
-           | sed 's/^_//'                                              \
-           | grep -Ev -f $$t &&                                        \
-         { echo 'the above functions should have static scope' 1>&2;   \
-           exit 1; } || : ;                                            \
+       nm -e *.$(OBJEXT) | sed -n 's/.* T //p'                         \
+           | sed 's/^_//' | grep -Ev -f $$t                            \
+         && { echo the above functions should have static scope >&2;   \
+              exit 1; } || : ;                                         \
        ( printf '^program_name$$\n';                                   \
          perl -lne '/^extern .*?\**(\w+);/ and print "^$$1\$$"'        \
            $$hdr *.h ) | $(ASSORT) -u > $$t;                           \
-       nm -e *.$(OBJEXT)                                               \
-           | sed -n 's/.* [BD] //p'                                    \
-           | sed 's/^_//'                                              \
-           | grep -Ev -f $$t &&                                        \
-         { echo 'the above variables should have static scope' 1>&2;   \
-           exit 1; } || :
+       nm -e *.$(OBJEXT) | sed -n 's/.* [BD] //p'                      \
+           | sed 's/^_//' | grep -Ev -f $$t                            \
+         && { echo the above variables should have static scope >&2;   \
+              exit 1; } || :

 # Use the just-built ./ginstall, when not cross-compiling.
 if CROSS_COMPILING
--
1.7.5.rc3.316.gd1ff9



reply via email to

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