Mercurial > gnulib
annotate m4/renameat.m4 @ 39898:6b8c2cbdd8b0
renameatu: prefer renameat2 to syscall
* lib/renameatu.c (renameatu) [HAVE_RENAMEAT2]:
Use renameat2 instead of syscall (Bug#32796).
* m4/renameat.m4 (gl_FUNC_RENAMEAT): Check for renameat2.
author | Andreas Henriksson <andreas@fatal.se> |
---|---|
date | Sun, 07 Oct 2018 15:01:07 -0700 |
parents | 10eb9086bea0 |
children | b06060465f09 |
rev | line source |
---|---|
15083
0c86c6d851e0
renameat: Move AC_LIBOBJ invocations to module description.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
1 # serial 3 |
12099 | 2 # See if we need to provide renameat replacement. |
3 | |
19484
10eb9086bea0
maint: Run 'make update-copyright'
Paul Eggert <eggert@cs.ucla.edu>
parents:
19100
diff
changeset
|
4 dnl Copyright (C) 2009-2018 Free Software Foundation, Inc. |
12099 | 5 dnl This file is free software; the Free Software Foundation |
6 dnl gives unlimited permission to copy and/or distribute it, | |
7 dnl with or without modifications, as long as this notice is preserved. | |
8 | |
9 # Written by Eric Blake. | |
10 | |
11 AC_DEFUN([gl_FUNC_RENAMEAT], | |
12 [ | |
13 AC_REQUIRE([gl_FUNC_OPENAT]) | |
14 AC_REQUIRE([gl_FUNC_RENAME]) | |
15 AC_REQUIRE([gl_STDIO_H_DEFAULTS]) | |
16 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) | |
19100
22715ab8d448
renameat2: fix compilation on alpine linux
Pádraig Brady <P@draigBrady.com>
parents:
18626
diff
changeset
|
17 AC_CHECK_HEADERS([linux/fs.h]) |
39898
6b8c2cbdd8b0
renameatu: prefer renameat2 to syscall
Andreas Henriksson <andreas@fatal.se>
parents:
19484
diff
changeset
|
18 AC_CHECK_FUNCS_ONCE([renameat renameat2]) |
12099 | 19 if test $ac_cv_func_renameat = no; then |
20 HAVE_RENAMEAT=0 | |
12100 | 21 elif test $REPLACE_RENAME = 1; then |
22 dnl Solaris 9 and 10 have the same bugs in renameat as in rename. | |
23 REPLACE_RENAMEAT=1 | |
12099 | 24 fi |
25 ]) |