emacs-bug-tracker
[Top][All Lists]
Advanced

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

[Emacs-bug-tracker] bug#8555: closed ([Bug Report] O_NOCACHE is a system


From: GNU bug Tracking System
Subject: [Emacs-bug-tracker] bug#8555: closed ([Bug Report] O_NOCACHE is a system define on AIX 5.1 and AIX 5.2)
Date: Tue, 26 Apr 2011 07:14:02 +0000

Your message dated Tue, 26 Apr 2011 09:13:48 +0200
with message-id <address@hidden>
and subject line Re: bug#8555: [Bug Report] O_NOCACHE is a system define on AIX 
5.1 and AIX 5.2
has caused the GNU bug report #8555,
regarding [Bug Report] O_NOCACHE is a system define on AIX 5.1 and AIX 5.2
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
8555: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8555
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [Bug Report] O_NOCACHE is a system define on AIX 5.1 and AIX 5.2 Date: Tue, 26 Apr 2011 13:23:37 +0700 User-agent: Mutt/1.5.20 (2009-06-14)
Hi,

On AIX 5.1 and AIX 5.2, building coreutils-8.11 is not possible out of the
box, because dd.c has an enum that tries to set a new constant O_NOCACHE. On
these machines, O_NOCACHE is a preprocessor define in /usr/include/fcntl.c,
so the symbol in the dd.c enum definition is replaced by a constant before
the compiler sees it, so can't be compiled as is.

I worked around it as follows:

  gsed -i -e 's|O_NOCACHE|DD_NOCACHE|g' src/dd.c

I am not subscribed to this list, so please keep me in Cc for any
followups.

Cheers,
-- 
Gary V. Vaughan (gary AT gnu DOT org)

Attachment: pgpddEnGY9K85.pgp
Description: PGP signature


--- End Message ---
--- Begin Message --- Subject: Re: bug#8555: [Bug Report] O_NOCACHE is a system define on AIX 5.1 and AIX 5.2 Date: Tue, 26 Apr 2011 09:13:48 +0200
Gary V. Vaughan wrote:
> On AIX 5.1 and AIX 5.2, building coreutils-8.11 is not possible out of the
> box, because dd.c has an enum that tries to set a new constant O_NOCACHE. On
> these machines, O_NOCACHE is a preprocessor define in /usr/include/fcntl.c,
> so the symbol in the dd.c enum definition is replaced by a constant before
> the compiler sees it, so can't be compiled as is.
>
> I worked around it as follows:
>
>   gsed -i -e 's|O_NOCACHE|DD_NOCACHE|g' src/dd.c

Hi Gary,

Thank you for the report.  Shame on AIX.
I've fixed it slightly differently.
This way I don't have to change all of dd.c's uses of O_NOCACHE.


>From 07c78f7eecf0b9ab75a6ae6aeff6e71bb34e421b Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Tue, 26 Apr 2011 09:09:43 +0200
Subject: [PATCH] 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
---
 src/dd.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

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


--- End Message ---

reply via email to

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