diff options
author | Joseph Myers <joseph@codesourcery.com> | 2010-03-24 23:20:15 +0000 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2010-03-24 23:20:15 +0000 |
commit | 6f5db5f7e9cac88710d78ad6de684d9f036ac91e (patch) | |
tree | 606a7efe5f95105e61a8c817193b4c9725cfbe39 /fixincludes/tests | |
parent | 5e599ebb7dfdbbfefe346bc5a2731746a905b643 (diff) | |
download | gcc-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.h | 5 |
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 */ |