3 dnl Copyright (C) 2002-2003, 2005-2006, 2009-2024 Free Software Foundation,
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.
11 dnl Prerequisites of lib/pathmax.h.
12 AC_CHECK_HEADERS_ONCE([sys/param.h])
15 # Expands to a piece of C program that defines PATH_MAX in the same way as
16 # "pathmax.h" will do.
17 AC_DEFUN([gl_PATHMAX_SNIPPET], [[
18 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
23 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
24 # include <sys/param.h>
26 #if !defined PATH_MAX && defined MAXPATHLEN
27 # define PATH_MAX MAXPATHLEN
31 # define PATH_MAX 1024
33 #if defined _WIN32 && ! defined __CYGWIN__
39 # Prerequisites of gl_PATHMAX_SNIPPET.
40 AC_DEFUN([gl_PATHMAX_SNIPPET_PREREQ],
42 AC_CHECK_HEADERS_ONCE([unistd.h sys/param.h])