summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2010-11-20 18:54:00 +0100
committerBruno Haible <bruno@clisp.org>2010-11-20 18:54:00 +0100
commit63bc47a1fecb6e16b620d95fc6f5313f317bb550 (patch)
tree14b82933f36d88f7b4c80e86ec9bc02e5a1cf163 /tests
parent1756f0d25b6b53905697246f71e1575a906a0cea (diff)
downloadgnulib-63bc47a1fecb6e16b620d95fc6f5313f317bb550.tar.gz
Port to uClibc.
* lib/relocatable.c (find_shared_library_fullname): Treat uClibc like glibc. * lib/strerror_r.c: Likewise. * m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET): Likewise. * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Likewise. * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Likewise. * m4/glibc21.m4 (gl_GLIBC21): Likewise. * tests/test-sigaction.c (handler, main): Likewise. * lib/localename.c (gl_locale_name_thread_unsafe, HAVE_LOCALE_NULL): Treat uClibc like a non-glibc platform. * lib/propername.c (proper_name_utf8): Likewise. * lib/spawn.in.h: Likewise. * lib/striconv.c (mem_cd_iconv, str_cd_iconv, str_iconv): Likewise. * lib/striconveh.c (iconveh_open, iconv_carefully, iconv_carefully_1, mem_cd_iconveh_internal): Likewise. * lib/striconveha.c (mem_iconveha, str_iconveha): Likewise. * lib/string.in.h (memchr, memrchr, rawmemchr, strchrnul, strpbrk, strstr, strcasestr): Likewise. * lib/unicodeio.c (unicode_to_mb): Likewise. * m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise. * m4/getline.m4 (gl_FUNC_GETLINE): Likewise. * m4/glibc2.m4 (gt_GLIBC2): Likewise. * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN): Likewise. * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE, gl_FUNC_MEMMEM): Likewise. * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Likewise. * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE, gl_FUNC_STRCASESTR): Likewise. * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE, gl_FUNC_STRSTR): Likewise. * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise. * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H): Likewise. * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise. * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise. * m4/sys_times_h.m4 (gl_SYS_TIMES_H): Likewise. * m4/unistd_h.m4 (gl_UNISTD_H): Likewise. * m4/wchar_h.m4 (gl_WCHAR_H): Likewise. * tests/test-getopt.h (OPTIND_MIN): Likewise. * tests/test-striconveha.c (main): Likewise. * doc/posix-functions/getdelim.texi: Mention an uClibc bug. * doc/posix-functions/getline.texi: Likewise. Reported by Mike Frysinger <vapier@gentoo.org>.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-getopt.h2
-rw-r--r--tests/test-sigaction.c4
-rw-r--r--tests/test-striconveha.c4
-rw-r--r--tests/test-vasnprintf-posix.c2
-rw-r--r--tests/test-vasnprintf-posix3.c4
5 files changed, 8 insertions, 8 deletions
diff --git a/tests/test-getopt.h b/tests/test-getopt.h
index 12859ac9ec..e4e6facab0 100644
--- a/tests/test-getopt.h
+++ b/tests/test-getopt.h
@@ -21,7 +21,7 @@
/* The glibc/gnulib implementation of getopt supports setting optind =
0, but not all other implementations do. This matters for getopt.
But for getopt_long, we require GNU compatibility. */
-#if defined __GETOPT_PREFIX || (__GLIBC__ >= 2)
+#if defined __GETOPT_PREFIX || (__GLIBC__ >= 2 && !defined __UCLIBC__)
# define OPTIND_MIN 0
#elif HAVE_DECL_OPTRESET
# define OPTIND_MIN (optreset = 1)
diff --git a/tests/test-sigaction.c b/tests/test-sigaction.c
index 73579d960a..93607dd4b2 100644
--- a/tests/test-sigaction.c
+++ b/tests/test-sigaction.c
@@ -71,7 +71,7 @@ handler (int sig)
/* This assertion fails on glibc-2.3.6 systems with LinuxThreads,
when this program is linked with -lpthread, due to the sigaction()
override in libpthread.so. */
-#if !defined __GLIBC__
+#if !(defined __GLIBC__ || defined __UCLIBC__)
ASSERT (sa.sa_handler == SIG_DFL);
#endif
break;
@@ -101,7 +101,7 @@ main (void)
sa.sa_handler = SIG_DFL;
ASSERT (sigaction (SIGABRT, &sa, &old_sa) == 0);
ASSERT ((old_sa.sa_flags & SA_SIGINFO) == 0);
-#if !defined __GLIBC__ /* see above */
+#if !(defined __GLIBC__ || defined __UCLIBC__) /* see above */
ASSERT (old_sa.sa_handler == SIG_DFL);
#endif
diff --git a/tests/test-striconveha.c b/tests/test-striconveha.c
index 1da674e18a..dd7eab12c7 100644
--- a/tests/test-striconveha.c
+++ b/tests/test-striconveha.c
@@ -401,7 +401,7 @@ main ()
}
# endif
-# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 || _LIBICONV_VERSION >= 0x0105
+# if (((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2) && !defined __UCLIBC__) || _LIBICONV_VERSION >= 0x0105
/* Test conversion from UTF-8 to ISO-8859-1 with transliteration. */
for (h = 0; h < SIZEOF (handlers); h++)
{
@@ -577,7 +577,7 @@ main ()
}
# endif
-# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 || _LIBICONV_VERSION >= 0x0105
+# if (((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2) && !defined __UCLIBC__) || _LIBICONV_VERSION >= 0x0105
/* Test conversion from UTF-8 to ISO-8859-1 with transliteration. */
for (h = 0; h < SIZEOF (handlers); h++)
{
diff --git a/tests/test-vasnprintf-posix.c b/tests/test-vasnprintf-posix.c
index c0e9ea2fac..87c58985fd 100644
--- a/tests/test-vasnprintf-posix.c
+++ b/tests/test-vasnprintf-posix.c
@@ -3659,7 +3659,7 @@ test_function (char * (*my_asnprintf) (char *, size_t *, const char *, ...))
}
#endif
-#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
+#if (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) && !defined __UCLIBC__
/* Test that the 'I' flag is supported. */
{
size_t length;
diff --git a/tests/test-vasnprintf-posix3.c b/tests/test-vasnprintf-posix3.c
index e0237fa60f..a2e5c6825b 100644
--- a/tests/test-vasnprintf-posix3.c
+++ b/tests/test-vasnprintf-posix3.c
@@ -32,7 +32,7 @@ test_function (char * (*my_asnprintf) (char *, size_t *, const char *, ...))
/* glibc >= 2.2 supports the 'I' flag, and in glibc >= 2.2.3 the fa_IR
locale defines the 'outdigits' to be U+06F0..U+06F9.
So we test for glibc >= 2.3. */
-#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)
+#if (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__
/* Test that the 'I' flag is supported. */
{
size_t length;
@@ -75,7 +75,7 @@ test_asnprintf ()
int
main (int argc, char *argv[])
{
-#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)
+#if (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__
/* Select a locale with Arabic 'outdigits'. */
if (setlocale (LC_ALL, "fa_IR.UTF-8") == NULL)
{