forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf62975b
committed
Tighten header pre-inclusions in headerscheck and cpluspluscheck.
We allow our header files to depend on the appropriate one ofpostgres.h, postgres_fe.h, or c.h having already been included.However, there are a few headers such as libpq-fe.h that aremeant to be used by client applications and therefore mustcompile without any assumptions about previous inclusions.These test scripts failed to consider that, which seems quitehazardous since we might not immediately notice such a problemotherwise. Hence, adjust these scripts to test relevant libpqand ecpg headers with no prior inclusion.While at it, we can also make an effort to actually use therelevant one of postgres.h, postgres_fe.h, or c.h. I addedsome rules that guess which one to use based on the first-levelsrc subdirectory, e.g. use postgres_fe.h under src/bin/.These rules are hardly water-tight but they seem to work today,and we can always refine them in the future.These changes don't reveal any live problems today, which is good,but they should make these scripts more able to catch future bugs.Discussion:https://postgr.es/m/2488193.1677863247@sss.pgh.pa.us1 parentebd551f commitf62975b
2 files changed
+56
-4
lines changedLines changed: 29 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
161 | 161 |
| |
162 | 162 |
| |
163 | 163 |
| |
164 |
| - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
165 | 191 |
| |
166 | 192 |
| |
167 | 193 |
| |
| |||
174 | 200 |
| |
175 | 201 |
| |
176 | 202 |
| |
177 |
| - | |
| 203 | + | |
178 | 204 |
| |
179 |
| - | |
| 205 | + | |
180 | 206 |
| |
181 | 207 |
| |
182 | 208 |
| |
|
Lines changed: 27 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
142 | 142 |
| |
143 | 143 |
| |
144 | 144 |
| |
145 |
| - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
146 | 172 |
| |
147 | 173 |
| |
148 | 174 |
| |
|
0 commit comments
Comments
(0)