diff mbox

system.h: Poison strndup (PR bootstrap/78616)

Message ID 1484342253-27870-1-git-send-email-dmalcolm@redhat.com
State New
Headers show

Commit Message

David Malcolm Jan. 13, 2017, 9:17 p.m. UTC
This patch poisons strndup (in system.h), as requested in the
discussion of PR bootstrap/78616.

Successfully bootstrapped&regrtested on x86_64-pc-linux-gnu.

OK for trunk?

gcc/ChangeLog:
	PR bootstrap/78616
	* system.h: Poison strndup.
---
 gcc/system.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Richard Biener Jan. 16, 2017, 8:39 a.m. UTC | #1
On Fri, Jan 13, 2017 at 10:17 PM, David Malcolm <dmalcolm@redhat.com> wrote:
> This patch poisons strndup (in system.h), as requested in the
> discussion of PR bootstrap/78616.
>
> Successfully bootstrapped&regrtested on x86_64-pc-linux-gnu.
>
> OK for trunk?

Ok.

Richard.

> gcc/ChangeLog:
>         PR bootstrap/78616
>         * system.h: Poison strndup.
> ---
>  gcc/system.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/gcc/system.h b/gcc/system.h
> index 0cd58db..c0f08a9 100644
> --- a/gcc/system.h
> +++ b/gcc/system.h
> @@ -840,7 +840,8 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
>  #ifndef USES_ISL
>  #undef calloc
>  #undef strdup
> - #pragma GCC poison calloc strdup
> +#undef strndup
> + #pragma GCC poison calloc strdup strndup
>  #endif
>
>  #if !defined(FLEX_SCANNER) && !defined(YYBISON)
> --
> 1.8.5.3
>
diff mbox

Patch

diff --git a/gcc/system.h b/gcc/system.h
index 0cd58db..c0f08a9 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -840,7 +840,8 @@  extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
 #ifndef USES_ISL
 #undef calloc
 #undef strdup
- #pragma GCC poison calloc strdup
+#undef strndup
+ #pragma GCC poison calloc strdup strndup
 #endif
 
 #if !defined(FLEX_SCANNER) && !defined(YYBISON)