| 1 |
# extensions-aix.m4 |
| 2 |
# serial 1 |
| 3 |
dnl Copyright (C) 2024 Free Software Foundation, Inc. |
| 4 |
dnl This file is free software; the Free Software Foundation |
| 5 |
dnl gives unlimited permission to copy and/or distribute it, |
| 6 |
dnl with or without modifications, as long as this notice is preserved. |
| 7 |
dnl This file is offered as-is, without any warranty. |
| 8 |
|
| 9 |
# On AIX, most extensions are already enabled through the _ALL_SOURCE macro, |
| 10 |
# defined by gl_USE_SYSTEM_EXTENSIONS. gl_USE_AIX_EXTENSIONS additionally |
| 11 |
# activates more GNU and Linux-like behaviours, affecting |
| 12 |
# - the time_t type, |
| 13 |
# - errno values in <errno.h>: ENOTEMPTY |
| 14 |
# - functions in <stdlib.h>: malloc calloc realloc valloc |
| 15 |
# <https://www.ibm.com/docs/en/aix/7.3?topic=m-malloc-free-realloc-calloc-mallopt-mallinfo-mallinfo-heap-alloca-valloc-posix-memalign-subroutine> |
| 16 |
# - functions in <string.h>: strerror_r (returns 'char *', like glibc) |
| 17 |
# - functions in <dirent.h>: scandir, alphasort, readdir_r |
| 18 |
# - functions in <netdb.h>: gethostbyname_r gethostbyaddr_r |
| 19 |
# - declarations in <unistd.h>: sbrk |
| 20 |
# and a couple of secondary <sys/*> header files. |
| 21 |
|
| 22 |
AC_DEFUN_ONCE([gl_USE_AIX_EXTENSIONS], |
| 23 |
[ |
| 24 |
AC_DEFINE([_LINUX_SOURCE_COMPAT], [1], |
| 25 |
[Define so that AIX headers are more compatible with GNU/Linux.]) |
| 26 |
]) |