summaryrefslogtreecommitdiff
path: root/fixincludes/tests
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2010-03-24 23:20:15 +0000
committerJoseph Myers <jsm28@gcc.gnu.org>2010-03-24 23:20:15 +0000
commit6f5db5f7e9cac88710d78ad6de684d9f036ac91e (patch)
tree606a7efe5f95105e61a8c817193b4c9725cfbe39 /fixincludes/tests
parent5e599ebb7dfdbbfefe346bc5a2731746a905b643 (diff)
downloadgcc-6f5db5f7e9cac88710d78ad6de684d9f036ac91e.tar.gz
inclhack.def (glibc_strncpy): New fix.
fixincludes: * inclhack.def (glibc_strncpy): New fix. * fixincl.x: Regenerate. * tests/base/bits/string2.h: Update. gcc/testsuite: * gcc.dg/strncpy-fix-1.c: New test. From-SVN: r157717
Diffstat (limited to 'fixincludes/tests')
-rw-r--r--fixincludes/tests/base/bits/string2.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/fixincludes/tests/base/bits/string2.h b/fixincludes/tests/base/bits/string2.h
index 1da54fdec70..be6fe601a6b 100644
--- a/fixincludes/tests/base/bits/string2.h
+++ b/fixincludes/tests/base/bits/string2.h
@@ -16,3 +16,8 @@
# define __STRING_INLINE extern __inline
# endif
#endif /* GLIBC_C99_INLINE_3_CHECK */
+
+
+#if defined( GLIBC_STRNCPY_CHECK )
+# define strncpy(dest, src, n) __builtin_strncpy (dest, src, n)
+#endif /* GLIBC_STRNCPY_CHECK */