Blame gnulib/m4/pathmax.m4
|
Packit Service |
a2ae7a |
# pathmax.m4 serial 11
|
|
Packit Service |
a2ae7a |
dnl Copyright (C) 2002-2003, 2005-2006, 2009-2019 Free Software Foundation,
|
|
Packit Service |
a2ae7a |
dnl Inc.
|
|
Packit Service |
a2ae7a |
dnl This file is free software; the Free Software Foundation
|
|
Packit Service |
a2ae7a |
dnl gives unlimited permission to copy and/or distribute it,
|
|
Packit Service |
a2ae7a |
dnl with or without modifications, as long as this notice is preserved.
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
AC_DEFUN([gl_PATHMAX],
|
|
Packit Service |
a2ae7a |
[
|
|
Packit Service |
a2ae7a |
dnl Prerequisites of lib/pathmax.h.
|
|
Packit Service |
a2ae7a |
AC_CHECK_HEADERS_ONCE([sys/param.h])
|
|
Packit Service |
a2ae7a |
])
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
# Expands to a piece of C program that defines PATH_MAX in the same way as
|
|
Packit Service |
a2ae7a |
# "pathmax.h" will do.
|
|
Packit Service |
a2ae7a |
AC_DEFUN([gl_PATHMAX_SNIPPET], [[
|
|
Packit Service |
a2ae7a |
/* Arrange to define PATH_MAX, like "pathmax.h" does. */
|
|
Packit Service |
a2ae7a |
#if HAVE_UNISTD_H
|
|
Packit Service |
a2ae7a |
# include <unistd.h>
|
|
Packit Service |
a2ae7a |
#endif
|
|
Packit Service |
a2ae7a |
#include <limits.h>
|
|
Packit Service |
a2ae7a |
#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
|
|
Packit Service |
a2ae7a |
# include <sys/param.h>
|
|
Packit Service |
a2ae7a |
#endif
|
|
Packit Service |
a2ae7a |
#if !defined PATH_MAX && defined MAXPATHLEN
|
|
Packit Service |
a2ae7a |
# define PATH_MAX MAXPATHLEN
|
|
Packit Service |
a2ae7a |
#endif
|
|
Packit Service |
a2ae7a |
#ifdef __hpux
|
|
Packit Service |
a2ae7a |
# undef PATH_MAX
|
|
Packit Service |
a2ae7a |
# define PATH_MAX 1024
|
|
Packit Service |
a2ae7a |
#endif
|
|
Packit Service |
a2ae7a |
#if defined _WIN32 && ! defined __CYGWIN__
|
|
Packit Service |
a2ae7a |
# undef PATH_MAX
|
|
Packit Service |
a2ae7a |
# define PATH_MAX 260
|
|
Packit Service |
a2ae7a |
#endif
|
|
Packit Service |
a2ae7a |
]])
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
# Prerequisites of gl_PATHMAX_SNIPPET.
|
|
Packit Service |
a2ae7a |
AC_DEFUN([gl_PATHMAX_SNIPPET_PREREQ],
|
|
Packit Service |
a2ae7a |
[
|
|
Packit Service |
a2ae7a |
AC_CHECK_HEADERS_ONCE([unistd.h sys/param.h])
|
|
Packit Service |
a2ae7a |
])
|