The MinGW.org Windows System Libraries
Revisão | 368f7458251031d44d4debe1cf4b0488d82b5ede (tree) |
---|---|
Hora | 2016-10-31 03:40:10 |
Autor | Keith Marshall <keithmarshall@user...> |
Commiter | Keith Marshall |
Work around MSDN inconsistencies in _finddata_t naming.
@@ -1,5 +1,17 @@ | ||
1 | 1 | 2016-10-30 Keith Marshall <keithmarshall@users.sourceforge.net> |
2 | 2 | |
3 | + Work around MSDN inconsistencies in _finddata_t naming. | |
4 | + | |
5 | + * include/io.h (_finddata64_t, _wfinddata64_): Define them | |
6 | + respectively as aberrant alternative data type names for each of... | |
7 | + (__finddata64_t, __wfinddata64_t): ...these original names. | |
8 | + (_wfinddata32_t): Similarly, define this with... | |
9 | + (__wfinddata32_t): ...this alternative name. | |
10 | + | |
11 | + * include/wchar.h (_wfinddata32_t): Correct references in comments. | |
12 | + | |
13 | +2016-10-30 Keith Marshall <keithmarshall@users.sourceforge.net> | |
14 | + | |
3 | 15 | Fix a potentially infinite printf() format conversion loop. |
4 | 16 | |
5 | 17 | * mingwex/stdio/pformat.c (__pformat_emit_xfloat) |
@@ -221,6 +221,12 @@ int _findnexti64 (intptr_t, struct _finddatai64_t *); | ||
221 | 221 | * to the original generic _findfirst()/_findnext() implementation). |
222 | 222 | */ |
223 | 223 | struct __finddata64_t __struct_finddata_t (__time64_t, __int64); |
224 | +/* | |
225 | + * Some MSDN documents, (particularly more recent documents), may | |
226 | + * inconsistently refer to this structural type by the anomalous | |
227 | + * name of _finddata64_t; support this anomaly. | |
228 | + */ | |
229 | +#define _finddata64_t __finddata64_t | |
224 | 230 | |
225 | 231 | _CRTIMP __cdecl __MINGW_NOTHROW |
226 | 232 | intptr_t _findfirst64 (const char *, struct __finddata64_t *); |
@@ -360,6 +366,13 @@ int _wfindnexti64 (intptr_t, struct _wfinddatai64_t *); | ||
360 | 366 | * MSVCRT.DLL, after it originally appeared in MSVCR61.DLL. |
361 | 367 | */ |
362 | 368 | struct __wfinddata64_t __struct_finddata_t (__time64_t, __int64); |
369 | +/* | |
370 | + * As in the case of the __finddata64_t structure, some MSDN | |
371 | + * documents, (particularly more recent documents), may refer | |
372 | + * to __wfinddata64_t by the inconsistently anomalous name of | |
373 | + * _wfinddata64_t; also support this anomaly. | |
374 | + */ | |
375 | +#define _wfinddata64_t __wfinddata64_t | |
363 | 376 | |
364 | 377 | _CRTIMP __cdecl __MINGW_NOTHROW |
365 | 378 | intptr_t _wfindfirst64 (const wchar_t *, struct __wfinddata64_t *); |
@@ -372,15 +385,26 @@ int _wfindnext64 (intptr_t, struct __wfinddata64_t *); | ||
372 | 385 | * exclusive to it and its later derivatives; none of these are |
373 | 386 | * available in any version of MSVCRT.DLL. |
374 | 387 | */ |
375 | -struct __wfinddata32_t __struct_finddata_t (__time32_t, __int32); | |
388 | +struct _wfinddata32_t __struct_finddata_t (__time32_t, __int32); | |
376 | 389 | struct _wfinddata32i64_t __struct_finddata_t (__time32_t, __int64); |
377 | 390 | struct _wfinddata64i32_t __struct_finddata_t (__time64_t, __int32); |
391 | +/* | |
392 | + * As in the __finddata64_t vs. _finddata64_t, and __wfinddata64_t | |
393 | + * vs. _wfinddata64_t anomalous cases, there is at least one historic | |
394 | + * MSDN reference to a __wfinddata32_t structural type, in a context | |
395 | + * where _wfinddata32_t may be expected. In this case, it appears | |
396 | + * that __wfinddata32_t is the anomaly, and that it may be peculiar | |
397 | + * to the VS-2005 documentation; nevertheless, the corresponding | |
398 | + * definition is provided here, for the possible convenience of | |
399 | + * any user who may depend on it, (but please avoid it). | |
400 | + */ | |
401 | +#define __wfinddata32_t _wfinddata32_t | |
378 | 402 | |
379 | 403 | _CRTIMP __cdecl __MINGW_NOTHROW |
380 | -intptr_t _wfindfirst32 (const wchar_t *, struct __wfinddata32_t *); | |
404 | +intptr_t _wfindfirst32 (const wchar_t *, struct _wfinddata32_t *); | |
381 | 405 | |
382 | 406 | _CRTIMP __cdecl __MINGW_NOTHROW |
383 | -int _wfindnext32 (intptr_t, struct __wfinddata32_t *); | |
407 | +int _wfindnext32 (intptr_t, struct _wfinddata32_t *); | |
384 | 408 | |
385 | 409 | _CRTIMP __cdecl __MINGW_NOTHROW |
386 | 410 | intptr_t _wfindfirst32i64 (const wchar_t *, struct _wfinddata32i64_t *); |
@@ -406,11 +430,11 @@ int _wfindnext64i32 (intptr_t, struct _wfinddata64i32_t *); | ||
406 | 430 | */ |
407 | 431 | __CRT_ALIAS __cdecl __MINGW_NOTHROW |
408 | 432 | intptr_t _wfindfirst (const wchar_t *__filespec, struct _wfinddata_t *__search) |
409 | -{ return _wfindfirst32 (__filespec, (struct __wfinddata32_t *)(__search)); } | |
433 | +{ return _wfindfirst32 (__filespec, (struct _wfinddata32_t *)(__search)); } | |
410 | 434 | |
411 | 435 | __CRT_ALIAS __cdecl __MINGW_NOTHROW |
412 | 436 | int _wfindnext (intptr_t __handle, struct _wfinddata_t *__search) |
413 | -{ return _wfindnext32 (__handle, (struct __wfinddata32_t *)(__search)); } | |
437 | +{ return _wfindnext32 (__handle, (struct _wfinddata32_t *)(__search)); } | |
414 | 438 | |
415 | 439 | __CRT_ALIAS __cdecl __MINGW_NOTHROW |
416 | 440 | intptr_t _wfindfirsti64 (const wchar_t *__filespec, struct _wfinddatai64_t *__search) |
@@ -268,8 +268,8 @@ | ||
268 | 268 | * ...and these, which are only available in the non-free run-times |
269 | 269 | * from MSVCR80.DLL onwards: |
270 | 270 | * |
271 | - * intptr_t _wfindfirst32 (wchar_t *, struct __wfinddata32_t *); | |
272 | - * int _wfindnext32 (intptr_t, struct __wfinddata32_t *); | |
271 | + * intptr_t _wfindfirst32 (wchar_t *, struct _wfinddata32_t *); | |
272 | + * int _wfindnext32 (intptr_t, struct _wfinddata32_t *); | |
273 | 273 | * |
274 | 274 | * intptr_t _wfindfirst32i64 (wchar_t *, struct _wfinddata32i64_t *); |
275 | 275 | * int _wfindnext32i64 (intptr_t, struct _wfinddata32i64_t *); |