source: trunk/essentials/sys-apps/findutils/gnulib/m4/openat.m4

Last change on this file was 3170, checked in by bird, 18 years ago

findutils 4.3.2

File size: 1.0 KB
Line 
1#serial 11
2# See if we need to use our replacement for Solaris' openat et al functions.
3
4dnl Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
5dnl This file is free software; the Free Software Foundation
6dnl gives unlimited permission to copy and/or distribute it,
7dnl with or without modifications, as long as this notice is preserved.
8
9# Written by Jim Meyering.
10
11AC_DEFUN([gl_FUNC_OPENAT],
12[
13 # No system provides these functions; compile them unconditionally.
14 AC_LIBOBJ([mkdirat])
15 AC_LIBOBJ([fchmodat])
16
17 AC_LIBOBJ([openat-die])
18 AC_LIBOBJ([openat-proc])
19 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
20 AC_CHECK_FUNCS_ONCE([lchmod])
21 AC_CHECK_FUNCS_ONCE([fdopendir])
22 AC_REPLACE_FUNCS(openat)
23 case $ac_cv_func_openat+$ac_cv_func_lstat_dereferences_slashed_symlink in
24 yes+yes) ;;
25 yes+*) AC_LIBOBJ([fstatat]);;
26 *)
27 AC_DEFINE([__OPENAT_PREFIX], [[rpl_]],
28 [Define to rpl_ if the openat replacement function should be used.])
29 gl_PREREQ_OPENAT;;
30 esac
31])
32
33AC_DEFUN([gl_PREREQ_OPENAT],
34[
35 AC_REQUIRE([gl_SAVE_CWD])
36])
Note: See TracBrowser for help on using the repository browser.