* 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.
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.
@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
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.
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
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
#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.
/* 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>. */
#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. */
pid_t t1;
off_t t2;
mode_t t3;
+off64_t t4;
int
main (void)
size_t t3;
ssize_t t4;
va_list t5;
+off64_t t6;
#include <string.h>
useconds_t t7;
intptr_t t8;
#endif
+off64_t t9;
int
main (void)