+2013-07-01 Pedro Alves <palves@redhat.com>
+
+ * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add pathmax.
+ * gnulib/Makefile.in (aclocal_m4_deps): Add import/m4/pathmax.m4.
+ * gnulib/aclocal.m4: Regenerate.
+ * gnulib/config.in: Regenerate.
+ * gnulib/configure: Regenerate.
+ * gnulib/import/pathmax.h: New file.
+ * gnulib/import/Makefile.am: Regenerate.
+ * gnulib/import/Makefile.in: Regenerate.
+ * gnulib/import/m4/gnulib-cache.m4: Regenerate.
+ * gnulib/import/m4/gnulib-comp.m4: Regenerate.
+ * gnulib/import/m4/pathmax.m4: New file.
+
2013-07-01 Pedro Alves <palves@redhat.com>
* configure.ac (GDBINIT): Define, depending on host.
import/m4/mmap-anon.m4 \
import/m4/multiarch.m4 \
import/m4/off_t.m4 \
+ import/m4/pathmax.m4 \
import/m4/ssize_t.m4 \
import/m4/stdbool.m4 \
import/m4/stddef_h.m4 \
m4_include([import/m4/mmap-anon.m4])
m4_include([import/m4/multiarch.m4])
m4_include([import/m4/off_t.m4])
+m4_include([import/m4/pathmax.m4])
m4_include([import/m4/ssize_t.m4])
m4_include([import/m4/stdbool.m4])
m4_include([import/m4/stddef_h.m4])
/* Define to 1 if you have the <sys/mman.h> header file. */
#undef HAVE_SYS_MMAN_H
+/* Define to 1 if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
as_fn_append ac_func_list " mbrtowc"
as_fn_append ac_header_list " sys/mman.h"
as_fn_append ac_func_list " mprotect"
+as_fn_append ac_header_list " sys/param.h"
as_fn_append ac_header_list " features.h"
as_fn_append ac_func_list " iswcntrl"
# Check that the precious variables saved in the cache have kept the same
# Code from module memmem:
# Code from module memmem-simple:
# Code from module multiarch:
+ # Code from module pathmax:
# Code from module snippet/arg-nonnull:
# Code from module snippet/c++defs:
# Code from module snippet/warn-on-use:
fi
:
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
if test "${ac_cv_header_stdbool_h+set}" = set; then :
+
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
$as_echo_n "checking for ssize_t... " >&6; }
if test "${gt_cv_ssize_t+set}" = set; then :
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=import --m4-base=import/m4 --doc-base=doc --tests-base=tests --aux-dir=import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files fnmatch-gnu frexpl inttypes memmem unistd update-copyright
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=import --m4-base=import/m4 --doc-base=doc --tests-base=tests --aux-dir=import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files fnmatch-gnu frexpl inttypes memmem pathmax unistd update-copyright
AUTOMAKE_OPTIONS = 1.5 gnits
## end gnulib module memmem-simple
+## begin gnulib module pathmax
+
+
+EXTRA_DIST += pathmax.h
+
+## end gnulib module pathmax
+
## begin gnulib module snippet/arg-nonnull
# The BUILT_SOURCES created by this Makefile snippet are not used via #include
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=import --m4-base=import/m4 --doc-base=doc --tests-base=tests --aux-dir=import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files fnmatch-gnu frexpl inttypes memmem unistd update-copyright
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=import --m4-base=import/m4 --doc-base=doc --tests-base=tests --aux-dir=import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files fnmatch-gnu frexpl inttypes memmem pathmax unistd update-copyright
$(top_srcdir)/import/m4/mmap-anon.m4 \
$(top_srcdir)/import/m4/multiarch.m4 \
$(top_srcdir)/import/m4/off_t.m4 \
+ $(top_srcdir)/import/m4/pathmax.m4 \
$(top_srcdir)/import/m4/ssize_t.m4 \
$(top_srcdir)/import/m4/stdbool.m4 \
$(top_srcdir)/import/m4/stddef_h.m4 \
isnanl-nolibm.h isnanl.c config.charset ref-add.sin \
ref-del.sin math.in.h mbrtowc.c mbsinit.c mbsrtowcs-impl.h \
mbsrtowcs-state.c mbsrtowcs.c memchr.c memchr.valgrind \
- memmem.c str-two-way.h \
+ memmem.c str-two-way.h pathmax.h \
$(top_srcdir)/import/extra/snippet/arg-nonnull.h \
$(top_srcdir)/import/extra/snippet/c++defs.h \
$(top_srcdir)/import/extra/snippet/warn-on-use.h stdbool.in.h \
# Specification in the form of a command-line invocation:
-# gnulib-tool --import --dir=. --lib=libgnu --source-base=import --m4-base=import/m4 --doc-base=doc --tests-base=tests --aux-dir=import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files fnmatch-gnu frexpl inttypes memmem unistd update-copyright
+# gnulib-tool --import --dir=. --lib=libgnu --source-base=import --m4-base=import/m4 --doc-base=doc --tests-base=tests --aux-dir=import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files fnmatch-gnu frexpl inttypes memmem pathmax unistd update-copyright
# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([])
frexpl
inttypes
memmem
+ pathmax
unistd
update-copyright
])
# Code from module memmem:
# Code from module memmem-simple:
# Code from module multiarch:
+ # Code from module pathmax:
# Code from module snippet/arg-nonnull:
# Code from module snippet/c++defs:
# Code from module snippet/warn-on-use:
fi
gl_STRING_MODULE_INDICATOR([memmem])
gl_MULTIARCH
+ gl_PATHMAX
gt_TYPE_SSIZE_T
AM_STDBOOL_H
gl_STDDEF_H
lib/memchr.c
lib/memchr.valgrind
lib/memmem.c
+ lib/pathmax.h
lib/ref-add.sin
lib/ref-del.sin
lib/stdbool.in.h
m4/mmap-anon.m4
m4/multiarch.m4
m4/off_t.m4
+ m4/pathmax.m4
m4/ssize_t.m4
m4/stdbool.m4
m4/stddef_h.m4
--- /dev/null
+# pathmax.m4 serial 10
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2012 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 <unistd.h>
+#endif
+#include <limits.h>
+#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
+# include <sys/param.h>
+#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])
+])
--- /dev/null
+/* Define PATH_MAX somehow. Requires sys/types.h.
+ Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2012 Free Software
+ Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _PATHMAX_H
+# define _PATHMAX_H
+
+/* POSIX:2008 defines PATH_MAX to be the maximum number of bytes in a filename,
+ including the terminating NUL byte.
+ <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html>
+ PATH_MAX is not defined on systems which have no limit on filename length,
+ such as GNU/Hurd.
+
+ This file does *not* define PATH_MAX always. Programs that use this file
+ can handle the GNU/Hurd case in several ways:
+ - Either with a package-wide handling, or with a per-file handling,
+ - Either through a
+ #ifdef PATH_MAX
+ or through a fallback like
+ #ifndef PATH_MAX
+ # define PATH_MAX 8192
+ #endif
+ or through a fallback like
+ #ifndef PATH_MAX
+ # define PATH_MAX pathconf ("/", _PC_PATH_MAX)
+ #endif
+ */
+
+# include <unistd.h>
+
+# include <limits.h>
+
+# ifndef _POSIX_PATH_MAX
+# define _POSIX_PATH_MAX 256
+# endif
+
+/* Don't include sys/param.h if it already has been. */
+# if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
+# include <sys/param.h>
+# endif
+
+# if !defined PATH_MAX && defined MAXPATHLEN
+# define PATH_MAX MAXPATHLEN
+# endif
+
+# ifdef __hpux
+/* On HP-UX, PATH_MAX designates the maximum number of bytes in a filename,
+ *not* including the terminating NUL byte, and is set to 1023.
+ Additionally, when _XOPEN_SOURCE is defined to 500 or more, PATH_MAX is
+ not defined at all any more. */
+# undef PATH_MAX
+# define PATH_MAX 1024
+# endif
+
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* The page "Naming Files, Paths, and Namespaces" on msdn.microsoft.com,
+ section "Maximum Path Length Limitation",
+ <http://msdn.microsoft.com/en-us/library/aa365247(v=vs.85).aspx#maxpath>
+ explains that the maximum size of a filename, including the terminating
+ NUL byte, is 260 = 3 + 256 + 1.
+ This is the same value as
+ - FILENAME_MAX in <stdio.h>,
+ - _MAX_PATH in <stdlib.h>,
+ - MAX_PATH in <windef.h>.
+ Undefine the original value, because mingw's <limits.h> gets it wrong. */
+# undef PATH_MAX
+# define PATH_MAX 260
+# endif
+
+#endif /* _PATHMAX_H */
# regenerate the various scripts and Makefiles are on the PATH.
# The list of gnulib modules we are importing in GDB.
-IMPORTED_GNULIB_MODULES="fnmatch-gnu frexpl inttypes memmem update-copyright unistd"
+IMPORTED_GNULIB_MODULES="fnmatch-gnu frexpl inttypes memmem update-copyright unistd pathmax"
# The gnulib commit ID to use for the update.
GNULIB_COMMIT_SHA1="8d5bd1402003bd0153984b138735adf537d960b0"