|
@@ -26,7 +26,9 @@
|
|
|
#ifdef __UCLIBC__
|
|
|
# undef _LIBC
|
|
|
# define _REGEX_RE_COMP
|
|
|
-# define HAVE_MEMPCPY
|
|
|
+# ifdef __USE_GNU
|
|
|
+# define HAVE_MEMPCPY
|
|
|
+# endif
|
|
|
# define STDC_HEADERS
|
|
|
# define RE_TRANSLATE_TYPE char *
|
|
|
#endif
|
|
@@ -41,8 +43,10 @@ libc_hidden_proto(memcpy)
|
|
|
libc_hidden_proto(strcmp)
|
|
|
libc_hidden_proto(strlen)
|
|
|
libc_hidden_proto(printf)
|
|
|
-libc_hidden_proto(mempcpy)
|
|
|
libc_hidden_proto(abort)
|
|
|
+#ifdef __USE_GNU
|
|
|
+libc_hidden_proto(mempcpy)
|
|
|
+#endif
|
|
|
|
|
|
/* AIX requires this to be the first thing in the file. */
|
|
|
#if defined _AIX && !defined REGEX_MALLOC
|
|
@@ -8281,7 +8285,7 @@ regerror (errcode, preg, errbuf, errbuf_size)
|
|
|
{
|
|
|
if (msg_size > errbuf_size)
|
|
|
{
|
|
|
-#if defined HAVE_MEMPCPY || defined _LIBC
|
|
|
+#if (defined HAVE_MEMPCPY || defined _LIBC) && defined __USE_GNU
|
|
|
*((char *) mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
|
|
|
#else
|
|
|
memcpy (errbuf, msg, errbuf_size - 1);
|