1 /* @(#)alloca.h 1.7 10/08/24 Copyright 2002-2010 J. Schilling */ 2 /* 3 * Definitions for users of alloca() 4 * 5 * Important: #include this directly after <schily/mconfig.h> 6 * and before any other include file. 7 * See comment in _AIX part below. 8 * 9 * Copyright (c) 2002-2010 J. Schilling 10 */ 11 /* 12 * The contents of this file are subject to the terms of the 13 * Common Development and Distribution License, Version 1.0 only 14 * (the "License"). You may not use this file except in compliance 15 * with the License. 16 * 17 * See the file CDDL.Schily.txt in this distribution for details. 18 * A copy of the CDDL is also available via the Internet at 19 * http://www.opensource.org/licenses/cddl1.txt 20 * 21 * When distributing Covered Code, include this CDDL HEADER in each 22 * file and include the License file CDDL.Schily.txt from this distribution. 23 */ 24 25 26 #ifndef _SCHILY_ALLOCA_H 27 #define _SCHILY_ALLOCA_H 28 29 #ifdef __GNUC__ 30 # ifndef alloca 31 # define alloca(s) __builtin_alloca(s) 32 # endif 33 #else 34 # ifdef _MSC_VER 35 # include <malloc.h> 36 # define alloca _alloca 37 # else 38 # if HAVE_ALLOCA_H 39 # include <alloca.h> 40 # else 41 # ifdef _AIX 42 /* 43 * Indent so pre-ANSI compilers will ignore it 44 * 45 * Some versions of AIX may require this to be 46 * first in the file and only preceded by 47 * comments and preprocessor directives/ 48 */ 49 /* CSTYLED */ 50 #pragma alloca 51 # else 52 # ifndef alloca 53 #ifdef __cplusplus 54 extern "C" { 55 #endif 56 /* 57 * predefined by HP cc +Olibcalls 58 */ 59 # ifdef PROTOTYPES 60 extern void *alloca(); 61 # else 62 extern char *alloca(); 63 # endif 64 #ifdef __cplusplus 65 } 66 #endif 67 # endif 68 # endif 69 # endif 70 # endif 71 #endif 72 73 #endif /* _SCHILY_ALLOCA_H */ 74