Debian Codegraph @

m4/pathmax.m4

raw
1 # pathmax.m4
2 # serial 11
3 dnl Copyright (C) 2002-2003, 2005-2006, 2009-2024 Free Software Foundation,
4 dnl Inc.
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 dnl This file is offered as-is, without any warranty.
9
10 AC_DEFUN([gl_PATHMAX],
11 [
12 dnl Prerequisites of lib/pathmax.h.
13 AC_CHECK_HEADERS_ONCE([sys/param.h])
14 ])
15
16 # Expands to a piece of C program that defines PATH_MAX in the same way as
17 # "pathmax.h" will do.
18 AC_DEFUN([gl_PATHMAX_SNIPPET], [[
19 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
20 #if HAVE_UNISTD_H
21 # include <unistd.h>
22 #endif
23 #include <limits.h>
24 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
25 # include <sys/param.h>
26 #endif
27 #if !defined PATH_MAX && defined MAXPATHLEN
28 # define PATH_MAX MAXPATHLEN
29 #endif
30 #ifdef __hpux
31 # undef PATH_MAX
32 # define PATH_MAX 1024
33 #endif
34 #if defined _WIN32 && ! defined __CYGWIN__
35 # undef PATH_MAX
36 # define PATH_MAX 260
37 #endif
38 ]])
39
40 # Prerequisites of gl_PATHMAX_SNIPPET.
41 AC_DEFUN([gl_PATHMAX_SNIPPET_PREREQ],
42 [
43 AC_CHECK_HEADERS_ONCE([unistd.h sys/param.h])
44 ])