Hi Jim, Paul,

> I hope to be able to make the coreutils-8.13 release on Wednesday.

There is a regression: A new compilation error on OSF/1 5.1.

  CC       openat.o
cc: Error: openat.h, line 59: In this statement, "AT_SYMLINK_NOFOLLOW" is not 
declared. (undeclared)
  return fchownat (fd, file, owner, group, AT_SYMLINK_NOFOLLOW);
-------------------------------------------^
cc: Error: openat.h, line 71: In this statement, "AT_SYMLINK_NOFOLLOW" is not 
declared. (undeclared)
  return fchmodat (fd, file, mode, AT_SYMLINK_NOFOLLOW);
-----------------------------------^
cc: Error: openat.h, line 83: In this statement, "AT_SYMLINK_NOFOLLOW" is not 
declared. (undeclared)
  return fstatat (fd, name, st, AT_SYMLINK_NOFOLLOW);
--------------------------------^
cc: Error: openat.c, line 190: In this statement, "AT_FDCWD" is not declared. 
(undeclared)
  if (fd == AT_FDCWD || IS_ABSOLUTE_FILE_NAME (file))
------------^
cc: Error: openat.c, line 262: In the initializer for fd, "O_SEARCH" is not 
declared. (undeclared)
  int fd = open ("/", O_SEARCH);
----------------------^
*** Exit 1

It's apparently a compiler bug: The compiler remembers that <fcntl.h> has
already been included in line openat.c:26 and therefore skips it when it is
being included later, from openat.h:22.

I'm committing this workaround (looks stupid, but works!).


2011-09-07  Bruno Haible  <br...@clisp.org>

        openat: Work around compilation error with OSF/1 5.1 DTK cc.
        * lib/openat.h: Use different syntax for include of <fcntl.h>.

--- lib/openat.h.orig   Wed Sep  7 11:47:10 2011
+++ lib/openat.h        Wed Sep  7 11:46:50 2011
@@ -19,7 +19,9 @@
 #ifndef _GL_HEADER_OPENAT
 #define _GL_HEADER_OPENAT
 
-#include <fcntl.h>
+/* Write "fcntl.h" here, not <fcntl.h>, otherwise OSF/1 5.1 DTK cc miscompiles
+   openat.c because that file has a preliminary #include <fcntl.h>.  */
+#include "fcntl.h"
 
 #include <sys/types.h>
 #include <sys/stat.h>

-- 
In memoriam Joseph Lee Heywood <http://en.wikipedia.org/wiki/Joseph_Lee_Heywood>

Reply via email to