summaryrefslogtreecommitdiffstats
path: root/gl/m4/pathmax.m4
diff options
context:
space:
mode:
authorRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2023-09-18 20:59:46 (GMT)
committerRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2023-09-18 20:59:46 (GMT)
commit0e70e81133c25274fe2dd2309556b41357dd759b (patch)
tree9a680b36788ee1ad4e7ecc5ccfeb4494db9fdc72 /gl/m4/pathmax.m4
parentce355c80cf6054bfa5e1dcf81f9e2183ef963ee1 (diff)
parent2ddc75e69db5a3dd379c896d8420c9af20ec1cee (diff)
downloadmonitoring-plugins-0e70e81133c25274fe2dd2309556b41357dd759b.tar.gz
Merge branch 'master' into mysql_detect_mysqldumprefs/pull/1718/head
Diffstat (limited to 'gl/m4/pathmax.m4')
-rw-r--r--gl/m4/pathmax.m442
1 files changed, 42 insertions, 0 deletions
diff --git a/gl/m4/pathmax.m4 b/gl/m4/pathmax.m4
new file mode 100644
index 0000000..6d47d2c
--- /dev/null
+++ b/gl/m4/pathmax.m4
@@ -0,0 +1,42 @@
1# pathmax.m4 serial 11
2dnl Copyright (C) 2002-2003, 2005-2006, 2009-2023 Free Software Foundation,
3dnl Inc.
4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved.
7
8AC_DEFUN([gl_PATHMAX],
9[
10 dnl Prerequisites of lib/pathmax.h.
11 AC_CHECK_HEADERS_ONCE([sys/param.h])
12])
13
14# Expands to a piece of C program that defines PATH_MAX in the same way as
15# "pathmax.h" will do.
16AC_DEFUN([gl_PATHMAX_SNIPPET], [[
17/* Arrange to define PATH_MAX, like "pathmax.h" does. */
18#if HAVE_UNISTD_H
19# include <unistd.h>
20#endif
21#include <limits.h>
22#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
23# include <sys/param.h>
24#endif
25#if !defined PATH_MAX && defined MAXPATHLEN
26# define PATH_MAX MAXPATHLEN
27#endif
28#ifdef __hpux
29# undef PATH_MAX
30# define PATH_MAX 1024
31#endif
32#if defined _WIN32 && ! defined __CYGWIN__
33# undef PATH_MAX
34# define PATH_MAX 260
35#endif
36]])
37
38# Prerequisites of gl_PATHMAX_SNIPPET.
39AC_DEFUN([gl_PATHMAX_SNIPPET_PREREQ],
40[
41 AC_CHECK_HEADERS_ONCE([unistd.h sys/param.h])
42])