Imported Upstream version 1.4.12

This commit is contained in:
Jan Wagner 2013-11-26 23:55:28 +01:00
parent 1d1585cd09
commit 4ab9f0d24c
291 changed files with 27277 additions and 11364 deletions

12
BUGS
View file

@ -4,13 +4,19 @@ necessarily verified as errors.
For the 1.4.11 release:
1724055 - check_dns: does not sort address data
1939578 - check_jabber: Always returns WARNING with Openfire server
1939529 - check_tcp: Expiring SSL certs produce confusing messages
1928399 - check_porcs METRIC_CPU should ignore kernel processes on FreeBSD
1922579 - check_ldap: ldap_init implicitly converted
1904965 - check_apt: SECURITY_RE is not correct
1894850 - check_ping: incorrectly parses ping6 output
1868822 - check_http link fails with openssl installed
1867716 - check_snmp invalid performance data
1864404 - check_smtp/check_http miscalculate timezones in cert expiry
1681516 - output too verbose for various checks
1670261 - check_snmp might require snmpget with LD_LIBRARY_PATH
1569488 - check_ifoperstatus.pl: -n option does't work (help required!)
1523748 - check_disk should error if warn range is subset of critical
1498923 - check_ldap build error on Solaris 9
1480574 - check_disk missing -lm on Solaris
1478287 - check_dns fails with CNAMEs
1469468 - signal handler in popen.c is broken
1381604 - Perlsec breaks any perl plugin with perl 5.8.x

798
ChangeLog
View file

@ -1,3 +1,799 @@
2008-05-27 21:52 tonvoon
* [r2003] THANKS.in, configure.in:
Not picking up solaris systems correctly for check_dhcp. Only
affected SunStudio compiles of check_dhcp (1890260 - Rob Windsor)
2008-05-27 21:31 tonvoon
* [r2002] plugins/check_by_ssh.c:
Addition to help to state that -f will always return OK if ssh
command is executed (Alain Dewit - 1852198)
2008-05-27 13:35 tonvoon
* [r2001] plugins-root/pst3.c:
Add additional PID column heading
2008-05-26 09:43 dermoth
* [r2000] NEWS:
correct typo in NEWS
2008-05-23 09:09 dermoth
* [r1999] REQUIREMENTS:
Add a note about radiusclient
2008-05-22 08:25 dermoth
* [r1998] NEWS, configure.in:
Fix linking against OpenSSL where libdl is required
2008-05-21 08:57 dermoth
* [r1997] NEWS, plugins/check_by_ssh.c, plugins/t/check_by_ssh.t:
Fixed passive option in check_by_ssh Also: - On non-skipped
stderr, check_by_ssh now returns UNKNOWN or worse (result from
command) instead of always UNKNOWN. - Fixed passive tests and
make is always run the specified number of tests (using fail if
there's nothing to test).
2008-05-20 11:37 dermoth
* [r1996] plugins/t/check_by_ssh.t:
Oops - forgot to remove the SKIP block (which didn't seem to work
fine)
2008-05-20 11:32 dermoth
* [r1995] plugins/t/check_by_ssh.t:
Add check_by_ssh tests (passive checks are broken - should be
fixed before next release!)
2008-05-20 07:57 dermoth
* [r1994] NEWS, plugins/check_radius.c:
Clobber password in check_radius process list aguments
2008-05-13 09:14 dermoth
* [r1992] plugins/check_dns.c:
Typo
2008-05-07 10:02 dermoth
* [r1991] 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:
Added support for --extra-opts in all C plugins (disabled by
default, see configure --help)
2008-05-07 10:01 dermoth
* [r1990] NEWS, THANKS.in, plugins/check_ping.c:
Added performance data to check_ping (Christian Schneemann)
2008-05-02 09:28 dermoth
* [r1989] NEWS, plugins/negate.c:
negate now has the ability to replace the status text as well
(-s, --substitute) Also changed: - default timeout to 11 instead
of 9 (since it's recommended to have a higher timeout, and many
plugins default to 10 seconds) - If there's no STDOUT lines
returned, still returns the returned result if it's NON-ok
instead of forcing it to UNKNOWN
2008-04-30 12:50 dermoth
* [r1988] NEWS, plugins/check_mysql.c, plugins/check_mysql_query.c,
plugins/t/check_mysql.t:
Add socket support to check_mysql* Also clears the password from
check_mysql command-line options
2008-04-29 14:54 hweiss
* [r1987] configure.in:
Support "--without-pgsql" (reported by Alex Songe via IRC).
2008-04-29 09:01 dermoth
* [r1986] plugins/check_ntp.c, plugins/check_ntp_peer.c,
plugins/check_ntp_time.c:
Use UT_THRESHOLDS_NOTES in all plugins
2008-04-29 09:01 dermoth
* [r1985] plugins-root/check_dhcp.c, plugins-root/check_icmp.c:
--help output cleanup (plus removal of spaces on blank lines)
2008-04-27 14:35 dermoth
* [r1984] 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_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_snmp.c, plugins/check_swap.c, plugins/check_ups.c,
plugins/utils.h:
--help output cleanup (plus removal of spaces on blank lines)
2008-04-23 08:19 dermoth
* [r1983] plugins/check_radius.c:
Correct typo and make the --help notes a bit simpler.
2008-04-17 10:46 dermoth
* [r1979] plugins/check_dns.c:
Correct the help text
2008-04-17 10:37 dermoth
* [r1978] NEWS, plugins/check_dns.c:
Allow to repeat -a to set multiple possible addresses
2008-04-05 08:02 dermoth
* [r1977] NEWS, plugins/check_ntp.c, plugins/check_ntp_peer.c:
check_ntp and check_ntp_peer now show proper jitter/stratum
thresholds longopts in --help
2008-04-04 10:11 dermoth
* [r1976] lib/extra_opts.c, lib/parse_ini.c, lib/tests/test_ini.c,
lib/tests/test_opts.c:
make parse_ini die like in N::P if section isn't found
2008-04-02 09:19 dermoth
* [r1974] lib/Makefile.config-opts, lib/tests/Makefile.config-opts:
Delete obsolete files
2008-04-02 09:11 dermoth
* [r1973] configure.in, lib/Makefile.am, lib/parse_ini.c,
lib/tests/Makefile.am, lib/tests/test_ini.t,
lib/tests/test_opts.t, po/de.po, po/fr.po, po/nagios-plugins.pot:
- Add --enable-extra-opts configure option for compiling
extra-opts support - Auto-update po/pot files
2008-04-01 09:38 dermoth
* [r1972] lib/parse_ini.c:
fix the obvious...
2008-04-01 09:31 dermoth
* [r1971] lib/extra_opts.c, lib/extra_opts.h:
np_extra_opts now retain pointers from argv so that plugins can
still overwrite sensitive options
2008-03-31 07:07 dermoth
* [r1970] gl:
update svn:ignore property (last gnulib update added many
auto-generated files)
2008-03-31 07:04 dermoth
* [r1969] lib/extra_opts.c, lib/tests/test_opts.c:
Fix bug with --extra-opts as last argument with no value Fix
problem with duplicate function name (function should eventually
move to /lib)
2008-03-31 05:31 dermoth
* [r1968] lib/extra_opts.c, lib/extra_opts.h, lib/parse_ini.c,
lib/parse_ini.h, lib/tests/test_ini.c, lib/tests/test_opts.c:
Fix for last commit - I accidentaly broke my local Makefile and
tests weren't being re-compiled.
2008-03-30 14:02 dermoth
* [r1967] lib/extra_opts.c, lib/extra_opts.h,
lib/tests/test_opts.c:
- Remove the last argument of np_extra_opts - Code cleanups and
comments
2008-03-29 15:35 dermoth
* [r1966] lib/tests:
Update svn:ignore property
2008-03-26 09:46 dermoth
* [r1962] lib/parse_ini.c, lib/parse_ini.h, lib/tests/plugins.ini,
lib/tests/test_opts.c:
write ini-file lookup function + tests
2008-03-24 07:02 dermoth
* [r1961] lib/extra_opts.c, lib/extra_opts.h,
lib/tests/config-opts.ini, lib/tests/test_opts.c,
lib/tests/test_opts.t:
Add extra-opts argument parsing with tests
2008-03-24 06:28 dermoth
* [r1960] lib/parse_ini.c, lib/parse_ini.h:
Replace broken usage of NAGIOS_CONFIG_PATH with a stub function
(that will try to find a config file in the future...) Allow NULL
locator (default file/section)
2008-03-20 11:53 dermoth
* [r1959] plugins/check_dig.c:
- Fix bug #1920671 - Make --help output looks nice
2008-03-18 10:59 tonvoon
* [r1955] plugins/tests/check_procs.t:
Include test for check_procs, using input file
2008-03-18 01:21 tonvoon
* [r1954] plugins/check_procs.c, plugins/tests/var,
plugins/tests/var/ps-axwo.darwin,
plugins/tests/var/ps_axwo.debian:
Updated check_procs with a hidden --input-file option. Include
some sample outputs for testing
2008-03-17 23:08 tonvoon
* [r1953] plugins/t/check_nagios.t:
Don't run check_nagios tests on Solaris, because of pst3
requirement
2008-03-16 18:10 dermoth
* [r1951] lib/tests/config-dos.ini, lib/tests/plugin.ini,
lib/tests/test_ini.c:
Add tests: - DOS-newline ini file - section defined twice
2008-03-15 22:42 dermoth
* [r1950] lib/parse_ini.c:
parse_ini now reads the default section if the request one can't
be found. All tests should return ok now.
2008-03-15 21:51 dermoth
* [r1949] lib/parse_ini.c:
Oops - this line shouldn't have been here (doesn't even work
anyways) ;)
2008-03-15 20:47 dermoth
* [r1948] lib/parse_ini.c, lib/tests/plugin.ini,
lib/tests/test_ini.c:
- Make equal-less parameters illegal - parameters without
argument after '=' are now assumed to be argument-less - Add a
testcase for space in stanza and various argument-less parameters
2008-03-15 20:34 dermoth
* [r1947] lib/parse_ini.c:
Fix handling of leading and trailing spaces in stanza
2008-03-15 16:17 dermoth
* [r1946] lib/parse_ini.c, lib/tests/test_ini.c:
Fix segfault in test_ini.c and uncomment the affected tests Fix
bug in stanza parsing where full section could be skipped Fix
single-argument options
2008-03-15 04:51 dermoth
* [r1945] lib/parse_ini.c, lib/parse_ini.h, lib/tests/test_ini.c,
lib/tests/test_ini.t:
This commit consist of two changes: 1. Make np_get_defaults
return a linked list instead of a string. It will then be easy to
convert the linked list back to an argument array. 2. Fix tests
3-4 of test_ini.c.
A test_ini.t was added too. parse_ini and test_ini aren't
included yet in the build makefiles.
2008-03-15 00:14 psychotrahe
* [r1944] plugins/check_http.c:
Add port to Host Header to prevent problems with non default
ports (Christophe Dupre #1881898)
2008-03-14 23:47 psychotrahe
* [r1943] NEWS, plugins/check_dig.c:
Added -A/--dig-arguments to check_dig (#1889453/#1874041)
2008-03-14 22:35 psychotrahe
* [r1942] plugins/check_smtp.c:
Enhanced check_smtp to actually print invalid response text
(#1911239)
2008-03-14 15:44 tonvoon
* [r1941] NEWS, plugins-root/Makefile.am, plugins/Makefile.am:
Fixed 64 bit pst3 when tries to link to gettext. Gettext linked
dynamically, if necessary
2008-03-14 10:17 dermoth
* [r1940] gl/charset.alias, gl/configmake.h, gl/math.h,
gl/ref-add.sed, gl/ref-del.sed, gl/stdio.h, gl/stdlib.h,
gl/string.h, gl/unistd.h:
These files are generated automatically during the make process,
and removed by make clean.
2008-03-11 00:37 tonvoon
* [r1939] configure.in, gl/m4/mbstate_t.m4:
Possible fix for HP-UX compile problems of regex_internal.c
2008-03-11 00:10 tonvoon
* [r1938] configure.in, lib/utils_base.c, plugins-root/Makefile.am,
plugins/check_http.c, plugins/check_smtp.c, plugins/common.h:
Fixed link -m64 problems on pst3 for solaris. Fixed
_FILE_OFFSET_BITS redefinition warnings. Fixed helper ar error in
./configure
2008-02-28 16:21 tonvoon
* [r1937] NEWS, configure.in, plugins-root/Makefile.am,
plugins-root/pst3.c, plugins/check_procs.c,
plugins/t/check_procs.t:
Reverted check_procs for solaris back to using pst3 due to
truncation for argument fields using other methods
2008-02-28 12:54 tonvoon
* [r1936] tools/build_perl_modules:
Fix where PERL5LIB is blank
2008-02-18 11:23 tonvoon
* [r1935] NEWS:
Added CVE MITRE tracking number
2008-02-13 20:36 psychotrahe
* [r1934] NEWS, plugins/check_pgsql.c:
check_pgsql now builds with postgres lib v8.3 (Jan Wagner
#1878972)
2008-02-13 19:14 psychotrahe
* [r1933] plugins/check_disk.c:
Fix --local argument handling (Jan Wagner #1878971)
2008-02-13 15:10 dermoth
* [r1932] plugins/check_disk.c:
Fix broken intending (The whole file use spaces only except my
last patch and 1-3 other places).
2008-02-13 11:37 dermoth
* [r1931] gl:
Add two files to svn:ignore
2008-02-13 11:05 dermoth
* [r1930] lib/utils_base.c, plugins/check_disk.c:
set_thresholds now let the user free the thresolds. (P.S.: When
you set twice the thresholds for a path in check disk (like using
-C followed by -p ) it overrides them. All new elements are
created with np_add_parameter which initialises the thresholds to
NULL.)
2008-02-13 04:18 dermoth
* [r1929] NEWS:
News, nothing else.
2008-02-13 04:16 dermoth
* [r1928] plugins/common.h:
This floorf workaround is Nnot needed anymore since floorf is
part of Gnulib
2008-02-13 04:07 dermoth
* [r1927] lib/tests/test_base64.c:
Reverting patch to test 8-bit data: Still broken on Solaris
(7-bit works as before)
2008-02-12 12:03 dermoth
* [r1926] gl/Makefile.am, gl/base64.c, gl/base64.h,
gl/charset.alias, gl/configmake.h, gl/floor.c, gl/floorf.c,
gl/m4/base64.m4, gl/m4/floorf.m4, gl/m4/gnulib-cache.m4,
gl/m4/gnulib-comp.m4, gl/m4/math_h.m4, gl/math.h, gl/math.in.h,
gl/ref-add.sed, gl/ref-del.sed, gl/stdio.h, gl/stdlib.h,
gl/string.h, gl/unistd.h, lib/Makefile.am, lib/base64.c,
lib/base64.h, lib/tests/Makefile.am, lib/tests/test_base64.c,
plugins/check_http.c, plugins/check_smtp.c:
Import Gnulib floorf and base64 and removed our old base64
library.
2008-02-12 11:07 dermoth
* [r1925] build-aux/config.rpath, build-aux/link-warning.h,
gl/Makefile.am, gl/alloca.c, gl/alloca.in.h, gl/alloca_.h,
gl/asnprintf.c, gl/asprintf.c, gl/basename.c, gl/c-strtod.c,
gl/cloexec.c, gl/config.charset, gl/creat-safer.c, gl/dirname.c,
gl/dirname.h, gl/dup-safer.c, gl/error.c, gl/error.h, gl/exit.h,
gl/exitfail.c, gl/exitfail.h, gl/fcntl--.h, gl/fcntl-safer.h,
gl/fd-safer.c, gl/float+.h, gl/float.in.h, 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/getaddrinfo.h, gl/gethostname.c, gl/getloadavg.c, gl/getopt.c,
gl/getopt.in.h, gl/getopt1.c, gl/getopt_.h, gl/getopt_int.h,
gl/gettext.h, gl/inet_ntop.c, gl/inet_ntop.h, gl/intprops.h,
gl/localcharset.c, gl/localcharset.h, gl/m4/absolute-header.m4,
gl/m4/alloca.m4, gl/m4/extensions.m4, gl/m4/float_h.m4,
gl/m4/fsusage.m4, gl/m4/getaddrinfo.m4, gl/m4/getloadavg.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/include_next.m4,
gl/m4/intdiv0.m4, gl/m4/intl.m4, gl/m4/intlmacosx.m4,
gl/m4/intmax_t.m4, gl/m4/lib-link.m4, gl/m4/localcharset.m4,
gl/m4/lock.m4, gl/m4/longdouble.m4, gl/m4/longlong.m4,
gl/m4/malloc.m4, gl/m4/mbchar.m4, gl/m4/mbiter.m4,
gl/m4/mbrtowc.m4, gl/m4/memchr.m4, gl/m4/minmax.m4,
gl/m4/netinet_in_h.m4, gl/m4/po.m4, gl/m4/printf-posix.m4,
gl/m4/regex.m4, gl/m4/snprintf.m4, gl/m4/socklen.m4,
gl/m4/stdint.m4, gl/m4/stdio_h.m4, gl/m4/stdlib_h.m4,
gl/m4/strcase.m4, gl/m4/strdup.m4, gl/m4/strerror.m4,
gl/m4/string_h.m4, gl/m4/strndup.m4, gl/m4/strnlen.m4,
gl/m4/sys_socket_h.m4, gl/m4/uintmax_t.m4, gl/m4/ulonglong.m4,
gl/m4/unistd_h.m4, gl/m4/vasnprintf.m4, gl/m4/vasprintf.m4,
gl/m4/vsnprintf.m4, gl/m4/wchar.m4, gl/m4/wctype.m4,
gl/m4/wcwidth.m4, gl/m4/wint_t.m4, gl/malloc.c, gl/mbchar.c,
gl/mbchar.h, gl/mbuiter.h, gl/memchr.c, gl/minmax.h,
gl/mountlist.c, gl/mountlist.h, gl/netinet_in.in.h,
gl/open-safer.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/snprintf.h,
gl/socket_.h, gl/stdbool.in.h, gl/stdbool_.h, gl/stdint.in.h,
gl/stdint_.h, gl/stdio.in.h, gl/stdlib.in.h, gl/strcase.h,
gl/strcasecmp.c, gl/strdup.c, gl/strdup.h, gl/strerror.c,
gl/string.in.h, gl/stripslash.c, gl/strncasecmp.c, gl/strndup.c,
gl/strndup.h, gl/strnlen.c, gl/strnlen.h, gl/strnlen1.c,
gl/strnlen1.h, gl/sys_socket.in.h, gl/unistd--.h,
gl/unistd-safer.h, gl/unistd.in.h, gl/unistd_.h, gl/vasnprintf.c,
gl/vasnprintf.h, gl/vasprintf.c, gl/vasprintf.h, gl/vsnprintf.c,
gl/vsnprintf.h, gl/wchar.in.h, gl/wchar_.h, gl/wctype.in.h,
gl/wctype_.h, gl/wcwidth.h, gl/xalloc-die.c, gl/xalloc.h,
gl/xmalloc.c, gl/xsize.h, gl/xstrndup.c, gl/xstrndup.h,
plugins/common.h, po/Makevars:
Sync to latest Gnulib
2008-02-11 21:36 tonvoon
* [r1924] REQUIREMENTS:
Hints re: SSL features
2008-02-11 21:23 tonvoon
* [r1923] configure.in:
Added link to FAQ for redhat spopen problem
2008-01-31 11:52 dermoth
* [r1920] plugins-root/check_dhcp.c, plugins-root/check_icmp.c,
plugins-root/pst3.c:
Bump plugins-root/ to GPLv3
2008-01-31 11:45 dermoth
* [r1919] plugins/common.h, plugins/netutils.h, plugins/popen.h,
plugins/runcmd.h:
Bump plugins/ to GPLv3 (header files)
2008-01-31 11:27 dermoth
* [r1918] plugins/negate.c, plugins/netutils.c, plugins/popen.c,
plugins/runcmd.c, plugins/sslutils.c, plugins/urlize.c,
plugins/utils.c:
Bump plugins/ to GPLv3 (non-plugind files)
2008-01-31 10:44 dermoth
* [r1917] 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:
Bump plugin/ to GPLv3 (check_overcr to check_users)
2008-01-30 10:53 dermoth
* [r1916] 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:
Bump plugins/ to GPLv3 (check_apt to check_nwstat)
2008-01-30 09:46 dermoth
* [r1915] lib/utils_disk.c, lib/utils_tcp.c:
details...
2008-01-30 09:38 dermoth
* [r1914] lib/tests/test_base64.c, lib/tests/test_cmd.c,
lib/tests/test_disk.c, lib/tests/test_ini.c,
lib/tests/test_tcp.c, lib/tests/test_utils.c:
Bump lib/tests to GPLv3
2008-01-30 09:33 dermoth
* [r1913] lib/parse_ini.c, lib/utils_base.c, lib/utils_cmd.c,
lib/utils_disk.c, lib/utils_tcp.c:
Bump /lib to GPLv3
2008-01-30 09:03 dermoth
* [r1912] lib/parse_ini.c:
new standardized GPLv3 header (will be applied to all C files)
2008-01-29 10:27 dermoth
* [r1911] NEWS, plugins/check_ntp_peer.c:
check_ntp_peer now checks for the LI_ALARM flag
2008-01-29 08:55 dermoth
* [r1910] NEWS:
typo
2008-01-29 08:54 dermoth
* [r1909] NEWS, plugins/check_ntp.c, plugins/check_ntp_time.c:
Fix bugs and flaws in best offset server selection of
check_ntp_time and (deprecated) check_ntp
2008-01-26 15:55 dermoth
* [r1908] NEWS, THANKS.in, plugins/check_ntp_peer.c,
plugins/check_ntp_time.c:
Fix help text of check_ntp_* (Bug #1880095)
2008-01-15 11:34 dermoth
* [r1907] NEWS, plugins/check_disk.c:
Fix check_disk disk usage calculation when using --group=NAME
(related to bug #1348746)
2008-01-15 09:40 dermoth
* [r1906] NEWS, configure.in:
Add AC_SYS_LARGEFILE to configure.in (check_disk should now work
with large file systems (2TB+) on all archs that supports it)
2008-01-10 07:49 dermoth
* [r1905] lib/tests/test_cmd.c:
Add a return-code check (also test cmd_run without out/err
buffers)
2008-01-09 04:27 dermoth
* [r1904] tools/tinderbox_build:
make test-debug generate lots of false errors in tinderbox.
Turning off until we find a solution (so al least we can watch
the tinderbox for breakages again)
2008-01-08 23:08 psychotrahe
* [r1903] plugins/check_dns.c:
Fixed reverse lookup damaged by previous commit
2008-01-08 16:05 tonvoon
* [r1902] plugins/t/check_dns.t:
Changed default test values for check_dns (using nagios.com)
2008-01-08 11:57 tonvoon
* [r1901] plugins/t/check_ftp.t, plugins/t/check_imap.t,
plugins/t/check_jabber.t, plugins/t/check_pop.t,
plugins/t/check_tcp.t:
Reverted commits 1898 and 1899 due to reversion of 1879
2008-01-08 11:51 tonvoon
* [r1900] NEWS, plugins/check_tcp.c:
Reverted commit 1879 where an invalid hostname returns UNKNOWN -
back to CRITICAL
2008-01-08 11:35 dermoth
* [r1899] plugins/t/check_imap.t, plugins/t/check_jabber.t,
plugins/t/check_pop.t:
more r1879 fixes
2008-01-08 11:27 dermoth
* [r1898] plugins/t/check_ftp.t, plugins/t/check_tcp.t:
Fix test breakages for commit r1879: check_tcp now returns
UNKNOWN with an invalid hostname on command line
2008-01-08 02:06 hweiss
* [r1897] plugins-root/check_icmp.c:
Hide some debug output which was printed even without "-v" (under
certain circumstances).
2008-01-08 01:51 hweiss
* [r1896] plugins-root/check_icmp.c:
Fix the handling of ICMP packets which are not echo replies (such
as destination unreachable messages) or which are not directed at
us.
2008-01-08 01:43 hweiss
* [r1895] plugins-root/check_icmp.c:
Get rid of a cast which increases the required alignment.
2008-01-08 01:40 hweiss
* [r1894] plugins-root/check_icmp.c:
Mark some constant strings "const".
2008-01-07 02:04 hweiss
* [r1893] plugins/netutils.c:
Support "[IPv6]" address syntax.
2008-01-07 01:59 hweiss
* [r1892] plugins/check_http.c:
My assumption that "-H example.com:80" didn't work (see my
previous commit) was wrong, it worked if used together with "-I".
So, here's support for "-H [IPv6]:port", "-H [IPv6]", "-H IPv6",
"-H IPv4:port", "-H IPv4", and "-H host:port".
2008-01-06 19:45 hweiss
* [r1891] plugins/check_http.c:
Remove support for specifying the port number using "-H
example.com:80". Since this didn't work anyway (because ":80"
wasn't stripped from the "host_name" after extracting the
"server_port"), nobody can be using this syntax, and it prevents
"-H" from accepting IPv6 addresses (neufeind - 1865082). IMO,
fixing it to recognize both ":80" and IPv6 addresses isn't worth
it, as the ":80" syntax doesn't seem very useful for Nagios
plugins (given the way how they are usually called in Nagios
command definitions).
2008-01-06 15:44 dermoth
* [r1890] lib/tests/test_base64.c:
Fix base64 test (known string wasn't null-terminated)
2008-01-06 07:04 dermoth
* [r1889] lib/tests/test_cmd.c:
Fix tinderbox breakage
2008-01-06 00:10 psychotrahe
* [r1888] plugins/check_ldap.c:
If unspecified set LDAP_OPT_SUCCESS to LDAP_SUCCESS (Sergei
Haramundanis - #1498923)
2008-01-05 14:09 dermoth
* [r1887] NEWS, plugins/check_ntp.c, plugins/check_ntp_time.c:
Fix Bug #1862300: check_ntp_time segfault in 1.4.11 (Also apply
to check_ntp)
2008-01-05 01:06 psychotrahe
* [r1886] NEWS, THANKS.in, plugins/check_dns.c:
check_dns now sorts addresses for -a support with multiple
address replies (Matthias Urlichs #1724052)
2008-01-04 22:10 psychotrahe
* [r1885] plugins/check_procs.c:
Cleaned check_procs usage output (Ferenc Wagner #1862218)
2007-12-21 14:19 hweiss
* [r1884] plugins-root/check_icmp.c:
Fix INADDR_NONE value (for systems which don't define it).
2007-12-21 14:17 hweiss
* [r1883] plugins-root/check_icmp.c:
Include <sys/sockio.h> (if available) to get SIOCGIFADDR defined
on Solaris.
2007-12-21 13:25 hweiss
* [r1882] NEWS, THANKS.in, plugins-root/check_icmp.c:
New "-s" option to specify the source IP address (thanks to
Harald Jenny for providing the patch and to Patrick Cervicek for
looking into it!)
2007-12-21 04:23 dermoth
* [r1881] plugins/check_ldap.c:
Remove c formating from translated strings (makes translation
easier)
2007-12-19 18:41 hweiss
* [r1880] plugins/check_ldap.c:
Fix the "--help" output.
2007-12-19 10:08 tonvoon
* [r1879] NEWS, plugins/check_tcp.c:
check_tcp now returns UNKNOWN with an invalid hostname on command
line
2007-12-17 11:47 tonvoon
* [r1877] NEWS, THANKS.in, plugins/check_nt.c:
Add check_nt -v INSTANCES (Alessandro Ren)
2007-12-13 23:17 tonvoon
* [r1876] plugins/check_nwstat.c:
Fixed help output (Christian Mies)
2007-12-13 23:12 tonvoon
* [r1875] NEWS:
NEWS edited for consistent grammar
2007-12-13 22:39 tonvoon
* [r1873] BUGS, ChangeLog, NEWS, configure.in, package.def:
Preparation for 1.4.11
2007-12-13 22:22 tonvoon
* [r1872] NEWS, THANKS.in, plugins-root/Makefile.am:
@ -599,7 +1395,7 @@
2007-07-07 11:54 psychotrahe
* [r1750] plugins-scripts/check_file_age.pl:
substituted $ID$ through $Revision: 1873 $ in print_revision call
substituted $ID$ through $Revision: 2004 $ in print_revision call
2007-07-07 11:40 psychotrahe

View file

@ -46,36 +46,40 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/np_mysqlclient.m4 \
$(top_srcdir)/gl/m4/absolute-header.m4 \
$(top_srcdir)/gl/m4/alloca.m4 \
$(top_srcdir)/gl/m4/arpa_inet_h.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/base64.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/eoverflow.m4 $(top_srcdir)/gl/m4/error.m4 \
$(top_srcdir)/gl/m4/exitfail.m4 \
$(top_srcdir)/gl/m4/extensions.m4 \
$(top_srcdir)/gl/m4/fcntl-safer.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/gethostname.m4 \
$(top_srcdir)/gl/m4/getloadavg.m4 \
$(top_srcdir)/gl/m4/getopt.m4 $(top_srcdir)/gl/m4/gettext.m4 \
$(top_srcdir)/gl/m4/glibc21.m4 \
$(top_srcdir)/gl/m4/gnulib-common.m4 \
$(top_srcdir)/gl/m4/gnulib-comp.m4 \
$(top_srcdir)/gl/m4/iconv.m4 $(top_srcdir)/gl/m4/inet_ntop.m4 \
$(top_srcdir)/gl/m4/inline.m4 $(top_srcdir)/gl/m4/intmax_t.m4 \
$(top_srcdir)/gl/m4/iconv.m4 \
$(top_srcdir)/gl/m4/include_next.m4 \
$(top_srcdir)/gl/m4/inet_ntop.m4 $(top_srcdir)/gl/m4/inline.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/lib-ld.m4 $(top_srcdir)/gl/m4/lib-link.m4 \
$(top_srcdir)/gl/m4/lib-prefix.m4 $(top_srcdir)/gl/m4/lock.m4 \
$(top_srcdir)/gl/m4/longdouble.m4 \
$(top_srcdir)/gl/m4/lib-prefix.m4 \
$(top_srcdir)/gl/m4/localcharset.m4 \
$(top_srcdir)/gl/m4/longlong.m4 \
$(top_srcdir)/gl/m4/ls-mntd-fs.m4 \
$(top_srcdir)/gl/m4/mbchar.m4 $(top_srcdir)/gl/m4/mbiter.m4 \
$(top_srcdir)/gl/m4/mbrtowc.m4 $(top_srcdir)/gl/m4/memchr.m4 \
$(top_srcdir)/gl/m4/minmax.m4 $(top_srcdir)/gl/m4/mountlist.m4 \
$(top_srcdir)/gl/m4/malloc.m4 $(top_srcdir)/gl/m4/math_h.m4 \
$(top_srcdir)/gl/m4/mbstate_t.m4 \
$(top_srcdir)/gl/m4/mountlist.m4 \
$(top_srcdir)/gl/m4/netinet_in_h.m4 $(top_srcdir)/gl/m4/nls.m4 \
$(top_srcdir)/gl/m4/onceonly_2_57.m4 $(top_srcdir)/gl/m4/po.m4 \
$(top_srcdir)/gl/m4/progtest.m4 $(top_srcdir)/gl/m4/regex.m4 \
@ -85,21 +89,21 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/np_mysqlclient.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/strcase.m4 \
$(top_srcdir)/gl/m4/strdup.m4 $(top_srcdir)/gl/m4/strndup.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/sys_socket_h.m4 \
$(top_srcdir)/gl/m4/ulonglong.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/wctype.m4 \
$(top_srcdir)/gl/m4/wcwidth.m4 $(top_srcdir)/gl/m4/wint_t.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/wint_t.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 \
@ -130,10 +134,6 @@ GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
INSTALL = @INSTALL@
ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@
ABSOLUTE_UNISTD_H = @ABSOLUTE_UNISTD_H@
ABSOLUTE_WCHAR_H = @ABSOLUTE_WCHAR_H@
ABSOLUTE_WCTYPE_H = @ABSOLUTE_WCTYPE_H@
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
ALLOCA_H = @ALLOCA_H@
@ -178,27 +178,177 @@ EXTRA_NETOBJS = @EXTRA_NETOBJS@
EXTRA_TEST = @EXTRA_TEST@
F77 = @F77@
FFLAGS = @FFLAGS@
FLOAT_H = @FLOAT_H@
FLOORF_LIBM = @FLOORF_LIBM@
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
GETOPT_H = @GETOPT_H@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GLIBC21 = @GLIBC21@
GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@
GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@
GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@
GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
GNULIB_CEILF = @GNULIB_CEILF@
GNULIB_CEILL = @GNULIB_CEILL@
GNULIB_CHOWN = @GNULIB_CHOWN@
GNULIB_DUP2 = @GNULIB_DUP2@
GNULIB_FCHDIR = @GNULIB_FCHDIR@
GNULIB_FFLUSH = @GNULIB_FFLUSH@
GNULIB_FLOORF = @GNULIB_FLOORF@
GNULIB_FLOORL = @GNULIB_FLOORL@
GNULIB_FOPEN = @GNULIB_FOPEN@
GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
GNULIB_FREOPEN = @GNULIB_FREOPEN@
GNULIB_FREXP = @GNULIB_FREXP@
GNULIB_FREXPL = @GNULIB_FREXPL@
GNULIB_FSEEK = @GNULIB_FSEEK@
GNULIB_FSEEKO = @GNULIB_FSEEKO@
GNULIB_FTELL = @GNULIB_FTELL@
GNULIB_FTELLO = @GNULIB_FTELLO@
GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
GNULIB_GETCWD = @GNULIB_GETCWD@
GNULIB_GETDELIM = @GNULIB_GETDELIM@
GNULIB_GETLINE = @GNULIB_GETLINE@
GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
GNULIB_ISFINITE = @GNULIB_ISFINITE@
GNULIB_LCHOWN = @GNULIB_LCHOWN@
GNULIB_LDEXPL = @GNULIB_LDEXPL@
GNULIB_LSEEK = @GNULIB_LSEEK@
GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
GNULIB_MATHL = @GNULIB_MATHL@
GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
GNULIB_MBSCHR = @GNULIB_MBSCHR@
GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
GNULIB_MBSLEN = @GNULIB_MBSLEN@
GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
GNULIB_MBSSEP = @GNULIB_MBSSEP@
GNULIB_MBSSPN = @GNULIB_MBSSPN@
GNULIB_MBSSTR = @GNULIB_MBSSTR@
GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
GNULIB_MEMMEM = @GNULIB_MEMMEM@
GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
GNULIB_PUTENV = @GNULIB_PUTENV@
GNULIB_READLINK = @GNULIB_READLINK@
GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
GNULIB_ROUND = @GNULIB_ROUND@
GNULIB_ROUNDF = @GNULIB_ROUNDF@
GNULIB_ROUNDL = @GNULIB_ROUNDL@
GNULIB_SETENV = @GNULIB_SETENV@
GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
GNULIB_SLEEP = @GNULIB_SLEEP@
GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
GNULIB_STPCPY = @GNULIB_STPCPY@
GNULIB_STPNCPY = @GNULIB_STPNCPY@
GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
GNULIB_STRDUP = @GNULIB_STRDUP@
GNULIB_STRERROR = @GNULIB_STRERROR@
GNULIB_STRNDUP = @GNULIB_STRNDUP@
GNULIB_STRNLEN = @GNULIB_STRNLEN@
GNULIB_STRPBRK = @GNULIB_STRPBRK@
GNULIB_STRSEP = @GNULIB_STRSEP@
GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
GNULIB_STRSTR = @GNULIB_STRSTR@
GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
GNULIB_TRUNC = @GNULIB_TRUNC@
GNULIB_TRUNCF = @GNULIB_TRUNCF@
GNULIB_TRUNCL = @GNULIB_TRUNCL@
GNULIB_UNSETENV = @GNULIB_UNSETENV@
GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
GREP = @GREP@
HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@
HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@
HAVE_DECL_ASINL = @HAVE_DECL_ASINL@
HAVE_DECL_ATANL = @HAVE_DECL_ATANL@
HAVE_DECL_COSL = @HAVE_DECL_COSL@
HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@
HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@
HAVE_DECL_LOGL = @HAVE_DECL_LOGL@
HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
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@
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_WCWIDTH = @HAVE_DECL_WCWIDTH@
HAVE_DUP2 = @HAVE_DUP2@
HAVE_FSEEKO = @HAVE_FSEEKO@
HAVE_FTELLO = @HAVE_FTELLO@
HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@
HAVE_MEMPCPY = @HAVE_MEMPCPY@
HAVE_MKDTEMP = @HAVE_MKDTEMP@
HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@
HAVE_OS_H = @HAVE_OS_H@
HAVE_READLINK = @HAVE_READLINK@
HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@
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_SLEEP = @HAVE_SLEEP@
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_STRSEP = @HAVE_STRSEP@
HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_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_UNISTD_H = @HAVE_UNISTD_H@
HAVE_UNSETENV = @HAVE_UNSETENV@
HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
HAVE_VASPRINTF = @HAVE_VASPRINTF@
HAVE_WCHAR_H = @HAVE_WCHAR_H@
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__BOOL = @HAVE__BOOL@
HOSTNAME = @HOSTNAME@
INCLUDE_NEXT = @INCLUDE_NEXT@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@ -219,6 +369,7 @@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
@ -232,6 +383,17 @@ MYSQLINCLUDE = @MYSQLINCLUDE@
MYSQLLIBS = @MYSQLLIBS@
NEED_SETGID = @NEED_SETGID@
NETINET_IN_H = @NETINET_IN_H@
NEXT_FLOAT_H = @NEXT_FLOAT_H@
NEXT_MATH_H = @NEXT_MATH_H@
NEXT_NETINET_IN_H = @NEXT_NETINET_IN_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_UNISTD_H = @NEXT_UNISTD_H@
NEXT_WCHAR_H = @NEXT_WCHAR_H@
NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@ -270,11 +432,56 @@ PKG_ARCH = @PKG_ARCH@
PLUGIN_TEST = @PLUGIN_TEST@
POSUB = @POSUB@
POW_LIB = @POW_LIB@
PST3CFLAGS = @PST3CFLAGS@
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
PYTHON = @PYTHON@
RADIUSLIBS = @RADIUSLIBS@
RANLIB = @RANLIB@
RELEASE = @RELEASE@
REPLACE_CEILF = @REPLACE_CEILF@
REPLACE_CEILL = @REPLACE_CEILL@
REPLACE_CHOWN = @REPLACE_CHOWN@
REPLACE_FCHDIR = @REPLACE_FCHDIR@
REPLACE_FFLUSH = @REPLACE_FFLUSH@
REPLACE_FLOORF = @REPLACE_FLOORF@
REPLACE_FLOORL = @REPLACE_FLOORL@
REPLACE_FOPEN = @REPLACE_FOPEN@
REPLACE_FPRINTF = @REPLACE_FPRINTF@
REPLACE_FREOPEN = @REPLACE_FREOPEN@
REPLACE_FREXP = @REPLACE_FREXP@
REPLACE_FREXPL = @REPLACE_FREXPL@
REPLACE_FSEEK = @REPLACE_FSEEK@
REPLACE_FSEEKO = @REPLACE_FSEEKO@
REPLACE_FTELL = @REPLACE_FTELL@
REPLACE_FTELLO = @REPLACE_FTELLO@
REPLACE_GETCWD = @REPLACE_GETCWD@
REPLACE_GETLINE = @REPLACE_GETLINE@
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
REPLACE_ISFINITE = @REPLACE_ISFINITE@
REPLACE_LCHOWN = @REPLACE_LCHOWN@
REPLACE_LDEXPL = @REPLACE_LDEXPL@
REPLACE_LSEEK = @REPLACE_LSEEK@
REPLACE_MEMMEM = @REPLACE_MEMMEM@
REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
REPLACE_PRINTF = @REPLACE_PRINTF@
REPLACE_PUTENV = @REPLACE_PUTENV@
REPLACE_ROUND = @REPLACE_ROUND@
REPLACE_ROUNDF = @REPLACE_ROUNDF@
REPLACE_ROUNDL = @REPLACE_ROUNDL@
REPLACE_SIGNBIT = @REPLACE_SIGNBIT@
REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@
REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
REPLACE_SPRINTF = @REPLACE_SPRINTF@
REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
REPLACE_STRERROR = @REPLACE_STRERROR@
REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
REPLACE_STRSTR = @REPLACE_STRSTR@
REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
REPLACE_VPRINTF = @REPLACE_VPRINTF@
REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
REV_DATESTAMP = @REV_DATESTAMP@
REV_TIMESTAMP = @REV_TIMESTAMP@
SCRIPT_TEST = @SCRIPT_TEST@
@ -291,9 +498,11 @@ STDINT_H = @STDINT_H@
STRIP = @STRIP@
SUPPORT = @SUPPORT@
SYS_SOCKET_H = @SYS_SOCKET_H@
UNISTD_H = @UNISTD_H@
USE_NLS = @USE_NLS@
USE_PARSE_INI_FALSE = @USE_PARSE_INI_FALSE@
USE_PARSE_INI_TRUE = @USE_PARSE_INI_TRUE@
VERSION = @VERSION@
VOID_UNSETENV = @VOID_UNSETENV@
WARRANTY = @WARRANTY@
WCHAR_H = @WCHAR_H@
WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
@ -301,6 +510,7 @@ WCTYPE_H = @WCTYPE_H@
WINT_T_SUFFIX = @WINT_T_SUFFIX@
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
@ -327,6 +537,8 @@ dvidir = @dvidir@
exec_prefix = @exec_prefix@
gl_LIBOBJS = @gl_LIBOBJS@
gl_LTLIBOBJS = @gl_LTLIBOBJS@
gltests_LIBOBJS = @gltests_LIBOBJS@
gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@

54
NEWS
View file

@ -1,27 +1,55 @@
This file documents the major additions and syntax changes between releases.
1.4.12 27th May 2008
Added ./check_nt -v INSTANCES to count number of instances (Alessandro Ren)
New check_icmp -s option to specify the source IP address
check_dns now sorts addresses for testing results for more than one returned IP (Matthias Urlichs)
Fix segfault in check_ntp_time and (deprecated) check_ntp (Bug #1862300)
check_disk should now work with large file systems (2TB+) on all archs that supports it
Fixed check_disk disk usage calculation when using --group=NAME (related to bug #1348746)
Fix help text of check_ntp* (Bug #1880095)
Fix bugs and flaws in best offset server selection of check_ntp_time and (deprecated) check_ntp
check_ntp_peer now checks for the LI_ALARM flag
Sync to latest Gnulib (includes new floorf function)
check_pgsql now successfully builds with postgres lib v8.3 (Bug #1878972)
check_procs now accepts --ereg-argument-array for a regular expression match to the argument array
Reverted back to using pst3 for Solaris systems. Fixed issues re: -m64 needed to compile on 64bit systems
If applicable, Gettext linked dynamically instead of statically
check_dig can now pass arguments to dig by using -A/--dig-arguments (#1874041/#1889453)
check_ntp and check_ntp_peer now show proper jitter/stratum thresholds longopts in --help
check_dns now allow to repeat -a to match multiple possibly returned address (common with load balancers)
check_mysql and check_radius now try clearing password in processlist just like check_mysql_query
check_mysql and check_mysql_query now support sockets explicitely (-s, --socket)
negate now has the ability to replace the status text as well (-s, --substitute)
Added performance data to check_ping (Christian Schneemann)
Added support for --extra-opts in all C plugins (disabled by default, see configure --help)
Fixed passive option in check_by_ssh
On non-skipped stderr, check_by_ssh now returns UNKNOWN or worse (result from command) instead of always UNKNOWN.
Fix linking against OpenSSL where libdl is required
1.4.11 13th December 2007
Fix check_http regression in 1.4.10 where following redirects to
Fixed check_http regression in 1.4.10 where following redirects to
relative URLs on virtual hosts failed if both "-H" and "-I" were used
check_ntp now return UNKNOWN instead of WARNING if jitter is unavailable (jitter=-1.000000)
as long as the thresholds range inculde -1. If no offset threshold is specified
Merged two new checks that deprecates check_ntp: check_ntp_peer and check_ntp_time.
You should read the --help output so see which one is suitable for you. check_ntp_peer
implement stratum thresholds support (feature request #1703823).
check_ntp now returns UNKNOWN instead of WARNING if jitter is unavailable (jitter=-1.000000)
as long as the thresholds range include -1. If no offset threshold is specified
and the offset is unavailable, will return UNKNOWN as well.
NOTE: If jitter thresholds are specified as integers it will return CRITICAL if jitter
is "-1" as the default range starts at 0. See Examples in --help output.
Fix broken usage2 in check_snmp and check_cluster
check_cluster now accept all valid characters in its thresholds ("-", "@", "~")
Merge two new checks that deprecates check_ntp: check_ntp_peer and check_ntp_time.
You should read the --help output so see which one is suitable for you. check_ntp_peer
implement stratum thresholds support (feature request #1703823).
Fix check_disk reporting OK if disk usage grows over 100% (bug #1348746).
Fixed broken usage2 in check_snmp and check_cluster
check_cluster now accepts all valid characters in its thresholds ("-", "@", "~")
Fixed check_disk reporting OK if disk usage grows over 100% (bug #1348746).
The problem happens to be in Gnulib but a workaround have been implemented in check_disk.c
Fix check_load argument handling when not passing triplets (bug #1831890)
Tinderbox builds now run tests in a verbose mode
Update to Nagios::Plugin 0.22
Fixed check_load argument handling when not passing triplets (bug #1831890)
Fixed buffer overflow in check_snmp (CVE-2007-5623)
Tinderbox builds now runs tests in a verbose mode
Updated Nagios::Plugin to 0.22
VPATH problem fixed for compiling plugins-root
1.4.10 28th September 2007
Fix check_http buffer overflow vulnerability when following HTTP redirects
Fix check_http buffer overflow vulnerability when following HTTP redirects (CVE-2007-5198)
check_http now explicitly asks HTTP/1.1 servers to close the connection
after completion of the response
Check_ldaps' guessing which secure method to use (starttls vs. ssl on connect)

View file

@ -7,6 +7,10 @@ that are dependent on other programs/libraries that are missing are
usually not compiled. Requirements for various plugins are listed
below...
check_ldaps, check_http --ssl, check_tcp --ssl, check_smtp --starttls
- Requires openssl or gnutls libraries for SSL connections
http://www.openssl.org, http://www.gnu.org/software/gnutls
check_fping:
- Requires the fping utility distributed with SATAN. Either
download and install SATAN or grab the fping program from
@ -43,11 +47,14 @@ check_pqsql:
http://www.postgresql.org/
check_radius:
- Requires the radiusclient library available from
- Requires the radiusclient-ng library available from:
http://developer.berlios.de/projects/radiusclient-ng/
- This plugin also works with the original radiusclient library from
ftp://ftp.cityline.net/pub/radiusclient/
RPM (rpmfind): radiusclient 0.3.2, radiusclient-devel-0.3.2
- Alternatively radiusclient-ng can be used:
http://developer.berlios.de/projects/radiusclient-ng/
Unless you're using a distro-maintained version of this library you
probably want to use radiusclient-ng. The original radiusclient library is
unmaintained and has many known issues, particularly with 64bit systems.
check_snmp:
- Requires the NET-SNMP package available from

6
THANKS
View file

@ -107,6 +107,7 @@ Chester Hosey
Bob Ingraham
Cire Iriarte
Valdimir Ivaschenko
Harald Jenny
Mark Jewiss
Frank Kannemann
Roy Sigurd Karlsbakk
@ -172,6 +173,7 @@ Darian Rackham
Phil Randal
Abid Rasheed
Jeremy Reed
Alessandro Ren
Joe Rhett
Cliff Rice
Alain Richard
@ -190,6 +192,7 @@ Christoph Schell
Thomas Schimpke
Benjamin Schmid
Henning Schmiedehausen
Christian Schneemann
Cove Schneider
Enrico Scholz
Sebastian Schubert
@ -212,6 +215,7 @@ Ibere Tizio
Julien Touche
Kyle Tucker
Jerome Tytgat
Matthias Urlichs
Matteo HCE Valsasna
Jon Vandegrift
Laurent Vaslin
@ -220,6 +224,7 @@ Ludse Verhoeven
Robert August Vincent
Dave Viner
Nathan Vonnahme
Jan Wagner
John Warburton
Christian G Warden
Stuart Webster
@ -231,5 +236,6 @@ Sebastian Wiesinger
Paul Wiggins
Howard Wilkinson
Shawn Wills
Rob Windsor
Mario Witte
Jamie Zawinski

25
aclocal.m4 vendored
View file

@ -7258,9 +7258,9 @@ AC_SUBST([am__untar])
]) # _AM_PROG_TAR
m4_include([m4/np_mysqlclient.m4])
m4_include([gl/m4/absolute-header.m4])
m4_include([gl/m4/alloca.m4])
m4_include([gl/m4/arpa_inet_h.m4])
m4_include([gl/m4/base64.m4])
m4_include([gl/m4/c-strtod.m4])
m4_include([gl/m4/cloexec.m4])
m4_include([gl/m4/codeset.m4])
@ -7272,6 +7272,8 @@ m4_include([gl/m4/error.m4])
m4_include([gl/m4/exitfail.m4])
m4_include([gl/m4/extensions.m4])
m4_include([gl/m4/fcntl-safer.m4])
m4_include([gl/m4/float_h.m4])
m4_include([gl/m4/floorf.m4])
m4_include([gl/m4/fstypename.m4])
m4_include([gl/m4/fsusage.m4])
m4_include([gl/m4/getaddrinfo.m4])
@ -7279,25 +7281,25 @@ m4_include([gl/m4/gethostname.m4])
m4_include([gl/m4/getloadavg.m4])
m4_include([gl/m4/getopt.m4])
m4_include([gl/m4/gettext.m4])
m4_include([gl/m4/glibc21.m4])
m4_include([gl/m4/gnulib-common.m4])
m4_include([gl/m4/gnulib-comp.m4])
m4_include([gl/m4/iconv.m4])
m4_include([gl/m4/include_next.m4])
m4_include([gl/m4/inet_ntop.m4])
m4_include([gl/m4/inline.m4])
m4_include([gl/m4/intlmacosx.m4])
m4_include([gl/m4/intmax_t.m4])
m4_include([gl/m4/inttypes_h.m4])
m4_include([gl/m4/lib-ld.m4])
m4_include([gl/m4/lib-link.m4])
m4_include([gl/m4/lib-prefix.m4])
m4_include([gl/m4/lock.m4])
m4_include([gl/m4/longdouble.m4])
m4_include([gl/m4/localcharset.m4])
m4_include([gl/m4/longlong.m4])
m4_include([gl/m4/ls-mntd-fs.m4])
m4_include([gl/m4/mbchar.m4])
m4_include([gl/m4/mbiter.m4])
m4_include([gl/m4/mbrtowc.m4])
m4_include([gl/m4/memchr.m4])
m4_include([gl/m4/minmax.m4])
m4_include([gl/m4/malloc.m4])
m4_include([gl/m4/math_h.m4])
m4_include([gl/m4/mbstate_t.m4])
m4_include([gl/m4/mountlist.m4])
m4_include([gl/m4/netinet_in_h.m4])
m4_include([gl/m4/nls.m4])
@ -7315,12 +7317,14 @@ m4_include([gl/m4/ssize_t.m4])
m4_include([gl/m4/stdbool.m4])
m4_include([gl/m4/stdint.m4])
m4_include([gl/m4/stdint_h.m4])
m4_include([gl/m4/strcase.m4])
m4_include([gl/m4/stdio_h.m4])
m4_include([gl/m4/stdlib_h.m4])
m4_include([gl/m4/strdup.m4])
m4_include([gl/m4/strerror.m4])
m4_include([gl/m4/string_h.m4])
m4_include([gl/m4/strndup.m4])
m4_include([gl/m4/strnlen.m4])
m4_include([gl/m4/sys_socket_h.m4])
m4_include([gl/m4/ulonglong.m4])
m4_include([gl/m4/unistd-safer.m4])
m4_include([gl/m4/unistd_h.m4])
m4_include([gl/m4/vasnprintf.m4])
@ -7329,7 +7333,6 @@ m4_include([gl/m4/vsnprintf.m4])
m4_include([gl/m4/wchar.m4])
m4_include([gl/m4/wchar_t.m4])
m4_include([gl/m4/wctype.m4])
m4_include([gl/m4/wcwidth.m4])
m4_include([gl/m4/wint_t.m4])
m4_include([gl/m4/xalloc.m4])
m4_include([gl/m4/xsize.m4])

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-2006 Free Software Foundation, Inc.
# Copyright 1996-2008 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
@ -64,7 +64,7 @@ else
;;
esac
;;
mingw* | pw32* | os2*)
mingw* | cygwin* | pw32* | os2*)
;;
hpux9* | hpux10* | hpux11*)
wl='-Wl,'
@ -74,7 +74,7 @@ else
;;
newsos6)
;;
linux*)
linux* | k*bsd*-gnu)
case $cc_basename in
icc* | ecc*)
wl='-Wl,'
@ -100,7 +100,7 @@ else
osf3* | osf4* | osf5*)
wl='-Wl,'
;;
sco3.2v5*)
rdos*)
;;
solaris*)
wl='-Wl,'
@ -108,11 +108,14 @@ else
sunos4*)
wl='-Qoption ld '
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
sysv4 | sysv4.2uw2* | sysv4.3*)
wl='-Wl,'
;;
sysv4*MP*)
;;
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
wl='-Wl,'
;;
unicos*)
wl='-Wl,'
;;
@ -155,7 +158,7 @@ if test "$with_gnu_ld" = yes; then
# option of GNU ld is called -rpath, not --rpath.
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
case "$host_os" in
aix3* | aix4* | aix5*)
aix[3-9]*)
# On AIX/PPC, the GNU linker is very broken
if test "$host_cpu" != ia64; then
ld_shlibs=no
@ -189,11 +192,11 @@ if test "$with_gnu_ld" = yes; then
ld_shlibs=no
fi
;;
interix3*)
interix[3-9]*)
hardcode_direct=no
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
;;
linux*)
gnu* | linux* | k*bsd*-gnu)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
@ -251,7 +254,7 @@ else
hardcode_direct=unsupported
fi
;;
aix4* | aix5*)
aix[4-9]*)
if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
@ -261,7 +264,7 @@ else
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
# need to do runtime linking.
case $host_os in aix4.[23]|aix4.[23].*|aix5*)
case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
for ld_flag in $LDFLAGS; do
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
aix_use_runtimelinking=yes
@ -280,7 +283,7 @@ else
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
hardcode_direct=yes
:
else
# We have old collect2
hardcode_direct=unsupported
@ -359,7 +362,7 @@ else
hardcode_direct=yes
hardcode_minus_L=yes
;;
freebsd* | kfreebsd*-gnu | dragonfly*)
freebsd* | dragonfly*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
@ -412,18 +415,22 @@ else
hardcode_libdir_separator=:
;;
openbsd*)
hardcode_direct=yes
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
if test -f /usr/libexec/ld.so; then
hardcode_direct=yes
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
else
case "$host_os" in
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
hardcode_libdir_flag_spec='-R$libdir'
;;
*)
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
;;
esac
fi
else
case "$host_os" in
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
hardcode_libdir_flag_spec='-R$libdir'
;;
*)
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
;;
esac
ld_shlibs=no
fi
;;
os2*)
@ -471,7 +478,7 @@ else
ld_shlibs=yes
fi
;;
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
;;
sysv5* | sco3.2v5* | sco5v6*)
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
@ -498,7 +505,7 @@ case "$host_os" in
aix3*)
library_names_spec='$libname.a'
;;
aix4* | aix5*)
aix[4-9]*)
library_names_spec='$libname$shrext'
;;
amigaos*)
@ -523,9 +530,6 @@ case "$host_os" in
;;
freebsd1*)
;;
kfreebsd*-gnu)
library_names_spec='$libname$shrext'
;;
freebsd* | dragonfly*)
case "$host_os" in
freebsd[123]*)
@ -551,7 +555,7 @@ case "$host_os" in
esac
library_names_spec='$libname$shrext'
;;
interix3*)
interix[3-9]*)
library_names_spec='$libname$shrext'
;;
irix5* | irix6* | nonstopux*)
@ -572,7 +576,7 @@ case "$host_os" in
;;
linux*oldld* | linux*aout* | linux*coff*)
;;
linux*)
linux* | k*bsd*-gnu)
library_names_spec='$libname$shrext'
;;
knetbsd*-gnu)
@ -598,6 +602,8 @@ case "$host_os" in
osf3* | osf4* | osf5*)
library_names_spec='$libname$shrext'
;;
rdos*)
;;
solaris*)
library_names_spec='$libname$shrext'
;;

28
build-aux/link-warning.h Normal file
View file

@ -0,0 +1,28 @@
/* 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

View file

@ -1,17 +1,5 @@
/* config.h.in. Generated from configure.in by autoheader. */
/* Define this to an absolute name of <stdint.h>. */
#undef ABSOLUTE_STDINT_H
/* Define this to an absolute name of <unistd.h>. */
#undef ABSOLUTE_UNISTD_H
/* Define this to an absolute name of <wchar.h>. */
#undef ABSOLUTE_WCHAR_H
/* Define this to an absolute name of <wctype.h>. */
#undef ABSOLUTE_WCTYPE_H
/* Define to the number of bits in type 'ptrdiff_t'. */
#undef BITSIZEOF_PTRDIFF_T
@ -80,20 +68,20 @@
/* Define to 1 when using the gnulib module fcntl-safer. */
#undef GNULIB_FCNTL_SAFER
/* Define to indicate the 'malloc' module. */
#undef GNULIB_MALLOC_GNU
/* Define to 1 if you have 'alloca' after including <alloca.h>, a header that
may be supplied by this distribution. */
#undef HAVE_ALLOCA
/* Define HAVE_ALLOCA_H for backward compatibility with older code that
includes <alloca.h> only if HAVE_ALLOCA_H is defined. */
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
*/
#undef HAVE_ALLOCA_H
/* 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 MacOS X function CFLocaleCopyCurrent in the
CoreFoundation framework. */
#undef HAVE_CFLOCALECOPYCURRENT
@ -112,6 +100,10 @@
*/
#undef HAVE_DCGETTEXT
/* Define to 1 if you have the declaration of `floorf', and to 0 if you don't.
*/
#undef HAVE_DECL_FLOORF
/* Define to 1 if you have the declaration of `freeaddrinfo', and to 0 if you
don't. */
#undef HAVE_DECL_FREEADDRINFO
@ -124,6 +116,10 @@
don't. */
#undef HAVE_DECL_GETADDRINFO
/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
don't. */
#undef HAVE_DECL_GETC_UNLOCKED
/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
*/
#undef HAVE_DECL_GETENV
@ -148,14 +144,14 @@
*/
#undef HAVE_DECL_STRDUP
/* Define to 1 if you have the declaration of `strerror', and to 0 if you
don't. */
#undef HAVE_DECL_STRERROR
/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
don't. */
#undef HAVE_DECL_STRERROR_R
/* Define to 1 if you have the declaration of `strncasecmp', and to 0 if you
don't. */
#undef HAVE_DECL_STRNCASECMP
/* Define to 1 if you have the declaration of `strndup', and to 0 if you
don't. */
#undef HAVE_DECL_STRNDUP
@ -176,9 +172,9 @@
don't. */
#undef HAVE_DECL_VSNPRINTF
/* Define to 1 if you have the declaration of `wcwidth', and to 0 if you
/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you
don't. */
#undef HAVE_DECL_WCWIDTH
#undef HAVE_DECL__SNPRINTF
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
@ -195,6 +191,9 @@
/* Define to 1 if you have the <features.h> header file. */
#undef HAVE_FEATURES_H
/* Define to 1 if you have the <float.h> header file. */
#undef HAVE_FLOAT_H
/* Define to 1 if you have the `floor' function. */
#undef HAVE_FLOOR
@ -204,12 +203,6 @@
/* Define to 1 if you have the `fs_stat_dev' function. */
#undef HAVE_FS_STAT_DEV
/* Define to 1 if you have the `gai_strerror' function. */
#undef HAVE_GAI_STRERROR
/* Define to 1 if you have the `getaddrinfo' function. */
#undef HAVE_GETADDRINFO
/* Define to 1 if you have the `gethostbyname' function. */
#undef HAVE_GETHOSTBYNAME
@ -243,9 +236,12 @@
/* Define to 1 if you have the `hasmntopt' function. */
#undef HAVE_HASMNTOPT
/* Define if you have the iconv() function. */
/* Define if you have the iconv() function and it works. */
#undef HAVE_ICONV
/* Define if your compiler supports the #include_next directive. */
#undef HAVE_INCLUDE_NEXT
/* Define to 1 if you have the `inet_ntop' function. */
#undef HAVE_INET_NTOP
@ -270,6 +266,9 @@
/* Define to 1 if <sys/socket.h> defines AF_INET6. */
#undef HAVE_IPV6
/* Define to 1 if you have the `isblank' function. */
#undef HAVE_ISBLANK
/* Define to 1 if you have the `iswcntrl' function. */
#undef HAVE_ISWCNTRL
@ -303,12 +302,18 @@
/* Define to 1 if you have the `dgc' library (-ldgc). */
#undef HAVE_LIBDGC
/* Define to 1 if you have the `dl' library (-ldl). */
#undef HAVE_LIBDL
/* Define to 1 if you have the `kstat' library (-lkstat). */
#undef HAVE_LIBKSTAT
/* Define to 1 if you have the `ldap' library (-lldap). */
#undef HAVE_LIBLDAP
/* Define to 1 if you have the `perfstat' library (-lperfstat). */
#undef HAVE_LIBPERFSTAT
/* Define to 1 if you have the `pq' library (-lpq). */
#undef HAVE_LIBPQ
@ -328,12 +333,6 @@
/* Define to 1 if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
/* Define if you have the 'long double' type. */
#undef HAVE_LONG_DOUBLE
/* Define if you have the 'long long' type. */
#undef HAVE_LONG_LONG
/* Define to 1 if the system has the type `long long int'. */
#undef HAVE_LONG_LONG_INT
@ -344,6 +343,9 @@
to 0 otherwise. */
#undef HAVE_MALLOC
/* Define if the 'malloc' function is POSIX compliant. */
#undef HAVE_MALLOC_POSIX
/* Define to 1 if you have the <math.h> header file. */
#undef HAVE_MATH_H
@ -353,24 +355,12 @@
/* 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
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the `mempcpy' function. */
#undef HAVE_MEMPCPY
/* Define to 1 if <limits.h> defines the MIN and MAX macros. */
#undef HAVE_MINMAX_IN_LIMITS_H
/* Define to 1 if <sys/param.h> defines the MIN and MAX macros. */
#undef HAVE_MINMAX_IN_SYS_PARAM_H
/* Define to 1 if you have the <mntent.h> header file. */
#undef HAVE_MNTENT_H
@ -428,9 +418,6 @@
/* Define to 1 if you have the `pstat_getdynamic' function. */
#undef HAVE_PSTAT_GETDYNAMIC
/* Define to 1 if the system has the type `ptrdiff_t'. */
#undef HAVE_PTRDIFF_T
/* Define to 1 if you have the <rsa.h> header file. */
#undef HAVE_RSA_H
@ -474,6 +461,9 @@
uintmax_t. */
#undef HAVE_STDINT_H_WITH_UINTMAX
/* Define to 1 if you have the <stdio.h> header file. */
#undef HAVE_STDIO_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
@ -489,9 +479,6 @@
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the `strncasecmp' function. */
#undef HAVE_STRNCASECMP
/* Define if you have the strndup() function and it works. */
#undef HAVE_STRNDUP
@ -645,9 +632,6 @@
/* Define to 1 if you have the <wctype.h> header file. */
#undef HAVE_WCTYPE_H
/* Define to 1 if you have the `wcwidth' function. */
#undef HAVE_WCWIDTH
/* Define to 1 if you have the <winsock2.h> header file. */
#undef HAVE_WINSOCK2_H
@ -731,6 +715,9 @@
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O
/* Enable INI file parsing. */
#undef NP_EXTRA_OPTS
/* path and args for nslookup */
#undef NSLOOKUP_COMMAND
@ -825,6 +812,12 @@
/* Forced workaround on redhat in spopen */
#undef REDHAT_SPOPEN_ERROR
/* Define this to 1 if strerror is broken. */
#undef REPLACE_STRERROR
/* Define if vasnprintf exists but is overridden by gnulib. */
#undef REPLACE_VASNPRINTF
/* Define as the return type of signal handlers (`int' or `void'). */
#undef RETSIGTYPE
@ -939,18 +932,17 @@
'wint_t'. */
#undef WINT_T_SUFFIX
/* Define to 1 if on AIX 3.
System headers sometimes define this.
We just want to avoid a redefinition error message. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
/* Define for large files, on AIX-style hosts. */
#undef _LARGE_FILES
/* Define to 1 if on MINIX. */
#undef _MINIX
@ -964,16 +956,27 @@
/* Define if you want regoff_t to be at least as wide POSIX requires. */
#undef _REGEX_LARGE_OFFSETS
/* Enable extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
#endif
/* Define to rpl_ if the getopt replacement functions and variables should be
used. */
@ -985,7 +988,7 @@
/* hpux specific code in check_dhcp.c */
#undef __hpux__
/* sun specific code in check_dhcp.c */
/* linux specific code in check_dhcp.c */
#undef __linux__
/* sun specific code in check_dhcp.c */
@ -1012,6 +1015,10 @@
/* Define to `int' if <sys/types.h> does not define. */
#undef pid_t
/* Define as the type of the result of subtracting two pointers, if the system
doesn't define it. */
#undef ptrdiff_t
/* Define to rpl_re_comp if the replacement should be used. */
#undef re_comp
@ -1057,9 +1064,18 @@
/* Define to rpl_regfree if the replacement should be used. */
#undef regfree
/* Define to equivalent of C99 restrict keyword, or to nothing if this is not
supported. Do not define if restrict is supported directly. */
/* Define to the equivalent of the C99 'restrict' keyword, or to
nothing if this is not supported. Do not define if restrict is
supported directly. */
#undef restrict
/* Work around a bug in Sun C++: it does not support _Restrict, even
though the corresponding Sun C compiler does, which causes
"#define restrict _Restrict" in the previous line. Perhaps some future
version of Sun C++ will work with _Restrict; if so, it'll probably
define __RESTRICT, just as Sun C does. */
#if defined __SUNPRO_CC && !defined __RESTRICT
# define _Restrict
#endif
/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t

5971
configure vendored

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
dnl Process this file with autoconf to produce a configure script.
AC_REVISION ($Revision: 1873 $)
AC_REVISION ($Revision: 2004 $)
AC_PREREQ(2.59)
AC_INIT(nagios-plugins,1.4.11)
AC_INIT(nagios-plugins,1.4.12)
AC_CONFIG_SRCDIR(NPTest.pm)
AC_CONFIG_FILES(gl/Makefile)
AC_CONFIG_AUX_DIR(build-aux)
@ -48,6 +48,7 @@ AC_PROG_LIBTOOL
AM_PROG_CC_C_O
AC_FUNC_ERROR_AT_LINE
AC_SYS_LARGEFILE
ifdef([AC_FUNC_STRTOD],[AC_FUNC_STRTOD],[AM_FUNC_STRTOD])
@ -159,6 +160,19 @@ AC_CHECK_LIB(tap, plan_tests,
AC_SUBST(EXTRA_TEST)
)
dnl INI Parsing
AC_ARG_ENABLE(extra-opts,
AC_HELP_STRING([--enable-extra-opts],
[Enables parsing of plugins ini config files for extra options (default: no)]),
[enable_extra_opts=$enableval],
[enable_extra_opts=no])
AM_CONDITIONAL([USE_PARSE_INI],[test "$enable_extra_opts" = "yes"])
if test "$enable_extra_opts" = "yes" ; then
EXTRA_TEST="$EXTRA_TEST test_ini test_opts"
AC_SUBST(EXTRA_TEST)
AC_DEFINE(NP_EXTRA_OPTS,[1],[Enable INI file parsing.])
fi
dnl Check for PostgreSQL libraries
_SAVEDLIBS="$LIBS"
_SAVEDCPPFLAGS="$CPPFLAGS"
@ -167,7 +181,7 @@ AC_ARG_WITH(pgsql,
[sets path to pgsql installation]),
PGSQL=$withval,)
AC_CHECK_LIB(crypt,main)
if test "$ac_cv_lib_crypt_main" = "yes"; then
if test "$ac_cv_lib_crypt_main" = "yes" -a "x$PGSQL" != "xno"; then
if test -n "$PGSQL"; then
LDFLAGS="$LDFLAGS -L$PGSQL/lib"
CPPFLAGS="$CPPFLAGS -I$PGSQL/include"
@ -323,6 +337,14 @@ if test "$FOUNDINCLUDE" = "no"; then
CPPFLAGS="$_SAVEDCPPFLAGS"
fi
dnl *** The following block comes from wget configure.ac ***
dnl Unfortunately, as of this writing (OpenSSL 0.9.6), the libcrypto
dnl shared library doesn't record its dependency on libdl, so we
dnl need to check for it ourselves so we won't fail to link due to a
dnl lack of -ldl. Most OSes use dlopen(), but HP-UX uses
dnl shl_load().
AC_CHECK_LIB(dl,dlopen)
AC_CHECK_LIB(dl,shl_load)
dnl openssl detection/configuration
if ! test x"$with_openssl" = x"no"; then
@ -434,6 +456,7 @@ AC_STRUCT_TM
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_SIGNAL
AC_TYPE_MBSTATE_T
AC_CACHE_CHECK([for va_copy],ac_cv_HAVE_VA_COPY,[
AC_TRY_LINK([#include <stdarg.h>
@ -511,16 +534,49 @@ if test -n "$PS_COMMAND" && test -n "$PS_FORMAT" && test -n "$PS_COLS" && test -
ac_cv_ps_cols="$PS_COLS"
AC_MSG_RESULT([(command-line) $ac_cv_ps_command])
dnl Now using the pst3/kmem hack for solaris systems to avoid truncation
elif test "$ac_cv_uname_s" = "SunOS"; then
#
# this is a very, very ugly hack, to hardcode the location for plugins
#
if test "$libexecdir" = '${exec_prefix}/libexec'; then
if test "$exec_prefix" = "NONE"; then
if test "$prefix" = "NONE"; then
pst3="$ac_default_prefix/libexec/pst3"
else
pst3="$prefix/libexec/pst3"
fi
else
pst3="$exec_prefix/libexec/pst3"
fi
else
pst3="$libexecdir/pst3"
fi
ac_cv_ps_command="$pst3"
ac_cv_ps_format="%s %d %d %d %d %d %f %s %n"
ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
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)
AC_MSG_NOTICE([using 64bit pst3])
else
AC_MSG_NOTICE([using 32bit pst3])
fi
EXTRAS_ROOT="$EXTRAS_ROOT pst3"
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
elif test "$ac_cv_uname_s" = "SunOS" && /usr/ucb/ps -alxwwn 2>/dev/null | \
egrep -i ["^ *F +UID +PID +PPID +%C +PRI +NI +SZ +RSS +WCHAN +S +TT +TIME +COMMAND"] > /dev/null
then
ac_cv_ps_varlist="[&procuid,&procpid,&procppid,&procpcpu,&procvsz,&procrss,procstat,&pos]"
ac_cv_ps_command="/usr/ucb/ps -alxwwn"
ac_cv_ps_format=["%*s %d %d %d %d %*d %*d %d %d%*[ 0123456789abcdef]%[OSRZT]%*s %*s %n"]
ac_cv_ps_cols=8
AC_MSG_RESULT([$ac_cv_ps_command])
dnl elif test "$ac_cv_uname_s" = "SunOS" && /usr/ucb/ps -alxwwn 2>/dev/null | \
dnl egrep -i ["^ *F +UID +PID +PPID +%C +PRI +NI +SZ +RSS +WCHAN +S +TT +TIME +COMMAND"] > /dev/null
dnl then
dnl ac_cv_ps_varlist="[&procuid,&procpid,&procppid,&procpcpu,&procvsz,&procrss,procstat,&pos]"
dnl ac_cv_ps_command="/usr/ucb/ps -alxwwn"
dnl ac_cv_ps_format=["%*s %d %d %d %d %*d %*d %d %d%*[ 0123456789abcdef]%[OSRZT]%*s %*s %n"]
dnl ac_cv_ps_cols=8
dnl AC_MSG_RESULT([$ac_cv_ps_command])
dnl Some gnu/linux systems (debian for one) don't like -axwo and need axwo.
dnl so test for this first...
@ -1475,9 +1531,9 @@ case $host in
AC_DEFINE(__bsd__,1,[bsd specific code in check_dhcp.c])
;;
*linux*)
AC_DEFINE(__linux__,1,[sun specific code in check_dhcp.c])
AC_DEFINE(__linux__,1,[linux specific code in check_dhcp.c])
;;
*sun* | solaris*)
*sun* | *solaris*)
AC_DEFINE(__sun__,1,[sun specific code in check_dhcp.c])
;;
*hpux*)
@ -1507,6 +1563,7 @@ AC_ARG_ENABLE(redhat-pthread-workaround,
[ac_cv_enable_redhat_pthread_workaround=test])
if test "$ac_cv_enable_redhat_pthread_workaround" = "test" ; then
if echo $ac_cv_uname_r | egrep "\.EL(smp)?$" >/dev/null 2>&1 ; then
AC_MSG_NOTICE([See http://nagiosplugins.org/faq/compile/configure_appears_to_hang if this next part takes a long time])
AC_MSG_CHECKING(for redhat spopen problem)
( cd config_test && make && make test ) > /dev/null 2>&1
if test $? -eq 0 ; then
@ -1534,7 +1591,7 @@ dnl External libraries - see ACKNOWLEDGEMENTS
gl_INIT
dnl Some helpful common compile errors checked here
if test "$ac_cv_uname_s" = 'SunOS' -a "$ac_cv_prog_ac_ct_AR" = 'false' ; then
if test "$ac_cv_uname_s" = 'SunOS' -a \( "x$ac_cv_prog_ac_ct_AR" = "x" -o "$ac_cv_prog_ac_ct_AR" = 'false' \) ; then
AC_MSG_ERROR(No ar found for Solaris - is /usr/ccs/bin in PATH?)
fi
@ -1585,6 +1642,7 @@ ACX_FEATURE([with],[ipv6])
ACX_FEATURE([with],[mysql])
ACX_FEATURE([with],[openssl])
ACX_FEATURE([with],[gnutls])
ACX_FEATURE([enable],[extra-opts])
ACX_FEATURE([with],[perl])
ACX_FEATURE([enable],[perl-modules])
ACX_FEATURE([with],[cgiurl])

View file

@ -9,7 +9,7 @@
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --aux-dir=. --no-libtool --macro-prefix=gl dirname fsusage getaddrinfo gethostname getloadavg getopt gettext mountlist regex vasprintf vsnprintf
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --aux-dir=build-aux --no-libtool --macro-prefix=gl base64 dirname floorf fsusage getaddrinfo gethostname getloadavg getopt gettext mountlist regex vasprintf vsnprintf
AUTOMAKE_OPTIONS = 1.5 gnits
@ -34,6 +34,15 @@ libgnu_a_LIBADD = $(gl_LIBOBJS)
libgnu_a_DEPENDENCIES = $(gl_LIBOBJS)
EXTRA_libgnu_a_SOURCES =
## begin gnulib module absolute-header
# Use this preprocessor expression to decide whether #include_next works.
# Do not rely on a 'configure'-time test for this, since the expression
# might appear in an installed header, which is used by some other compiler.
HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER)
## end gnulib module absolute-header
## begin gnulib module alloca
@ -51,14 +60,14 @@ BUILT_SOURCES += $(ALLOCA_H)
# We need the following in order to create <alloca.h> when the system
# doesn't have one that works with the given compiler.
alloca.h: alloca_.h
alloca.h: alloca.in.h
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
cat $(srcdir)/alloca_.h; \
cat $(srcdir)/alloca.in.h; \
} > $@-t
mv -f $@-t $@
MOSTLYCLEANFILES += alloca.h alloca.h-t
EXTRA_DIST += alloca_.h
EXTRA_DIST += alloca.in.h
## end gnulib module alloca-opt
@ -69,7 +78,7 @@ BUILT_SOURCES += $(ARPA_INET_H)
# We need the following in order to create <arpa/inet.h> when the system
# doesn't have one.
arpa/inet.h:
test -d arpa || mkdir arpa
@MKDIR_P@ arpa
rm -f $@-t $@
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
echo '#include <sys/socket.h>'; \
@ -80,6 +89,12 @@ MOSTLYCLEANDIRS += arpa
## end gnulib module arpa_inet
## begin gnulib module base64
libgnu_a_SOURCES += base64.h base64.c
## end gnulib module base64
## begin gnulib module c-strtod
@ -98,6 +113,62 @@ EXTRA_libgnu_a_SOURCES += cloexec.c
## end gnulib module cloexec
## begin gnulib module configmake
# Retrieve values of the variables through 'configure' followed by
# 'make', not directly through 'configure', so that a user who
# sets some of these variables consistently on the 'make' command
# line gets correct results.
#
# One advantage of this approach, compared to the classical
# approach of adding -DLIBDIR=\"$(libdir)\" etc. to AM_CPPFLAGS,
# is that it protects against the use of undefined variables.
# If, say, $(libdir) is not set in the Makefile, LIBDIR is not
# defined by this module, and code using LIBDIR gives a
# compilation error.
#
# Another advantage is that 'make' output is shorter.
#
# Listed in the same order as the GNU makefile conventions.
# The Automake-defined pkg* macros are appended, in the order
# listed in the Automake 1.10a+ documentation.
configmake.h: Makefile
rm -f $@-t $@
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
echo '#define PREFIX "$(prefix)"'; \
echo '#define EXEC_PREFIX "$(exec_prefix)"'; \
echo '#define BINDIR "$(bindir)"'; \
echo '#define SBINDIR "$(sbindir)"'; \
echo '#define LIBEXECDIR "$(libexecdir)"'; \
echo '#define DATAROOTDIR "$(datarootdir)"'; \
echo '#define DATADIR "$(datadir)"'; \
echo '#define SYSCONFDIR "$(sysconfdir)"'; \
echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \
echo '#define LOCALSTATEDIR "$(localstatedir)"'; \
echo '#define INCLUDEDIR "$(includedir)"'; \
echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \
echo '#define DOCDIR "$(docdir)"'; \
echo '#define INFODIR "$(infodir)"'; \
echo '#define HTMLDIR "$(htmldir)"'; \
echo '#define DVIDIR "$(dvidir)"'; \
echo '#define PDFDIR "$(pdfdir)"'; \
echo '#define PSDIR "$(psdir)"'; \
echo '#define LIBDIR "$(libdir)"'; \
echo '#define LISPDIR "$(lispdir)"'; \
echo '#define LOCALEDIR "$(localedir)"'; \
echo '#define MANDIR "$(mandir)"'; \
echo '#define MANEXT "$(manext)"'; \
echo '#define PKGDATADIR "$(pkgdatadir)"'; \
echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \
echo '#define PKGLIBDIR "$(pkglibdir)"'; \
echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \
} | sed '/""/d' > $@-t
mv $@-t $@
BUILT_SOURCES += configmake.h
CLEANFILES += configmake.h configmake.h-t
## end gnulib module configmake
## begin gnulib module dirname
@ -116,12 +187,6 @@ EXTRA_libgnu_a_SOURCES += error.c
## end gnulib module error
## begin gnulib module exit
libgnu_a_SOURCES += exit.h
## end gnulib module exit
## begin gnulib module exitfail
@ -140,6 +205,35 @@ EXTRA_libgnu_a_SOURCES += creat-safer.c open-safer.c
## end gnulib module fcntl-safer
## begin gnulib module float
BUILT_SOURCES += $(FLOAT_H)
# We need the following in order to create <float.h> when the system
# doesn't have one that works with the given compiler.
float.h: float.in.h
rm -f $@-t $@
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
-e 's|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \
< $(srcdir)/float.in.h; \
} > $@-t
mv $@-t $@
MOSTLYCLEANFILES += float.h float.h-t
EXTRA_DIST += float.in.h
## end gnulib module float
## begin gnulib module floorf
EXTRA_DIST += floor.c floorf.c
EXTRA_libgnu_a_SOURCES += floor.c floorf.c
## end gnulib module floorf
## begin gnulib module fsusage
@ -194,14 +288,14 @@ BUILT_SOURCES += $(GETOPT_H)
# We need the following in order to create <getopt.h> when the system
# doesn't have one that works with the given compiler.
getopt.h: getopt_.h
getopt.h: getopt.in.h
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
cat $(srcdir)/getopt_.h; \
cat $(srcdir)/getopt.in.h; \
} > $@-t
mv -f $@-t $@
MOSTLYCLEANFILES += getopt.h getopt.h-t
EXTRA_DIST += getopt.c getopt1.c getopt_.h getopt_int.h
EXTRA_DIST += getopt.c getopt.in.h getopt1.c getopt_int.h
EXTRA_libgnu_a_SOURCES += getopt.c getopt1.c
@ -219,6 +313,8 @@ EXTRA_libgnu_a_SOURCES += getopt.c getopt1.c
# "gettextize --intl".
AM_CPPFLAGS += -I$(top_builddir)/intl
EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath
## end gnulib module gettext
## begin gnulib module gettext-h
@ -227,6 +323,13 @@ libgnu_a_SOURCES += gettext.h
## end gnulib module gettext-h
## begin gnulib module havelib
EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath
## end gnulib module havelib
## begin gnulib module inet_ntop
@ -243,6 +346,72 @@ EXTRA_DIST += intprops.h
## end gnulib module intprops
## begin gnulib module link-warning
LINK_WARNING_H=$(top_srcdir)/build-aux/link-warning.h
EXTRA_DIST += $(top_srcdir)/build-aux/link-warning.h
## end gnulib module link-warning
## begin gnulib module localcharset
libgnu_a_SOURCES += localcharset.h localcharset.c
# We need the following in order to install a simple file in $(libdir)
# which is shared with other installed packages. We use a list of referencing
# packages so that "make uninstall" will remove the file if and only if it
# is not used by another installed package.
# On systems with glibc-2.1 or newer, the file is redundant, therefore we
# avoid installing it.
all-local: charset.alias ref-add.sed ref-del.sed
charset_alias = $(DESTDIR)$(libdir)/charset.alias
charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
install-exec-local: all-local
test $(GLIBC21) != no || $(mkinstalldirs) $(DESTDIR)$(libdir)
if test -f $(charset_alias); then \
sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \
$(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
rm -f $(charset_tmp) ; \
else \
if test $(GLIBC21) = no; then \
sed -f ref-add.sed charset.alias > $(charset_tmp) ; \
$(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
rm -f $(charset_tmp) ; \
fi ; \
fi
uninstall-local: all-local
if test -f $(charset_alias); then \
sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \
if grep '^# Packages using this file: $$' $(charset_tmp) \
> /dev/null; then \
rm -f $(charset_alias); \
else \
$(INSTALL_DATA) $(charset_tmp) $(charset_alias); \
fi; \
rm -f $(charset_tmp); \
fi
charset.alias: config.charset
rm -f t-$@ $@
$(SHELL) $(srcdir)/config.charset '$(host)' > t-$@
mv t-$@ $@
SUFFIXES += .sed .sin
.sin.sed:
rm -f t-$@ $@
sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@
mv t-$@ $@
CLEANFILES += charset.alias ref-add.sed ref-del.sed
EXTRA_DIST += config.charset ref-add.sin ref-del.sin
## end gnulib module localcharset
## begin gnulib module malloc
@ -252,35 +421,78 @@ EXTRA_libgnu_a_SOURCES += malloc.c
## end gnulib module malloc
## begin gnulib module mbchar
## begin gnulib module malloc-posix
EXTRA_DIST += mbchar.c mbchar.h
EXTRA_DIST += malloc.c
EXTRA_libgnu_a_SOURCES += mbchar.c
EXTRA_libgnu_a_SOURCES += malloc.c
## end gnulib module mbchar
## end gnulib module malloc-posix
## begin gnulib module mbuiter
## begin gnulib module math
libgnu_a_SOURCES += mbuiter.h
BUILT_SOURCES += math.h
## end gnulib module mbuiter
# We need the following in order to create <math.h> when the system
# doesn't have one that works with the given compiler.
math.h: math.in.h
rm -f $@-t $@
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
-e 's|@''NEXT_MATH_H''@|$(NEXT_MATH_H)|g' \
-e 's|@''GNULIB_CEILF''@|$(GNULIB_CEILF)|g' \
-e 's|@''GNULIB_CEILL''@|$(GNULIB_CEILL)|g' \
-e 's|@''GNULIB_FLOORF''@|$(GNULIB_FLOORF)|g' \
-e 's|@''GNULIB_FLOORL''@|$(GNULIB_FLOORL)|g' \
-e 's|@''GNULIB_FREXP''@|$(GNULIB_FREXP)|g' \
-e 's|@''GNULIB_FREXPL''@|$(GNULIB_FREXPL)|g' \
-e 's|@''GNULIB_ISFINITE''@|$(GNULIB_ISFINITE)|g' \
-e 's|@''GNULIB_LDEXPL''@|$(GNULIB_LDEXPL)|g' \
-e 's|@''GNULIB_MATHL''@|$(GNULIB_MATHL)|g' \
-e 's|@''GNULIB_ROUND''@|$(GNULIB_ROUND)|g' \
-e 's|@''GNULIB_ROUNDF''@|$(GNULIB_ROUNDF)|g' \
-e 's|@''GNULIB_ROUNDL''@|$(GNULIB_ROUNDL)|g' \
-e 's|@''GNULIB_SIGNBIT''@|$(GNULIB_SIGNBIT)|g' \
-e 's|@''GNULIB_TRUNC''@|$(GNULIB_TRUNC)|g' \
-e 's|@''GNULIB_TRUNCF''@|$(GNULIB_TRUNCF)|g' \
-e 's|@''GNULIB_TRUNCL''@|$(GNULIB_TRUNCL)|g' \
-e 's|@''HAVE_DECL_ACOSL''@|$(HAVE_DECL_ACOSL)|g' \
-e 's|@''HAVE_DECL_ASINL''@|$(HAVE_DECL_ASINL)|g' \
-e 's|@''HAVE_DECL_ATANL''@|$(HAVE_DECL_ATANL)|g' \
-e 's|@''HAVE_DECL_COSL''@|$(HAVE_DECL_COSL)|g' \
-e 's|@''HAVE_DECL_EXPL''@|$(HAVE_DECL_EXPL)|g' \
-e 's|@''HAVE_DECL_FREXPL''@|$(HAVE_DECL_FREXPL)|g' \
-e 's|@''HAVE_DECL_LDEXPL''@|$(HAVE_DECL_LDEXPL)|g' \
-e 's|@''HAVE_DECL_LOGL''@|$(HAVE_DECL_LOGL)|g' \
-e 's|@''HAVE_DECL_SINL''@|$(HAVE_DECL_SINL)|g' \
-e 's|@''HAVE_DECL_SQRTL''@|$(HAVE_DECL_SQRTL)|g' \
-e 's|@''HAVE_DECL_TANL''@|$(HAVE_DECL_TANL)|g' \
-e 's|@''HAVE_DECL_TRUNC''@|$(HAVE_DECL_TRUNC)|g' \
-e 's|@''HAVE_DECL_TRUNCF''@|$(HAVE_DECL_TRUNCF)|g' \
-e 's|@''HAVE_DECL_TRUNCL''@|$(HAVE_DECL_TRUNCL)|g' \
-e 's|@''REPLACE_CEILF''@|$(REPLACE_CEILF)|g' \
-e 's|@''REPLACE_CEILL''@|$(REPLACE_CEILL)|g' \
-e 's|@''REPLACE_FLOORF''@|$(REPLACE_FLOORF)|g' \
-e 's|@''REPLACE_FLOORL''@|$(REPLACE_FLOORL)|g' \
-e 's|@''REPLACE_FREXP''@|$(REPLACE_FREXP)|g' \
-e 's|@''REPLACE_FREXPL''@|$(REPLACE_FREXPL)|g' \
-e 's|@''REPLACE_ISFINITE''@|$(REPLACE_ISFINITE)|g' \
-e 's|@''REPLACE_LDEXPL''@|$(REPLACE_LDEXPL)|g' \
-e 's|@''REPLACE_ROUND''@|$(REPLACE_ROUND)|g' \
-e 's|@''REPLACE_ROUNDF''@|$(REPLACE_ROUNDF)|g' \
-e 's|@''REPLACE_ROUNDL''@|$(REPLACE_ROUNDL)|g' \
-e 's|@''REPLACE_SIGNBIT''@|$(REPLACE_SIGNBIT)|g' \
-e 's|@''REPLACE_SIGNBIT_USING_GCC''@|$(REPLACE_SIGNBIT_USING_GCC)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
< $(srcdir)/math.in.h; \
} > $@-t
mv $@-t $@
MOSTLYCLEANFILES += math.h math.h-t
## begin gnulib module memchr
EXTRA_DIST += math.in.h
EXTRA_DIST += memchr.c
EXTRA_libgnu_a_SOURCES += memchr.c
## end gnulib module memchr
## begin gnulib module minmax
libgnu_a_SOURCES += minmax.h
## end gnulib module minmax
## end gnulib module math
## begin gnulib module mountlist
@ -297,16 +509,21 @@ BUILT_SOURCES += $(NETINET_IN_H)
# We need the following in order to create <netinet/in.h> when the system
# doesn't have one.
netinet/in.h:
test -d netinet || mkdir netinet
netinet/in.h: netinet_in.in.h
@MKDIR_P@ netinet
rm -f $@-t $@
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
echo '#include <sys/socket.h>'; \
sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
-e 's|@''NEXT_NETINET_IN_H''@|$(NEXT_NETINET_IN_H)|g' \
-e 's|@''HAVE_NETINET_IN_H''@|$(HAVE_NETINET_IN_H)|g' \
< $(srcdir)/netinet_in.in.h; \
} > $@-t
mv $@-t $@
MOSTLYCLEANFILES += netinet/in.h netinet/in.h-t
MOSTLYCLEANDIRS += netinet
EXTRA_DIST += netinet_in.in.h
## end gnulib module netinet_in
## begin gnulib module regex
@ -345,7 +562,7 @@ libgnu_a_SOURCES += size_max.h
## begin gnulib module snprintf
EXTRA_DIST += snprintf.c snprintf.h
EXTRA_DIST += snprintf.c
EXTRA_libgnu_a_SOURCES += snprintf.c
@ -357,15 +574,15 @@ BUILT_SOURCES += $(STDBOOL_H)
# We need the following in order to create <stdbool.h> when the system
# doesn't have one that works.
stdbool.h: stdbool_.h
stdbool.h: stdbool.in.h
rm -f $@-t $@
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool_.h; \
sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \
} > $@-t
mv $@-t $@
MOSTLYCLEANFILES += stdbool.h stdbool.h-t
EXTRA_DIST += stdbool_.h
EXTRA_DIST += stdbool.in.h
## end gnulib module stdbool
@ -375,11 +592,12 @@ BUILT_SOURCES += $(STDINT_H)
# We need the following in order to create <stdint.h> when the system
# doesn't have one that works with the given compiler.
stdint.h: stdint_.h
stdint.h: stdint.in.h
rm -f $@-t $@
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
-e 's|@''ABSOLUTE_STDINT_H''@|$(ABSOLUTE_STDINT_H)|g' \
-e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
-e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \
-e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \
-e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
-e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
@ -399,37 +617,210 @@ stdint.h: stdint_.h
-e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \
-e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \
-e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \
< $(srcdir)/stdint_.h; \
< $(srcdir)/stdint.in.h; \
} > $@-t
mv $@-t $@
MOSTLYCLEANFILES += stdint.h stdint.h-t
EXTRA_DIST += stdint_.h
EXTRA_DIST += stdint.in.h
## end gnulib module stdint
## begin gnulib module strcase
## begin gnulib module stdio
BUILT_SOURCES += stdio.h
EXTRA_DIST += strcase.h strcasecmp.c strncasecmp.c
# We need the following in order to create <stdio.h> when the system
# doesn't have one that works with the given compiler.
stdio.h: stdio.in.h
rm -f $@-t $@
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
-e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \
-e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \
-e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \
-e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \
-e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \
-e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \
-e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \
-e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \
-e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \
-e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \
-e 's|@''GNULIB_FOPEN''@|$(GNULIB_FOPEN)|g' \
-e 's|@''GNULIB_FREOPEN''@|$(GNULIB_FREOPEN)|g' \
-e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \
-e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \
-e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \
-e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \
-e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \
-e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \
-e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \
-e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \
-e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \
-e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \
-e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \
-e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \
-e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \
-e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \
-e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \
-e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \
-e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \
-e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \
-e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \
-e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \
-e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \
-e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \
-e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \
-e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \
-e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \
-e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \
-e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \
-e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \
-e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
< $(srcdir)/stdio.in.h; \
} > $@-t
mv $@-t $@
MOSTLYCLEANFILES += stdio.h stdio.h-t
EXTRA_libgnu_a_SOURCES += strcasecmp.c strncasecmp.c
EXTRA_DIST += stdio.in.h
## end gnulib module strcase
## end gnulib module stdio
## begin gnulib module stdlib
BUILT_SOURCES += stdlib.h
# We need the following in order to create <stdlib.h> when the system
# doesn't have one that works with the given compiler.
stdlib.h: stdlib.in.h
rm -f $@-t $@
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
-e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
-e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \
-e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \
-e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \
-e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \
-e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \
-e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \
-e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \
-e 's|@''GNULIB_SETENV''@|$(GNULIB_SETENV)|g' \
-e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \
-e 's|@''HAVE_CALLOC_POSIX''@|$(HAVE_CALLOC_POSIX)|g' \
-e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
-e 's|@''HAVE_MALLOC_POSIX''@|$(HAVE_MALLOC_POSIX)|g' \
-e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \
-e 's|@''HAVE_REALLOC_POSIX''@|$(HAVE_REALLOC_POSIX)|g' \
-e 's|@''HAVE_SETENV''@|$(HAVE_SETENV)|g' \
-e 's|@''HAVE_UNSETENV''@|$(HAVE_UNSETENV)|g' \
-e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
-e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
-e 's|@''VOID_UNSETENV''@|$(VOID_UNSETENV)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
< $(srcdir)/stdlib.in.h; \
} > $@-t
mv $@-t $@
MOSTLYCLEANFILES += stdlib.h stdlib.h-t
EXTRA_DIST += stdlib.in.h
## end gnulib module stdlib
## begin gnulib module strdup
EXTRA_DIST += strdup.c strdup.h
EXTRA_DIST += strdup.c
EXTRA_libgnu_a_SOURCES += strdup.c
## end gnulib module strdup
## begin gnulib module strerror
EXTRA_DIST += strerror.c
EXTRA_libgnu_a_SOURCES += strerror.c
## end gnulib module strerror
## begin gnulib module string
BUILT_SOURCES += string.h
# We need the following in order to create <string.h> when the system
# doesn't have one that works with the given compiler.
string.h: string.in.h
rm -f $@-t $@
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
-e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
-e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \
-e 's|@''GNULIB_MBSNLEN''@|$(GNULIB_MBSNLEN)|g' \
-e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \
-e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \
-e 's|@''GNULIB_MBSSTR''@|$(GNULIB_MBSSTR)|g' \
-e 's|@''GNULIB_MBSCASECMP''@|$(GNULIB_MBSCASECMP)|g' \
-e 's|@''GNULIB_MBSNCASECMP''@|$(GNULIB_MBSNCASECMP)|g' \
-e 's|@''GNULIB_MBSPCASECMP''@|$(GNULIB_MBSPCASECMP)|g' \
-e 's|@''GNULIB_MBSCASESTR''@|$(GNULIB_MBSCASESTR)|g' \
-e 's|@''GNULIB_MBSCSPN''@|$(GNULIB_MBSCSPN)|g' \
-e 's|@''GNULIB_MBSPBRK''@|$(GNULIB_MBSPBRK)|g' \
-e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \
-e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \
-e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \
-e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \
-e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \
-e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \
-e 's|@''GNULIB_STPCPY''@|$(GNULIB_STPCPY)|g' \
-e 's|@''GNULIB_STPNCPY''@|$(GNULIB_STPNCPY)|g' \
-e 's|@''GNULIB_STRCHRNUL''@|$(GNULIB_STRCHRNUL)|g' \
-e 's|@''GNULIB_STRDUP''@|$(GNULIB_STRDUP)|g' \
-e 's|@''GNULIB_STRNDUP''@|$(GNULIB_STRNDUP)|g' \
-e 's|@''GNULIB_STRNLEN''@|$(GNULIB_STRNLEN)|g' \
-e 's|@''GNULIB_STRPBRK''@|$(GNULIB_STRPBRK)|g' \
-e 's|@''GNULIB_STRSEP''@|$(GNULIB_STRSEP)|g' \
-e 's|@''GNULIB_STRSTR''@|$(GNULIB_STRSTR)|g' \
-e 's|@''GNULIB_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \
-e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|g' \
-e 's|@''GNULIB_STRERROR''@|$(GNULIB_STRERROR)|g' \
-e 's|@''GNULIB_STRSIGNAL''@|$(GNULIB_STRSIGNAL)|g' \
-e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
-e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
-e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
-e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \
-e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \
-e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \
-e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \
-e 's|@''HAVE_STRNDUP''@|$(HAVE_STRNDUP)|g' \
-e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \
-e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \
-e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \
-e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \
-e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \
-e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
-e 's|@''HAVE_DECL_STRERROR''@|$(HAVE_DECL_STRERROR)|g' \
-e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \
-e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
-e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \
-e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
-e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
-e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
< $(srcdir)/string.in.h; \
} > $@-t
mv $@-t $@
MOSTLYCLEANFILES += string.h string.h-t
EXTRA_DIST += string.in.h
## end gnulib module string
## begin gnulib module strndup
EXTRA_DIST += strndup.c strndup.h
EXTRA_DIST += strndup.c
EXTRA_libgnu_a_SOURCES += strndup.c
@ -438,53 +829,79 @@ EXTRA_libgnu_a_SOURCES += strndup.c
## begin gnulib module strnlen
EXTRA_DIST += strnlen.c strnlen.h
EXTRA_DIST += strnlen.c
EXTRA_libgnu_a_SOURCES += strnlen.c
## end gnulib module strnlen
## begin gnulib module strnlen1
libgnu_a_SOURCES += strnlen1.h strnlen1.c
## end gnulib module strnlen1
## begin gnulib module sys_socket
BUILT_SOURCES += $(SYS_SOCKET_H)
# We need the following in order to create <sys/socket.h> when the system
# doesn't have one that works with the given compiler.
sys/socket.h: socket_.h
sys/socket.h: sys_socket.in.h
@MKDIR_P@ sys
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
cat $(srcdir)/socket_.h; \
sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
-e 's|@''NEXT_SYS_SOCKET_H''@|$(NEXT_SYS_SOCKET_H)|g' \
-e 's|@''HAVE_SYS_SOCKET_H''@|$(HAVE_SYS_SOCKET_H)|g' \
-e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
-e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \
< $(srcdir)/sys_socket.in.h; \
} > $@-t
mv -f $@-t $@
MOSTLYCLEANFILES += sys/socket.h sys/socket.h-t
MOSTLYCLEANDIRS += sys
EXTRA_DIST += socket_.h
EXTRA_DIST += sys_socket.in.h
## end gnulib module sys_socket
## begin gnulib module unistd
BUILT_SOURCES += $(UNISTD_H)
BUILT_SOURCES += unistd.h
# We need the following in order to create an empty placeholder for
# <unistd.h> when the system doesn't have one.
unistd.h: unistd_.h
unistd.h: unistd.in.h
rm -f $@-t $@
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''ABSOLUTE_UNISTD_H''@|$(ABSOLUTE_UNISTD_H)|g' \
< $(srcdir)/unistd_.h; \
sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
-e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
-e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
-e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \
-e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \
-e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \
-e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \
-e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \
-e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \
-e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \
-e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \
-e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \
-e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
-e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \
-e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
-e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
-e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
-e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
-e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
-e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
-e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
-e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
-e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
-e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \
-e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
-e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
-e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
-e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
< $(srcdir)/unistd.in.h; \
} > $@-t
mv $@-t $@
MOSTLYCLEANFILES += unistd.h unistd.h-t
EXTRA_DIST += unistd_.h
EXTRA_DIST += unistd.in.h
## end gnulib module unistd
@ -500,7 +917,7 @@ EXTRA_libgnu_a_SOURCES += dup-safer.c fd-safer.c pipe-safer.c
## begin gnulib module vasnprintf
EXTRA_DIST += asnprintf.c printf-args.c printf-args.h printf-parse.c printf-parse.h vasnprintf.c vasnprintf.h
EXTRA_DIST += asnprintf.c float+.h printf-args.c printf-args.h printf-parse.c printf-parse.h vasnprintf.c vasnprintf.h
EXTRA_libgnu_a_SOURCES += asnprintf.c printf-args.c printf-parse.c vasnprintf.c
@ -509,7 +926,7 @@ EXTRA_libgnu_a_SOURCES += asnprintf.c printf-args.c printf-parse.c vasnprintf.c
## begin gnulib module vasprintf
EXTRA_DIST += asprintf.c vasprintf.c vasprintf.h
EXTRA_DIST += asprintf.c vasprintf.c
EXTRA_libgnu_a_SOURCES += asprintf.c vasprintf.c
@ -518,7 +935,7 @@ EXTRA_libgnu_a_SOURCES += asprintf.c vasprintf.c
## begin gnulib module vsnprintf
EXTRA_DIST += vsnprintf.c vsnprintf.h
EXTRA_DIST += vsnprintf.c
EXTRA_libgnu_a_SOURCES += vsnprintf.c
@ -530,16 +947,22 @@ BUILT_SOURCES += $(WCHAR_H)
# We need the following in order to create <wchar.h> when the system
# version does not work standalone.
wchar.h: wchar_.h
wchar.h: wchar.in.h
rm -f $@-t $@
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''ABSOLUTE_WCHAR_H''@|$(ABSOLUTE_WCHAR_H)|g' \
< $(srcdir)/wchar_.h; \
sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
-e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \
-e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \
-e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \
-e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \
-e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
< $(srcdir)/wchar.in.h; \
} > $@-t
mv $@-t $@
MOSTLYCLEANFILES += wchar.h wchar.h-t
EXTRA_DIST += wchar_.h
EXTRA_DIST += wchar.in.h
## end gnulib module wchar
@ -549,28 +972,23 @@ BUILT_SOURCES += $(WCTYPE_H)
# We need the following in order to create <wctype.h> when the system
# doesn't have one that works with the given compiler.
wctype.h: wctype_.h
wctype.h: wctype.in.h
rm -f $@-t $@
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \
-e 's|@''ABSOLUTE_WCTYPE_H''@|$(ABSOLUTE_WCTYPE_H)|g' \
-e 's/@''HAVE_WCTYPE_CTMP_BUG''@/$(HAVE_WCTYPE_CTMP_BUG)/g' \
-e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
-e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \
-e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \
-e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \
< $(srcdir)/wctype_.h; \
< $(srcdir)/wctype.in.h; \
} > $@-t
mv $@-t $@
MOSTLYCLEANFILES += wctype.h wctype.h-t
EXTRA_DIST += wctype_.h
EXTRA_DIST += wctype.in.h
## end gnulib module wctype
## begin gnulib module wcwidth
libgnu_a_SOURCES += wcwidth.h
## end gnulib module wcwidth
## begin gnulib module xalloc
@ -604,4 +1022,5 @@ mostlyclean-local: mostlyclean-generic
if test -n "$$dir" && test -d $$dir; then \
echo "rmdir $$dir"; rmdir $$dir; \
fi; \
done
done; \
:

File diff suppressed because it is too large Load diff

View file

@ -486,4 +486,4 @@ i00afunc (long address)
# endif /* CRAY */
# endif /* no alloca */
#endif /* not GCC version 2 */
#endif /* not GCC version 3 */

View file

@ -1,11 +1,11 @@
/* Memory allocation on the stack.
Copyright (C) 1995, 1999, 2001, 2002, 2003, 2004, 2006 Free Software
Copyright (C) 1995, 1999, 2001-2004, 2006-2007 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 2, or (at your option)
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,
@ -20,8 +20,8 @@
/* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H
means there is a real alloca function. */
#ifndef _GNULIB_ALLOCA_H
# define _GNULIB_ALLOCA_H
#ifndef _GL_ALLOCA_H
#define _GL_ALLOCA_H
/* alloca (N) returns a pointer to N bytes of memory
allocated on the stack, which will last until the function returns.
@ -51,4 +51,4 @@ void *alloca (size_t);
# endif
#endif
#endif /* _GNULIB_ALLOCA_H */
#endif /* _GL_ALLOCA_H */

View file

@ -3,7 +3,7 @@
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 2, or (at your option)
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,

View file

@ -1,9 +1,9 @@
/* Formatted output to strings.
Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
Copyright (C) 1999, 2002, 2006-2007 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 2, or (at your option)
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,
@ -18,7 +18,11 @@
#include <config.h>
/* Specification. */
#include "vasprintf.h"
#ifdef IN_LIBASPRINTF
# include "vasprintf.h"
#else
# include <stdio.h>
#endif
#include <stdarg.h>

425
gl/base64.c Normal file
View file

@ -0,0 +1,425 @@
/* base64.c -- Encode binary data using printable characters.
Copyright (C) 1999, 2000, 2001, 2004, 2005, 2006 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. */
/* Written by Simon Josefsson. Partially adapted from GNU MailUtils
* (mailbox/filter_trans.c, as of 2004-11-28). Improved by review
* from Paul Eggert, Bruno Haible, and Stepan Kasal.
*
* See also RFC 3548 <http://www.ietf.org/rfc/rfc3548.txt>.
*
* Be careful with error checking. Here is how you would typically
* use these functions:
*
* bool ok = base64_decode_alloc (in, inlen, &out, &outlen);
* if (!ok)
* FAIL: input was not valid base64
* if (out == NULL)
* FAIL: memory allocation error
* OK: data in OUT/OUTLEN
*
* size_t outlen = base64_encode_alloc (in, inlen, &out);
* if (out == NULL && outlen == 0 && inlen != 0)
* FAIL: input too long
* if (out == NULL)
* FAIL: memory allocation error
* OK: data in OUT/OUTLEN.
*
*/
#include <config.h>
/* Get prototype. */
#include "base64.h"
/* Get malloc. */
#include <stdlib.h>
/* Get UCHAR_MAX. */
#include <limits.h>
/* C89 compliant way to cast 'char' to 'unsigned char'. */
static inline unsigned char
to_uchar (char ch)
{
return ch;
}
/* Base64 encode IN array of size INLEN into OUT array of size OUTLEN.
If OUTLEN is less than BASE64_LENGTH(INLEN), write as many bytes as
possible. If OUTLEN is larger than BASE64_LENGTH(INLEN), also zero
terminate the output buffer. */
void
base64_encode (const char *restrict in, size_t inlen,
char *restrict out, size_t outlen)
{
static const char b64str[64] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
while (inlen && outlen)
{
*out++ = b64str[(to_uchar (in[0]) >> 2) & 0x3f];
if (!--outlen)
break;
*out++ = b64str[((to_uchar (in[0]) << 4)
+ (--inlen ? to_uchar (in[1]) >> 4 : 0))
& 0x3f];
if (!--outlen)
break;
*out++ =
(inlen
? b64str[((to_uchar (in[1]) << 2)
+ (--inlen ? to_uchar (in[2]) >> 6 : 0))
& 0x3f]
: '=');
if (!--outlen)
break;
*out++ = inlen ? b64str[to_uchar (in[2]) & 0x3f] : '=';
if (!--outlen)
break;
if (inlen)
inlen--;
if (inlen)
in += 3;
}
if (outlen)
*out = '\0';
}
/* Allocate a buffer and store zero terminated base64 encoded data
from array IN of size INLEN, returning BASE64_LENGTH(INLEN), i.e.,
the length of the encoded data, excluding the terminating zero. On
return, the OUT variable will hold a pointer to newly allocated
memory that must be deallocated by the caller. If output string
length would overflow, 0 is returned and OUT is set to NULL. If
memory allocation failed, OUT is set to NULL, and the return value
indicates length of the requested memory block, i.e.,
BASE64_LENGTH(inlen) + 1. */
size_t
base64_encode_alloc (const char *in, size_t inlen, char **out)
{
size_t outlen = 1 + BASE64_LENGTH (inlen);
/* Check for overflow in outlen computation.
*
* If there is no overflow, outlen >= inlen.
*
* If the operation (inlen + 2) overflows then it yields at most +1, so
* outlen is 0.
*
* If the multiplication overflows, we lose at least half of the
* correct value, so the result is < ((inlen + 2) / 3) * 2, which is
* less than (inlen + 2) * 0.66667, which is less than inlen as soon as
* (inlen > 4).
*/
if (inlen > outlen)
{
*out = NULL;
return 0;
}
*out = malloc (outlen);
if (!*out)
return outlen;
base64_encode (in, inlen, *out, outlen);
return outlen - 1;
}
/* With this approach this file works independent of the charset used
(think EBCDIC). However, it does assume that the characters in the
Base64 alphabet (A-Za-z0-9+/) are encoded in 0..255. POSIX
1003.1-2001 require that char and unsigned char are 8-bit
quantities, though, taking care of that problem. But this may be a
potential problem on non-POSIX C99 platforms.
IBM C V6 for AIX mishandles "#define B64(x) ...'x'...", so use "_"
as the formal parameter rather than "x". */
#define B64(_) \
((_) == 'A' ? 0 \
: (_) == 'B' ? 1 \
: (_) == 'C' ? 2 \
: (_) == 'D' ? 3 \
: (_) == 'E' ? 4 \
: (_) == 'F' ? 5 \
: (_) == 'G' ? 6 \
: (_) == 'H' ? 7 \
: (_) == 'I' ? 8 \
: (_) == 'J' ? 9 \
: (_) == 'K' ? 10 \
: (_) == 'L' ? 11 \
: (_) == 'M' ? 12 \
: (_) == 'N' ? 13 \
: (_) == 'O' ? 14 \
: (_) == 'P' ? 15 \
: (_) == 'Q' ? 16 \
: (_) == 'R' ? 17 \
: (_) == 'S' ? 18 \
: (_) == 'T' ? 19 \
: (_) == 'U' ? 20 \
: (_) == 'V' ? 21 \
: (_) == 'W' ? 22 \
: (_) == 'X' ? 23 \
: (_) == 'Y' ? 24 \
: (_) == 'Z' ? 25 \
: (_) == 'a' ? 26 \
: (_) == 'b' ? 27 \
: (_) == 'c' ? 28 \
: (_) == 'd' ? 29 \
: (_) == 'e' ? 30 \
: (_) == 'f' ? 31 \
: (_) == 'g' ? 32 \
: (_) == 'h' ? 33 \
: (_) == 'i' ? 34 \
: (_) == 'j' ? 35 \
: (_) == 'k' ? 36 \
: (_) == 'l' ? 37 \
: (_) == 'm' ? 38 \
: (_) == 'n' ? 39 \
: (_) == 'o' ? 40 \
: (_) == 'p' ? 41 \
: (_) == 'q' ? 42 \
: (_) == 'r' ? 43 \
: (_) == 's' ? 44 \
: (_) == 't' ? 45 \
: (_) == 'u' ? 46 \
: (_) == 'v' ? 47 \
: (_) == 'w' ? 48 \
: (_) == 'x' ? 49 \
: (_) == 'y' ? 50 \
: (_) == 'z' ? 51 \
: (_) == '0' ? 52 \
: (_) == '1' ? 53 \
: (_) == '2' ? 54 \
: (_) == '3' ? 55 \
: (_) == '4' ? 56 \
: (_) == '5' ? 57 \
: (_) == '6' ? 58 \
: (_) == '7' ? 59 \
: (_) == '8' ? 60 \
: (_) == '9' ? 61 \
: (_) == '+' ? 62 \
: (_) == '/' ? 63 \
: -1)
static const signed char b64[0x100] = {
B64 (0), B64 (1), B64 (2), B64 (3),
B64 (4), B64 (5), B64 (6), B64 (7),
B64 (8), B64 (9), B64 (10), B64 (11),
B64 (12), B64 (13), B64 (14), B64 (15),
B64 (16), B64 (17), B64 (18), B64 (19),
B64 (20), B64 (21), B64 (22), B64 (23),
B64 (24), B64 (25), B64 (26), B64 (27),
B64 (28), B64 (29), B64 (30), B64 (31),
B64 (32), B64 (33), B64 (34), B64 (35),
B64 (36), B64 (37), B64 (38), B64 (39),
B64 (40), B64 (41), B64 (42), B64 (43),
B64 (44), B64 (45), B64 (46), B64 (47),
B64 (48), B64 (49), B64 (50), B64 (51),
B64 (52), B64 (53), B64 (54), B64 (55),
B64 (56), B64 (57), B64 (58), B64 (59),
B64 (60), B64 (61), B64 (62), B64 (63),
B64 (64), B64 (65), B64 (66), B64 (67),
B64 (68), B64 (69), B64 (70), B64 (71),
B64 (72), B64 (73), B64 (74), B64 (75),
B64 (76), B64 (77), B64 (78), B64 (79),
B64 (80), B64 (81), B64 (82), B64 (83),
B64 (84), B64 (85), B64 (86), B64 (87),
B64 (88), B64 (89), B64 (90), B64 (91),
B64 (92), B64 (93), B64 (94), B64 (95),
B64 (96), B64 (97), B64 (98), B64 (99),
B64 (100), B64 (101), B64 (102), B64 (103),
B64 (104), B64 (105), B64 (106), B64 (107),
B64 (108), B64 (109), B64 (110), B64 (111),
B64 (112), B64 (113), B64 (114), B64 (115),
B64 (116), B64 (117), B64 (118), B64 (119),
B64 (120), B64 (121), B64 (122), B64 (123),
B64 (124), B64 (125), B64 (126), B64 (127),
B64 (128), B64 (129), B64 (130), B64 (131),
B64 (132), B64 (133), B64 (134), B64 (135),
B64 (136), B64 (137), B64 (138), B64 (139),
B64 (140), B64 (141), B64 (142), B64 (143),
B64 (144), B64 (145), B64 (146), B64 (147),
B64 (148), B64 (149), B64 (150), B64 (151),
B64 (152), B64 (153), B64 (154), B64 (155),
B64 (156), B64 (157), B64 (158), B64 (159),
B64 (160), B64 (161), B64 (162), B64 (163),
B64 (164), B64 (165), B64 (166), B64 (167),
B64 (168), B64 (169), B64 (170), B64 (171),
B64 (172), B64 (173), B64 (174), B64 (175),
B64 (176), B64 (177), B64 (178), B64 (179),
B64 (180), B64 (181), B64 (182), B64 (183),
B64 (184), B64 (185), B64 (186), B64 (187),
B64 (188), B64 (189), B64 (190), B64 (191),
B64 (192), B64 (193), B64 (194), B64 (195),
B64 (196), B64 (197), B64 (198), B64 (199),
B64 (200), B64 (201), B64 (202), B64 (203),
B64 (204), B64 (205), B64 (206), B64 (207),
B64 (208), B64 (209), B64 (210), B64 (211),
B64 (212), B64 (213), B64 (214), B64 (215),
B64 (216), B64 (217), B64 (218), B64 (219),
B64 (220), B64 (221), B64 (222), B64 (223),
B64 (224), B64 (225), B64 (226), B64 (227),
B64 (228), B64 (229), B64 (230), B64 (231),
B64 (232), B64 (233), B64 (234), B64 (235),
B64 (236), B64 (237), B64 (238), B64 (239),
B64 (240), B64 (241), B64 (242), B64 (243),
B64 (244), B64 (245), B64 (246), B64 (247),
B64 (248), B64 (249), B64 (250), B64 (251),
B64 (252), B64 (253), B64 (254), B64 (255)
};
#if UCHAR_MAX == 255
# define uchar_in_range(c) true
#else
# define uchar_in_range(c) ((c) <= 255)
#endif
/* Return true if CH is a character from the Base64 alphabet, and
false otherwise. Note that '=' is padding and not considered to be
part of the alphabet. */
bool
isbase64 (char ch)
{
return uchar_in_range (to_uchar (ch)) && 0 <= b64[to_uchar (ch)];
}
/* Decode base64 encoded input array IN of length INLEN to output
array OUT that can hold *OUTLEN bytes. Return true if decoding was
successful, i.e. if the input was valid base64 data, false
otherwise. If *OUTLEN is too small, as many bytes as possible will
be written to OUT. On return, *OUTLEN holds the length of decoded
bytes in OUT. Note that as soon as any non-alphabet characters are
encountered, decoding is stopped and false is returned. This means
that, when applicable, you must remove any line terminators that is
part of the data stream before calling this function. */
bool
base64_decode (const char *restrict in, size_t inlen,
char *restrict out, size_t *outlen)
{
size_t outleft = *outlen;
while (inlen >= 2)
{
if (!isbase64 (in[0]) || !isbase64 (in[1]))
break;
if (outleft)
{
*out++ = ((b64[to_uchar (in[0])] << 2)
| (b64[to_uchar (in[1])] >> 4));
outleft--;
}
if (inlen == 2)
break;
if (in[2] == '=')
{
if (inlen != 4)
break;
if (in[3] != '=')
break;
}
else
{
if (!isbase64 (in[2]))
break;
if (outleft)
{
*out++ = (((b64[to_uchar (in[1])] << 4) & 0xf0)
| (b64[to_uchar (in[2])] >> 2));
outleft--;
}
if (inlen == 3)
break;
if (in[3] == '=')
{
if (inlen != 4)
break;
}
else
{
if (!isbase64 (in[3]))
break;
if (outleft)
{
*out++ = (((b64[to_uchar (in[2])] << 6) & 0xc0)
| b64[to_uchar (in[3])]);
outleft--;
}
}
}
in += 4;
inlen -= 4;
}
*outlen -= outleft;
if (inlen != 0)
return false;
return true;
}
/* Allocate an output buffer in *OUT, and decode the base64 encoded
data stored in IN of size INLEN to the *OUT buffer. On return, the
size of the decoded data is stored in *OUTLEN. OUTLEN may be NULL,
if the caller is not interested in the decoded length. *OUT may be
NULL to indicate an out of memory error, in which case *OUTLEN
contains the size of the memory block needed. The function returns
true on successful decoding and memory allocation errors. (Use the
*OUT and *OUTLEN parameters to differentiate between successful
decoding and memory error.) The function returns false if the
input was invalid, in which case *OUT is NULL and *OUTLEN is
undefined. */
bool
base64_decode_alloc (const char *in, size_t inlen, char **out,
size_t *outlen)
{
/* This may allocate a few bytes too much, depending on input,
but it's not worth the extra CPU time to compute the exact amount.
The exact amount is 3 * inlen / 4, minus 1 if the input ends
with "=" and minus another 1 if the input ends with "==".
Dividing before multiplying avoids the possibility of overflow. */
size_t needlen = 3 * (inlen / 4) + 2;
*out = malloc (needlen);
if (!*out)
return true;
if (!base64_decode (in, inlen, *out, &needlen))
{
free (*out);
*out = NULL;
return false;
}
if (outlen)
*outlen = needlen;
return true;
}

45
gl/base64.h Normal file
View file

@ -0,0 +1,45 @@
/* base64.h -- Encode binary data using printable characters.
Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
Written by Simon Josefsson.
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. */
#ifndef BASE64_H
# define BASE64_H
/* Get size_t. */
# include <stddef.h>
/* Get bool. */
# include <stdbool.h>
/* This uses that the expression (n+(k-1))/k means the smallest
integer >= n/k, i.e., the ceiling of n/k. */
# define BASE64_LENGTH(inlen) ((((inlen) + 2) / 3) * 4)
extern bool isbase64 (char ch);
extern void base64_encode (const char *restrict in, size_t inlen,
char *restrict out, size_t outlen);
extern size_t base64_encode_alloc (const char *in, size_t inlen, char **out);
extern bool base64_decode (const char *restrict in, size_t inlen,
char *restrict out, size_t *outlen);
extern bool base64_decode_alloc (const char *in, size_t inlen,
char **out, size_t *outlen);
#endif /* BASE64_H */

View file

@ -3,10 +3,10 @@
Copyright (C) 1990, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006 Free
Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
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 2, or (at your option)
any later version.
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
@ -14,8 +14,7 @@
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. */
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>

View file

@ -2,10 +2,10 @@
Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
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 2, or (at your option)
any later version.
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
@ -13,8 +13,7 @@
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. */
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* Written by Paul Eggert. */

View file

@ -2,10 +2,10 @@
Copyright (C) 1991, 2004, 2005, 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
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 2, or (at your option)
any later version.
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
@ -13,8 +13,7 @@
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.
along with this program. If not, see <http://www.gnu.org/licenses/>.
The code is taken from glibc/manual/llio.texi */

649
gl/config.charset Executable file
View file

@ -0,0 +1,649 @@
#! /bin/sh
# Output a system dependent table of character encoding aliases.
#
# Copyright (C) 2000-2004, 2006-2007 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.
#
# The table consists of lines of the form
# ALIAS CANONICAL
#
# ALIAS is the (system dependent) result of "nl_langinfo (CODESET)".
# ALIAS is compared in a case sensitive way.
#
# CANONICAL is the GNU canonical name for this character encoding.
# It must be an encoding supported by libiconv. Support by GNU libc is
# also desirable. CANONICAL is case insensitive. Usually an upper case
# MIME charset name is preferred.
# 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
# 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
# KOI8-R Y glibc solaris freebsd netbsd openbsd darwin
# KOI8-U Y glibc freebsd netbsd openbsd darwin
# KOI8-T glibc
# CP437 dos
# CP775 dos
# CP850 aix osf dos
# CP852 dos
# CP855 dos
# CP856 aix
# CP857 dos
# CP861 dos
# CP862 dos
# CP864 dos
# CP865 dos
# CP866 freebsd netbsd openbsd darwin dos
# CP869 dos
# CP874 woe32 dos
# CP922 aix
# CP932 aix woe32 dos
# CP943 aix
# CP949 osf woe32 dos
# CP950 woe32 dos
# CP1046 aix
# CP1124 aix
# CP1125 dos
# CP1129 aix
# CP1250 woe32
# CP1251 glibc solaris netbsd openbsd darwin woe32
# CP1252 aix woe32
# CP1253 woe32
# CP1254 woe32
# CP1255 glibc woe32
# CP1256 woe32
# 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-TW glibc aix hpux irix osf solaris netbsd
# BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin
# BIG5-HKSCS glibc solaris
# GBK glibc aix osf solaris woe32 dos
# GB18030 glibc solaris netbsd
# SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin
# JOHAB glibc solaris woe32
# TIS-620 glibc aix hpux osf solaris
# VISCII Y glibc
# TCVN5712-1 glibc
# GEORGIAN-PS glibc
# HP-ROMAN8 hpux
# HP-ARABIC8 hpux
# HP-GREEK8 hpux
# HP-HEBREW8 hpux
# HP-TURKISH8 hpux
# HP-KANA8 hpux
# DEC-KANJI osf
# DEC-HANYU osf
# UTF-8 Y glibc aix hpux osf solaris netbsd darwin
#
# Note: Names which are not marked as being a MIME name should not be used in
# Internet protocols for information interchange (mail, news, etc.).
#
# Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
# must understand both names and treat them as equivalent.
#
# The first argument passed to this file is the canonical host specification,
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
host="$1"
os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'`
echo "# This file contains a table of character encoding aliases,"
echo "# suitable for operating system '${os}'."
echo "# It was automatically generated from config.charset."
# List of references, updated during installation:
echo "# Packages using this file: "
case "$os" in
linux-gnulibc1*)
# Linux libc5 doesn't have nl_langinfo(CODESET); therefore
# localcharset.c falls back to using the full locale name
# from the environment variables.
echo "C ASCII"
echo "POSIX ASCII"
for l in af af_ZA ca ca_ES da da_DK de de_AT de_BE de_CH de_DE de_LU \
en en_AU en_BW en_CA en_DK en_GB en_IE en_NZ en_US en_ZA \
en_ZW es es_AR es_BO es_CL es_CO es_DO es_EC es_ES es_GT \
es_HN es_MX es_PA es_PE es_PY es_SV es_US es_UY es_VE et \
et_EE eu eu_ES fi fi_FI fo fo_FO fr fr_BE fr_CA fr_CH fr_FR \
fr_LU ga ga_IE gl gl_ES id id_ID in in_ID is is_IS it it_CH \
it_IT kl kl_GL nl nl_BE nl_NL no no_NO pt pt_BR pt_PT sv \
sv_FI sv_SE; do
echo "$l ISO-8859-1"
echo "$l.iso-8859-1 ISO-8859-1"
echo "$l.iso-8859-15 ISO-8859-15"
echo "$l.iso-8859-15@euro ISO-8859-15"
echo "$l@euro ISO-8859-15"
echo "$l.cp-437 CP437"
echo "$l.cp-850 CP850"
echo "$l.cp-1252 CP1252"
echo "$l.cp-1252@euro CP1252"
#echo "$l.atari-st ATARI-ST" # not a commonly used encoding
echo "$l.utf-8 UTF-8"
echo "$l.utf-8@euro UTF-8"
done
for l in cs cs_CZ hr hr_HR hu hu_HU pl pl_PL ro ro_RO sk sk_SK sl \
sl_SI sr sr_CS sr_YU; do
echo "$l ISO-8859-2"
echo "$l.iso-8859-2 ISO-8859-2"
echo "$l.cp-852 CP852"
echo "$l.cp-1250 CP1250"
echo "$l.utf-8 UTF-8"
done
for l in mk mk_MK ru ru_RU; do
echo "$l ISO-8859-5"
echo "$l.iso-8859-5 ISO-8859-5"
echo "$l.koi8-r KOI8-R"
echo "$l.cp-866 CP866"
echo "$l.cp-1251 CP1251"
echo "$l.utf-8 UTF-8"
done
for l in ar ar_SA; do
echo "$l ISO-8859-6"
echo "$l.iso-8859-6 ISO-8859-6"
echo "$l.cp-864 CP864"
#echo "$l.cp-868 CP868" # not a commonly used encoding
echo "$l.cp-1256 CP1256"
echo "$l.utf-8 UTF-8"
done
for l in el el_GR gr gr_GR; do
echo "$l ISO-8859-7"
echo "$l.iso-8859-7 ISO-8859-7"
echo "$l.cp-869 CP869"
echo "$l.cp-1253 CP1253"
echo "$l.cp-1253@euro CP1253"
echo "$l.utf-8 UTF-8"
echo "$l.utf-8@euro UTF-8"
done
for l in he he_IL iw iw_IL; do
echo "$l ISO-8859-8"
echo "$l.iso-8859-8 ISO-8859-8"
echo "$l.cp-862 CP862"
echo "$l.cp-1255 CP1255"
echo "$l.utf-8 UTF-8"
done
for l in tr tr_TR; do
echo "$l ISO-8859-9"
echo "$l.iso-8859-9 ISO-8859-9"
echo "$l.cp-857 CP857"
echo "$l.cp-1254 CP1254"
echo "$l.utf-8 UTF-8"
done
for l in lt lt_LT lv lv_LV; do
#echo "$l BALTIC" # not a commonly used encoding, wrong encoding name
echo "$l ISO-8859-13"
done
for l in ru_UA uk uk_UA; do
echo "$l KOI8-U"
done
for l in zh zh_CN; do
#echo "$l GB_2312-80" # not a commonly used encoding, wrong encoding name
echo "$l GB2312"
done
for l in ja ja_JP ja_JP.EUC; do
echo "$l EUC-JP"
done
for l in ko ko_KR; do
echo "$l EUC-KR"
done
for l in th th_TH; do
echo "$l TIS-620"
done
for l in fa fa_IR; do
#echo "$l ISIRI-3342" # a broken encoding
echo "$l.utf-8 UTF-8"
done
;;
linux* | *-gnu*)
# With glibc-2.1 or newer, we don't need any canonicalization,
# because glibc has iconv and both glibc and libiconv support all
# GNU canonical names directly. Therefore, the Makefile does not
# need to install the alias file at all.
# The following applies only to glibc-2.0.x and older libcs.
echo "ISO_646.IRV:1983 ASCII"
;;
aix*)
echo "ISO8859-1 ISO-8859-1"
echo "ISO8859-2 ISO-8859-2"
echo "ISO8859-5 ISO-8859-5"
echo "ISO8859-6 ISO-8859-6"
echo "ISO8859-7 ISO-8859-7"
echo "ISO8859-8 ISO-8859-8"
echo "ISO8859-9 ISO-8859-9"
echo "ISO8859-15 ISO-8859-15"
echo "IBM-850 CP850"
echo "IBM-856 CP856"
echo "IBM-921 ISO-8859-13"
echo "IBM-922 CP922"
echo "IBM-932 CP932"
echo "IBM-943 CP943"
echo "IBM-1046 CP1046"
echo "IBM-1124 CP1124"
echo "IBM-1129 CP1129"
echo "IBM-1252 CP1252"
echo "IBM-eucCN GB2312"
echo "IBM-eucJP EUC-JP"
echo "IBM-eucKR EUC-KR"
echo "IBM-eucTW EUC-TW"
echo "big5 BIG5"
echo "GBK GBK"
echo "TIS-620 TIS-620"
echo "UTF-8 UTF-8"
;;
hpux*)
echo "iso88591 ISO-8859-1"
echo "iso88592 ISO-8859-2"
echo "iso88595 ISO-8859-5"
echo "iso88596 ISO-8859-6"
echo "iso88597 ISO-8859-7"
echo "iso88598 ISO-8859-8"
echo "iso88599 ISO-8859-9"
echo "iso885915 ISO-8859-15"
echo "roman8 HP-ROMAN8"
echo "arabic8 HP-ARABIC8"
echo "greek8 HP-GREEK8"
echo "hebrew8 HP-HEBREW8"
echo "turkish8 HP-TURKISH8"
echo "kana8 HP-KANA8"
echo "tis620 TIS-620"
echo "big5 BIG5"
echo "eucJP EUC-JP"
echo "eucKR EUC-KR"
echo "eucTW EUC-TW"
echo "hp15CN GB2312"
#echo "ccdc ?" # what is this?
echo "SJIS SHIFT_JIS"
echo "utf8 UTF-8"
;;
irix*)
echo "ISO8859-1 ISO-8859-1"
echo "ISO8859-2 ISO-8859-2"
echo "ISO8859-5 ISO-8859-5"
echo "ISO8859-7 ISO-8859-7"
echo "ISO8859-9 ISO-8859-9"
echo "eucCN GB2312"
echo "eucJP EUC-JP"
echo "eucKR EUC-KR"
echo "eucTW EUC-TW"
;;
osf*)
echo "ISO8859-1 ISO-8859-1"
echo "ISO8859-2 ISO-8859-2"
echo "ISO8859-4 ISO-8859-4"
echo "ISO8859-5 ISO-8859-5"
echo "ISO8859-7 ISO-8859-7"
echo "ISO8859-8 ISO-8859-8"
echo "ISO8859-9 ISO-8859-9"
echo "ISO8859-15 ISO-8859-15"
echo "cp850 CP850"
echo "big5 BIG5"
echo "dechanyu DEC-HANYU"
echo "dechanzi GB2312"
echo "deckanji DEC-KANJI"
echo "deckorean EUC-KR"
echo "eucJP EUC-JP"
echo "eucKR EUC-KR"
echo "eucTW EUC-TW"
echo "GBK GBK"
echo "KSC5601 CP949"
echo "sdeckanji EUC-JP"
echo "SJIS SHIFT_JIS"
echo "TACTIS TIS-620"
echo "UTF-8 UTF-8"
;;
solaris*)
echo "646 ASCII"
echo "ISO8859-1 ISO-8859-1"
echo "ISO8859-2 ISO-8859-2"
echo "ISO8859-3 ISO-8859-3"
echo "ISO8859-4 ISO-8859-4"
echo "ISO8859-5 ISO-8859-5"
echo "ISO8859-6 ISO-8859-6"
echo "ISO8859-7 ISO-8859-7"
echo "ISO8859-8 ISO-8859-8"
echo "ISO8859-9 ISO-8859-9"
echo "ISO8859-15 ISO-8859-15"
echo "koi8-r KOI8-R"
echo "ansi-1251 CP1251"
echo "BIG5 BIG5"
echo "Big5-HKSCS BIG5-HKSCS"
echo "gb2312 GB2312"
echo "GBK GBK"
echo "GB18030 GB18030"
echo "cns11643 EUC-TW"
echo "5601 EUC-KR"
echo "ko_KR.johap92 JOHAB"
echo "eucJP EUC-JP"
echo "PCK SHIFT_JIS"
echo "TIS620.2533 TIS-620"
#echo "sun_eu_greek ?" # what is this?
echo "UTF-8 UTF-8"
;;
freebsd* | os2*)
# FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
# localcharset.c falls back to using the full locale name
# from the environment variables.
# Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just
# reuse FreeBSD's locale data for OS/2.
echo "C ASCII"
echo "US-ASCII ASCII"
for l in la_LN lt_LN; do
echo "$l.ASCII ASCII"
done
for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \
lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do
echo "$l.ISO_8859-1 ISO-8859-1"
echo "$l.DIS_8859-15 ISO-8859-15"
done
for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do
echo "$l.ISO_8859-2 ISO-8859-2"
done
for l in la_LN lt_LT; do
echo "$l.ISO_8859-4 ISO-8859-4"
done
for l in ru_RU ru_SU; do
echo "$l.KOI8-R KOI8-R"
echo "$l.ISO_8859-5 ISO-8859-5"
echo "$l.CP866 CP866"
done
echo "uk_UA.KOI8-U KOI8-U"
echo "zh_TW.BIG5 BIG5"
echo "zh_TW.Big5 BIG5"
echo "zh_CN.EUC GB2312"
echo "ja_JP.EUC EUC-JP"
echo "ja_JP.SJIS SHIFT_JIS"
echo "ja_JP.Shift_JIS SHIFT_JIS"
echo "ko_KR.EUC EUC-KR"
;;
netbsd*)
echo "646 ASCII"
echo "ISO8859-1 ISO-8859-1"
echo "ISO8859-2 ISO-8859-2"
echo "ISO8859-4 ISO-8859-4"
echo "ISO8859-5 ISO-8859-5"
echo "ISO8859-7 ISO-8859-7"
echo "ISO8859-13 ISO-8859-13"
echo "ISO8859-15 ISO-8859-15"
echo "eucCN GB2312"
echo "eucJP EUC-JP"
echo "eucKR EUC-KR"
echo "eucTW EUC-TW"
echo "BIG5 BIG5"
echo "SJIS SHIFT_JIS"
;;
openbsd*)
echo "646 ASCII"
echo "ISO8859-1 ISO-8859-1"
echo "ISO8859-2 ISO-8859-2"
echo "ISO8859-4 ISO-8859-4"
echo "ISO8859-5 ISO-8859-5"
echo "ISO8859-7 ISO-8859-7"
echo "ISO8859-13 ISO-8859-13"
echo "ISO8859-15 ISO-8859-15"
;;
darwin[56]*)
# Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore
# localcharset.c falls back to using the full locale name
# from the environment variables.
echo "C ASCII"
for l in en_AU en_CA en_GB en_US la_LN; do
echo "$l.US-ASCII ASCII"
done
for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE \
nl_NL no_NO pt_PT sv_SE; do
echo "$l ISO-8859-1"
echo "$l.ISO8859-1 ISO-8859-1"
echo "$l.ISO8859-15 ISO-8859-15"
done
for l in la_LN; do
echo "$l.ISO8859-1 ISO-8859-1"
echo "$l.ISO8859-15 ISO-8859-15"
done
for l in cs_CZ hr_HR hu_HU la_LN pl_PL sl_SI; do
echo "$l.ISO8859-2 ISO-8859-2"
done
for l in la_LN lt_LT; do
echo "$l.ISO8859-4 ISO-8859-4"
done
for l in ru_RU; do
echo "$l.KOI8-R KOI8-R"
echo "$l.ISO8859-5 ISO-8859-5"
echo "$l.CP866 CP866"
done
for l in bg_BG; do
echo "$l.CP1251 CP1251"
done
echo "uk_UA.KOI8-U KOI8-U"
echo "zh_TW.BIG5 BIG5"
echo "zh_TW.Big5 BIG5"
echo "zh_CN.EUC GB2312"
echo "ja_JP.EUC EUC-JP"
echo "ja_JP.SJIS SHIFT_JIS"
echo "ko_KR.EUC EUC-KR"
;;
darwin*)
# Darwin 7.5 has nl_langinfo(CODESET), but it is useless:
# - It returns the empty string when LANG is set to a locale of the
# form ll_CC, although ll_CC/LC_CTYPE is a symlink to an UTF-8
# LC_CTYPE file.
# - The environment variables LANG, LC_CTYPE, LC_ALL are not set by
# the system; nl_langinfo(CODESET) returns "US-ASCII" in this case.
# - The documentation says:
# "... all code that calls BSD system routines should ensure
# that the const *char parameters of these routines are in UTF-8
# encoding. All BSD system functions expect their string
# parameters to be in UTF-8 encoding and nothing else."
# It also says
# "An additional caveat is that string parameters for files,
# paths, and other file-system entities must be in canonical
# UTF-8. In a canonical UTF-8 Unicode string, all decomposable
# characters are decomposed ..."
# but this is not true: You can pass non-decomposed UTF-8 strings
# to file system functions, and it is the OS which will convert
# them to decomposed UTF-8 before accessing the file system.
# - The Apple Terminal application displays UTF-8 by default.
# - However, other applications are free to use different encodings:
# - xterm uses ISO-8859-1 by default.
# - TextEdit uses MacRoman by default.
# We prefer UTF-8 over decomposed UTF-8-MAC because one should
# minimize the use of decomposed Unicode. Unfortunately, through the
# Darwin file system, decomposed UTF-8 strings are leaked into user
# space nevertheless.
echo "* UTF-8"
;;
beos*)
# BeOS has a single locale, and it has UTF-8 encoding.
echo "* UTF-8"
;;
msdosdjgpp*)
# DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore
# localcharset.c falls back to using the full locale name
# from the environment variables.
echo "#"
echo "# The encodings given here may not all be correct."
echo "# If you find that the encoding given for your language and"
echo "# country is not the one your DOS machine actually uses, just"
echo "# correct it in this file, and send a mail to"
echo "# Juan Manuel Guerrero <juan.guerrero@gmx.de>"
echo "# and Bruno Haible <bruno@clisp.org>."
echo "#"
echo "C ASCII"
# ISO-8859-1 languages
echo "ca CP850"
echo "ca_ES CP850"
echo "da CP865" # not CP850 ??
echo "da_DK CP865" # not CP850 ??
echo "de CP850"
echo "de_AT CP850"
echo "de_CH CP850"
echo "de_DE CP850"
echo "en CP850"
echo "en_AU CP850" # not CP437 ??
echo "en_CA CP850"
echo "en_GB CP850"
echo "en_NZ CP437"
echo "en_US CP437"
echo "en_ZA CP850" # not CP437 ??
echo "es CP850"
echo "es_AR CP850"
echo "es_BO CP850"
echo "es_CL CP850"
echo "es_CO CP850"
echo "es_CR CP850"
echo "es_CU CP850"
echo "es_DO CP850"
echo "es_EC CP850"
echo "es_ES CP850"
echo "es_GT CP850"
echo "es_HN CP850"
echo "es_MX CP850"
echo "es_NI CP850"
echo "es_PA CP850"
echo "es_PY CP850"
echo "es_PE CP850"
echo "es_SV CP850"
echo "es_UY CP850"
echo "es_VE CP850"
echo "et CP850"
echo "et_EE CP850"
echo "eu CP850"
echo "eu_ES CP850"
echo "fi CP850"
echo "fi_FI CP850"
echo "fr CP850"
echo "fr_BE CP850"
echo "fr_CA CP850"
echo "fr_CH CP850"
echo "fr_FR CP850"
echo "ga CP850"
echo "ga_IE CP850"
echo "gd CP850"
echo "gd_GB CP850"
echo "gl CP850"
echo "gl_ES CP850"
echo "id CP850" # not CP437 ??
echo "id_ID CP850" # not CP437 ??
echo "is CP861" # not CP850 ??
echo "is_IS CP861" # not CP850 ??
echo "it CP850"
echo "it_CH CP850"
echo "it_IT CP850"
echo "lt CP775"
echo "lt_LT CP775"
echo "lv CP775"
echo "lv_LV CP775"
echo "nb CP865" # not CP850 ??
echo "nb_NO CP865" # not CP850 ??
echo "nl CP850"
echo "nl_BE CP850"
echo "nl_NL CP850"
echo "nn CP865" # not CP850 ??
echo "nn_NO CP865" # not CP850 ??
echo "no CP865" # not CP850 ??
echo "no_NO CP865" # not CP850 ??
echo "pt CP850"
echo "pt_BR CP850"
echo "pt_PT CP850"
echo "sv CP850"
echo "sv_SE CP850"
# ISO-8859-2 languages
echo "cs CP852"
echo "cs_CZ CP852"
echo "hr CP852"
echo "hr_HR CP852"
echo "hu CP852"
echo "hu_HU CP852"
echo "pl CP852"
echo "pl_PL CP852"
echo "ro CP852"
echo "ro_RO CP852"
echo "sk CP852"
echo "sk_SK CP852"
echo "sl CP852"
echo "sl_SI CP852"
echo "sq CP852"
echo "sq_AL CP852"
echo "sr CP852" # CP852 or CP866 or CP855 ??
echo "sr_CS CP852" # CP852 or CP866 or CP855 ??
echo "sr_YU CP852" # CP852 or CP866 or CP855 ??
# ISO-8859-3 languages
echo "mt CP850"
echo "mt_MT CP850"
# ISO-8859-5 languages
echo "be CP866"
echo "be_BE CP866"
echo "bg CP866" # not CP855 ??
echo "bg_BG CP866" # not CP855 ??
echo "mk CP866" # not CP855 ??
echo "mk_MK CP866" # not CP855 ??
echo "ru CP866"
echo "ru_RU CP866"
echo "uk CP1125"
echo "uk_UA CP1125"
# ISO-8859-6 languages
echo "ar CP864"
echo "ar_AE CP864"
echo "ar_DZ CP864"
echo "ar_EG CP864"
echo "ar_IQ CP864"
echo "ar_IR CP864"
echo "ar_JO CP864"
echo "ar_KW CP864"
echo "ar_MA CP864"
echo "ar_OM CP864"
echo "ar_QA CP864"
echo "ar_SA CP864"
echo "ar_SY CP864"
# ISO-8859-7 languages
echo "el CP869"
echo "el_GR CP869"
# ISO-8859-8 languages
echo "he CP862"
echo "he_IL CP862"
# ISO-8859-9 languages
echo "tr CP857"
echo "tr_TR CP857"
# Japanese
echo "ja CP932"
echo "ja_JP CP932"
# Chinese
echo "zh_CN GBK"
echo "zh_TW CP950" # not CP938 ??
# Korean
echo "kr CP949" # not CP934 ??
echo "kr_KR CP949" # not CP934 ??
# Thai
echo "th CP874"
echo "th_TH CP874"
# Other
echo "eo CP850"
echo "eo_EO CP850"
;;
esac

View file

@ -2,10 +2,10 @@
Copyright (C) 2005, 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
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 2, or (at your option)
any later version.
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
@ -13,8 +13,7 @@
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. */
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* Written by Jim Meyering. */

View file

@ -3,10 +3,10 @@
Copyright (C) 1990, 1998, 2000, 2001, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
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 2, or (at your option)
any later version.
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
@ -14,8 +14,7 @@
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. */
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>

View file

@ -2,10 +2,10 @@
Copyright (C) 1998, 2001, 2003-2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
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 2, or (at your option)
any later version.
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
@ -13,8 +13,7 @@
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. */
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef DIRNAME_H_
# define DIRNAME_H_ 1

View file

@ -2,10 +2,10 @@
Copyright (C) 2001, 2004, 2005, 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
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 2, or (at your option)
any later version.
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
@ -13,8 +13,7 @@
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. */
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* Written by Paul Eggert. */

View file

@ -1,20 +1,19 @@
/* Error handler for noninteractive utilities
Copyright (C) 1990-1998, 2000-2005, 2006 Free Software Foundation, Inc.
Copyright (C) 1990-1998, 2000-2007 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
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 2, or (at your option)
any later version.
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, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
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 David MacKenzie <djm@gnu.ai.mit.edu>. */
@ -31,6 +30,7 @@
#if !_LIBC && ENABLE_NLS
# include "gettext.h"
# define _(msgid) gettext (msgid)
#endif
#ifdef _LIBC

View file

@ -1,27 +1,26 @@
/* Declaration for error-reporting function
Copyright (C) 1995, 1996, 1997, 2003, 2006 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997, 2003, 2006, 2008 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
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 2, or (at your option)
any later version.
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, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
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 _ERROR_H
#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) || __STRICT_ANSI__
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
# define __attribute__(Spec) /* empty */
# endif
/* The __-protected variants of `format' and `printf' attributes

View file

@ -1,32 +0,0 @@
/* exit() function.
Copyright (C) 1995, 2001 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 2, 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. */
#ifndef _EXIT_H
#define _EXIT_H
/* Get exit() declaration. */
#include <stdlib.h>
/* Some systems do not define EXIT_*, despite otherwise supporting C89. */
#ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
#endif
#ifndef EXIT_FAILURE
# define EXIT_FAILURE 1
#endif
#endif /* _EXIT_H */

View file

@ -1,11 +1,11 @@
/* Failure exit status
Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
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 2, or (at your option)
any later version.
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
@ -13,13 +13,12 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
#include "exitfail.h"
#include "exit.h"
#include <stdlib.h>
int volatile exit_failure = EXIT_FAILURE;

View file

@ -2,10 +2,10 @@
Copyright (C) 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
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 2, or (at your option)
any later version.
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
@ -13,8 +13,6 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
along with this program. If not, see <http://www.gnu.org/licenses/>. */
extern int volatile exit_failure;

View file

@ -2,10 +2,10 @@
Copyright (C) 2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
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 2, or (at your option)
any later version.
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
@ -13,8 +13,7 @@
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. */
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* Written by Paul Eggert. */

View file

@ -2,10 +2,10 @@
Copyright (C) 2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
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 2, or (at your option)
any later version.
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
@ -13,8 +13,7 @@
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. */
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* Written by Paul Eggert. */

View file

@ -2,10 +2,10 @@
Copyright (C) 2005, 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
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 2, or (at your option)
any later version.
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
@ -13,8 +13,7 @@
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. */
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* Written by Paul Eggert. */

148
gl/float+.h Normal file
View file

@ -0,0 +1,148 @@
/* Supplemental information about the floating-point formats.
Copyright (C) 2007 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
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. */
#ifndef _FLOATPLUS_H
#define _FLOATPLUS_H
#include <float.h>
#include <limits.h>
/* Number of bits in the mantissa of a floating-point number, including the
"hidden bit". */
#if FLT_RADIX == 2
# define FLT_MANT_BIT FLT_MANT_DIG
# define DBL_MANT_BIT DBL_MANT_DIG
# define LDBL_MANT_BIT LDBL_MANT_DIG
#elif FLT_RADIX == 4
# define FLT_MANT_BIT (FLT_MANT_DIG * 2)
# define DBL_MANT_BIT (DBL_MANT_DIG * 2)
# define LDBL_MANT_BIT (LDBL_MANT_DIG * 2)
#elif FLT_RADIX == 16
# define FLT_MANT_BIT (FLT_MANT_DIG * 4)
# define DBL_MANT_BIT (DBL_MANT_DIG * 4)
# define LDBL_MANT_BIT (LDBL_MANT_DIG * 4)
#endif
/* Bit mask that can be used to mask the exponent, as an unsigned number. */
#define FLT_EXP_MASK ((FLT_MAX_EXP - FLT_MIN_EXP) | 7)
#define DBL_EXP_MASK ((DBL_MAX_EXP - DBL_MIN_EXP) | 7)
#define LDBL_EXP_MASK ((LDBL_MAX_EXP - LDBL_MIN_EXP) | 7)
/* Number of bits used for the exponent of a floating-point number, including
the exponent's sign. */
#define FLT_EXP_BIT \
(FLT_EXP_MASK < 0x100 ? 8 : \
FLT_EXP_MASK < 0x200 ? 9 : \
FLT_EXP_MASK < 0x400 ? 10 : \
FLT_EXP_MASK < 0x800 ? 11 : \
FLT_EXP_MASK < 0x1000 ? 12 : \
FLT_EXP_MASK < 0x2000 ? 13 : \
FLT_EXP_MASK < 0x4000 ? 14 : \
FLT_EXP_MASK < 0x8000 ? 15 : \
FLT_EXP_MASK < 0x10000 ? 16 : \
FLT_EXP_MASK < 0x20000 ? 17 : \
FLT_EXP_MASK < 0x40000 ? 18 : \
FLT_EXP_MASK < 0x80000 ? 19 : \
FLT_EXP_MASK < 0x100000 ? 20 : \
FLT_EXP_MASK < 0x200000 ? 21 : \
FLT_EXP_MASK < 0x400000 ? 22 : \
FLT_EXP_MASK < 0x800000 ? 23 : \
FLT_EXP_MASK < 0x1000000 ? 24 : \
FLT_EXP_MASK < 0x2000000 ? 25 : \
FLT_EXP_MASK < 0x4000000 ? 26 : \
FLT_EXP_MASK < 0x8000000 ? 27 : \
FLT_EXP_MASK < 0x10000000 ? 28 : \
FLT_EXP_MASK < 0x20000000 ? 29 : \
FLT_EXP_MASK < 0x40000000 ? 30 : \
FLT_EXP_MASK <= 0x7fffffff ? 31 : \
32)
#define DBL_EXP_BIT \
(DBL_EXP_MASK < 0x100 ? 8 : \
DBL_EXP_MASK < 0x200 ? 9 : \
DBL_EXP_MASK < 0x400 ? 10 : \
DBL_EXP_MASK < 0x800 ? 11 : \
DBL_EXP_MASK < 0x1000 ? 12 : \
DBL_EXP_MASK < 0x2000 ? 13 : \
DBL_EXP_MASK < 0x4000 ? 14 : \
DBL_EXP_MASK < 0x8000 ? 15 : \
DBL_EXP_MASK < 0x10000 ? 16 : \
DBL_EXP_MASK < 0x20000 ? 17 : \
DBL_EXP_MASK < 0x40000 ? 18 : \
DBL_EXP_MASK < 0x80000 ? 19 : \
DBL_EXP_MASK < 0x100000 ? 20 : \
DBL_EXP_MASK < 0x200000 ? 21 : \
DBL_EXP_MASK < 0x400000 ? 22 : \
DBL_EXP_MASK < 0x800000 ? 23 : \
DBL_EXP_MASK < 0x1000000 ? 24 : \
DBL_EXP_MASK < 0x2000000 ? 25 : \
DBL_EXP_MASK < 0x4000000 ? 26 : \
DBL_EXP_MASK < 0x8000000 ? 27 : \
DBL_EXP_MASK < 0x10000000 ? 28 : \
DBL_EXP_MASK < 0x20000000 ? 29 : \
DBL_EXP_MASK < 0x40000000 ? 30 : \
DBL_EXP_MASK <= 0x7fffffff ? 31 : \
32)
#define LDBL_EXP_BIT \
(LDBL_EXP_MASK < 0x100 ? 8 : \
LDBL_EXP_MASK < 0x200 ? 9 : \
LDBL_EXP_MASK < 0x400 ? 10 : \
LDBL_EXP_MASK < 0x800 ? 11 : \
LDBL_EXP_MASK < 0x1000 ? 12 : \
LDBL_EXP_MASK < 0x2000 ? 13 : \
LDBL_EXP_MASK < 0x4000 ? 14 : \
LDBL_EXP_MASK < 0x8000 ? 15 : \
LDBL_EXP_MASK < 0x10000 ? 16 : \
LDBL_EXP_MASK < 0x20000 ? 17 : \
LDBL_EXP_MASK < 0x40000 ? 18 : \
LDBL_EXP_MASK < 0x80000 ? 19 : \
LDBL_EXP_MASK < 0x100000 ? 20 : \
LDBL_EXP_MASK < 0x200000 ? 21 : \
LDBL_EXP_MASK < 0x400000 ? 22 : \
LDBL_EXP_MASK < 0x800000 ? 23 : \
LDBL_EXP_MASK < 0x1000000 ? 24 : \
LDBL_EXP_MASK < 0x2000000 ? 25 : \
LDBL_EXP_MASK < 0x4000000 ? 26 : \
LDBL_EXP_MASK < 0x8000000 ? 27 : \
LDBL_EXP_MASK < 0x10000000 ? 28 : \
LDBL_EXP_MASK < 0x20000000 ? 29 : \
LDBL_EXP_MASK < 0x40000000 ? 30 : \
LDBL_EXP_MASK <= 0x7fffffff ? 31 : \
32)
/* Number of bits used for a floating-point number: the mantissa (not
counting the "hidden bit", since it may or may not be explicit), the
exponent, and the sign. */
#define FLT_TOTAL_BIT ((FLT_MANT_BIT - 1) + FLT_EXP_BIT + 1)
#define DBL_TOTAL_BIT ((DBL_MANT_BIT - 1) + DBL_EXP_BIT + 1)
#define LDBL_TOTAL_BIT ((LDBL_MANT_BIT - 1) + LDBL_EXP_BIT + 1)
/* Number of bytes used for a floating-point number.
This can be smaller than the 'sizeof'. For example, on i386 systems,
'long double' most often have LDBL_MANT_BIT = 64, LDBL_EXP_BIT = 16, hence
LDBL_TOTAL_BIT = 80 bits, i.e. 10 bytes of consecutive memory, but
sizeof (long double) = 12 or = 16. */
#define SIZEOF_FLT ((FLT_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT)
#define SIZEOF_DBL ((DBL_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT)
#define SIZEOF_LDBL ((LDBL_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT)
/* Verify that SIZEOF_FLT <= sizeof (float) etc. */
typedef int verify_sizeof_flt[2 * (SIZEOF_FLT <= sizeof (float)) - 1];
typedef int verify_sizeof_dbl[2 * (SIZEOF_DBL <= sizeof (double)) - 1];
typedef int verify_sizeof_ldbl[2 * (SIZEOF_LDBL <= sizeof (long double)) - 1];
#endif /* _FLOATPLUS_H */

58
gl/float.in.h Normal file
View file

@ -0,0 +1,58 @@
/* A correct <float.h>.
Copyright (C) 2007 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_FLOAT_H
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_FLOAT_H@
#ifndef _GL_FLOAT_H
#define _GL_FLOAT_H
/* 'long double' properties. */
#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
/* Number of mantissa units, in base FLT_RADIX. */
# undef LDBL_MANT_DIG
# define LDBL_MANT_DIG 64
/* Number of decimal digits that is sufficient for representing a number. */
# undef LDBL_DIG
# define LDBL_DIG 18
/* x-1 where x is the smallest representable number > 1. */
# undef LDBL_EPSILON
# define LDBL_EPSILON 1.0842021724855044340E-19L
/* Minimum e such that FLT_RADIX^(e-1) is a normalized number. */
# undef LDBL_MIN_EXP
# define LDBL_MIN_EXP (-16381)
/* Maximum e such that FLT_RADIX^(e-1) is a representable finite number. */
# undef LDBL_MAX_EXP
# define LDBL_MAX_EXP 16384
/* Minimum positive normalized number. */
# undef LDBL_MIN
# define LDBL_MIN 3.3621031431120935063E-4932L
/* Maximum representable finite number. */
# undef LDBL_MAX
# define LDBL_MAX 1.1897314953572317650E+4932L
/* Minimum e such that 10^e is in the range of normalized numbers. */
# undef LDBL_MIN_10_EXP
# define LDBL_MIN_10_EXP (-4931)
/* Maximum e such that 10^e is in the range of representable finite numbers. */
# undef LDBL_MAX_10_EXP
# define LDBL_MAX_10_EXP 4932
#endif
#endif /* _GL_FLOAT_H */
#endif /* _GL_FLOAT_H */

93
gl/floor.c Normal file
View file

@ -0,0 +1,93 @@
/* Round towards negative infinity.
Copyright (C) 2007 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 Bruno Haible <bruno@clisp.org>, 2007. */
#include <config.h>
/* Specification. */
#include <math.h>
#include <float.h>
#ifdef USE_LONG_DOUBLE
# define FUNC floorl
# define DOUBLE long double
# define MANT_DIG LDBL_MANT_DIG
# define L_(literal) literal##L
#elif ! defined USE_FLOAT
# define FUNC floor
# define DOUBLE double
# define MANT_DIG DBL_MANT_DIG
# define L_(literal) literal
#else /* defined USE_FLOAT */
# define FUNC floorf
# define DOUBLE float
# define MANT_DIG FLT_MANT_DIG
# define L_(literal) literal##f
#endif
/* 2^(MANT_DIG-1). */
static const DOUBLE TWO_MANT_DIG =
/* Assume MANT_DIG <= 5 * 31.
Use the identity
n = floor(n/5) + floor((n+1)/5) + ... + floor((n+4)/5). */
(DOUBLE) (1U << ((MANT_DIG - 1) / 5))
* (DOUBLE) (1U << ((MANT_DIG - 1 + 1) / 5))
* (DOUBLE) (1U << ((MANT_DIG - 1 + 2) / 5))
* (DOUBLE) (1U << ((MANT_DIG - 1 + 3) / 5))
* (DOUBLE) (1U << ((MANT_DIG - 1 + 4) / 5));
DOUBLE
FUNC (DOUBLE x)
{
/* The use of 'volatile' guarantees that excess precision bits are dropped
at each addition step and before the following comparison at the caller's
site. It is necessary on x86 systems where double-floats are not IEEE
compliant by default, to avoid that the results become platform and compiler
option dependent. 'volatile' is a portable alternative to gcc's
-ffloat-store option. */
volatile DOUBLE y = x;
volatile DOUBLE z = y;
if (z > L_(0.0))
{
/* Avoid rounding errors for values near 2^k, where k >= MANT_DIG-1. */
if (z < TWO_MANT_DIG)
{
/* Round to the next integer (nearest or up or down, doesn't matter). */
z += TWO_MANT_DIG;
z -= TWO_MANT_DIG;
/* Enforce rounding down. */
if (z > y)
z -= L_(1.0);
}
}
else if (z < L_(0.0))
{
/* Avoid rounding errors for values near -2^k, where k >= MANT_DIG-1. */
if (z > - TWO_MANT_DIG)
{
/* Round to the next integer (nearest or up or down, doesn't matter). */
z -= TWO_MANT_DIG;
z += TWO_MANT_DIG;
/* Enforce rounding down. */
if (z > y)
z -= L_(1.0);
}
}
return z;
}

20
gl/floorf.c Normal file
View file

@ -0,0 +1,20 @@
/* Round towards negative infinity.
Copyright (C) 2007 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 Bruno Haible <bruno@clisp.org>, 2007. */
#define USE_FLOAT
#include "floor.c"

View file

@ -3,10 +3,10 @@
Copyright (C) 1991, 1992, 1996, 1998, 1999, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
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 2, or (at your option)
any later version.
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
@ -14,8 +14,7 @@
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. */
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>

View file

@ -3,10 +3,10 @@
Copyright (C) 1991, 1992, 1997, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
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 2, or (at your option)
any later version.
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
@ -14,8 +14,7 @@
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. */
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* Space usage statistics for a file system. Blocks are 512-byte. */

View file

@ -1,10 +1,10 @@
/* An interface to read that retries after partial reads and interrupts.
Copyright (C) 2002, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
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 2, or (at your option)
any later version.
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
@ -12,8 +12,7 @@
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. */
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#define FULL_READ
#include "full-write.c"

View file

@ -2,10 +2,10 @@
Copyright (C) 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
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 2, or (at your option)
any later version.
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
@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, read to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <stddef.h>

View file

@ -3,10 +3,10 @@
Copyright (C) 1993, 1994, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
2004, 2005, 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
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 2, or (at your option)
any later version.
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
@ -14,8 +14,7 @@
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. */
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>

View file

@ -2,10 +2,10 @@
Copyright (C) 2002-2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
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 2, or (at your option)
any later version.
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
@ -13,8 +13,7 @@
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. */
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <stddef.h>

View file

@ -4,7 +4,7 @@
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 2, or (at your option)
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,
@ -52,6 +52,7 @@ values[] =
{ EAI_SERVICE, N_("Servname not supported for ai_socktype") },
{ EAI_SOCKTYPE, N_("ai_socktype not supported") },
{ EAI_SYSTEM, N_("System error") },
{ EAI_OVERFLOW, N_("Argument buffer too small") },
#ifdef __USE_GNU
{ EAI_INPROGRESS, N_("Processing request in progress") },
{ EAI_CANCELED, N_("Request canceled") },

View file

@ -1,11 +1,11 @@
/* Get address information (partial implementation).
Copyright (C) 1997, 2001, 2002, 2004, 2005, 2006 Free Software
Copyright (C) 1997, 2001, 2002, 2004, 2005, 2006, 2007 Free Software
Foundation, Inc.
Contributed by Simon Josefsson <simon@josefsson.org>.
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 2, or (at your option)
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,
@ -28,9 +28,12 @@
/* Get calloc. */
#include <stdlib.h>
/* Get memcpy. */
/* Get memcpy, strdup. */
#include <string.h>
/* Get snprintf. */
#include <stdio.h>
#include <stdbool.h>
#include "gettext.h"
@ -38,8 +41,6 @@
#define N_(String) String
#include "inet_ntop.h"
#include "snprintf.h"
#include "strdup.h"
/* BeOS has AF_INET, but not PF_INET. */
#ifndef PF_INET
@ -178,7 +179,7 @@ getaddrinfo (const char *restrict nodename,
const char *proto =
(hints && hints->ai_socktype == SOCK_DGRAM) ? "udp" : "tcp";
if (!(hints->ai_flags & AI_NUMERICSERV))
if (hints == NULL || !(hints->ai_flags & AI_NUMERICSERV))
/* FIXME: Use getservbyname_r if available. */
se = getservbyname (servname, proto);

View file

@ -5,7 +5,7 @@
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 2, or (at your option)
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,

View file

@ -1,11 +1,11 @@
/* gethostname emulation for SysV and POSIX.1.
Copyright (C) 1992, 2003, 2006 Free Software Foundation, Inc.
Copyright (C) 1992, 2003, 2006, 2008 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
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 2, or (at your option)
any later version.
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
@ -13,8 +13,7 @@
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. */
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* David MacKenzie <djm@gnu.ai.mit.edu> */
@ -24,6 +23,8 @@
# include <sys/utsname.h>
#endif
#include <string.h>
/* Put up to LEN chars of the host name into NAME.
Null terminate it if the name is shorter than LEN.
Return 0 if ok, -1 if error. */

View file

@ -1,16 +1,16 @@
/* Get the system load averages.
Copyright (C) 1985, 1986, 1987, 1988, 1989, 1991, 1992, 1993, 1994,
1995, 1997, 1999, 2000, 2003, 2004, 2005, 2006 Free Software
1995, 1997, 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software
Foundation, Inc.
NOTE: The canonical source of this file is maintained with gnulib.
Bugs can be reported to bug-gnulib@gnu.org.
This program is free software; you can redistribute it and/or modify
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 2, or (at your option)
any later version.
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
@ -18,9 +18,7 @@
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. */
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* Compile-time symbols that this file uses:
@ -32,6 +30,8 @@
If that isn't an option, then just put
AC_CHECK_FUNCS(pstat_getdynamic) in your
configure.in file.
HAVE_LIBPERFSTAT Define this if your system has the
perfstat_cpu_total function in libperfstat (AIX).
FIXUP_KERNEL_SYMBOL_ADDR() Adjust address in returned struct nlist.
KERNEL_FILE Name of the kernel file to nlist.
LDAV_CVT() Scale the load average from the kernel.
@ -188,6 +188,8 @@
# include <sys/socket.h>
# include <net/route.h>
# include <sys/table.h>
/* Tru64 4.0D's table.h redefines sys */
# undef sys
# endif
# if defined (__osf__) && (defined (mips) || defined (__mips__))
@ -254,7 +256,7 @@
# define LOAD_AVE_TYPE long
# endif
# ifdef _AIX
# if defined _AIX && ! defined HAVE_LIBPERFSTAT
# define LOAD_AVE_TYPE long
# endif
@ -309,7 +311,7 @@
# define FSCALE 100.0
# endif
# ifdef _AIX
# if defined _AIX && !defined HAVE_LIBPERFSTAT
# define FSCALE 65536.0
# endif
@ -347,7 +349,7 @@
# define LDAV_SYMBOL "_Loadavg"
# endif
# if !defined (LDAV_SYMBOL) && ((defined (hpux) && !defined (hp9000s300)) || defined (_SEQUENT_) || defined (SVR4) || defined (ISC) || defined (sgi) || (defined (ardent) && defined (titan)) || defined (_AIX))
# if !defined (LDAV_SYMBOL) && ((defined (hpux) && !defined (hp9000s300)) || defined (_SEQUENT_) || defined (SVR4) || defined (ISC) || defined (sgi) || (defined (ardent) && defined (titan)) || (defined (_AIX) && !defined(HAVE_LIBPERFSTAT)))
# define LDAV_SYMBOL "avenrun"
# endif
@ -404,6 +406,14 @@
# endif /* LOAD_AVE_TYPE */
# if defined HAVE_LIBPERFSTAT
# include <libperfstat.h>
# include <sys/proc.h>
# ifndef SBITS
# define SBITS 16
# endif
# endif
# if defined (__GNU__) && !defined (NeXT)
/* Note that NeXT Openstep defines __GNU__ even though it should not. */
/* GNU system acts much like NeXT, for load average purposes,
@ -568,6 +578,22 @@ getloadavg (double loadavg[], int nelem)
# endif /* hpux && HAVE_PSTAT_GETDYNAMIC */
# if ! defined LDAV_DONE && defined HAVE_LIBPERFSTAT
# define LDAV_DONE
# undef LOAD_AVE_TYPE
/* Use perfstat_cpu_total because we don't have to be root. */
{
perfstat_cpu_total_t cpu_stats;
int result = perfstat_cpu_total (NULL, &cpu_stats, sizeof cpu_stats, 1);
if (result == -1)
return result;
loadavg[0] = cpu_stats.loadavg[0] / (double)(1 << SBITS);
loadavg[1] = cpu_stats.loadavg[1] / (double)(1 << SBITS);
loadavg[2] = cpu_stats.loadavg[2] / (double)(1 << SBITS);
elem = 3;
}
# endif
# if !defined (LDAV_DONE) && (defined (__linux__) || defined (__CYGWIN__))
# define LDAV_DONE
# undef LOAD_AVE_TYPE

View file

@ -6,19 +6,18 @@
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
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 2, or (at your option)
any later version.
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, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
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 _LIBC
# include <config.h>

View file

@ -1,21 +1,20 @@
/* Declarations for getopt.
Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2005,2006
Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2005,2006,2007
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
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 2, or (at your option)
any later version.
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, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
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
@ -101,7 +100,7 @@
# endif
#endif
#ifdef __cplusplus
#ifdef __cplusplus
extern "C" {
#endif
@ -216,7 +215,7 @@ extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv,
#endif
#ifdef __cplusplus
#ifdef __cplusplus
}
#endif

View file

@ -3,19 +3,18 @@
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
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 2, or (at your option)
any later version.
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, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifdef _LIBC
# include <getopt.h>

View file

@ -3,19 +3,18 @@
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
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 2, or (at your option)
any later version.
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, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
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_INT_H
#define _GETOPT_INT_H 1

View file

@ -3,7 +3,7 @@
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 2, or (at your option)
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,

View file

@ -4,7 +4,7 @@
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 2, or (at your option)
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,

View file

@ -3,7 +3,7 @@
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 2, or (at your option)
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,

View file

@ -2,10 +2,10 @@
Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
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 2, or (at your option)
any later version.
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
@ -13,8 +13,7 @@
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. */
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* Written by Paul Eggert. */

460
gl/localcharset.c Normal file
View file

@ -0,0 +1,460 @@
/* Determine a canonical name for the current locale's character encoding.
Copyright (C) 2000-2006 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. */
/* Written by Bruno Haible <bruno@clisp.org>. */
#include <config.h>
/* Specification. */
#include "localcharset.h"
#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#if defined _WIN32 || defined __WIN32__
# define WIN32_NATIVE
#endif
#if defined __EMX__
/* Assume EMX program runs on OS/2, even if compiled under DOS. */
# define OS2
#endif
#if !defined WIN32_NATIVE
# if HAVE_LANGINFO_CODESET
# include <langinfo.h>
# else
# if 0 /* see comment below */
# include <locale.h>
# endif
# endif
# ifdef __CYGWIN__
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# endif
#elif defined WIN32_NATIVE
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
#endif
#if defined OS2
# define INCL_DOS
# include <os2.h>
#endif
#if ENABLE_RELOCATABLE
# include "relocatable.h"
#else
# define relocate(pathname) (pathname)
#endif
/* Get LIBDIR. */
#ifndef LIBDIR
# include "configmake.h"
#endif
#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
/* Win32, Cygwin, OS/2, DOS */
# define ISSLASH(C) ((C) == '/' || (C) == '\\')
#endif
#ifndef DIRECTORY_SEPARATOR
# define DIRECTORY_SEPARATOR '/'
#endif
#ifndef ISSLASH
# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
#endif
#if HAVE_DECL_GETC_UNLOCKED
# undef getc
# define getc getc_unlocked
#endif
/* The following static variable is declared 'volatile' to avoid a
possible multithread problem in the function get_charset_aliases. If we
are running in a threaded environment, and if two threads initialize
'charset_aliases' simultaneously, both will produce the same value,
and everything will be ok if the two assignments to 'charset_aliases'
are atomic. But I don't know what will happen if the two assignments mix. */
#if __STDC__ != 1
# define volatile /* empty */
#endif
/* Pointer to the contents of the charset.alias file, if it has already been
read, else NULL. Its format is:
ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */
static const char * volatile charset_aliases;
/* Return a pointer to the contents of the charset.alias file. */
static const char *
get_charset_aliases (void)
{
const char *cp;
cp = charset_aliases;
if (cp == NULL)
{
#if !(defined VMS || defined WIN32_NATIVE || defined __CYGWIN__)
FILE *fp;
const char *dir;
const char *base = "charset.alias";
char *file_name;
/* Make it possible to override the charset.alias location. This is
necessary for running the testsuite before "make install". */
dir = getenv ("CHARSETALIASDIR");
if (dir == NULL || dir[0] == '\0')
dir = relocate (LIBDIR);
/* Concatenate dir and base into freshly allocated file_name. */
{
size_t dir_len = strlen (dir);
size_t base_len = strlen (base);
int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1]));
file_name = (char *) malloc (dir_len + add_slash + base_len + 1);
if (file_name != NULL)
{
memcpy (file_name, dir, dir_len);
if (add_slash)
file_name[dir_len] = DIRECTORY_SEPARATOR;
memcpy (file_name + dir_len + add_slash, base, base_len + 1);
}
}
if (file_name == NULL || (fp = fopen (file_name, "r")) == NULL)
/* Out of memory or file not found, treat it as empty. */
cp = "";
else
{
/* Parse the file's contents. */
char *res_ptr = NULL;
size_t res_size = 0;
for (;;)
{
int c;
char buf1[50+1];
char buf2[50+1];
size_t l1, l2;
char *old_res_ptr;
c = getc (fp);
if (c == EOF)
break;
if (c == '\n' || c == ' ' || c == '\t')
continue;
if (c == '#')
{
/* Skip comment, to end of line. */
do
c = getc (fp);
while (!(c == EOF || c == '\n'));
if (c == EOF)
break;
continue;
}
ungetc (c, fp);
if (fscanf (fp, "%50s %50s", buf1, buf2) < 2)
break;
l1 = strlen (buf1);
l2 = strlen (buf2);
old_res_ptr = res_ptr;
if (res_size == 0)
{
res_size = l1 + 1 + l2 + 1;
res_ptr = (char *) malloc (res_size + 1);
}
else
{
res_size += l1 + 1 + l2 + 1;
res_ptr = (char *) realloc (res_ptr, res_size + 1);
}
if (res_ptr == NULL)
{
/* Out of memory. */
res_size = 0;
if (old_res_ptr != NULL)
free (old_res_ptr);
break;
}
strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1);
strcpy (res_ptr + res_size - (l2 + 1), buf2);
}
fclose (fp);
if (res_size == 0)
cp = "";
else
{
*(res_ptr + res_size) = '\0';
cp = res_ptr;
}
}
if (file_name != NULL)
free (file_name);
#else
# if defined VMS
/* To avoid the troubles of an extra file charset.alias_vms in the
sources of many GNU packages, simply inline the aliases here. */
/* The list of encodings is taken from the OpenVMS 7.3-1 documentation
"Compaq C Run-Time Library Reference Manual for OpenVMS systems"
section 10.7 "Handling Different Character Sets". */
cp = "ISO8859-1" "\0" "ISO-8859-1" "\0"
"ISO8859-2" "\0" "ISO-8859-2" "\0"
"ISO8859-5" "\0" "ISO-8859-5" "\0"
"ISO8859-7" "\0" "ISO-8859-7" "\0"
"ISO8859-8" "\0" "ISO-8859-8" "\0"
"ISO8859-9" "\0" "ISO-8859-9" "\0"
/* Japanese */
"eucJP" "\0" "EUC-JP" "\0"
"SJIS" "\0" "SHIFT_JIS" "\0"
"DECKANJI" "\0" "DEC-KANJI" "\0"
"SDECKANJI" "\0" "EUC-JP" "\0"
/* Chinese */
"eucTW" "\0" "EUC-TW" "\0"
"DECHANYU" "\0" "DEC-HANYU" "\0"
"DECHANZI" "\0" "GB2312" "\0"
/* Korean */
"DECKOREAN" "\0" "EUC-KR" "\0";
# endif
# if defined WIN32_NATIVE || defined __CYGWIN__
/* To avoid the troubles of installing a separate file in the same
directory as the DLL and of retrieving the DLL's directory at
runtime, simply inline the aliases here. */
cp = "CP936" "\0" "GBK" "\0"
"CP1361" "\0" "JOHAB" "\0"
"CP20127" "\0" "ASCII" "\0"
"CP20866" "\0" "KOI8-R" "\0"
"CP20936" "\0" "GB2312" "\0"
"CP21866" "\0" "KOI8-RU" "\0"
"CP28591" "\0" "ISO-8859-1" "\0"
"CP28592" "\0" "ISO-8859-2" "\0"
"CP28593" "\0" "ISO-8859-3" "\0"
"CP28594" "\0" "ISO-8859-4" "\0"
"CP28595" "\0" "ISO-8859-5" "\0"
"CP28596" "\0" "ISO-8859-6" "\0"
"CP28597" "\0" "ISO-8859-7" "\0"
"CP28598" "\0" "ISO-8859-8" "\0"
"CP28599" "\0" "ISO-8859-9" "\0"
"CP28605" "\0" "ISO-8859-15" "\0"
"CP38598" "\0" "ISO-8859-8" "\0"
"CP51932" "\0" "EUC-JP" "\0"
"CP51936" "\0" "GB2312" "\0"
"CP51949" "\0" "EUC-KR" "\0"
"CP51950" "\0" "EUC-TW" "\0"
"CP54936" "\0" "GB18030" "\0"
"CP65001" "\0" "UTF-8" "\0";
# endif
#endif
charset_aliases = cp;
}
return cp;
}
/* Determine the current locale's character encoding, and canonicalize it
into one of the canonical names listed in config.charset.
The result must not be freed; it is statically allocated.
If the canonical name cannot be determined, the result is a non-canonical
name. */
#ifdef STATIC
STATIC
#endif
const char *
locale_charset (void)
{
const char *codeset;
const char *aliases;
#if !(defined WIN32_NATIVE || defined OS2)
# if HAVE_LANGINFO_CODESET
/* Most systems support nl_langinfo (CODESET) nowadays. */
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. */
if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0)
{
const char *locale;
static char buf[2 + 10 + 1];
locale = getenv ("LC_ALL");
if (locale == NULL || locale[0] == '\0')
{
locale = getenv ("LC_CTYPE");
if (locale == NULL || locale[0] == '\0')
locale = getenv ("LANG");
}
if (locale != NULL && locale[0] != '\0')
{
/* If the locale name contains an encoding after the dot, return
it. */
const char *dot = strchr (locale, '.');
if (dot != NULL)
{
const char *modifier;
dot++;
/* Look for the possible @... trailer and remove it, if any. */
modifier = strchr (dot, '@');
if (modifier == NULL)
return dot;
if (modifier - dot < sizeof (buf))
{
memcpy (buf, dot, modifier - dot);
buf [modifier - dot] = '\0';
return buf;
}
}
}
/* Woe32 has a function returning the locale's codepage as a number. */
sprintf (buf, "CP%u", GetACP ());
codeset = buf;
}
# endif
# else
/* On old systems which lack it, use setlocale or getenv. */
const char *locale = NULL;
/* But most old systems don't have a complete set of locales. Some
(like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
use setlocale here; it would return "C" when it doesn't support the
locale name the user has set. */
# if 0
locale = setlocale (LC_CTYPE, NULL);
# endif
if (locale == NULL || locale[0] == '\0')
{
locale = getenv ("LC_ALL");
if (locale == NULL || locale[0] == '\0')
{
locale = getenv ("LC_CTYPE");
if (locale == NULL || locale[0] == '\0')
locale = getenv ("LANG");
}
}
/* On some old systems, one used to set locale = "iso8859_1". On others,
you set it to "language_COUNTRY.charset". In any case, we resolve it
through the charset.alias file. */
codeset = locale;
# endif
#elif defined WIN32_NATIVE
static char buf[2 + 10 + 1];
/* Woe32 has a function returning the locale's codepage as a number. */
sprintf (buf, "CP%u", GetACP ());
codeset = buf;
#elif defined OS2
const char *locale;
static char buf[2 + 10 + 1];
ULONG cp[3];
ULONG cplen;
/* Allow user to override the codeset, as set in the operating system,
with standard language environment variables. */
locale = getenv ("LC_ALL");
if (locale == NULL || locale[0] == '\0')
{
locale = getenv ("LC_CTYPE");
if (locale == NULL || locale[0] == '\0')
locale = getenv ("LANG");
}
if (locale != NULL && locale[0] != '\0')
{
/* If the locale name contains an encoding after the dot, return it. */
const char *dot = strchr (locale, '.');
if (dot != NULL)
{
const char *modifier;
dot++;
/* Look for the possible @... trailer and remove it, if any. */
modifier = strchr (dot, '@');
if (modifier == NULL)
return dot;
if (modifier - dot < sizeof (buf))
{
memcpy (buf, dot, modifier - dot);
buf [modifier - dot] = '\0';
return buf;
}
}
/* Resolve through the charset.alias file. */
codeset = locale;
}
else
{
/* OS/2 has a function returning the locale's codepage as a number. */
if (DosQueryCp (sizeof (cp), cp, &cplen))
codeset = "";
else
{
sprintf (buf, "CP%u", cp[0]);
codeset = buf;
}
}
#endif
if (codeset == NULL)
/* The canonical name cannot be determined. */
codeset = "";
/* Resolve alias. */
for (aliases = get_charset_aliases ();
*aliases != '\0';
aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1)
if (strcmp (codeset, aliases) == 0
|| (aliases[0] == '*' && aliases[1] == '\0'))
{
codeset = aliases + strlen (aliases) + 1;
break;
}
/* Don't return an empty string. GNU libc and GNU libiconv interpret
the empty string as denoting "the locale's character encoding",
thus GNU libiconv would call this function a second time. */
if (codeset[0] == '\0')
codeset = "ASCII";
return codeset;
}

41
gl/localcharset.h Normal file
View file

@ -0,0 +1,41 @@
/* Determine a canonical name for the current locale's character encoding.
Copyright (C) 2000-2003 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
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. */
#ifndef _LOCALCHARSET_H
#define _LOCALCHARSET_H
#ifdef __cplusplus
extern "C" {
#endif
/* Determine the current locale's character encoding, and canonicalize it
into one of the canonical names listed in config.charset.
The result must not be freed; it is statically allocated.
If the canonical name cannot be determined, the result is a non-canonical
name. */
extern const char * locale_charset (void);
#ifdef __cplusplus
}
#endif
#endif /* _LOCALCHARSET_H */

View file

@ -1,44 +0,0 @@
# absolute-header.m4 serial 6
dnl Copyright (C) 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.
dnl From Derek Price.
# gl_ABSOLUTE_HEADER(HEADER1 HEADER2 ...)
# ---------------------------------------
# Find the absolute name of a header file, assuming the header exists.
# If the header were sys/inttypes.h, this macro would define
# ABSOLUTE_SYS_INTTYPES_H to the `""' quoted absolute name of sys/inttypes.h
# in config.h
# (e.g. `#define ABSOLUTE_SYS_INTTYPES_H "///usr/include/sys/inttypes.h"').
# The three "///" are to pacify Sun C 5.8, which otherwise would say
# "warning: #include of /usr/include/... may be non-portable".
# Use `""', not `<>', so that the /// cannot be confused with a C99 comment.
AC_DEFUN([gl_ABSOLUTE_HEADER],
[AC_LANG_PREPROC_REQUIRE()dnl
AC_FOREACH([gl_HEADER_NAME], [$1],
[AS_VAR_PUSHDEF([gl_absolute_header],
[gl_cv_absolute_]m4_quote(m4_defn([gl_HEADER_NAME])))dnl
AC_CACHE_CHECK([absolute name of <]m4_quote(m4_defn([gl_HEADER_NAME]))[>],
m4_quote(m4_defn([gl_absolute_header])),
[AS_VAR_PUSHDEF([ac_header_exists],
[ac_cv_header_]m4_quote(m4_defn([gl_HEADER_NAME])))dnl
AC_CHECK_HEADERS_ONCE(m4_quote(m4_defn([gl_HEADER_NAME])))dnl
if test AS_VAR_GET(ac_header_exists) = yes; then
AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]])])
dnl eval is necessary to expand ac_cpp.
dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
AS_VAR_SET(gl_absolute_header,
[`(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
sed -n '\#/]m4_quote(m4_defn([gl_HEADER_NAME]))[#{s#.*"\(.*/]m4_quote(m4_defn([gl_HEADER_NAME]))[\)".*#\1#;s#^/[^/]#//&#;p;q;}'`])
fi
AS_VAR_POPDEF([ac_header_exists])dnl
])dnl
AC_DEFINE_UNQUOTED(AS_TR_CPP([ABSOLUTE_]m4_quote(m4_defn([gl_HEADER_NAME]))),
["AS_VAR_GET(gl_absolute_header)"],
[Define this to an absolute name of <]m4_quote(m4_defn([gl_HEADER_NAME]))[>.])
AS_VAR_POPDEF([gl_absolute_header])dnl
])dnl
])# gl_ABSOLUTE_HEADER

View file

@ -1,5 +1,5 @@
# alloca.m4 serial 7
dnl Copyright (C) 2002-2004, 2006 Free Software Foundation, Inc.
# alloca.m4 serial 8
dnl Copyright (C) 2002-2004, 2006, 2007 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.
@ -39,10 +39,6 @@ AC_DEFUN([gl_FUNC_ALLOCA],
ALLOCA_H=alloca.h
fi
AC_SUBST([ALLOCA_H])
AC_DEFINE(HAVE_ALLOCA_H, 1,
[Define HAVE_ALLOCA_H for backward compatibility with older code
that includes <alloca.h> only if HAVE_ALLOCA_H is defined.])
])
# Prerequisites of lib/alloca.c.

16
gl/m4/base64.m4 Normal file
View file

@ -0,0 +1,16 @@
# base64.m4 serial 3
dnl Copyright (C) 2004, 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_FUNC_BASE64],
[
gl_PREREQ_BASE64
])
# Prerequisites of lib/base64.c.
AC_DEFUN([gl_PREREQ_BASE64], [
AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([AC_C_RESTRICT])
])

View file

@ -1,14 +1,14 @@
# serial 4 -*- Autoconf -*-
# serial 5 -*- Autoconf -*-
# Enable extensions on systems that normally disable them.
# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
# Copyright (C) 2003, 2006, 2007 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.
# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS
# Autoconf. Perhaps we can remove this once we can assume Autoconf
# 2.61 or later everywhere, but since CVS Autoconf mutates rapidly
# 2.62 or later everywhere, but since CVS Autoconf mutates rapidly
# enough in this area it's likely we'll need to redefine
# AC_USE_SYSTEM_EXTENSIONS for quite some time.
@ -16,26 +16,48 @@
# ------------------------
# Enable extensions on systems that normally disable them,
# typically due to standards-conformance issues.
# Remember that #undef in AH_VERBATIM gets replaced with #define by
# AC_DEFINE. The goal here is to define all known feature-enabling
# macros, then, if reports of conflicts are made, disable macros that
# cause problems on some platforms (such as __EXTENSIONS__).
AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
[
AC_BEFORE([$0], [AC_COMPILE_IFELSE])
AC_BEFORE([$0], [AC_RUN_IFELSE])
[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
AC_REQUIRE([AC_GNU_SOURCE])
AC_REQUIRE([AC_AIX])
AC_REQUIRE([AC_MINIX])
AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
if test "$MINIX" = yes; then
AC_DEFINE([_POSIX_SOURCE], [1],
[Define to 1 if you need to in order for `stat' and other
things to work.])
AC_DEFINE([_POSIX_1_SOURCE], [2],
[Define to 2 if the system does not provide POSIX.1 features
except with this defined.])
AC_DEFINE([_MINIX], [1],
[Define to 1 if on MINIX.])
fi
AH_VERBATIM([__EXTENSIONS__],
[/* Enable extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
[/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif])
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
#endif
])
AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
[ac_cv_safe_to_define___extensions__],
[AC_COMPILE_IFELSE(
@ -46,9 +68,11 @@ AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
[ac_cv_safe_to_define___extensions__=no])])
test $ac_cv_safe_to_define___extensions__ = yes &&
AC_DEFINE([__EXTENSIONS__])
AC_DEFINE([_ALL_SOURCE])
AC_DEFINE([_GNU_SOURCE])
AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
AC_DEFINE([_TANDEM_SOURCE])
])
])# AC_USE_SYSTEM_EXTENSIONS
# gl_USE_SYSTEM_EXTENSIONS
# ------------------------

19
gl/m4/float_h.m4 Normal file
View file

@ -0,0 +1,19 @@
# float_h.m4 serial 3
dnl Copyright (C) 2007 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_FLOAT_H],
[
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_CANONICAL_HOST])
FLOAT_H=
case "$host_os" in
beos* | openbsd*)
FLOAT_H=float.h
gl_CHECK_NEXT_HEADERS([float.h])
;;
esac
AC_SUBST([FLOAT_H])
])

62
gl/m4/floorf.m4 Normal file
View file

@ -0,0 +1,62 @@
# floorf.m4 serial 3
dnl Copyright (C) 2007 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_FLOORF],
[
AC_REQUIRE([gl_MATH_H_DEFAULTS])
dnl Persuade glibc <math.h> to declare floorf().
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
dnl Test whether floorf() is declared.
AC_CHECK_DECLS([floorf], , , [#include <math.h>])
if test "$ac_cv_have_decl_floorf" = yes; then
dnl Test whether floorf() can be used without libm.
gl_FUNC_FLOORF_LIBS
if test "$FLOORF_LIBM" = "?"; then
dnl Sun C 5.0 on Solaris declares floorf() and has it in the system-wide
dnl libm.so, but not in the libm.so that the compiler uses.
REPLACE_FLOORF=1
fi
else
REPLACE_FLOORF=1
fi
if test $REPLACE_FLOORF = 1; then
AC_LIBOBJ([floorf])
FLOORF_LIBM=
fi
AC_SUBST([REPLACE_FLOORF])
AC_SUBST([FLOORF_LIBM])
])
# Determines the libraries needed to get the floorf() function.
# Sets FLOORF_LIBM.
AC_DEFUN([gl_FUNC_FLOORF_LIBS],
[
AC_CACHE_VAL([gl_cv_func_floorf_libm], [
gl_cv_func_floorf_libm=?
AC_TRY_LINK([
#ifndef __NO_MATH_INLINES
# define __NO_MATH_INLINES 1 /* for glibc */
#endif
#include <math.h>
float x;],
[x = floorf(x);],
[gl_cv_func_floorf_libm=])
if test "$gl_cv_func_floorf_libm" = "?"; then
save_LIBS="$LIBS"
LIBS="$LIBS -lm"
AC_TRY_LINK([
#ifndef __NO_MATH_INLINES
# define __NO_MATH_INLINES 1 /* for glibc */
#endif
#include <math.h>
float x;],
[x = floorf(x);],
[gl_cv_func_floorf_libm="-lm"])
LIBS="$save_LIBS"
fi
])
FLOORF_LIBM="$gl_cv_func_floorf_libm"
])

View file

@ -1,8 +1,7 @@
#serial 22
#serial 23
# Obtaining file system usage information.
# Copyright (C) 1997, 1998, 2000, 2001, 2003, 2004, 2005, 2006 Free Software
# Foundation, Inc.
# Copyright (C) 1997, 1998, 2000, 2001, 2003-2007 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -55,6 +54,11 @@ one of the corresponding file systems is hard-mounted, but not available.
statvfs in GNU libc on BeOS operates differently: it only makes a system
call.
#endif
#ifdef __osf__
"Do not use Tru64's statvfs implementation"
#endif
#include <sys/statvfs.h>],
[struct statvfs fsd; statvfs (0, &fsd);],
fu_cv_sys_stat_statvfs=yes,

View file

@ -1,15 +1,31 @@
# getaddrinfo.m4 serial 11
dnl Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
# getaddrinfo.m4 serial 15
dnl Copyright (C) 2004, 2005, 2006, 2007 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_GETADDRINFO],
[
AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H
AC_MSG_NOTICE([checking how to do getaddrinfo, freeaddrinfo and getnameinfo])
AC_CHECK_HEADERS_ONCE(netdb.h)
AC_SEARCH_LIBS(getaddrinfo, [nsl socket])
AC_CHECK_FUNCS(getaddrinfo,, [
AC_CACHE_CHECK([for getaddrinfo], [gl_cv_func_getaddrinfo], [
AC_TRY_LINK([
#include <sys/types.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
#include <stddef.h>
], [getaddrinfo("", "", NULL, NULL);],
[gl_cv_func_getaddrinfo=yes],
[gl_cv_func_getaddrinfo=no])])
if test $gl_cv_func_getaddrinfo = no; then
AC_CACHE_CHECK(for getaddrinfo in ws2tcpip.h and -lws2_32,
gl_cv_w32_getaddrinfo, [
gl_cv_w32_getaddrinfo=no
@ -19,21 +35,46 @@ AC_DEFUN([gl_GETADDRINFO],
#ifdef HAVE_WS2TCPIP_H
#include <ws2tcpip.h>
#endif
], [getaddrinfo(0, 0, 0, 0);], gl_cv_w32_getaddrinfo=yes)
#include <stddef.h>
], [getaddrinfo(NULL, NULL, NULL, NULL);], gl_cv_w32_getaddrinfo=yes)
LIBS="$am_save_LIBS"])
if test "$gl_cv_w32_getaddrinfo" = "yes"; then
LIBS="$LIBS -lws2_32"
else
AC_LIBOBJ(getaddrinfo)
fi
])
fi
# We can't use AC_REPLACE_FUNCS here because gai_strerror may be an
# inline function declared in ws2tcpip.h, so we need to get that
# header included somehow.
AC_CACHE_CHECK([for gai_strerror (possibly via ws2tcpip.h)],
gl_cv_func_gai_strerror, [
AC_TRY_LINK([
#include <sys/types.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
#ifdef HAVE_WS2TCPIP_H
#include <ws2tcpip.h>
#endif
#include <stddef.h>
], [gai_strerror (NULL);],
[gl_cv_func_gai_strerror=yes],
[gl_cv_func_gai_strerror=no])])
if test $gl_cv_func_gai_strerror = no; then
AC_LIBOBJ(gai_strerror)
fi
AC_REPLACE_FUNCS(gai_strerror)
gl_PREREQ_GETADDRINFO
])
# Prerequisites of lib/getaddrinfo.h and lib/getaddrinfo.c.
AC_DEFUN([gl_PREREQ_GETADDRINFO], [
AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H
AC_SEARCH_LIBS(gethostbyname, [inet nsl])
AC_SEARCH_LIBS(getservbyname, [inet nsl socket xnet])
AC_CHECK_FUNCS(gethostbyname,, [
@ -46,7 +87,8 @@ AC_DEFUN([gl_PREREQ_GETADDRINFO], [
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#endif
], [gethostbyname(0);], gl_cv_w32_gethostbyname=yes)
#include <stddef.h>
], [gethostbyname(NULL);], gl_cv_w32_gethostbyname=yes)
LIBS="$am_save_LIBS"])
if test "$gl_cv_w32_gethostbyname" = "yes"; then
LIBS="$LIBS -lws2_32"
@ -56,7 +98,7 @@ AC_DEFUN([gl_PREREQ_GETADDRINFO], [
AC_REQUIRE([gl_SOCKET_FAMILIES])
AC_REQUIRE([gl_HEADER_SYS_SOCKET])
AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([AC_GNU_SOURCE])
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
AC_CHECK_HEADERS_ONCE(netinet/in.h netdb.h)
AC_CHECK_DECLS([getaddrinfo, freeaddrinfo, gai_strerror, getnameinfo],,,[
/* sys/types.h is not needed according to POSIX, but the

View file

@ -31,6 +31,10 @@ AC_CHECK_FUNCS(pstat_getdynamic)
AC_CHECK_LIB(kstat, kstat_open)
test $ac_cv_lib_kstat_kstat_open = yes && gl_have_func=yes
# AIX has libperfstat which does not require root
AC_CHECK_LIB(perfstat, perfstat_cpu_total)
test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_have_func=yes
# Some systems with -lutil have (and need) -lkvm as well, some do not.
# On Solaris, -lkvm requires nlist from -lelf, so check that first
# to get the right answer into the cache.

View file

@ -1,5 +1,5 @@
# gettext.m4 serial 59 (gettext-0.16.1)
dnl Copyright (C) 1995-2006 Free Software Foundation, Inc.
# gettext.m4 serial 60 (gettext-0.17)
dnl Copyright (C) 1995-2007 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.
@ -362,44 +362,6 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a
])
dnl Checks for special options needed on MacOS X.
dnl Defines INTL_MACOSX_LIBS.
AC_DEFUN([gt_INTL_MACOSX],
[
dnl Check for API introduced in MacOS X 10.2.
AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
gt_cv_func_CFPreferencesCopyAppValue,
[gt_save_LIBS="$LIBS"
LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
[CFPreferencesCopyAppValue(NULL, NULL)],
[gt_cv_func_CFPreferencesCopyAppValue=yes],
[gt_cv_func_CFPreferencesCopyAppValue=no])
LIBS="$gt_save_LIBS"])
if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
[Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
fi
dnl Check for API introduced in MacOS X 10.3.
AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
[gt_save_LIBS="$LIBS"
LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
[gt_cv_func_CFLocaleCopyCurrent=yes],
[gt_cv_func_CFLocaleCopyCurrent=no])
LIBS="$gt_save_LIBS"])
if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
[Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
fi
INTL_MACOSX_LIBS=
if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
fi
AC_SUBST([INTL_MACOSX_LIBS])
])
dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
m4_define([gt_NEEDS_INIT],
[

30
gl/m4/glibc21.m4 Normal file
View file

@ -0,0 +1,30 @@
# glibc21.m4 serial 3
dnl Copyright (C) 2000-2002, 2004 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.
# Test for the GNU C Library, version 2.1 or newer.
# From Bruno Haible.
AC_DEFUN([gl_GLIBC21],
[
AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
ac_cv_gnu_library_2_1,
[AC_EGREP_CPP([Lucky GNU user],
[
#include <features.h>
#ifdef __GNU_LIBRARY__
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
Lucky GNU user
#endif
#endif
],
ac_cv_gnu_library_2_1=yes,
ac_cv_gnu_library_2_1=no)
]
)
AC_SUBST(GLIBC21)
GLIBC21="$ac_cv_gnu_library_2_1"
]
)

View file

@ -1,4 +1,4 @@
# gnulib-common.m4 serial 2
# gnulib-common.m4 serial 3
dnl Copyright (C) 2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -20,3 +20,46 @@ m4_ifdef([AC_PROG_MKDIR_P], [], [
[AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
MKDIR_P='$(mkdir_p)'
AC_SUBST([MKDIR_P])])])
# AC_C_RESTRICT
# This definition overrides the AC_C_RESTRICT macro from autoconf 2.60..2.61,
# so that mixed use of GNU C and GNU C++ and mixed use of Sun C and Sun C++
# works.
# This definition can be removed once autoconf >= 2.62 can be assumed.
AC_DEFUN([AC_C_RESTRICT],
[AC_CACHE_CHECK([for C/C++ restrict keyword], ac_cv_c_restrict,
[ac_cv_c_restrict=no
# The order here caters to the fact that C++ does not require restrict.
for ac_kw in __restrict __restrict__ _Restrict restrict; do
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[typedef int * int_ptr;
int foo (int_ptr $ac_kw ip) {
return ip[0];
}]],
[[int s[1];
int * $ac_kw t = s;
t[0] = 0;
return foo(t)]])],
[ac_cv_c_restrict=$ac_kw])
test "$ac_cv_c_restrict" != no && break
done
])
AH_VERBATIM([restrict],
[/* Define to the equivalent of the C99 'restrict' keyword, or to
nothing if this is not supported. Do not define if restrict is
supported directly. */
#undef restrict
/* Work around a bug in Sun C++: it does not support _Restrict, even
though the corresponding Sun C compiler does, which causes
"#define restrict _Restrict" in the previous line. Perhaps some future
version of Sun C++ will work with _Restrict; if so, it'll probably
define __RESTRICT, just as Sun C does. */
#if defined __SUNPRO_CC && !defined __RESTRICT
# define _Restrict
#endif])
case $ac_cv_c_restrict in
restrict) ;;
no) AC_DEFINE([restrict], []) ;;
*) AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;;
esac
])

View file

@ -27,78 +27,98 @@ AC_DEFUN([gl_EARLY],
AC_REQUIRE([AC_PROG_RANLIB])
AC_REQUIRE([AC_GNU_SOURCE])
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
AC_REQUIRE([gl_LOCK_EARLY])
])
# This macro should be invoked from ./configure.in, in the section
# "Check for header files, types and library functions".
AC_DEFUN([gl_INIT],
[
m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ]))
m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS]))
m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
AM_CONDITIONAL([GL_COND_LIBTOOL], [false])
gl_cond_libtool=false
gl_libdeps=
gl_ltlibdeps=
m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ]))
m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS]))
m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
gl_source_base='gl'
gl_FUNC_ALLOCA
gl_HEADER_ARPA_INET
AC_PROG_MKDIR_P
gl_FUNC_BASE64
gl_C_STRTOD
gl_CLOEXEC
gl_DIRNAME
gl_DOUBLE_SLASH_ROOT
gl_ERROR
m4_ifdef([AM_XGETTEXT_OPTION],
[AM_XGETTEXT_OPTION([--flag=error:3:c-format])
AM_XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
gl_EXITFAIL
dnl gl_USE_SYSTEM_EXTENSIONS must be added quite early to configure.ac.
gl_FCNTL_SAFER
gl_MODULE_INDICATOR([fcntl-safer])
gl_FLOAT_H
gl_FUNC_FLOORF
gl_MATH_MODULE_INDICATOR([floorf])
gl_FSUSAGE
gl_GETADDRINFO
gl_FUNC_GETHOSTNAME
gl_GETLOADAVG([$gl_source_base])
gl_GETOPT
dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac.
AM_GNU_GETTEXT_VERSION([0.15])
AM_GNU_GETTEXT_VERSION([0.17])
AC_SUBST([LIBINTL])
AC_SUBST([LTLIBINTL])
gl_INET_NTOP
gl_INLINE
gl_LOCALCHARSET
LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\""
AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
AC_FUNC_MALLOC
gl_MBCHAR
gl_MBITER
gl_FUNC_MEMCHR
gl_MINMAX
AC_DEFINE([GNULIB_MALLOC_GNU], 1, [Define to indicate the 'malloc' module.])
gl_FUNC_MALLOC_POSIX
gl_STDLIB_MODULE_INDICATOR([malloc-posix])
gl_MATH_H
gl_MOUNTLIST
gl_HEADER_NETINET_IN
AC_PROG_MKDIR_P
gl_REGEX
gl_SAFE_READ
gl_SAFE_WRITE
gl_SIZE_MAX
gl_FUNC_SNPRINTF
gl_STDIO_MODULE_INDICATOR([snprintf])
gl_TYPE_SOCKLEN_T
gt_TYPE_SSIZE_T
AM_STDBOOL_H
gl_STDINT_H
gl_STRCASE
gl_STDIO_H
gl_STDLIB_H
gl_FUNC_STRDUP
gl_STRING_MODULE_INDICATOR([strdup])
gl_FUNC_STRERROR
gl_STRING_MODULE_INDICATOR([strerror])
gl_HEADER_STRING_H
gl_FUNC_STRNDUP
gl_STRING_MODULE_INDICATOR([strndup])
gl_FUNC_STRNLEN
gl_STRING_MODULE_INDICATOR([strnlen])
gl_HEADER_SYS_SOCKET
AC_PROG_MKDIR_P
gl_HEADER_UNISTD
gl_UNISTD_H
gl_UNISTD_SAFER
gl_FUNC_VASNPRINTF
gl_FUNC_VASPRINTF
gl_STDIO_MODULE_INDICATOR([vasprintf])
m4_ifdef([AM_XGETTEXT_OPTION],
[AM_XGETTEXT_OPTION([--flag=asprintf:2:c-format])
AM_XGETTEXT_OPTION([--flag=vasprintf:2:c-format])])
gl_FUNC_VSNPRINTF
gl_STDIO_MODULE_INDICATOR([vsnprintf])
gl_WCHAR_H
gl_WCTYPE_H
gl_FUNC_WCWIDTH
gl_XALLOC
gl_XSIZE
gl_XSTRNDUP
LIBGNU_LIBDEPS="$gl_libdeps"
AC_SUBST([LIBGNU_LIBDEPS])
LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
AC_SUBST([LIBGNU_LTLIBDEPS])
m4_popdef([AC_LIBSOURCES])
m4_popdef([AC_REPLACE_FUNCS])
m4_popdef([AC_LIBOBJ])
@ -116,48 +136,137 @@ AC_DEFUN([gl_INIT],
AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
])
gltests_libdeps=
gltests_ltlibdeps=
m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ]))
m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS]))
m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES]))
gl_source_base='tests'
m4_popdef([AC_LIBSOURCES])
m4_popdef([AC_REPLACE_FUNCS])
m4_popdef([AC_LIBOBJ])
AC_CONFIG_COMMANDS_PRE([
gltests_libobjs=
gltests_ltlibobjs=
if test -n "$gltests_LIBOBJS"; then
# Remove the extension.
sed_drop_objext='s/\.o$//;s/\.obj$//'
for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
gltests_libobjs="$gltests_libobjs $i.$ac_objext"
gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
done
fi
AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
])
LIBGNU_LIBDEPS="$gl_libdeps"
AC_SUBST([LIBGNU_LIBDEPS])
LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
AC_SUBST([LIBGNU_LTLIBDEPS])
])
# Like AC_LIBOBJ, except that the module name goes
# into gl_LIBOBJS instead of into LIBOBJS.
AC_DEFUN([gl_LIBOBJ],
[gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext"])
AC_DEFUN([gl_LIBOBJ], [
AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl
gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext"
])
# m4_foreach_w is provided by autoconf-2.59c and later.
# This definition is to accommodate developers using versions
# of autoconf older than that.
m4_ifndef([m4_foreach_w],
[m4_define([m4_foreach_w],
[m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])])
# Like AC_REPLACE_FUNCS, except that the module name goes
# into gl_LIBOBJS instead of into LIBOBJS.
AC_DEFUN([gl_REPLACE_FUNCS],
[AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])])
AC_DEFUN([gl_REPLACE_FUNCS], [
m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])
])
# Like AC_LIBSOURCES, except that it does nothing.
# We rely on EXTRA_lib..._SOURCES instead.
AC_DEFUN([gl_LIBSOURCES],
[])
# Like AC_LIBSOURCES, except the directory where the source file is
# expected is derived from the gnulib-tool parametrization,
# and alloca is special cased (for the alloca-opt module).
# We could also entirely rely on EXTRA_lib..._SOURCES.
AC_DEFUN([gl_LIBSOURCES], [
m4_foreach([_gl_NAME], [$1], [
m4_if(_gl_NAME, [alloca.c], [], [
m4_syscmd([test -r gl/]_gl_NAME[ || test ! -d gl])dnl
m4_if(m4_sysval, [0], [],
[AC_FATAL([missing gl/]_gl_NAME)])
])
])
])
# Like AC_LIBOBJ, except that the module name goes
# into gltests_LIBOBJS instead of into LIBOBJS.
AC_DEFUN([gltests_LIBOBJ], [
AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl
gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext"
])
# m4_foreach_w is provided by autoconf-2.59c and later.
# This definition is to accommodate developers using versions
# of autoconf older than that.
m4_ifndef([m4_foreach_w],
[m4_define([m4_foreach_w],
[m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])])
# Like AC_REPLACE_FUNCS, except that the module name goes
# into gltests_LIBOBJS instead of into LIBOBJS.
AC_DEFUN([gltests_REPLACE_FUNCS], [
m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)])
])
# Like AC_LIBSOURCES, except the directory where the source file is
# expected is derived from the gnulib-tool parametrization,
# and alloca is special cased (for the alloca-opt module).
# We could also entirely rely on EXTRA_lib..._SOURCES.
AC_DEFUN([gltests_LIBSOURCES], [
m4_foreach([_gl_NAME], [$1], [
m4_if(_gl_NAME, [alloca.c], [], [
m4_syscmd([test -r tests/]_gl_NAME[ || test ! -d tests])dnl
m4_if(m4_sysval, [0], [],
[AC_FATAL([missing tests/]_gl_NAME)])
])
])
])
# This macro records the list of files which have been installed by
# gnulib-tool and may be removed by future gnulib-tool invocations.
AC_DEFUN([gl_FILE_LIST], [
build-aux/config.rpath
build-aux/link-warning.h
lib/alloca.c
lib/alloca_.h
lib/alloca.in.h
lib/asnprintf.c
lib/asprintf.c
lib/base64.c
lib/base64.h
lib/basename.c
lib/c-strtod.c
lib/c-strtod.h
lib/cloexec.c
lib/cloexec.h
lib/config.charset
lib/creat-safer.c
lib/dirname.c
lib/dirname.h
lib/dup-safer.c
lib/error.c
lib/error.h
lib/exit.h
lib/exitfail.c
lib/exitfail.h
lib/fcntl--.h
lib/fcntl-safer.h
lib/fd-safer.c
lib/float+.h
lib/float.in.h
lib/floor.c
lib/floorf.c
lib/fsusage.c
lib/fsusage.h
lib/full-read.c
@ -170,27 +279,28 @@ AC_DEFUN([gl_FILE_LIST], [
lib/gethostname.c
lib/getloadavg.c
lib/getopt.c
lib/getopt.in.h
lib/getopt1.c
lib/getopt_.h
lib/getopt_int.h
lib/gettext.h
lib/inet_ntop.c
lib/inet_ntop.h
lib/intprops.h
lib/localcharset.c
lib/localcharset.h
lib/malloc.c
lib/mbchar.c
lib/mbchar.h
lib/mbuiter.h
lib/memchr.c
lib/minmax.h
lib/math.in.h
lib/mountlist.c
lib/mountlist.h
lib/netinet_in.in.h
lib/open-safer.c
lib/pipe-safer.c
lib/printf-args.c
lib/printf-args.h
lib/printf-parse.c
lib/printf-parse.h
lib/ref-add.sin
lib/ref-del.sin
lib/regcomp.c
lib/regex.c
lib/regex.h
@ -203,34 +313,26 @@ AC_DEFUN([gl_FILE_LIST], [
lib/safe-write.h
lib/size_max.h
lib/snprintf.c
lib/snprintf.h
lib/socket_.h
lib/stdbool_.h
lib/stdint_.h
lib/strcase.h
lib/strcasecmp.c
lib/stdbool.in.h
lib/stdint.in.h
lib/stdio.in.h
lib/stdlib.in.h
lib/strdup.c
lib/strdup.h
lib/strerror.c
lib/string.in.h
lib/stripslash.c
lib/strncasecmp.c
lib/strndup.c
lib/strndup.h
lib/strnlen.c
lib/strnlen.h
lib/strnlen1.c
lib/strnlen1.h
lib/sys_socket.in.h
lib/unistd--.h
lib/unistd-safer.h
lib/unistd_.h
lib/unistd.in.h
lib/vasnprintf.c
lib/vasnprintf.h
lib/vasprintf.c
lib/vasprintf.h
lib/vsnprintf.c
lib/vsnprintf.h
lib/wchar_.h
lib/wctype_.h
lib/wcwidth.h
lib/wchar.in.h
lib/wctype.in.h
lib/xalloc-die.c
lib/xalloc.h
lib/xmalloc.c
@ -240,6 +342,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/absolute-header.m4
m4/alloca.m4
m4/arpa_inet_h.m4
m4/base64.m4
m4/c-strtod.m4
m4/cloexec.m4
m4/codeset.m4
@ -251,6 +354,8 @@ AC_DEFUN([gl_FILE_LIST], [
m4/exitfail.m4
m4/extensions.m4
m4/fcntl-safer.m4
m4/float_h.m4
m4/floorf.m4
m4/fstypename.m4
m4/fsusage.m4
m4/getaddrinfo.m4
@ -262,11 +367,13 @@ AC_DEFUN([gl_FILE_LIST], [
m4/glibc21.m4
m4/gnulib-common.m4
m4/iconv.m4
m4/include_next.m4
m4/inet_ntop.m4
m4/inline.m4
m4/intdiv0.m4
m4/intl.m4
m4/intldir.m4
m4/intlmacosx.m4
m4/intmax.m4
m4/intmax_t.m4
m4/inttypes-pri.m4
@ -275,15 +382,12 @@ AC_DEFUN([gl_FILE_LIST], [
m4/lib-ld.m4
m4/lib-link.m4
m4/lib-prefix.m4
m4/localcharset.m4
m4/lock.m4
m4/longdouble.m4
m4/longlong.m4
m4/ls-mntd-fs.m4
m4/mbchar.m4
m4/mbiter.m4
m4/mbrtowc.m4
m4/memchr.m4
m4/minmax.m4
m4/malloc.m4
m4/math_h.m4
m4/mountlist.m4
m4/netinet_in_h.m4
m4/nls.m4
@ -302,13 +406,15 @@ AC_DEFUN([gl_FILE_LIST], [
m4/stdbool.m4
m4/stdint.m4
m4/stdint_h.m4
m4/strcase.m4
m4/stdio_h.m4
m4/stdlib_h.m4
m4/strdup.m4
m4/strerror.m4
m4/string_h.m4
m4/strndup.m4
m4/strnlen.m4
m4/sys_socket_h.m4
m4/uintmax_t.m4
m4/ulonglong.m4
m4/unistd-safer.m4
m4/unistd_h.m4
m4/vasnprintf.m4
@ -318,7 +424,6 @@ AC_DEFUN([gl_FILE_LIST], [
m4/wchar.m4
m4/wchar_t.m4
m4/wctype.m4
m4/wcwidth.m4
m4/wint_t.m4
m4/xalloc.m4
m4/xsize.m4

View file

@ -1,5 +1,5 @@
# iconv.m4 serial AM4 (gettext-0.11.3)
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
# iconv.m4 serial AM6 (gettext-0.17)
dnl Copyright (C) 2000-2002, 2007 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.
@ -21,6 +21,7 @@ AC_DEFUN([AM_ICONV_LINK],
[
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
dnl those with the standalone portable GNU libiconv installed).
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
dnl accordingly.
@ -33,7 +34,7 @@ AC_DEFUN([AM_ICONV_LINK],
am_save_CPPFLAGS="$CPPFLAGS"
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
AC_TRY_LINK([#include <stdlib.h>
@ -56,7 +57,85 @@ AC_DEFUN([AM_ICONV_LINK],
fi
])
if test "$am_cv_func_iconv" = yes; then
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [
dnl This tests against bugs in AIX 5.1 and HP-UX 11.11.
am_save_LIBS="$LIBS"
if test $am_cv_lib_iconv = yes; then
LIBS="$LIBS $LIBICONV"
fi
AC_TRY_RUN([
#include <iconv.h>
#include <string.h>
int main ()
{
/* Test against AIX 5.1 bug: Failures are not distinguishable from successful
returns. */
{
iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
if (cd_utf8_to_88591 != (iconv_t)(-1))
{
static const char input[] = "\342\202\254"; /* EURO SIGN */
char buf[10];
const char *inptr = input;
size_t inbytesleft = strlen (input);
char *outptr = buf;
size_t outbytesleft = sizeof (buf);
size_t res = iconv (cd_utf8_to_88591,
(char **) &inptr, &inbytesleft,
&outptr, &outbytesleft);
if (res == 0)
return 1;
}
}
#if 0 /* This bug could be worked around by the caller. */
/* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
{
iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
if (cd_88591_to_utf8 != (iconv_t)(-1))
{
static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
char buf[50];
const char *inptr = input;
size_t inbytesleft = strlen (input);
char *outptr = buf;
size_t outbytesleft = sizeof (buf);
size_t res = iconv (cd_88591_to_utf8,
(char **) &inptr, &inbytesleft,
&outptr, &outbytesleft);
if ((int)res > 0)
return 1;
}
}
#endif
/* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
provided. */
if (/* Try standardized names. */
iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
/* Try IRIX, OSF/1 names. */
&& iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
/* Try AIX names. */
&& iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
/* Try HP-UX names. */
&& iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
return 1;
return 0;
}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
[case "$host_os" in
aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
*) am_cv_func_iconv_works="guessing yes" ;;
esac])
LIBS="$am_save_LIBS"
])
case "$am_cv_func_iconv_works" in
*no) am_func_iconv=no am_cv_lib_iconv=no ;;
*) am_func_iconv=yes ;;
esac
else
am_func_iconv=no am_cv_lib_iconv=no
fi
if test "$am_func_iconv" = yes; then
AC_DEFINE(HAVE_ICONV, 1,
[Define if you have the iconv() function and it works.])
fi
if test "$am_cv_lib_iconv" = yes; then
AC_MSG_CHECKING([how to link with libiconv])

107
gl/m4/include_next.m4 Normal file
View file

@ -0,0 +1,107 @@
# include_next.m4 serial 4
dnl Copyright (C) 2006, 2007 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 Paul Eggert and Derek Price.
AC_DEFUN([gl_INCLUDE_NEXT],
[
AC_LANG_PREPROC_REQUIRE()
AC_CACHE_CHECK([whether the preprocessor supports include_next],
[gl_cv_have_include_next],
[rm -rf conftestd1 conftestd2
mkdir conftestd1 conftestd2
cat <<EOF > conftestd1/conftest.h
#define DEFINED_IN_CONFTESTD1
#include_next <conftest.h>
#ifdef DEFINED_IN_CONFTESTD2
int foo;
#else
#error "include_next doesn't work"
#endif
EOF
cat <<EOF > conftestd2/conftest.h
#ifndef DEFINED_IN_CONFTESTD1
#error "include_next test doesn't work"
#endif
#define DEFINED_IN_CONFTESTD2
EOF
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -Iconftestd1 -Iconftestd2"
AC_COMPILE_IFELSE([#include <conftest.h>],
[gl_cv_have_include_next=yes],
[gl_cv_have_include_next=no])
CPPFLAGS="$save_CPPFLAGS"
rm -rf conftestd1 conftestd2
])
if test $gl_cv_have_include_next = yes; then
dnl FIXME: Remove HAVE_INCLUDE_NEXT and update everything that uses it
dnl to use @INCLUDE_NEXT@ instead.
AC_DEFINE([HAVE_INCLUDE_NEXT], 1,
[Define if your compiler supports the #include_next directive.])
INCLUDE_NEXT=include_next
else
INCLUDE_NEXT=include
fi
AC_SUBST([INCLUDE_NEXT])
])
# gl_CHECK_NEXT_HEADERS(HEADER1 HEADER2 ...)
# ------------------------------------------
# For each arg foo.h, if #include_next works, define NEXT_FOO_H to be
# '<foo.h>'; otherwise define it to be
# '"///usr/include/foo.h"', or whatever other absolute file name is suitable.
# That way, a header file with the following line:
# #@INCLUDE_NEXT@ @NEXT_FOO_H@
# behaves (after sed substitution) as if it contained
# #include_next <foo.h>
# even if the compiler does not support include_next.
# The three "///" are to pacify Sun C 5.8, which otherwise would say
# "warning: #include of /usr/include/... may be non-portable".
# Use `""', not `<>', so that the /// cannot be confused with a C99 comment.
AC_DEFUN([gl_CHECK_NEXT_HEADERS],
[
AC_REQUIRE([gl_INCLUDE_NEXT])
AC_CHECK_HEADERS_ONCE([$1])
AC_FOREACH([gl_HEADER_NAME], [$1],
[AS_VAR_PUSHDEF([gl_next_header],
[gl_cv_next_]m4_quote(m4_defn([gl_HEADER_NAME])))
if test $gl_cv_have_include_next = yes; then
AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>'])
else
AC_CACHE_CHECK(
[absolute name of <]m4_quote(m4_defn([gl_HEADER_NAME]))[>],
m4_quote(m4_defn([gl_next_header])),
[AS_VAR_PUSHDEF([gl_header_exists],
[ac_cv_header_]m4_quote(m4_defn([gl_HEADER_NAME])))
if test AS_VAR_GET(gl_header_exists) = yes; then
AC_LANG_CONFTEST(
[AC_LANG_SOURCE(
[[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]]
)])
dnl eval is necessary to expand ac_cpp.
dnl Ultrix and Pyramid sh refuse to redirect output of eval,
dnl so use subshell.
AS_VAR_SET([gl_next_header],
['"'`(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
sed -n '\#/]m4_quote(m4_defn([gl_HEADER_NAME]))[#{
s#.*"\(.*/]m4_quote(m4_defn([gl_HEADER_NAME]))[\)".*#\1#
s#^/[^/]#//&#
p
q
}'`'"'])
else
AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>'])
fi
AS_VAR_POPDEF([gl_header_exists])])
fi
AC_SUBST(
AS_TR_CPP([NEXT_]m4_quote(m4_defn([gl_HEADER_NAME]))),
[AS_VAR_GET([gl_next_header])])
AS_VAR_POPDEF([gl_next_header])])
])

51
gl/m4/intlmacosx.m4 Normal file
View file

@ -0,0 +1,51 @@
# intlmacosx.m4 serial 1 (gettext-0.17)
dnl Copyright (C) 2004-2007 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
dnl This file can can be used in projects which are not available under
dnl the GNU General Public License or the GNU Library General Public
dnl License but which still want to provide support for the GNU gettext
dnl functionality.
dnl Please note that the actual code of the GNU gettext library is covered
dnl by the GNU Library General Public License, and the rest of the GNU
dnl gettext package package is covered by the GNU General Public License.
dnl They are *not* in the public domain.
dnl Checks for special options needed on MacOS X.
dnl Defines INTL_MACOSX_LIBS.
AC_DEFUN([gt_INTL_MACOSX],
[
dnl Check for API introduced in MacOS X 10.2.
AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
gt_cv_func_CFPreferencesCopyAppValue,
[gt_save_LIBS="$LIBS"
LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
[CFPreferencesCopyAppValue(NULL, NULL)],
[gt_cv_func_CFPreferencesCopyAppValue=yes],
[gt_cv_func_CFPreferencesCopyAppValue=no])
LIBS="$gt_save_LIBS"])
if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
[Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
fi
dnl Check for API introduced in MacOS X 10.3.
AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
[gt_save_LIBS="$LIBS"
LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
[gt_cv_func_CFLocaleCopyCurrent=yes],
[gt_cv_func_CFLocaleCopyCurrent=no])
LIBS="$gt_save_LIBS"])
if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
[Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
fi
INTL_MACOSX_LIBS=
if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
fi
AC_SUBST([INTL_MACOSX_LIBS])
])

View file

@ -1,5 +1,5 @@
# intmax_t.m4 serial 5
dnl Copyright (C) 1997-2004, 2006 Free Software Foundation, Inc.
# intmax_t.m4 serial 6
dnl Copyright (C) 1997-2004, 2006-2007 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.
@ -18,8 +18,8 @@ AC_DEFUN([gl_AC_TYPE_INTMAX_T],
AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
AC_REQUIRE([gl_AC_HEADER_STDINT_H])
if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
AC_REQUIRE([gl_AC_TYPE_LONG_LONG])
test $ac_cv_type_long_long = yes \
AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
test $ac_cv_type_long_long_int = yes \
&& ac_type='long long' \
|| ac_type='long'
AC_DEFINE_UNQUOTED(intmax_t, $ac_type,
@ -51,8 +51,8 @@ AC_DEFUN([gt_AC_TYPE_INTMAX_T],
AC_DEFINE(HAVE_INTMAX_T, 1,
[Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
else
AC_REQUIRE([gl_AC_TYPE_LONG_LONG])
test $ac_cv_type_long_long = yes \
AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
test $ac_cv_type_long_long_int = yes \
&& ac_type='long long' \
|| ac_type='long'
AC_DEFINE_UNQUOTED(intmax_t, $ac_type,

View file

@ -1,4 +1,4 @@
# lib-link.m4 serial 13 (gettext-0.16.2)
# lib-link.m4 serial 13 (gettext-0.17)
dnl Copyright (C) 2001-2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,

16
gl/m4/localcharset.m4 Normal file
View file

@ -0,0 +1,16 @@
# localcharset.m4 serial 5
dnl Copyright (C) 2002, 2004, 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_LOCALCHARSET],
[
dnl Prerequisites of lib/localcharset.c.
AC_REQUIRE([AM_LANGINFO_CODESET])
AC_CHECK_DECLS_ONCE(getc_unlocked)
dnl Prerequisites of the lib/Makefile.am snippet.
AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([gl_GLIBC21])
])

View file

@ -1,311 +0,0 @@
# lock.m4 serial 6 (gettext-0.16)
dnl Copyright (C) 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.
dnl From Bruno Haible.
dnl Tests for a multithreading library to be used.
dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS,
dnl USE_PTH_THREADS, USE_WIN32_THREADS
dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use
dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with
dnl libtool).
dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for
dnl programs that really need multithread functionality. The difference
dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak
dnl symbols, typically LIBTHREAD="" whereas LIBMULTITHREAD="-lpthread".
dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for
dnl multithread-safe programs.
AC_DEFUN([gl_LOCK_EARLY],
[
AC_REQUIRE([gl_LOCK_EARLY_BODY])
])
dnl The guts of gl_LOCK_EARLY. Needs to be expanded only once.
AC_DEFUN([gl_LOCK_EARLY_BODY],
[
dnl Ordering constraints: This macro modifies CPPFLAGS in a way that
dnl influences the result of the autoconf tests that test for *_unlocked
dnl declarations, on AIX 5 at least. Therefore it must come early.
AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl
AC_BEFORE([$0], [gl_ARGP])dnl
AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([AC_GNU_SOURCE]) dnl needed for pthread_rwlock_t on glibc systems
dnl Check for multithreading.
AC_ARG_ENABLE(threads,
AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify multithreading API])
AC_HELP_STRING([--disable-threads], [build without multithread safety]),
[gl_use_threads=$enableval],
[case "$host_os" in
dnl Disable multithreading by default on OSF/1, because it interferes
dnl with fork()/exec(): When msgexec is linked with -lpthread, its child
dnl process gets an endless segmentation fault inside execvp().
osf*) gl_use_threads=no ;;
*) gl_use_threads=yes ;;
esac
])
if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
# For using <pthread.h>:
case "$host_os" in
osf*)
# On OSF/1, the compiler needs the flag -D_REENTRANT so that it
# groks <pthread.h>. cc also understands the flag -pthread, but
# we don't use it because 1. gcc-2.95 doesn't understand -pthread,
# 2. putting a flag into CPPFLAGS that has an effect on the linker
# causes the AC_TRY_LINK test below to succeed unexpectedly,
# leading to wrong values of LIBTHREAD and LTLIBTHREAD.
CPPFLAGS="$CPPFLAGS -D_REENTRANT"
;;
esac
# Some systems optimize for single-threaded programs by default, and
# need special flags to disable these optimizations. For example, the
# definition of 'errno' in <errno.h>.
case "$host_os" in
aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
esac
fi
])
dnl The guts of gl_LOCK. Needs to be expanded only once.
AC_DEFUN([gl_LOCK_BODY],
[
AC_REQUIRE([gl_LOCK_EARLY_BODY])
gl_threads_api=none
LIBTHREAD=
LTLIBTHREAD=
LIBMULTITHREAD=
LTLIBMULTITHREAD=
if test "$gl_use_threads" != no; then
dnl Check whether the compiler and linker support weak declarations.
AC_MSG_CHECKING([whether imported symbols can be declared weak])
gl_have_weak=no
AC_TRY_LINK([extern void xyzzy ();
#pragma weak xyzzy], [xyzzy();], [gl_have_weak=yes])
AC_MSG_RESULT([$gl_have_weak])
if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
# On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
# it groks <pthread.h>. It's added above, in gl_LOCK_EARLY_BODY.
AC_CHECK_HEADER(pthread.h, gl_have_pthread_h=yes, gl_have_pthread_h=no)
if test "$gl_have_pthread_h" = yes; then
# Other possible tests:
# -lpthreads (FSU threads, PCthreads)
# -lgthreads
gl_have_pthread=
# Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
# in libc. IRIX 6.5 has the first one in both libc and libpthread, but
# the second one only in libpthread, and lock.c needs it.
AC_TRY_LINK([#include <pthread.h>],
[pthread_mutex_lock((pthread_mutex_t*)0);
pthread_mutexattr_init((pthread_mutexattr_t*)0);],
[gl_have_pthread=yes])
# Test for libpthread by looking for pthread_kill. (Not pthread_self,
# since it is defined as a macro on OSF/1.)
if test -n "$gl_have_pthread"; then
# The program links fine without libpthread. But it may actually
# need to link with libpthread in order to create multiple threads.
AC_CHECK_LIB(pthread, pthread_kill,
[LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
# On Solaris and HP-UX, most pthread functions exist also in libc.
# Therefore pthread_in_use() needs to actually try to create a
# thread: pthread_create from libc will fail, whereas
# pthread_create will actually create a thread.
case "$host_os" in
solaris* | hpux*)
AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], 1,
[Define if the pthread_in_use() detection is hard.])
esac
])
else
# Some library is needed. Try libpthread and libc_r.
AC_CHECK_LIB(pthread, pthread_kill,
[gl_have_pthread=yes
LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread])
if test -z "$gl_have_pthread"; then
# For FreeBSD 4.
AC_CHECK_LIB(c_r, pthread_kill,
[gl_have_pthread=yes
LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r])
fi
fi
if test -n "$gl_have_pthread"; then
gl_threads_api=posix
AC_DEFINE([USE_POSIX_THREADS], 1,
[Define if the POSIX multithreading library can be used.])
if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
if test $gl_have_weak = yes; then
AC_DEFINE([USE_POSIX_THREADS_WEAK], 1,
[Define if references to the POSIX multithreading library should be made weak.])
LIBTHREAD=
LTLIBTHREAD=
fi
fi
# OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the
# pthread_rwlock_* functions.
AC_CHECK_TYPE([pthread_rwlock_t],
[AC_DEFINE([HAVE_PTHREAD_RWLOCK], 1,
[Define if the POSIX multithreading library has read/write locks.])],
[],
[#include <pthread.h>])
# glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
AC_TRY_COMPILE([#include <pthread.h>],
[#if __FreeBSD__ == 4
error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
#else
int x = (int)PTHREAD_MUTEX_RECURSIVE;
return !x;
#endif],
[AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], 1,
[Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE.])])
fi
fi
fi
if test -z "$gl_have_pthread"; then
if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
gl_have_solaristhread=
gl_save_LIBS="$LIBS"
LIBS="$LIBS -lthread"
AC_TRY_LINK([#include <thread.h>
#include <synch.h>],
[thr_self();],
[gl_have_solaristhread=yes])
LIBS="$gl_save_LIBS"
if test -n "$gl_have_solaristhread"; then
gl_threads_api=solaris
LIBTHREAD=-lthread
LTLIBTHREAD=-lthread
LIBMULTITHREAD="$LIBTHREAD"
LTLIBMULTITHREAD="$LTLIBTHREAD"
AC_DEFINE([USE_SOLARIS_THREADS], 1,
[Define if the old Solaris multithreading library can be used.])
if test $gl_have_weak = yes; then
AC_DEFINE([USE_SOLARIS_THREADS_WEAK], 1,
[Define if references to the old Solaris multithreading library should be made weak.])
LIBTHREAD=
LTLIBTHREAD=
fi
fi
fi
fi
if test "$gl_use_threads" = pth; then
gl_save_CPPFLAGS="$CPPFLAGS"
AC_LIB_LINKFLAGS(pth)
gl_have_pth=
gl_save_LIBS="$LIBS"
LIBS="$LIBS -lpth"
AC_TRY_LINK([#include <pth.h>], [pth_self();], gl_have_pth=yes)
LIBS="$gl_save_LIBS"
if test -n "$gl_have_pth"; then
gl_threads_api=pth
LIBTHREAD="$LIBPTH"
LTLIBTHREAD="$LTLIBPTH"
LIBMULTITHREAD="$LIBTHREAD"
LTLIBMULTITHREAD="$LTLIBTHREAD"
AC_DEFINE([USE_PTH_THREADS], 1,
[Define if the GNU Pth multithreading library can be used.])
if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
if test $gl_have_weak = yes; then
AC_DEFINE([USE_PTH_THREADS_WEAK], 1,
[Define if references to the GNU Pth multithreading library should be made weak.])
LIBTHREAD=
LTLIBTHREAD=
fi
fi
else
CPPFLAGS="$gl_save_CPPFLAGS"
fi
fi
if test -z "$gl_have_pthread"; then
if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then
if { case "$host_os" in
mingw*) true;;
*) false;;
esac
}; then
gl_threads_api=win32
AC_DEFINE([USE_WIN32_THREADS], 1,
[Define if the Win32 multithreading API can be used.])
fi
fi
fi
fi
AC_MSG_CHECKING([for multithread API to use])
AC_MSG_RESULT([$gl_threads_api])
AC_SUBST(LIBTHREAD)
AC_SUBST(LTLIBTHREAD)
AC_SUBST(LIBMULTITHREAD)
AC_SUBST(LTLIBMULTITHREAD)
])
AC_DEFUN([gl_LOCK],
[
AC_REQUIRE([gl_LOCK_EARLY])
AC_REQUIRE([gl_LOCK_BODY])
gl_PREREQ_LOCK
])
# Prerequisites of lib/lock.c.
AC_DEFUN([gl_PREREQ_LOCK], [
AC_REQUIRE([AC_C_INLINE])
])
dnl Survey of platforms:
dnl
dnl Platform Available Compiler Supports test-lock
dnl flavours option weak result
dnl --------------- --------- --------- -------- ---------
dnl Linux 2.4/glibc posix -lpthread Y OK
dnl
dnl GNU Hurd/glibc posix
dnl
dnl FreeBSD 5.3 posix -lc_r Y
dnl posix -lkse ? Y
dnl posix -lpthread ? Y
dnl posix -lthr Y
dnl
dnl FreeBSD 5.2 posix -lc_r Y
dnl posix -lkse Y
dnl posix -lthr Y
dnl
dnl FreeBSD 4.0,4.10 posix -lc_r Y OK
dnl
dnl NetBSD 1.6 --
dnl
dnl OpenBSD 3.4 posix -lpthread Y OK
dnl
dnl MacOS X 10.[123] posix -lpthread Y OK
dnl
dnl Solaris 7,8,9 posix -lpthread Y Sol 7,8: 0.0; Sol 9: OK
dnl solaris -lthread Y Sol 7,8: 0.0; Sol 9: OK
dnl
dnl HP-UX 11 posix -lpthread N (cc) OK
dnl Y (gcc)
dnl
dnl IRIX 6.5 posix -lpthread Y 0.5
dnl
dnl AIX 4.3,5.1 posix -lpthread N AIX 4: 0.5; AIX 5: OK
dnl
dnl OSF/1 4.0,5.1 posix -pthread (cc) N OK
dnl -lpthread (gcc) Y
dnl
dnl Cygwin posix -lpthread Y OK
dnl
dnl Any of the above pth -lpth 0.0
dnl
dnl Mingw win32 N OK
dnl
dnl BeOS 5 --
dnl
dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is
dnl turned off:
dnl OK if all three tests terminate OK,
dnl 0.5 if the first test terminates OK but the second one loops endlessly,
dnl 0.0 if the first test already loops endlessly.

View file

@ -1,31 +0,0 @@
# longdouble.m4 serial 2 (gettext-0.15)
dnl Copyright (C) 2002-2003, 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.
dnl From Bruno Haible.
dnl Test whether the compiler supports the 'long double' type.
dnl Prerequisite: AC_PROG_CC
dnl This file is only needed in autoconf <= 2.59. Newer versions of autoconf
dnl have a macro AC_TYPE_LONG_DOUBLE with identical semantics.
AC_DEFUN([gt_TYPE_LONGDOUBLE],
[
AC_CACHE_CHECK([for long double], gt_cv_c_long_double,
[if test "$GCC" = yes; then
gt_cv_c_long_double=yes
else
AC_TRY_COMPILE([
/* The Stardent Vistra knows sizeof(long double), but does not support it. */
long double foo = 0.0;
/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
int array [2*(sizeof(long double) >= sizeof(double)) - 1];
], ,
gt_cv_c_long_double=yes, gt_cv_c_long_double=no)
fi])
if test $gt_cv_c_long_double = yes; then
AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.])
fi
])

View file

@ -1,5 +1,5 @@
# longlong.m4 serial 10
dnl Copyright (C) 1999-2006 Free Software Foundation, Inc.
# longlong.m4 serial 13
dnl Copyright (C) 1999-2007 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.
@ -7,8 +7,8 @@ dnl with or without modifications, as long as this notice is preserved.
dnl From Paul Eggert.
# Define HAVE_LONG_LONG_INT if 'long long int' works.
# This fixes a bug in Autoconf 2.60, but can be removed once we
# assume 2.61 everywhere.
# This fixes a bug in Autoconf 2.61, but can be removed once we
# assume 2.62 everywhere.
# Note: If the type 'long long int' exists but is only 32 bits large
# (as on some very old compilers), HAVE_LONG_LONG_INT will not be
@ -18,20 +18,11 @@ AC_DEFUN([AC_TYPE_LONG_LONG_INT],
[
AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
[AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[long long int ll = 9223372036854775807ll;
long long int nll = -9223372036854775807LL;
typedef int a[((-9223372036854775807LL < 0
&& 0 < 9223372036854775807ll)
? 1 : -1)];
int i = 63;]],
[[long long int llmax = 9223372036854775807ll;
return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
| (llmax / ll) | (llmax % ll));]])],
[_AC_TYPE_LONG_LONG_SNIPPET],
[dnl This catches a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
dnl If cross compiling, assume the bug isn't important, since
dnl nobody cross compiles for this platform as far as we know.
AC_RUN_IFELSE(
AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
[[@%:@include <limits.h>
@%:@ifndef LLONG_MAX
@ -60,13 +51,56 @@ AC_DEFUN([AC_TYPE_LONG_LONG_INT],
fi
])
# This macro is obsolescent and should go away soon.
AC_DEFUN([gl_AC_TYPE_LONG_LONG],
# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
# This fixes a bug in Autoconf 2.61, but can be removed once we
# assume 2.62 everywhere.
# Note: If the type 'unsigned long long int' exists but is only 32 bits
# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
# will not be defined. In this case you can treat 'unsigned long long int'
# like 'unsigned long int'.
AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
[
AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
ac_cv_type_long_long=$ac_cv_type_long_long_int
if test $ac_cv_type_long_long = yes; then
AC_DEFINE(HAVE_LONG_LONG, 1,
[Define if you have the 'long long' type.])
AC_CACHE_CHECK([for unsigned long long int],
[ac_cv_type_unsigned_long_long_int],
[AC_LINK_IFELSE(
[_AC_TYPE_LONG_LONG_SNIPPET],
[ac_cv_type_unsigned_long_long_int=yes],
[ac_cv_type_unsigned_long_long_int=no])])
if test $ac_cv_type_unsigned_long_long_int = yes; then
AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], 1,
[Define to 1 if the system has the type `unsigned long long int'.])
fi
])
# Expands to a C program that can be used to test for simultaneous support
# of 'long long' and 'unsigned long long'. We don't want to say that
# 'long long' is available if 'unsigned long long' is not, or vice versa,
# because too many programs rely on the symmetry between signed and unsigned
# integer types (excluding 'bool').
AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
[
AC_LANG_PROGRAM(
[[/* For now, do not test the preprocessor; as of 2007 there are too many
implementations with broken preprocessors. Perhaps this can
be revisited in 2012. In the meantime, code should not expect
#if to work with literals wider than 32 bits. */
/* Test literals. */
long long int ll = 9223372036854775807ll;
long long int nll = -9223372036854775807LL;
unsigned long long int ull = 18446744073709551615ULL;
/* Test constant expressions. */
typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
? 1 : -1)];
typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
? 1 : -1)];
int i = 63;]],
[[/* Test availability of runtime routines for shift and division. */
long long int llmax = 9223372036854775807ll;
unsigned long long int ullmax = 18446744073709551615ull;
return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
| (llmax / ll) | (llmax % ll)
| (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
| (ullmax / ull) | (ullmax % ull));]])
])

41
gl/m4/malloc.m4 Normal file
View file

@ -0,0 +1,41 @@
# malloc.m4 serial 8
dnl Copyright (C) 2007 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.
# gl_FUNC_MALLOC_POSIX
# --------------------
# Test whether 'malloc' is POSIX compliant (sets errno to ENOMEM when it
# fails), and replace malloc if it is not.
AC_DEFUN([gl_FUNC_MALLOC_POSIX],
[
AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
if test $gl_cv_func_malloc_posix = yes; then
HAVE_MALLOC_POSIX=1
AC_DEFINE([HAVE_MALLOC_POSIX], 1,
[Define if the 'malloc' function is POSIX compliant.])
else
AC_LIBOBJ([malloc])
HAVE_MALLOC_POSIX=0
fi
AC_SUBST([HAVE_MALLOC_POSIX])
])
# Test whether malloc, realloc, calloc are POSIX compliant,
# Set gl_cv_func_malloc_posix to yes or no accordingly.
AC_DEFUN([gl_CHECK_MALLOC_POSIX],
[
AC_CACHE_CHECK([whether malloc, realloc, calloc are POSIX compliant],
[gl_cv_func_malloc_posix],
[
dnl It is too dangerous to try to allocate a large amount of memory:
dnl some systems go to their knees when you do that. So assume that
dnl all Unix implementations of the function are POSIX compliant.
AC_TRY_COMPILE([],
[#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
choke me
#endif
], [gl_cv_func_malloc_posix=yes], [gl_cv_func_malloc_posix=no])
])
])

66
gl/m4/math_h.m4 Normal file
View file

@ -0,0 +1,66 @@
# math_h.m4 serial 9
dnl Copyright (C) 2007-2008 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_MATH_H],
[
AC_REQUIRE([gl_MATH_H_DEFAULTS])
gl_CHECK_NEXT_HEADERS([math.h])
])
AC_DEFUN([gl_MATH_MODULE_INDICATOR],
[
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
AC_REQUIRE([gl_MATH_H_DEFAULTS])
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
])
AC_DEFUN([gl_MATH_H_DEFAULTS],
[
GNULIB_CEILF=0; AC_SUBST([GNULIB_CEILF])
GNULIB_CEILL=0; AC_SUBST([GNULIB_CEILL])
GNULIB_FLOORF=0; AC_SUBST([GNULIB_FLOORF])
GNULIB_FLOORL=0; AC_SUBST([GNULIB_FLOORL])
GNULIB_FREXP=0; AC_SUBST([GNULIB_FREXP])
GNULIB_FREXPL=0; AC_SUBST([GNULIB_FREXPL])
GNULIB_ISFINITE=0; AC_SUBST([GNULIB_ISFINITE])
GNULIB_LDEXPL=0; AC_SUBST([GNULIB_LDEXPL])
GNULIB_MATHL=0; AC_SUBST([GNULIB_MATHL])
GNULIB_ROUND=0; AC_SUBST([GNULIB_ROUND])
GNULIB_ROUNDF=0; AC_SUBST([GNULIB_ROUNDF])
GNULIB_ROUNDL=0; AC_SUBST([GNULIB_ROUNDL])
GNULIB_SIGNBIT=0; AC_SUBST([GNULIB_SIGNBIT])
GNULIB_TRUNC=0; AC_SUBST([GNULIB_TRUNC])
GNULIB_TRUNCF=0; AC_SUBST([GNULIB_TRUNCF])
GNULIB_TRUNCL=0; AC_SUBST([GNULIB_TRUNCL])
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_DECL_ACOSL=1; AC_SUBST([HAVE_DECL_ACOSL])
HAVE_DECL_ASINL=1; AC_SUBST([HAVE_DECL_ASINL])
HAVE_DECL_ATANL=1; AC_SUBST([HAVE_DECL_ATANL])
HAVE_DECL_COSL=1; AC_SUBST([HAVE_DECL_COSL])
HAVE_DECL_EXPL=1; AC_SUBST([HAVE_DECL_EXPL])
HAVE_DECL_FREXPL=1; AC_SUBST([HAVE_DECL_FREXPL])
HAVE_DECL_LDEXPL=1; AC_SUBST([HAVE_DECL_LDEXPL])
HAVE_DECL_LOGL=1; AC_SUBST([HAVE_DECL_LOGL])
HAVE_DECL_SINL=1; AC_SUBST([HAVE_DECL_SINL])
HAVE_DECL_SQRTL=1; AC_SUBST([HAVE_DECL_SQRTL])
HAVE_DECL_TANL=1; AC_SUBST([HAVE_DECL_TANL])
HAVE_DECL_TRUNC=1; AC_SUBST([HAVE_DECL_TRUNC])
HAVE_DECL_TRUNCF=1; AC_SUBST([HAVE_DECL_TRUNCF])
HAVE_DECL_TRUNCL=1; AC_SUBST([HAVE_DECL_TRUNCL])
REPLACE_CEILF=0; AC_SUBST([REPLACE_CEILF])
REPLACE_CEILL=0; AC_SUBST([REPLACE_CEILL])
REPLACE_FLOORF=0; AC_SUBST([REPLACE_FLOORF])
REPLACE_FLOORL=0; AC_SUBST([REPLACE_FLOORL])
REPLACE_FREXP=0; AC_SUBST([REPLACE_FREXP])
REPLACE_FREXPL=0; AC_SUBST([REPLACE_FREXPL])
REPLACE_ISFINITE=0; AC_SUBST([REPLACE_ISFINITE])
REPLACE_LDEXPL=0; AC_SUBST([REPLACE_LDEXPL])
REPLACE_ROUND=0; AC_SUBST([REPLACE_ROUND])
REPLACE_ROUNDF=0; AC_SUBST([REPLACE_ROUNDF])
REPLACE_ROUNDL=0; AC_SUBST([REPLACE_ROUNDL])
REPLACE_SIGNBIT=0; AC_SUBST([REPLACE_SIGNBIT])
REPLACE_SIGNBIT_USING_GCC=0; AC_SUBST([REPLACE_SIGNBIT_USING_GCC])
])

View file

@ -1,14 +0,0 @@
# mbchar.m4 serial 5
dnl Copyright (C) 2005-2007 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 autoconf tests required for use of mbchar.m4
dnl From Bruno Haible.
AC_DEFUN([gl_MBCHAR],
[
AC_REQUIRE([AC_GNU_SOURCE])
AC_LIBOBJ([mbchar])
])

View file

@ -1,17 +0,0 @@
# mbiter.m4 serial 2
dnl Copyright (C) 2005 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 autoconf tests required for use of mbiter.h
dnl From Bruno Haible.
AC_DEFUN([gl_MBITER],
[
AC_REQUIRE([AC_TYPE_MBSTATE_T])
dnl The following line is that so the user can test HAVE_MBRTOWC before
dnl #include "mbiter.h" or "mbuiter.h".
AC_REQUIRE([gl_FUNC_MBRTOWC])
:
])

View file

@ -1,31 +0,0 @@
# mbrtowc.m4 serial 8
dnl Copyright (C) 2001-2002, 2004-2005 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 Paul Eggert
dnl This file can be removed, and gl_FUNC_MBRTOWC replaced with
dnl AC_FUNC_MBRTOWC, when autoconf 2.60 can be assumed everywhere.
AC_DEFUN([gl_FUNC_MBRTOWC],
[
dnl Same as AC_FUNC_MBRTOWC in autoconf-2.60.
AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
gl_cv_func_mbrtowc,
[AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[#include <wchar.h>]],
[[wchar_t wc;
char const s[] = "";
size_t n = 1;
mbstate_t state;
return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));]])],
gl_cv_func_mbrtowc=yes,
gl_cv_func_mbrtowc=no)])
if test $gl_cv_func_mbrtowc = yes; then
AC_DEFINE([HAVE_MBRTOWC], 1,
[Define to 1 if mbrtowc and mbstate_t are properly declared.])
fi
])

30
gl/m4/mbstate_t.m4 Normal file
View file

@ -0,0 +1,30 @@
# mbstate_t.m4 serial 9
dnl Copyright (C) 2000, 2001, 2002 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.
# From Paul Eggert.
# BeOS 5 has <wchar.h> but does not define mbstate_t,
# so you can't declare an object of that type.
# Check for this incompatibility with Standard C.
# AC_TYPE_MBSTATE_T
# -----------------
AC_DEFUN([AC_TYPE_MBSTATE_T],
[AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t,
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[AC_INCLUDES_DEFAULT
# include <wchar.h>],
[mbstate_t x; return sizeof x;])],
[ac_cv_type_mbstate_t=yes],
[ac_cv_type_mbstate_t=no])])
if test $ac_cv_type_mbstate_t = yes; then
AC_DEFINE([HAVE_MBSTATE_T], 1,
[Define to 1 if <wchar.h> declares mbstate_t.])
else
AC_DEFINE([mbstate_t], int,
[Define to a type if <wchar.h> does not define.])
fi])

View file

@ -1,18 +0,0 @@
# memchr.m4 serial 4
dnl Copyright (C) 2002, 2003, 2004 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_MEMCHR],
[
AC_REPLACE_FUNCS(memchr)
if test $ac_cv_func_memchr = no; then
gl_PREREQ_MEMCHR
fi
])
# Prerequisites of lib/memchr.c.
AC_DEFUN([gl_PREREQ_MEMCHR], [
AC_CHECK_HEADERS(bp-sym.h)
])

View file

@ -1,41 +0,0 @@
# minmax.m4 serial 2
dnl Copyright (C) 2005 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_PREREQ(2.52)
AC_DEFUN([gl_MINMAX],
[
AC_REQUIRE([gl_PREREQ_MINMAX])
])
# Prerequisites of lib/minmax.h.
AC_DEFUN([gl_PREREQ_MINMAX],
[
gl_MINMAX_IN_HEADER([limits.h])
gl_MINMAX_IN_HEADER([sys/param.h])
])
dnl gl_MINMAX_IN_HEADER(HEADER)
dnl The parameter has to be a literal header name; it cannot be macro,
dnl nor a shell variable. (Because autoheader collects only AC_DEFINE
dnl invocations with a literal macro name.)
AC_DEFUN([gl_MINMAX_IN_HEADER],
[
m4_pushdef([header], AS_TR_SH([$1]))
m4_pushdef([HEADER], AS_TR_CPP([$1]))
AC_CACHE_CHECK([whether <$1> defines MIN and MAX],
[gl_cv_minmax_in_]header,
[AC_TRY_COMPILE([#include <$1>
int x = MIN (42, 17);], [],
[gl_cv_minmax_in_]header[=yes],
[gl_cv_minmax_in_]header[=no])])
if test $gl_cv_minmax_in_[]header = yes; then
AC_DEFINE([HAVE_MINMAX_IN_]HEADER, 1,
[Define to 1 if <$1> defines the MIN and MAX macros.])
fi
m4_popdef([HEADER])
m4_popdef([header])
])

View file

@ -1,18 +1,30 @@
# netinet_in_h.m4 serial 1
dnl Copyright (C) 2006 Free Software Foundation, Inc.
# netinet_in_h.m4 serial 3
dnl Copyright (C) 2006-2007 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 Simon Josefsson
AC_DEFUN([gl_HEADER_NETINET_IN],
[
AC_CHECK_HEADERS_ONCE([netinet/in.h])
if test $ac_cv_header_netinet_in_h = yes; then
AC_CACHE_CHECK([whether <netinet/in.h> is self-contained],
[gl_cv_header_netinet_in_h_selfcontained],
[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <netinet/in.h>], [])],
[gl_cv_header_netinet_in_h_selfcontained=yes],
[gl_cv_header_netinet_in_h_selfcontained=no])
])
if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
NETINET_IN_H=''
else
NETINET_IN_H='netinet/in.h'
AC_CHECK_HEADERS([netinet/in.h])
gl_CHECK_NEXT_HEADERS([netinet/in.h])
if test $ac_cv_header_netinet_in_h = yes; then
HAVE_NETINET_IN_H=1
else
HAVE_NETINET_IN_H=0
fi
AC_SUBST([HAVE_NETINET_IN_H])
fi
AC_SUBST(NETINET_IN_H)
AC_SUBST([NETINET_IN_H])
])

View file

@ -1,5 +1,5 @@
# po.m4 serial 13 (gettext-0.15)
dnl Copyright (C) 1995-2006 Free Software Foundation, Inc.
# po.m4 serial 15 (gettext-0.17)
dnl Copyright (C) 1995-2007 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.
@ -27,6 +27,10 @@ AC_DEFUN([AM_PO_SUBDIRS],
AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
AC_REQUIRE([AM_NLS])dnl
dnl Release version of the gettext macros. This is used to ensure that
dnl the gettext macros and po/Makefile.in.in are in sync.
AC_SUBST([GETTEXT_MACRO_VERSION], [0.17])
dnl Perform the following tests also if --disable-nls has been given,
dnl because they are needed for "make dist" to work.
@ -84,6 +88,10 @@ changequote([,])dnl
test -n "$localedir" || localedir='${datadir}/locale'
AC_SUBST([localedir])
dnl Support for AM_XGETTEXT_OPTION.
test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
AC_CONFIG_COMMANDS([po-directories], [[
for ac_file in $CONFIG_FILES; do
# Support "outfile[:infile[:infile...]]"
@ -426,3 +434,16 @@ EOF
fi
mv "$ac_file.tmp" "$ac_file"
])
dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
[
XGETTEXT_EXTRA_OPTIONS=
])
dnl Registers an option to be passed to xgettext in the po subdirectory.
AC_DEFUN([AM_XGETTEXT_OPTION],
[
AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
])

View file

@ -1,4 +1,4 @@
#serial 42
#serial 48
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
# 2006, 2007 Free Software Foundation, Inc.
@ -18,9 +18,12 @@ AC_DEFUN([gl_REGEX],
AC_ARG_WITH([included-regex],
[AC_HELP_STRING([--without-included-regex],
[don't compile regex; this is the default on
[don't compile regex; this is the default on 32-bit
systems with recent-enough versions of the GNU C
Library (use with caution on other systems)])])
Library (use with caution on other systems).
On systems with 64-bit ptrdiff_t and 32-bit int,
--with-included-regex is the default, in case
regex functions operate on very long strings (>2GB)])])
case $with_included_regex in #(
yes|no) ac_use_included_regex=$with_included_regex
@ -29,8 +32,7 @@ AC_DEFUN([gl_REGEX],
# If the system regex support is good enough that it passes the
# following run test, then default to *not* using the included regex.c.
# If cross compiling, assume the test would fail and use the included
# regex.c. The first failing regular expression is from `Spencer ere
# test #75' in grep-2.3.
# regex.c.
AC_CACHE_CHECK([for working re_compile_pattern],
[gl_cv_func_re_compile_pattern_working],
[AC_RUN_IFELSE(
@ -74,68 +76,91 @@ AC_DEFUN([gl_REGEX],
}
#endif
/* This test is from glibc bug 3957, reported by Andrew Mackey. */
re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
memset (&regex, 0, sizeof regex);
s = re_compile_pattern ("a[^x]b", 6, &regex);
if (s)
return 1;
/* This should fail, but succeeds for glibc-2.5. */
if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
return 1;
/* This regular expression is from Spencer ere test number 75
in grep-2.3. */
re_set_syntax (RE_SYNTAX_POSIX_EGREP);
memset (&regex, 0, sizeof (regex));
memset (&regex, 0, sizeof regex);
for (i = 0; i <= UCHAR_MAX; i++)
folded_chars[i] = i;
regex.translate = folded_chars;
s = re_compile_pattern ("a[[:@:>@:]]b\n", 11, &regex);
/* This should fail with _Invalid character class name_ error. */
if (!s)
exit (1);
return 1;
/* This should succeed, but does not for e.g. glibc-2.1.3. */
memset (&regex, 0, sizeof (regex));
/* This should succeed, but does not for glibc-2.1.3. */
memset (&regex, 0, sizeof regex);
s = re_compile_pattern ("{1", 2, &regex);
if (s)
exit (1);
return 1;
/* The following example is derived from a problem report
against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>. */
memset (&regex, 0, sizeof (regex));
memset (&regex, 0, sizeof regex);
s = re_compile_pattern ("[an\371]*n", 7, &regex);
if (s)
exit (1);
return 1;
/* This should match, but does not for e.g. glibc-2.2.1. */
/* This should match, but does not for glibc-2.2.1. */
if (re_match (&regex, "an", 2, 0, &regs) != 2)
exit (1);
return 1;
memset (&regex, 0, sizeof (regex));
memset (&regex, 0, sizeof regex);
s = re_compile_pattern ("x", 1, &regex);
if (s)
exit (1);
return 1;
/* The version of regex.c in e.g. GNU libc-2.2.93 did not
work with a negative RANGE argument. */
/* glibc-2.2.93 does not work with a negative RANGE argument. */
if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
exit (1);
return 1;
/* The version of regex.c in older versions of gnulib
ignored RE_ICASE. Detect that problem too. */
memset (&regex, 0, sizeof (regex));
re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
memset (&regex, 0, sizeof regex);
s = re_compile_pattern ("x", 1, &regex);
if (s)
exit (1);
return 1;
if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
exit (1);
return 1;
/* Catch a bug reported by Vin Shelton in
http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
*/
re_set_syntax (RE_SYNTAX_POSIX_BASIC
& ~RE_CONTEXT_INVALID_DUP
& ~RE_NO_EMPTY_RANGES);
memset (&regex, 0, sizeof regex);
s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
if (s)
return 1;
/* REG_STARTEND was added to glibc on 2004-01-15.
Reject older versions. */
if (! REG_STARTEND)
exit (1);
return 1;
/* Reject hosts whose regoff_t values are too narrow.
These include glibc 2.3.5 on hosts with 64-bit ptrdiff_t
and 32-bit int. */
if (sizeof (regoff_t) < sizeof (ptrdiff_t)
|| sizeof (regoff_t) < sizeof (ssize_t))
exit (1);
return 1;
exit (0);]])],
return 0;]])],
[gl_cv_func_re_compile_pattern_working=yes],
[gl_cv_func_re_compile_pattern_working=no],
dnl When crosscompiling, assume it is not working.
@ -190,9 +215,8 @@ AC_DEFUN([gl_REGEX],
# Prerequisites of lib/regex.c and lib/regex_internal.c.
AC_DEFUN([gl_PREREQ_REGEX],
[
AC_REQUIRE([AC_GNU_SOURCE])
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
AC_REQUIRE([AC_C_RESTRICT])
AC_REQUIRE([AM_LANGINFO_CODESET])
AC_CHECK_FUNCS_ONCE([iswctype mbrtowc mempcpy wcrtomb wcscoll])
AC_CHECK_FUNCS_ONCE([isblank iswctype mbrtowc wcrtomb wcscoll])
AC_CHECK_DECLS([isblank], [], [], [#include <ctype.h>])
])

View file

@ -1,13 +1,29 @@
# snprintf.m4 serial 2
dnl Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
# snprintf.m4 serial 4
dnl Copyright (C) 2002, 2003, 2004, 2007 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_SNPRINTF],
[
AC_REPLACE_FUNCS(snprintf)
AC_CHECK_DECLS_ONCE(snprintf)
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
AC_CHECK_FUNCS([snprintf])
if test $ac_cv_func_snprintf = no; then
gl_REPLACE_SNPRINTF
fi
AC_CHECK_DECLS_ONCE([snprintf])
if test $ac_cv_have_decl_snprintf = no; then
HAVE_DECL_SNPRINTF=0
fi
])
AC_DEFUN([gl_REPLACE_SNPRINTF],
[
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
AC_LIBOBJ([snprintf])
if test $ac_cv_func_snprintf = yes; then
REPLACE_SNPRINTF=1
fi
gl_PREREQ_SNPRINTF
])

View file

@ -1,5 +1,5 @@
# socklen.m4 serial 4
dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
# socklen.m4 serial 6
dnl Copyright (C) 2005, 2006, 2007 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.
@ -12,14 +12,14 @@ dnl types for the argument to getsockopt, getpeername, etc. So we
dnl have to test to find something that will work.
dnl On mingw32, socklen_t is in ws2tcpip.h ('int'), so we try to find
dnl it there first. That file is included by gnulib's socket_.h, which
dnl it there first. That file is included by gnulib's sys_socket.in.h, which
dnl all users of this module should include. Cygwin must not include
dnl ws2tcpip.h.
AC_DEFUN([gl_TYPE_SOCKLEN_T],
[AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl
AC_CHECK_TYPE([socklen_t], ,
[AC_MSG_CHECKING([for socklen_t equivalent])
AC_CACHE_VAL([gl_cv_gl_cv_socklen_t_equiv],
AC_CACHE_VAL([gl_cv_socklen_t_equiv],
[# Systems have either "struct sockaddr *" or
# "void *" as the second argument to getpeername
gl_cv_socklen_t_equiv=

View file

@ -1,5 +1,5 @@
# stdint.m4 serial 22
dnl Copyright (C) 2001-2002, 2004-2007 Free Software Foundation, Inc.
# stdint.m4 serial 29
dnl Copyright (C) 2001-2007 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.
@ -45,32 +45,32 @@ AC_DEFUN([gl_STDINT_H],
fi
AC_SUBST([HAVE_SYS_TYPES_H])
dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_stdint_h.
gl_CHECK_NEXT_HEADERS([stdint.h])
if test $ac_cv_header_stdint_h = yes; then
gl_ABSOLUTE_HEADER([stdint.h])
ABSOLUTE_STDINT_H=\"$gl_cv_absolute_stdint_h\"
HAVE_STDINT_H=1
else
ABSOLUTE_STDINT_H=\"no/such/file/stdint.h\"
HAVE_STDINT_H=0
fi
AC_SUBST([ABSOLUTE_STDINT_H])
AC_SUBST([HAVE_STDINT_H])
dnl Now see whether we need a substitute <stdint.h>. Use
dnl ABSOLUTE_STDINT_H, not <stdint.h>, so that it also works during
dnl a "config.status --recheck" if a stdint.h has been
dnl created in the build directory.
dnl Now see whether we need a substitute <stdint.h>.
if test $ac_cv_header_stdint_h = yes; then
AC_CACHE_CHECK([whether stdint.h conforms to C99],
[gl_cv_header_working_stdint_h],
[gl_cv_header_working_stdint_h=no
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#include <stddef.h>
#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
#include ABSOLUTE_STDINT_H
#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
#include <stdint.h>
/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
#if !(defined WCHAR_MIN && defined WCHAR_MAX)
#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
#endif
]
gl_STDINT_INCLUDES
[
#ifdef INT8_MAX
int8_t a1 = INT8_MAX;
int8_t a1min = INT8_MIN;
@ -142,12 +142,32 @@ uintptr_t h = UINTPTR_MAX;
#endif
intmax_t i = INTMAX_MAX;
uintmax_t j = UINTMAX_MAX;
#include <limits.h> /* for CHAR_BIT */
#define TYPE_MINIMUM(t) \
((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
#define TYPE_MAXIMUM(t) \
((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
struct s {
int check_PTRDIFF: PTRDIFF_MIN < 0 && 0 < PTRDIFF_MAX ? 1 : -1;
int check_SIG_ATOMIC: SIG_ATOMIC_MIN <= 0 && 0 < SIG_ATOMIC_MAX ? 1 : -1;
int check_SIZE: 0 < SIZE_MAX ? 1 : -1;
int check_WCHAR: WCHAR_MIN <= 0 && 0 < WCHAR_MAX ? 1 : -1;
int check_WINT: WINT_MIN <= 0 && 0 < WINT_MAX ? 1 : -1;
int check_PTRDIFF:
PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
&& PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
? 1 : -1;
/* Detect bug in FreeBSD 6.0 / ia64. */
int check_SIG_ATOMIC:
SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
&& SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
? 1 : -1;
int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
int check_WCHAR:
WCHAR_MIN == TYPE_MINIMUM (wchar_t)
&& WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
? 1 : -1;
/* Detect bug in mingw. */
int check_WINT:
WINT_MIN == TYPE_MINIMUM (wint_t)
&& WINT_MAX == TYPE_MAXIMUM (wint_t)
? 1 : -1;
/* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
int check_UINT8_C:
@ -202,6 +222,10 @@ struct s {
fi
AC_SUBST([HAVE_SYS_BITYPES_H])
dnl Check for <wchar.h> (missing in Linux uClibc when built without wide
dnl character support).
AC_CHECK_HEADERS_ONCE([wchar.h])
gl_STDINT_TYPE_PROPERTIES
STDINT_H=stdint.h
fi
@ -337,14 +361,16 @@ AC_DEFUN([gl_STDINT_INCLUDES],
included before <wchar.h>. */
#include <stddef.h>
#include <signal.h>
#include <stdio.h>
#include <time.h>
#include <wchar.h>
#if HAVE_WCHAR_H
# include <stdio.h>
# include <time.h>
# include <wchar.h>
#endif
]])
dnl gl_STDINT_TYPE_PROPERTIES
dnl Compute HAVE_SIGNED_t, BITSIZEOF_t and t_SUFFIX, for all the types t
dnl of interest to stdint_.h.
dnl of interest to stdint.in.h.
AC_DEFUN([gl_STDINT_TYPE_PROPERTIES],
[
gl_STDINT_BITSIZEOF([ptrdiff_t sig_atomic_t size_t wchar_t wint_t],

85
gl/m4/stdio_h.m4 Normal file
View file

@ -0,0 +1,85 @@
# stdio_h.m4 serial 9
dnl Copyright (C) 2007 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_STDIO_H],
[
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
gl_CHECK_NEXT_HEADERS([stdio.h])
])
AC_DEFUN([gl_STDIO_MODULE_INDICATOR],
[
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
])
AC_DEFUN([gl_STDIO_H_DEFAULTS],
[
GNULIB_FPRINTF_POSIX=0; AC_SUBST([GNULIB_FPRINTF_POSIX])
GNULIB_PRINTF_POSIX=0; AC_SUBST([GNULIB_PRINTF_POSIX])
GNULIB_SNPRINTF=0; AC_SUBST([GNULIB_SNPRINTF])
GNULIB_SPRINTF_POSIX=0; AC_SUBST([GNULIB_SPRINTF_POSIX])
GNULIB_VFPRINTF_POSIX=0; AC_SUBST([GNULIB_VFPRINTF_POSIX])
GNULIB_VPRINTF_POSIX=0; AC_SUBST([GNULIB_VPRINTF_POSIX])
GNULIB_VSNPRINTF=0; AC_SUBST([GNULIB_VSNPRINTF])
GNULIB_VSPRINTF_POSIX=0; AC_SUBST([GNULIB_VSPRINTF_POSIX])
GNULIB_VASPRINTF=0; AC_SUBST([GNULIB_VASPRINTF])
GNULIB_FOPEN=0; AC_SUBST([GNULIB_FOPEN])
GNULIB_FREOPEN=0; AC_SUBST([GNULIB_FREOPEN])
GNULIB_FSEEK=0; AC_SUBST([GNULIB_FSEEK])
GNULIB_FSEEKO=0; AC_SUBST([GNULIB_FSEEKO])
GNULIB_FTELL=0; AC_SUBST([GNULIB_FTELL])
GNULIB_FTELLO=0; AC_SUBST([GNULIB_FTELLO])
GNULIB_FFLUSH=0; AC_SUBST([GNULIB_FFLUSH])
GNULIB_GETDELIM=0; AC_SUBST([GNULIB_GETDELIM])
GNULIB_GETLINE=0; AC_SUBST([GNULIB_GETLINE])
dnl Assume proper GNU behavior unless another module says otherwise.
REPLACE_FPRINTF=0; AC_SUBST([REPLACE_FPRINTF])
REPLACE_VFPRINTF=0; AC_SUBST([REPLACE_VFPRINTF])
REPLACE_PRINTF=0; AC_SUBST([REPLACE_PRINTF])
REPLACE_VPRINTF=0; AC_SUBST([REPLACE_VPRINTF])
REPLACE_SNPRINTF=0; AC_SUBST([REPLACE_SNPRINTF])
HAVE_DECL_SNPRINTF=1; AC_SUBST([HAVE_DECL_SNPRINTF])
REPLACE_VSNPRINTF=0; AC_SUBST([REPLACE_VSNPRINTF])
HAVE_DECL_VSNPRINTF=1; AC_SUBST([HAVE_DECL_VSNPRINTF])
REPLACE_SPRINTF=0; AC_SUBST([REPLACE_SPRINTF])
REPLACE_VSPRINTF=0; AC_SUBST([REPLACE_VSPRINTF])
HAVE_VASPRINTF=1; AC_SUBST([HAVE_VASPRINTF])
REPLACE_VASPRINTF=0; AC_SUBST([REPLACE_VASPRINTF])
REPLACE_FOPEN=0; AC_SUBST([REPLACE_FOPEN])
REPLACE_FREOPEN=0; AC_SUBST([REPLACE_FREOPEN])
HAVE_FSEEKO=1; AC_SUBST([HAVE_FSEEKO])
REPLACE_FSEEKO=0; AC_SUBST([REPLACE_FSEEKO])
REPLACE_FSEEK=0; AC_SUBST([REPLACE_FSEEK])
HAVE_FTELLO=1; AC_SUBST([HAVE_FTELLO])
REPLACE_FTELLO=0; AC_SUBST([REPLACE_FTELLO])
REPLACE_FTELL=0; AC_SUBST([REPLACE_FTELL])
REPLACE_FFLUSH=0; AC_SUBST([REPLACE_FFLUSH])
HAVE_DECL_GETDELIM=1; AC_SUBST([HAVE_DECL_GETDELIM])
HAVE_DECL_GETLINE=1; AC_SUBST([HAVE_DECL_GETLINE])
REPLACE_GETLINE=0; AC_SUBST([REPLACE_GETLINE])
])
dnl Code shared by fseeko and ftello. Determine if large files are supported,
dnl but stdin does not start as a large file by default.
AC_DEFUN([gl_STDIN_LARGE_OFFSET],
[
AC_CACHE_CHECK([whether stdin defaults to large file offsets],
[gl_cv_var_stdin_large_offset],
[AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>],
[#if defined __SL64 && defined __SCLE /* cygwin */
/* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and
it is easier to do a version check than building a runtime test. */
# include <cygwin/version.h>
# if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
choke me
# endif
#endif])],
[gl_cv_var_stdin_large_offset=yes],
[gl_cv_var_stdin_large_offset=no])])
])

42
gl/m4/stdlib_h.m4 Normal file
View file

@ -0,0 +1,42 @@
# stdlib_h.m4 serial 5
dnl Copyright (C) 2007 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_STDLIB_H],
[
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
gl_CHECK_NEXT_HEADERS([stdlib.h])
])
AC_DEFUN([gl_STDLIB_MODULE_INDICATOR],
[
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
])
AC_DEFUN([gl_STDLIB_H_DEFAULTS],
[
GNULIB_MALLOC_POSIX=0; AC_SUBST([GNULIB_MALLOC_POSIX])
GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX])
GNULIB_CALLOC_POSIX=0; AC_SUBST([GNULIB_CALLOC_POSIX])
GNULIB_GETSUBOPT=0; AC_SUBST([GNULIB_GETSUBOPT])
GNULIB_MKDTEMP=0; AC_SUBST([GNULIB_MKDTEMP])
GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP])
GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV])
GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV])
GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV])
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_CALLOC_POSIX=1; AC_SUBST([HAVE_CALLOC_POSIX])
HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT])
HAVE_MALLOC_POSIX=1; AC_SUBST([HAVE_MALLOC_POSIX])
HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP])
HAVE_REALLOC_POSIX=1; AC_SUBST([HAVE_REALLOC_POSIX])
HAVE_SETENV=1; AC_SUBST([HAVE_SETENV])
HAVE_UNSETENV=1; AC_SUBST([HAVE_UNSETENV])
REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP])
REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV])
VOID_UNSETENV=0; AC_SUBST([VOID_UNSETENV])
])

View file

@ -1,39 +0,0 @@
# strcase.m4 serial 4
dnl Copyright (C) 2002, 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_STRCASE],
[
gl_FUNC_STRCASECMP
gl_FUNC_STRNCASECMP
])
AC_DEFUN([gl_FUNC_STRCASECMP],
[
dnl No known system has a strcasecmp() function that works correctly in
dnl multibyte locales. Therefore we use our version always.
AC_LIBOBJ(strcasecmp)
gl_PREREQ_STRCASECMP
])
AC_DEFUN([gl_FUNC_STRNCASECMP],
[
AC_REPLACE_FUNCS(strncasecmp)
AC_CHECK_DECLS(strncasecmp)
if test $ac_cv_func_strncasecmp = no; then
gl_PREREQ_STRNCASECMP
fi
])
# Prerequisites of lib/strcasecmp.c.
AC_DEFUN([gl_PREREQ_STRCASECMP], [
AC_REQUIRE([gl_FUNC_MBRTOWC])
:
])
# Prerequisites of lib/strncasecmp.c.
AC_DEFUN([gl_PREREQ_STRNCASECMP], [
:
])

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