regex: rename remaining __attribute calls to __attribute__.

Commit 930b85b changed definition of __attribute, but left some uses
unchanged, preventing compilation of regex module on most non-gcc
environments:
* lib/regcomp.c (re_set_fastmap, seek_collating_symbol_entry)
(lookup_collation_sequence_value, build_range_exp)
(build_collating_symbol): Set attributes with newly renamed
__attribute__ decorator.
* lib/regex_internal.c (re_string_peek_byte_case)
(re_node_set_compare, re_node_set_contains): Likewise.
* lib/regexec.c (acquire_init_state_context): Likewise.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
bootstrap: port to FreeBSD

* build-aux/bootstrap (bootstrap_sync): Port sh -c usage to shells
that treat '--' differently.  Reported by Mats Erik Andersson in
<http://lists.gnu.org/archive/html/bug-gnulib/2013-03/msg00012.html>.
vasnprintf-posix-tests: allow rounding 1.5 to 1

* tests/test-vasnprintf-posix.c (test_function): Don't insist on
round-to-even, since POSIX says rounding is implementation-defined
and OS X 10.8.2 rounds 1.5 to 1 here.  Reported by Gary V. Vaughan in
<http://lists.gnu.org/archive/html/bug-gnulib/2013-03/msg00019.html>.
autoupdate
vasprintf-posix-tests: allow rounding 1.5 to 1.

* tests/test-vasprintf-posix.c (test_function): Don't insist on
round-to-even, since POSIX says rounding is implementation-defined
and OS X 10.8.2 rounds 1.5 to 1 here.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
vasprintf-posix-tests: allow rounding 1.51 to 1.

* tests/test-vasprintf-posix.c (test_function): Don't insist on
round-to-even, since POSIX says rounding is implementation-defined
and OS X 10.8.2 rounds 1.51 to 1 here.
autoupdate
unistd: don't prevent Tru64 Unix from using gnulib strtod.

* lib/unistd.in.h: be careful not to include un-needed system
stdlib.h from here, because that prevents gnulib stdlib.h from
defining rpl_strtod correctly.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
putenv: avoid compilation warning on mingw

On mingw, I got:

../../tests/putenv.c: In function '_unsetenv':
../../tests/putenv.c:65:10: warning: unused variable 'ep'

* lib/putenv.c (_unsetenv): Protect variable declaration.
(putenv): Fix indentation.

Signed-off-by: Eric Blake <eblake@redhat.com>
regex: port to mingw's recent addition of undeclared alarm

On mingw (at least, when cross-compiling with Fedora 18's
mingw32-headers-2.0.999-0.15.trunk.20121110.fc18.noarch build),
compilation of test-regex fails:

test-regex.c: In function 'main':
test-regex.c:42:11: error: 'SIGALRM' undeclared (first use in this function)
test-regex.c:42:11: note: each undeclared identifier is reported only
once for each function it appears in
test-regex.c:43:3: warning: implicit declaration of function 'alarm'

It turns out that recent mingw64 added an export of alarm() and
SIGALRM, but guarded their declarations behind __USE_MINGW_ALARM
(default off, and with alarm() only in the non-standard <io.h>);
so the m4 tests were setting HAVE_ALARM to 1 based on link success
but then failing to compile.

* doc/posix-functions/alarm.texi (alarm): Document that alarm
exists but still doesn't work in newer mingw.
* m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Check for alarm declaration,
not existence.  Ensure SIGALRM is not trapped.
* m4/mktime.m4 (gl_FUNC_MKTIME): Likewise.
* m4/regex.m4 (gl_REGEX): Likewise.
* m4/remainderf.m4 (gl_FUNC_REMAINDERF_WORKS): Likewise.
* tests/test-regex.c (main): Use correct probe for alarm.

Signed-off-by: Eric Blake <eblake@redhat.com>
tests: make it easier to bypass alarm time in debugger

While auditing alarm usage, I noticed that test-regex had a nice
idiom that made it easier to disable an alarm under glibc.  Use
it elsewhere, so future copy-and-paste will preserve the idiom.

* tests/test-file-has-acl.c (main): Allow gdb to override alarm.
* tests/test-memmem.c (main): Likewise.
* tests/test-passfd.c (main): Likewise.
* tests/test-ptsname.c (main): Likewise.
* tests/test-ptsname_r.c (main): Likewise.
* tests/test-strcasestr.c (main): Likewise.
* tests/test-strstr.c (main): Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
regex-tests: skip UTF-8 test on mingw

test-regex failed on mingw; and I traced it in gdb to an instance
of init_dfa() setting dfa->is_utf8 to 0 in spite of setlocale()
claiming success for "en_US.UTF-8".  test-wcwidth already has
precedent for skipping utf-8 tests where the system (or gnulib
setlocale replacement, in this case) lies about utf-8 support.

* modules/regex-tests (Depends-on): Add localcharset.
* tests/test-regex.c (main): Use it to skip test on mingw.

Signed-off-by: Eric Blake <eblake@redhat.com>
mktime: fix configure typo

* m4/mktime.m4 (gl_FUNC_MKTIME): Fix typo in previous change.
putenv: port to Solaris 10

* lib/putenv.c (_unsetenv, putenv): Use HAVE_DECL__PUTENV, not
HAVE__PUTENV.  Solaris 10 has a _putenv that's not declared and
is not what is wanted here.
* m4/putenv.m4 (gl_PREREQ_PUTENV): Check for _putenv's
declaration, not for its existence.
prefix-gnulib-mk: give better diagnostics

* build-aux/prefix-gnulib-mk: Don't just "die".
Give better diagnostics upon failure.