xref: /trunk/main/sal/inc/sal/alloca.h (revision 9eab2a37)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef INCLUDED_SAL_ALLOCA_H
25 #define INCLUDED_SAL_ALLOCA_H
26 
27 #if defined (SOLARIS) || defined (LINUX) || defined(__EMX__)
28 
29 #ifndef INCLUDED_ALLOCA_H
30 #include <alloca.h>
31 #define INCLUDED_ALLOCA_H
32 #endif
33 
34 #elif defined (FREEBSD) || defined(NETBSD)
35 
36 #ifndef INCLUDED_STDLIB_H
37 #include <stdlib.h>
38 #define INCLUDED_STDLIB_H
39 #endif
40 
41 #elif defined (MACOSX)
42 
43 #ifndef INCLUDED_SYS_TYPES_H
44 #include <sys/types.h>
45 #define INCLUDED_SYS_TYPES_H
46 #endif
47 
48 #elif defined (WNT)
49 
50 #ifndef INCLUDED_MALLOC_H
51 #include <malloc.h>
52 #define INCLUDED_MALLOC_H
53 #endif
54 
55 #else
56 
57 #error "unknown platform: please check for alloca"
58 
59 #endif
60 
61 #endif  /* INCLUDED_SAL_ALLOCA_H */
62 
63