Imported Upstream version 1.4.15

This commit is contained in:
Jan Wagner 2013-11-26 23:57:29 +01:00
parent 882cdeecca
commit 047baae1ca
386 changed files with 60019 additions and 38317 deletions

6
BUGS
View file

@ -2,9 +2,11 @@ This file lists the major bugs from the Nagios Plugins page on Sourceforge
at http://sourceforge.net/tracker/?group_id=29880&atid=397597. These are not
necessarily verified as errors.
For the 1.4.14 release:
For the 1.4.15 release:
2832451 - check_snmp regression parsing multi-line snmpget responses
3028955 - check_users always reports 1 user connected in French
3003419 - check_snmp converts negative values to positive
2991170 - check_nt segfaults on unexpected server response
2826570 - check_http does not work with some HTTPS servers
2823005 - check_swap returns OK if no swap activated
2786808 - check_http asks for HTTP/1.1, but doesn't understand chunked

939
ChangeLog
View file

@ -1,3 +1,942 @@
2010-07-14 Ton Voon <ton.voon@opsera.com>
* : commit 9bab433981f6c67b40776d1916baae28a0243124 Author: Ton Voon
<ton.voon@opsera.com> Date: Wed Jul 14 14:22:04 2010 +0100
2010-07-09 Thomas Guyot-Sionnest <dermoth@aei.ca>
* plugins/check_snmp.c, po/de.po, po/fr.po, po/nagios-plugins.pot:
Fix --help output when MAX_OIDS is altered.
2010-07-07 Ton Voon <ton.voon@opsera.com>
* NEWS, plugins/check_disk.c: Fix examples in check_disk, where it
implied was possible to suffix unit values to warn/crit parameters
2010-07-07 Ton Voon <ton.voon@opsera.com>
* NEWS, THANKS.in, plugins-scripts/check_ifstatus.pl: Allow
check_ifstatus to accept version=2c
2010-07-02 Thomas Guyot-Sionnest <dermoth@aei.ca>
* NEWS, lib/utils_cmd.c: Fix cmd_run overwriting the environment Some commands need the environment to function properly. One such
example is check_ssh and check_by_ssh when a SOCKS proxy is
required. This patch use setenv and extern char **environ to alter and pass
the new environment to the child process Those modules have been
added to Gnulib for portability.
2010-07-02 Thomas Guyot-Sionnest <dermoth@aei.ca>
* gl/Makefile.am, gl/m4/gnulib-cache.m4: Import the environ module
from gnulib (86ba51)
2010-07-02 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify: git-notify: Be careful with "--no-merge" The "-X" option (which asks git-notify to not report merge commits)
was implemented by setting the "--no-merge" option on each
invocation of git-rev-list(1). However, we do not only use
git-rev-list(1) to get the list of new commits, but also to check
whether the old branch head (or tag) is a parent of the new branch
head (or tag). For this latter check, the "--no-merge" option
should not be set; otherwise, git-notify would be fooled to believe
that the branch has been rewritten if the old head was a merge
commit.
2010-06-30 tonvoon <ton.voon@opsview.com>
* plugins/check_snmp.c, plugins/tests/check_snmp.t: Corrected
rate_multiplier calculation
2010-06-30 tonvoon <ton.voon@opsview.com>
* plugins/check_snmp.c, plugins/tests/check_snmp.t: Removed suffix
of "-rate" and let user decide label via --label
2010-06-30 tonvoon <ton.voon@opsview.com>
* plugins/check_snmp.c, plugins/tests/check_snmp.t: Tests for
--rate-multiplier option
2010-06-30 Ton Voon <ton.voon@opsera.com>
* : commit 6805fecd620e4f2c2fa53f2a331e7c6a005ea9c4 Author: Ton Voon
<ton.voon@opsera.com> Date: Wed Jun 30 09:01:14 2010 +0100
2010-06-25 tonvoon <ton.voon@opsview.com>
* lib/tests/Makefile.am: Add test file directory
2010-06-24 Ton Voon <ton.voon@opsera.com>
* lib/tests/test_utils.c, lib/utils_base.c: Cleanup some warnings
displayed from IRIX tinderbox server
2010-06-24 Ton Voon <ton.voon@opsera.com>
* gl/Makefile.am, gl/m4/eealloc.m4, gl/m4/environ.m4,
gl/m4/gnulib-cache.m4, gl/m4/gnulib-comp.m4, gl/m4/malloca.m4,
gl/m4/setenv.m4, gl/malloca.c, gl/malloca.h, gl/malloca.valgrind,
gl/setenv.c, gl/unsetenv.c: Added unsetenv and setenv from gnulib
2010-06-24 Ton Voon <ton.voon@opsera.com>
* gl/Makefile.am, gl/m4/gnulib-cache.m4, gl/m4/gnulib-comp.m4,
gl/m4/strsep.m4, gl/strsep.c: Added strsep to gnulib, for
check_snmp.c
2010-06-23 tonvoon <ton.voon@opsview.com>
* NEWS, plugins/check_snmp.c, plugins/tests/check_snmp.t,
plugins/tests/check_snmp_agent.pl, po/de.po, po/fr.po,
po/nagios-plugins.pot: Added option to invert search results
2010-06-23 tonvoon <ton.voon@opsview.com>
* NEWS, plugins/check_http.c, plugins/tests/check_http.t: Display
missing search string and URL when failed (Duncan Ferguson #2999924)
2010-06-17 Ton Voon <ton.voon@opsera.com>
* NEWS, build-aux/c++defs.h, build-aux/warn-on-use.h,
gl/Makefile.am, gl/alloca.c, gl/config.charset, gl/error.c,
gl/getopt.c, gl/getopt_int.h, gl/localcharset.c,
gl/m4/asm-underscore.m4, gl/m4/getopt.m4, gl/m4/gettext.m4,
gl/m4/gnulib-cache.m4, gl/m4/gnulib-common.m4,
gl/m4/gnulib-comp.m4, gl/m4/iconv.m4, gl/m4/intl.m4,
gl/m4/lib-link.m4, gl/m4/netdb_h.m4, gl/m4/onceonly.m4,
gl/m4/po.m4, gl/m4/printf.m4, gl/m4/sha1.m4, gl/m4/sockpfaf.m4,
gl/m4/stdint.m4, gl/m4/stdio_h.m4, gl/m4/string_h.m4,
gl/m4/strnlen.m4, gl/m4/time_h.m4, gl/m4/unistd_h.m4,
gl/m4/vasnprintf.m4, gl/m4/visibility.m4, gl/netdb.in.h,
gl/regex_internal.c, gl/regex_internal.h, gl/sha1.c, gl/sha1.h,
gl/stdbool.in.h, gl/stdio-write.c, gl/stdio.in.h, gl/strerror.c,
gl/string.in.h, gl/sys_stat.in.h, gl/time.in.h, gl/unistd.in.h,
gl/vasnprintf.c, gl/verify.h, gl/wchar.in.h, lib/Makefile.am,
lib/tests/Makefile.am, lib/tests/test_utils.c,
lib/tests/var/.gitignore, lib/tests/var/baddate,
lib/tests/var/missingdataline, lib/tests/var/oldformat,
lib/tests/var/statefile, lib/utils_base.c, lib/utils_base.h,
plugins/Makefile.am, plugins/check_snmp.c,
plugins/tests/check_snmp.t, plugins/tests/check_snmp_agent.pl: Added
state retention APIs. Implemented for check_snmp with --rate option. See http://nagiosplugin.org/c-api-private for more details on the
API. Also updated check_snmp -l option to change the perfdata label.
2010-06-18 Thomas Guyot-Sionnest <dermoth@aei.ca>
* NEWS: NEWS entry for last commit
2009-08-05 Thomas Guyot-Sionnest <dermoth@aei.ca>
* configure.in: Attempt at detecting 64bit compilation flags between
gcc, old, and new versions of sun cc Gcc accepts -m64, just as newer version of Suncc. Older Suncc
required -xarch=v9 (SPARC) or -xarch=amd64 (x86-64) to generate
64bit code.
2010-05-08 Thomas Guyot-Sionnest <dermoth@aei.ca>
* plugins/check_smtp.c: Add missing --fqdn help (Jan Wagner)
2010-04-28 Thomas Guyot-Sionnest <dermoth@aei.ca>
* plugins/utils.h, po/de.po, po/fr.po, po/nagios-plugins.pot: Update
extra-opts help text based on ML agreement
2010-04-28 Thomas Guyot-Sionnest <dermoth@aei.ca>
* .gitignore, tools/distclean: tools/distclean: use git-clean when
possible git-clean is much faster and more reliable... Also add confdefs.h in gitignore, although this file is normally
removed at the end of the configure script.
2010-04-28 Thomas Guyot-Sionnest <dermoth@aei.ca>
* build-aux/ltmain.sh, gl/m4/libtool.m4, gl/m4/ltoptions.m4,
gl/m4/ltsugar.m4, gl/m4/ltversion.m4, gl/m4/lt~obsolete.m4: Update
libtool Nagios-plugins wouldn't compile on Ubuntu 10.04 (Lucid) with the old
libtool
2010-04-22 Thomas Guyot-Sionnest <dermoth@aei.ca>
* plugins-root/check_dhcp.c, plugins-root/check_icmp.c,
plugins/check_apt.c, plugins/check_by_ssh.c,
plugins/check_cluster.c, plugins/check_dig.c, plugins/check_disk.c,
plugins/check_dns.c, plugins/check_dummy.c, plugins/check_fping.c,
plugins/check_game.c, plugins/check_hpjd.c, plugins/check_http.c,
plugins/check_ide_smart.c, plugins/check_ldap.c,
plugins/check_load.c, plugins/check_mrtg.c, plugins/check_mysql.c,
plugins/check_mysql_query.c, plugins/check_nagios.c,
plugins/check_nt.c, plugins/check_ntp.c, plugins/check_ntp_peer.c,
plugins/check_ntp_time.c, plugins/check_nwstat.c,
plugins/check_overcr.c, plugins/check_pgsql.c,
plugins/check_ping.c, plugins/check_procs.c,
plugins/check_radius.c, plugins/check_real.c, plugins/check_smtp.c,
plugins/check_snmp.c, plugins/check_ssh.c, plugins/check_swap.c,
plugins/check_tcp.c, plugins/check_time.c, plugins/check_ups.c,
plugins/check_users.c, plugins/negate.c, plugins/urlize.c: Add
newline after "Usage:" in --help
2010-04-22 Thomas Guyot-Sionnest <dermoth@aei.ca>
* plugins/check_cluster.c: Split long line in check_cluster --help
2010-04-21 Thomas Guyot-Sionnest <dermoth@aei.ca>
* po/de.po, po/fr.po, po/nagios-plugins.pot: Update French
translations with extra-opts change
2010-04-21 Thomas Guyot-Sionnest <dermoth@aei.ca>
* plugins-root/check_dhcp.c, plugins-root/check_icmp.c,
plugins/check_apt.c, plugins/check_by_ssh.c,
plugins/check_cluster.c, plugins/check_dig.c, plugins/check_disk.c,
plugins/check_dns.c, plugins/check_fping.c, plugins/check_game.c,
plugins/check_hpjd.c, plugins/check_http.c,
plugins/check_ide_smart.c, plugins/check_ldap.c,
plugins/check_load.c, plugins/check_mrtg.c,
plugins/check_mrtgtraf.c, plugins/check_mysql.c,
plugins/check_mysql_query.c, plugins/check_nagios.c,
plugins/check_nt.c, plugins/check_ntp.c, plugins/check_ntp_peer.c,
plugins/check_ntp_time.c, plugins/check_nwstat.c,
plugins/check_overcr.c, plugins/check_pgsql.c,
plugins/check_ping.c, plugins/check_procs.c,
plugins/check_radius.c, plugins/check_real.c, plugins/check_smtp.c,
plugins/check_snmp.c, plugins/check_ssh.c, plugins/check_swap.c,
plugins/check_tcp.c, plugins/check_time.c, plugins/check_ups.c,
plugins/check_users.c, plugins/utils.h: Standardize the extra-opts
notes
2010-04-21 Thomas Guyot-Sionnest <dermoth@aei.ca>
* NEWS, plugins/tests/check_snmp.t: Fix tests and update NEWS file
2010-04-15 Thomas Guyot-Sionnest <dermoth@aei.ca>
* plugins/check_snmp.c: Replace the lousy multiline parser with a
robust one. This one counts double quotes and backslashes so it should handle
any level of escaping.
2009-09-17 Thomas Guyot-Sionnest <dermoth@aei.ca>
* plugins/check_snmp.c, plugins/tests/check_snmp_agent.pl: Attempt
at fixing check_snmp multiline output: This patch tries to detect and output nicely multi-line strings.
This method is broken by design; only a count of double-quotes and
escapes could work in every situation.
2010-04-15 tonvoon <ton.voon@opsera.com>
* NEWS: Updated Nagios::Plugin library
2010-04-14 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify: git-notify: Fix the ordering of commits If notifications for multiple commits are created, sort them
chronologically instead of in reverse chronological order.
2010-04-14 Thomas Guyot-Sionnest <dermoth@aei.ca>
* NEWS, plugins-root/check_dhcp.c, plugins-root/check_icmp.c,
plugins/check_apt.c, plugins/check_by_ssh.c,
plugins/check_cluster.c, plugins/check_dig.c, plugins/check_disk.c,
plugins/check_dns.c, plugins/check_dummy.c, plugins/check_fping.c,
plugins/check_game.c, plugins/check_hpjd.c, plugins/check_http.c,
plugins/check_ide_smart.c, plugins/check_ldap.c,
plugins/check_load.c, plugins/check_mrtg.c,
plugins/check_mrtgtraf.c, plugins/check_mysql.c,
plugins/check_mysql_query.c, plugins/check_nagios.c,
plugins/check_nt.c, plugins/check_ntp.c, plugins/check_ntp_peer.c,
plugins/check_ntp_time.c, plugins/check_nwstat.c,
plugins/check_overcr.c, plugins/check_pgsql.c,
plugins/check_ping.c, plugins/check_procs.c,
plugins/check_radius.c, plugins/check_real.c, plugins/check_smtp.c,
plugins/check_snmp.c, plugins/check_ssh.c, plugins/check_swap.c,
plugins/check_tcp.c, plugins/check_time.c, plugins/check_ups.c,
plugins/check_users.c, plugins/negate.c, plugins/urlize.c,
plugins/utils.h, po/POTFILES.in, po/de.po, po/fr.po,
po/nagios-plugins.pot: Fix translations when extra-opts aren't
enabled Bug #2832884 reported problem with translations outputting pot file
headers. This is caused by "" matching the header of the translation
files. This patch moves gettext macros inside utils macros and update some
french translations.
2010-04-14 Thomas Guyot-Sionnest <dermoth@aei.ca>
* plugins/check_ntp.c, plugins/negate.c, po/de.po, po/fr.po,
po/nagios-plugins.pot: Update french translation (fix all fuzzy's)
2010-04-14 Thomas Guyot-Sionnest <dermoth@aei.ca>
* NEWS, THANKS.in, plugins/check_radius.c: Fix check_radius
returning OK on unexpected results REJECT_RC is defined on some radiusclient versions and
differenciates between auth errors and bad responses. This patch
will affect only the behaviour of those clients exporting REJECT_RC. In addition, unexpected return codes are now handled properly and
return UNKNOWN.
2010-04-14 Thomas Guyot-Sionnest <dermoth@aei.ca>
* NEWS: Typo
2010-04-08 Thomas Guyot-Sionnest <dermoth@aei.ca>
* NEWS, plugins-root/Makefile.am, plugins-root/pst3.c: pst3.c must
not use nagiosplug/gnulib includes
2010-04-07 Thomas Guyot-Sionnest <dermoth@aei.ca>
* .gitignore, build-aux/arg-nonnull.h, build-aux/c++defs.h,
build-aux/config.rpath, build-aux/mkinstalldirs,
build-aux/warn-on-use.h, gl/Makefile.am, gl/alignof.h, gl/alloca.c,
gl/alloca.in.h, gl/arpa_inet.in.h, gl/asnprintf.c, gl/asprintf.c,
gl/base64.c, gl/base64.h, gl/basename-lgpl.c, gl/basename.c,
gl/btowc.c, gl/c-strtod.c, gl/c-strtod.h, gl/cloexec.c,
gl/cloexec.h, gl/close-hook.c, gl/close-hook.h, gl/config.charset,
gl/creat-safer.c, gl/dirname-lgpl.c, gl/dirname.c, gl/dirname.h,
gl/dup-safer.c, gl/dup2.c, gl/errno.in.h, gl/error.c, gl/error.h,
gl/exitfail.c, gl/exitfail.h, gl/fcntl--.h, gl/fcntl-safer.h,
gl/fcntl.c, gl/fcntl.in.h, gl/fd-safer.c, gl/float+.h,
gl/float.in.h, gl/floor.c, gl/floorf.c, gl/fsusage.c, gl/fsusage.h,
gl/full-read.c, gl/full-read.h, gl/full-write.c, gl/full-write.h,
gl/gai_strerror.c, gl/getaddrinfo.c, gl/getdtablesize.c,
gl/gethostname.c, gl/getloadavg.c, gl/getopt.c, gl/getopt.in.h,
gl/getopt1.c, gl/getopt_int.h, gl/gettext.h, gl/inet_ntop.c,
gl/intprops.h, gl/langinfo.in.h, gl/localcharset.c,
gl/localcharset.h, gl/locale.in.h, gl/m4/00gnulib.m4,
gl/m4/alloca.m4, gl/m4/arpa_inet_h.m4, gl/m4/base64.m4,
gl/m4/btowc.m4, gl/m4/c-strtod.m4, gl/m4/cloexec.m4,
gl/m4/codeset.m4, gl/m4/dirname.m4, gl/m4/dos.m4,
gl/m4/double-slash-root.m4, gl/m4/dup2.m4, gl/m4/errno_h.m4,
gl/m4/error.m4, gl/m4/exitfail.m4, gl/m4/extensions.m4,
gl/m4/fcntl-o.m4, gl/m4/fcntl-safer.m4, gl/m4/fcntl.m4,
gl/m4/fcntl_h.m4, gl/m4/float_h.m4, gl/m4/floorf.m4,
gl/m4/fstypename.m4, gl/m4/fsusage.m4, gl/m4/getaddrinfo.m4,
gl/m4/getdtablesize.m4, gl/m4/gethostname.m4, gl/m4/getloadavg.m4,
gl/m4/getopt.m4, gl/m4/gettext.m4, gl/m4/glibc2.m4,
gl/m4/glibc21.m4, gl/m4/gnulib-cache.m4, gl/m4/gnulib-common.m4,
gl/m4/gnulib-comp.m4, gl/m4/gnulib-tool.m4, gl/m4/hostent.m4,
gl/m4/iconv.m4, gl/m4/include_next.m4, gl/m4/inet_ntop.m4,
gl/m4/inline.m4, gl/m4/intdiv0.m4, gl/m4/intl.m4, gl/m4/intldir.m4,
gl/m4/intlmacosx.m4, gl/m4/intmax.m4, gl/m4/intmax_t.m4,
gl/m4/inttypes-pri.m4, gl/m4/inttypes_h.m4, gl/m4/langinfo_h.m4,
gl/m4/lcmessage.m4, gl/m4/lib-ld.m4, gl/m4/lib-link.m4,
gl/m4/lib-prefix.m4, gl/m4/localcharset.m4, gl/m4/locale-fr.m4,
gl/m4/locale-ja.m4, gl/m4/locale-zh.m4, gl/m4/locale_h.m4,
gl/m4/lock.m4, gl/m4/longlong.m4, gl/m4/ls-mntd-fs.m4,
gl/m4/malloc.m4, gl/m4/math_h.m4, gl/m4/mbrtowc.m4,
gl/m4/mbsinit.m4, gl/m4/mbstate_t.m4, gl/m4/memchr.m4,
gl/m4/mktime.m4, gl/m4/mmap-anon.m4, gl/m4/mode_t.m4,
gl/m4/mountlist.m4, gl/m4/multiarch.m4, gl/m4/netdb_h.m4,
gl/m4/netinet_in_h.m4, gl/m4/nl_langinfo.m4, gl/m4/nls.m4,
gl/m4/onceonly.m4, gl/m4/open.m4, gl/m4/po.m4,
gl/m4/printf-posix.m4, gl/m4/printf.m4, gl/m4/progtest.m4,
gl/m4/regex.m4, gl/m4/safe-read.m4, gl/m4/safe-write.m4,
gl/m4/servent.m4, gl/m4/size_max.m4, gl/m4/snprintf.m4,
gl/m4/sockets.m4, gl/m4/socklen.m4, gl/m4/sockpfaf.m4,
gl/m4/ssize_t.m4, gl/m4/stat.m4, gl/m4/stdbool.m4,
gl/m4/stddef_h.m4, gl/m4/stdint.m4, gl/m4/stdint_h.m4,
gl/m4/stdio_h.m4, gl/m4/stdlib_h.m4, gl/m4/strdup.m4,
gl/m4/strerror.m4, gl/m4/string_h.m4, gl/m4/strndup.m4,
gl/m4/strnlen.m4, gl/m4/strstr.m4, gl/m4/sys_socket_h.m4,
gl/m4/sys_stat_h.m4, gl/m4/threadlib.m4, gl/m4/time_h.m4,
gl/m4/time_r.m4, gl/m4/timegm.m4, gl/m4/uintmax_t.m4,
gl/m4/unistd-safer.m4, gl/m4/unistd_h.m4, gl/m4/vasnprintf.m4,
gl/m4/vasprintf.m4, gl/m4/visibility.m4, gl/m4/vsnprintf.m4,
gl/m4/warn-on-use.m4, gl/m4/wchar.m4, gl/m4/wchar_h.m4,
gl/m4/wchar_t.m4, gl/m4/wcrtomb.m4, gl/m4/wctype.m4,
gl/m4/wctype_h.m4, gl/m4/wint_t.m4, gl/m4/write.m4,
gl/m4/xalloc.m4, gl/m4/xsize.m4, gl/m4/xstrndup.m4, gl/malloc.c,
gl/math.in.h, gl/mbrtowc.c, gl/mbsinit.c, gl/memchr.c,
gl/memchr.valgrind, gl/mktime-internal.h, gl/mktime.c,
gl/mountlist.c, gl/mountlist.h, gl/netdb.in.h, gl/netinet_in.in.h,
gl/nl_langinfo.c, gl/open-safer.c, gl/open.c, gl/pipe-safer.c,
gl/printf-args.c, gl/printf-args.h, gl/printf-parse.c,
gl/printf-parse.h, gl/ref-add.sin, gl/ref-del.sin, gl/regcomp.c,
gl/regex.c, gl/regex.h, gl/regex_internal.c, gl/regex_internal.h,
gl/regexec.c, gl/safe-read.c, gl/safe-read.h, gl/safe-write.c,
gl/safe-write.h, gl/size_max.h, gl/snprintf.c, gl/sockets.c,
gl/sockets.h, gl/stat.c, gl/stdbool.in.h, gl/stddef.in.h,
gl/stdint.in.h, gl/stdio-write.c, gl/stdio.in.h, gl/stdlib.in.h,
gl/str-two-way.h, gl/strdup.c, gl/streq.h, gl/strerror.c,
gl/string.in.h, gl/stripslash.c, gl/strndup.c, gl/strnlen.c,
gl/strstr.c, gl/sys_socket.in.h, gl/sys_stat.in.h, gl/time.in.h,
gl/time_r.c, gl/timegm.c, gl/unistd--.h, gl/unistd-safer.h,
gl/unistd.in.h, gl/vasnprintf.c, gl/vasnprintf.h, gl/vasprintf.c,
gl/verify.h, gl/vsnprintf.c, gl/w32sock.h, gl/wchar.in.h,
gl/wcrtomb.c, gl/wctype.in.h, gl/write.c, gl/xalloc-die.c,
gl/xalloc.h, gl/xmalloc.c, gl/xsize.h, gl/xstrndup.c,
gl/xstrndup.h, tools/setup: Sync with the latest Gnulib code
(177f525) Signed-off-by: Thomas Guyot-Sionnest <dermoth@aei.ca>
2010-04-13 Holger Weiss <holger@zedat.fu-berlin.de>
* plugins/check_ntp_peer.c: Fix typo
2010-04-12 Holger Weiss <holger@zedat.fu-berlin.de>
* contrib/check_linux_raid.pl: Fix Debian bug #574612: Return
WARNING on rebuild Let check_linux_raid return a WARNING instead of an OK state during
volume recovery. See: http://bugs.debian.org/574612 (Fixed by Christoph Martin, forwarded by Jan Wagner.)
2010-04-12 Holger Weiss <holger@zedat.fu-berlin.de>
* contrib/check_linux_raid.pl: Fix Debian bug #534604: Checking md10
and above | check_linux_raid malfunctions if system has software RAID devices
with | two or more digits. For example, for system having
/dev/md10, | /dev/md11 etc, the plugin returns 'UNKNOWN' in
automatic mode (if RAID | devices are manually specified it works).
Also, if system has both | one-digit, and two-digit RAID devices,
the two-digit devices are | silently ignored in checks, which is
even more problematic. [ http://bugs.debian.org/534604 ] (Fixed by Matija Nalis, forwarded by Jan Wagner.)
2010-04-12 Holger Weiss <holger@zedat.fu-berlin.de>
* NEWS, plugins-scripts/check_ircd.pl: Fix Debian bug #545940:
Failure when run via ePN If Perl's "shift" function is called outside of a subroutine and
without any argument, it usually shifts @ARGV. However, if a plugin
is executed via ePN, such a call will shift @_ instead, so we must
explicitly specify @ARGV for this to work as expected. This fixes Debian bug #545940, see: http://bugs.debian.org/545940 Commit de7191e3424e02ba278a39b86e8b1906a25d0362 fixed the same issue
for check_disk_smb. (Reported by Hendrik Jaeger, forwarded by Jan Wagner.)
2010-04-11 Holger Weiss <holger@zedat.fu-berlin.de>
* NEWS, plugins/check_radius.c: Fix Debian bug #482947: No
--nas-ip-address option | check_radius doesn't seem to provide any way to modify the |
NAS-IP-Address attribute that it uses in the packets it sends, but
it | does so for NAS-Identifier. | | Instead, it hardcodes the IP
address that it gets from the | rc_own_ipaddress() library call, and
that in turn translates into | calling gethostbyname() on the result
of uname(). This call can easily | fail, and its result can easily
be unsuitable - for example when the | Nagios instance uses its own
virtual host, and you don't want the | original system hostname
leaked to the RADIUS servers you monitor with | this. | |
Furthermore, this behaviour is inconsistent with RFC 2865, which |
defines the two attributes as analogous and never suggests
hardcoding | the value of either of them in client software. Therefore, this commit adds the "-N, --nas-ip-address" option which
allows for specifying the value of the NAS-IP-Address attribute. | I've also noticed that the original code for NAS-IP-Address
hardcoding | is broken in its error handling - it does "return
(ERROR_PC)", which | is meaningless in the context of
check_radius.c. That actually seems | to be copy&waste from
radiusclient-0.3.2/src/radexample.c. :) I fixed | that. | | While
debugging, I also took the opportunity to decouple the |
nas-identifier rc_avpair_add() instance from the initial three, |
because this is just bad practice to lump a fourth optional
attribute | into the same block with the required attributes, the
error handling | for which is throwing the same daft message "Out of
Memory?"... [ http://bugs.debian.org/482947 ] (Contributed by Josip Rodin, forwarded by Jan Wagner.)
2010-04-11 Holger Weiss <holger@zedat.fu-berlin.de>
* NEWS, plugins/check_ldap.c: Fix Debian bug #479984: Allow empty
LDAP base The check_ldap plugin did not allow for specifying an empty LDAP
base. See: http://bugs.debian.org/479984 (Fixed by Stephane Chazelas, forwarded by Jan Wagner.)
2010-04-11 Holger Weiss <holger@zedat.fu-berlin.de>
* plugins/check_http.c: Fix Debian bug #460097: check_http -M broken See: http://bugs.debian.org/460097 One instance of this bug has already been fixed in commit
888358122004b9571c8fbdfa52ceee1ba5e5f4f2. (Fixed by Hilko Bengen, forwarded by Jan Wagner.)
2010-04-11 Holger Weiss <holger@zedat.fu-berlin.de>
* plugins-scripts/check_disk_smb.pl: Fix Debian bug #478942: Fragile
argument passing Fix some problems regarding the way check_disk_smb passes command
line arguments to smbclient(1). | It runs: | | $res = qx/$smbclient "\/\/$host\/$share" $pass -W
$workgroup \ | -U $user $smbclientoptions -I $address -c
ls/; | | [...] | | The documentation says that if the password is
not passed, it | defaults to "". That is not true above, as $pass
expands to | nothing which leaves no argument at all (instead of an
empty | argument) so is different from providing with an empty
password | or with the -N option. | | Also, if the password starts
with "-", you're in trouble, that's | why -U $user%$pass may be
prefered. | | Also, the doc says that if $user is not provided,
then it | defaults to "guest" but the problem is that if it is
provided | but empty, it is changed to "guest" as well, which
prevents us | from querying hosts that don't do user authentication. [ http://bugs.debian.org/478942 ] (Fixed by Stephane Chazelas, forwarded by Jan Wagner.)
2010-04-11 Holger Weiss <holger@zedat.fu-berlin.de>
* NEWS, THANKS.in, plugins-scripts/check_disk_smb.pl: Fix Debian bug
#478906: Failure when run via ePN | When perl plugin scripts are run with the embedded perl
interpreter in | nagios3, the "shift" perl command doesn't shift
@ARGV, but @_ (which | happens to contain the same thing as @ARGV at
the time the script was | started). | | [...] | | A fix is to
replace all the instances of "shift" with "shift @ARGV". [ http://bugs.debian.org/478906 ] (Fixed by Stephane Chazelas, forwarded by Jan Wagner.)
2010-04-11 Holger Weiss <holger@zedat.fu-berlin.de>
* THANKS.in, plugins/check_ldap.c: Fix Debian bug #463322: Use
deprecated libldap API | Our automated build log filter[1] detected a problem that is
likely to | cause your package to segfault on architectures where
the size of a | pointer is greater than the size of an integer, such
as ia64 and | amd64. | | This is often due to a missing function
prototype definition. For | more information, see [2]. | |
Function `ldap_init' implicitly converted to pointer at |
check_ldap.c:124 | | [1]
http://people.debian.org/~dannf/check-implicit-pointer-functions |
[2] http://wiki.debian.org/ImplicitPointerConversions | | The
libldap API has been updated and many functions used by the ldap |
plugin are now deprecated. This package should either update to the
| new API or define LDAP_DEPRECATED to continue using the deprecated
| interfaces. | | This patch implements the lazy solution. [ http://bugs.debian.org/463322 ] (Contributed by Dann Frazier, forwarded by Jan Wagner.)
2010-04-11 Holger Weiss <holger@zedat.fu-berlin.de>
* NEWS, THANKS.in, plugins-scripts/check_disk_smb.pl: Fix Debian bug
#425129: SMB guest mode won't work | The check_disk_smb plugin purports to support guest users, but it
| doesn't work out, because it doesn't specify the -N command line |
option to smbclient when no password is specified, making smbclient
| stop and ask. [ http://bugs.debian.org/425129 ] (Fixed by Josip Rodin, forwarded by Jan Wagner.)
2010-04-11 Holger Weiss <holger@zedat.fu-berlin.de>
* plugins/check_game.c: Fix Debian bug #307905: Incorrect usage
output The usage output of check_game was wrong, see: http://bugs.debian.org/307905 (Fixed by Sean Finney, forwarded by Jan Wagner.)
2010-04-11 Holger Weiss <holger@zedat.fu-berlin.de>
* NEWS, plugins-scripts/check_disk_smb.pl: check_disk_smb: Allow for
specifying an IP address Add the "-a, --address option" which allows for specifying the IP
address of the server to connect to. If this option is used, the IP
address will be handed over to smbclient(1)'s "-I" option.
(Contributed by Sean Finney, forwarded by Jan Wagner.)
2010-04-06 Thomas Guyot-Sionnest <dermoth@aei.ca>
* NEWS: check_http: Add warning about SNI not enabled by default
anymore
2010-04-05 Thomas Guyot-Sionnest <dermoth@aei.ca>
* NEWS, plugins/check_http.c: Fix regression in check_http ssl
checks on some servers The fix is making SNI an option.
2010-03-31 Thomas Guyot-Sionnest <dermoth@aei.ca>
* plugins/check_snmp.c: check_snmp: Update last patch to copy value
verbatim Rework last patch, copying the converted portion of the string
rather than re-converting it. This is safer for
backwards-compatibility as the value is never modified.
2010-03-30 Thomas Guyot-Sionnest <dermoth@aei.ca>
* NEWS, plugins/check_snmp.c: check_snmp: Fix regression introduced
in #1867716 Bug #1867716 fixed what it meant to fix: broken perfdata strings.
Unfortunately some users relied on half-broken perfdata string where
at least the first token was OK. This patch do a two-way conversion
(string to double then back to string) instead and use the
conversion result for the performance data. A possible caveat is that the string may change where it normally
shouldn't but the result should be somewhat similar.
2010-03-27 Thomas Guyot-Sionnest <dermoth@aei.ca>
* NEWS, THANKS.in, plugins/check_ide_smart.c: Fix compilation with
GCC 2.96 (Konstantin Khomoutov - #2977105)
2010-03-18 Holger Weiss <holger@zedat.fu-berlin.de>
* NEWS, plugins/check_ntp_peer.c, plugins/t/check_ntp.t: Let
check_ntp_peer check the number of truechimers Add support for checking the number of usable time sources (i.e.,
the number of peers which are classified as so-called "truechimers"
by NTP's intersection algorithm). The new "-m" and "-n" options
allow for specifying the according WARNING and CRITICAL thresholds
(and thereby activating the truechimers check), respectively.
2010-03-16 Thomas Guyot-Sionnest <dermoth@aei.ca>
* NEWS: Typo in NEWS
2010-03-15 Ton Voon <ton.voon@opsera.com>
* doc/developer-guidelines.sgml: Corrected example
2010-02-26 Ton Voon <ton.voon@opsera.com>
* NEWS, THANKS.in, plugins/check_http.c: Fix memory leak in
check_http for large pages (Jimmy Bergman - #2957455)
2009-12-07 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify, tools/git-post-receive-hook: git-notify: Pipe
e-mails directly to sendmail(8) Use sendmail(8) instead of mail(1) in order to be able to set the
"Content-Type" header field on systems where the available mail(1)
command doesn't allow for setting it. This makes the "-H" flag (cf.
commit 71350c5a) unnecessary.
2009-12-06 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify, tools/git-post-receive-hook: Enable CIA's commit
notifications We now use CIA's service to send commit notifications to IRC. They
are currently sent to the #Nagios-Devel channel on Freenode. See: http://cia.vc/stats/project/nagiosplug/ http://cia.vc/account/bots/15699/
2009-12-04 Thomas Guyot-Sionnest <dermoth@aei.ca>
* NEWS, configure.in: Detect arguments passed via
--with-ping[6]-command (#2908236)
2009-12-04 Thomas Guyot-Sionnest <dermoth@aei.ca>
* configure.in: Whitespace fixes
2009-12-02 Thomas Guyot-Sionnest <dermoth@aei.ca>
* plugins/check_http.c: Fix short help using "warn" for the -f
option instead of "warning" (onredirect).
2009-11-19 Ton Voon <tonvoon@nagiosplugins.org>
* tools/sfsnapshot-upload: Updated link to sfsnapshotgit
2009-11-18 Thomas Guyot-Sionnest <dermoth@aei.ca>
* doc/developer-guidelines.sgml: Update developer guideline
regarding CVS Commits (mostly for testing my snapshot script, though
it had to be updated anyway)
2009-11-11 Thomas Guyot-Sionnest <dermoth@aei.ca>
* tools/sfsnapshotgit: Fix fetching of remote branches
2009-11-11 dermoth <dermoth@nagiosplugins.org>
* tools/sfsnapshot-upload, tools/sfsnapshotgit: Many fixes to
snapshot scripts sfsnapshotgit: - Use fetch/reset instead to pull to avoid merges on forced
updates sfsnapshot-upload: - Fix link deletion walking the entire home dir - Allow CLEAN_TIME=0 (no retention) - Re-add per-branch links when CLEAN_TIME > 0 - Add many comments
2009-11-07 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-post-receive-hook, tools/git-update-mirror: Git commit
notifications via post-receive hook Now that we moved our Git repositories to SourceForge, we don't need
to maintain local clones for generating commit notifications
anymore, as SourceForge provides shell access to the repositories.
Instead, we now run git-notify as a post-receive hook on the
SourceForge server. Actually, we use a wrapper which executes
git-notify with the desired options and which makes it easy to add
other post-receive hooks in the future.
2009-11-07 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify: git-notify: Support SourceForge repositories The Gitweb URLs for repositories hosted by SourceForge are slightly
different than other Gitweb URLs. The correct URL cannot be
specified via "-u" if we append "/$repos_name.git/?" to that URL as
we usually do. If the new "-S" flag is specified or
"notify.sourceforge" is set, we'll append "/$repos_name;" instead,
which makes the "-u" option usable for SourceForge repositories.
2009-11-07 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify: git-notify: Optionally call mail(1) without "-a" Not all mail(1) implementations support specifying additional header
fields via "-a": with some, this flag is used for attaching files,
others don't provide an "-a" flag at all (this is true for the
/bin/mail utility currently installed on the SourceForge servers,
for example). We now provide the "-H" flag and the
"notify.legacyMail" configuration key for these cases.
2009-11-07 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify: git-notify: Polish up the "tag notifications" Use better labels for the tag ref and the SHA1 name of the tag
object.
2009-11-07 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify: git-notify: Distinguish between tag types Distinguish between annotated tags and lightweight tags. In the
former case, send an annotated "tag notification", in the latter
case, send a "ref change notification" (as we did in both cases
before).
2009-11-07 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify: git-notify: Fix "global" notifications If the number of commits included with a single push exceeds the
maximum specified via "-n", a single notification will be generated
instead of individual e-mails. For listing the commits within such
a notification, git-rev-list(1)'s "--pretty" option is used. This
yields output which the git_rev_list() subroutine didn't accept.
That's now fixed.
2009-11-07 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify: git-notify: Optionally [tag] the subject If the new "-T" option is specified or "notify.emitRepository" is
set, the subject of e-mail notifications will be prefixed with
[<tag>], where <tag> is the name of the updated repository.
2009-11-07 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify: git-notify: Optionally omit the author name If the new "-A" option is specified (or "notify.omitAuthor" is set),
the author name will be omitted from the subject of e-mail
notifications.
2009-11-07 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify: git-notify: Make abbreviating Gitweb URLs
optional The SHA1 object name part of Gitweb URLs is now only shortened if
the user requested this by specifying the new "-z" option (or by
setting "notify.shortURLs"). While at it, also shorten the additional URL which references a diff
in e-mail notifications which don't include that diff inline because
its size exceeds the maximum number of bytes specified via "-s". Note that while the abbreviated SHA1 object names will be unique at
push time, this cannot be guaranteed for the future, so the
shortened URLs might break some day.
2009-11-07 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify: git-notify: Make showing the committer optional Only the author's name and address will now be mentioned in a commit
notification by default. However, if the "-C" option is specified
(or "notify.showCommitter" is set), the committer's name and address
will also be included in the notification if the committer is not
the author of the commit (as we previously did by default).
2009-11-07 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify: git-notify: Make using a state file optional Making use of a state file in order to prevent duplicate
notifications is now optional. The user must explicitly specify a
file path via the "-t" option or by setting the git-config(1)
variable "notify.statefile" to activate this functionality.
2009-11-07 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify: git-notify: Don't abort if mail(1) exits
non-zero As nothing in git-notify depends on the success of the mail(1) call,
don't abort if it fails, just spit out a warning.
2009-11-07 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify: git-notify: Drop the $sent_notices variable Now that we don't ignore empty commits anymore, there's no need to
keep track of the number of commits actually notified about, as that
will always be equal to the number of commits returned by
get_new_commits().
2009-11-07 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify: Revert "git-notify: Ignore `empty' commits" This reverts commit db63fbfa036f5cd757aedf4547fef9e195a8c285, as it
is no longer needed and we'd like to keep the diff against the
git-notify version maintained by the Wine people as small as
possible. The purpose of db63fbfa was to suppress notifications on
empty merge commits, which can now be requested directly by
specifying git-notify's "-X" option. (Our change was implemented
before the "-X" option was available, even though the Git history
suggests otherwise.) Conflicts: tools/git-notify
2009-11-07 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify: Revert "git-notify: Remove unused [...] code" This reverts commit 5445b9769f254781e482062bacc6603a5cd63059.
Alexandre Julliard pointed out that the code in question was used if
git-notify was explicitly called with the SHA1 name of an annotated
tag object. At the moment, the code in question actually _is_
unused due to later modifications, but it wasn't at the time
5445b976 was committed, and we'll add further changes so that the
code will be used again in the future. Conflicts: tools/git-notify
2009-11-06 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify: git-notify: Minor cosmetic changes Fix the description of the "-U" option.
2009-10-25 Thomas Guyot-Sionnest <dermoth@aei.ca>
* tools/sfsnapshot-upload: Allow rsyncing to local paths
2009-10-25 Thomas Guyot-Sionnest <dermoth@aei.ca>
* tools/sfsnapshot-upload: Add snapshots upload scripts
2009-10-26 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify: git-notify: Make the state file group writable For shared repositories, the state file used by git-notify should
usually be group writable, so we now set the umask to 0002 by
default. This can be adjusted by setting the "notify.umask"
configuration key or by using the "-U" option on the command line.
2009-10-26 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify: git-notify: Remove an empty subroutine The gitweb_url() subroutine was an unused and empty hangover.
2009-10-25 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-update-mirror: git-update-mirror: Remove a useless
sed(1) call The sed(1) command in question was a hangover which had no effect
anymore.
2009-10-24 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify: git-notify: Check the exit status of pipes Properly check the exit status of all processes we execute and abort
on error.
2009-10-24 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify: git-notify: Handle non-UTF-8 commits Make sure that commit messages which use an encoding other than
US-ASCII or UTF-8 are handled correctly. Also, assume that the diff
contents use the same encoding as the commit message. This
assumption may well be wrong, but that's the best we can do.
2009-10-24 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify: git-notify: Don't generate duplicate
notifications Never notify on a given commit more than once, even if it's
referenced via multiple branch heads. We make sure this won't
happen simply by maintaining a list of commits we notified about.
The file path used for saving this list can be specified using the
new "-t" option. (The contrib/hooks/post-receive-email script
distributed with Git tries hard to avoid such a list, but it doesn't
get the necessary magic right.)
2009-10-24 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify: git-nofity: Try to shorten Gitweb URLs Instead of using the full SHA1 values of commit object names within
Gitweb URLs, try to abbreviate them to a shorter unique name.
2009-10-24 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify: git-notify: Move the Gitweb URL to the bottom In commit notifications, specify the Gitweb URL (if any) at the
bottom of the ASCII "table" which summarizes the commit. That looks
better.
2009-10-24 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify: git-notify: Truncate summary after 50 characters If the first line of a commit message is longer than 50 characters,
truncate it before adding the resulting string to the subject line
of a notification. This makes sure the subject line won't get too
long (unless the commit author name is unusually long, which we
don't check). The Git User's Manual recommends keeping the first
line of a commit message shorter than that, anyway: | Though not required, it's a good idea to begin the commit message
with | a single short (less than 50 character) line summarizing the
change, | followed by a blank line and then a more thorough
description. Tools | that turn commits into email, for example, use
the first line on the | Subject line and the rest of the commit in
the body. [ http://www.kernel.org/pub/software/scm/git/docs/user-manual.html ]
2009-10-24 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify: git-notify: Send notifications on ref changes,
too Do not only generate notifications on commits, but also if a branch
head or lightweight tag was created, removed, or modified.
Notifications on branch head updates are omitted if one or more
commit notification have been generated and the branch head now
references a descendant of the originally referenced commit (which
should be the usual case).
2009-10-24 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify: git-notify: Call git-rev-list(1) via a
subroutine Add a subroutine which abstracts away executing git-rev-list(1) and
checking the result in order to avoid code duplication.
2009-10-24 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify: git-notify: Mention the committer where
applicable If the committer is not the author of the commit, mention the
committer in addition to the author.
2009-10-24 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify: git-notify: New subroutine for column alignment Most notifications include an ASCII "table" with two columns. The
formatting of these columns is now handled by the new format_table()
subroutine, so that the alignment can easily be changed in the
future.
2009-10-24 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify: git-notify: Ignore "empty" commits Omit notifications regarding commits which don't change the tree
whatsoever.
2009-10-24 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify: git-notify: Remove unused tag notification code The code which handles notifications regarding tags was unused, as
only objects listed by git-rev-list(1) are considered, and
git-rev-list(1) never spits out the sha1 of a tag object.
2009-10-24 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify: git-notify: Save author without trailing space Adjust the regular expression which catches the commit author name
so that it doesn't include the space character which follows that
name.
2009-10-24 Holger Weiss <holger@zedat.fu-berlin.de>
* tools/git-notify, tools/git-update-mirror: Import
git-update-mirror and git-notify Import the (self-written) git-update-mirror script, which updates
clones of Git repositories and then calls git-notify (in just the
same way as a post-receive hook would be called by Git). The
git-notify script is imported from
git://source.winehq.org/git/tools.git (commit: 03d66f34) and
generates notifications on repository changes. We'll use these
scripts for generating our commit e-mails.
2009-10-22 Thomas Guyot-Sionnest <dermoth@aei.ca>
* NEWS, plugins/check_snmp.c, plugins/t/check_snmp.t: Fix usage of
repeated -o options in check_snmp
2009-10-15 Thomas Guyot-Sionnest <dermoth@aei.ca>
* plugins-root/check_icmp.c: Set proper network byte order for
icmp_id and icmp_seq in icmp packets
2009-10-14 Thomas Guyot-Sionnest <dermoth@aei.ca>
* NEWS, plugins-root/check_icmp.c: Increment per-host sequence in
check_icmp
2009-09-26 Thomas Guyot-Sionnest <dermoth@aei.ca>
* tools/sfsnapshotgit: Change default for SFSNAP_DEST
2009-09-26 Thomas Guyot-Sionnest <dermoth@aei.ca>
* tools/sfsnapshotgit: Correcting name and email address
2009-09-26 Thomas Guyot-Sionnest <dermoth@aei.ca>
* tools/sfsnapshotgit: Enhancements to tools/sfsnapshotgit
2009-09-25 Thomas Guyot-Sionnest <dermoth@aei.ca>
* configure.in: Using $srcdir is the proper way to go
2009-09-25 nagiosplugins <nagiosplugins@nagiosplugins.org>
* tools/sfsnapshotgit: Add sfsnapshotgit
2009-09-25 nagiosplugins <nagiosplugins@nagiosplugins.org>
* configure.in, plugins-root/Makefile.am,
plugins-scripts/Makefile.am, plugins/Makefile.am: Allow custom
versions with the release file...
2009-09-24 Ton Voon <ton.voon@opsera.com>
* NEWS, doc/developer-guidelines.sgml: Updated documentation re: no
equals sign and single quote
2009-09-24 Ton Voon <ton.voon@opsera.com>
* NEWS: Updated NEWS file with docs changes
2009-09-23 Thomas Guyot-Sionnest <dermoth@aei.ca>
* NEWS: Test, again
2009-09-23 Thomas Guyot-Sionnest <dermoth@aei.ca>
* NEWS: Test
2009-09-21 Thomas Guyot-Sionnest <dermoth@aei.ca>
* NEWS, THANKS.in: Oops - wrong author/bug in last commit!
2009-09-21 Thomas Guyot-Sionnest <dermoth@aei.ca>
* NEWS, THANKS.in, plugins/check_http.c: Add proxy-authorization
option to check_http (Peter Doherty - #2863772, Bryan Irvine -
#2863925)
2009-09-19 Thomas Guyot-Sionnest <dermoth@aei.ca>
* NEWS, plugins-scripts/check_ircd.pl: Fix check_ircd binding to
wrong interface (#668778)
2009-09-19 Thomas Guyot-Sionnest <dermoth@aei.ca>
* doc/RELEASING: Update RELEASING document with proper tag creation
and push commands
2009-09-16 Ton Voon <ton.voon@opsera.com>
* BUGS, ChangeLog, NEWS, NP-VERSION-GEN, configure.in, package.def:
Prep for 1.4.14 release
2009-09-14 Ton Voon <ton.voon@opsera.com>
* plugins-root/pst3.c: Ensure dirhandle is closed (Duncan Ferguson)

View file

@ -45,20 +45,23 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/np_mysqlclient.m4 \
$(top_srcdir)/gl/m4/00gnulib.m4 $(top_srcdir)/gl/m4/alloca.m4 \
$(top_srcdir)/gl/m4/arpa_inet_h.m4 \
$(top_srcdir)/gl/m4/asm-underscore.m4 \
$(top_srcdir)/gl/m4/base64.m4 $(top_srcdir)/gl/m4/btowc.m4 \
$(top_srcdir)/gl/m4/c-strtod.m4 $(top_srcdir)/gl/m4/cloexec.m4 \
$(top_srcdir)/gl/m4/codeset.m4 $(top_srcdir)/gl/m4/dirname.m4 \
$(top_srcdir)/gl/m4/dos.m4 \
$(top_srcdir)/gl/m4/double-slash-root.m4 \
$(top_srcdir)/gl/m4/errno_h.m4 $(top_srcdir)/gl/m4/error.m4 \
$(top_srcdir)/gl/m4/exitfail.m4 \
$(top_srcdir)/gl/m4/extensions.m4 \
$(top_srcdir)/gl/m4/dup2.m4 $(top_srcdir)/gl/m4/eealloc.m4 \
$(top_srcdir)/gl/m4/environ.m4 $(top_srcdir)/gl/m4/errno_h.m4 \
$(top_srcdir)/gl/m4/error.m4 $(top_srcdir)/gl/m4/extensions.m4 \
$(top_srcdir)/gl/m4/fcntl-o.m4 \
$(top_srcdir)/gl/m4/fcntl-safer.m4 \
$(top_srcdir)/gl/m4/fcntl_h.m4 $(top_srcdir)/gl/m4/float_h.m4 \
$(top_srcdir)/gl/m4/floorf.m4 \
$(top_srcdir)/gl/m4/fcntl.m4 $(top_srcdir)/gl/m4/fcntl_h.m4 \
$(top_srcdir)/gl/m4/float_h.m4 $(top_srcdir)/gl/m4/floorf.m4 \
$(top_srcdir)/gl/m4/fstypename.m4 \
$(top_srcdir)/gl/m4/fsusage.m4 \
$(top_srcdir)/gl/m4/getaddrinfo.m4 \
$(top_srcdir)/gl/m4/getdtablesize.m4 \
$(top_srcdir)/gl/m4/gethostname.m4 \
$(top_srcdir)/gl/m4/getloadavg.m4 \
$(top_srcdir)/gl/m4/getopt.m4 $(top_srcdir)/gl/m4/gettext.m4 \
@ -71,48 +74,64 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/np_mysqlclient.m4 \
$(top_srcdir)/gl/m4/intlmacosx.m4 \
$(top_srcdir)/gl/m4/intmax_t.m4 \
$(top_srcdir)/gl/m4/inttypes_h.m4 \
$(top_srcdir)/gl/m4/langinfo_h.m4 \
$(top_srcdir)/gl/m4/lib-ld.m4 $(top_srcdir)/gl/m4/lib-link.m4 \
$(top_srcdir)/gl/m4/lib-prefix.m4 \
$(top_srcdir)/gl/m4/libtool.m4 \
$(top_srcdir)/gl/m4/localcharset.m4 \
$(top_srcdir)/gl/m4/locale-fr.m4 \
$(top_srcdir)/gl/m4/locale-ja.m4 \
$(top_srcdir)/gl/m4/locale-zh.m4 \
$(top_srcdir)/gl/m4/locale_h.m4 \
$(top_srcdir)/gl/m4/longlong.m4 \
$(top_srcdir)/gl/m4/ls-mntd-fs.m4 \
$(top_srcdir)/gl/m4/malloc.m4 $(top_srcdir)/gl/m4/math_h.m4 \
$(top_srcdir)/gl/m4/mbrtowc.m4 $(top_srcdir)/gl/m4/mbsinit.m4 \
$(top_srcdir)/gl/m4/mbstate_t.m4 $(top_srcdir)/gl/m4/mktime.m4 \
$(top_srcdir)/gl/m4/mountlist.m4 \
$(top_srcdir)/gl/m4/ltoptions.m4 \
$(top_srcdir)/gl/m4/ltsugar.m4 \
$(top_srcdir)/gl/m4/ltversion.m4 \
$(top_srcdir)/gl/m4/lt~obsolete.m4 \
$(top_srcdir)/gl/m4/malloc.m4 $(top_srcdir)/gl/m4/malloca.m4 \
$(top_srcdir)/gl/m4/math_h.m4 $(top_srcdir)/gl/m4/mbrtowc.m4 \
$(top_srcdir)/gl/m4/mbsinit.m4 \
$(top_srcdir)/gl/m4/mbstate_t.m4 $(top_srcdir)/gl/m4/memchr.m4 \
$(top_srcdir)/gl/m4/mktime.m4 $(top_srcdir)/gl/m4/mmap-anon.m4 \
$(top_srcdir)/gl/m4/mode_t.m4 $(top_srcdir)/gl/m4/mountlist.m4 \
$(top_srcdir)/gl/m4/multiarch.m4 \
$(top_srcdir)/gl/m4/netdb_h.m4 \
$(top_srcdir)/gl/m4/netinet_in_h.m4 $(top_srcdir)/gl/m4/nls.m4 \
$(top_srcdir)/gl/m4/netinet_in_h.m4 \
$(top_srcdir)/gl/m4/nl_langinfo.m4 $(top_srcdir)/gl/m4/nls.m4 \
$(top_srcdir)/gl/m4/onceonly.m4 $(top_srcdir)/gl/m4/open.m4 \
$(top_srcdir)/gl/m4/po.m4 $(top_srcdir)/gl/m4/printf.m4 \
$(top_srcdir)/gl/m4/progtest.m4 $(top_srcdir)/gl/m4/regex.m4 \
$(top_srcdir)/gl/m4/safe-read.m4 \
$(top_srcdir)/gl/m4/safe-write.m4 \
$(top_srcdir)/gl/m4/servent.m4 $(top_srcdir)/gl/m4/size_max.m4 \
$(top_srcdir)/gl/m4/snprintf.m4 $(top_srcdir)/gl/m4/socklen.m4 \
$(top_srcdir)/gl/m4/sockpfaf.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \
$(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stdint.m4 \
$(top_srcdir)/gl/m4/stdint_h.m4 $(top_srcdir)/gl/m4/stdio_h.m4 \
$(top_srcdir)/gl/m4/stdlib_h.m4 $(top_srcdir)/gl/m4/strdup.m4 \
$(top_srcdir)/gl/m4/strerror.m4 \
$(top_srcdir)/gl/m4/servent.m4 $(top_srcdir)/gl/m4/setenv.m4 \
$(top_srcdir)/gl/m4/sha1.m4 $(top_srcdir)/gl/m4/size_max.m4 \
$(top_srcdir)/gl/m4/snprintf.m4 $(top_srcdir)/gl/m4/sockets.m4 \
$(top_srcdir)/gl/m4/socklen.m4 $(top_srcdir)/gl/m4/sockpfaf.m4 \
$(top_srcdir)/gl/m4/ssize_t.m4 $(top_srcdir)/gl/m4/stat.m4 \
$(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stddef_h.m4 \
$(top_srcdir)/gl/m4/stdint.m4 $(top_srcdir)/gl/m4/stdint_h.m4 \
$(top_srcdir)/gl/m4/stdio_h.m4 $(top_srcdir)/gl/m4/stdlib_h.m4 \
$(top_srcdir)/gl/m4/strdup.m4 $(top_srcdir)/gl/m4/strerror.m4 \
$(top_srcdir)/gl/m4/string_h.m4 $(top_srcdir)/gl/m4/strndup.m4 \
$(top_srcdir)/gl/m4/strnlen.m4 \
$(top_srcdir)/gl/m4/strnlen.m4 $(top_srcdir)/gl/m4/strsep.m4 \
$(top_srcdir)/gl/m4/strstr.m4 \
$(top_srcdir)/gl/m4/sys_socket_h.m4 \
$(top_srcdir)/gl/m4/sys_stat_h.m4 \
$(top_srcdir)/gl/m4/time_h.m4 $(top_srcdir)/gl/m4/time_r.m4 \
$(top_srcdir)/gl/m4/timegm.m4 \
$(top_srcdir)/gl/m4/unistd-safer.m4 \
$(top_srcdir)/gl/m4/unistd_h.m4 \
$(top_srcdir)/gl/m4/vasnprintf.m4 \
$(top_srcdir)/gl/m4/vasprintf.m4 \
$(top_srcdir)/gl/m4/vsnprintf.m4 $(top_srcdir)/gl/m4/wchar.m4 \
$(top_srcdir)/gl/m4/wchar_t.m4 $(top_srcdir)/gl/m4/wcrtomb.m4 \
$(top_srcdir)/gl/m4/wctype.m4 $(top_srcdir)/gl/m4/wint_t.m4 \
$(top_srcdir)/gl/m4/write.m4 $(top_srcdir)/gl/m4/xalloc.m4 \
$(top_srcdir)/gl/m4/xsize.m4 $(top_srcdir)/gl/m4/xstrndup.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in
$(top_srcdir)/gl/m4/vsnprintf.m4 \
$(top_srcdir)/gl/m4/warn-on-use.m4 \
$(top_srcdir)/gl/m4/wchar_h.m4 $(top_srcdir)/gl/m4/wchar_t.m4 \
$(top_srcdir)/gl/m4/wcrtomb.m4 $(top_srcdir)/gl/m4/wctype_h.m4 \
$(top_srcdir)/gl/m4/wint_t.m4 $(top_srcdir)/gl/m4/write.m4 \
$(top_srcdir)/gl/m4/xalloc.m4 $(top_srcdir)/gl/m4/xsize.m4 \
$(top_srcdir)/gl/m4/xstrndup.m4 $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@ -151,7 +170,7 @@ ALLOCA_H = @ALLOCA_H@
AMTAR = @AMTAR@
APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
AR = @AR@
ARPA_INET_H = @ARPA_INET_H@
ASM_SYMBOL_PREFIX = @ASM_SYMBOL_PREFIX@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@ -167,15 +186,12 @@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = -DLOCALEDIR=\"$(localedir)\"
DEPDIR = @DEPDIR@
DEPLIBS = @DEPLIBS@
ECHO = @ECHO@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
@ -192,12 +208,11 @@ EXTRAS = @EXTRAS@
EXTRAS_ROOT = @EXTRAS_ROOT@
EXTRA_NETOBJS = @EXTRA_NETOBJS@
EXTRA_TEST = @EXTRA_TEST@
F77 = @F77@
FCNTL_H = @FCNTL_H@
FFLAGS = @FFLAGS@
FGREP = @FGREP@
FLOAT_H = @FLOAT_H@
FLOORF_LIBM = @FLOORF_LIBM@
GETADDRINFO_LIB = @GETADDRINFO_LIB@
GETHOSTNAME_LIB = @GETHOSTNAME_LIB@
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
GETOPT_H = @GETOPT_H@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
@ -205,27 +220,41 @@ GLIBC21 = @GLIBC21@
GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@
GNULIB_ACCEPT = @GNULIB_ACCEPT@
GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@
GNULIB_ACOSL = @GNULIB_ACOSL@
GNULIB_ASINL = @GNULIB_ASINL@
GNULIB_ATANL = @GNULIB_ATANL@
GNULIB_ATOLL = @GNULIB_ATOLL@
GNULIB_BIND = @GNULIB_BIND@
GNULIB_BTOWC = @GNULIB_BTOWC@
GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
GNULIB_CEILF = @GNULIB_CEILF@
GNULIB_CEILL = @GNULIB_CEILL@
GNULIB_CHOWN = @GNULIB_CHOWN@
GNULIB_CLOSE = @GNULIB_CLOSE@
GNULIB_CONNECT = @GNULIB_CONNECT@
GNULIB_COSL = @GNULIB_COSL@
GNULIB_DPRINTF = @GNULIB_DPRINTF@
GNULIB_DUP2 = @GNULIB_DUP2@
GNULIB_DUP3 = @GNULIB_DUP3@
GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
GNULIB_ENVIRON = @GNULIB_ENVIRON@
GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
GNULIB_EXPL = @GNULIB_EXPL@
GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
GNULIB_FCHDIR = @GNULIB_FCHDIR@
GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
GNULIB_FCLOSE = @GNULIB_FCLOSE@
GNULIB_FCNTL = @GNULIB_FCNTL@
GNULIB_FFLUSH = @GNULIB_FFLUSH@
GNULIB_FLOORF = @GNULIB_FLOORF@
GNULIB_FLOORL = @GNULIB_FLOORL@
GNULIB_FOPEN = @GNULIB_FOPEN@
GNULIB_FPRINTF = @GNULIB_FPRINTF@
GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
GNULIB_FPURGE = @GNULIB_FPURGE@
GNULIB_FPUTC = @GNULIB_FPUTC@
GNULIB_FPUTS = @GNULIB_FPUTS@
GNULIB_FREOPEN = @GNULIB_FREOPEN@
@ -233,19 +262,23 @@ GNULIB_FREXP = @GNULIB_FREXP@
GNULIB_FREXPL = @GNULIB_FREXPL@
GNULIB_FSEEK = @GNULIB_FSEEK@
GNULIB_FSEEKO = @GNULIB_FSEEKO@
GNULIB_FSTATAT = @GNULIB_FSTATAT@
GNULIB_FSYNC = @GNULIB_FSYNC@
GNULIB_FTELL = @GNULIB_FTELL@
GNULIB_FTELLO = @GNULIB_FTELLO@
GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
GNULIB_FUTIMENS = @GNULIB_FUTIMENS@
GNULIB_FWRITE = @GNULIB_FWRITE@
GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@
GNULIB_GETCWD = @GNULIB_GETCWD@
GNULIB_GETDELIM = @GNULIB_GETDELIM@
GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
GNULIB_GETLINE = @GNULIB_GETLINE@
GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@
@ -253,6 +286,7 @@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@
GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@
GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
GNULIB_GRANTPT = @GNULIB_GRANTPT@
GNULIB_INET_NTOP = @GNULIB_INET_NTOP@
GNULIB_INET_PTON = @GNULIB_INET_PTON@
GNULIB_ISFINITE = @GNULIB_ISFINITE@
@ -261,13 +295,17 @@ GNULIB_ISNAN = @GNULIB_ISNAN@
GNULIB_ISNAND = @GNULIB_ISNAND@
GNULIB_ISNANF = @GNULIB_ISNANF@
GNULIB_ISNANL = @GNULIB_ISNANL@
GNULIB_LCHMOD = @GNULIB_LCHMOD@
GNULIB_LCHOWN = @GNULIB_LCHOWN@
GNULIB_LDEXPL = @GNULIB_LDEXPL@
GNULIB_LINK = @GNULIB_LINK@
GNULIB_LINKAT = @GNULIB_LINKAT@
GNULIB_LISTEN = @GNULIB_LISTEN@
GNULIB_LOGB = @GNULIB_LOGB@
GNULIB_LOGL = @GNULIB_LOGL@
GNULIB_LSEEK = @GNULIB_LSEEK@
GNULIB_LSTAT = @GNULIB_LSTAT@
GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
GNULIB_MATHL = @GNULIB_MATHL@
GNULIB_MBRLEN = @GNULIB_MBRLEN@
GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
@ -287,27 +325,51 @@ GNULIB_MBSSEP = @GNULIB_MBSSEP@
GNULIB_MBSSPN = @GNULIB_MBSSPN@
GNULIB_MBSSTR = @GNULIB_MBSSTR@
GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
GNULIB_MEMCHR = @GNULIB_MEMCHR@
GNULIB_MEMMEM = @GNULIB_MEMMEM@
GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
GNULIB_MKDIRAT = @GNULIB_MKDIRAT@
GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
GNULIB_MKFIFO = @GNULIB_MKFIFO@
GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@
GNULIB_MKNOD = @GNULIB_MKNOD@
GNULIB_MKNODAT = @GNULIB_MKNODAT@
GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
GNULIB_MKTIME = @GNULIB_MKTIME@
GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@
GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
GNULIB_OPEN = @GNULIB_OPEN@
GNULIB_OPENAT = @GNULIB_OPENAT@
GNULIB_PERROR = @GNULIB_PERROR@
GNULIB_PIPE2 = @GNULIB_PIPE2@
GNULIB_POPEN = @GNULIB_POPEN@
GNULIB_PREAD = @GNULIB_PREAD@
GNULIB_PRINTF = @GNULIB_PRINTF@
GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
GNULIB_PTSNAME = @GNULIB_PTSNAME@
GNULIB_PUTC = @GNULIB_PUTC@
GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
GNULIB_PUTENV = @GNULIB_PUTENV@
GNULIB_PUTS = @GNULIB_PUTS@
GNULIB_PWRITE = @GNULIB_PWRITE@
GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
GNULIB_READLINK = @GNULIB_READLINK@
GNULIB_READLINKAT = @GNULIB_READLINKAT@
GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
GNULIB_REALPATH = @GNULIB_REALPATH@
GNULIB_RECV = @GNULIB_RECV@
GNULIB_RECVFROM = @GNULIB_RECVFROM@
GNULIB_REMOVE = @GNULIB_REMOVE@
GNULIB_RENAME = @GNULIB_RENAME@
GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
GNULIB_RMDIR = @GNULIB_RMDIR@
GNULIB_ROUND = @GNULIB_ROUND@
GNULIB_ROUNDF = @GNULIB_ROUNDF@
GNULIB_ROUNDL = @GNULIB_ROUNDL@
@ -318,10 +380,13 @@ GNULIB_SETENV = @GNULIB_SETENV@
GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@
GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@
GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
GNULIB_SINL = @GNULIB_SINL@
GNULIB_SLEEP = @GNULIB_SLEEP@
GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
GNULIB_SOCKET = @GNULIB_SOCKET@
GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
GNULIB_SQRTL = @GNULIB_SQRTL@
GNULIB_STAT = @GNULIB_STAT@
GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
GNULIB_STPCPY = @GNULIB_STPCPY@
GNULIB_STPNCPY = @GNULIB_STPNCPY@
@ -329,9 +394,11 @@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
GNULIB_STRDUP = @GNULIB_STRDUP@
GNULIB_STRERROR = @GNULIB_STRERROR@
GNULIB_STRNCAT = @GNULIB_STRNCAT@
GNULIB_STRNDUP = @GNULIB_STRNDUP@
GNULIB_STRNLEN = @GNULIB_STRNLEN@
GNULIB_STRPBRK = @GNULIB_STRPBRK@
GNULIB_STRPTIME = @GNULIB_STRPTIME@
GNULIB_STRSEP = @GNULIB_STRSEP@
GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
GNULIB_STRSTR = @GNULIB_STRSTR@
@ -340,11 +407,24 @@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
GNULIB_STRTOLL = @GNULIB_STRTOLL@
GNULIB_STRTOULL = @GNULIB_STRTOULL@
GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
GNULIB_SYMLINK = @GNULIB_SYMLINK@
GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
GNULIB_TANL = @GNULIB_TANL@
GNULIB_TIMEGM = @GNULIB_TIMEGM@
GNULIB_TIME_R = @GNULIB_TIME_R@
GNULIB_TMPFILE = @GNULIB_TMPFILE@
GNULIB_TRUNC = @GNULIB_TRUNC@
GNULIB_TRUNCF = @GNULIB_TRUNCF@
GNULIB_TRUNCL = @GNULIB_TRUNCL@
GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
GNULIB_UNLINK = @GNULIB_UNLINK@
GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
GNULIB_UNSETENV = @GNULIB_UNSETENV@
GNULIB_USLEEP = @GNULIB_USLEEP@
GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@
GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
@ -360,16 +440,28 @@ GNULIB_WCTOB = @GNULIB_WCTOB@
GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
GNULIB_WRITE = @GNULIB_WRITE@
GREP = @GREP@
HAVE_ACCEPT4 = @HAVE_ACCEPT4@
HAVE_ACOSL = @HAVE_ACOSL@
HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@
HAVE_ASINL = @HAVE_ASINL@
HAVE_ATANL = @HAVE_ATANL@
HAVE_ATOLL = @HAVE_ATOLL@
HAVE_BTOWC = @HAVE_BTOWC@
HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@
HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
HAVE_CHOWN = @HAVE_CHOWN@
HAVE_COSL = @HAVE_COSL@
HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@
HAVE_DECL_ASINL = @HAVE_DECL_ASINL@
HAVE_DECL_ATANL = @HAVE_DECL_ATANL@
HAVE_DECL_CEILF = @HAVE_DECL_CEILF@
HAVE_DECL_CEILL = @HAVE_DECL_CEILL@
HAVE_DECL_COSL = @HAVE_DECL_COSL@
HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@
HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@
HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@
HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@
HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@
@ -379,18 +471,23 @@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@
HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@
HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@
HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@
HAVE_DECL_LOGB = @HAVE_DECL_LOGB@
HAVE_DECL_LOGL = @HAVE_DECL_LOGL@
HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
HAVE_DECL_ROUND = @HAVE_DECL_ROUND@
HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@
HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@
HAVE_DECL_SINL = @HAVE_DECL_SINL@
HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@
HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@
HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
@ -398,58 +495,106 @@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
HAVE_DECL_TANL = @HAVE_DECL_TANL@
HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@
HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@
HAVE_DECL_TRUNCL = @HAVE_DECL_TRUNCL@
HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
HAVE_DPRINTF = @HAVE_DPRINTF@
HAVE_DUP2 = @HAVE_DUP2@
HAVE_DUP3 = @HAVE_DUP3@
HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
HAVE_EXPL = @HAVE_EXPL@
HAVE_FACCESSAT = @HAVE_FACCESSAT@
HAVE_FCHDIR = @HAVE_FCHDIR@
HAVE_FCHMODAT = @HAVE_FCHMODAT@
HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
HAVE_FCNTL = @HAVE_FCNTL@
HAVE_FSEEKO = @HAVE_FSEEKO@
HAVE_FSTATAT = @HAVE_FSTATAT@
HAVE_FSYNC = @HAVE_FSYNC@
HAVE_FTELLO = @HAVE_FTELLO@
HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
HAVE_FUTIMENS = @HAVE_FUTIMENS@
HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@
HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
HAVE_GETGROUPS = @HAVE_GETGROUPS@
HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
HAVE_GETLOGIN = @HAVE_GETLOGIN@
HAVE_GETOPT_H = @HAVE_GETOPT_H@
HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@
HAVE_GRANTPT = @HAVE_GRANTPT@
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
HAVE_ISNAND = @HAVE_ISNAND@
HAVE_ISNANF = @HAVE_ISNANF@
HAVE_ISNANL = @HAVE_ISNANL@
HAVE_ISWBLANK = @HAVE_ISWBLANK@
HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@
HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@
HAVE_LANGINFO_H = @HAVE_LANGINFO_H@
HAVE_LCHMOD = @HAVE_LCHMOD@
HAVE_LCHOWN = @HAVE_LCHOWN@
HAVE_LINK = @HAVE_LINK@
HAVE_LINKAT = @HAVE_LINKAT@
HAVE_LOCALTIME_R = @HAVE_LOCALTIME_R@
HAVE_LOGL = @HAVE_LOGL@
HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
HAVE_LSTAT = @HAVE_LSTAT@
HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@
HAVE_MBRLEN = @HAVE_MBRLEN@
HAVE_MBRTOWC = @HAVE_MBRTOWC@
HAVE_MBSINIT = @HAVE_MBSINIT@
HAVE_MBSLEN = @HAVE_MBSLEN@
HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
HAVE_MEMCHR = @HAVE_MEMCHR@
HAVE_MEMPCPY = @HAVE_MEMPCPY@
HAVE_MKDIRAT = @HAVE_MKDIRAT@
HAVE_MKDTEMP = @HAVE_MKDTEMP@
HAVE_MKFIFO = @HAVE_MKFIFO@
HAVE_MKFIFOAT = @HAVE_MKFIFOAT@
HAVE_MKNOD = @HAVE_MKNOD@
HAVE_MKNODAT = @HAVE_MKNODAT@
HAVE_MKOSTEMP = @HAVE_MKOSTEMP@
HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@
HAVE_MKSTEMP = @HAVE_MKSTEMP@
HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
HAVE_NANOSLEEP = @HAVE_NANOSLEEP@
HAVE_NETDB_H = @HAVE_NETDB_H@
HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@
HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
HAVE_OPENAT = @HAVE_OPENAT@
HAVE_OS_H = @HAVE_OS_H@
HAVE_PIPE2 = @HAVE_PIPE2@
HAVE_PREAD = @HAVE_PREAD@
HAVE_PTSNAME = @HAVE_PTSNAME@
HAVE_PWRITE = @HAVE_PWRITE@
HAVE_RANDOM_H = @HAVE_RANDOM_H@
HAVE_RANDOM_R = @HAVE_RANDOM_R@
HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
HAVE_READLINK = @HAVE_READLINK@
HAVE_READLINKAT = @HAVE_READLINKAT@
HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@
HAVE_REALPATH = @HAVE_REALPATH@
HAVE_RENAMEAT = @HAVE_RENAMEAT@
HAVE_RPMATCH = @HAVE_RPMATCH@
HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@
HAVE_SETENV = @HAVE_SETENV@
HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
HAVE_SINL = @HAVE_SINL@
HAVE_SLEEP = @HAVE_SLEEP@
HAVE_SQRTL = @HAVE_SQRTL@
HAVE_STDINT_H = @HAVE_STDINT_H@
HAVE_STPCPY = @HAVE_STPCPY@
HAVE_STPNCPY = @HAVE_STPNCPY@
HAVE_STRCASESTR = @HAVE_STRCASESTR@
HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
HAVE_STRNDUP = @HAVE_STRNDUP@
HAVE_STRPBRK = @HAVE_STRPBRK@
HAVE_STRPTIME = @HAVE_STRPTIME@
HAVE_STRSEP = @HAVE_STRSEP@
HAVE_STRTOD = @HAVE_STRTOD@
HAVE_STRTOLL = @HAVE_STRTOLL@
@ -458,18 +603,28 @@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@
HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@
HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
HAVE_SYMLINK = @HAVE_SYMLINK@
HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@
HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
HAVE_TANL = @HAVE_TANL@
HAVE_TIMEGM = @HAVE_TIMEGM@
HAVE_TTYNAME_R = @HAVE_TTYNAME_R@
HAVE_UNISTD_H = @HAVE_UNISTD_H@
HAVE_UNLINKAT = @HAVE_UNLINKAT@
HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
HAVE_UNSETENV = @HAVE_UNSETENV@
HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
HAVE_USLEEP = @HAVE_USLEEP@
HAVE_UTIMENSAT = @HAVE_UTIMENSAT@
HAVE_VASPRINTF = @HAVE_VASPRINTF@
HAVE_VDPRINTF = @HAVE_VDPRINTF@
HAVE_WCHAR_H = @HAVE_WCHAR_H@
HAVE_WCHAR_T = @HAVE_WCHAR_T@
HAVE_WCRTOMB = @HAVE_WCRTOMB@
HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@
HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@
@ -477,11 +632,13 @@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
HAVE_WINT_T = @HAVE_WINT_T@
HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
HAVE_XLOCALE_H = @HAVE_XLOCALE_H@
HAVE__BOOL = @HAVE__BOOL@
HOSTENT_LIB = @HOSTENT_LIB@
HOSTNAME = @HOSTNAME@
INCLUDE_NEXT = @INCLUDE_NEXT@
INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
INET_NTOP_LIB = @INET_NTOP_LIB@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@ -491,6 +648,7 @@ INTLLIBS = @INTLLIBS@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
KMEM_GROUP = @KMEM_GROUP@
KRBINCLUDE = @KRBINCLUDE@
LD = @LD@
LDAPINCLUDE = @LDAPINCLUDE@
LDAPLIBS = @LDAPLIBS@
LDFLAGS = @LDFLAGS@
@ -501,7 +659,9 @@ LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBSOCKET = @LIBSOCKET@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
LOCALE_FR = @LOCALE_FR@
@ -521,25 +681,56 @@ MYSQLCFLAGS = @MYSQLCFLAGS@
MYSQLINCLUDE = @MYSQLINCLUDE@
MYSQLLIBS = @MYSQLLIBS@
NEED_SETGID = @NEED_SETGID@
NETDB_H = @NETDB_H@
NETINET_IN_H = @NETINET_IN_H@
NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@
NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@
NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@
NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@
NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@
NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@
NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@
NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@
NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@
NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@
NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@
NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
NEXT_ERRNO_H = @NEXT_ERRNO_H@
NEXT_FCNTL_H = @NEXT_FCNTL_H@
NEXT_FLOAT_H = @NEXT_FLOAT_H@
NEXT_GETOPT_H = @NEXT_GETOPT_H@
NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
NEXT_LOCALE_H = @NEXT_LOCALE_H@
NEXT_MATH_H = @NEXT_MATH_H@
NEXT_NETDB_H = @NEXT_NETDB_H@
NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@
NEXT_STDDEF_H = @NEXT_STDDEF_H@
NEXT_STDINT_H = @NEXT_STDINT_H@
NEXT_STDIO_H = @NEXT_STDIO_H@
NEXT_STDLIB_H = @NEXT_STDLIB_H@
NEXT_STRING_H = @NEXT_STRING_H@
NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@
NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
NEXT_TIME_H = @NEXT_TIME_H@
NEXT_UNISTD_H = @NEXT_UNISTD_H@
NEXT_WCHAR_H = @NEXT_WCHAR_H@
NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
NM = @NM@
NMEDIT = @NMEDIT@
NP_RELEASE = @NP_RELEASE@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@ -579,32 +770,44 @@ POSUB = @POSUB@
POW_LIB = @POW_LIB@
PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
PST3CFLAGS = @PST3CFLAGS@
PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
PYTHON = @PYTHON@
RADIUSLIBS = @RADIUSLIBS@
RANLIB = @RANLIB@
RELEASE = @RELEASE@
REPLACE_BTOWC = @REPLACE_BTOWC@
REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
REPLACE_CEILF = @REPLACE_CEILF@
REPLACE_CEILL = @REPLACE_CEILL@
REPLACE_CHOWN = @REPLACE_CHOWN@
REPLACE_CLOSE = @REPLACE_CLOSE@
REPLACE_DPRINTF = @REPLACE_DPRINTF@
REPLACE_FCHDIR = @REPLACE_FCHDIR@
REPLACE_DUP = @REPLACE_DUP@
REPLACE_DUP2 = @REPLACE_DUP2@
REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
REPLACE_FCLOSE = @REPLACE_FCLOSE@
REPLACE_FCNTL = @REPLACE_FCNTL@
REPLACE_FFLUSH = @REPLACE_FFLUSH@
REPLACE_FLOORF = @REPLACE_FLOORF@
REPLACE_FLOORL = @REPLACE_FLOORL@
REPLACE_FOPEN = @REPLACE_FOPEN@
REPLACE_FPRINTF = @REPLACE_FPRINTF@
REPLACE_FPURGE = @REPLACE_FPURGE@
REPLACE_FREOPEN = @REPLACE_FREOPEN@
REPLACE_FREXP = @REPLACE_FREXP@
REPLACE_FREXPL = @REPLACE_FREXPL@
REPLACE_FSEEK = @REPLACE_FSEEK@
REPLACE_FSEEKO = @REPLACE_FSEEKO@
REPLACE_FSTAT = @REPLACE_FSTAT@
REPLACE_FSTATAT = @REPLACE_FSTATAT@
REPLACE_FTELL = @REPLACE_FTELL@
REPLACE_FTELLO = @REPLACE_FTELLO@
REPLACE_FUTIMENS = @REPLACE_FUTIMENS@
REPLACE_GETCWD = @REPLACE_GETCWD@
REPLACE_GETDELIM = @REPLACE_GETDELIM@
REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
REPLACE_GETLINE = @REPLACE_GETLINE@
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
@ -614,40 +817,75 @@ REPLACE_ISNAN = @REPLACE_ISNAN@
REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
REPLACE_LCHOWN = @REPLACE_LCHOWN@
REPLACE_LDEXPL = @REPLACE_LDEXPL@
REPLACE_LINK = @REPLACE_LINK@
REPLACE_LINKAT = @REPLACE_LINKAT@
REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
REPLACE_LSEEK = @REPLACE_LSEEK@
REPLACE_LSTAT = @REPLACE_LSTAT@
REPLACE_MBRLEN = @REPLACE_MBRLEN@
REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
REPLACE_MBSINIT = @REPLACE_MBSINIT@
REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
REPLACE_MEMCHR = @REPLACE_MEMCHR@
REPLACE_MEMMEM = @REPLACE_MEMMEM@
REPLACE_MKDIR = @REPLACE_MKDIR@
REPLACE_MKFIFO = @REPLACE_MKFIFO@
REPLACE_MKNOD = @REPLACE_MKNOD@
REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
REPLACE_MKTIME = @REPLACE_MKTIME@
REPLACE_NAN = @REPLACE_NAN@
REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@
REPLACE_NULL = @REPLACE_NULL@
REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
REPLACE_OPEN = @REPLACE_OPEN@
REPLACE_OPENAT = @REPLACE_OPENAT@
REPLACE_PERROR = @REPLACE_PERROR@
REPLACE_POPEN = @REPLACE_POPEN@
REPLACE_PREAD = @REPLACE_PREAD@
REPLACE_PRINTF = @REPLACE_PRINTF@
REPLACE_PUTENV = @REPLACE_PUTENV@
REPLACE_PWRITE = @REPLACE_PWRITE@
REPLACE_READLINK = @REPLACE_READLINK@
REPLACE_REALPATH = @REPLACE_REALPATH@
REPLACE_REMOVE = @REPLACE_REMOVE@
REPLACE_RENAME = @REPLACE_RENAME@
REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
REPLACE_RMDIR = @REPLACE_RMDIR@
REPLACE_ROUND = @REPLACE_ROUND@
REPLACE_ROUNDF = @REPLACE_ROUNDF@
REPLACE_ROUNDL = @REPLACE_ROUNDL@
REPLACE_SETENV = @REPLACE_SETENV@
REPLACE_SIGNBIT = @REPLACE_SIGNBIT@
REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@
REPLACE_SLEEP = @REPLACE_SLEEP@
REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
REPLACE_SPRINTF = @REPLACE_SPRINTF@
REPLACE_STAT = @REPLACE_STAT@
REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
REPLACE_STPNCPY = @REPLACE_STPNCPY@
REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
REPLACE_STRDUP = @REPLACE_STRDUP@
REPLACE_STRERROR = @REPLACE_STRERROR@
REPLACE_STRPTIME = @REPLACE_STRPTIME@
REPLACE_STRNCAT = @REPLACE_STRNCAT@
REPLACE_STRNDUP = @REPLACE_STRNDUP@
REPLACE_STRNLEN = @REPLACE_STRNLEN@
REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
REPLACE_STRSTR = @REPLACE_STRSTR@
REPLACE_STRTOD = @REPLACE_STRTOD@
REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
REPLACE_SYMLINK = @REPLACE_SYMLINK@
REPLACE_TIMEGM = @REPLACE_TIMEGM@
REPLACE_TMPFILE = @REPLACE_TMPFILE@
REPLACE_TRUNCL = @REPLACE_TRUNCL@
REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
REPLACE_UNLINK = @REPLACE_UNLINK@
REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
REPLACE_UNSETENV = @REPLACE_UNSETENV@
REPLACE_USLEEP = @REPLACE_USLEEP@
REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@
REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
REPLACE_VDPRINTF = @REPLACE_VDPRINTF@
REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
@ -663,6 +901,7 @@ REPLACE_WRITE = @REPLACE_WRITE@
REV_DATESTAMP = @REV_DATESTAMP@
REV_TIMESTAMP = @REV_TIMESTAMP@
SCRIPT_TEST = @SCRIPT_TEST@
SED = @SED@
SERVENT_LIB = @SERVENT_LIB@
SET_MAKE = @SET_MAKE@
SH = @SH@
@ -673,20 +912,19 @@ SOCKETLIBS = @SOCKETLIBS@
SSLINCLUDE = @SSLINCLUDE@
SSLLIBS = @SSLLIBS@
STDBOOL_H = @STDBOOL_H@
STDDEF_H = @STDDEF_H@
STDINT_H = @STDINT_H@
STRIP = @STRIP@
SUPPORT = @SUPPORT@
SYS_SOCKET_H = @SYS_SOCKET_H@
SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
VOID_UNSETENV = @VOID_UNSETENV@
WARRANTY = @WARRANTY@
WCHAR_H = @WCHAR_H@
WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
WCTYPE_H = @WCTYPE_H@
WINT_T_SUFFIX = @WINT_T_SUFFIX@
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
@ -696,8 +934,7 @@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@ -720,6 +957,7 @@ gl_LIBOBJS = @gl_LIBOBJS@
gl_LTLIBOBJS = @gl_LTLIBOBJS@
gltests_LIBOBJS = @gltests_LIBOBJS@
gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
gltests_WITNESS = @gltests_WITNESS@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@ -733,6 +971,7 @@ libdir = @libdir@
libexecdir = @libexecdir@
localedir = $(datadir)/locale
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
np_mysql_config = @np_mysql_config@

42
NEWS
View file

@ -1,5 +1,45 @@
This file documents the major additions and syntax changes between releases.
1.4.15 27th July 2010
ENHANCEMENTS
New check_ntp_peer -m and -n options to check the number of usable time sources ("truechimers")
New check_disk_smb -a option which allows for specifying the IP address of the remote server
New check_radius -N option which allows for specifying the value of the NAS-IP-Address attribute
New check_snmp --rate option to store differences between invocations. Saves state in PREFIX/var/{plugin}
check_snmp -l label option now also changes the perfdata label. See WARNINGS
check_snmp has an --invert-search option which reverses status of the string and regexp searches
check_http now displays the missing search string and the URL in the output when failed (Duncan Ferguson - #2999924)
Updated Nagios::Plugin perl module
Updated gnulib to June 2010
FIXES
Fix check_ircd binding to wrong interface (#668778)
Add proxy-authorization option to check_http (Marcel Kuiper - #1323230, Bryan Irvine - #2863925)
check_icmp now increment the sequence counter in each packet
Fix usage of repeated -o options in check_snmp
Try to detect arguments passed via --with-ping[6]-command and set options accordingly (#2908236)
Fix memory leak in check_http for large pages (Jimmy Bergman - #2957455)
Fix compilation with GCC 2.96 (Konstantin Khomoutov - #2977105)
Fix regression introduced in #1867716 where partially valid performance strings would not be printed anymore
Fix regression in check_http ssl checks on some servers - make SNI an option
Fix guest mode support in check_disk_smb
Fix check_disk_smb and check_ircd failures when run via ePN
check_ldap now allows for specifying an empty LDAP base
Fix compilation error of pst3 in Solaris 8
Fix check_radius returning OK on unexpected results (Craig Leres - #2911752)
Fix translations when extra-opts aren't enabled (Jan Wagner - #2832884)
Fix parsing of multi-line strings in check_snmp (broken in 1.4.14) and enhance output in such case (#2832451)
Fix detection of pst3 64-bit compile flags with Sun CC
Fix cmd_run overwriting the environment, which would break some commands that needed it
Allow check_ifstatus to accept version=2c - used to only allow version=2 (Brian Landers)
Fix examples in check_disk, where it implied was possible to suffix unit values to warn/crit parameters
WARNINGS
Updated developer documentation to say that performance labels should not have an equals sign or
single quote in the label
check_http 1.4.14 introduced SSL SNI support - you now have to enable it explicitly with "--sni"
check_snmp -l label option is also used for the performance label. This could change history from previous uses
1.4.14 16th September 2009
check_http has options to specify the HTTP method (#2155152)
check_users thresholds were not working exactly as documented (>= rather than >)
@ -140,7 +180,7 @@ This file documents the major additions and syntax changes between releases.
IPv6 support can now be disabled using ./configure --without-ipv6
Fix check_ntp now honor ntp flags
1.4.9 4th June 2006
1.4.9 4th June 2007
Inclusion of contrib/check_cluster2 as check_cluster with some improvements
New/improved -E/--skip-stderr and -S/--skip-stdout options for check_by_ssh
check_snmp now supports Counter64

View file

@ -6,7 +6,7 @@
SRC_ROOT=`dirname $0`
NPVF=NP-VERSION-FILE
DEF_VER=1.4.14.git
DEF_VER=1.4.15.git
LF='
'

9
THANKS
View file

@ -30,6 +30,7 @@ Simon Bellwood
Hilko Bengen
Allan Bennett
Guy Van Den Bergh
Jimmy Bergman
Tom Bertelston
Daniel Bimschas
Jeffery Blank
@ -46,6 +47,7 @@ Jim Carroll
Ian Cass
Arnold Cavazos
Alex Chaffee
Stephane Chazelas
Eric Chen
Alwyn Cherrington
Ben Clewett
@ -87,6 +89,7 @@ Bernhard Fischer
Matthias Flacke
Martin Foster
Felix Frank
Dann Frazier
Rick Frey
Matt Garrett
Robby Giffin
@ -113,6 +116,7 @@ Richard Edward Horner
Chester Hosey
Bob Ingraham
Cire Iriarte
Bryan Irvine
Valdimir Ivaschenko
Harald Jenny
Mark Jewiss
@ -121,19 +125,23 @@ Frank Kannemann
Roy Sigurd Karlsbakk
Jason Kau
Bo Kersey
Konstantin Khomoutov
Serhan Kiymaz
Denis Knauf
Tilman Koschnick
John Koyle
Steven Kreuzer
Christoph Kron
Marcel Kuiper
Alexander Kulak
Bill Kunkel
Brian Landers
Pascal Larisch
Gerhard Lausser
Lynne Lawrence
Sakari Lehtonen
Pedro Leite
Craig Leres
Jan Lipphaus
Larry Low
Jacob Lundqvist
@ -195,6 +203,7 @@ Cliff Rice
Alain Richard
Didi Rieder
Steve Rigler
Josip Rodin
Kenny Root
Wolfgang Rosenauer
John Rouillard

6410
aclocal.m4 vendored

File diff suppressed because it is too large Load diff

26
build-aux/arg-nonnull.h Normal file
View file

@ -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

271
build-aux/c++defs.h Normal file
View file

@ -0,0 +1,271 @@
/* C++ compatible function declaration macros.
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/>. */
#ifndef _GL_CXXDEFS_H
#define _GL_CXXDEFS_H
/* The three most frequent use cases of these macros are:
* For providing a substitute for a function that is missing on some
platforms, but is declared and works fine on the platforms on which
it exists:
#if @GNULIB_FOO@
# if !@HAVE_FOO@
_GL_FUNCDECL_SYS (foo, ...);
# endif
_GL_CXXALIAS_SYS (foo, ...);
_GL_CXXALIASWARN (foo);
#elif defined GNULIB_POSIXCHECK
...
#endif
* For providing a replacement for a function that exists on all platforms,
but is broken/insufficient and needs to be replaced on some platforms:
#if @GNULIB_FOO@
# if @REPLACE_FOO@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef foo
# define foo rpl_foo
# endif
_GL_FUNCDECL_RPL (foo, ...);
_GL_CXXALIAS_RPL (foo, ...);
# else
_GL_CXXALIAS_SYS (foo, ...);
# endif
_GL_CXXALIASWARN (foo);
#elif defined GNULIB_POSIXCHECK
...
#endif
* For providing a replacement for a function that exists on some platforms
but is broken/insufficient and needs to be replaced on some of them and
is additionally either missing or undeclared on some other platforms:
#if @GNULIB_FOO@
# if @REPLACE_FOO@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef foo
# define foo rpl_foo
# endif
_GL_FUNCDECL_RPL (foo, ...);
_GL_CXXALIAS_RPL (foo, ...);
# else
# if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@
_GL_FUNCDECL_SYS (foo, ...);
# endif
_GL_CXXALIAS_SYS (foo, ...);
# endif
_GL_CXXALIASWARN (foo);
#elif defined GNULIB_POSIXCHECK
...
#endif
*/
/* _GL_EXTERN_C declaration;
performs the declaration with C linkage. */
#if defined __cplusplus
# define _GL_EXTERN_C extern "C"
#else
# define _GL_EXTERN_C extern
#endif
/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
declares a replacement function, named rpl_func, with the given prototype,
consisting of return type, parameters, and attributes.
Example:
_GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
_GL_ARG_NONNULL ((1)));
*/
#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
_GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
_GL_EXTERN_C rettype rpl_func parameters_and_attributes
/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
declares the system function, named func, with the given prototype,
consisting of return type, parameters, and attributes.
Example:
_GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
_GL_ARG_NONNULL ((1)));
*/
#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
_GL_EXTERN_C rettype func parameters_and_attributes
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
declares a C++ alias called GNULIB_NAMESPACE::func
that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
Example:
_GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
*/
#define _GL_CXXALIAS_RPL(func,rettype,parameters) \
_GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
#if defined __cplusplus && defined GNULIB_NAMESPACE
# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
namespace GNULIB_NAMESPACE \
{ \
rettype (*const func) parameters = ::rpl_func; \
} \
_GL_EXTERN_C int _gl_cxxalias_dummy
#else
# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
_GL_EXTERN_C int _gl_cxxalias_dummy
#endif
/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
except that the C function rpl_func may have a slightly different
declaration. A cast is used to silence the "invalid conversion" error
that would otherwise occur. */
#if defined __cplusplus && defined GNULIB_NAMESPACE
# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
namespace GNULIB_NAMESPACE \
{ \
rettype (*const func) parameters = \
reinterpret_cast<rettype(*)parameters>(::rpl_func); \
} \
_GL_EXTERN_C int _gl_cxxalias_dummy
#else
# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
_GL_EXTERN_C int _gl_cxxalias_dummy
#endif
/* _GL_CXXALIAS_SYS (func, rettype, parameters);
declares a C++ alias called GNULIB_NAMESPACE::func
that redirects to the system provided function func, if GNULIB_NAMESPACE
is defined.
Example:
_GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
*/
#if defined __cplusplus && defined GNULIB_NAMESPACE
/* If we were to write
rettype (*const func) parameters = ::func;
like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls
better (remove an indirection through a 'static' pointer variable),
but then the _GL_CXXALIASWARN macro below would cause a warning not only
for uses of ::func but also for uses of GNULIB_NAMESPACE::func. */
# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
namespace GNULIB_NAMESPACE \
{ \
static rettype (*func) parameters = ::func; \
} \
_GL_EXTERN_C int _gl_cxxalias_dummy
#else
# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
_GL_EXTERN_C int _gl_cxxalias_dummy
#endif
/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
is like _GL_CXXALIAS_SYS (func, rettype, parameters);
except that the C function func may have a slightly different declaration.
A cast is used to silence the "invalid conversion" error that would
otherwise occur. */
#if defined __cplusplus && defined GNULIB_NAMESPACE
# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
namespace GNULIB_NAMESPACE \
{ \
static rettype (*func) parameters = \
reinterpret_cast<rettype(*)parameters>(::func); \
} \
_GL_EXTERN_C int _gl_cxxalias_dummy
#else
# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
_GL_EXTERN_C int _gl_cxxalias_dummy
#endif
/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
is like _GL_CXXALIAS_SYS (func, rettype, parameters);
except that the C function is picked among a set of overloaded functions,
namely the one with rettype2 and parameters2. Two consecutive casts
are used to silence the "cannot find a match" and "invalid conversion"
errors that would otherwise occur. */
#if defined __cplusplus && defined GNULIB_NAMESPACE
/* The outer cast must be a reinterpret_cast.
The inner cast: When the function is defined as a set of overloaded
functions, it works as a static_cast<>, choosing the designated variant.
When the function is defined as a single variant, it works as a
reinterpret_cast<>. The parenthesized cast syntax works both ways. */
# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
namespace GNULIB_NAMESPACE \
{ \
static rettype (*func) parameters = \
reinterpret_cast<rettype(*)parameters>( \
(rettype2(*)parameters2)(::func)); \
} \
_GL_EXTERN_C int _gl_cxxalias_dummy
#else
# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
_GL_EXTERN_C int _gl_cxxalias_dummy
#endif
/* _GL_CXXALIASWARN (func);
causes a warning to be emitted when ::func is used but not when
GNULIB_NAMESPACE::func is used. func must be defined without overloaded
variants. */
#if defined __cplusplus && defined GNULIB_NAMESPACE
# define _GL_CXXALIASWARN(func) \
_GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
# define _GL_CXXALIASWARN_1(func,namespace) \
_GL_CXXALIASWARN_2 (func, namespace)
/* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
we enable the warning only when not optimizing. */
# if !__OPTIMIZE__
# define _GL_CXXALIASWARN_2(func,namespace) \
_GL_WARN_ON_USE (func, \
"The symbol ::" #func " refers to the system function. " \
"Use " #namespace "::" #func " instead.")
# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
# define _GL_CXXALIASWARN_2(func,namespace) \
extern __typeof__ (func) func
# else
# define _GL_CXXALIASWARN_2(func,namespace) \
_GL_EXTERN_C int _gl_cxxalias_dummy
# endif
#else
# define _GL_CXXALIASWARN(func) \
_GL_EXTERN_C int _gl_cxxalias_dummy
#endif
/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
causes a warning to be emitted when the given overloaded variant of ::func
is used but not when GNULIB_NAMESPACE::func is used. */
#if defined __cplusplus && defined GNULIB_NAMESPACE
# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
_GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
GNULIB_NAMESPACE)
# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
_GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
/* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
we enable the warning only when not optimizing. */
# if !__OPTIMIZE__
# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
_GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
"The symbol ::" #func " refers to the system function. " \
"Use " #namespace "::" #func " instead.")
# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
extern __typeof__ (func) func
# else
# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
_GL_EXTERN_C int _gl_cxxalias_dummy
# endif
#else
# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
_GL_EXTERN_C int _gl_cxxalias_dummy
#endif
#endif /* _GL_CXXDEFS_H */

View file

@ -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
#

View file

@ -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

8248
build-aux/ltmain.sh Normal file → Executable file

File diff suppressed because it is too large Load diff

109
build-aux/warn-on-use.h Normal file
View file

@ -0,0 +1,109 @@
/* 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)))
# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
/* Verify the existence of the function. */
# define _GL_WARN_ON_USE(function, message) \
extern __typeof__ (function) function
# else /* Unsupported. */
# define _GL_WARN_ON_USE(function, message) \
_GL_WARN_EXTERN_C int _gl_warn_on_use
# endif
#endif
/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
is like _GL_WARN_ON_USE (function, "string"), except that the function is
declared with the given prototype, consisting of return type, parameters,
and attributes.
This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
not work in this case. */
#ifndef _GL_WARN_ON_USE_CXX
# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
extern rettype function parameters_and_attributes \
__attribute__ ((__warning__ (msg)))
# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
/* Verify the existence of the function. */
# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
extern rettype function parameters_and_attributes
# else /* Unsupported. */
# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
_GL_WARN_EXTERN_C int _gl_warn_on_use
# endif
#endif
/* _GL_WARN_EXTERN_C declaration;
performs the declaration with C linkage. */
#ifndef _GL_WARN_EXTERN_C
# if defined __cplusplus
# define _GL_WARN_EXTERN_C extern "C"
# else
# define _GL_WARN_EXTERN_C extern
# endif
#endif

View file

@ -49,6 +49,9 @@
language is requested. */
#undef ENABLE_NLS
/* Define this to 1 if F_DUPFD behavior does not match POSIX */
#undef FCNTL_DUPFD_BUGGY
/* Define on systems for which file names may have a so-called `drive letter'
prefix, define this to compute the length of that prefix, including the
colon. */
@ -66,14 +69,115 @@
*/
#undef GETLOADAVG_PRIVILEGED
/* Define to 1 when using the gnulib module fcntl-safer. */
/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
whether the gnulib module dirname shall be considered present. */
#undef GNULIB_DIRNAME
/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
whether the gnulib module fcntl-safer shall be considered present. */
#undef GNULIB_FCNTL_SAFER
/* Define to indicate the 'malloc' module. */
#undef GNULIB_MALLOC_GNU
/* Define to 1 when using the gnulib module open. */
#undef GNULIB_OPEN
/* Define to 1 when the gnulib module btowc should be tested. */
#undef GNULIB_TEST_BTOWC
/* Define to 1 when the gnulib module cloexec should be tested. */
#undef GNULIB_TEST_CLOEXEC
/* Define to 1 when the gnulib module dup2 should be tested. */
#undef GNULIB_TEST_DUP2
/* Define to 1 when the gnulib module environ should be tested. */
#undef GNULIB_TEST_ENVIRON
/* Define to 1 when the gnulib module fcntl should be tested. */
#undef GNULIB_TEST_FCNTL
/* Define to 1 when the gnulib module floorf should be tested. */
#undef GNULIB_TEST_FLOORF
/* Define to 1 when the gnulib module getdtablesize should be tested. */
#undef GNULIB_TEST_GETDTABLESIZE
/* Define to 1 when the gnulib module gethostname should be tested. */
#undef GNULIB_TEST_GETHOSTNAME
/* Define to 1 when the gnulib module getloadavg should be tested. */
#undef GNULIB_TEST_GETLOADAVG
/* Define to 1 when the gnulib module getopt-gnu should be tested. */
#undef GNULIB_TEST_GETOPT_GNU
/* Define to 1 when the gnulib module malloc-posix should be tested. */
#undef GNULIB_TEST_MALLOC_POSIX
/* Define to 1 when the gnulib module mbrtowc should be tested. */
#undef GNULIB_TEST_MBRTOWC
/* Define to 1 when the gnulib module mbsinit should be tested. */
#undef GNULIB_TEST_MBSINIT
/* Define to 1 when the gnulib module memchr should be tested. */
#undef GNULIB_TEST_MEMCHR
/* Define to 1 when the gnulib module mktime should be tested. */
#undef GNULIB_TEST_MKTIME
/* Define to 1 when the gnulib module nl_langinfo should be tested. */
#undef GNULIB_TEST_NL_LANGINFO
/* Define to 1 when the gnulib module open should be tested. */
#undef GNULIB_TEST_OPEN
/* Define to 1 when the gnulib module setenv should be tested. */
#undef GNULIB_TEST_SETENV
/* Define to 1 when the gnulib module snprintf should be tested. */
#undef GNULIB_TEST_SNPRINTF
/* Define to 1 when the gnulib module stat should be tested. */
#undef GNULIB_TEST_STAT
/* Define to 1 when the gnulib module strdup should be tested. */
#undef GNULIB_TEST_STRDUP
/* Define to 1 when the gnulib module strerror should be tested. */
#undef GNULIB_TEST_STRERROR
/* Define to 1 when the gnulib module strndup should be tested. */
#undef GNULIB_TEST_STRNDUP
/* Define to 1 when the gnulib module strnlen should be tested. */
#undef GNULIB_TEST_STRNLEN
/* Define to 1 when the gnulib module strsep should be tested. */
#undef GNULIB_TEST_STRSEP
/* Define to 1 when the gnulib module strstr should be tested. */
#undef GNULIB_TEST_STRSTR
/* Define to 1 when the gnulib module timegm should be tested. */
#undef GNULIB_TEST_TIMEGM
/* Define to 1 when the gnulib module time_r should be tested. */
#undef GNULIB_TEST_TIME_R
/* Define to 1 when the gnulib module unsetenv should be tested. */
#undef GNULIB_TEST_UNSETENV
/* Define to 1 when the gnulib module vasprintf should be tested. */
#undef GNULIB_TEST_VASPRINTF
/* Define to 1 when the gnulib module vsnprintf should be tested. */
#undef GNULIB_TEST_VSNPRINTF
/* Define to 1 when the gnulib module wcrtomb should be tested. */
#undef GNULIB_TEST_WCRTOMB
/* Define to 1 when the gnulib module write should be tested. */
#undef GNULIB_TEST_WRITE
/* Define to 1 if you have the `alarm' function. */
#undef HAVE_ALARM
@ -89,6 +193,9 @@
/* Define to 1 if you have the <arpa/inet.h> header file. */
#undef HAVE_ARPA_INET_H
/* Define to 1 if you have the <bp-sym.h> header file. */
#undef HAVE_BP_SYM_H
/* Define to 1 if you have the `btowc' function. */
#undef HAVE_BTOWC
@ -138,6 +245,10 @@
don't. */
#undef HAVE_DECL_GETNAMEINFO
/* Define to 1 if you have the declaration of `getopt_clip', and to 0 if you
don't. */
#undef HAVE_DECL_GETOPT_CLIP
/* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you
don't. */
#undef HAVE_DECL_INET_NTOP
@ -146,6 +257,10 @@
don't. */
#undef HAVE_DECL_ISBLANK
/* Define to 1 if you have the declaration of `optreset', and to 0 if you
don't. */
#undef HAVE_DECL_OPTRESET
/* Define to 1 if you have the declaration of `snprintf', and to 0 if you
don't. */
#undef HAVE_DECL_SNPRINTF
@ -178,10 +293,6 @@
don't. */
#undef HAVE_DECL_SYSCONF
/* Define to 1 if you have the declaration of `timegm', and to 0 if you don't.
*/
#undef HAVE_DECL_TIMEGM
/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you
don't. */
#undef HAVE_DECL_VSNPRINTF
@ -193,15 +304,24 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the `dup2' function. */
#undef HAVE_DUP2
/* Define to 1 if you have the <dustat.h> header file. */
#undef HAVE_DUSTAT_H
/* Define if you have the declaration of environ. */
#undef HAVE_ENVIRON_DECL
/* Define to 1 if you have the <errno.h> header file. */
#undef HAVE_ERRNO_H
/* Define to 1 if you have the <err.h> header file. */
#undef HAVE_ERR_H
/* Define to 1 if you have the `fcntl' function. */
#undef HAVE_FCNTL
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
@ -220,6 +340,9 @@
/* Define to 1 if you have the `fs_stat_dev' function. */
#undef HAVE_FS_STAT_DEV
/* Define to 1 if you have the `getdtablesize' function. */
#undef HAVE_GETDTABLESIZE
/* Define to 1 if you have the `gethostbyname' function. */
#undef HAVE_GETHOSTBYNAME
@ -286,6 +409,9 @@
/* Define to 1 if you have the `isblank' function. */
#undef HAVE_ISBLANK
/* Define to 1 if you have the `iswblank' function. */
#undef HAVE_ISWBLANK
/* Define to 1 if you have the `iswcntrl' function. */
#undef HAVE_ISWCNTRL
@ -298,6 +424,9 @@
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
#undef HAVE_LANGINFO_CODESET
/* Define to 1 if you have the <langinfo.h> header file. */
#undef HAVE_LANGINFO_H
/* Define to 1 if you have the `ldap_get_option' function. */
#undef HAVE_LDAP_GET_OPTION
@ -356,9 +485,15 @@
/* Define to 1 if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
/* Define to 1 if you have the `localtime_r' function. */
#undef HAVE_LOCALTIME_R
/* Define to 1 if the system has the type `long long int'. */
#undef HAVE_LONG_LONG_INT
/* Define to 1 if you have the `lstat' function. */
#undef HAVE_LSTAT
/* Define to 1 if you have the <mach/mach.h> header file. */
#undef HAVE_MACH_MACH_H
@ -369,6 +504,10 @@
/* Define if the 'malloc' function is POSIX compliant. */
#undef HAVE_MALLOC_POSIX
/* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including
config.h and <sys/mman.h>. */
#undef HAVE_MAP_ANONYMOUS
/* Define to 1 if you have the <math.h> header file. */
#undef HAVE_MATH_H
@ -381,6 +520,9 @@
/* Define to 1 if <wchar.h> declares mbstate_t. */
#undef HAVE_MBSTATE_T
/* Define to 1 if you have the `memchr' function. */
#undef HAVE_MEMCHR
/* Define to 1 if you have the `memmove' function. */
#undef HAVE_MEMMOVE
@ -390,6 +532,9 @@
/* Define to 1 if you have the <mntent.h> header file. */
#undef HAVE_MNTENT_H
/* Define to 1 if you have the `mprotect' function. */
#undef HAVE_MPROTECT
/* Defined if mysqlclient is found and can compile */
#undef HAVE_MYSQLCLIENT
@ -405,6 +550,9 @@
/* Define to 1 if you have the <nlist.h> header file. */
#undef HAVE_NLIST_H
/* Define to 1 if you have the `nl_langinfo' function. */
#undef HAVE_NL_LANGINFO
/* Define to 1 if you have the <openssl/crypto.h> header file. */
#undef HAVE_OPENSSL_CRYPTO_H
@ -447,12 +595,502 @@
/* Define to 1 if you have the <random.h> header file. */
#undef HAVE_RANDOM_H
/* Define to 1 if accept is declared even after undefining macros. */
#undef HAVE_RAW_DECL_ACCEPT
/* Define to 1 if accept4 is declared even after undefining macros. */
#undef HAVE_RAW_DECL_ACCEPT4
/* Define to 1 if acosl is declared even after undefining macros. */
#undef HAVE_RAW_DECL_ACOSL
/* Define to 1 if asinl is declared even after undefining macros. */
#undef HAVE_RAW_DECL_ASINL
/* Define to 1 if atanl is declared even after undefining macros. */
#undef HAVE_RAW_DECL_ATANL
/* Define to 1 if atoll is declared even after undefining macros. */
#undef HAVE_RAW_DECL_ATOLL
/* Define to 1 if bind is declared even after undefining macros. */
#undef HAVE_RAW_DECL_BIND
/* Define to 1 if btowc is declared even after undefining macros. */
#undef HAVE_RAW_DECL_BTOWC
/* Define to 1 if canonicalize_file_name is declared even after undefining
macros. */
#undef HAVE_RAW_DECL_CANONICALIZE_FILE_NAME
/* Define to 1 if ceilf is declared even after undefining macros. */
#undef HAVE_RAW_DECL_CEILF
/* Define to 1 if ceill is declared even after undefining macros. */
#undef HAVE_RAW_DECL_CEILL
/* Define to 1 if chown is declared even after undefining macros. */
#undef HAVE_RAW_DECL_CHOWN
/* Define to 1 if connect is declared even after undefining macros. */
#undef HAVE_RAW_DECL_CONNECT
/* Define to 1 if cosl is declared even after undefining macros. */
#undef HAVE_RAW_DECL_COSL
/* Define to 1 if dprintf is declared even after undefining macros. */
#undef HAVE_RAW_DECL_DPRINTF
/* Define to 1 if dup2 is declared even after undefining macros. */
#undef HAVE_RAW_DECL_DUP2
/* Define to 1 if dup3 is declared even after undefining macros. */
#undef HAVE_RAW_DECL_DUP3
/* Define to 1 if duplocale is declared even after undefining macros. */
#undef HAVE_RAW_DECL_DUPLOCALE
/* Define to 1 if endusershell is declared even after undefining macros. */
#undef HAVE_RAW_DECL_ENDUSERSHELL
/* Define to 1 if environ is declared even after undefining macros. */
#undef HAVE_RAW_DECL_ENVIRON
/* Define to 1 if euidaccess is declared even after undefining macros. */
#undef HAVE_RAW_DECL_EUIDACCESS
/* Define to 1 if expl is declared even after undefining macros. */
#undef HAVE_RAW_DECL_EXPL
/* Define to 1 if faccessat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FACCESSAT
/* Define to 1 if fchdir is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FCHDIR
/* Define to 1 if fchmodat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FCHMODAT
/* Define to 1 if fchownat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FCHOWNAT
/* Define to 1 if fcntl is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FCNTL
/* Define to 1 if floorf is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FLOORF
/* Define to 1 if floorl is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FLOORL
/* Define to 1 if fpurge is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FPURGE
/* Define to 1 if freeaddrinfo is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FREEADDRINFO
/* Define to 1 if frexpl is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FREXPL
/* Define to 1 if fseeko is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FSEEKO
/* Define to 1 if fstatat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FSTATAT
/* Define to 1 if fsync is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FSYNC
/* Define to 1 if ftello is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FTELLO
/* Define to 1 if ftruncate is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FTRUNCATE
/* Define to 1 if futimens is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FUTIMENS
/* Define to 1 if gai_strerror is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GAI_STRERROR
/* Define to 1 if getaddrinfo is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETADDRINFO
/* Define to 1 if getcwd is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETCWD
/* Define to 1 if getdelim is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETDELIM
/* Define to 1 if getdomainname is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETDOMAINNAME
/* Define to 1 if getdtablesize is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETDTABLESIZE
/* Define to 1 if getgroups is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETGROUPS
/* Define to 1 if gethostname is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETHOSTNAME
/* Define to 1 if getline is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETLINE
/* Define to 1 if getloadavg is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETLOADAVG
/* Define to 1 if getlogin is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETLOGIN
/* Define to 1 if getlogin_r is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETLOGIN_R
/* Define to 1 if getnameinfo is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETNAMEINFO
/* Define to 1 if getpagesize is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETPAGESIZE
/* Define to 1 if getpeername is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETPEERNAME
/* Define to 1 if getsockname is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETSOCKNAME
/* Define to 1 if getsockopt is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETSOCKOPT
/* Define to 1 if getsubopt is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETSUBOPT
/* Define to 1 if getusershell is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETUSERSHELL
/* Define to 1 if grantpt is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GRANTPT
/* Define to 1 if inet_ntop is declared even after undefining macros. */
#undef HAVE_RAW_DECL_INET_NTOP
/* Define to 1 if inet_pton is declared even after undefining macros. */
#undef HAVE_RAW_DECL_INET_PTON
/* Define to 1 if initstat_r is declared even after undefining macros. */
#undef HAVE_RAW_DECL_INITSTAT_R
/* Define to 1 if lchmod is declared even after undefining macros. */
#undef HAVE_RAW_DECL_LCHMOD
/* Define to 1 if lchown is declared even after undefining macros. */
#undef HAVE_RAW_DECL_LCHOWN
/* Define to 1 if ldexpl is declared even after undefining macros. */
#undef HAVE_RAW_DECL_LDEXPL
/* Define to 1 if link is declared even after undefining macros. */
#undef HAVE_RAW_DECL_LINK
/* Define to 1 if linkat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_LINKAT
/* Define to 1 if listen is declared even after undefining macros. */
#undef HAVE_RAW_DECL_LISTEN
/* Define to 1 if logb is declared even after undefining macros. */
#undef HAVE_RAW_DECL_LOGB
/* Define to 1 if logl is declared even after undefining macros. */
#undef HAVE_RAW_DECL_LOGL
/* Define to 1 if lseek is declared even after undefining macros. */
#undef HAVE_RAW_DECL_LSEEK
/* Define to 1 if lstat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_LSTAT
/* Define to 1 if mbrlen is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MBRLEN
/* Define to 1 if mbrtowc is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MBRTOWC
/* Define to 1 if mbsinit is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MBSINIT
/* Define to 1 if mbsnrtowcs is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MBSNRTOWCS
/* Define to 1 if mbsrtowcs is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MBSRTOWCS
/* Define to 1 if memmem is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MEMMEM
/* Define to 1 if mempcpy is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MEMPCPY
/* Define to 1 if memrchr is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MEMRCHR
/* Define to 1 if mkdirat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MKDIRAT
/* Define to 1 if mkdtemp is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MKDTEMP
/* Define to 1 if mkfifo is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MKFIFO
/* Define to 1 if mkfifoat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MKFIFOAT
/* Define to 1 if mknod is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MKNOD
/* Define to 1 if mknodat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MKNODAT
/* Define to 1 if mkostemp is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MKOSTEMP
/* Define to 1 if mkostemps is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MKOSTEMPS
/* Define to 1 if mkstemp is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MKSTEMP
/* Define to 1 if mkstemps is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MKSTEMPS
/* Define to 1 if nl_langinfo is declared even after undefining macros. */
#undef HAVE_RAW_DECL_NL_LANGINFO
/* Define to 1 if openat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_OPENAT
/* Define to 1 if pipe2 is declared even after undefining macros. */
#undef HAVE_RAW_DECL_PIPE2
/* Define to 1 if popen is declared even after undefining macros. */
#undef HAVE_RAW_DECL_POPEN
/* Define to 1 if pread is declared even after undefining macros. */
#undef HAVE_RAW_DECL_PREAD
/* Define to 1 if ptsname is declared even after undefining macros. */
#undef HAVE_RAW_DECL_PTSNAME
/* Define to 1 if pwrite is declared even after undefining macros. */
#undef HAVE_RAW_DECL_PWRITE
/* Define to 1 if random_r is declared even after undefining macros. */
#undef HAVE_RAW_DECL_RANDOM_R
/* Define to 1 if rawmemchr is declared even after undefining macros. */
#undef HAVE_RAW_DECL_RAWMEMCHR
/* Define to 1 if readlink is declared even after undefining macros. */
#undef HAVE_RAW_DECL_READLINK
/* Define to 1 if readlinkat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_READLINKAT
/* Define to 1 if realpath is declared even after undefining macros. */
#undef HAVE_RAW_DECL_REALPATH
/* Define to 1 if recv is declared even after undefining macros. */
#undef HAVE_RAW_DECL_RECV
/* Define to 1 if recvfrom is declared even after undefining macros. */
#undef HAVE_RAW_DECL_RECVFROM
/* Define to 1 if renameat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_RENAMEAT
/* Define to 1 if rmdir is declared even after undefining macros. */
#undef HAVE_RAW_DECL_RMDIR
/* Define to 1 if round is declared even after undefining macros. */
#undef HAVE_RAW_DECL_ROUND
/* Define to 1 if roundf is declared even after undefining macros. */
#undef HAVE_RAW_DECL_ROUNDF
/* Define to 1 if roundl is declared even after undefining macros. */
#undef HAVE_RAW_DECL_ROUNDL
/* Define to 1 if rpmatch is declared even after undefining macros. */
#undef HAVE_RAW_DECL_RPMATCH
/* Define to 1 if send is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SEND
/* Define to 1 if sendto is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SENDTO
/* Define to 1 if setenv is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SETENV
/* Define to 1 if setsockopt is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SETSOCKOPT
/* Define to 1 if setstate_r is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SETSTATE_R
/* Define to 1 if setusershell is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SETUSERSHELL
/* Define to 1 if shutdown is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SHUTDOWN
/* Define to 1 if sinl is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SINL
/* Define to 1 if sleep is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SLEEP
/* Define to 1 if snprintf is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SNPRINTF
/* Define to 1 if socket is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SOCKET
/* Define to 1 if sqrtl is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SQRTL
/* Define to 1 if srandom_r is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SRANDOM_R
/* Define to 1 if stat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STAT
/* Define to 1 if stpcpy is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STPCPY
/* Define to 1 if stpncpy is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STPNCPY
/* Define to 1 if strcasestr is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRCASESTR
/* Define to 1 if strchrnul is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRCHRNUL
/* Define to 1 if strdup is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRDUP
/* Define to 1 if strncat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRNCAT
/* Define to 1 if strndup is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRNDUP
/* Define to 1 if strnlen is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRNLEN
/* Define to 1 if strpbrk is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRPBRK
/* Define to 1 if strsep is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRSEP
/* Define to 1 if strsignal is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRSIGNAL
/* Define to 1 if strtod is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRTOD
/* Define to 1 if strtok_r is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRTOK_R
/* Define to 1 if strtoll is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRTOLL
/* Define to 1 if strtoull is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRTOULL
/* Define to 1 if strverscmp is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRVERSCMP
/* Define to 1 if symlink is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SYMLINK
/* Define to 1 if symlinkat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SYMLINKAT
/* Define to 1 if tanl is declared even after undefining macros. */
#undef HAVE_RAW_DECL_TANL
/* Define to 1 if tmpfile is declared even after undefining macros. */
#undef HAVE_RAW_DECL_TMPFILE
/* Define to 1 if trunc is declared even after undefining macros. */
#undef HAVE_RAW_DECL_TRUNC
/* Define to 1 if truncf is declared even after undefining macros. */
#undef HAVE_RAW_DECL_TRUNCF
/* Define to 1 if truncl is declared even after undefining macros. */
#undef HAVE_RAW_DECL_TRUNCL
/* Define to 1 if ttyname_r is declared even after undefining macros. */
#undef HAVE_RAW_DECL_TTYNAME_R
/* Define to 1 if unlink is declared even after undefining macros. */
#undef HAVE_RAW_DECL_UNLINK
/* Define to 1 if unlinkat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_UNLINKAT
/* Define to 1 if unlockpt is declared even after undefining macros. */
#undef HAVE_RAW_DECL_UNLOCKPT
/* Define to 1 if unsetenv is declared even after undefining macros. */
#undef HAVE_RAW_DECL_UNSETENV
/* Define to 1 if usleep is declared even after undefining macros. */
#undef HAVE_RAW_DECL_USLEEP
/* Define to 1 if utimensat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_UTIMENSAT
/* Define to 1 if vdprintf is declared even after undefining macros. */
#undef HAVE_RAW_DECL_VDPRINTF
/* Define to 1 if vsnprintf is declared even after undefining macros. */
#undef HAVE_RAW_DECL_VSNPRINTF
/* Define to 1 if wcrtomb is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCRTOMB
/* Define to 1 if wcsnrtombs is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCSNRTOMBS
/* Define to 1 if wcsrtombs is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCSRTOMBS
/* Define to 1 if wctob is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCTOB
/* Define to 1 if wcwidth is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCWIDTH
/* Define to 1 if you have the <rsa.h> header file. */
#undef HAVE_RSA_H
/* Define to 1 if the system has the type `sa_family_t'. */
#undef HAVE_SA_FAMILY_T
/* Define to 1 if you have the <search.h> header file. */
#undef HAVE_SEARCH_H
/* Define to 1 if you have the `select' function. */
#undef HAVE_SELECT
/* Define to 1 if you have the `setenv' function. */
#undef HAVE_SETENV
/* Define to 1 if you have the `shutdown' function. */
#undef HAVE_SHUTDOWN
@ -471,6 +1109,11 @@
/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
/* Define if the return value of the snprintf function is the number of of
bytes (excluding the terminating NUL) that would have been produced if the
buffer had been large enough. */
#undef HAVE_SNPRINTF_RETVAL_C99
/* Define to 1 if you have the `socket' function. */
#undef HAVE_SOCKET
@ -486,6 +1129,9 @@
/* Define to 1 if stdbool.h conforms to C99. */
#undef HAVE_STDBOOL_H
/* Define to 1 if you have the <stddef.h> header file. */
#undef HAVE_STDDEF_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
@ -511,12 +1157,15 @@
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define if you have the strndup() function and it works. */
/* Define to 1 if you have the `strndup' function. */
#undef HAVE_STRNDUP
/* Define to 1 if you have the `strnlen' function. */
#undef HAVE_STRNLEN
/* Define to 1 if you have the `strsep' function. */
#undef HAVE_STRSEP
/* Define to 1 if you have the `strstr' function. */
#undef HAVE_STRSTR
@ -586,6 +1235,9 @@
/* Define to 1 if you have the <sys/loadavg.h> header file. */
#undef HAVE_SYS_LOADAVG_H
/* 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/mntent.h> header file. */
#undef HAVE_SYS_MNTENT_H
@ -643,6 +1295,9 @@
/* Define to 1 if you have the <time.h> header file. */
#undef HAVE_TIME_H
/* Define to 1 if you have the `tsearch' function. */
#undef HAVE_TSEARCH
/* Define to 1 if you have the <uio.h> header file. */
#undef HAVE_UIO_H
@ -652,6 +1307,9 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the `unsetenv' function. */
#undef HAVE_UNSETENV
/* Define to 1 if the system has the type `unsigned long long int'. */
#undef HAVE_UNSIGNED_LONG_LONG_INT
@ -706,18 +1364,34 @@
/* Define to 1 if you have the <x509.h> header file. */
#undef HAVE_X509_H
/* Define to 1 if you have the <xlocale.h> header file. */
#undef HAVE_XLOCALE_H
/* Define to 1 if the system has the type `_Bool'. */
#undef HAVE__BOOL
/* Whether __va_copy() is available */
#undef HAVE___VA_COPY
/* Define HOST_NAME_MAX when <limits.h> does not define it. */
#undef HOST_NAME_MAX
#if FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
# define ISSLASH(C) ((C) == '/' || (C) == '\\')
#else
# define ISSLASH(C) ((C) == '/')
#endif
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */
#undef MALLOC_0_IS_NONNULL
/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */
#undef MAP_ANONYMOUS
/* Define if the mbrtowc function has the NULL string argument bug. */
#undef MBRTOWC_NULL_ARG_BUG
@ -792,6 +1466,9 @@
/* path and args for nslookup */
#undef NSLOOKUP_COMMAND
/* Define to 1 if the nlist n_name member is a pointer */
#undef N_NAME_POINTER
/* Define to 1 if open() fails to recognize a trailing slash. */
#undef OPEN_TRAILING_SLASH_BUG
@ -864,6 +1541,10 @@
/* path to /proc/meminfo if name changes */
#undef PROC_MEMINFO
/* Define to the type that is the result of default argument promotions of
type mode_t. */
#undef PROMOTED_MODE_T
/* Number of columns in ps command */
#undef PS_COLS
@ -886,6 +1567,17 @@
/* Forced workaround on redhat in spopen */
#undef REDHAT_SPOPEN_ERROR
/* Define to 1 if stat needs help when passed a directory name with a trailing
slash */
#undef REPLACE_FUNC_STAT_DIR
/* Define to 1 if stat needs help when passed a file name with a trailing
slash */
#undef REPLACE_FUNC_STAT_FILE
/* Define if nl_langinfo exists but is overridden by gnulib. */
#undef REPLACE_NL_LANGINFO
/* Define this to 1 if strerror is broken. */
#undef REPLACE_STRERROR
@ -901,7 +1593,9 @@
/* Define as the maximum value of type 'size_t', if the system doesn't define
it. */
#undef SIZE_MAX
#ifndef SIZE_MAX
# undef SIZE_MAX
#endif
/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
'size_t'. */
@ -927,6 +1621,9 @@
affected.) */
#undef STATFS_TRUNCATES_BLOCK_COUNTS
/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
#undef STAT_MACROS_BROKEN
/* Define if there is no specific function for reading file systems usage
information and you have the <sys/filsys.h> header file. (SVR2) */
#undef STAT_READ_FILSYS
@ -983,6 +1680,10 @@
<sys/cpustats.h>. */
#undef UMAX4_3
/* Define to the prefix of C symbols at the assembler and linker level, either
an underscore or empty. */
#undef USER_LABEL_PREFIX
/* Define if using gnutls libraries */
#undef USE_GNUTLS
@ -995,6 +1696,9 @@
/* Version number of package */
#undef VERSION
/* Define to 1 if unsetenv returns void instead of int. */
#undef VOID_UNSETENV
/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
'wchar_t'. */
#undef WCHAR_T_SUFFIX
@ -1002,10 +1706,17 @@
/* path and arguments for invoking 'who' */
#undef WHO_COMMAND
/* Define if WSAStartup is needed. */
#undef WINDOWS_SOCKETS
/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
'wint_t'. */
#undef WINT_T_SUFFIX
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
@ -1102,6 +1813,12 @@
/* Define to rpl_mktime if the replacement function should be used. */
#undef mktime
/* Define to `int' if <sys/types.h> does not define. */
#undef mode_t
/* Define to the type of st_nlink in struct stat, or a supertype. */
#undef nlink_t
/* Define to `int' if <sys/types.h> does not define. */
#undef pid_t
@ -1176,15 +1893,15 @@
/* Define as a signed type of the same size as size_t. */
#undef ssize_t
/* Define to rpl_strnlen if the replacement function should be used. */
#undef strnlen
/* Define as a marker that can be attached to function parameter declarations
for parameters that are not used. This helps to reduce warnings, such as
from GCC -Wunused-parameter. */
/* Define as a marker that can be attached to declarations that might not
be used. This helps to reduce warnings, such as from
GCC -Wunused-parameter. */
#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
# define _UNUSED_PARAMETER_ __attribute__ ((__unused__))
# define _GL_UNUSED __attribute__ ((__unused__))
#else
# define _UNUSED_PARAMETER_
# define _GL_UNUSED
#endif
/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name
is a misnomer outside of parameter lists. */
#define _UNUSED_PARAMETER_ _GL_UNUSED

27732
configure vendored

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT(nagios-plugins,1.4.14)
AC_INIT(nagios-plugins,1.4.15)
AC_CONFIG_SRCDIR(NPTest.pm)
AC_CONFIG_FILES(gl/Makefile)
AC_CONFIG_AUX_DIR(build-aux)
@ -99,7 +99,15 @@ AC_SUBST(REV_DATESTAMP)
AC_SUBST(REV_TIMESTAMP)
dnl Check if version file is present
AM_CONDITIONAL([RELEASE_PRESENT], [test -f release])
AM_CONDITIONAL([RELEASE_PRESENT], [test -f $srcdir/release])
# Also read in the version from it
if test -f $srcdir/release; then
NP_RELEASE="$(<release)"
else
NP_RELEASE="$PACKAGE_VERSION"
fi
AC_SUBST(NP_RELEASE)
dnl Checks for programs.
AC_PATH_PROG(PYTHON,python)
@ -577,14 +585,73 @@ elif test "$ac_cv_uname_s" = "SunOS"; then
ac_cv_ps_cols=9
AC_MSG_RESULT([using nagios-plugins internal ps command (pst3) for solaris])
if test `isainfo -b` = 64 ; then
PST3CFLAGS="-m64"
AC_SUBST(PST3CFLAGS)
pst3_use_64bit=1
AC_MSG_NOTICE([using 64bit pst3])
else
AC_MSG_NOTICE([using 32bit pst3])
fi
EXTRAS_ROOT="$EXTRAS_ROOT pst3"
if test "$pst3_use_64bit" = 1; then
dnl Test if we can actually compile code in 64bit
old_cflags=$CFLAGS
CFLAGS="$CFLAGS -m64"
pst3_64bit_working=0
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([], [
return sizeof(void*) == 8 ? 0 : 1;
])
],[
PST3CFLAGS="-m64"
AC_SUBST(PST3CFLAGS)
pst3_64bit_working=1
AC_MSG_NOTICE([using -m64 for 64bit code])
],[
pst3_64bit_working=0
AC_MSG_NOTICE([compiler do not like -m64])
])
CFLAGS=$old_cflags
if test "$pst3_64bit_working" = 0; then
old_cflags=$CFLAGS
CFLAGS="$CFLAGS -xarch=v9"
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([], [
return sizeof(void*) == 8 ? 0 : 1;
])
],[
PST3CFLAGS="-xarch=v9"
AC_SUBST(PST3CFLAGS)
pst3_64bit_working=1
AC_MSG_NOTICE([using -xarch=v9 for 64bit code])
],[
pst3_64bit_working=0
AC_MSG_NOTICE([compiler do not like -xarch=v9])
])
CFLAGS=$old_cflags
fi
if test "$pst3_64bit_working" = 0; then
old_cflags=$CFLAGS
CFLAGS="$CFLAGS -xarch=amd64"
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([], [
return sizeof(void*) == 8 ? 0 : 1;
])
],[
PST3CFLAGS="-xarch=amd64"
AC_SUBST(PST3CFLAGS)
pst3_64bit_working=1
AC_MSG_NOTICE([using -xarch=amd64 for 64bit code])
],[
pst3_64bit_working=0
AC_MSG_NOTICE([compiler do not like -xarch=amd64])
])
CFLAGS=$old_cflags
fi
if test "$pst3_64bit_working" = 0; then
AC_MSG_ERROR([I don't know how to build a 64-bit object!])
fi
fi
dnl Removing this for the moment - Ton
dnl Using /usr/ucb/ps on Solaris systems, to avoid truncation
dnl Limitation that command name is not available
@ -869,10 +936,17 @@ ac_cv_ping_has_timeout=no
if test -n "$with_ping_command"
then
AC_MSG_RESULT([(command-line) $with_ping_command])
if test -n "$ac_cv_ping_packets_first"
if echo "$with_ping_command" | grep '%d.*%d.*%s' >/dev/null
then
ac_cv_ping_packets_first=yes
ac_cv_ping_has_timeout=yes
elif echo "$with_ping_command" | grep '%d.*%s.*%d' >/dev/null || \
echo "$with_ping_command" | grep '%s.*%d.*%d' >/dev/null
then
ac_cv_ping_has_timeout=yes
elif echo "$with_ping_command" | grep '%d.*%s' >/dev/null
then
ac_cv_ping_packets_first=yes
fi
elif [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \
@ -973,7 +1047,15 @@ ac_cv_ping6_packets_first=no
if test -n "$with_ping6_command"
then
AC_MSG_RESULT([(command-line) $with_ping6_command])
if test -n "$ac_cv_ping6_packets_first"
if echo "$with_ping6_command" | grep '%d.*%d.*%s' >/dev/null
then
ac_cv_ping6_packets_first=yes
elif echo "$with_ping6_command" | grep '%d.*%s.*%d' >/dev/null || \
echo "$with_ping6_command" | grep '%s.*%d.*%d' >/dev/null
then
# Just keep same logic as ping (IPv4) if we ever need ac_cv_ping6_has_timeout
true
elif echo "$with_ping6_command" | grep '%d.*%s' >/dev/null
then
ac_cv_ping6_packets_first=yes
fi
@ -1535,9 +1617,7 @@ if test -n "$PATH_TO_APTGET" ; then
fi
if test -f plugins/check_nt.c ; then
EXTRAS="$EXTRAS check_nt"
elif test -f ../plugins/check_nt.c ; then
if test -f $srcdir/plugins/check_nt.c ; then
EXTRAS="$EXTRAS check_nt"
fi

View file

@ -44,7 +44,7 @@ sub max_state($$){
my $nextdev;
if(defined $ARGV[0]) { $nextdev = shift; }
else { $nextdev = "md[0-9]"; }
else { $nextdev = "md[0-9]+"; }
my $code = "UNKNOWN";
my $msg = "";
@ -64,6 +64,7 @@ while(defined $nextdev){
} elsif (/recovery = (.*?)\s/) {
$recovery{$device} = $1;
($finish{$device}) = /finish=(.*?min)/;
$device=undef;
} elsif (/^\s*$/) {
$device=undef;
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,5 @@
/* Determine alignment of types.
Copyright (C) 2003-2004, 2006, 2009 Free Software Foundation, Inc.
Copyright (C) 2003-2004, 2006, 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
@ -20,14 +20,34 @@
#include <stddef.h>
/* Determine the alignment of a type at compile time. */
#if defined __GNUC__
# define alignof __alignof__
#elif defined __cplusplus
/* Determine the alignment of a structure slot (field) of a given type,
at compile time. Note that the result depends on the ABI.
Note: The result cannot be used as a value for an 'enum' constant,
due to bugs in HP-UX 10.20 cc and AIX 3.2.5 xlc. */
#if defined __cplusplus
template <class type> struct alignof_helper { char __slot1; type __slot2; };
# define alignof(type) offsetof (alignof_helper<type>, __slot2)
# define alignof_slot(type) offsetof (alignof_helper<type>, __slot2)
#else
# define alignof(type) offsetof (struct { char __slot1; type __slot2; }, __slot2)
# define alignof_slot(type) offsetof (struct { char __slot1; type __slot2; }, __slot2)
#endif
/* Determine the good alignment of a object of the given type at compile time.
Note that this is not necessarily the same as alignof_slot(type).
For example, with GNU C on x86 platforms: alignof_type(double) = 8, but
- when -malign-double is not specified: alignof_slot(double) = 4,
- when -malign-double is specified: alignof_slot(double) = 8.
Note: The result cannot be used as a value for an 'enum' constant,
due to bugs in HP-UX 10.20 cc and AIX 3.2.5 xlc. */
#if defined __GNUC__
# define alignof_type __alignof__
#else
# define alignof_type alignof_slot
#endif
/* alignof is an alias for alignof_slot semantics, since that's what most
callers need.
Note: The result cannot be used as a value for an 'enum' constant,
due to bugs in HP-UX 10.20 cc and AIX 3.2.5 xlc. */
#define alignof alignof_slot
#endif /* _ALIGNOF_H */

View file

@ -1,489 +0,0 @@
/* alloca.c -- allocate automatically reclaimed memory
(Mostly) portable public-domain implementation -- D A Gwyn
This implementation of the PWB library alloca function,
which is used to allocate space off the run-time stack so
that it is automatically reclaimed upon procedure exit,
was inspired by discussions with J. Q. Johnson of Cornell.
J.Otto Tennant <jot@cray.com> contributed the Cray support.
There are some preprocessor constants that can
be defined when compiling for your specific system, for
improved efficiency; however, the defaults should be okay.
The general concept of this implementation is to keep
track of all alloca-allocated blocks, and reclaim any
that are found to be deeper in the stack than the current
invocation. This heuristic does not reclaim storage as
soon as it becomes invalid, but it will do so eventually.
As a special case, alloca(0) reclaims storage without
allocating any. It is a good idea to use alloca(0) in
your main control loop, etc. to force garbage collection. */
#include <config.h>
#include <alloca.h>
#include <string.h>
#include <stdlib.h>
#ifdef emacs
# include "lisp.h"
# include "blockinput.h"
# ifdef EMACS_FREE
# undef free
# define free EMACS_FREE
# endif
#else
# define memory_full() abort ()
#endif
/* If compiling with GCC 2, this file's not needed. */
#if !defined (__GNUC__) || __GNUC__ < 2
/* If someone has defined alloca as a macro,
there must be some other way alloca is supposed to work. */
# ifndef alloca
# ifdef emacs
# ifdef static
/* actually, only want this if static is defined as ""
-- this is for usg, in which emacs must undefine static
in order to make unexec workable
*/
# ifndef STACK_DIRECTION
you
lose
-- must know STACK_DIRECTION at compile-time
/* Using #error here is not wise since this file should work for
old and obscure compilers. */
# endif /* STACK_DIRECTION undefined */
# endif /* static */
# endif /* emacs */
/* If your stack is a linked list of frames, you have to
provide an "address metric" ADDRESS_FUNCTION macro. */
# if defined (CRAY) && defined (CRAY_STACKSEG_END)
long i00afunc ();
# define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg))
# else
# define ADDRESS_FUNCTION(arg) &(arg)
# endif
/* Define STACK_DIRECTION if you know the direction of stack
growth for your system; otherwise it will be automatically
deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
# ifndef STACK_DIRECTION
# define STACK_DIRECTION 0 /* Direction unknown. */
# endif
# if STACK_DIRECTION != 0
# define STACK_DIR STACK_DIRECTION /* Known at compile-time. */
# else /* STACK_DIRECTION == 0; need run-time code. */
static int stack_dir; /* 1 or -1 once known. */
# define STACK_DIR stack_dir
static void
find_stack_direction (void)
{
static char *addr = NULL; /* Address of first `dummy', once known. */
auto char dummy; /* To get stack address. */
if (addr == NULL)
{ /* Initial entry. */
addr = ADDRESS_FUNCTION (dummy);
find_stack_direction (); /* Recurse once. */
}
else
{
/* Second entry. */
if (ADDRESS_FUNCTION (dummy) > addr)
stack_dir = 1; /* Stack grew upward. */
else
stack_dir = -1; /* Stack grew downward. */
}
}
# endif /* STACK_DIRECTION == 0 */
/* An "alloca header" is used to:
(a) chain together all alloca'ed blocks;
(b) keep track of stack depth.
It is very important that sizeof(header) agree with malloc
alignment chunk size. The following default should work okay. */
# ifndef ALIGN_SIZE
# define ALIGN_SIZE sizeof(double)
# endif
typedef union hdr
{
char align[ALIGN_SIZE]; /* To force sizeof(header). */
struct
{
union hdr *next; /* For chaining headers. */
char *deep; /* For stack depth measure. */
} h;
} header;
static header *last_alloca_header = NULL; /* -> last alloca header. */
/* Return a pointer to at least SIZE bytes of storage,
which will be automatically reclaimed upon exit from
the procedure that called alloca. Originally, this space
was supposed to be taken from the current stack frame of the
caller, but that method cannot be made to work for some
implementations of C, for example under Gould's UTX/32. */
void *
alloca (size_t size)
{
auto char probe; /* Probes stack depth: */
register char *depth = ADDRESS_FUNCTION (probe);
# if STACK_DIRECTION == 0
if (STACK_DIR == 0) /* Unknown growth direction. */
find_stack_direction ();
# endif
/* Reclaim garbage, defined as all alloca'd storage that
was allocated from deeper in the stack than currently. */
{
register header *hp; /* Traverses linked list. */
# ifdef emacs
BLOCK_INPUT;
# endif
for (hp = last_alloca_header; hp != NULL;)
if ((STACK_DIR > 0 && hp->h.deep > depth)
|| (STACK_DIR < 0 && hp->h.deep < depth))
{
register header *np = hp->h.next;
free (hp); /* Collect garbage. */
hp = np; /* -> next header. */
}
else
break; /* Rest are not deeper. */
last_alloca_header = hp; /* -> last valid storage. */
# ifdef emacs
UNBLOCK_INPUT;
# endif
}
if (size == 0)
return NULL; /* No allocation required. */
/* Allocate combined header + user data storage. */
{
/* Address of header. */
register header *new;
size_t combined_size = sizeof (header) + size;
if (combined_size < sizeof (header))
memory_full ();
new = malloc (combined_size);
if (! new)
memory_full ();
new->h.next = last_alloca_header;
new->h.deep = depth;
last_alloca_header = new;
/* User storage begins just after header. */
return (void *) (new + 1);
}
}
# if defined (CRAY) && defined (CRAY_STACKSEG_END)
# ifdef DEBUG_I00AFUNC
# include <stdio.h>
# endif
# ifndef CRAY_STACK
# define CRAY_STACK
# ifndef CRAY2
/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */
struct stack_control_header
{
long shgrow:32; /* Number of times stack has grown. */
long shaseg:32; /* Size of increments to stack. */
long shhwm:32; /* High water mark of stack. */
long shsize:32; /* Current size of stack (all segments). */
};
/* The stack segment linkage control information occurs at
the high-address end of a stack segment. (The stack
grows from low addresses to high addresses.) The initial
part of the stack segment linkage control information is
0200 (octal) words. This provides for register storage
for the routine which overflows the stack. */
struct stack_segment_linkage
{
long ss[0200]; /* 0200 overflow words. */
long sssize:32; /* Number of words in this segment. */
long ssbase:32; /* Offset to stack base. */
long:32;
long sspseg:32; /* Offset to linkage control of previous
segment of stack. */
long:32;
long sstcpt:32; /* Pointer to task common address block. */
long sscsnm; /* Private control structure number for
microtasking. */
long ssusr1; /* Reserved for user. */
long ssusr2; /* Reserved for user. */
long sstpid; /* Process ID for pid based multi-tasking. */
long ssgvup; /* Pointer to multitasking thread giveup. */
long sscray[7]; /* Reserved for Cray Research. */
long ssa0;
long ssa1;
long ssa2;
long ssa3;
long ssa4;
long ssa5;
long ssa6;
long ssa7;
long sss0;
long sss1;
long sss2;
long sss3;
long sss4;
long sss5;
long sss6;
long sss7;
};
# else /* CRAY2 */
/* The following structure defines the vector of words
returned by the STKSTAT library routine. */
struct stk_stat
{
long now; /* Current total stack size. */
long maxc; /* Amount of contiguous space which would
be required to satisfy the maximum
stack demand to date. */
long high_water; /* Stack high-water mark. */
long overflows; /* Number of stack overflow ($STKOFEN) calls. */
long hits; /* Number of internal buffer hits. */
long extends; /* Number of block extensions. */
long stko_mallocs; /* Block allocations by $STKOFEN. */
long underflows; /* Number of stack underflow calls ($STKRETN). */
long stko_free; /* Number of deallocations by $STKRETN. */
long stkm_free; /* Number of deallocations by $STKMRET. */
long segments; /* Current number of stack segments. */
long maxs; /* Maximum number of stack segments so far. */
long pad_size; /* Stack pad size. */
long current_address; /* Current stack segment address. */
long current_size; /* Current stack segment size. This
number is actually corrupted by STKSTAT to
include the fifteen word trailer area. */
long initial_address; /* Address of initial segment. */
long initial_size; /* Size of initial segment. */
};
/* The following structure describes the data structure which trails
any stack segment. I think that the description in 'asdef' is
out of date. I only describe the parts that I am sure about. */
struct stk_trailer
{
long this_address; /* Address of this block. */
long this_size; /* Size of this block (does not include
this trailer). */
long unknown2;
long unknown3;
long link; /* Address of trailer block of previous
segment. */
long unknown5;
long unknown6;
long unknown7;
long unknown8;
long unknown9;
long unknown10;
long unknown11;
long unknown12;
long unknown13;
long unknown14;
};
# endif /* CRAY2 */
# endif /* not CRAY_STACK */
# ifdef CRAY2
/* Determine a "stack measure" for an arbitrary ADDRESS.
I doubt that "lint" will like this much. */
static long
i00afunc (long *address)
{
struct stk_stat status;
struct stk_trailer *trailer;
long *block, size;
long result = 0;
/* We want to iterate through all of the segments. The first
step is to get the stack status structure. We could do this
more quickly and more directly, perhaps, by referencing the
$LM00 common block, but I know that this works. */
STKSTAT (&status);
/* Set up the iteration. */
trailer = (struct stk_trailer *) (status.current_address
+ status.current_size
- 15);
/* There must be at least one stack segment. Therefore it is
a fatal error if "trailer" is null. */
if (trailer == 0)
abort ();
/* Discard segments that do not contain our argument address. */
while (trailer != 0)
{
block = (long *) trailer->this_address;
size = trailer->this_size;
if (block == 0 || size == 0)
abort ();
trailer = (struct stk_trailer *) trailer->link;
if ((block <= address) && (address < (block + size)))
break;
}
/* Set the result to the offset in this segment and add the sizes
of all predecessor segments. */
result = address - block;
if (trailer == 0)
{
return result;
}
do
{
if (trailer->this_size <= 0)
abort ();
result += trailer->this_size;
trailer = (struct stk_trailer *) trailer->link;
}
while (trailer != 0);
/* We are done. Note that if you present a bogus address (one
not in any segment), you will get a different number back, formed
from subtracting the address of the first block. This is probably
not what you want. */
return (result);
}
# else /* not CRAY2 */
/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP.
Determine the number of the cell within the stack,
given the address of the cell. The purpose of this
routine is to linearize, in some sense, stack addresses
for alloca. */
static long
i00afunc (long address)
{
long stkl = 0;
long size, pseg, this_segment, stack;
long result = 0;
struct stack_segment_linkage *ssptr;
/* Register B67 contains the address of the end of the
current stack segment. If you (as a subprogram) store
your registers on the stack and find that you are past
the contents of B67, you have overflowed the segment.
B67 also points to the stack segment linkage control
area, which is what we are really interested in. */
stkl = CRAY_STACKSEG_END ();
ssptr = (struct stack_segment_linkage *) stkl;
/* If one subtracts 'size' from the end of the segment,
one has the address of the first word of the segment.
If this is not the first segment, 'pseg' will be
nonzero. */
pseg = ssptr->sspseg;
size = ssptr->sssize;
this_segment = stkl - size;
/* It is possible that calling this routine itself caused
a stack overflow. Discard stack segments which do not
contain the target address. */
while (!(this_segment <= address && address <= stkl))
{
# ifdef DEBUG_I00AFUNC
fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl);
# endif
if (pseg == 0)
break;
stkl = stkl - pseg;
ssptr = (struct stack_segment_linkage *) stkl;
size = ssptr->sssize;
pseg = ssptr->sspseg;
this_segment = stkl - size;
}
result = address - this_segment;
/* If you subtract pseg from the current end of the stack,
you get the address of the previous stack segment's end.
This seems a little convoluted to me, but I'll bet you save
a cycle somewhere. */
while (pseg != 0)
{
# ifdef DEBUG_I00AFUNC
fprintf (stderr, "%011o %011o\n", pseg, size);
# endif
stkl = stkl - pseg;
ssptr = (struct stack_segment_linkage *) stkl;
size = ssptr->sssize;
pseg = ssptr->sspseg;
result += size;
}
return (result);
}
# endif /* not CRAY2 */
# endif /* CRAY */
# endif /* no alloca */
#endif /* not GCC version 3 */

View file

@ -1,7 +1,7 @@
/* Memory allocation on the stack.
Copyright (C) 1995, 1999, 2001-2004, 2006-2008 Free Software
Foundation, Inc.
Copyright (C) 1995, 1999, 2001-2004, 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

View file

@ -1,6 +1,6 @@
/* A GNU-like <arpa/inet.h>.
Copyright (C) 2005-2006, 2008 Free Software Foundation, Inc.
Copyright (C) 2005-2006, 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
@ -18,16 +18,19 @@
#ifndef _GL_ARPA_INET_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
/* Gnulib's sys/socket.h is responsible for pulling in winsock2.h etc
under MinGW. */
#include <sys/socket.h>
under MinGW.
But avoid namespace pollution on glibc systems. */
#ifndef __GLIBC__
# include <sys/socket.h>
#endif
#if @HAVE_ARPA_INET_H@
# if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
# endif
/* The include_next requires a split double-inclusion guard. */
# @INCLUDE_NEXT@ @NEXT_ARPA_INET_H@
@ -36,7 +39,9 @@
#ifndef _GL_ARPA_INET_H
#define _GL_ARPA_INET_H
/* The definition of GL_LINK_WARNING is copied here. */
/* The definition of _GL_ARG_NONNULL is copied here. */
/* The definition of _GL_WARN_ON_USE is copied here. */
#ifdef __cplusplus
extern "C" {
@ -60,26 +65,28 @@ extern "C" {
For more details, see the POSIX:2001 specification
<http://www.opengroup.org/susv3xsh/inet_ntop.html>. */
extern const char *inet_ntop (int af, const void *restrict src,
char *restrict dst, socklen_t cnt);
char *restrict dst, socklen_t cnt)
_GL_ARG_NONNULL ((2, 3));
# endif
#elif defined GNULIB_POSIXCHECK
# undef inet_ntop
# define inet_ntop(af,src,dst,cnt) \
(GL_LINK_WARNING ("inet_ntop is unportable - " \
"use gnulib module inet_ntop for portability"), \
inet_ntop (af, src, dst, cnt))
# if HAVE_RAW_DECL_INET_NTOP
_GL_WARN_ON_USE (inet_ntop, "inet_ntop is unportable - "
"use gnulib module inet_ntop for portability");
# endif
#endif
#if @GNULIB_INET_PTON@
# if !@HAVE_DECL_INET_PTON@
extern int inet_pton (int af, const char *restrict src, void *restrict dst);
extern int inet_pton (int af, const char *restrict src, void *restrict dst)
_GL_ARG_NONNULL ((2, 3));
# endif
#elif defined GNULIB_POSIXCHECK
# undef inet_pton
# define inet_pton(af,src,dst) \
(GL_LINK_WARNING ("inet_pton is unportable - " \
"use gnulib module inet_pton for portability"), \
inet_pton (af, src, dst))
# if HAVE_RAW_DECL_INET_PTON
_GL_WARN_ON_USE (inet_pton, "inet_pton is unportable - "
"use gnulib module inet_pton for portability");
# endif
#endif
#ifdef __cplusplus

View file

@ -1,5 +1,5 @@
/* Formatted output to strings.
Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
Copyright (C) 1999, 2002, 2006, 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

View file

@ -1,5 +1,6 @@
/* Formatted output to strings.
Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
Copyright (C) 1999, 2002, 2006-2007, 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

View file

@ -1,5 +1,5 @@
/* base64.c -- Encode binary data using printable characters.
Copyright (C) 1999, 2000, 2001, 2004, 2005, 2006 Free Software
Copyright (C) 1999, 2000, 2001, 2004, 2005, 2006, 2009, 2010 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* base64.h -- Encode binary data using printable characters.
Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
Copyright (C) 2004, 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
Written by Simon Josefsson.
This program is free software; you can redistribute it and/or modify

75
gl/basename-lgpl.c Normal file
View file

@ -0,0 +1,75 @@
/* basename.c -- return the last element in a file name
Copyright (C) 1990, 1998-2001, 2003-2006, 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 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/>. */
#include <config.h>
#include "dirname.h"
#include <string.h>
/* Return the address of the last file name component of NAME. If
NAME has no relative file name components because it is a file
system root, return the empty string. */
char *
last_component (char const *name)
{
char const *base = name + FILE_SYSTEM_PREFIX_LEN (name);
char const *p;
bool saw_slash = false;
while (ISSLASH (*base))
base++;
for (p = base; *p; p++)
{
if (ISSLASH (*p))
saw_slash = true;
else if (saw_slash)
{
base = p;
saw_slash = false;
}
}
return (char *) base;
}
/* Return the length of the basename NAME. Typically NAME is the
value returned by base_name or last_component. Act like strlen
(NAME), except omit all trailing slashes. */
size_t
base_len (char const *name)
{
size_t len;
size_t prefix_len = FILE_SYSTEM_PREFIX_LEN (name);
for (len = strlen (name); 1 < len && ISSLASH (name[len - 1]); len--)
continue;
if (DOUBLE_SLASH_IS_DISTINCT_ROOT && len == 1
&& ISSLASH (name[0]) && ISSLASH (name[1]) && ! name[2])
return 2;
if (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE && prefix_len
&& len == prefix_len && ISSLASH (name[prefix_len]))
return prefix_len + 1;
return len;
}

View file

@ -1,7 +1,7 @@
/* basename.c -- return the last element in a file name
Copyright (C) 1990, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006 Free
Software Foundation, Inc.
Copyright (C) 1990, 1998-2001, 2003-2006, 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
@ -24,52 +24,6 @@
#include "xalloc.h"
#include "xstrndup.h"
/* Return the address of the last file name component of NAME. If
NAME has no relative file name components because it is a file
system root, return the empty string. */
char *
last_component (char const *name)
{
char const *base = name + FILE_SYSTEM_PREFIX_LEN (name);
char const *p;
bool saw_slash = false;
while (ISSLASH (*base))
base++;
for (p = base; *p; p++)
{
if (ISSLASH (*p))
saw_slash = true;
else if (saw_slash)
{
base = p;
saw_slash = false;
}
}
return (char *) base;
}
/* In general, we can't use the builtin `basename' function if available,
since it has different meanings in different environments.
In some environments the builtin `basename' modifies its argument.
Return the last file name component of NAME, allocated with
xmalloc. On systems with drive letters, a leading "./"
distinguishes relative names that would otherwise look like a drive
letter. Unlike POSIX basename(), NAME cannot be NULL,
base_name("") returns "", and the first trailing slash is not
stripped.
If lstat (NAME) would succeed, then { chdir (dir_name (NAME));
lstat (base_name (NAME)); } will access the same file. Likewise,
if the sequence { chdir (dir_name (NAME));
rename (base_name (NAME), "foo"); } succeeds, you have renamed NAME
to "foo" in the same directory NAME was in. */
char *
base_name (char const *name)
{
@ -102,27 +56,3 @@ base_name (char const *name)
/* Finally, copy the basename. */
return xstrndup (base, length);
}
/* Return the length of the basename NAME. Typically NAME is the
value returned by base_name or last_component. Act like strlen
(NAME), except omit all trailing slashes. */
size_t
base_len (char const *name)
{
size_t len;
size_t prefix_len = FILE_SYSTEM_PREFIX_LEN (name);
for (len = strlen (name); 1 < len && ISSLASH (name[len - 1]); len--)
continue;
if (DOUBLE_SLASH_IS_DISTINCT_ROOT && len == 1
&& ISSLASH (name[0]) && ISSLASH (name[1]) && ! name[2])
return 2;
if (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE && prefix_len
&& len == prefix_len && ISSLASH (name[prefix_len]))
return prefix_len + 1;
return len;
}

View file

@ -1,5 +1,5 @@
/* Convert unibyte character to wide character.
Copyright (C) 2008 Free Software Foundation, Inc.
Copyright (C) 2008, 2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
@ -21,6 +21,7 @@
#include <wchar.h>
#include <stdio.h>
#include <stdlib.h>
wint_t
btowc (int c)

View file

@ -1,6 +1,6 @@
/* Convert string to double, using the C locale.
Copyright (C) 2003, 2004, 2006, 2009 Free Software Foundation, Inc.
Copyright (C) 2003-2004, 2006, 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

View file

@ -1,6 +1,6 @@
/* Convert string to double, using the C locale.
Copyright (C) 2003-2004, 2009 Free Software Foundation, Inc.
Copyright (C) 2003-2004, 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

View file

@ -1,6 +1,6 @@
/* closexec.c - set or clear the close-on-exec descriptor flag
Copyright (C) 1991, 2004, 2005, 2006 Free Software Foundation, Inc.
Copyright (C) 1991, 2004-2006, 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
@ -21,21 +21,24 @@
#include "cloexec.h"
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#ifndef FD_CLOEXEC
# define FD_CLOEXEC 1
#endif
#include <unistd.h>
/* Set the `FD_CLOEXEC' flag of DESC if VALUE is true,
or clear the flag if VALUE is false.
Return 0 on success, or -1 on error with `errno' set. */
Return 0 on success, or -1 on error with `errno' set.
Note that on MingW, this function does NOT protect DESC from being
inherited into spawned children. Instead, either use dup_cloexec
followed by closing the original DESC, or use interfaces such as
open or pipe2 that accept flags like O_CLOEXEC to create DESC
non-inheritable in the first place. */
int
set_cloexec_flag (int desc, bool value)
{
#if defined F_GETFD && defined F_SETFD
#ifdef F_SETFD
int flags = fcntl (desc, F_GETFD, 0);
@ -50,9 +53,31 @@ set_cloexec_flag (int desc, bool value)
return -1;
#else
#else /* !F_SETFD */
/* Use dup2 to reject invalid file descriptors; the cloexec flag
will be unaffected. */
if (desc < 0)
{
errno = EBADF;
return -1;
}
if (dup2 (desc, desc) < 0)
/* errno is EBADF here. */
return -1;
/* There is nothing we can do on this kind of platform. Punt. */
return 0;
#endif
#endif /* !F_SETFD */
}
/* Duplicates a file handle FD, while marking the copy to be closed
prior to exec or spawn. Returns -1 and sets errno if FD could not
be duplicated. */
int
dup_cloexec (int fd)
{
return fcntl (fd, F_DUPFD_CLOEXEC, 0);
}

View file

@ -1,2 +1,38 @@
/* closexec.c - set or clear the close-on-exec descriptor flag
Copyright (C) 2004, 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 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/>.
*/
#include <stdbool.h>
/* Set the `FD_CLOEXEC' flag of DESC if VALUE is true,
or clear the flag if VALUE is false.
Return 0 on success, or -1 on error with `errno' set.
Note that on MingW, this function does NOT protect DESC from being
inherited into spawned children. Instead, either use dup_cloexec
followed by closing the original DESC, or use interfaces such as
open or pipe2 that accept flags like O_CLOEXEC to create DESC
non-inheritable in the first place. */
int set_cloexec_flag (int desc, bool value);
/* Duplicates a file handle FD, while marking the copy to be closed
prior to exec or spawn. Returns -1 and sets errno if FD could not
be duplicated. */
int dup_cloexec (int fd);

91
gl/close-hook.c Normal file
View file

@ -0,0 +1,91 @@
/* Hook for making the close() function extensible.
Copyright (C) 2009, 2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
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/>. */
#include <config.h>
/* Specification. */
#include "close-hook.h"
#include <stdlib.h>
#include <unistd.h>
#undef close
/* Currently, this entire code is only needed for the handling of sockets
on native Windows platforms. */
#if WINDOWS_SOCKETS
/* The first and last link in the doubly linked list.
Initially the list is empty. */
static struct close_hook anchor = { &anchor, &anchor, NULL };
int
execute_close_hooks (int fd, const struct close_hook *remaining_list)
{
if (remaining_list == &anchor)
/* End of list reached. */
return close (fd);
else
return remaining_list->private_fn (fd, remaining_list->private_next);
}
int
execute_all_close_hooks (int fd)
{
return execute_close_hooks (fd, anchor.private_next);
}
void
register_close_hook (close_hook_fn hook, struct close_hook *link)
{
if (link->private_next == NULL && link->private_prev == NULL)
{
/* Add the link to the doubly linked list. */
link->private_next = anchor.private_next;
link->private_prev = &anchor;
link->private_fn = hook;
anchor.private_next->private_prev = link;
anchor.private_next = link;
}
else
{
/* The link is already in use. */
if (link->private_fn != hook)
abort ();
}
}
void
unregister_close_hook (struct close_hook *link)
{
struct close_hook *next = link->private_next;
struct close_hook *prev = link->private_prev;
if (next != NULL && prev != NULL)
{
/* The link is in use. Remove it from the doubly linked list. */
prev->private_next = next;
next->private_prev = prev;
/* Clear the link, to mark it unused. */
link->private_next = NULL;
link->private_prev = NULL;
link->private_fn = NULL;
}
}
#endif

72
gl/close-hook.h Normal file
View file

@ -0,0 +1,72 @@
/* Hook for making the close() function extensible.
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/>. */
#ifndef CLOSE_HOOK_H
#define CLOSE_HOOK_H
#ifdef __cplusplus
extern "C" {
#endif
/* Currently, this entire code is only needed for the handling of sockets
on native Windows platforms. */
#if WINDOWS_SOCKETS
/* An element of the list of close hooks.
The fields of this structure are considered private. */
struct close_hook
{
/* Doubly linked list. */
struct close_hook *private_next;
struct close_hook *private_prev;
/* Function that treats the types of FD that it knows about and calls
execute_close_hooks (FD, REMAINING_LIST) as a fallback. */
int (*private_fn) (int fd, const struct close_hook *remaining_list);
};
/* This type of function closes FD, applying special knowledge for the FD
types it knows about, and calls execute_close_hooks (FD, REMAINING_LIST)
for the other FD types. */
typedef int (*close_hook_fn) (int fd, const struct close_hook *remaining_list);
/* Execute the close hooks in REMAINING_LIST.
Return 0 or -1, like close() would do. */
extern int execute_close_hooks (int fd, const struct close_hook *remaining_list);
/* Execute all close hooks.
Return 0 or -1, like close() would do. */
extern int execute_all_close_hooks (int fd);
/* Add a function to the list of close hooks.
The LINK variable points to a piece of memory which is guaranteed to be
accessible until the corresponding call to unregister_close_hook. */
extern void register_close_hook (close_hook_fn hook, struct close_hook *link);
/* Removes a function from the list of close hooks. */
extern void unregister_close_hook (struct close_hook *link);
#endif
#ifdef __cplusplus
}
#endif
#endif /* CLOSE_HOOK_H */

44
gl/config.charset Executable file → Normal file
View file

@ -1,7 +1,7 @@
#! /bin/sh
# Output a system dependent table of character encoding aliases.
#
# Copyright (C) 2000-2004, 2006-2009 Free Software Foundation, Inc.
# Copyright (C) 2000-2004, 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
@ -30,21 +30,21 @@
# The current list of GNU canonical charset names is as follows.
#
# name MIME? used by which systems
# ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin
# ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin
# ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin
# ISO-8859-3 Y glibc solaris
# ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin cygwin
# ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
# ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
# ISO-8859-3 Y glibc solaris cygwin
# ISO-8859-4 Y osf solaris freebsd netbsd openbsd darwin
# ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin
# ISO-8859-6 Y glibc aix hpux solaris
# ISO-8859-7 Y glibc aix hpux irix osf solaris netbsd openbsd darwin
# ISO-8859-8 Y glibc aix hpux osf solaris
# ISO-8859-9 Y glibc aix hpux irix osf solaris darwin
# ISO-8859-13 glibc netbsd openbsd darwin
# ISO-8859-14 glibc
# ISO-8859-15 glibc aix osf solaris freebsd netbsd openbsd darwin
# ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
# ISO-8859-6 Y glibc aix hpux solaris cygwin
# ISO-8859-7 Y glibc aix hpux irix osf solaris netbsd openbsd darwin cygwin
# ISO-8859-8 Y glibc aix hpux osf solaris cygwin
# ISO-8859-9 Y glibc aix hpux irix osf solaris darwin cygwin
# ISO-8859-13 glibc netbsd openbsd darwin cygwin
# ISO-8859-14 glibc cygwin
# ISO-8859-15 glibc aix osf solaris freebsd netbsd openbsd darwin cygwin
# KOI8-R Y glibc solaris freebsd netbsd openbsd darwin
# KOI8-U Y glibc freebsd netbsd openbsd darwin
# KOI8-U Y glibc freebsd netbsd openbsd darwin cygwin
# KOI8-T glibc
# CP437 dos
# CP775 dos
@ -61,7 +61,7 @@
# CP869 dos
# CP874 woe32 dos
# CP922 aix
# CP932 aix woe32 dos
# CP932 aix cygwin woe32 dos
# CP943 aix
# CP949 osf darwin woe32 dos
# CP950 woe32 dos
@ -71,7 +71,7 @@
# CP1129 aix
# CP1131 darwin
# CP1250 woe32
# CP1251 glibc solaris netbsd openbsd darwin woe32
# CP1251 glibc solaris netbsd openbsd darwin cygwin woe32
# CP1252 aix woe32
# CP1253 woe32
# CP1254 woe32
@ -80,19 +80,19 @@
# CP1257 woe32
# GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin
# EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin
# EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin
# EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin
# EUC-TW glibc aix hpux irix osf solaris netbsd
# BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin
# BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin
# BIG5-HKSCS glibc solaris darwin
# GBK glibc aix osf solaris darwin woe32 dos
# GBK glibc aix osf solaris darwin cygwin woe32 dos
# GB18030 glibc solaris netbsd darwin
# SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin
# JOHAB glibc solaris woe32
# TIS-620 glibc aix hpux osf solaris
# TIS-620 glibc aix hpux osf solaris cygwin
# VISCII Y glibc
# TCVN5712-1 glibc
# ARMSCII-8 glibc darwin
# GEORGIAN-PS glibc
# GEORGIAN-PS glibc cygwin
# PT154 glibc
# HP-ROMAN8 hpux
# HP-ARABIC8 hpux
@ -102,7 +102,7 @@
# HP-KANA8 hpux
# DEC-KANJI osf
# DEC-HANYU osf
# UTF-8 Y glibc aix hpux osf solaris netbsd darwin
# UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin
#
# Note: Names which are not marked as being a MIME name should not be used in
# Internet protocols for information interchange (mail, news, etc.).

View file

@ -1,6 +1,6 @@
/* Invoke creat, but avoid some glitches.
Copyright (C) 2005, 2006 Free Software Foundation, Inc.
Copyright (C) 2005-2006, 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

86
gl/dirname-lgpl.c Normal file
View file

@ -0,0 +1,86 @@
/* dirname.c -- return all but the last element in a file name
Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 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 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/>. */
#include <config.h>
#include "dirname.h"
#include <stdlib.h>
#include <string.h>
/* Return the length of the prefix of FILE that will be used by
dir_name. If FILE is in the working directory, this returns zero
even though `dir_name (FILE)' will return ".". Works properly even
if there are trailing slashes (by effectively ignoring them). */
size_t
dir_len (char const *file)
{
size_t prefix_length = FILE_SYSTEM_PREFIX_LEN (file);
size_t length;
/* Advance prefix_length beyond important leading slashes. */
prefix_length += (prefix_length != 0
? (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
&& ISSLASH (file[prefix_length]))
: (ISSLASH (file[0])
? ((DOUBLE_SLASH_IS_DISTINCT_ROOT
&& ISSLASH (file[1]) && ! ISSLASH (file[2])
? 2 : 1))
: 0));
/* Strip the basename and any redundant slashes before it. */
for (length = last_component (file) - file;
prefix_length < length; length--)
if (! ISSLASH (file[length - 1]))
break;
return length;
}
/* In general, we can't use the builtin `dirname' function if available,
since it has different meanings in different environments.
In some environments the builtin `dirname' modifies its argument.
Return the leading directories part of FILE, allocated with malloc.
Works properly even if there are trailing slashes (by effectively
ignoring them). Return NULL on failure.
If lstat (FILE) would succeed, then { chdir (dir_name (FILE));
lstat (base_name (FILE)); } will access the same file. Likewise,
if the sequence { chdir (dir_name (FILE));
rename (base_name (FILE), "foo"); } succeeds, you have renamed FILE
to "foo" in the same directory FILE was in. */
char *
mdir_name (char const *file)
{
size_t length = dir_len (file);
bool append_dot = (length == 0
|| (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
&& length == FILE_SYSTEM_PREFIX_LEN (file)
&& file[2] != '\0' && ! ISSLASH (file[2])));
char *dir = malloc (length + append_dot + 1);
if (!dir)
return NULL;
memcpy (dir, file, length);
if (append_dot)
dir[length++] = '.';
dir[length] = '\0';
return dir;
}

View file

@ -1,6 +1,6 @@
/* dirname.c -- return all but the last element in a file name
Copyright (C) 1990, 1998, 2000, 2001, 2003, 2004, 2005, 2006 Free Software
Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2010 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
@ -20,65 +20,19 @@
#include "dirname.h"
#include <stdlib.h>
#include <string.h>
#include "xalloc.h"
/* Return the length of the prefix of FILE that will be used by
dir_name. If FILE is in the working directory, this returns zero
even though `dir_name (FILE)' will return ".". Works properly even
if there are trailing slashes (by effectively ignoring them). */
size_t
dir_len (char const *file)
{
size_t prefix_length = FILE_SYSTEM_PREFIX_LEN (file);
size_t length;
/* Advance prefix_length beyond important leading slashes. */
prefix_length += (prefix_length != 0
? (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
&& ISSLASH (file[prefix_length]))
: (ISSLASH (file[0])
? ((DOUBLE_SLASH_IS_DISTINCT_ROOT
&& ISSLASH (file[1]) && ! ISSLASH (file[2])
? 2 : 1))
: 0));
/* Strip the basename and any redundant slashes before it. */
for (length = last_component (file) - file;
prefix_length < length; length--)
if (! ISSLASH (file[length - 1]))
break;
return length;
}
/* In general, we can't use the builtin `dirname' function if available,
since it has different meanings in different environments.
In some environments the builtin `dirname' modifies its argument.
Return the leading directories part of FILE, allocated with xmalloc.
Works properly even if there are trailing slashes (by effectively
ignoring them). Unlike POSIX dirname(), FILE cannot be NULL.
If lstat (FILE) would succeed, then { chdir (dir_name (FILE));
lstat (base_name (FILE)); } will access the same file. Likewise,
if the sequence { chdir (dir_name (FILE));
rename (base_name (FILE), "foo"); } succeeds, you have renamed FILE
to "foo" in the same directory FILE was in. */
/* Just like mdir_name (dirname-lgpl.c), except, rather than
returning NULL upon malloc failure, here, we report the
"memory exhausted" condition and exit. */
char *
dir_name (char const *file)
{
size_t length = dir_len (file);
bool append_dot = (length == 0
|| (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
&& length == FILE_SYSTEM_PREFIX_LEN (file)
&& file[2] != '\0' && ! ISSLASH (file[2])));
char *dir = xmalloc (length + append_dot + 1);
memcpy (dir, file, length);
if (append_dot)
dir[length++] = '.';
dir[length] = '\0';
return dir;
char *result = mdir_name (file);
if (!result)
xalloc_die ();
return result;
}

View file

@ -1,6 +1,7 @@
/* Take file names apart into directory and base names.
Copyright (C) 1998, 2001, 2003-2006 Free Software Foundation, Inc.
Copyright (C) 1998, 2001, 2003-2006, 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
@ -58,8 +59,12 @@
# endif
# define IS_RELATIVE_FILE_NAME(F) (! IS_ABSOLUTE_FILE_NAME (F))
# if GNULIB_DIRNAME
char *base_name (char const *file);
char *dir_name (char const *file);
# endif
char *mdir_name (char const *file);
size_t base_len (char const *file);
size_t dir_len (char const *file);
char *last_component (char const *file);

View file

@ -1,7 +1,6 @@
/* Invoke dup, but avoid some glitches.
Copyright (C) 2001, 2004, 2005, 2006, 2009 Free Software
Foundation, Inc.
Copyright (C) 2001, 2004-2006, 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
@ -23,7 +22,6 @@
#include "unistd-safer.h"
#include <fcntl.h>
#include <unistd.h>
/* Like dup, but do not return STDIN_FILENO, STDOUT_FILENO, or
@ -32,11 +30,5 @@
int
dup_safer (int fd)
{
#if defined F_DUPFD && !defined FCHDIR_REPLACEMENT
return fcntl (fd, F_DUPFD, STDERR_FILENO + 1);
#else
/* fd_safer calls us back, but eventually the recursion unwinds and
does the right thing. */
return fd_safer (dup (fd));
#endif
}

128
gl/dup2.c Normal file
View file

@ -0,0 +1,128 @@
/* Duplicate an open file descriptor to a specified file descriptor.
Copyright (C) 1999, 2004-2007, 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 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/>. */
/* written by Paul Eggert */
#include <config.h>
/* Specification. */
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
/* Get declarations of the Win32 API functions. */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
#endif
#if HAVE_DUP2
# undef dup2
int
rpl_dup2 (int fd, int desired_fd)
{
int result;
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
/* If fd is closed, mingw hangs on dup2 (fd, fd). If fd is open,
dup2 (fd, fd) returns 0, but all further attempts to use fd in
future dup2 calls will hang. */
if (fd == desired_fd)
{
if ((HANDLE) _get_osfhandle (fd) == INVALID_HANDLE_VALUE)
{
errno = EBADF;
return -1;
}
return fd;
}
/* Wine 1.0.1 return 0 when desired_fd is negative but not -1:
http://bugs.winehq.org/show_bug.cgi?id=21289 */
if (desired_fd < 0)
{
errno = EBADF;
return -1;
}
# endif
result = dup2 (fd, desired_fd);
# ifdef __linux__
/* Correct a Linux return value.
<http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.30.y.git;a=commitdiff;h=2b79bc4f7ebbd5af3c8b867968f9f15602d5f802>
*/
if (fd == desired_fd && result == (unsigned int) -EBADF)
{
errno = EBADF;
result = -1;
}
# endif
if (result == 0)
result = desired_fd;
/* Correct a cygwin 1.5.x errno value. */
else if (result == -1 && errno == EMFILE)
errno = EBADF;
# if REPLACE_FCHDIR
if (fd != desired_fd && result != -1)
result = _gl_register_dup (fd, result);
# endif
return result;
}
#else /* !HAVE_DUP2 */
/* On older platforms, dup2 did not exist. */
# ifndef F_DUPFD
static int
dupfd (int fd, int desired_fd)
{
int duplicated_fd = dup (fd);
if (duplicated_fd < 0 || duplicated_fd == desired_fd)
return duplicated_fd;
else
{
int r = dupfd (fd, desired_fd);
int e = errno;
close (duplicated_fd);
errno = e;
return r;
}
}
# endif
int
dup2 (int fd, int desired_fd)
{
int result = fcntl (fd, F_GETFL) < 0 ? -1 : fd;
if (result == -1 || fd == desired_fd)
return result;
close (desired_fd);
# ifdef F_DUPFD
result = fcntl (fd, F_DUPFD, desired_fd);
# if REPLACE_FCHDIR
if (0 <= result)
result = _gl_register_dup (fd, result);
# endif
# else
result = dupfd (fd, desired_fd);
# endif
if (result == -1 && (errno == EMFILE || errno == EINVAL))
errno = EBADF;
return result;
}
#endif /* !HAVE_DUP2 */

View file

@ -1,6 +1,6 @@
/* A POSIX-like <errno.h>.
Copyright (C) 2008 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
@ -145,6 +145,11 @@
# define GNULIB_defined_ENOTSUP 1
# endif
# ifndef ESTALE
# define ESTALE 2009
# define GNULIB_defined_ESTALE 1
# endif
# ifndef ECANCELED
# define ECANCELED 2008
# define GNULIB_defined_ECANCELED 1

View file

@ -1,5 +1,5 @@
/* Error handler for noninteractive utilities
Copyright (C) 1990-1998, 2000-2007 Free Software Foundation, Inc.
Copyright (C) 1990-1998, 2000-2007, 2009-2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
@ -85,6 +85,18 @@ extern void __error_at_line (int status, int errnum, const char *file_name,
#else /* not _LIBC */
# include <fcntl.h>
# include <unistd.h>
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
/* Get declarations of the Win32 API functions. */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# endif
/* The gnulib override of fcntl is not needed in this file. */
# undef fcntl
# if !HAVE_DECL_STRERROR_R && STRERROR_R_CHAR_P
# ifndef HAVE_DECL_STRERROR_R
"this configure-time declaration test was not run"
@ -101,6 +113,50 @@ extern char *program_name;
# endif /* HAVE_STRERROR_R || defined strerror_r */
#endif /* not _LIBC */
#if !_LIBC
/* Return non-zero if FD is open. */
static inline int
is_open (int fd)
{
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
/* On Win32: The initial state of unassigned standard file descriptors is
that they are open but point to an INVALID_HANDLE_VALUE. There is no
fcntl, and the gnulib replacement fcntl does not support F_GETFL. */
return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE;
# else
# ifndef F_GETFL
# error Please port fcntl to your platform
# endif
return 0 <= fcntl (fd, F_GETFL);
# endif
}
#endif
static inline void
flush_stdout (void)
{
#if !_LIBC
int stdout_fd;
# if GNULIB_FREOPEN_SAFER
/* Use of gnulib's freopen-safer module normally ensures that
fileno (stdout) == 1
whenever stdout is open. */
stdout_fd = STDOUT_FILENO;
# else
/* POSIX states that fileno (stdout) after fclose is unspecified. But in
practice it is not a problem, because stdout is statically allocated and
the fd of a FILE stream is stored as a field in its allocated memory. */
stdout_fd = fileno (stdout);
# endif
/* POSIX states that fflush (stdout) after fclose is unspecified; it
is safe in glibc, but not on all other platforms. fflush (NULL)
is always defined, but too draconian. */
if (0 <= stdout_fd && is_open (stdout_fd))
#endif
fflush (stdout);
}
static void
print_errno_message (int errnum)
{
@ -236,7 +292,7 @@ error (int status, int errnum, const char *message, ...)
0);
#endif
fflush (stdout);
flush_stdout ();
#ifdef _LIBC
_IO_flockfile (stderr);
#endif
@ -295,7 +351,7 @@ error_at_line (int status, int errnum, const char *file_name,
0);
#endif
fflush (stdout);
flush_stdout ();
#ifdef _LIBC
_IO_flockfile (stderr);
#endif

View file

@ -1,5 +1,6 @@
/* Declaration for error-reporting function
Copyright (C) 1995, 1996, 1997, 2003, 2006, 2008 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997, 2003, 2006, 2008, 2009, 2010 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
@ -19,15 +20,14 @@
#define _ERROR_H 1
#ifndef __attribute__
/* This feature is available in gcc versions 2.5 and later. */
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
# define __attribute__(Spec) /* empty */
# endif
/* The __-protected variants of `format' and `printf' attributes
are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
/* The __attribute__ feature is available in gcc versions 2.5 and later.
The __-protected variants of the attributes 'format' and 'printf' are
accepted by gcc versions 2.6.4 (effectively 2.7) and later.
We enable __attribute__ only if these are supported too, because
gnulib and libintl do '#define printf __printf__' when they override
the 'printf' function. */
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
# define __format__ format
# define __printf__ printf
# define __attribute__(Spec) /* empty */
# endif
#endif

View file

@ -1,6 +1,7 @@
/* Failure exit status
Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
Copyright (C) 2002, 2003, 2005, 2006, 2007, 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

View file

@ -1,6 +1,6 @@
/* Failure exit status
Copyright (C) 2002 Free Software Foundation, Inc.
Copyright (C) 2002, 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

View file

@ -1,6 +1,6 @@
/* Like fcntl.h, but redefine some names to avoid glitches.
Copyright (C) 2005 Free Software Foundation, Inc.
Copyright (C) 2005, 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
@ -25,3 +25,8 @@
#undef creat
#define creat creat_safer
#if GNULIB_OPENAT_SAFER
# undef openat
# define openat openat_safer
#endif

View file

@ -1,6 +1,6 @@
/* Invoke fcntl-like functions, but avoid some glitches.
Copyright (C) 2005 Free Software Foundation, Inc.
Copyright (C) 2005, 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
@ -21,3 +21,7 @@
int open_safer (char const *, int, ...);
int creat_safer (char const *, mode_t);
#if GNULIB_OPENAT_SAFER
int openat_safer (int, char const *, int, ...);
#endif

294
gl/fcntl.c Normal file
View file

@ -0,0 +1,294 @@
/* Provide file descriptor control.
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 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/>. */
/* Written by Eric Blake <ebb9@byu.net>. */
#include <config.h>
/* Specification. */
#include <fcntl.h>
#include <errno.h>
#include <limits.h>
#include <stdarg.h>
#include <unistd.h>
#if !HAVE_FCNTL
# define rpl_fcntl fcntl
#endif
#undef fcntl
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
/* Get declarations of the Win32 API functions. */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
/* Upper bound on getdtablesize(). See lib/getdtablesize.c. */
# define OPEN_MAX_MAX 0x10000
/* Duplicate OLDFD into the first available slot of at least NEWFD,
which must be positive, with FLAGS determining whether the duplicate
will be inheritable. */
static int
dupfd (int oldfd, int newfd, int flags)
{
/* Mingw has no way to create an arbitrary fd. Iterate until all
file descriptors less than newfd are filled up. */
HANDLE curr_process = GetCurrentProcess ();
HANDLE old_handle = (HANDLE) _get_osfhandle (oldfd);
unsigned char fds_to_close[OPEN_MAX_MAX / CHAR_BIT];
unsigned int fds_to_close_bound = 0;
int result;
BOOL inherit = flags & O_CLOEXEC ? FALSE : TRUE;
int mode;
if (newfd < 0 || getdtablesize () <= newfd)
{
errno = EINVAL;
return -1;
}
if (old_handle == INVALID_HANDLE_VALUE
|| (mode = setmode (oldfd, O_BINARY)) == -1)
{
/* oldfd is not open, or is an unassigned standard file
descriptor. */
errno = EBADF;
return -1;
}
setmode (oldfd, mode);
flags |= mode;
for (;;)
{
HANDLE new_handle;
int duplicated_fd;
unsigned int index;
if (!DuplicateHandle (curr_process, /* SourceProcessHandle */
old_handle, /* SourceHandle */
curr_process, /* TargetProcessHandle */
(PHANDLE) &new_handle, /* TargetHandle */
(DWORD) 0, /* DesiredAccess */
inherit, /* InheritHandle */
DUPLICATE_SAME_ACCESS)) /* Options */
{
/* TODO: Translate GetLastError () into errno. */
errno = EMFILE;
result = -1;
break;
}
duplicated_fd = _open_osfhandle ((long) new_handle, flags);
if (duplicated_fd < 0)
{
CloseHandle (new_handle);
errno = EMFILE;
result = -1;
break;
}
if (newfd <= duplicated_fd)
{
result = duplicated_fd;
break;
}
/* Set the bit duplicated_fd in fds_to_close[]. */
index = (unsigned int) duplicated_fd / CHAR_BIT;
if (fds_to_close_bound <= index)
{
if (sizeof fds_to_close <= index)
/* Need to increase OPEN_MAX_MAX. */
abort ();
memset (fds_to_close + fds_to_close_bound, '\0',
index + 1 - fds_to_close_bound);
fds_to_close_bound = index + 1;
}
fds_to_close[index] |= 1 << ((unsigned int) duplicated_fd % CHAR_BIT);
}
/* Close the previous fds that turned out to be too small. */
{
int saved_errno = errno;
unsigned int duplicated_fd;
for (duplicated_fd = 0;
duplicated_fd < fds_to_close_bound * CHAR_BIT;
duplicated_fd++)
if ((fds_to_close[duplicated_fd / CHAR_BIT]
>> (duplicated_fd % CHAR_BIT))
& 1)
close (duplicated_fd);
errno = saved_errno;
}
# if REPLACE_FCHDIR
if (0 <= result)
result = _gl_register_dup (oldfd, result);
# endif
return result;
}
#endif /* W32 */
/* Perform the specified ACTION on the file descriptor FD, possibly
using the argument ARG further described below. This replacement
handles the following actions, and forwards all others on to the
native fcntl. An unrecognized ACTION returns -1 with errno set to
EINVAL.
F_DUPFD - duplicate FD, with int ARG being the minimum target fd.
If successful, return the duplicate, which will be inheritable;
otherwise return -1 and set errno.
F_DUPFD_CLOEXEC - duplicate FD, with int ARG being the minimum
target fd. If successful, return the duplicate, which will not be
inheritable; otherwise return -1 and set errno.
F_GETFD - ARG need not be present. If successful, return a
non-negative value containing the descriptor flags of FD (only
FD_CLOEXEC is portable, but other flags may be present); otherwise
return -1 and set errno. */
int
rpl_fcntl (int fd, int action, /* arg */...)
{
va_list arg;
int result = -1;
va_start (arg, action);
switch (action)
{
#if !HAVE_FCNTL
case F_DUPFD:
{
int target = va_arg (arg, int);
result = dupfd (fd, target, 0);
break;
}
#elif FCNTL_DUPFD_BUGGY || REPLACE_FCHDIR
case F_DUPFD:
{
int target = va_arg (arg, int);
/* Detect invalid target; needed for cygwin 1.5.x. */
if (target < 0 || getdtablesize () <= target)
errno = EINVAL;
else
{
result = fcntl (fd, action, target);
# if REPLACE_FCHDIR
if (0 <= result)
result = _gl_register_dup (fd, result);
# endif
}
break;
} /* F_DUPFD */
#endif /* FCNTL_DUPFD_BUGGY || REPLACE_FCHDIR */
case F_DUPFD_CLOEXEC:
{
int target = va_arg (arg, int);
#if !HAVE_FCNTL
result = dupfd (fd, target, O_CLOEXEC);
break;
#else /* HAVE_FCNTL */
/* Try the system call first, if the headers claim it exists
(that is, if GNULIB_defined_F_DUPFD_CLOEXEC is 0), since we
may be running with a glibc that has the macro but with an
older kernel that does not support it. Cache the
information on whether the system call really works, but
avoid caching failure if the corresponding F_DUPFD fails
for any reason. 0 = unknown, 1 = yes, -1 = no. */
static int have_dupfd_cloexec = GNULIB_defined_F_DUPFD_CLOEXEC ? -1 : 0;
if (0 <= have_dupfd_cloexec)
{
result = fcntl (fd, action, target);
if (0 <= result || errno != EINVAL)
{
have_dupfd_cloexec = 1;
# if REPLACE_FCHDIR
if (0 <= result)
result = _gl_register_dup (fd, result);
# endif
}
else
{
result = rpl_fcntl (fd, F_DUPFD, target);
if (result < 0)
break;
have_dupfd_cloexec = -1;
}
}
else
result = rpl_fcntl (fd, F_DUPFD, target);
if (0 <= result && have_dupfd_cloexec == -1)
{
int flags = fcntl (result, F_GETFD);
if (flags < 0 || fcntl (result, F_SETFD, flags | FD_CLOEXEC) == -1)
{
int saved_errno = errno;
close (result);
errno = saved_errno;
result = -1;
}
}
break;
#endif /* HAVE_FCNTL */
} /* F_DUPFD_CLOEXEC */
#if !HAVE_FCNTL
case F_GETFD:
{
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
HANDLE handle = (HANDLE) _get_osfhandle (fd);
DWORD flags;
if (handle == INVALID_HANDLE_VALUE
|| GetHandleInformation (handle, &flags) == 0)
errno = EBADF;
else
result = (flags & HANDLE_FLAG_INHERIT) ? 0 : FD_CLOEXEC;
# else /* !W32 */
/* Use dup2 to reject invalid file descriptors. No way to
access this information, so punt. */
if (0 <= dup2 (fd, fd))
result = 0;
# endif /* !W32 */
break;
} /* F_GETFD */
#endif /* !HAVE_FCNTL */
/* Implementing F_SETFD on mingw is not trivial - there is no
API for changing the O_NOINHERIT bit on an fd, and merely
changing the HANDLE_FLAG_INHERIT bit on the underlying handle
can lead to odd state. It may be possible by duplicating the
handle, using _open_osfhandle with the right flags, then
using dup2 to move the duplicate onto the original, but that
is not supported for now. */
default:
{
#if HAVE_FCNTL
void *p = va_arg (arg, void *);
result = fcntl (fd, action, p);
#else
errno = EINVAL;
#endif
break;
}
}
va_end (arg);
return result;
}

View file

@ -1,6 +1,6 @@
/* Like <fcntl.h>, but with non-working flags defined to 0.
Copyright (C) 2006-2008 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
@ -25,8 +25,9 @@
/* Special invocation convention. */
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems. */
# include <sys/stat.h>
#endif
#@INCLUDE_NEXT@ @NEXT_FCNTL_H@
#else
@ -35,38 +36,126 @@
#ifndef _GL_FCNTL_H
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems. */
# include <sys/stat.h>
#endif
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_FCNTL_H@
#ifndef _GL_FCNTL_H
#define _GL_FCNTL_H
#ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems. */
# include <unistd.h>
#endif
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
/* The definition of _GL_ARG_NONNULL is copied here. */
/* The definition of _GL_WARN_ON_USE is copied here. */
/* Declare overridden functions. */
#ifdef __cplusplus
extern "C" {
#if @GNULIB_FCNTL@
# if @REPLACE_FCNTL@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef fcntl
# define fcntl rpl_fcntl
# endif
_GL_FUNCDECL_RPL (fcntl, int, (int fd, int action, ...));
_GL_CXXALIAS_RPL (fcntl, int, (int fd, int action, ...));
# else
# if !@HAVE_FCNTL@
_GL_FUNCDECL_SYS (fcntl, int, (int fd, int action, ...));
# endif
_GL_CXXALIAS_SYS (fcntl, int, (int fd, int action, ...));
# endif
_GL_CXXALIASWARN (fcntl);
#elif defined GNULIB_POSIXCHECK
# undef fcntl
# if HAVE_RAW_DECL_FCNTL
_GL_WARN_ON_USE (fcntl, "fcntl is not always POSIX compliant - "
"use gnulib module fcntl for portability");
# endif
#endif
#if @GNULIB_OPEN@
# if @REPLACE_OPEN@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef open
# define open rpl_open
extern int open (const char *filename, int flags, ...);
# endif
_GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
# else
_GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
# endif
_GL_CXXALIASWARN (open);
#elif defined GNULIB_POSIXCHECK
# undef open
/* Assume open is always declared. */
_GL_WARN_ON_USE (open, "open is not always POSIX compliant - "
"use gnulib module open for portability");
#endif
#if @GNULIB_OPENAT@
# if @REPLACE_OPENAT@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef openat
# define openat rpl_openat
# endif
_GL_FUNCDECL_RPL (openat, int,
(int fd, char const *file, int flags, /* mode_t mode */ ...)
_GL_ARG_NONNULL ((2)));
_GL_CXXALIAS_RPL (openat, int,
(int fd, char const *file, int flags, /* mode_t mode */ ...));
# else
# if !@HAVE_OPENAT@
_GL_FUNCDECL_SYS (openat, int,
(int fd, char const *file, int flags, /* mode_t mode */ ...)
_GL_ARG_NONNULL ((2)));
# endif
_GL_CXXALIAS_SYS (openat, int,
(int fd, char const *file, int flags, /* mode_t mode */ ...));
# endif
_GL_CXXALIASWARN (openat);
#elif defined GNULIB_POSIXCHECK
# undef openat
# if HAVE_RAW_DECL_OPENAT
_GL_WARN_ON_USE (openat, "openat is not portable - "
"use gnulib module openat for portability");
# endif
#endif
#ifdef FCHDIR_REPLACEMENT
/* gnulib internal function. */
extern void _gl_register_fd (int fd, const char *filename);
/* Fix up the FD_* macros, only known to be missing on mingw. */
#ifndef FD_CLOEXEC
# define FD_CLOEXEC 1
#endif
#ifdef __cplusplus
}
/* Fix up the supported F_* macros. Intentionally leave other F_*
macros undefined. Only known to be missing on mingw. */
#ifndef F_DUPFD_CLOEXEC
# define F_DUPFD_CLOEXEC 0x40000000
/* Witness variable: 1 if gnulib defined F_DUPFD_CLOEXEC, 0 otherwise. */
# define GNULIB_defined_F_DUPFD_CLOEXEC 1
#else
# define GNULIB_defined_F_DUPFD_CLOEXEC 0
#endif
#ifndef F_DUPFD
# define F_DUPFD 1
#endif
#ifndef F_GETFD
# define F_GETFD 2
#endif
/* Fix up the O_* macros. */
@ -75,6 +164,12 @@ extern void _gl_register_fd (int fd, const char *filename);
# define O_DIRECT O_DIRECTIO
#endif
#if !defined O_CLOEXEC && defined O_NOINHERIT
/* Mingw spells it `O_NOINHERIT'. Intentionally leave it
undefined if not available. */
# define O_CLOEXEC O_NOINHERIT
#endif
#ifndef O_DIRECT
# define O_DIRECT 0
#endif
@ -119,6 +214,10 @@ extern void _gl_register_fd (int fd, const char *filename);
# define O_SYNC 0
#endif
#ifndef O_TTY_INIT
# define O_TTY_INIT 0
#endif
/* For systems that distinguish between text and binary I/O.
O_BINARY is usually declared in fcntl.h */
#if !defined O_BINARY && defined _O_BINARY
@ -138,6 +237,42 @@ extern void _gl_register_fd (int fd, const char *filename);
# define O_TEXT 0
#endif
/* Fix up the AT_* macros. */
/* Work around a bug in Solaris 9 and 10: AT_FDCWD is positive. Its
value exceeds INT_MAX, so its use as an int doesn't conform to the
C standard, and GCC and Sun C complain in some cases. If the bug
is present, undef AT_FDCWD here, so it can be redefined below. */
#if 0 < AT_FDCWD && AT_FDCWD == 0xffd19553
# undef AT_FDCWD
#endif
/* Use the same bit pattern as Solaris 9, but with the proper
signedness. The bit pattern is important, in case this actually is
Solaris with the above workaround. */
#ifndef AT_FDCWD
# define AT_FDCWD (-3041965)
#endif
/* Use the same values as Solaris 9. This shouldn't matter, but
there's no real reason to differ. */
#ifndef AT_SYMLINK_NOFOLLOW
# define AT_SYMLINK_NOFOLLOW 4096
#endif
#ifndef AT_REMOVEDIR
# define AT_REMOVEDIR 1
#endif
/* Solaris 9 lacks these two, so just pick unique values. */
#ifndef AT_SYMLINK_FOLLOW
# define AT_SYMLINK_FOLLOW 2
#endif
#ifndef AT_EACCESS
# define AT_EACCESS 4
#endif
#endif /* _GL_FCNTL_H */
#endif /* _GL_FCNTL_H */

View file

@ -1,6 +1,6 @@
/* Return a safer copy of a file descriptor.
Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
Copyright (C) 2005-2006, 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
@ -22,7 +22,6 @@
#include "unistd-safer.h"
#include <errno.h>
#include <unistd.h>
/* Return FD, unless FD would be a copy of standard input, output, or

View file

@ -1,5 +1,5 @@
/* Supplemental information about the floating-point formats.
Copyright (C) 2007 Free Software Foundation, Inc.
Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software; you can redistribute it and/or modify

View file

@ -1,6 +1,6 @@
/* A correct <float.h>.
Copyright (C) 2007-2008 Free Software Foundation, Inc.
Copyright (C) 2007-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

View file

@ -1,5 +1,5 @@
/* Round towards negative infinity.
Copyright (C) 2007 Free Software Foundation, Inc.
Copyright (C) 2007, 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

View file

@ -1,5 +1,5 @@
/* Round towards negative infinity.
Copyright (C) 2007 Free Software Foundation, Inc.
Copyright (C) 2007, 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

View file

@ -1,7 +1,7 @@
/* fsusage.c -- return space usage of mounted file systems
Copyright (C) 1991-1992, 1996, 1998-1999, 2002-2006, 2009
Free Software Foundation, Inc.
Copyright (C) 1991-1992, 1996, 1998-1999, 2002-2006, 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

View file

@ -1,6 +1,6 @@
/* fsusage.h -- declarations for file system space usage info
Copyright (C) 1991, 1992, 1997, 2003, 2004, 2005, 2006 Free Software
Copyright (C) 1991-1992, 1997, 2003-2006, 2009-2010 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* An interface to read that retries after partial reads and interrupts.
Copyright (C) 2002, 2003 Free Software Foundation, Inc.
Copyright (C) 2002-2003, 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

View file

@ -1,6 +1,6 @@
/* An interface to read() that reads all it is asked to read.
Copyright (C) 2002 Free Software Foundation, Inc.
Copyright (C) 2002, 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

View file

@ -1,7 +1,6 @@
/* An interface to read and write that retries (if necessary) until complete.
Copyright (C) 1993, 1994, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
2004, 2005, 2006 Free Software Foundation, Inc.
Copyright (C) 1993-1994, 1997-2006, 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

View file

@ -1,6 +1,6 @@
/* An interface to write() that writes all it is asked to write.
Copyright (C) 2002-2003 Free Software Foundation, Inc.
Copyright (C) 2002-2003, 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

View file

@ -1,4 +1,5 @@
/* Copyright (C) 1997, 2001, 2002, 2004, 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
/* Copyright (C) 1997, 2001, 2002, 2004, 2005, 2006, 2008, 2009, 2010 Free
Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell <pjb27@cam.ac.uk>, 1997.

View file

@ -1,6 +1,5 @@
/* Get address information (partial implementation).
Copyright (C) 1997, 2001, 2002, 2004, 2005, 2006, 2007, 2008 Free Software
Foundation, Inc.
Copyright (C) 1997, 2001-2002, 2004-2010 Free Software Foundation, Inc.
Contributed by Simon Josefsson <simon@josefsson.org>.
This program is free software; you can redistribute it and/or modify
@ -19,6 +18,10 @@
#include <config.h>
/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
optimizes away the sa == NULL test below. */
#define _GL_ARG_NONNULL(params)
#include <netdb.h>
#if HAVE_NETINET_IN_H
@ -348,7 +351,8 @@ freeaddrinfo (struct addrinfo *ai)
}
}
int getnameinfo(const struct sockaddr *restrict sa, socklen_t salen,
int
getnameinfo (const struct sockaddr *restrict sa, socklen_t salen,
char *restrict node, socklen_t nodelen,
char *restrict service, socklen_t servicelen,
int flags)

63
gl/getdtablesize.c Normal file
View file

@ -0,0 +1,63 @@
/* getdtablesize() function for platforms that don't have it.
Copyright (C) 2008-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
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 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/>. */
#include <config.h>
/* Specification. */
#include <unistd.h>
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
#include <stdio.h>
/* Cache for the previous getdtablesize () result. */
static int dtablesize;
int
getdtablesize (void)
{
if (dtablesize == 0)
{
/* We are looking for the number N such that the valid file descriptors
are 0..N-1. It can be obtained through a loop as follows:
{
int fd;
for (fd = 3; fd < 65536; fd++)
if (dup2 (0, fd) == -1)
break;
return fd;
}
On Windows XP, the result is 2048.
The drawback of this loop is that it allocates memory for a libc
internal array that is never freed.
The number N can also be obtained as the upper bound for
_getmaxstdio (). _getmaxstdio () returns the maximum number of open
FILE objects. The sanity check in _setmaxstdio reveals the maximum
number of file descriptors. This too allocates memory, but it is
freed when we call _setmaxstdio with the original value. */
int orig_max_stdio = _getmaxstdio ();
unsigned int bound;
for (bound = 0x10000; _setmaxstdio (bound) < 0; bound = bound / 2)
;
_setmaxstdio (orig_max_stdio);
dtablesize = bound;
}
return dtablesize;
}
#endif

View file

@ -1,6 +1,7 @@
/* gethostname emulation for SysV and POSIX.1.
Copyright (C) 1992, 2003, 2006, 2008 Free Software Foundation, Inc.
Copyright (C) 1992, 2003, 2006, 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
@ -15,10 +16,14 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* David MacKenzie <djm@gnu.ai.mit.edu> */
/* David MacKenzie <djm@gnu.ai.mit.edu>
Windows port by Simon Josefsson <simon@josefsson.org> */
#include <config.h>
#if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__)
/* Unix API. */
/* Specification. */
#include <unistd.h>
@ -54,3 +59,47 @@ gethostname (char *name, size_t len)
#endif
return 0;
}
#else
/* Native Windows API. Which primitive to choose?
- gethostname() requires linking with -lws2_32.
- GetComputerName() does not return the right kind of hostname.
- GetComputerNameEx(ComputerNameDnsHostname,...) returns the right hostname,
but it is hard to use portably:
- It requires defining _WIN32_WINNT to at least 0x0500.
- With mingw, it also requires
"#define GetComputerNameEx GetComputerNameExA".
- With older versions of mingw, none of the declarations are present at
all, not even of the enum value ComputerNameDnsHostname.
So we use gethostname(). Linking with -lws2_32 is the least evil. */
#define WIN32_LEAN_AND_MEAN
/* Get winsock2.h. */
#include <unistd.h>
/* Get INT_MAX. */
#include <limits.h>
/* Get set_winsock_errno. */
#include "w32sock.h"
#include "sockets.h"
#undef gethostname
int
rpl_gethostname (char *name, size_t len)
{
int r;
if (len > INT_MAX)
len = INT_MAX;
gl_sockets_startup (SOCKETS_1_1);
r = gethostname (name, (int) len);
if (r < 0)
set_winsock_errno ();
return r;
}
#endif

View file

@ -1,8 +1,7 @@
/* Get the system load averages.
Copyright (C) 1985, 1986, 1987, 1988, 1989, 1991, 1992, 1993, 1994,
1995, 1997, 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free
Software Foundation, Inc.
Copyright (C) 1985-1989, 1991-1995, 1997, 1999-2000, 2003-2010 Free Software
Foundation, Inc.
NOTE: The canonical source of this file is maintained with gnulib.
Bugs can be reported to bug-gnulib@gnu.org.
@ -44,8 +43,8 @@
otherwise, no load average is available.
HAVE_NLIST_H nlist.h is available. NLIST_STRUCT defaults
to this.
NLIST_STRUCT Include nlist.h, not a.out.h, and
the nlist n_name element is a pointer,
NLIST_STRUCT Include nlist.h, not a.out.h.
N_NAME_POINTER The nlist n_name element is a pointer,
not an array.
HAVE_STRUCT_NLIST_N_UN_N_NAME `n_un.n_name' is member of `struct nlist'.
LINUX_LDAV_FILE [__linux__, __CYGWIN__]: File containing
@ -112,7 +111,6 @@
# include "c-strtod.h"
# include "cloexec.h"
# include "intprops.h"
# include "xalloc.h"
/* The existing Emacs configuration files define a macro called
LOAD_AVE_CVT, which accepts a value of type LOAD_AVE_TYPE, and
@ -900,7 +898,7 @@ getloadavg (double loadavg[], int nelem)
if (offset == 0)
{
# ifndef sgi
# ifndef NLIST_STRUCT
# if ! defined NLIST_STRUCT || ! defined N_NAME_POINTER
strcpy (nl[0].n_name, LDAV_SYMBOL);
strcpy (nl[1].n_name, "");
# else /* NLIST_STRUCT */

View file

@ -1,9 +1,9 @@
/* Getopt for GNU.
NOTE: getopt is now part of the C library, so if you don't know what
NOTE: getopt is part of the C library, so if you don't know what
"Keep this file name-space clean" means, talk to drepper@gnu.org
before changing it!
Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001,2002,2003,2004,2006,2008
Free Software Foundation, Inc.
Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2010 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
@ -41,12 +41,9 @@
# include <wchar.h>
#endif
#ifndef attribute_hidden
# define attribute_hidden
#endif
/* Unlike standard Unix `getopt', functions like `getopt_long'
let the user intersperse the options with the other arguments.
/* This version of `getopt' appears to the caller like standard Unix `getopt'
but it behaves differently for the user, since it allows the user
to intersperse the options with the other arguments.
As `getopt_long' works, it permutes the elements of ARGV so that,
when it is done, all the options precede everything else. Thus
@ -54,7 +51,7 @@
Using `getopt' or setting the environment variable POSIXLY_CORRECT
disables permutation.
Then the application's behavior is completely standard.
Then the behavior is completely standard.
GNU application programs can use a third alternative mode in which
they can distinguish the relative order of options and other arguments. */
@ -225,8 +222,9 @@ exchange (char **argv, struct _getopt_data *d)
/* Initialize the internal data when the first call is made. */
static const char *
_getopt_initialize (int argc, char **argv, const char *optstring,
int posixly_correct, struct _getopt_data *d)
_getopt_initialize (int argc _GL_UNUSED,
char **argv _GL_UNUSED, const char *optstring,
struct _getopt_data *d, int posixly_correct)
{
/* Start processing options with ARGV-element 1 (since ARGV-element 0
is the program name); the sequence of previously skipped
@ -330,6 +328,10 @@ _getopt_initialize (int argc, char **argv, const char *optstring,
`flag' field is nonzero, the value of the option's `val' field
if the `flag' field is zero.
The elements of ARGV aren't really const, because we permute them.
But we pretend they're const in the prototype to be compatible
with other systems.
LONGOPTS is a vector of `struct option' terminated by an
element containing a name which is zero.
@ -338,19 +340,14 @@ _getopt_initialize (int argc, char **argv, const char *optstring,
recent call.
If LONG_ONLY is nonzero, '-' as well as '--' can introduce
long-named options.
If POSIXLY_CORRECT is nonzero, behave as if the POSIXLY_CORRECT
environment variable were set. */
long-named options. */
int
_getopt_internal_r (int argc, char **argv, const char *optstring,
const struct option *longopts, int *longind,
int long_only, int posixly_correct, struct _getopt_data *d)
int long_only, struct _getopt_data *d, int posixly_correct)
{
int print_errors = d->opterr;
if (optstring[0] == ':')
print_errors = 0;
if (argc < 1)
return -1;
@ -361,10 +358,14 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
{
if (d->optind == 0)
d->optind = 1; /* Don't scan ARGV[0], the program name. */
optstring = _getopt_initialize (argc, argv, optstring,
posixly_correct, d);
optstring = _getopt_initialize (argc, argv, optstring, d,
posixly_correct);
d->__initialized = 1;
}
else if (optstring[0] == '-' || optstring[0] == '+')
optstring++;
if (optstring[0] == ':')
print_errors = 0;
/* Test whether ARGV[optind] points to a non-option argument.
Either it does not have option syntax, or there is an environment flag
@ -523,7 +524,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
#if defined _LIBC && defined USE_IN_LIBIO
char *buf;
if (__asprintf (&buf, _("%s: option `%s' is ambiguous\n"),
if (__asprintf (&buf, _("%s: option '%s' is ambiguous\n"),
argv[0], argv[d->optind]) >= 0)
{
_IO_flockfile (stderr);
@ -539,7 +540,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
free (buf);
}
#else
fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
fprintf (stderr, _("%s: option '%s' is ambiguous\n"),
argv[0], argv[d->optind]);
#endif
}
@ -573,11 +574,11 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
/* --option */
#if defined _LIBC && defined USE_IN_LIBIO
n = __asprintf (&buf, _("\
%s: option `--%s' doesn't allow an argument\n"),
%s: option '--%s' doesn't allow an argument\n"),
argv[0], pfound->name);
#else
fprintf (stderr, _("\
%s: option `--%s' doesn't allow an argument\n"),
%s: option '--%s' doesn't allow an argument\n"),
argv[0], pfound->name);
#endif
}
@ -586,12 +587,12 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
/* +option or -option */
#if defined _LIBC && defined USE_IN_LIBIO
n = __asprintf (&buf, _("\
%s: option `%c%s' doesn't allow an argument\n"),
%s: option '%c%s' doesn't allow an argument\n"),
argv[0], argv[d->optind - 1][0],
pfound->name);
#else
fprintf (stderr, _("\
%s: option `%c%s' doesn't allow an argument\n"),
%s: option '%c%s' doesn't allow an argument\n"),
argv[0], argv[d->optind - 1][0],
pfound->name);
#endif
@ -634,8 +635,8 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
char *buf;
if (__asprintf (&buf, _("\
%s: option `%s' requires an argument\n"),
argv[0], argv[d->optind - 1]) >= 0)
%s: option '--%s' requires an argument\n"),
argv[0], pfound->name) >= 0)
{
_IO_flockfile (stderr);
@ -652,8 +653,8 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
}
#else
fprintf (stderr,
_("%s: option `%s' requires an argument\n"),
argv[0], argv[d->optind - 1]);
_("%s: option '--%s' requires an argument\n"),
argv[0], pfound->name);
#endif
}
d->__nextchar += strlen (d->__nextchar);
@ -690,10 +691,10 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
{
/* --option */
#if defined _LIBC && defined USE_IN_LIBIO
n = __asprintf (&buf, _("%s: unrecognized option `--%s'\n"),
n = __asprintf (&buf, _("%s: unrecognized option '--%s'\n"),
argv[0], d->__nextchar);
#else
fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
fprintf (stderr, _("%s: unrecognized option '--%s'\n"),
argv[0], d->__nextchar);
#endif
}
@ -701,10 +702,10 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
{
/* +option or -option */
#if defined _LIBC && defined USE_IN_LIBIO
n = __asprintf (&buf, _("%s: unrecognized option `%c%s'\n"),
n = __asprintf (&buf, _("%s: unrecognized option '%c%s'\n"),
argv[0], argv[d->optind][0], d->__nextchar);
#else
fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
fprintf (stderr, _("%s: unrecognized option '%c%s'\n"),
argv[0], argv[d->optind][0], d->__nextchar);
#endif
}
@ -737,13 +738,13 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
{
char c = *d->__nextchar++;
char *temp = strchr (optstring, c);
const char *temp = strchr (optstring, c);
/* Increment `optind' when we start to process its last character. */
if (*d->__nextchar == '\0')
++d->optind;
if (temp == NULL || c == ':')
if (temp == NULL || c == ':' || c == ';')
{
if (print_errors)
{
@ -752,25 +753,12 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
int n;
#endif
if (d->__posixly_correct)
{
/* 1003.2 specifies the format of this message. */
#if defined _LIBC && defined USE_IN_LIBIO
n = __asprintf (&buf, _("%s: illegal option -- %c\n"),
n = __asprintf (&buf, _("%s: invalid option -- '%c'\n"),
argv[0], c);
#else
fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c);
fprintf (stderr, _("%s: invalid option -- '%c'\n"), argv[0], c);
#endif
}
else
{
#if defined _LIBC && defined USE_IN_LIBIO
n = __asprintf (&buf, _("%s: invalid option -- %c\n"),
argv[0], c);
#else
fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c);
#endif
}
#if defined _LIBC && defined USE_IN_LIBIO
if (n >= 0)
@ -815,12 +803,11 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
{
if (print_errors)
{
/* 1003.2 specifies the format of this message. */
#if defined _LIBC && defined USE_IN_LIBIO
char *buf;
if (__asprintf (&buf,
_("%s: option requires an argument -- %c\n"),
_("%s: option requires an argument -- '%c'\n"),
argv[0], c) >= 0)
{
_IO_flockfile (stderr);
@ -836,7 +823,8 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
free (buf);
}
#else
fprintf (stderr, _("%s: option requires an argument -- %c\n"),
fprintf (stderr,
_("%s: option requires an argument -- '%c'\n"),
argv[0], c);
#endif
}
@ -878,7 +866,10 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
pfound = p;
indfound = option_index;
}
else
else if (long_only
|| pfound->has_arg != p->has_arg
|| pfound->flag != p->flag
|| pfound->val != p->val)
/* Second or later nonexact match found. */
ambig = 1;
}
@ -889,8 +880,8 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
#if defined _LIBC && defined USE_IN_LIBIO
char *buf;
if (__asprintf (&buf, _("%s: option `-W %s' is ambiguous\n"),
argv[0], argv[d->optind]) >= 0)
if (__asprintf (&buf, _("%s: option '-W %s' is ambiguous\n"),
argv[0], d->optarg) >= 0)
{
_IO_flockfile (stderr);
@ -905,8 +896,8 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
free (buf);
}
#else
fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
argv[0], argv[d->optind]);
fprintf (stderr, _("%s: option '-W %s' is ambiguous\n"),
argv[0], d->optarg);
#endif
}
d->__nextchar += strlen (d->__nextchar);
@ -930,7 +921,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
char *buf;
if (__asprintf (&buf, _("\
%s: option `-W %s' doesn't allow an argument\n"),
%s: option '-W %s' doesn't allow an argument\n"),
argv[0], pfound->name) >= 0)
{
_IO_flockfile (stderr);
@ -948,7 +939,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
}
#else
fprintf (stderr, _("\
%s: option `-W %s' doesn't allow an argument\n"),
%s: option '-W %s' doesn't allow an argument\n"),
argv[0], pfound->name);
#endif
}
@ -969,8 +960,8 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
char *buf;
if (__asprintf (&buf, _("\
%s: option `%s' requires an argument\n"),
argv[0], argv[d->optind - 1]) >= 0)
%s: option '-W %s' requires an argument\n"),
argv[0], pfound->name) >= 0)
{
_IO_flockfile (stderr);
@ -986,15 +977,17 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
free (buf);
}
#else
fprintf (stderr,
_("%s: option `%s' requires an argument\n"),
argv[0], argv[d->optind - 1]);
fprintf (stderr, _("\
%s: option '-W %s' requires an argument\n"),
argv[0], pfound->name);
#endif
}
d->__nextchar += strlen (d->__nextchar);
return optstring[0] == ':' ? ':' : '?';
}
}
else
d->optarg = NULL;
d->__nextchar += strlen (d->__nextchar);
if (longind != NULL)
*longind = option_index;
@ -1036,12 +1029,11 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
{
if (print_errors)
{
/* 1003.2 specifies the format of this message. */
#if defined _LIBC && defined USE_IN_LIBIO
char *buf;
if (__asprintf (&buf, _("\
%s: option requires an argument -- %c\n"),
%s: option requires an argument -- '%c'\n"),
argv[0], c) >= 0)
{
_IO_flockfile (stderr);
@ -1058,7 +1050,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
}
#else
fprintf (stderr,
_("%s: option requires an argument -- %c\n"),
_("%s: option requires an argument -- '%c'\n"),
argv[0], c);
#endif
}
@ -1081,16 +1073,17 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
int
_getopt_internal (int argc, char **argv, const char *optstring,
const struct option *longopts, int *longind,
int long_only, int posixly_correct)
const struct option *longopts, int *longind, int long_only,
int posixly_correct)
{
int result;
getopt_data.optind = optind;
getopt_data.opterr = opterr;
result = _getopt_internal_r (argc, argv, optstring, longopts, longind,
long_only, posixly_correct, &getopt_data);
result = _getopt_internal_r (argc, argv, optstring, longopts,
longind, long_only, &getopt_data,
posixly_correct);
optind = getopt_data.optind;
optarg = getopt_data.optarg;
@ -1110,10 +1103,23 @@ enum { POSIXLY_CORRECT = 1 };
int
getopt (int argc, char *const *argv, const char *optstring)
{
return _getopt_internal (argc, (char **) argv, optstring, NULL, NULL, 0,
POSIXLY_CORRECT);
return _getopt_internal (argc, (char **) argv, optstring,
(const struct option *) 0,
(int *) 0,
0, POSIXLY_CORRECT);
}
#ifdef _LIBC
int
__posix_getopt (int argc, char *const *argv, const char *optstring)
{
return _getopt_internal (argc, argv, optstring,
(const struct option *) 0,
(int *) 0,
0, 1);
}
#endif
#ifdef TEST
@ -1161,7 +1167,7 @@ main (int argc, char **argv)
break;
case 'c':
printf ("option c with value `%s'\n", optarg);
printf ("option c with value '%s'\n", optarg);
break;
case '?':

View file

@ -1,6 +1,6 @@
/* Declarations for getopt.
Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2005,2006,2007
Free Software Foundation, Inc.
Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2010 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
@ -16,24 +16,42 @@
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 _GETOPT_H
#ifndef _GL_GETOPT_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
/* The include_next requires a split double-inclusion guard. We must
also inform the replacement unistd.h to not recursively use
<getopt.h>; our definitions will be present soon enough. */
#if @HAVE_GETOPT_H@
# define _GL_SYSTEM_GETOPT
# @INCLUDE_NEXT@ @NEXT_GETOPT_H@
# undef _GL_SYSTEM_GETOPT
#endif
#ifndef _GL_GETOPT_H
#ifndef __need_getopt
# define _GETOPT_H 1
# define _GL_GETOPT_H 1
#endif
/* Standalone applications should #define __GETOPT_PREFIX to an
identifier that prefixes the external functions and variables
defined in this header. When this happens, include the
headers that might declare getopt so that they will not cause
confusion if included after this file. Then systematically rename
confusion if included after this file (if the system had <getopt.h>,
we have already included it). Then systematically rename
identifiers so that they do not collide with the system functions
and variables. Renaming avoids problems with some compilers and
linkers. */
#if defined __GETOPT_PREFIX && !defined __need_getopt
# if !@HAVE_GETOPT_H@
# include <stdlib.h>
# include <stdio.h>
# include <unistd.h>
# endif
# undef __need_getopt
# undef getopt
# undef getopt_long
@ -42,6 +60,7 @@
# undef opterr
# undef optind
# undef optopt
# undef option
# define __GETOPT_CONCAT(x, y) x ## y
# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y)
# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y)
@ -52,6 +71,8 @@
# define opterr __GETOPT_ID (opterr)
# define optind __GETOPT_ID (optind)
# define optopt __GETOPT_ID (optopt)
# define option __GETOPT_ID (option)
# define _getopt_internal __GETOPT_ID (getopt_internal)
#endif
/* Standalone applications get correct prototypes for getopt_long and
@ -100,6 +121,8 @@
# endif
#endif
/* The definition of _GL_ARG_NONNULL is copied here. */
#ifdef __cplusplus
extern "C" {
#endif
@ -201,17 +224,17 @@ struct option
the environment, then do not permute arguments. */
extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
__THROW;
__THROW _GL_ARG_NONNULL ((2, 3));
#ifndef __need_getopt
extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv,
const char *__shortopts,
const struct option *__longopts, int *__longind)
__THROW;
__THROW _GL_ARG_NONNULL ((2, 3));
extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv,
const char *__shortopts,
const struct option *__longopts, int *__longind)
__THROW;
__THROW _GL_ARG_NONNULL ((2, 3));
#endif
@ -223,3 +246,4 @@ extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv,
#undef __need_getopt
#endif /* getopt.h */
#endif /* getopt.h */

View file

@ -1,6 +1,6 @@
/* getopt_long and getopt_long_only entry points for GNU getopt.
Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98,2004,2006,2009
Free Software Foundation, Inc.
Copyright (C) 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997,
1998, 2004, 2006, 2009, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
@ -50,7 +50,7 @@ _getopt_long_r (int argc, char **argv, const char *options,
struct _getopt_data *d)
{
return _getopt_internal_r (argc, argv, options, long_options, opt_index,
0, 0, d);
0, d, 0);
}
/* Like getopt_long, but '-' as well as '--' can indicate a long option.
@ -73,7 +73,7 @@ _getopt_long_only_r (int argc, char **argv, const char *options,
struct _getopt_data *d)
{
return _getopt_internal_r (argc, argv, options, long_options, opt_index,
1, 0, d);
1, d, 0);
}

View file

@ -1,6 +1,6 @@
/* Internal declarations for getopt.
Copyright (C) 1989-1994,1996-1999,2001,2003,2004
Free Software Foundation, Inc.
Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2010 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
@ -19,6 +19,8 @@
#ifndef _GETOPT_INT_H
#define _GETOPT_INT_H 1
#include <getopt.h>
extern int _getopt_internal (int ___argc, char **___argv,
const char *__shortopts,
const struct option *__longopts, int *__longind,
@ -28,31 +30,7 @@ extern int _getopt_internal (int ___argc, char **___argv,
/* Reentrant versions which can handle parsing multiple argument
vectors at the same time. */
/* Data type for reentrant functions. */
struct _getopt_data
{
/* These have exactly the same meaning as the corresponding global
variables, except that they are used for the reentrant
versions of getopt. */
int optind;
int opterr;
int optopt;
char *optarg;
/* Internal members. */
/* True if the internal members have been initialized. */
int __initialized;
/* The next char to be scanned in the option-element
in which the last option character we returned was found.
This allows us to pick up the scan where we left off.
If this is zero, or a null string, it means resume the scan
by advancing to the next ARGV-element. */
char *__nextchar;
/* Describe how to deal with options that follow non-option ARGV-elements.
/* Describe how to deal with options that follow non-option ARGV-elements.
If the caller did not specify anything,
the default is REQUIRE_ORDER if the environment variable
@ -81,10 +59,37 @@ struct _getopt_data
of the value of `ordering'. In the case of RETURN_IN_ORDER, only
`--' can cause `getopt' to return -1 with `optind' != ARGC. */
enum
enum __ord
{
REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
} __ordering;
};
/* Data type for reentrant functions. */
struct _getopt_data
{
/* These have exactly the same meaning as the corresponding global
variables, except that they are used for the reentrant
versions of getopt. */
int optind;
int opterr;
int optopt;
char *optarg;
/* Internal members. */
/* True if the internal members have been initialized. */
int __initialized;
/* The next char to be scanned in the option-element
in which the last option character we returned was found.
This allows us to pick up the scan where we left off.
If this is zero, or a null string, it means resume the scan
by advancing to the next ARGV-element. */
char *__nextchar;
/* See __ord above. */
enum __ord __ordering;
/* If the POSIXLY_CORRECT environment variable is set
or getopt was called. */
@ -113,8 +118,8 @@ struct _getopt_data
extern int _getopt_internal_r (int ___argc, char **___argv,
const char *__shortopts,
const struct option *__longopts, int *__longind,
int __long_only, int __posixly_correct,
struct _getopt_data *__data);
int __long_only, struct _getopt_data *__data,
int __posixly_correct);
extern int _getopt_long_r (int ___argc, char **___argv,
const char *__shortopts,

View file

@ -1,5 +1,6 @@
/* Convenience header for conditional use of GNU <libintl.h>.
Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009 Free Software Foundation, Inc.
Copyright (C) 1995-1998, 2000-2002, 2004-2006, 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
@ -80,7 +81,7 @@
((void) (Domainname), ngettext (Msgid1, Msgid2, N))
# undef dcngettext
# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
((void) (Category), dngettext(Domainname, Msgid1, Msgid2, N))
((void) (Category), dngettext (Domainname, Msgid1, Msgid2, N))
# undef textdomain
# define textdomain(Domainname) ((const char *) (Domainname))
# undef bindtextdomain

View file

@ -1,6 +1,6 @@
/* inet_ntop.c -- convert IPv4 and IPv6 addresses from binary to text form
Copyright (C) 2005, 2006, 2008 Free Software Foundation, Inc.
Copyright (C) 2005-2006, 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
@ -42,10 +42,6 @@
#include <string.h>
#include <errno.h>
#ifndef EAFNOSUPPORT
# define EAFNOSUPPORT EINVAL
#endif
#define NS_IN6ADDRSZ 16
#define NS_INT16SZ 2

View file

@ -1,6 +1,7 @@
/* intprops.h -- properties of integer types
Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Copyright (C) 2001, 2002, 2003, 2004, 2005, 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
@ -17,37 +18,40 @@
/* Written by Paul Eggert. */
#include <limits.h>
#ifndef GL_INTPROPS_H
# define GL_INTPROPS_H
# include <limits.h>
/* The extra casts in the following macros work around compiler bugs,
e.g., in Cray C 5.0.3.0. */
/* True if the arithmetic type T is an integer type. bool counts as
an integer. */
#define TYPE_IS_INTEGER(t) ((t) 1.5 == 1)
# define TYPE_IS_INTEGER(t) ((t) 1.5 == 1)
/* True if negative values of the signed integer type T use two's
complement, ones' complement, or signed magnitude representation,
respectively. Much GNU code assumes two's complement, but some
people like to be portable to all possible C hosts. */
#define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1)
#define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0)
#define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1)
# define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1)
# define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0)
# define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1)
/* True if the arithmetic type T is signed. */
#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
# define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
/* The maximum and minimum values for the integer type T. These
macros have undefined behavior if T is signed and has padding bits.
If this is a problem for you, please let us know how to fix it for
your host. */
#define TYPE_MINIMUM(t) \
# define TYPE_MINIMUM(t) \
((t) (! TYPE_SIGNED (t) \
? (t) 0 \
: TYPE_SIGNED_MAGNITUDE (t) \
? ~ (t) 0 \
: ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
#define TYPE_MAXIMUM(t) \
# define TYPE_MAXIMUM(t) \
((t) (! TYPE_SIGNED (t) \
? (t) -1 \
: ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
@ -58,20 +62,22 @@
tighter bound. Otherwise, it overestimates the true bound by one byte
when applied to unsigned types of size 2, 4, 16, ... bytes.
The symbol signed_type_or_expr__ is private to this header file. */
#if __GNUC__ >= 2
# if __GNUC__ >= 2
# define signed_type_or_expr__(t) TYPE_SIGNED (__typeof__ (t))
#else
# else
# define signed_type_or_expr__(t) 1
#endif
# endif
/* Bound on length of the string representing an integer type or expression T.
Subtract 1 for the sign bit if T is signed; log10 (2.0) < 146/485;
add 1 for integer division truncation; add 1 more for a minus sign
if needed. */
#define INT_STRLEN_BOUND(t) \
# define INT_STRLEN_BOUND(t) \
((sizeof (t) * CHAR_BIT - signed_type_or_expr__ (t)) * 146 / 485 \
+ signed_type_or_expr__ (t) + 1)
/* Bound on buffer size needed to represent an integer type or expression T,
including the terminating null. */
#define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1)
# define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1)
#endif /* GL_INTPROPS_H */

162
gl/langinfo.in.h Normal file
View file

@ -0,0 +1,162 @@
/* Substitute for and wrapper around <langinfo.h>.
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, 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, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/*
* POSIX <langinfo.h> for platforms that lack it or have an incomplete one.
* <http://www.opengroup.org/onlinepubs/9699919799/basedefs/langinfo.h.html>
*/
#ifndef _GL_LANGINFO_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
/* The include_next requires a split double-inclusion guard. */
#if @HAVE_LANGINFO_H@
# @INCLUDE_NEXT@ @NEXT_LANGINFO_H@
#endif
#ifndef _GL_LANGINFO_H
#define _GL_LANGINFO_H
#if !@HAVE_LANGINFO_H@
/* A platform that lacks <langinfo.h>. */
/* Assume that it also lacks <nl_types.h> and the nl_item type. */
typedef int nl_item;
/* nl_langinfo items of the LC_CTYPE category */
# define CODESET 10000
/* nl_langinfo items of the LC_NUMERIC category */
# define RADIXCHAR 10001
# define THOUSEP 10002
/* nl_langinfo items of the LC_TIME category */
# define D_T_FMT 10003
# define D_FMT 10004
# define T_FMT 10005
# define T_FMT_AMPM 10006
# define AM_STR 10007
# define PM_STR 10008
# define DAY_1 10009
# define DAY_2 (DAY_1 + 1)
# define DAY_3 (DAY_1 + 2)
# define DAY_4 (DAY_1 + 3)
# define DAY_5 (DAY_1 + 4)
# define DAY_6 (DAY_1 + 5)
# define DAY_7 (DAY_1 + 6)
# define ABDAY_1 10016
# define ABDAY_2 (ABDAY_1 + 1)
# define ABDAY_3 (ABDAY_1 + 2)
# define ABDAY_4 (ABDAY_1 + 3)
# define ABDAY_5 (ABDAY_1 + 4)
# define ABDAY_6 (ABDAY_1 + 5)
# define ABDAY_7 (ABDAY_1 + 6)
# define MON_1 10023
# define MON_2 (MON_1 + 1)
# define MON_3 (MON_1 + 2)
# define MON_4 (MON_1 + 3)
# define MON_5 (MON_1 + 4)
# define MON_6 (MON_1 + 5)
# define MON_7 (MON_1 + 6)
# define MON_8 (MON_1 + 7)
# define MON_9 (MON_1 + 8)
# define MON_10 (MON_1 + 9)
# define MON_11 (MON_1 + 10)
# define MON_12 (MON_1 + 11)
# define ABMON_1 10035
# define ABMON_2 (ABMON_1 + 1)
# define ABMON_3 (ABMON_1 + 2)
# define ABMON_4 (ABMON_1 + 3)
# define ABMON_5 (ABMON_1 + 4)
# define ABMON_6 (ABMON_1 + 5)
# define ABMON_7 (ABMON_1 + 6)
# define ABMON_8 (ABMON_1 + 7)
# define ABMON_9 (ABMON_1 + 8)
# define ABMON_10 (ABMON_1 + 9)
# define ABMON_11 (ABMON_1 + 10)
# define ABMON_12 (ABMON_1 + 11)
# define ERA 10047
# define ERA_D_FMT 10048
# define ERA_D_T_FMT 10049
# define ERA_T_FMT 10050
# define ALT_DIGITS 10051
/* nl_langinfo items of the LC_MONETARY category */
# define CRNCYSTR 10052
/* nl_langinfo items of the LC_MESSAGES category */
# define YESEXPR 10053
# define NOEXPR 10054
#else
/* A platform that has <langinfo.h>. */
# if !@HAVE_LANGINFO_CODESET@
# define CODESET 10000
# define GNULIB_defined_CODESET 1
# endif
# if !@HAVE_LANGINFO_ERA@
# define ERA 10047
# define ERA_D_FMT 10048
# define ERA_D_T_FMT 10049
# define ERA_T_FMT 10050
# define ALT_DIGITS 10051
# define GNULIB_defined_ERA 1
# endif
#endif
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
/* The definition of _GL_WARN_ON_USE is copied here. */
/* Declare overridden functions. */
/* Return a piece of locale dependent information.
Note: The difference between nl_langinfo (CODESET) and locale_charset ()
is that the latter normalizes the encoding names to GNU conventions. */
#if @GNULIB_NL_LANGINFO@
# if @REPLACE_NL_LANGINFO@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef nl_langinfo
# define nl_langinfo rpl_nl_langinfo
# endif
_GL_FUNCDECL_RPL (nl_langinfo, char *, (nl_item item));
_GL_CXXALIAS_RPL (nl_langinfo, char *, (nl_item item));
# else
# if !@HAVE_NL_LANGINFO@
_GL_FUNCDECL_SYS (nl_langinfo, char *, (nl_item item));
# endif
_GL_CXXALIAS_SYS (nl_langinfo, char *, (nl_item item));
# endif
_GL_CXXALIASWARN (nl_langinfo);
#elif defined GNULIB_POSIXCHECK
# undef nl_langinfo
# if HAVE_RAW_DECL_NL_LANGINFO
_GL_WARN_ON_USE (nl_langinfo, "nl_langinfo is not portable - "
"use gnulib module nl_langinfo for portability");
# endif
#endif
#endif /* _GL_LANGINFO_H */
#endif /* _GL_LANGINFO_H */

View file

@ -1,6 +1,6 @@
/* Determine a canonical name for the current locale's character encoding.
Copyright (C) 2000-2006, 2008-2009 Free Software Foundation, Inc.
Copyright (C) 2000-2006, 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
@ -23,6 +23,7 @@
/* Specification. */
#include "localcharset.h"
#include <fcntl.h>
#include <stddef.h>
#include <stdio.h>
#include <string.h>
@ -44,6 +45,7 @@
#endif
#if !defined WIN32_NATIVE
# include <unistd.h>
# if HAVE_LANGINFO_CODESET
# include <langinfo.h>
# else
@ -75,6 +77,11 @@
# include "configmake.h"
#endif
/* Define O_NOFOLLOW to 0 on platforms where it does not exist. */
#ifndef O_NOFOLLOW
# define O_NOFOLLOW 0
#endif
#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
/* Win32, Cygwin, OS/2, DOS */
# define ISSLASH(C) ((C) == '/' || (C) == '\\')
@ -117,7 +124,6 @@ get_charset_aliases (void)
if (cp == NULL)
{
#if !(defined DARWIN7 || defined VMS || defined WIN32_NATIVE || defined __CYGWIN__)
FILE *fp;
const char *dir;
const char *base = "charset.alias";
char *file_name;
@ -143,9 +149,36 @@ get_charset_aliases (void)
}
}
if (file_name == NULL || (fp = fopen (file_name, "r")) == NULL)
/* Out of memory or file not found, treat it as empty. */
if (file_name == NULL)
/* Out of memory. Treat the file as empty. */
cp = "";
else
{
int fd;
/* Open the file. Reject symbolic links on platforms that support
O_NOFOLLOW. This is a security feature. Without it, an attacker
could retrieve parts of the contents (namely, the tail of the
first line that starts with "* ") of an arbitrary file by placing
a symbolic link to that file under the name "charset.alias" in
some writable directory and defining the environment variable
CHARSETALIASDIR to point to that directory. */
fd = open (file_name,
O_RDONLY | (HAVE_WORKING_O_NOFOLLOW ? O_NOFOLLOW : 0));
if (fd < 0)
/* File not found. Treat it as empty. */
cp = "";
else
{
FILE *fp;
fp = fdopen (fd, "r");
if (fp == NULL)
{
/* Out of memory. Treat the file as empty. */
close (fd);
cp = "";
}
else
{
/* Parse the file's contents. */
@ -211,9 +244,10 @@ get_charset_aliases (void)
cp = res_ptr;
}
}
}
if (file_name != NULL)
free (file_name);
}
#else
@ -335,10 +369,9 @@ locale_charset (void)
codeset = nl_langinfo (CODESET);
# ifdef __CYGWIN__
/* Cygwin 2006 does not have locales. nl_langinfo (CODESET) always
returns "US-ASCII". As long as this is not fixed, return the suffix
of the locale name from the environment variables (if present) or
the codepage as a number. */
/* Cygwin < 1.7 does not have locales. nl_langinfo (CODESET) always
returns "US-ASCII". Return the suffix of the locale name from the
environment variables (if present) or the codepage as a number. */
if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0)
{
const char *locale;
@ -375,7 +408,17 @@ locale_charset (void)
}
}
/* Woe32 has a function returning the locale's codepage as a number. */
/* Woe32 has a function returning the locale's codepage as a number:
GetACP(). This encoding is used by Cygwin, unless the user has set
the environment variable CYGWIN=codepage:oem (which very few people
do).
Output directed to console windows needs to be converted (to
GetOEMCP() if the console is using a raster font, or to
GetConsoleOutputCP() if it is using a TrueType font). Cygwin does
this conversion transparently (see winsup/cygwin/fhandler_console.cc),
converting to GetConsoleOutputCP(). This leads to correct results,
except when SetConsoleOutputCP has been called and a raster font is
in use. */
sprintf (buf, "CP%u", GetACP ());
codeset = buf;
}
@ -415,7 +458,13 @@ locale_charset (void)
static char buf[2 + 10 + 1];
/* Woe32 has a function returning the locale's codepage as a number. */
/* Woe32 has a function returning the locale's codepage as a number:
GetACP().
When the output goes to a console window, it needs to be provided in
GetOEMCP() encoding if the console is using a raster font, or in
GetConsoleOutputCP() encoding if it is using a TrueType font.
But in GUI programs and for output sent to files and pipes, GetACP()
encoding is the best bet. */
sprintf (buf, "CP%u", GetACP ());
codeset = buf;

View file

@ -1,5 +1,5 @@
/* Determine a canonical name for the current locale's character encoding.
Copyright (C) 2000-2003 Free Software Foundation, Inc.
Copyright (C) 2000-2003, 2009-2010 Free Software Foundation, Inc.
This file is part of the GNU CHARSET Library.
This program is free software; you can redistribute it and/or modify

74
gl/locale.in.h Normal file
View file

@ -0,0 +1,74 @@
/* A POSIX <locale.h>.
Copyright (C) 2007-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 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 _GL_LOCALE_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_LOCALE_H@
#ifndef _GL_LOCALE_H
#define _GL_LOCALE_H
/* NetBSD 5.0 mis-defines NULL. */
#include <stddef.h>
/* MacOS X 10.5 defines the locale_t type in <xlocale.h>. */
#if @HAVE_XLOCALE_H@
# include <xlocale.h>
#endif
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
/* The definition of _GL_ARG_NONNULL is copied here. */
/* The definition of _GL_WARN_ON_USE is copied here. */
/* The LC_MESSAGES locale category is specified in POSIX, but not in ISO C.
On systems that don't define it, use the same value as GNU libintl. */
#if !defined LC_MESSAGES
# define LC_MESSAGES 1729
#endif
#if @GNULIB_DUPLOCALE@
# if @REPLACE_DUPLOCALE@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef duplocale
# define duplocale rpl_duplocale
# endif
_GL_FUNCDECL_RPL (duplocale, locale_t, (locale_t locale) _GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (duplocale, locale_t, (locale_t locale));
# else
# if @HAVE_DUPLOCALE@
_GL_CXXALIAS_SYS (duplocale, locale_t, (locale_t locale));
# endif
# endif
# if @HAVE_DUPLOCALE@
_GL_CXXALIASWARN (duplocale);
# endif
#elif defined GNULIB_POSIXCHECK
# undef duplocale
# if HAVE_RAW_DECL_DUPLOCALE
_GL_WARN_ON_USE (duplocale, "duplocale is buggy on some glibc systems - "
"use gnulib module duplocale for portability");
# endif
#endif
#endif /* _GL_LOCALE_H */
#endif /* _GL_LOCALE_H */

View file

@ -1,5 +1,5 @@
# 00gnulib.m4 serial 2
dnl Copyright (C) 2009 Free Software Foundation, Inc.
dnl Copyright (C) 2009-2010 Free Software Foundation, 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.

View file

@ -1,5 +1,6 @@
# alloca.m4 serial 9
dnl Copyright (C) 2002-2004, 2006, 2007, 2009 Free Software Foundation, Inc.
dnl Copyright (C) 2002-2004, 2006-2007, 2009-2010 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.

View file

@ -1,5 +1,5 @@
# arpa_inet_h.m4 serial 5
dnl Copyright (C) 2006, 2008 Free Software Foundation, Inc.
# arpa_inet_h.m4 serial 8
dnl Copyright (C) 2006, 2008, 2009, 2010 Free Software Foundation, 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.
@ -16,27 +16,35 @@ AC_DEFUN([gl_HEADER_ARPA_INET],
if test $ac_cv_header_arpa_inet_h = yes; then
HAVE_ARPA_INET_H=1
else
ARPA_INET_H='arpa/inet.h'
HAVE_ARPA_INET_H=0
fi
AC_SUBST([HAVE_ARPA_INET_H])
dnl Execute this unconditionally, because ARPA_INET_H may be set by other
dnl modules, after this code is executed.
dnl <arpa/inet.h> is always overridden, because of GNULIB_POSIXCHECK.
gl_CHECK_NEXT_HEADERS([arpa/inet.h])
dnl Check for declarations of anything we want to poison if the
dnl corresponding gnulib module is not in use.
gl_WARN_ON_USE_PREPARE([[
/* On some systems, this header is not self-consistent. */
#ifndef __GLIBC__
# include <sys/socket.h>
#endif
#include <arpa/inet.h>
]], [inet_ntop inet_pton])
])
dnl Unconditionally enables the replacement of <arpa/inet.h>.
AC_DEFUN([gl_REPLACE_ARPA_INET_H],
[
AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS])
ARPA_INET_H='arpa/inet.h'
dnl This is a no-op, because <arpa/inet.h> is always overridden.
:
])
AC_DEFUN([gl_ARPA_INET_MODULE_INDICATOR],
[
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS])
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
gl_MODULE_INDICATOR_SET_VARIABLE([$1])
])
AC_DEFUN([gl_ARPA_INET_H_DEFAULTS],
@ -46,5 +54,4 @@ AC_DEFUN([gl_ARPA_INET_H_DEFAULTS],
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_DECL_INET_NTOP=1; AC_SUBST([HAVE_DECL_INET_NTOP])
HAVE_DECL_INET_PTON=1; AC_SUBST([HAVE_DECL_INET_PTON])
ARPA_INET_H=''; AC_SUBST([ARPA_INET_H])
])

48
gl/m4/asm-underscore.m4 Normal file
View file

@ -0,0 +1,48 @@
# asm-underscore.m4 serial 1
dnl Copyright (C) 2010 Free Software Foundation, 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.
dnl From Bruno Haible. Based on as-underscore.m4 in GNU clisp.
# gl_ASM_SYMBOL_PREFIX
# Tests for the prefix of C symbols at the assembly language level and the
# linker level. This prefix is either an underscore or empty. Defines the
# C macro USER_LABEL_PREFIX to this prefix, and sets ASM_SYMBOL_PREFIX to
# a stringified variant of this prefix.
AC_DEFUN([gl_ASM_SYMBOL_PREFIX],
[
dnl We don't use GCC's __USER_LABEL_PREFIX__ here, because
dnl 1. It works only for GCC.
dnl 2. It is incorrectly defined on some platforms, in some GCC versions.
AC_CACHE_CHECK(
[whether C symbols are prefixed with underscore at the linker level],
[gl_cv_prog_as_underscore],
[cat > conftest.c <<EOF
#ifdef __cplusplus
extern "C" int foo (void);
#endif
int foo(void) { return 0; }
EOF
# Look for the assembly language name in the .s file.
AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -S conftest.c) >/dev/null 2>&1
if grep _foo conftest.s >/dev/null ; then
gl_cv_prog_as_underscore=yes
else
gl_cv_prog_as_underscore=no
fi
rm -f conftest*
])
if test $gl_cv_prog_as_underscore = yes; then
USER_LABEL_PREFIX=_
else
USER_LABEL_PREFIX=
fi
AC_DEFINE_UNQUOTED([USER_LABEL_PREFIX], [$USER_LABEL_PREFIX],
[Define to the prefix of C symbols at the assembler and linker level,
either an underscore or empty.])
ASM_SYMBOL_PREFIX='"'${USER_LABEL_PREFIX}'"'
AC_SUBST([ASM_SYMBOL_PREFIX])
])

View file

@ -1,5 +1,5 @@
# base64.m4 serial 3
dnl Copyright (C) 2004, 2006 Free Software Foundation, Inc.
dnl Copyright (C) 2004, 2006, 2009, 2010 Free Software Foundation, 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.

View file

@ -1,5 +1,5 @@
# btowc.m4 serial 4
dnl Copyright (C) 2008-2009 Free Software Foundation, Inc.
# btowc.m4 serial 6
dnl Copyright (C) 2008-2010 Free Software Foundation, 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.
@ -8,15 +8,49 @@ AC_DEFUN([gl_FUNC_BTOWC],
[
AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
dnl Check whether <wchar.h> is usable at all, first. Otherwise the test
dnl program below may lead to an endless loop. See
dnl <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42440>.
AC_REQUIRE([gl_WCHAR_H_INLINE_OK])
AC_CHECK_FUNCS_ONCE([btowc])
if test $ac_cv_func_btowc = no; then
HAVE_BTOWC=0
else
dnl IRIX 6.5 btowc(EOF) is 0xFF, not WEOF.
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([gt_LOCALE_FR])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
dnl Cygwin 1.7.2 btowc('\0') is WEOF, not 0.
AC_CACHE_CHECK([whether btowc(0) is correct],
[gl_cv_func_btowc_nul],
[
AC_TRY_RUN([
#include <stdio.h>
#include <string.h>
#include <wchar.h>
int main ()
{
if (btowc ('\0') != 0)
return 1;
return 0;
}],
[gl_cv_func_btowc_nul=yes],
[gl_cv_func_btowc_nul=no],
[
changequote(,)dnl
case "$host_os" in
# Guess no on Cygwin.
cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
# Guess yes otherwise.
*) gl_cv_func_btowc_nul="guessing yes" ;;
esac
changequote([,])dnl
])
])
dnl IRIX 6.5 btowc(EOF) is 0xFF, not WEOF.
AC_CACHE_CHECK([whether btowc(EOF) is correct],
[gl_cv_func_btowc_eof],
[
@ -50,6 +84,11 @@ int main ()
[:])
fi
])
case "$gl_cv_func_btowc_nul" in
*yes) ;;
*) REPLACE_BTOWC=1 ;;
esac
case "$gl_cv_func_btowc_eof" in
*yes) ;;
*) REPLACE_BTOWC=1 ;;

View file

@ -1,6 +1,6 @@
# c-strtod.m4 serial 11
# Copyright (C) 2004, 2005, 2006, 2009 Free Software Foundation, Inc.
# Copyright (C) 2004-2006, 2009-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

View file

@ -1,5 +1,5 @@
#serial 6
dnl Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
dnl Copyright (C) 2004-2006, 2009-2010 Free Software Foundation, 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.

View file

@ -1,5 +1,5 @@
# codeset.m4 serial 4 (gettext-0.18)
dnl Copyright (C) 2000-2002, 2006, 2008, 2009 Free Software Foundation, Inc.
dnl Copyright (C) 2000-2002, 2006, 2008-2010 Free Software Foundation, 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.

View file

@ -1,18 +1,26 @@
#serial 7 -*- autoconf -*-
dnl Copyright (C) 2002-2006 Free Software Foundation, Inc.
#serial 8 -*- autoconf -*-
dnl Copyright (C) 2002-2006, 2009-2010 Free Software Foundation, 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_DIRNAME],
[
AC_REQUIRE([gl_DIRNAME_LGPL])
AC_LIBOBJ([basename])
AC_LIBOBJ([dirname])
])
AC_DEFUN([gl_DIRNAME_LGPL],
[
AC_LIBOBJ([basename-lgpl])
AC_LIBOBJ([dirname-lgpl])
AC_LIBOBJ([stripslash])
dnl Prerequisites of lib/dirname.h.
AC_REQUIRE([gl_AC_DOS])
AC_REQUIRE([gl_DOUBLE_SLASH_ROOT])
dnl No prerequisites of lib/basename.c, lib/dirname.c, lib/stripslash.c.
dnl No prerequisites of lib/basename-lgpl.c, lib/dirname-lgpl.c,
dnl lib/stripslash.c.
])

View file

@ -1,9 +1,9 @@
#serial 10 -*- autoconf -*-
#serial 11 -*- autoconf -*-
# Define some macros required for proper operation of code in lib/*.c
# on MSDOS/Windows systems.
# Copyright (C) 2000, 2001, 2004, 2005, 2006 Free Software Foundation, Inc.
# Copyright (C) 2000-2001, 2004-2006, 2009-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -14,10 +14,10 @@ AC_DEFUN([gl_AC_DOS],
[
AC_CACHE_CHECK([whether system is Windows or MSDOS], [ac_cv_win_or_dos],
[
AC_TRY_COMPILE([],
[#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __CYGWIN__
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[
#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __CYGWIN__
neither MSDOS nor Windows
#endif],
#endif]])],
[ac_cv_win_or_dos=yes],
[ac_cv_win_or_dos=no])
])
@ -28,10 +28,10 @@ neither MSDOS nor Windows
AC_CACHE_CHECK([whether drive letter can start relative path],
[ac_cv_drive_letter_can_be_relative],
[
AC_TRY_COMPILE([],
[#if defined __CYGWIN__
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[
#if defined __CYGWIN__
drive letters are always absolute
#endif],
#endif]])],
[ac_cv_drive_letter_can_be_relative=yes],
[ac_cv_drive_letter_can_be_relative=no])
])

View file

@ -1,5 +1,5 @@
# double-slash-root.m4 serial 4 -*- Autoconf -*-
dnl Copyright (C) 2006, 2008, 2009 Free Software Foundation, Inc.
dnl Copyright (C) 2006, 2008-2010 Free Software Foundation, 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.

58
gl/m4/dup2.m4 Normal file
View file

@ -0,0 +1,58 @@
#serial 10
dnl Copyright (C) 2002, 2005, 2007, 2009-2010 Free Software Foundation, 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_FUNC_DUP2],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
AC_REQUIRE([AC_CANONICAL_HOST])
AC_CHECK_FUNCS_ONCE([dup2])
if test $ac_cv_func_dup2 = no; then
HAVE_DUP2=0
AC_LIBOBJ([dup2])
else
AC_CACHE_CHECK([whether dup2 works], [gl_cv_func_dup2_works],
[AC_RUN_IFELSE([
AC_LANG_PROGRAM([[#include <unistd.h>
#include <errno.h>]],
[if (dup2 (1, 1) == 0)
return 1;
close (0);
if (dup2 (0, 0) != -1)
return 2;
/* Many gnulib modules require POSIX conformance of EBADF. */
if (dup2 (1, 1000000) == -1 && errno != EBADF)
return 3;
return 0;
])
],
[gl_cv_func_dup2_works=yes], [gl_cv_func_dup2_works=no],
[case "$host_os" in
mingw*) # on this platform, dup2 always returns 0 for success
gl_cv_func_dup2_works=no;;
cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
gl_cv_func_dup2_works=no;;
linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
# closed fd may yield -EBADF instead of -1 / errno=EBADF.
gl_cv_func_dup2_works=no;;
freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
gl_cv_func_dup2_works=no;;
*) gl_cv_func_dup2_works=yes;;
esac])
])
if test "$gl_cv_func_dup2_works" = no; then
gl_REPLACE_DUP2
fi
fi
])
AC_DEFUN([gl_REPLACE_DUP2],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
if test $ac_cv_func_dup2 = yes; then
REPLACE_DUP2=1
fi
AC_LIBOBJ([dup2])
])

32
gl/m4/eealloc.m4 Normal file
View file

@ -0,0 +1,32 @@
# eealloc.m4 serial 2
dnl Copyright (C) 2003, 2009, 2010 Free Software Foundation, 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_EEALLOC],
[
AC_REQUIRE([gl_EEMALLOC])
AC_REQUIRE([gl_EEREALLOC])
AC_REQUIRE([AC_C_INLINE])
])
AC_DEFUN([gl_EEMALLOC],
[
_AC_FUNC_MALLOC_IF(
[gl_cv_func_malloc_0_nonnull=1],
[gl_cv_func_malloc_0_nonnull=0])
AC_DEFINE_UNQUOTED([MALLOC_0_IS_NONNULL], [$gl_cv_func_malloc_0_nonnull],
[If malloc(0) is != NULL, define this to 1. Otherwise define this
to 0.])
])
AC_DEFUN([gl_EEREALLOC],
[
_AC_FUNC_REALLOC_IF(
[gl_cv_func_realloc_0_nonnull=1],
[gl_cv_func_realloc_0_nonnull=0])
AC_DEFINE_UNQUOTED([REALLOC_0_IS_NONNULL], [$gl_cv_func_realloc_0_nonnull],
[If realloc(NULL,0) is != NULL, define this to 1. Otherwise define this
to 0.])
])

36
gl/m4/environ.m4 Normal file
View file

@ -0,0 +1,36 @@
# environ.m4 serial 4
dnl Copyright (C) 2001-2004, 2006-2010 Free Software Foundation, 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_ONCE([gl_ENVIRON],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
dnl Persuade glibc <unistd.h> to declare environ.
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
gt_CHECK_VAR_DECL([#include <unistd.h>], environ)
if test $gt_cv_var_environ_declaration != yes; then
HAVE_DECL_ENVIRON=0
fi
])
# Check if a variable is properly declared.
# gt_CHECK_VAR_DECL(includes,variable)
AC_DEFUN([gt_CHECK_VAR_DECL],
[
define([gt_cv_var], [gt_cv_var_]$2[_declaration])
AC_MSG_CHECKING([if $2 is properly declared])
AC_CACHE_VAL([gt_cv_var], [
AC_TRY_COMPILE([$1
extern struct { int foo; } $2;],
[$2.foo = 1;],
gt_cv_var=no,
gt_cv_var=yes)])
AC_MSG_RESULT([$gt_cv_var])
if test $gt_cv_var = yes; then
AC_DEFINE([HAVE_]m4_translit($2, [a-z], [A-Z])[_DECL], 1,
[Define if you have the declaration of $2.])
fi
undefine([gt_cv_var])
])

View file

@ -1,5 +1,5 @@
# errno_h.m4 serial 5
dnl Copyright (C) 2004, 2006, 2008, 2009 Free Software Foundation, Inc.
# errno_h.m4 serial 6
dnl Copyright (C) 2004, 2006, 2008, 2009, 2010 Free Software Foundation, 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.
@ -34,6 +34,9 @@ booboo
#if !defined ENOTSUP
booboo
#endif
#if !defined ESTALE
booboo
#endif
#if !defined ECANCELED
booboo
#endif

View file

@ -1,7 +1,6 @@
#serial 11
#serial 12
# Copyright (C) 1996, 1997, 1998, 2001, 2002, 2003, 2004 Free Software
# Foundation, Inc.
# Copyright (C) 1996-1998, 2001-2004, 2009-2010 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -18,5 +17,6 @@ AC_DEFUN([gl_ERROR],
AC_DEFUN([gl_PREREQ_ERROR],
[
AC_REQUIRE([AC_FUNC_STRERROR_R])
AC_REQUIRE([AC_C_INLINE])
:
])

View file

@ -1,13 +0,0 @@
# exitfail.m4 serial 6
dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, 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_EXITFAIL],
[
AC_LIBOBJ([exitfail])
dnl No prerequisites of lib/exitfail.c.
:
])

View file

@ -1,7 +1,7 @@
# serial 8 -*- Autoconf -*-
# serial 9 -*- Autoconf -*-
# Enable extensions on systems that normally disable them.
# Copyright (C) 2003, 2006-2009 Free Software Foundation, Inc.
# Copyright (C) 2003, 2006-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -12,6 +12,20 @@
# enough in this area it's likely we'll need to redefine
# AC_USE_SYSTEM_EXTENSIONS for quite some time.
# If autoconf reports a warning
# warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
# or warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
# the fix is
# 1) to ensure that AC_USE_SYSTEM_EXTENSIONS is never directly invoked
# but always AC_REQUIREd,
# 2) to ensure that for each occurrence of
# AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
# or
# AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
# the corresponding gnulib module description has 'extensions' among
# its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS
# invocation occurs in gl_EARLY, not in gl_INIT.
# AC_USE_SYSTEM_EXTENSIONS
# ------------------------
# Enable extensions on systems that normally disable them,

81
gl/m4/fcntl-o.m4 Normal file
View file

@ -0,0 +1,81 @@
# fcntl-o.m4 serial 1
dnl Copyright (C) 2006, 2009-2010 Free Software Foundation, 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.
dnl Written by Paul Eggert.
# Test whether the flags O_NOATIME and O_NOFOLLOW actually work.
# Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise.
# Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise.
AC_DEFUN([gl_FCNTL_O_FLAGS],
[
dnl Persuade glibc <fcntl.h> to define O_NOATIME and O_NOFOLLOW.
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h],
[AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
[[#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#ifndef O_NOATIME
#define O_NOATIME 0
#endif
#ifndef O_NOFOLLOW
#define O_NOFOLLOW 0
#endif
static int const constants[] =
{
O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
};
]],
[[
int status = !constants;
{
static char const sym[] = "conftest.sym";
if (symlink (".", sym) != 0
|| close (open (sym, O_RDONLY | O_NOFOLLOW)) == 0)
status |= 32;
unlink (sym);
}
{
static char const file[] = "confdefs.h";
int fd = open (file, O_RDONLY | O_NOATIME);
char c;
struct stat st0, st1;
if (fd < 0
|| fstat (fd, &st0) != 0
|| sleep (1) != 0
|| read (fd, &c, 1) != 1
|| close (fd) != 0
|| stat (file, &st1) != 0
|| st0.st_atime != st1.st_atime)
status |= 64;
}
return status;]])],
[gl_cv_header_working_fcntl_h=yes],
[case $? in #(
32) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
96) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
*) gl_cv_header_working_fcntl_h='no';;
esac],
[gl_cv_header_working_fcntl_h=cross-compiling])])
case $gl_cv_header_working_fcntl_h in #(
*O_NOATIME* | no | cross-compiling) ac_val=0;; #(
*) ac_val=1;;
esac
AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOATIME], [$ac_val],
[Define to 1 if O_NOATIME works.])
case $gl_cv_header_working_fcntl_h in #(
*O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
*) ac_val=1;;
esac
AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOFOLLOW], [$ac_val],
[Define to 1 if O_NOFOLLOW works.])
])

View file

@ -1,5 +1,5 @@
#serial 5
dnl Copyright (C) 2005-2007 Free Software Foundation, Inc.
#serial 7
dnl Copyright (C) 2005-2007, 2009-2010 Free Software Foundation, 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.
@ -8,4 +8,12 @@ AC_DEFUN([gl_FCNTL_SAFER],
[
AC_LIBOBJ([open-safer])
AC_LIBOBJ([creat-safer])
# Prerequisites of lib/open-safer.c.
AC_REQUIRE([gl_PROMOTED_TYPE_MODE_T])
])
AC_DEFUN([gl_OPENAT_SAFER],
[
AC_REQUIRE([gl_FCNTL_SAFER])
AC_LIBOBJ([openat-safer])
])

Some files were not shown because too many files have changed in this diff Show more