Blame m4/pathmax.m4

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