Annotation of src/usr.bin/mk_cmds/mk_cmds_defs.h, Revision 1.1
1.1 ! downsj 1: /* $OpenBSD: mk_cmds_defs.h,v 1.1.1.1 1995/12/14 06:52:48 tholo Exp $ */
! 2:
! 3: #include <stdio.h>
! 4: #include <string.h>
! 5:
! 6: #ifdef __STDC__
! 7:
! 8: #define PROTOTYPE(p) p
! 9: typedef void * pointer;
! 10:
! 11: #else
! 12:
! 13: #define const
! 14: #define volatile
! 15: #define PROTOTYPE(p) ()
! 16: typedef char * pointer;
! 17:
! 18: #endif /* not __STDC__ */
! 19:
! 20: #if defined(__GNUC__)
! 21: #define LOCAL_ALLOC(x) __builtin_alloca(x)
! 22: #define LOCAL_FREE(x)
! 23: #else
! 24: #if defined(vax)
! 25: #define LOCAL_ALLOC(x) alloca(x)
! 26: #define LOCAL_FREE(x)
! 27: extern pointer alloca PROTOTYPE((unsigned));
! 28: #else
! 29: #if defined(__HIGHC__) /* Barf! */
! 30: pragma on(alloca);
! 31: #define LOCAL_ALLOC(x) alloca(x)
! 32: #define LOCAL_FREE(x)
! 33: extern pointer alloca PROTOTYPE((unsigned));
! 34: #else
! 35: /* no alloca? */
! 36: #define LOCAL_ALLOC(x) malloc(x)
! 37: #define LOCAL_FREE(x) free(x)
! 38: #endif
! 39: #endif
! 40: #endif /* LOCAL_ALLOC stuff */