Permalink
Browse files

alloca's parameter is supposed to be of type size_t

  • Loading branch information...
1 parent 0f575c3 commit 5bafb12e8ba9f66548f58720a1f55aacfc7eefcc @brentr brentr committed with FooBarWidget Mar 16, 2009
Showing with 2 additions and 6 deletions.
  1. +2 −6 missing/alloca.c
View
@@ -29,6 +29,7 @@
static char SCCSid[] = "@(#)alloca.c 1.1"; /* for the "what" utility */
#endif
+#include <sys/types.h>
#include "config.h"
#ifdef emacs
#ifdef static
@@ -44,11 +45,7 @@ lose
#endif /* static */
#endif /* emacs */
-#ifdef X3J11
typedef void *pointer; /* generic pointer type */
-#else
-typedef char *pointer; /* generic pointer type */
-#endif /* X3J11 */
#define NULL 0 /* null pointer constant */
@@ -140,8 +137,7 @@ typedef union hdr
static header *last_alloca_header = NULL; /* -> last alloca header */
pointer
-alloca (size) /* returns pointer to storage */
- unsigned size; /* # bytes to allocate */
+alloca (size_t size) /* returns pointer to storage */
{
auto char probe; /* probes stack depth: */
register char *depth = &probe;

0 comments on commit 5bafb12

Please sign in to comment.