forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite1d19c9
committed
Require a C99-compliant snprintf(), and remove related workarounds.
Since our substitute snprintf now returns a C99-compliant result,there's no need anymore to have complicated code to cope with pre-C99behavior. We can just make configure substitute snprintf.c if it findsthat the system snprintf() is pre-C99. (Note: I do not believe thatthere are any platforms where this test will trigger that weren'talready being rejected due to our other C99-ish feature requirements forsnprintf. But let's add the check for paranoia's sake.) Then, simplifythe call sites that had logic to cope with the pre-C99 definition.I also dropped some stuff that was being paranoid about the possibilityof snprintf overrunning the given buffer. The only reports we've everheard of that being a problem were for Solaris 7, which is long dead,and we've sure not heard any reports of these assertions triggering ina long time. So let's drop that complexity too.Likewise, drop some code that wasn't trusting snprintf to set errnowhen it returns -1. That would be not-per-spec, and again there'sno real reason to believe it is a live issue, especially not forsnprintfs that pass all of configure's feature checks.Discussion:https://postgr.es/m/17245.1534289329@sss.pgh.pa.us1 parent1eb9221 commite1d19c9
File tree
6 files changed
+125
-123
lines changed- config
- src
- backend/utils/misc
- common
- interfaces/libpq
6 files changed
+125
-123
lines changedLines changed: 27 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
238 | 238 |
| |
239 | 239 |
| |
240 | 240 |
| |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
241 | 268 |
| |
242 | 269 |
| |
243 | 270 |
| |
|
Lines changed: 45 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16142 | 16142 |
| |
16143 | 16143 |
| |
16144 | 16144 |
| |
16145 |
| - | |
| 16145 | + | |
16146 | 16146 |
| |
16147 | 16147 |
| |
16148 | 16148 |
| |
| |||
16436 | 16436 |
| |
16437 | 16437 |
| |
16438 | 16438 |
| |
| 16439 | + | |
| 16440 | + | |
| 16441 | + | |
| 16442 | + | |
| 16443 | + | |
| 16444 | + | |
| 16445 | + | |
| 16446 | + | |
| 16447 | + | |
| 16448 | + | |
| 16449 | + | |
| 16450 | + | |
| 16451 | + | |
| 16452 | + | |
| 16453 | + | |
| 16454 | + | |
| 16455 | + | |
| 16456 | + | |
| 16457 | + | |
| 16458 | + | |
| 16459 | + | |
| 16460 | + | |
| 16461 | + | |
| 16462 | + | |
| 16463 | + | |
| 16464 | + | |
| 16465 | + | |
| 16466 | + | |
| 16467 | + | |
| 16468 | + | |
| 16469 | + | |
| 16470 | + | |
| 16471 | + | |
| 16472 | + | |
| 16473 | + | |
| 16474 | + | |
| 16475 | + | |
| 16476 | + | |
| 16477 | + | |
| 16478 | + | |
| 16479 | + | |
| 16480 | + | |
| 16481 | + | |
| 16482 | + | |
16439 | 16483 |
| |
16440 | 16484 |
| |
16441 | 16485 |
| |
|
Lines changed: 10 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1806 | 1806 |
| |
1807 | 1807 |
| |
1808 | 1808 |
| |
1809 |
| - | |
| 1809 | + | |
1810 | 1810 |
| |
1811 | 1811 |
| |
1812 | 1812 |
| |
| |||
1858 | 1858 |
| |
1859 | 1859 |
| |
1860 | 1860 |
| |
| 1861 | + | |
| 1862 | + | |
| 1863 | + | |
| 1864 | + | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
1861 | 1870 |
| |
1862 | 1871 |
| |
1863 | 1872 |
| |
|
Lines changed: 8 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9441 | 9441 |
| |
9442 | 9442 |
| |
9443 | 9443 |
| |
9444 |
| - | |
9445 |
| - | |
9446 | 9444 |
| |
9447 | 9445 |
| |
9448 | 9446 |
| |
9449 | 9447 |
| |
9450 |
| - | |
9451 |
| - | |
9452 |
| - | |
9453 |
| - | |
9454 |
| - | |
9455 |
| - | |
9456 |
| - | |
9457 |
| - | |
| 9448 | + | |
9458 | 9449 |
| |
9459 |
| - | |
9460 |
| - | |
9461 |
| - | |
9462 |
| - | |
9463 |
| - | |
| 9450 | + | |
| 9451 | + | |
| 9452 | + | |
| 9453 | + | |
| 9454 | + | |
| 9455 | + | |
| 9456 | + | |
9464 | 9457 |
| |
9465 | 9458 |
| |
9466 | 9459 |
| |
|
Lines changed: 14 additions & 59 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
77 | 77 |
| |
78 | 78 |
| |
79 | 79 |
| |
80 |
| - | |
| 80 | + | |
81 | 81 |
| |
82 | 82 |
| |
83 | 83 |
| |
| |||
89 | 89 |
| |
90 | 90 |
| |
91 | 91 |
| |
92 |
| - | |
93 |
| - | |
94 |
| - | |
95 |
| - | |
96 |
| - | |
97 | 92 |
| |
98 | 93 |
| |
99 | 94 |
| |
| 95 | + | |
| 96 | + | |
100 | 97 |
| |
101 | 98 |
| |
102 | 99 |
| |
| |||
105 | 102 |
| |
106 | 103 |
| |
107 | 104 |
| |
108 |
| - | |
109 |
| - | |
110 |
| - | |
111 |
| - | |
112 |
| - | |
113 |
| - | |
114 |
| - | |
115 |
| - | |
116 |
| - | |
117 |
| - | |
118 |
| - | |
119 |
| - | |
120 |
| - | |
121 | 105 |
| |
122 | 106 |
| |
123 |
| - | |
124 |
| - | |
125 |
| - | |
126 |
| - | |
127 |
| - | |
128 |
| - | |
129 |
| - | |
| 107 | + | |
| 108 | + | |
130 | 109 |
| |
131 | 110 |
| |
132 | 111 |
| |
| |||
136 | 115 |
| |
137 | 116 |
| |
138 | 117 |
| |
139 |
| - | |
140 |
| - | |
141 |
| - | |
142 |
| - | |
143 |
| - | |
144 |
| - | |
145 |
| - | |
| 118 | + | |
146 | 119 |
| |
147 | 120 |
| |
148 | 121 |
| |
149 | 122 |
| |
150 | 123 |
| |
151 |
| - | |
152 |
| - | |
153 |
| - | |
154 |
| - | |
155 |
| - | |
156 |
| - | |
157 |
| - | |
158 |
| - | |
159 |
| - | |
160 |
| - | |
161 |
| - | |
162 |
| - | |
163 |
| - | |
164 |
| - | |
165 |
| - | |
166 |
| - | |
167 |
| - | |
168 | 124 |
| |
169 |
| - | |
170 |
| - | |
171 |
| - | |
172 |
| - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
173 | 131 |
| |
174 |
| - | |
| 132 | + | |
175 | 133 |
| |
176 | 134 |
| |
177 | 135 |
| |
| |||
183 | 141 |
| |
184 | 142 |
| |
185 | 143 |
| |
186 |
| - | |
187 |
| - | |
188 |
| - | |
189 |
| - | |
| 144 | + | |
190 | 145 |
|
Lines changed: 21 additions & 47 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
295 | 295 |
| |
296 | 296 |
| |
297 | 297 |
| |
298 |
| - | |
299 |
| - | |
300 |
| - | |
301 |
| - | |
302 |
| - | |
303 |
| - | |
304 |
| - | |
| 298 | + | |
305 | 299 |
| |
306 | 300 |
| |
307 | 301 |
| |
308 | 302 |
| |
309 |
| - | |
| 303 | + | |
| 304 | + | |
310 | 305 |
| |
311 |
| - | |
| 306 | + | |
312 | 307 |
| |
313 | 308 |
| |
314 | 309 |
| |
315 | 310 |
| |
316 | 311 |
| |
317 |
| - | |
318 |
| - | |
319 |
| - | |
320 |
| - | |
321 |
| - | |
322 |
| - | |
323 |
| - | |
| 312 | + | |
324 | 313 |
| |
325 | 314 |
| |
326 | 315 |
| |
327 | 316 |
| |
328 | 317 |
| |
329 | 318 |
| |
330 |
| - | |
331 |
| - | |
332 |
| - | |
333 |
| - | |
334 |
| - | |
335 |
| - | |
336 |
| - | |
337 |
| - | |
338 |
| - | |
339 |
| - | |
340 |
| - | |
341 |
| - | |
342 |
| - | |
343 |
| - | |
344 |
| - | |
345 |
| - | |
346 |
| - | |
347 |
| - | |
348 |
| - | |
349 |
| - | |
350 |
| - | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
351 | 328 |
| |
352 |
| - | |
353 |
| - | |
354 |
| - | |
355 |
| - | |
356 |
| - | |
357 |
| - | |
358 |
| - | |
359 |
| - | |
360 |
| - | |
| 329 | + | |
| 330 | + | |
361 | 331 |
| |
| 332 | + | |
362 | 333 |
| |
363 | 334 |
| |
364 | 335 |
| |
365 | 336 |
| |
366 | 337 |
| |
367 |
| - | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
368 | 342 |
| |
369 | 343 |
| |
370 | 344 |
| |
|
0 commit comments
Comments
(0)