lift single lib statement restriction
[m6w6/ext-psi] / php_psi_posix.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 #include "php_psi_stdinc.h"
29
30 #ifdef PSI_STD_TYPES
31 static struct psi_std_type {
32 token_t type_tag;
33 const char *type_name;
34 const char *alias;
35 } psi_std_types[] = {
36 @PSI_STDTYPES@
37 {0}
38 };
39 #endif
40
41 #ifdef PSI_PREDEF_TYPES
42 static struct psi_predef_type {
43 token_t type_tag;
44 const char *type_name;
45 const char *alias;
46 } psi_predef_types[] = {
47 @PSI_TYPES@
48 {0}
49 };
50 #endif
51
52 #ifdef PSI_PREDEF_COMPOSITES
53 static struct psi_predef_composite {
54 token_t type_tag;
55 const char *type_name;
56 const char *var_name;
57 size_t offset;
58 size_t size;
59 size_t pointer_level;
60 size_t array_size;
61 } psi_predef_composites[] = {
62 @PSI_COMPOSITES@
63 {0}
64 };
65 #endif
66
67 #ifdef PSI_PREDEF_CONSTS
68 static struct psi_predef_const {
69 token_t type_tag;
70 const char *type_name;
71 const char *var_name;
72 impl_val value;
73 } psi_predef_consts[] = {
74 @PSI_CONSTS@
75 {0}
76 };
77 #endif
78
79 #ifdef PSI_PREDEF_DECLS
80 static struct psi_predef_decl {
81 enum {
82 DECL_KIND_STD,
83 DECL_KIND_VARARG,
84 DECL_KIND_FUNCTOR
85 } kind;
86 token_t type_tag;
87 const char *type_name;
88 const char *var_name;
89 size_t pointer_level;
90 size_t array_size;
91 } psi_predef_decls[] = {
92 @PSI_DECLS@
93 {0}
94 };
95 #endif
96
97 #ifdef PSI_FUNC_REDIRS
98 @PSI_MACROS@
99
100 typedef void (*psi_func_ptr)();
101 static struct psi_func_redir {
102 const char *name;
103 psi_func_ptr func;
104 } psi_func_redirs[] = {
105 /* needed from libc_nonshared.a */
106 {"fstat", (psi_func_ptr) fstat},
107 {"fstatat", (psi_func_ptr) fstatat},
108 {"lstat", (psi_func_ptr) lstat},
109 {"mknod", (psi_func_ptr) mknod},
110 {"mknodat", (psi_func_ptr) mknodat},
111 {"stat", (psi_func_ptr) stat},
112 @PSI_REDIRS@
113 {0}
114 };
115 #endif
116