* lib/stdio.in.h: Do not define _POSIX_C_SOURCE on older macOS,
as it is not needed and defining it causes other problems.
Problem reported by Sevan Janiyan in:
https://mail.gnu.org/r/bug-gnulib/2023-11/msg00039.html
+2023-11-09 Paul Eggert <eggert@cs.ucla.edu>
+
+ stdio: port better to older macOS
+ * lib/stdio.in.h: Do not define _POSIX_C_SOURCE on older macOS,
+ as it is not needed and defining it causes other problems.
+ Problem reported by Sevan Janiyan in:
+ https://mail.gnu.org/r/bug-gnulib/2023-11/msg00039.html
+
2023-11-09 Bruno Haible <bruno@clisp.org>
rand: Add tests.
/* Suppress macOS deprecation warnings for sprintf and vsprintf. */
#if (defined __APPLE__ && defined __MACH__) && !defined _POSIX_C_SOURCE
-# define _POSIX_C_SOURCE 200809L
-# define _GL_DEFINED__POSIX_C_SOURCE
+# ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
+# include <AvailabilityMacros.h>
+# endif
+# if (defined MAC_OS_X_VERSION_MIN_REQUIRED \
+ && 101300 <= MAC_OS_X_VERSION_MIN_REQUIRED)
+# define _POSIX_C_SOURCE 200809L
+# define _GL_DEFINED__POSIX_C_SOURCE
+# endif
#endif
#define _GL_ALREADY_INCLUDING_STDIO_H