Blame m4/pathmax.m4

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