[Bug cobol/124616] libgcobol.spec is not built on x86_64-*-freebsd

"jklowden at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124616

--- Comment #18 from James K. Lowden <jklowden at gcc dot gnu.org> ---
Thank you.  This is what I'm preparing (As you say, O_LARGEFILE is not Posix: 

diff --git a/libgcobol/posix/shim/open.cc b/libgcobol/posix/shim/open.cc
index ed2a9d131b4..c449fae10a7 100644
--- a/libgcobol/posix/shim/open.cc
+++ b/libgcobol/posix/shim/open.cc
@@ -35,7 +35,6 @@ posix_open(const char *pathname, int cbl_flags, int cbl_mode)
{
     { cbl::PSX_O_APPEND, O_APPEND },
     { cbl::PSX_O_NONBLOCK, O_NONBLOCK },
     { cbl::PSX_O_DSYNC, O_DSYNC },
-    { cbl::PSX_O_LARGEFILE, O_LARGEFILE }, 
     { cbl::PSX_O_SYNC, O_SYNC }, 
     /*
      * The O_CLOEXEC, O_DIRECTORY, and O_NOFOLLOW flags are not specified in
@@ -56,11 +55,13 @@ posix_open(const char *pathname, int cbl_flags, int
cbl_mode) {
      */
 #if defined(_GNU_SOURCE)
     { cbl::PSX_O_DIRECT, O_DIRECT }, 
+    { cbl::PSX_O_LARGEFILE, O_LARGEFILE }, 
     { cbl::PSX_O_NOATIME, O_NOATIME }, 
     { cbl::PSX_O_PATH, O_PATH }, 
     { cbl::PSX_O_TMPFILE, O_TMPFILE }, 
 #else
     { cbl::PSX_O_DIRECT, 0 }, 
+    { cbl::PSX_O_LARGEFILE, 0 }, 
     { cbl::PSX_O_NOATIME, 0 }, 
     { cbl::PSX_O_PATH, 0 }, 
     { cbl::PSX_O_TMPFILE, 0 }, 

In my lame defense, the Linux open(2) page does not say O_LARGEFILE is a GNU
extension, nor when it was added to the Linux kernel.  

The fact that you see crashes on FreeBSD with make check-cobol is concerning. 
I will see what can be done about that on the cfarm.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.