fix invalid free on syntax error
[m6w6/ext-psi] / php_psi_predef.h.in
1 /*******************************************************************************
2 Copyright (c) 2016, Michael Wallner <mike@php.net>.
3 All rights reserved.
4
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7
8 * Redistributions of source code must retain the above copyright notice,
9 this list of conditions and the following disclaimer.
10 * Redistributions in binary form must reproduce the above copyright
11 notice, this list of conditions and the following disclaimer in the
12 documentation and/or other materials provided with the distribution.
13
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
18 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
20 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
21 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
22 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 *******************************************************************************/
25
26 /* generated by configure */
27
28 #ifdef PSI_STD_TYPES
29 static struct psi_std_type {
30 token_t type_tag;
31 const char *type_name;
32 const char *alias;
33 } psi_std_types[] = {
34 @PSI_STDTYPES@
35 {0}
36 };
37 #endif
38
39 #ifdef PSI_FUNC_REDIRS
40 typedef void (*psi_func_ptr)(void);
41 static struct psi_func_redir {
42 const char *name;
43 psi_func_ptr func;
44 } psi_func_redirs[] = {
45 /* inline byte swapping */
46 #ifdef __APPLE__
47 {"_OSSwapInt16", (psi_func_ptr) psi_swap16},
48 {"_OSSwapInt32", (psi_func_ptr) psi_swap32},
49 {"_OSSwapInt64", (psi_func_ptr) psi_swap64},
50 #elif defined(__FreeBSD__)
51 {"bswap16", (psi_func_ptr) psi_swap16},
52 {"bswap32", (psi_func_ptr) psi_swap32},
53 {"bswap64", (psi_func_ptr) psi_swap64},
54 #elif defined(__OpenBSD__)
55 {"swap16", (psi_func_ptr) psi_swap16},
56 {"swap32", (psi_func_ptr) psi_swap32},
57 {"swap64", psi_swap64},
58 #elif defined(__NetBSD__)
59 {"bswap16", (psi_func_ptr) psi_swap16},
60 {"bswap32", (psi_func_ptr) psi_swap32},
61 {"bswap64", (psi_func_ptr) psi_swap64},
62 #else
63 {"bswap_16", (psi_func_ptr) psi_swap16},
64 {"bswap_32", (psi_func_ptr) psi_swap32},
65 {"bswap_64", (psi_func_ptr) psi_swap64},
66 #endif
67 /* needed from libc_nonshared.a */
68 {"fstat", (psi_func_ptr) fstat},
69 {"fstatat", (psi_func_ptr) fstatat},
70 {"lstat", (psi_func_ptr) lstat},
71 {"mknod", (psi_func_ptr) mknod},
72 #ifdef HAVE_MKNODAT
73 {"mknodat", (psi_func_ptr) mknodat},
74 #endif
75 {"stat", (psi_func_ptr) stat},
76 {0}
77 };
78 #endif
79
80 #ifdef PSI_CPP_SEARCH
81 static const char psi_cpp_search[] = ""
82 @PSI_CPP_SEARCH@
83 ;
84 #endif
85
86 #ifdef PSI_CPP_PREDEF
87 static const char psi_cpp_predef[] = ""
88 @PSI_CPP_PREDEF@
89 ;
90 #endif
91