xref: /netbsd/external/gpl2/xcvs/dist/m4/openat.m4 (revision 6550d01e)
1#serial 3
2# See if we need to use our replacement for Solaris' openat function.
3
4dnl Copyright (C) 2004 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  AC_LIBSOURCES([openat.c, openat.h])
14  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
15  AC_REPLACE_FUNCS(openat)
16  case $ac_cv_func_openat in
17  yes) ;;
18  *)
19    AC_DEFINE([__OPENAT_PREFIX], [[rpl_]],
20      [Define to rpl_ if the openat replacement function should be used.])
21    gl_PREREQ_OPENAT;;
22  esac
23])
24
25AC_DEFUN([gl_PREREQ_OPENAT],
26[
27  AC_REQUIRE([gl_SAVE_CWD])
28])
29