From 6df372680c56c386edba7333490588fac1a3aa63 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 31 Jan 2012 22:04:34 -0800 Subject: Port to older Solaris 10 versions (Bug#10677). Bug reported by Chong Yidong for SunOS 5.10 Generic_127111-11 sparc. I cannot reproduce it on SunOS 5.10 Generic_141444-09 sparc but possibly this is because Sun fixed the 'stat' bug in my version. * Makefile.in (GNULIB_TOOL_FLAGS): Do not avoid the pathmax module. * lib/pathmax.h, m4/pathmax.m4: New files, from gnulib. * lib/gnulib.mk, m4/gl-comp.m4: Regenerate. These changes are based on gnulib version 4f11d6bebc3098c64ffde27079ab0d0cecfd0cdc dated 2011-10-07 20:59:10, because Emacs is in feature freeze and we do not want to merge any more-recent changes from gnulib. --- m4/pathmax.m4 | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 m4/pathmax.m4 (limited to 'm4/pathmax.m4') diff --git a/m4/pathmax.m4 b/m4/pathmax.m4 new file mode 100644 index 00000000000..4913fa06cb8 --- /dev/null +++ b/m4/pathmax.m4 @@ -0,0 +1,42 @@ +# pathmax.m4 serial 10 +dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation, +dnl Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_PATHMAX], +[ + dnl Prerequisites of lib/pathmax.h. + AC_CHECK_HEADERS_ONCE([sys/param.h]) +]) + +# Expands to a piece of C program that defines PATH_MAX in the same way as +# "pathmax.h" will do. +AC_DEFUN([gl_PATHMAX_SNIPPET], [[ +/* Arrange to define PATH_MAX, like "pathmax.h" does. */ +#if HAVE_UNISTD_H +# include +#endif +#include +#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN +# include +#endif +#if !defined PATH_MAX && defined MAXPATHLEN +# define PATH_MAX MAXPATHLEN +#endif +#ifdef __hpux +# undef PATH_MAX +# define PATH_MAX 1024 +#endif +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# undef PATH_MAX +# define PATH_MAX 260 +#endif +]]) + +# Prerequisites of gl_PATHMAX_SNIPPET. +AC_DEFUN([gl_PATHMAX_SNIPPET_PREREQ], +[ + AC_CHECK_HEADERS_ONCE([unistd.h sys/param.h]) +]) -- cgit v1.2.1