summaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2010-01-26 15:39:52 +0100
committerSimon Josefsson <simon@josefsson.org>2010-01-26 15:39:52 +0100
commitd8d94c27e1c30a7a09fbfa77bdfd995e2307a7f6 (patch)
tree0b1ee6da324163860b2a2ea7a23c8946a59031ac /build-aux
parentba4d206c53fdd9f6c1b19c2ae571054b5765c5f2 (diff)
downloadgnutls-d8d94c27e1c30a7a09fbfa77bdfd995e2307a7f6.tar.gz
Update gnulib files.
Diffstat (limited to 'build-aux')
-rw-r--r--build-aux/arg-nonnull.h26
-rwxr-xr-xbuild-aux/config.rpath2
-rwxr-xr-xbuild-aux/gendocs.sh8
-rwxr-xr-xbuild-aux/gnupload53
-rw-r--r--build-aux/link-warning.h28
-rw-r--r--build-aux/pmccabe2html74
-rwxr-xr-xbuild-aux/useless-if-before-free2
-rwxr-xr-xbuild-aux/vc-list-files2
-rw-r--r--build-aux/warn-on-use.h75
9 files changed, 171 insertions, 99 deletions
diff --git a/build-aux/arg-nonnull.h b/build-aux/arg-nonnull.h
new file mode 100644
index 0000000000..7e3e2db82e
--- /dev/null
+++ b/build-aux/arg-nonnull.h
@@ -0,0 +1,26 @@
+/* A C macro for declaring that specific arguments must not be NULL.
+ Copyright (C) 2009, 2010 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 of the License, 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
+ Lesser 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/>. */
+
+/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
+ that the values passed as arguments n, ..., m must be non-NULL pointers.
+ n = 1 stands for the first argument, n = 2 for the second argument etc. */
+#ifndef _GL_ARG_NONNULL
+# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
+# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
+# else
+# define _GL_ARG_NONNULL(params)
+# endif
+#endif
diff --git a/build-aux/config.rpath b/build-aux/config.rpath
index 85c2f209be..17298f2348 100755
--- a/build-aux/config.rpath
+++ b/build-aux/config.rpath
@@ -2,7 +2,7 @@
# Output a system dependent set of variables, describing how to set the
# run time search path of shared libraries in an executable.
#
-# Copyright 1996-2008 Free Software Foundation, Inc.
+# Copyright 1996-2010 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
diff --git a/build-aux/gendocs.sh b/build-aux/gendocs.sh
index 992d9fc32c..b50a6c7ffd 100755
--- a/build-aux/gendocs.sh
+++ b/build-aux/gendocs.sh
@@ -1,10 +1,10 @@
-#!/bin/sh
+#!/bin/sh -e
# gendocs.sh -- generate a GNU manual in many formats. This script is
# mentioned in maintain.texi. See the help message below for usage details.
-scriptversion=2009-09-09.22
+scriptversion=2010-01-02.16
-# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009
+# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
# Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
@@ -268,7 +268,7 @@ else
fi
echo Making .tar.gz for sources...
-srcfiles=`ls *.texinfo *.texi *.txi *.eps 2>/dev/null`
+srcfiles=`ls *.texinfo *.texi *.txi *.eps 2>/dev/null` || true
tar cvzfh $outdir/$PACKAGE.texi.tar.gz $srcfiles
texi_tgz_size=`calcsize $outdir/$PACKAGE.texi.tar.gz`
diff --git a/build-aux/gnupload b/build-aux/gnupload
index 002cee39a7..bfdad59b6a 100755
--- a/build-aux/gnupload
+++ b/build-aux/gnupload
@@ -1,7 +1,7 @@
#!/bin/sh
# Sign files and upload them.
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2009-12-21.21; # UTC
# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation
#
@@ -73,34 +73,33 @@ actual command line options. Use this to keep your defaults. Comments
(#) and empty lines in $conffile are allowed.
Examples:
-1. Upload automake-1.8.2b.tar.gz and automake-1.8.2b.tar.bz2 to two sites:
- gnupload --to sources.redhat.com:~ftp/pub/automake \\
- --to alpha.gnu.org:automake \\
- automake-1.8.2b.tar.gz automake-1.8.2b.tar.bz2
-
-2. Same as above, but also create symbolic links to automake-latest.tar.*:
- gnupload --to sources.redhat.com:~ftp/pub/automake \\
- --to alpha.gnu.org:automake \\
- --symlink-regex \\
- automake-1.8.2b.tar.gz automake-1.8.2b.tar.bz2
-
-3. Symlink automake-1.8.2b.tar.gz to automake-latest.tar.gz and
-automake-1.8.2b.tar.bz2 to automake-latest.tar.bz2 on both sites:
+1. Upload foobar-1.0.tar.gz to ftp.gnu.org:
+ gnupload --to ftp.gnu.org:foobar foobar-1.0.tar.gz
- gnupload --to sources.redhat.com:~ftp/pub/automake \\
- --to alpha.gnu.org:automake \\
- --symlink automake-1.8.2b.tar.gz automake-latest.tar.gz \\
- automake-1.8.2b.tar.bz2 automake-latest.tar.bz2
+2. Upload foobar-1.0.tar.gz and foobar-1.0.tar.xz to ftp.gnu.org:
+ gnupload --to ftp.gnu.org:foobar foobar-1.0.tar.gz foobar-1.0.tar.xz
-4. Delete automake-1.8.2a.tar.gz and .bz2, remove symlink
-automake-latest.tar.gz and upload automake-1.8.2b.tar.gz:
-
- gnupload --to sources.redhat.com:~ftp/pub/automake \\
- --to alpha.gnu.org:automake \\
- --delete automake-1.8.2a.tar.gz automake-1.8.2a.tar.bz2 \\
- --rmsymlink automake-latest.tar.gz \\
- -- \\
- automake-1.8.2b.tar.gz automake-1.8.2b.tar.bz2
+3. Same as above, and also create symbolic links to foobar-latest.tar.*:
+ gnupload --to ftp.gnu.org:foobar \\
+ --symlink-regex \\
+ foobar-1.0.tar.gz foobar-1.0.tar.xz
+
+4. Upload foobar-0.9.90.tar.gz to two sites:
+ gnupload --to alpha.gnu.org:foobar \\
+ --to sources.redhat.com:~ftp/pub/foobar \\
+ foobar-0.9.90.tar.gz
+
+5. Delete oopsbar-0.9.91.tar.gz and upload foobar-0.9.91.tar.gz
+ (the -- terminates the list of files to delete):
+ gnupload --to alpha.gnu.org:foobar \\
+ --to sources.redhat.com:~ftp/pub/foobar \\
+ --delete oopsbar-0.9.91.tar.gz \\
+ -- foobar-0.9.91.tar.gz
+
+gnupload uses the ncftpput program to do the transfers; if you don't
+happen to have an ncftp package installed, the ncftpput-ftp script in
+the build-aux/ directory of the gnulib package
+(http://savannah.gnu.org/projects/gnulib) may serve as a replacement.
Report bugs to <bug-automake@gnu.org>.
Send patches to <automake-patches@gnu.org>."
diff --git a/build-aux/link-warning.h b/build-aux/link-warning.h
deleted file mode 100644
index fda01941af..0000000000
--- a/build-aux/link-warning.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* GL_LINK_WARNING("literal string") arranges to emit the literal string as
- a linker warning on most glibc systems.
- We use a linker warning rather than a preprocessor warning, because
- #warning cannot be used inside macros. */
-#ifndef GL_LINK_WARNING
- /* This works on platforms with GNU ld and ELF object format.
- Testing __GLIBC__ is sufficient for asserting that GNU ld is in use.
- Testing __ELF__ guarantees the ELF object format.
- Testing __GNUC__ is necessary for the compound expression syntax. */
-# if defined __GLIBC__ && defined __ELF__ && defined __GNUC__
-# define GL_LINK_WARNING(message) \
- GL_LINK_WARNING1 (__FILE__, __LINE__, message)
-# define GL_LINK_WARNING1(file, line, message) \
- GL_LINK_WARNING2 (file, line, message) /* macroexpand file and line */
-# define GL_LINK_WARNING2(file, line, message) \
- GL_LINK_WARNING3 (file ":" #line ": warning: " message)
-# define GL_LINK_WARNING3(message) \
- ({ static const char warning[sizeof (message)] \
- __attribute__ ((__unused__, \
- __section__ (".gnu.warning"), \
- __aligned__ (1))) \
- = message "\n"; \
- (void)0; \
- })
-# else
-# define GL_LINK_WARNING(message) ((void) 0)
-# endif
-#endif
diff --git a/build-aux/pmccabe2html b/build-aux/pmccabe2html
index dd397cff19..3f887adc7d 100644
--- a/build-aux/pmccabe2html
+++ b/build-aux/pmccabe2html
@@ -1,6 +1,6 @@
# pmccabe2html - AWK script to convert pmccabe output to html
-# Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2008, 2009, 2010 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
@@ -64,7 +64,7 @@ BEGIN {
html_prolog = "<a href=\"" url "\">Back to " package_name " Homepage</a><br/><br/>"
}
html_epilog = "<hr color=\"black\" size=\"2\"/> \
-Copyright (c) 2007, 2008 Free Software Foundation Inc."
+Copyright (c) 2007, 2008 Free Software Foundation, Inc."
html_doctype = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \
\"http://www.w3.org/TR/html401/loose.dtd\">"
html_comment = "<!-- Generated by gnulib's pmccabe2html at " systime() " -->"
@@ -135,22 +135,22 @@ function html_fnc_table (caption,
{
print "<caption class=\"function_table_caption\">" caption "</caption>"
}
- html_fnc_header(fname_p,
- mcyclo_p,
- cyclo_p,
- num_statements_p,
- num_lines_p,
- first_line_p,
+ html_fnc_header(fname_p,
+ mcyclo_p,
+ cyclo_p,
+ num_statements_p,
+ num_lines_p,
+ first_line_p,
file_p)
for (nfnc = 1; nfnc < nfuncs; nfnc++)
{
html_fnc(nfnc,
- fname_p,
- mcyclo_p,
- cyclo_p,
- num_statements_p,
- num_lines_p,
- first_line_p,
+ fname_p,
+ mcyclo_p,
+ cyclo_p,
+ num_statements_p,
+ num_lines_p,
+ first_line_p,
file_p)
}
print "</table>"
@@ -307,7 +307,7 @@ function html_fnc (nfun,
if (mcyclo[nfun] > cyclo_high_max)
{
trclass="function_entry_untestable"
- }
+ }
else if (mcyclo[nfun] > cyclo_moderate_max)
{
trclass="function_entry_high"
@@ -391,7 +391,7 @@ function html_fnc (nfun,
{
print file[nfun]
}
-
+
print "</td>"
@@ -409,7 +409,7 @@ function html_fnc (nfun,
if (num_lines_p) { num_columns++ }
if (first_line_p) { num_columns++ }
if (file_p) { num_columns++ }
-
+
print "<td colspan=\"" num_columns "\" height=\"0\">"
print "<div id=\"" fname "_src\" class=\"function_src\" style=\"position: relative; display: none;\">"
print "<pre class=\"function_src\">"
@@ -419,7 +419,7 @@ function html_fnc (nfun,
sub(/\\</, "&lt;", codeline)
sub(/\\>/, "&gt;", codeline)
sub(/&/, "&amp;", codeline)
-
+
print codeline
}
close(fname nfun "_fn.txt")
@@ -517,7 +517,7 @@ function html_function_cyclo ()
print "Simple module, without much risk"
print "</td>"
print "</tr>"
- # Moderate
+ # Moderate
print "<tr>"
print "<td class=\"ranges_entry_moderate\">"
print "&nbsp;"
@@ -589,7 +589,7 @@ function wiki_function_cyclo ()
print "==Details for all functions=="
print "Used ranges:"
-
+
print "{| class =\"cyclo_ranges_table\""
print "|-"
print "| class=\"cyclo_ranges_header_entry\" | "
@@ -646,22 +646,22 @@ function wiki_fnc_table (caption,
{
print "|+" caption
}
- wiki_fnc_header(fname_p,
- mcyclo_p,
- cyclo_p,
- num_statements_p,
- num_lines_p,
- first_line_p,
+ wiki_fnc_header(fname_p,
+ mcyclo_p,
+ cyclo_p,
+ num_statements_p,
+ num_lines_p,
+ first_line_p,
file_p)
for (nfnc = 1; nfnc < nfuncs; nfnc++)
{
wiki_fnc(nfnc,
- fname_p,
- mcyclo_p,
- cyclo_p,
- num_statements_p,
- num_lines_p,
- first_line_p,
+ fname_p,
+ mcyclo_p,
+ cyclo_p,
+ num_statements_p,
+ num_lines_p,
+ first_line_p,
file_p)
}
print "|}"
@@ -724,7 +724,7 @@ function wiki_fnc (nfnc,
if (mcyclo[nfnc] > cyclo_high_max)
{
trclass="cyclo_function_entry_untestable"
- }
+ }
else if (mcyclo[nfnc] > cyclo_moderate_max)
{
trclass="cyclo_function_entry_high"
@@ -773,7 +773,7 @@ function wiki_fnc (nfnc,
href = source_file_link_tmpl
sub(/%FILENAME%/, file[nfnc], href)
}
-
+
# Source file
print "| class=\"cyclo_function_entry_filename\" |" \
((href != "") ? "[" href " " file[nfnc] "]" : "[" file[nfnc] "]")
@@ -838,7 +838,7 @@ END {
}
# Print prolog
- if ((output_lang == "html") &&
+ if ((output_lang == "html") &&
(html_prolog != ""))
{
print html_prolog
@@ -884,9 +884,9 @@ END {
wiki_function_cyclo()
}
}
-
+
# Print epilog
- if ((output_lang == "html") &&
+ if ((output_lang == "html") &&
(html_epilog != ""))
{
print html_epilog
diff --git a/build-aux/useless-if-before-free b/build-aux/useless-if-before-free
index 793c9753e0..6aa7d3965f 100755
--- a/build-aux/useless-if-before-free
+++ b/build-aux/useless-if-before-free
@@ -12,7 +12,7 @@ my $VERSION = '2009-04-16 15:57'; # UTC
# If you change this file with Emacs, please let the write hook
# do its job. Otherwise, update this string manually.
-# Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2008-2010 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
diff --git a/build-aux/vc-list-files b/build-aux/vc-list-files
index cc716e9c35..c07576d0d1 100755
--- a/build-aux/vc-list-files
+++ b/build-aux/vc-list-files
@@ -4,7 +4,7 @@
# Print a version string.
scriptversion=2009-07-21.16; # UTC
-# Copyright (C) 2006-2009 Free Software Foundation, Inc.
+# Copyright (C) 2006-2010 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
diff --git a/build-aux/warn-on-use.h b/build-aux/warn-on-use.h
new file mode 100644
index 0000000000..b314d36bc4
--- /dev/null
+++ b/build-aux/warn-on-use.h
@@ -0,0 +1,75 @@
+/* A C macro for emitting warnings if a function is used.
+ Copyright (C) 2010 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 of the License, 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
+ Lesser 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/>. */
+
+/* _GL_WARN_ON_USE(function, "literal string") issues a declaration
+ for FUNCTION which will then trigger a compiler warning containing
+ the text of "literal string" anywhere that function is called, if
+ supported by the compiler. If the compiler does not support this
+ feature, the macro expands to an unused extern declaration.
+
+ This macro is useful for marking a function as a potential
+ portability trap, with the intent that "literal string" include
+ instructions on the replacement function that should be used
+ instead. However, one of the reasons that a function is a
+ portability trap is if it has the wrong signature. Declaring
+ FUNCTION with a different signature in C is a compilation error, so
+ this macro must use the same type as any existing declaration so
+ that programs that avoid the problematic FUNCTION do not fail to
+ compile merely because they included a header that poisoned the
+ function. But this implies that _GL_WARN_ON_USE is only safe to
+ use if FUNCTION is known to already have a declaration. Use of
+ this macro implies that there must not be any other macro hiding
+ the declaration of FUNCTION; but undefining FUNCTION first is part
+ of the poisoning process anyway (although for symbols that are
+ provided only via a macro, the result is a compilation error rather
+ than a warning containing "literal string"). Also note that in
+ C++, it is only safe to use if FUNCTION has no overloads.
+
+ For an example, it is possible to poison 'getline' by:
+ - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]],
+ [getline]) in configure.ac, which potentially defines
+ HAVE_RAW_DECL_GETLINE
+ - adding this code to a header that wraps the system <stdio.h>:
+ #undef getline
+ #if HAVE_RAW_DECL_GETLINE
+ _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but"
+ "not universally present; use the gnulib module getline");
+ #endif
+
+ It is not possible to directly poison global variables. But it is
+ possible to write a wrapper accessor function, and poison that
+ (less common usage, like &environ, will cause a compilation error
+ rather than issue the nice warning, but the end result of informing
+ the developer about their portability problem is still achieved):
+ #if HAVE_RAW_DECL_ENVIRON
+ static inline char ***rpl_environ (void) { return &environ; }
+ _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
+ # undef environ
+ # define environ (*rpl_environ ())
+ #endif
+ */
+#ifndef _GL_WARN_ON_USE
+
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
+/* A compiler attribute is available in gcc versions 4.3.0 and later. */
+# define _GL_WARN_ON_USE(function, message) \
+extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
+
+# else /* Unsupported. */
+# define _GL_WARN_ON_USE(function, message) \
+extern int _gl_warn_on_use
+# endif
+#endif