/[bison]/bison/src/system.h
ViewVC logotype

Diff of /bison/src/system.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.57 by eggert, Wed Dec 11 06:54:00 2002 UTC revision 1.58 by eggert, Fri Dec 13 08:44:28 2002 UTC
# Line 22  Line 22 
22  # include <config.h>  # include <config.h>
23  #endif  #endif
24    
25  /* AIX requires this to be the first thing in the file.  */  #include <stddef.h>
 #ifdef __GNUC__  
 # define alloca(Size) __builtin_alloca (Size)  
 #else  
 # if HAVE_ALLOCA_H  
 #  include <alloca.h>  
 # else  
 #  ifdef _AIX  
  #pragma alloca  
 #  else  
 #   ifndef alloca /* predefined by HP cc +Olibcalls */  
 char *alloca ();  
 #   endif  
 #  endif  
 # endif  
 #endif  
   
26  #include <stdio.h>  #include <stdio.h>
27    
28  /* Verify a requirement at compile-time (unlike assert, which is runtime).  */  /* Verify a requirement at compile-time (unlike assert, which is runtime).  */
# Line 81  char *alloca (); Line 65  char *alloca ();
65    
66  #include <limits.h>  #include <limits.h>
67    
68    #if HAVE_UINTPTR_T
69    # if HAVE_INTTYPES_H
70    #  include <inttypes.h>
71    # else
72    #  if HAVE_STDINT_H
73    #   include <stdint.h>
74    #  endif
75    # endif
76    #else
77    /* This isn't perfect, but it's good enough for Bison, which needs
78       only to hash pointers.  */
79    typedef size_t uintptr_t;
80    #endif
81    
82  #include <xalloc.h>  #include <xalloc.h>
83    #define CALLOC(P, N) ((P) = xcalloc (N, sizeof *(P)))
84    #define MALLOC(P, N) ((P) = xmalloc ((N) * sizeof *(P)))
85    #define REALLOC(P, N) ((P) = xrealloc (P, (N) * sizeof *(P)))
86    
87  /* From xstrndup.c.  */  /* From xstrndup.c.  */
88  char *xstrndup (const char *s, size_t n);  char *xstrndup (const char *s, size_t n);

Legend:
Removed from v.1.57  
changed lines
  Added in v.1.58

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26