+2021-01-01 Bruno Haible <bruno@clisp.org>
+
+ aligned_alloc: Fix test failure on OpenBSD 6.8.
+ * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): On OpenBSD, define
+ _ISOC11_SOURCE.
+ * m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Update comment.
+
2021-01-01 Bruno Haible <bruno@clisp.org>
posixtm tests: Disable part of the test on plaforms where it fails.
-# aligned_alloc.m4 serial 1
+# aligned_alloc.m4 serial 2
dnl Copyright (C) 2020-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,
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
- dnl Persuade glibc <stdlib.h> to declare aligned_alloc().
+ dnl Persuade glibc and OpenBSD <stdlib.h> to declare aligned_alloc().
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
AC_CHECK_FUNCS_ONCE([aligned_alloc])
-# serial 21 -*- Autoconf -*-
+# serial 22 -*- Autoconf -*-
# Enable extensions on systems that normally disable them.
# Copyright (C) 2003, 2006-2021 Free Software Foundation, Inc.
AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS],
[
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ dnl On OpenBSD 6.8 with GCC, the include files contain a couple of
+ dnl definitions that are only activated with an explicit -D_ISOC11_SOURCE.
+ dnl That's because this version of GCC (4.2.1) supports the option
+ dnl '-std=gnu99' but not the option '-std=gnu11'.
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ case "$host_os" in
+ openbsd*)
+ AC_DEFINE([_ISOC11_SOURCE], [1],
+ [Define to enable the declarations of ISO C 11 types and functions.])
+ ;;
+ esac
])