Obey tramp-histfile-override in remote direct async processes
[emacs.git] / m4 / pathmax.m4
blob4280837f1e14901be6aeb051878525d94454c7c6
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.
9 AC_DEFUN([gl_PATHMAX],
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. */
19 #if HAVE_UNISTD_H
20 # include <unistd.h>
21 #endif
22 #include <limits.h>
23 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
24 # include <sys/param.h>
25 #endif
26 #if !defined PATH_MAX && defined MAXPATHLEN
27 # define PATH_MAX MAXPATHLEN
28 #endif
29 #ifdef __hpux
30 # undef PATH_MAX
31 # define PATH_MAX 1024
32 #endif
33 #if defined _WIN32 && ! defined __CYGWIN__
34 # undef PATH_MAX
35 # define PATH_MAX 260
36 #endif
37 ]])
39 # Prerequisites of gl_PATHMAX_SNIPPET.
40 AC_DEFUN([gl_PATHMAX_SNIPPET_PREREQ],
42   AC_CHECK_HEADERS_ONCE([unistd.h sys/param.h])