summaryrefslogtreecommitdiff
path: root/gdb/gnulib/import
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gnulib/import')
-rw-r--r--gdb/gnulib/import/Makefile.am9
-rw-r--r--gdb/gnulib/import/Makefile.in5
-rw-r--r--gdb/gnulib/import/m4/gnulib-cache.m43
-rw-r--r--gdb/gnulib/import/m4/gnulib-comp.m44
-rw-r--r--gdb/gnulib/import/m4/pathmax.m442
-rw-r--r--gdb/gnulib/import/pathmax.h83
6 files changed, 142 insertions, 4 deletions
diff --git a/gdb/gnulib/import/Makefile.am b/gdb/gnulib/import/Makefile.am
index ac38ef6c8c3..0c2f424d5fa 100644
--- a/gdb/gnulib/import/Makefile.am
+++ b/gdb/gnulib/import/Makefile.am
@@ -21,7 +21,7 @@
# 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
@@ -674,6 +674,13 @@ EXTRA_libgnu_a_SOURCES += memmem.c
## 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
diff --git a/gdb/gnulib/import/Makefile.in b/gdb/gnulib/import/Makefile.in
index 0f377478d30..59c1c66d85a 100644
--- a/gdb/gnulib/import/Makefile.in
+++ b/gdb/gnulib/import/Makefile.in
@@ -36,7 +36,7 @@
# 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
@@ -100,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/import/m4/00gnulib.m4 \
$(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 \
@@ -937,7 +938,7 @@ EXTRA_DIST = m4/gnulib-cache.m4 alloca.c alloca.in.h float.c \
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 \
diff --git a/gdb/gnulib/import/m4/gnulib-cache.m4 b/gdb/gnulib/import/m4/gnulib-cache.m4
index 9cf71c92761..511df9cdd2f 100644
--- a/gdb/gnulib/import/m4/gnulib-cache.m4
+++ b/gdb/gnulib/import/m4/gnulib-cache.m4
@@ -27,7 +27,7 @@
# 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([])
@@ -36,6 +36,7 @@ gl_MODULES([
frexpl
inttypes
memmem
+ pathmax
unistd
update-copyright
])
diff --git a/gdb/gnulib/import/m4/gnulib-comp.m4 b/gdb/gnulib/import/m4/gnulib-comp.m4
index 8f151cbef38..77c1b249e09 100644
--- a/gdb/gnulib/import/m4/gnulib-comp.m4
+++ b/gdb/gnulib/import/m4/gnulib-comp.m4
@@ -66,6 +66,7 @@ AC_DEFUN([gl_EARLY],
# 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:
@@ -181,6 +182,7 @@ AC_DEFUN([gl_INIT],
fi
gl_STRING_MODULE_INDICATOR([memmem])
gl_MULTIARCH
+ gl_PATHMAX
gt_TYPE_SSIZE_T
AM_STDBOOL_H
gl_STDDEF_H
@@ -366,6 +368,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/memchr.c
lib/memchr.valgrind
lib/memmem.c
+ lib/pathmax.h
lib/ref-add.sin
lib/ref-del.sin
lib/stdbool.in.h
@@ -419,6 +422,7 @@ AC_DEFUN([gl_FILE_LIST], [
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
diff --git a/gdb/gnulib/import/m4/pathmax.m4 b/gdb/gnulib/import/m4/pathmax.m4
new file mode 100644
index 00000000000..011786129e0
--- /dev/null
+++ b/gdb/gnulib/import/m4/pathmax.m4
@@ -0,0 +1,42 @@
+# 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])
+])
diff --git a/gdb/gnulib/import/pathmax.h b/gdb/gnulib/import/pathmax.h
new file mode 100644
index 00000000000..03db7cb519b
--- /dev/null
+++ b/gdb/gnulib/import/pathmax.h
@@ -0,0 +1,83 @@
+/* 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 */