parse-datetime, tests: don't use "string" + int

Recent versions of 'clang' complain about C source code that
uses expressions of the form '"string literal" + integer',
I guess on the theory that it's confusing for readers who are
used to C++.  On those grounds I suppose it's OK to make this
minor style change.
* lib/parse-datetime.y (parse_datetime):
* tests/test-fchdir.c (main):
* tests/test-snprintf-posix.h (test_function):
* tests/test-snprintf.c (main):
* tests/test-vasnprintf-posix.c (test_function):
* tests/test-vasnprintf.c (test_function):
* tests/test-vsnprintf.c (main):
* tests/unistdio/test-ulc-asnprintf1.h (test_function):
Rewrite '"str" + E' to '&"str"[E]'.
malloca: port to compilers that reject size-zero arrays

This fixes a bug introduced in my previous patch.
* lib/malloca.c (struct preliminary_header): Use an int
rather than a character array of size int; that's simpler.
(struct header): Remove, replacing with ...
(union header): New type.  This avoids the need for declaring a
character array of size zero, which is not allowed on some platforms.
All uses changed.
regex: fix dfa race in multithreaded uses

Problem reported by Ludovic Courtès in
<http://lists.gnu.org/archive/html/bug-gnulib/2013-05/msg00058.html>.
* lib/regex_internal.h (lock_define, lock_init, lock_fini):
New macros.  All uses of __libc_lock_define, __libc_lock_init
changed to use the first two of these.
(__libc_lock_lock, __libc_lock_unlock): New macros, for
non-glibc platforms.
(struct re_dfa_t): Define the lock unconditionally.
* lib/regexec.c (regexec, re_search_stub): Remove some now-incorrect
'#ifdef _LIBC"s.
* modules/regex (Depends-on): Add pthread, if we use the
included regex.

* lib/regcomp.c: Do actions that are not needed for glibc,
but may be needed elsewhere.
(regfree, re_compile_internal): Destroy the lock.
(re_compile_internal): Check for lock-initialization failure.
test-lchown, test-chown: also skip test if lchown/chown fails with EPERM

These tests abort on FAT file systems right after the test for
filtering out situation without ownership support; errno is EPERM
in such a case.

* tests/test-lchown.h (test_lchown): Add EPERM to the condition to
skip this test.
* tests/test-chown.h (test_chown): Likewise.
getgroups: document portability issues

Because I actually managed to hit deadlock in libvirt's child
process due to glibc's mutex use in user database lookup, I
figured it is worth documenting the issue for others to be
aware of when writing a privileged multithreaded parent app
that spawns child processes owned by non-privileged ids.

* doc/glibc-functions/initgroups.texi (initgroups): Mention
multithread safety.
* doc/posix-functions/getpwuid.texi (getpwuid): Likewise.
* doc/posix-functions/getpwuid_r.texi (getpwuid_r): Likewise.
* doc/glibc-functions/getgrouplist.texi (getgrouplist): Mention
getugroups.
* doc/posix-functions/getgroups.texi (getgroups): Mention
multithread safety and mgetgroups.

Signed-off-by: Eric Blake <eblake@redhat.com>