Debian Codegraph @

m4/openat.m4

raw
1 # openat.m4
2 # serial 47
3 dnl Copyright (C) 2004-2026 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 # See if we need to use our replacement for Solaris' openat et al functions.
10
11 # Written by Jim Meyering.
12
13 AC_DEFUN([gl_FUNC_OPENAT],
14 [
15 AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
16 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
17 AC_CHECK_FUNCS_ONCE([openat])
18 AC_REQUIRE([gl_FCNTL_O_FLAGS])
19 AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
20 AC_REQUIRE([gl_PREPROC_O_CLOEXEC])
21 AS_CASE([$ac_cv_func_openat+$gl_cv_header_working_fcntl_h+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC],
22 [yes+*O_DIRECTORY*+*+* | yes+*no+*+*], [REPLACE_OPENAT=1],
23 [yes+*+*yes+yes], [],
24 [yes+*], [REPLACE_OPENAT=1],
25 [HAVE_OPENAT=0])
26 ])
27
28 # Prerequisites of lib/openat.c.
29 AC_DEFUN([gl_PREREQ_OPENAT],
30 [
31 AC_REQUIRE([gl_PROMOTED_TYPE_MODE_T])
32 :
33 ])