Browse Source

we don't have an alloca() symbol anywhere in libc, don't prototype it.

instead, #define to __builtin_alloca. if that doesn't work, you're hosed.
from an old discussion about the perils of alloca. (don't use alloca!)
OPENBSD_5_7
tedu 9 years ago
parent
commit
826668e285
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/include/stdlib.h

+ 2
- 2
src/include/stdlib.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: stdlib.h,v 1.62 2014/12/08 21:45:19 deraadt Exp $ */
/* $OpenBSD: stdlib.h,v 1.63 2015/01/15 19:55:58 tedu Exp $ */
/* $NetBSD: stdlib.h,v 1.25 1995/12/27 21:19:08 jtc Exp $ */
/*-
@ -267,7 +267,7 @@ int mkostemp(char *, int);
#endif
#if __BSD_VISIBLE
void *alloca(size_t);
#define alloca(n) __builtin_alloca(n)
char *getbsize(int *, long *);
char *cgetcap(char *, const char *, int);


Loading…
Cancel
Save