The alloca() arg type check is broken (cpp do not do string comparisions)

so make it marginally less broken so that it works with other compilers
than gcc.
Probably the check can be removed, I doubt anyone will try to use gcc1
anymore.
This commit is contained in:
ragge 2007-04-22 08:21:50 +00:00
parent 1c9313a294
commit 98e922db67
1 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: stdlib.h,v 1.76 2006/03/15 17:35:17 kleink Exp $ */ /* $NetBSD: stdlib.h,v 1.77 2007/04/22 08:21:50 ragge Exp $ */
/*- /*-
* Copyright (c) 1990, 1993 * Copyright (c) 1990, 1993
@ -235,7 +235,8 @@ int posix_openpt(int);
* Implementation-defined extensions * Implementation-defined extensions
*/ */
#if defined(_NETBSD_SOURCE) #if defined(_NETBSD_SOURCE)
#if defined(alloca) && (alloca == __builtin_alloca) && (__GNUC__ < 2) #if defined(alloca) && (alloca == __builtin_alloca) && \
defined(__GNUC__) && (__GNUC__ < 2)
void *alloca(int); /* built-in for gcc */ void *alloca(int); /* built-in for gcc */
#else #else
void *alloca(size_t); void *alloca(size_t);