2024-05-11 20:16:48 +00:00
|
|
|
# unistd_h.m4
|
2024-06-04 04:57:53 +00:00
|
|
|
# serial 96
|
2024-01-02 02:30:05 +00:00
|
|
|
dnl Copyright (C) 2006-2024 Free Software Foundation, Inc.
|
2011-01-09 07:33:50 +00:00
|
|
|
dnl This file is free software; the Free Software Foundation
|
|
|
|
dnl gives unlimited permission to copy and/or distribute it,
|
|
|
|
dnl with or without modifications, as long as this notice is preserved.
|
|
|
|
|
|
|
|
dnl Written by Simon Josefsson, Bruno Haible.
|
|
|
|
|
Update from Gnulib
Make the following changes by hand, and run 'admin/merge-gnulib'.
* .gitignore: Add lib/malloc/*.gl.h.
* admin/merge-gnulib: Copy lib/af_alg.h and lib/save-cwd.h
directly from Gnulib, without worrying about Gnulib modules,
as these files are special cases.
(AVOIDED_MODULES): Remove malloc-posix.
* lib/malloc.c, lib/realloc.c, m4/malloc.m4, m4/realloc.m4:
* m4/year2038.m4: New files, copied from Gnulib.
* lib/malloca.c, lib/malloca.h:
* m4/close-stream.m4, m4/glibc21.m4, m4/malloca.m4:
Remove. These are either no longer present in Gnulib, or are no
longer needed by modules that Emacs uses.
* oldXMenu/AddPane.c, oldXmenu/Addsel.c: Include XmenuInt.h first;
needed for new Gnulib.
* src/xmenu.c: Call emacs_abort, not abort.
2021-10-04 19:11:39 +00:00
|
|
|
AC_DEFUN_ONCE([gl_UNISTD_H],
|
2011-01-09 07:33:50 +00:00
|
|
|
[
|
Update from Gnulib
Make the following changes by hand, and run 'admin/merge-gnulib'.
* .gitignore: Add lib/malloc/*.gl.h.
* admin/merge-gnulib: Copy lib/af_alg.h and lib/save-cwd.h
directly from Gnulib, without worrying about Gnulib modules,
as these files are special cases.
(AVOIDED_MODULES): Remove malloc-posix.
* lib/malloc.c, lib/realloc.c, m4/malloc.m4, m4/realloc.m4:
* m4/year2038.m4: New files, copied from Gnulib.
* lib/malloca.c, lib/malloca.h:
* m4/close-stream.m4, m4/glibc21.m4, m4/malloca.m4:
Remove. These are either no longer present in Gnulib, or are no
longer needed by modules that Emacs uses.
* oldXMenu/AddPane.c, oldXmenu/Addsel.c: Include XmenuInt.h first;
needed for new Gnulib.
* src/xmenu.c: Call emacs_abort, not abort.
2021-10-04 19:11:39 +00:00
|
|
|
dnl Ensure to expand the default settings once only, before all statements
|
|
|
|
dnl that occur in other macros.
|
2011-01-09 07:33:50 +00:00
|
|
|
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
|
|
|
|
|
|
|
|
gl_CHECK_NEXT_HEADERS([unistd.h])
|
|
|
|
if test $ac_cv_header_unistd_h = yes; then
|
|
|
|
HAVE_UNISTD_H=1
|
|
|
|
else
|
|
|
|
HAVE_UNISTD_H=0
|
|
|
|
fi
|
|
|
|
AC_SUBST([HAVE_UNISTD_H])
|
|
|
|
|
2011-09-11 16:52:58 +00:00
|
|
|
dnl Ensure the type pid_t gets defined.
|
|
|
|
AC_REQUIRE([AC_TYPE_PID_T])
|
|
|
|
|
2012-05-26 23:14:36 +00:00
|
|
|
dnl Determine WINDOWS_64_BIT_OFF_T.
|
|
|
|
AC_REQUIRE([gl_TYPE_OFF_T])
|
|
|
|
|
2011-01-09 07:33:50 +00:00
|
|
|
dnl Check for declarations of anything we want to poison if the
|
|
|
|
dnl corresponding gnulib module is not in use.
|
Merge from gnulib, improving some licensing wording.
This clarifies and fixes some licensing issues raised by Glenn Morris
<http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00397.html>.
It also merges the latest version of texinfo.tex and has some
MSVC-related changes that don't affect Emacs.
* Makefile.in (GNULIB_TOOL_FLAGS): Avoid msvc-inval, msvc-nothrow,
pathmax, and raise, since these are needed only to address
MSVC-related issues that Emacs doesn't have.
* doc/misc/texinfo.tex, lib/dup2.c, lib/gnulib.mk, lib/signal.in.h:
* lib/sigprocmask.c, lib/stat.c, lib/stdio.in.h, lib/sys_stat.in.h:
* lib/unistd.in.h, m4/dup2.m4, m4/getloadavg.m4, m4/gl-comp.m4:
* m4/include_next.m4, m4/signal_h.m4, m4/signalblocking.m4:
* m4/stdint.m4, m4/stdio_h.m4, m4/sys_stat_h.m4, m4/time_h.m4:
* m4/unistd_h.m4: Merge from gnulib.
2011-09-26 21:30:18 +00:00
|
|
|
gl_WARN_ON_USE_PREPARE([[
|
|
|
|
#if HAVE_UNISTD_H
|
|
|
|
# include <unistd.h>
|
|
|
|
#endif
|
2011-01-09 07:33:50 +00:00
|
|
|
/* Some systems declare various items in the wrong headers. */
|
|
|
|
#if !(defined __GLIBC__ && !defined __UCLIBC__)
|
|
|
|
# include <fcntl.h>
|
|
|
|
# include <stdio.h>
|
|
|
|
# include <stdlib.h>
|
Update from Gnulib
This incorporates:
2018-05-21 crypto: omit stream ops Emacs doesn’t need
2018-05-13 truncate: Fix compilation error on Android
2018-05-13 imaxdiv: Fix compilation error on Android
2018-05-13 Support selective inclusion of recent mingw.org headers
2018-05-13 Add cross-compilation guesses for Linux systems sans glibc
2018-05-13 stdioext: Fix compilation errors with newer Android headers
2018-05-07 af_alg: Pacify --enable-gcc-warnings
2018-05-06 af_alg: Fix bug with streams that are not at position 0
2018-05-06 Followup to 'af_alg: New module'
2018-05-05 crypto/{md5,sha1,sha256,sha512}: simplify
2018-05-05 af_alg: New module
2018-05-05 af_alg: Improve function signature
2018-04-28 md5sum: Use AF_ALG when available
2018-04-28 sha512sum: Use AF_ALG when available
2018-04-28 sha256sum: Use AF_ALG when available
2018-04-28 sha1sum: Use AF_ALG when available
2018-05-05 all: Replace more http URLs by https URLs
2018-05-03 maint: port more modules to GCC 8
2018-05-03 Simplify code; drop support for Borland C++ on Windows
* admin/merge-gnulib (GNULIB_MODULES): Use crypto/md5-buffer
rather than crypto/md5, since Emacs doesn’t use the stream
operations that in recent Gnulib pull in other stuff Emacs doesn’t
need. Similarly for crypto/sha1-buffer, crypto/sha256-buffer,
crypto/sha512-buffer.
* build-aux/config.guess, build-aux/config.sub, lib/dosname.h:
* lib/dup2.c, lib/errno.in.h, lib/euidaccess.c, lib/fcntl.c:
* lib/fcntl.in.h, lib/fpending.c, lib/fsync.c, lib/getdtablesize.c:
* lib/getopt.c, lib/gettimeofday.c, lib/inttypes.in.h, lib/md5.c:
* lib/md5.h, lib/open.c, lib/pipe2.c, lib/putenv.c, lib/sha1.c:
* lib/sha1.h, lib/sha256.c, lib/sha256.h, lib/sha512.c:
* lib/sha512.h, lib/stat-time.h, lib/stdio-impl.h, lib/stdio.in.h:
* lib/stdlib.in.h, lib/sys_stat.in.h, lib/sys_types.in.h:
* lib/timespec.h, lib/unistd.in.h, lib/utimens.c, m4/c-strtod.m4:
* m4/gnulib-common.m4, m4/inttypes.m4, m4/lstat.m4, m4/nocrash.m4:
* m4/pselect.m4, m4/readlink.m4, m4/stdio_h.m4, m4/symlink.m4:
* m4/unistd_h.m4, m4/utimens.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
2018-05-21 18:42:18 +00:00
|
|
|
# if defined _WIN32 && ! defined __CYGWIN__
|
2011-01-09 07:33:50 +00:00
|
|
|
# include <io.h>
|
|
|
|
# endif
|
|
|
|
#endif
|
2020-12-24 15:48:40 +00:00
|
|
|
]], [access chdir chown copy_file_range dup dup2 dup3 environ euidaccess
|
2021-01-01 09:51:18 +00:00
|
|
|
execl execle execlp execv execve execvp execvpe
|
2020-12-24 15:48:40 +00:00
|
|
|
faccessat fchdir
|
Update from Gnulib
This incorporates:
2019-09-22 Update some URLs
2019-09-15 fcntl-h: fix compilation error of creat.c on MSVC
2019-09-15 creat: new module
2019-09-15 access: new module
2019-09-09 Add option to assume best, not worst, when cross-compiling.
* build-aux/config.guess, build-aux/config.sub, doc/misc/texinfo.tex:
* lib/careadlinkat.c, lib/careadlinkat.h, lib/count-leading-zeros.h:
* lib/count-trailing-zeros.h, lib/diffseq.h, lib/fcntl.in.h:
* lib/ftoastr.c, lib/get-permissions.c:
* lib/ieee754.in.h, lib/inttypes.in.h, lib/mktime.c, lib/open.c:
* lib/pathmax.h, lib/pipe2.c, lib/stddef.in.h, lib/stdint.in.h:
* lib/stdlib.in.h, lib/str-two-way.h, lib/string.in.h, lib/time.in.h:
* lib/timegm.c, lib/unistd.in.h, m4/canonicalize.m4:
* m4/extern-inline.m4, m4/fcntl_h.m4, m4/fdopendir.m4:
* m4/getgroups.m4, m4/getopt.m4, m4/gettimeofday.m4:
* m4/gnulib-common.m4, m4/largefile.m4:
* m4/lstat.m4, m4/memmem.m4, m4/mktime.m4, m4/nocrash.m4, m4/open.m4:
* m4/pselect.m4, m4/putenv.m4, m4/readlink.m4, m4/regex.m4:
* m4/symlink.m4, m4/unistd_h.m4, m4/utimens.m4, m4/utimes.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* m4/open-slash.m4: New file, copied from Gnulib.
2019-09-23 06:50:59 +00:00
|
|
|
fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize
|
Update from Gnulib
This incorporates:
2020-06-27 getloadavg: don’t depend on fopen-gnu
2020-06-25 c-dtoastr, c-ldtoastr: new modules
2020-06-01 getloadavg: fix double-increment bug
2020-06-01 tempname: use getrandom, not getentropy
2020-05-31 tempname: merge from glibc and coreutils
2020-05-31 getentropy: work around a macOS and Solaris problem
2020-05-31 fnmatch: merge from glibc
2020-05-30 unistd: remove conflicting declaration of getrandom
2020-05-30 don't assume that UNICODE is not defined
2020-05-29 fix compilation error on native Windows
2020-05-28 avoid dynamic loading of Windows API functions when possible
2020-05-28 at-internal: make more robust in multithreaded applications
2020-05-28 getloadavg: make more robust in multithreaded applications
2020-05-27 getloadavg: make more robust in multithreaded applications
2020-05-26 count-one-bits: fix MSVC specific code
2020-05-25 getentropy, getrandom: new modules
2020-05-24 open, openat: really support O_CLOEXEC
2020-05-23 verify: document ‘assume’ better
2020-05-21 regex: configure better with "clang -fsanitize=leak"
2020-05-21 memmem: configure better with "clang -fsanitize=undefined"
2020-05-19 ftoastr: fix ifndef typo
* build-aux/config.guess, build-aux/config.sub, doc/misc/texinfo.tex:
* lib/count-one-bits.h, lib/ftoastr.c, lib/ftoastr.h:
* lib/getloadavg.c, lib/gettimeofday.c, lib/libc-config.h:
* lib/open.c, lib/openat-proc.c, lib/tempname.c, lib/tempname.h:
* lib/unistd.in.h, lib/verify.h, m4/memmem.m4, m4/regex.m4:
* m4/unistd_h.m4:
Update from Gnulib.
* lib/getrandom.c, lib/sys_random.in.h:
* m4/getrandom.m4, m4/sys_random_h.m4:
New files, copied from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
2020-06-27 17:00:17 +00:00
|
|
|
getentropy getgroups gethostname getlogin getlogin_r getpagesize getpass
|
2012-05-26 23:14:36 +00:00
|
|
|
getusershell setusershell endusershell
|
|
|
|
group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite
|
Merge from gnulib
This incorporates:
2017-05-13 largefile: Simplify
2017-05-13 largefile: Improve and document
2017-05-13 truncate: New module
2017-05-13 windows-stat-timespec: New module
2017-05-13 windows-stat-override: New module
2017-05-11 getopt-posix: port to mingw
2017-05-11 gettimeofday: Increase precision on mingw
2017-05-10 time: Fix missing initialization of HAVE_TIMEZONE_T
2017-05-10 Implement a way to opt out from MSVC support
2017-05-09 tzset: Expand comment about TZ problem on native Windows
* build-aux/config.guess, lib/dup2.c, lib/fcntl.c, lib/fsync.c:
* lib/getdtablesize.c, lib/getopt.c, lib/gettimeofday.c:
* lib/mktime.c, lib/stat-time.h, lib/sys_stat.in.h, lib/unistd.in.h:
* lib/utimens.c, m4/gettimeofday.m4, m4/largefile.m4:
* m4/sys_stat_h.m4, m4/sys_time_h.m4, m4/time_h.m4, m4/time_rz.m4:
* m4/unistd_h.m4: Copy from gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
2017-05-14 08:29:05 +00:00
|
|
|
readlink readlinkat rmdir sethostname sleep symlink symlinkat
|
|
|
|
truncate ttyname_r unlink unlinkat usleep])
|
Update from Gnulib
This incorporates:
2020-02-22 fchmodat, lchmod: simplify
2020-02-22 lchmod: fix link error on Solaris 10
2020-02-22 use 'restrict' in all POSIX function declarations
2020-02-22 chmodat, chownat: new modules
* lib/gnulib.mk.in: Regenerate.
* lib/inttypes.in.h, lib/openat.h, lib/signal.in.h:
* lib/stdio.in.h, lib/stdlib.in.h, lib/string.in.h:
* lib/sys_stat.in.h, lib/time.in.h, lib/unistd.in.h, m4/inttypes.m4:
* m4/signal_h.m4, m4/stdio_h.m4, m4/stdlib_h.m4, m4/string_h.m4:
* m4/sys_socket_h.m4, m4/sys_stat_h.m4, m4/time_h.m4:
* m4/unistd_h.m4: Copy from Gnulib.
2020-02-23 09:24:21 +00:00
|
|
|
|
|
|
|
AC_REQUIRE([AC_C_RESTRICT])
|
2020-12-24 15:48:40 +00:00
|
|
|
|
|
|
|
AC_CHECK_DECLS_ONCE([execvpe])
|
|
|
|
if test $ac_cv_have_decl_execvpe = no; then
|
|
|
|
HAVE_DECL_EXECVPE=0
|
|
|
|
fi
|
2011-01-09 07:33:50 +00:00
|
|
|
])
|
|
|
|
|
Update from Gnulib
Make the following changes by hand, and run 'admin/merge-gnulib'.
* .gitignore: Add lib/malloc/*.gl.h.
* admin/merge-gnulib: Copy lib/af_alg.h and lib/save-cwd.h
directly from Gnulib, without worrying about Gnulib modules,
as these files are special cases.
(AVOIDED_MODULES): Remove malloc-posix.
* lib/malloc.c, lib/realloc.c, m4/malloc.m4, m4/realloc.m4:
* m4/year2038.m4: New files, copied from Gnulib.
* lib/malloca.c, lib/malloca.h:
* m4/close-stream.m4, m4/glibc21.m4, m4/malloca.m4:
Remove. These are either no longer present in Gnulib, or are no
longer needed by modules that Emacs uses.
* oldXMenu/AddPane.c, oldXmenu/Addsel.c: Include XmenuInt.h first;
needed for new Gnulib.
* src/xmenu.c: Call emacs_abort, not abort.
2021-10-04 19:11:39 +00:00
|
|
|
# gl_UNISTD_MODULE_INDICATOR([modulename])
|
|
|
|
# sets the shell variable that indicates the presence of the given module
|
|
|
|
# to a C preprocessor expression that will evaluate to 1.
|
|
|
|
# This macro invocation must not occur in macros that are AC_REQUIREd.
|
2011-01-09 07:33:50 +00:00
|
|
|
AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
|
|
|
|
[
|
Update from Gnulib
Make the following changes by hand, and run 'admin/merge-gnulib'.
* .gitignore: Add lib/malloc/*.gl.h.
* admin/merge-gnulib: Copy lib/af_alg.h and lib/save-cwd.h
directly from Gnulib, without worrying about Gnulib modules,
as these files are special cases.
(AVOIDED_MODULES): Remove malloc-posix.
* lib/malloc.c, lib/realloc.c, m4/malloc.m4, m4/realloc.m4:
* m4/year2038.m4: New files, copied from Gnulib.
* lib/malloca.c, lib/malloca.h:
* m4/close-stream.m4, m4/glibc21.m4, m4/malloca.m4:
Remove. These are either no longer present in Gnulib, or are no
longer needed by modules that Emacs uses.
* oldXMenu/AddPane.c, oldXmenu/Addsel.c: Include XmenuInt.h first;
needed for new Gnulib.
* src/xmenu.c: Call emacs_abort, not abort.
2021-10-04 19:11:39 +00:00
|
|
|
dnl Ensure to expand the default settings once only.
|
|
|
|
gl_UNISTD_H_REQUIRE_DEFAULTS
|
2011-01-09 07:33:50 +00:00
|
|
|
gl_MODULE_INDICATOR_SET_VARIABLE([$1])
|
|
|
|
dnl Define it also as a C macro, for the benefit of the unit tests.
|
|
|
|
gl_MODULE_INDICATOR_FOR_TESTS([$1])
|
|
|
|
])
|
|
|
|
|
Update from Gnulib
Make the following changes by hand, and run 'admin/merge-gnulib'.
* .gitignore: Add lib/malloc/*.gl.h.
* admin/merge-gnulib: Copy lib/af_alg.h and lib/save-cwd.h
directly from Gnulib, without worrying about Gnulib modules,
as these files are special cases.
(AVOIDED_MODULES): Remove malloc-posix.
* lib/malloc.c, lib/realloc.c, m4/malloc.m4, m4/realloc.m4:
* m4/year2038.m4: New files, copied from Gnulib.
* lib/malloca.c, lib/malloca.h:
* m4/close-stream.m4, m4/glibc21.m4, m4/malloca.m4:
Remove. These are either no longer present in Gnulib, or are no
longer needed by modules that Emacs uses.
* oldXMenu/AddPane.c, oldXmenu/Addsel.c: Include XmenuInt.h first;
needed for new Gnulib.
* src/xmenu.c: Call emacs_abort, not abort.
2021-10-04 19:11:39 +00:00
|
|
|
# Initializes the default values for AC_SUBSTed shell variables.
|
|
|
|
# This macro must not be AC_REQUIREd. It must only be invoked, and only
|
|
|
|
# outside of macros or in macros that are not AC_REQUIREd.
|
|
|
|
AC_DEFUN([gl_UNISTD_H_REQUIRE_DEFAULTS],
|
|
|
|
[
|
|
|
|
m4_defun(GL_MODULE_INDICATOR_PREFIX[_UNISTD_H_MODULE_INDICATOR_DEFAULTS], [
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ACCESS])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CHDIR])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CHOWN])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CLOSE])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_COPY_FILE_RANGE])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_DUP])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_DUP2])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_DUP3])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ENVIRON])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EUIDACCESS])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECL])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECLE])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECLP])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECV])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECVE])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECVP])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECVPE])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FACCESSAT])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FCHDIR])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FCHOWNAT])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FDATASYNC])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSYNC])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FTRUNCATE])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETCWD])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETDOMAINNAME])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETDTABLESIZE])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETENTROPY])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETGROUPS])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETHOSTNAME])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETLOGIN])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETLOGIN_R])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETOPT_POSIX])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPAGESIZE])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPASS])
|
2022-01-04 21:13:25 +00:00
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPASS_GNU])
|
Update from Gnulib
Make the following changes by hand, and run 'admin/merge-gnulib'.
* .gitignore: Add lib/malloc/*.gl.h.
* admin/merge-gnulib: Copy lib/af_alg.h and lib/save-cwd.h
directly from Gnulib, without worrying about Gnulib modules,
as these files are special cases.
(AVOIDED_MODULES): Remove malloc-posix.
* lib/malloc.c, lib/realloc.c, m4/malloc.m4, m4/realloc.m4:
* m4/year2038.m4: New files, copied from Gnulib.
* lib/malloca.c, lib/malloca.h:
* m4/close-stream.m4, m4/glibc21.m4, m4/malloca.m4:
Remove. These are either no longer present in Gnulib, or are no
longer needed by modules that Emacs uses.
* oldXMenu/AddPane.c, oldXmenu/Addsel.c: Include XmenuInt.h first;
needed for new Gnulib.
* src/xmenu.c: Call emacs_abort, not abort.
2021-10-04 19:11:39 +00:00
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETUSERSHELL])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GROUP_MEMBER])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISATTY])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LCHOWN])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LINK])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LINKAT])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LSEEK])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PIPE])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PIPE2])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PREAD])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PWRITE])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_READ])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_READLINK])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_READLINKAT])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RMDIR])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETHOSTNAME])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SLEEP])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SYMLINK])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SYMLINKAT])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TRUNCATE])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TTYNAME_R])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_GETOPT])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_NONBLOCKING])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_SIGPIPE])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNLINK])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNLINKAT])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_USLEEP])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WRITE])
|
|
|
|
dnl Support Microsoft deprecated alias function names by default.
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_ACCESS], [1])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_CHDIR], [1])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_CLOSE], [1])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_DUP], [1])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_DUP2], [1])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECL], [1])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECLE], [1])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECLP], [1])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECV], [1])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECVE], [1])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECVP], [1])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECVPE], [1])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_GETCWD], [1])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_GETPID], [1])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_ISATTY], [1])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_LSEEK], [1])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_READ], [1])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_RMDIR], [1])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_SWAB], [1])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_UNLINK], [1])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_WRITE], [1])
|
|
|
|
])
|
|
|
|
m4_require(GL_MODULE_INDICATOR_PREFIX[_UNISTD_H_MODULE_INDICATOR_DEFAULTS])
|
|
|
|
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
|
|
|
|
])
|
|
|
|
|
2011-01-09 07:33:50 +00:00
|
|
|
AC_DEFUN([gl_UNISTD_H_DEFAULTS],
|
|
|
|
[
|
|
|
|
dnl Assume proper GNU behavior unless another module says otherwise.
|
2022-01-04 21:13:25 +00:00
|
|
|
HAVE_CHOWN=1; AC_SUBST([HAVE_CHOWN])
|
|
|
|
HAVE_COPY_FILE_RANGE=1; AC_SUBST([HAVE_COPY_FILE_RANGE])
|
|
|
|
HAVE_DUP3=1; AC_SUBST([HAVE_DUP3])
|
|
|
|
HAVE_EUIDACCESS=1; AC_SUBST([HAVE_EUIDACCESS])
|
|
|
|
HAVE_EXECVPE=1; AC_SUBST([HAVE_EXECVPE])
|
|
|
|
HAVE_FACCESSAT=1; AC_SUBST([HAVE_FACCESSAT])
|
|
|
|
HAVE_FCHDIR=1; AC_SUBST([HAVE_FCHDIR])
|
|
|
|
HAVE_FCHOWNAT=1; AC_SUBST([HAVE_FCHOWNAT])
|
|
|
|
HAVE_FDATASYNC=1; AC_SUBST([HAVE_FDATASYNC])
|
|
|
|
HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC])
|
|
|
|
HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE])
|
|
|
|
HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE])
|
|
|
|
HAVE_GETENTROPY=1; AC_SUBST([HAVE_GETENTROPY])
|
|
|
|
HAVE_GETGROUPS=1; AC_SUBST([HAVE_GETGROUPS])
|
|
|
|
HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME])
|
|
|
|
HAVE_GETLOGIN=1; AC_SUBST([HAVE_GETLOGIN])
|
|
|
|
HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE])
|
|
|
|
HAVE_GETPASS=1; AC_SUBST([HAVE_GETPASS])
|
|
|
|
HAVE_GROUP_MEMBER=1; AC_SUBST([HAVE_GROUP_MEMBER])
|
|
|
|
HAVE_LCHOWN=1; AC_SUBST([HAVE_LCHOWN])
|
|
|
|
HAVE_LINK=1; AC_SUBST([HAVE_LINK])
|
|
|
|
HAVE_LINKAT=1; AC_SUBST([HAVE_LINKAT])
|
|
|
|
HAVE_PIPE=1; AC_SUBST([HAVE_PIPE])
|
|
|
|
HAVE_PIPE2=1; AC_SUBST([HAVE_PIPE2])
|
|
|
|
HAVE_PREAD=1; AC_SUBST([HAVE_PREAD])
|
|
|
|
HAVE_PWRITE=1; AC_SUBST([HAVE_PWRITE])
|
|
|
|
HAVE_READLINK=1; AC_SUBST([HAVE_READLINK])
|
|
|
|
HAVE_READLINKAT=1; AC_SUBST([HAVE_READLINKAT])
|
|
|
|
HAVE_SETHOSTNAME=1; AC_SUBST([HAVE_SETHOSTNAME])
|
|
|
|
HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP])
|
|
|
|
HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK])
|
|
|
|
HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT])
|
|
|
|
HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT])
|
|
|
|
HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP])
|
|
|
|
HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON])
|
|
|
|
HAVE_DECL_EXECVPE=1; AC_SUBST([HAVE_DECL_EXECVPE])
|
|
|
|
HAVE_DECL_FCHDIR=1; AC_SUBST([HAVE_DECL_FCHDIR])
|
|
|
|
HAVE_DECL_FDATASYNC=1; AC_SUBST([HAVE_DECL_FDATASYNC])
|
|
|
|
HAVE_DECL_GETDOMAINNAME=1; AC_SUBST([HAVE_DECL_GETDOMAINNAME])
|
|
|
|
HAVE_DECL_GETLOGIN=1; AC_SUBST([HAVE_DECL_GETLOGIN])
|
|
|
|
HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R])
|
|
|
|
HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE])
|
|
|
|
HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL])
|
|
|
|
HAVE_DECL_SETHOSTNAME=1; AC_SUBST([HAVE_DECL_SETHOSTNAME])
|
|
|
|
HAVE_DECL_TRUNCATE=1; AC_SUBST([HAVE_DECL_TRUNCATE])
|
|
|
|
HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R])
|
|
|
|
HAVE_OS_H=0; AC_SUBST([HAVE_OS_H])
|
|
|
|
HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H])
|
|
|
|
REPLACE_ACCESS=0; AC_SUBST([REPLACE_ACCESS])
|
|
|
|
REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN])
|
|
|
|
REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE])
|
2022-02-23 19:11:52 +00:00
|
|
|
REPLACE_COPY_FILE_RANGE=0; AC_SUBST([REPLACE_COPY_FILE_RANGE])
|
2022-01-04 21:13:25 +00:00
|
|
|
REPLACE_DUP=0; AC_SUBST([REPLACE_DUP])
|
|
|
|
REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2])
|
2023-02-04 22:45:11 +00:00
|
|
|
REPLACE_DUP3=0; AC_SUBST([REPLACE_DUP3])
|
2022-01-04 21:13:25 +00:00
|
|
|
REPLACE_EXECL=0; AC_SUBST([REPLACE_EXECL])
|
|
|
|
REPLACE_EXECLE=0; AC_SUBST([REPLACE_EXECLE])
|
|
|
|
REPLACE_EXECLP=0; AC_SUBST([REPLACE_EXECLP])
|
|
|
|
REPLACE_EXECV=0; AC_SUBST([REPLACE_EXECV])
|
|
|
|
REPLACE_EXECVE=0; AC_SUBST([REPLACE_EXECVE])
|
|
|
|
REPLACE_EXECVP=0; AC_SUBST([REPLACE_EXECVP])
|
|
|
|
REPLACE_EXECVPE=0; AC_SUBST([REPLACE_EXECVPE])
|
|
|
|
REPLACE_FACCESSAT=0; AC_SUBST([REPLACE_FACCESSAT])
|
2024-01-20 19:45:04 +00:00
|
|
|
REPLACE_FCHDIR=0; AC_SUBST([REPLACE_FCHDIR])
|
2022-01-04 21:13:25 +00:00
|
|
|
REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT])
|
2023-02-04 22:45:11 +00:00
|
|
|
REPLACE_FDATASYNC=0; AC_SUBST([REPLACE_FDATASYNC])
|
2022-01-04 21:13:25 +00:00
|
|
|
REPLACE_FTRUNCATE=0; AC_SUBST([REPLACE_FTRUNCATE])
|
|
|
|
REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD])
|
|
|
|
REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME])
|
|
|
|
REPLACE_GETDTABLESIZE=0; AC_SUBST([REPLACE_GETDTABLESIZE])
|
2023-02-04 22:45:11 +00:00
|
|
|
REPLACE_GETENTROPY=0; AC_SUBST([REPLACE_GETENTROPY])
|
2022-01-04 21:13:25 +00:00
|
|
|
REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R])
|
|
|
|
REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS])
|
|
|
|
REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE])
|
|
|
|
REPLACE_GETPASS=0; AC_SUBST([REPLACE_GETPASS])
|
|
|
|
REPLACE_GETPASS_FOR_GETPASS_GNU=0; AC_SUBST([REPLACE_GETPASS_FOR_GETPASS_GNU])
|
2024-06-04 04:57:53 +00:00
|
|
|
REPLACE_GETUSERSHELL=0; AC_SUBST([REPLACE_GETUSERSHELL])
|
2022-01-04 21:13:25 +00:00
|
|
|
REPLACE_ISATTY=0; AC_SUBST([REPLACE_ISATTY])
|
|
|
|
REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN])
|
|
|
|
REPLACE_LINK=0; AC_SUBST([REPLACE_LINK])
|
|
|
|
REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT])
|
|
|
|
REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK])
|
2023-02-04 22:45:11 +00:00
|
|
|
REPLACE_PIPE2=0; AC_SUBST([REPLACE_PIPE2])
|
2022-01-04 21:13:25 +00:00
|
|
|
REPLACE_PREAD=0; AC_SUBST([REPLACE_PREAD])
|
|
|
|
REPLACE_PWRITE=0; AC_SUBST([REPLACE_PWRITE])
|
|
|
|
REPLACE_READ=0; AC_SUBST([REPLACE_READ])
|
|
|
|
REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK])
|
|
|
|
REPLACE_READLINKAT=0; AC_SUBST([REPLACE_READLINKAT])
|
|
|
|
REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR])
|
2023-02-04 22:45:11 +00:00
|
|
|
REPLACE_SETHOSTNAME=0; AC_SUBST([REPLACE_SETHOSTNAME])
|
2022-01-04 21:13:25 +00:00
|
|
|
REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP])
|
|
|
|
REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK])
|
|
|
|
REPLACE_SYMLINKAT=0; AC_SUBST([REPLACE_SYMLINKAT])
|
|
|
|
REPLACE_TRUNCATE=0; AC_SUBST([REPLACE_TRUNCATE])
|
|
|
|
REPLACE_TTYNAME_R=0; AC_SUBST([REPLACE_TTYNAME_R])
|
|
|
|
REPLACE_UNLINK=0; AC_SUBST([REPLACE_UNLINK])
|
|
|
|
REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT])
|
|
|
|
REPLACE_USLEEP=0; AC_SUBST([REPLACE_USLEEP])
|
|
|
|
REPLACE_WRITE=0; AC_SUBST([REPLACE_WRITE])
|
|
|
|
UNISTD_H_HAVE_SYS_RANDOM_H=0; AC_SUBST([UNISTD_H_HAVE_SYS_RANDOM_H])
|
|
|
|
UNISTD_H_HAVE_WINSOCK2_H=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H])
|
2011-01-09 07:33:50 +00:00
|
|
|
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
|
|
|
|
AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS])
|
|
|
|
])
|