Debian Codegraph @

m4/chdir-long.m4

raw
1 # chdir-long.m4
2 # serial 17
3 dnl Copyright (C) 2004-2007, 2009-2024 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 # Use Gnulib's robust chdir function.
10 # It can handle arbitrarily long directory names, which means
11 # that when it is given the name of an existing directory, it
12 # never fails with ENAMETOOLONG.
13 # Arrange to compile chdir-long.c only on systems that define PATH_MAX.
14
15 # Written by Jim Meyering.
16
17 AC_DEFUN([gl_FUNC_CHDIR_LONG],
18 [
19 AC_REQUIRE([gl_PATHMAX_SNIPPET_PREREQ])
20 AC_CACHE_CHECK([whether this system supports file names of any length],
21 [gl_cv_have_unlimited_file_name_length],
22 [AC_EGREP_CPP([have_arbitrary_file_name_length_limit],
23 gl_PATHMAX_SNIPPET[
24 #ifdef PATH_MAX
25 have_arbitrary_file_name_length_limit
26 #endif],
27 [gl_cv_have_unlimited_file_name_length=no],
28 [gl_cv_have_unlimited_file_name_length=yes])])
29 ])
30
31 AC_DEFUN([gl_PREREQ_CHDIR_LONG], [:])