+2021-05-13 Bruno Haible <bruno@clisp.org>
+
+ posix_spawn, posix_spawnp: Fix build error on Minix 3.3.
+ * m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): If posix_spawn does not exist
+ but is declared, set REPLACE_POSIX_SPAWN.
+ * doc/posix-functions/posix_spawn.texi: Update platforms list.
+ * doc/posix-functions/posix_spawnp.texi: Likewise.
+
2021-05-13 Bruno Haible <bruno@clisp.org>
reallocarray tests: Avoid test failure on NetBSD.
@itemize
@item
This function is missing on some platforms:
-FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 9, Cygwin 1.7.x, mingw, MSVC 14, Android 8.1.
+FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.3, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 9, Cygwin 1.7.x, mingw, MSVC 14, Android 8.1.
@item
When this function fails, it causes the stdio buffer contents to be output
twice on some platforms:
@itemize
@item
This function is missing on some platforms:
-FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 9, Cygwin 1.7.x, mingw, MSVC 14, Android 8.1.
+FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.3, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 9, Cygwin 1.7.x, mingw, MSVC 14, Android 8.1.
@item
When this function fails, it causes the stdio buffer contents to be output
twice on some platforms:
-# posix_spawn.m4 serial 21
+# posix_spawn.m4 serial 22
dnl Copyright (C) 2008-2021 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl AC_CHECK_FUNCS_ONCE([posix_spawnattr_getsigmask])
dnl AC_CHECK_FUNCS_ONCE([posix_spawnattr_setsigmask])
dnl AC_CHECK_FUNCS_ONCE([posix_spawnattr_destroy])
+ AC_CHECK_DECLS([posix_spawn], , , [[#include <spawn.h>]])
if test $ac_cv_func_posix_spawn = yes; then
m4_ifdef([gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR],
[dnl Module 'posix_spawn_file_actions_addchdir' is present.
[gl_cv_func_spawnattr_setschedparam=no])
])
fi
+ else
+ dnl The system does not have the main function. Therefore we have to
+ dnl provide our own implementation. This implies to define our own
+ dnl posix_spawn_file_actions_t and posix_spawnattr_t types.
+ if test $ac_cv_have_decl_posix_spawn = yes; then
+ dnl The system declares posix_spawn() already. This declaration uses
+ dnl the original posix_spawn_file_actions_t and posix_spawnattr_t types.
+ dnl But we need a declaration with our own posix_spawn_file_actions_t and
+ dnl posix_spawnattr_t types.
+ REPLACE_POSIX_SPAWN=1
+ fi
fi
if test $ac_cv_func_posix_spawn != yes || test $REPLACE_POSIX_SPAWN = 1; then
AC_DEFINE([REPLACE_POSIX_SPAWN], [1],