]> Savannah Git Hosting - gnulib.git/commitdiff
fcntl-h, stdio, unistd: Ensure off64_t is defined on all platforms.
authorBruno Haible <bruno@clisp.org>
Sat, 27 Apr 2024 17:51:53 +0000 (19:51 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 27 Apr 2024 18:04:58 +0000 (20:04 +0200)
* lib/fcntl.in.h: Update comment regarding off64_t.
* lib/stdio.in.h: Likewise.
* lib/unistd.in.h: Likewise.
* tests/test-fcntl-h.c: Verify that off64_t is defined.
* tests/test-stdio.c: Likewise.
* tests/test-unistd.c: Likewise.
* doc/posix-headers/fcntl.texi: Mention the off64_t workaround.
* doc/posix-headers/stdio.texi: Likewise.
* doc/posix-headers/unistd.texi: Likewise.
* doc/posix-headers/aio.texi: Mention the problem with off64_t.

ChangeLog
doc/posix-headers/aio.texi
doc/posix-headers/fcntl.texi
doc/posix-headers/stdio.texi
doc/posix-headers/unistd.texi
lib/fcntl.in.h
lib/stdio.in.h
lib/unistd.in.h
tests/test-fcntl-h.c
tests/test-stdio.c
tests/test-unistd.c

index 8467f57a50b0a8eeed4e5456e7a04e13b391cfe2..935ddbd1bacebf8437b8844dafcb5f0b5c268a04 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2024-04-27  Bruno Haible  <bruno@clisp.org>
 
+       fcntl-h, stdio, unistd: Ensure off64_t is defined on all platforms.
+       * lib/fcntl.in.h: Update comment regarding off64_t.
+       * lib/stdio.in.h: Likewise.
+       * lib/unistd.in.h: Likewise.
+       * tests/test-fcntl-h.c: Verify that off64_t is defined.
+       * tests/test-stdio.c: Likewise.
+       * tests/test-unistd.c: Likewise.
+       * doc/posix-headers/fcntl.texi: Mention the off64_t workaround.
+       * doc/posix-headers/stdio.texi: Likewise.
+       * doc/posix-headers/unistd.texi: Likewise.
+       * doc/posix-headers/aio.texi: Mention the problem with off64_t.
+
        sys_types: Ensure off64_t is defined on all platforms.
        * m4/off64_t.m4: New file.
        * m4/sys_types_h.m4 (gl_SYS_TYPES_H): Require gl_TYPE_OFF64_T.
index b8c958756b74a30f7aac6adbcd1aa2b21edae1fa..69b865b2ecb045aeab9fb84eb24443229dd8b366 100644 (file)
@@ -13,5 +13,8 @@ Portability problems not fixed by Gnulib:
 @itemize
 @item
 This header file is missing on some platforms:
-NetBSD 3.0, OpenBSD 6.7, Minix 3.1.8, Cygwin, mingw, MSVC 14, Android 9.0.
+NetBSD 3.0, OpenBSD 6.7, Minix 3.1.8, Cygwin, mingw, MSVC 14, Haiku, Android 9.0.
+@item
+The type @code{off64_t} is not defined on some platforms:
+macOS 12.5, FreeBSD 10.4, NetBSD 10.0, OpenBSD 7.5, Minix 3.3.
 @end itemize
index 0982ba9aa53f1b3b8d0c82aaa287626c05c107b1..d7d95ba1ca04f8cfe5146a83f8516dc3289c5caa 100644 (file)
@@ -15,6 +15,10 @@ MSVC 14.
 The type @code{mode_t} is not defined on some platforms:
 MSVC 14.
 
+@item
+The type @code{off64_t} is not defined on some platforms:
+macOS 12.5, FreeBSD 10.4, NetBSD 10.0, OpenBSD 7.5, MSVC 14, Cygwin, Haiku, Minix 3.3.
+
 @item
 @samp{O_CLOEXEC} is not defined on some platforms:
 Mac OS X 10.6, FreeBSD 8.4, NetBSD 5.1, OpenBSD 4.9, Minix 3.1.8, AIX 7.1, HP-UX 11.31, Solaris 10, Cygwin 1.7.1, mingw, MSVC 14.
index cb5a76f55d808d5716059fb1a516709d4d86bc14..9dc2e68b58ebe53c69e5eebaf9377da39da5e471 100644 (file)
@@ -8,15 +8,18 @@ Gnulib module: stdio
 Portability problems fixed by Gnulib:
 @itemize
 @item
-The type @code{off_t} is missing on some platforms:
+The type @code{off_t} is not defined on some platforms:
 glibc 2.8, eglibc 2.11.2 and others.
 @item
-The type @code{ssize_t} is missing on some platforms:
+The type @code{ssize_t} is not defined on some platforms:
 glibc 2.8, Mac OS X 10.5, Solaris 10, MSVC 14, and others.
 @item
-The type @code{va_list} is missing on some platforms:
+The type @code{va_list} is not defined on some platforms:
 glibc 2.8, OpenBSD 4.0, Solaris 11.4, and others.
 @item
+The type @code{off64_t} is not defined on some platforms:
+macOS 12.5, FreeBSD 10.4, NetBSD 10.0, OpenBSD 7.5, MSVC 14, Cygwin, Haiku, Minix 3.3.
+@item
 Some platforms provide a @code{NULL} macro that cannot be used in arbitrary
 expressions:
 NetBSD 5.0
index 2327e6ff4aa59d6c0c5f54e03f9932f7a1408ea6..1f5312f8d082bc192ec70e4416d5b23af268b786 100644 (file)
@@ -11,6 +11,9 @@ Portability problems fixed by Gnulib:
 This header file is missing on some platforms:
 MSVC 14.
 @item
+The type @code{off64_t} is not defined on some platforms:
+macOS 12.5, FreeBSD 10.4, NetBSD 10.0, OpenBSD 7.5, MSVC 14, Cygwin, Haiku, Minix 3.3.
+@item
 The SEEK_* macros are not defined in this file on some platforms:
 mingw.
 @item
index eea3b9542a514fcd046bac5878f45435285b2918..1465ce594d7aedab9de984d9baceca5d9b06f0d8 100644 (file)
@@ -51,7 +51,8 @@
 #ifndef _@GUARD_PREFIX@_FCNTL_H
 
 /* Needed before <sys/stat.h>.
-   May also define off_t to a 64-bit type on native Windows.  */
+   May also define off_t to a 64-bit type on native Windows.
+   Also defines off64_t on macOS, NetBSD, OpenBSD, MSVC, Cygwin, Haiku.  */
 #include <sys/types.h>
 /* On some systems other than glibc, <sys/stat.h> is a prerequisite of
    <fcntl.h>.  On glibc systems, we would like to avoid namespace pollution.
index 35b9f748219b374b6aaaffdd1731323e341b7385..1c0c9661bfeb61312642b457716f8532453ba7b1 100644 (file)
@@ -77,7 +77,8 @@
 
 /* Get off_t and ssize_t.  Needed on many systems, including glibc 2.8
    and eglibc 2.11.2.
-   May also define off_t to a 64-bit type on native Windows.  */
+   May also define off_t to a 64-bit type on native Windows.
+   Also defines off64_t on macOS, NetBSD, OpenBSD, MSVC, Cygwin, Haiku.  */
 #include <sys/types.h>
 
 /* Solaris 10 and NetBSD 7.0 declare renameat in <unistd.h>, not in <stdio.h>.  */
index b412966367d40c04b139816bbcd509cf5f2c5e29..fa99d7472f41af292d0f5758503dc8408826604e 100644 (file)
 #endif
 
 /* MSVC defines off_t in <sys/types.h>.
-   May also define off_t to a 64-bit type on native Windows.  */
-/* Get off_t, ssize_t, mode_t.  */
+   May also define off_t to a 64-bit type on native Windows.
+   Also defines off64_t on macOS, NetBSD, OpenBSD, MSVC, Cygwin, Haiku.  */
+/* Get off_t, off64_t, ssize_t, mode_t.  */
 #include <sys/types.h>
 
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
index d633167235a23800d5a0bd14ab52314d72d4b540..6020a11e72eb2ee82f37de935bb6a003f5f4c823 100644 (file)
@@ -35,6 +35,7 @@ int i = FD_CLOEXEC;
 pid_t t1;
 off_t t2;
 mode_t t3;
+off64_t t4;
 
 int
 main (void)
index 499695206bafaf92997b33d753ae332d25476b56..44d58f055635586992dc35c751ee228f978a82a0 100644 (file)
@@ -36,6 +36,7 @@ off_t t2;
 size_t t3;
 ssize_t t4;
 va_list t5;
+off64_t t6;
 
 #include <string.h>
 
index 931d65e439c4c998e07fa9cb8adadb9c962ed877..e131302ab651eb7e6cf20f52a54de72b2c7ec3c9 100644 (file)
@@ -46,6 +46,7 @@ pid_t t6;
 useconds_t t7;
 intptr_t t8;
 #endif
+off64_t t9;
 
 int
 main (void)