diff options
| author | Kristian Schuster <116557017+KriSchu@users.noreply.github.com> | 2023-02-19 23:49:18 +0100 |
|---|---|---|
| committer | Kristian Schuster <116557017+KriSchu@users.noreply.github.com> | 2023-02-19 23:49:18 +0100 |
| commit | a0d42777217296c0a7bdb1e1be8d8f6de1b24dd7 (patch) | |
| tree | 8effe94c57b2f9796ba36090b07551baa8f1e1cb /gl/m4/pathmax.m4 | |
| parent | ca3d59cd6918c9e2739e783b721d4c1122640fd3 (diff) | |
| parent | c07206f2ccc2356aa74bc6813a94c2190017d44e (diff) | |
| download | monitoring-plugins-a0d42777217296c0a7bdb1e1be8d8f6de1b24dd7.tar.gz | |
Merge remote-tracking branch 'origin/master' into feature_check_disk_add_ignore_missing_option
Diffstat (limited to 'gl/m4/pathmax.m4')
| -rw-r--r-- | gl/m4/pathmax.m4 | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/gl/m4/pathmax.m4 b/gl/m4/pathmax.m4 new file mode 100644 index 00000000..6d47d2c0 --- /dev/null +++ b/gl/m4/pathmax.m4 | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | # pathmax.m4 serial 11 | ||
| 2 | dnl Copyright (C) 2002-2003, 2005-2006, 2009-2023 Free Software Foundation, | ||
| 3 | dnl 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 | |||
| 8 | AC_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. | ||
| 16 | AC_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. | ||
| 39 | AC_DEFUN([gl_PATHMAX_SNIPPET_PREREQ], | ||
| 40 | [ | ||
| 41 | AC_CHECK_HEADERS_ONCE([unistd.h sys/param.h]) | ||
| 42 | ]) | ||
