The MinGW.org Windows System Libraries
リビジョン | c2adf77b9eb6e9fee48068f282aaf0c0f0be8dea (tree) |
---|---|
日時 | 2014-01-30 18:58:09 |
作者 | Keith Marshall <keithmarshall@user...> |
コミッター | Keith Marshall |
Correct _wfinddata64_t vs. wfinddata64_t typo.
@@ -1,3 +1,18 @@ | ||
1 | +2014-01-30 Keith Marshall <keithmarshall@users.sourceforge.net> | |
2 | + | |
3 | + Correct _wfinddata64_t vs. __wfinddata64_t typo. | |
4 | + | |
5 | + * include/io.h include/wchar.h (_wfinddata64_t): All MSDN data type | |
6 | + documentation denies the existence of this structure type, yet their | |
7 | + prototypes for the _wfindfirst64() and _wfindnext64() functions refer | |
8 | + to in in their argument lists; redefine it as an alias for... | |
9 | + (__wfinddata64_t): ...this formally documented structure type; update | |
10 | + all former references to use it. | |
11 | + | |
12 | + * include/tchar.h (_tfinddata64_t): Map it to... | |
13 | + (__wfinddata64_t): ...this, in place of former mapping to... | |
14 | + (_wfinddata64_t): ...this. | |
15 | + | |
1 | 16 | 2014-01-27 Thorsten Otto <thotto@users.sourceforge.net> |
2 | 17 | |
3 | 18 | Remove superfluous objects from libmingwex.a; (cf. issue #2177) |
@@ -1,6 +1,6 @@ | ||
1 | 1 | /** |
2 | 2 | * @file io.h |
3 | - * Copyright 2012, 2013 MinGW.org project | |
3 | + * Copyright 2012-2014 MinGW.org Project | |
4 | 4 | * |
5 | 5 | * Permission is hereby granted, free of charge, to any person obtaining a |
6 | 6 | * copy of this software and associated documentation files (the "Software"), |
@@ -123,7 +123,16 @@ struct _wfinddata32_t { | ||
123 | 123 | wchar_t name[FILENAME_MAX]; |
124 | 124 | }; |
125 | 125 | |
126 | -struct _wfinddata64_t { | |
126 | +/* MSDN data type documentation refers to the 64-bit variant of the | |
127 | + * preceding structure as "__wfinddata64_t", but _wfindfirst64() and | |
128 | + * _wfindnext64() function prototypes then use "_wfinddata64_t" when | |
129 | + * declaring their arguments; assume that the former is correct for | |
130 | + * the structure declaration, but preserve an alias for the less | |
131 | + * trusted MSDN function prototype usage. | |
132 | + */ | |
133 | +#define _wfinddata64_t __wfinddata64_t | |
134 | + | |
135 | +struct __wfinddata64_t { | |
127 | 136 | unsigned attrib; |
128 | 137 | __time64_t time_create; |
129 | 138 | __time64_t time_access; |
@@ -173,7 +182,7 @@ intptr_t _findfirst64i32 (const char *filespec,struct _finddata64i32_t *fileinfo | ||
173 | 182 | |
174 | 183 | intptr_t _wfindfirst (const wchar_t *filespec,struct _wfinddata_t *fileinfo); |
175 | 184 | intptr_t _wfindfirst32 (const wchar_t *filespec,struct _wfinddata32_t *fileinfo); |
176 | -intptr_t _wfindfirst64 (const wchar_t *filespec, struct _wfinddata64_t *fileinfo); | |
185 | +intptr_t _wfindfirst64 (const wchar_t *filespec, struct __wfinddata64_t *fileinfo); | |
177 | 186 | intptr_t _wfindfirsti64 (const wchar_t *filespec, struct _wfinddatai64_t *fileinfo); |
178 | 187 | intptr_t _wfindfirst32i64(const wchar_t *filespec, struct _wfinddata32i64_t *fileinfo); |
179 | 188 | intptr_t _wfindfirst64i32(const wchar_t *filespec, struct _wfinddata64i32_t *fileinfo); |
@@ -414,19 +423,19 @@ _CRTIMP int __cdecl __MINGW_NOTHROW _wunlink(const wchar_t*); | ||
414 | 423 | _CRTIMP int __cdecl __MINGW_NOTHROW _wopen(const wchar_t*, int, ...); |
415 | 424 | _CRTIMP int __cdecl __MINGW_NOTHROW _wsopen(const wchar_t*, int, int, ...); |
416 | 425 | _CRTIMP wchar_t * __cdecl __MINGW_NOTHROW _wmktemp(wchar_t*); |
417 | -_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst64(const wchar_t*, struct _wfinddata64_t*); | |
426 | +_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst64(const wchar_t*, struct __wfinddata64_t*); | |
418 | 427 | intptr_t __cdecl __MINGW_NOTHROW _wfindfirst32i64 (const wchar_t*, struct _wfinddata32i64_t*); |
419 | 428 | intptr_t __cdecl __MINGW_NOTHROW _wfindfirst64i32 (const wchar_t*, struct _wfinddata64i32_t*); |
420 | -_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnext64(intptr_t, struct _wfinddata64_t*); | |
429 | +_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnext64(intptr_t, struct __wfinddata64_t*); | |
421 | 430 | int __cdecl __MINGW_NOTHROW _wfindnext32i64 (intptr_t, struct _wfinddata32i64_t*); |
422 | 431 | int __cdecl __MINGW_NOTHROW _wfindnext64i32 (intptr_t, struct _wfinddata64i32_t*); |
423 | 432 | |
424 | 433 | #include <string.h> |
425 | 434 | __CRT_MAYBE_INLINE __cdecl __MINGW_NOTHROW intptr_t _wfindfirst32i64(const wchar_t* _filename, struct _wfinddata32i64_t* _fdata) { |
426 | - struct _wfinddata64_t fd; | |
435 | + struct __wfinddata64_t fd; | |
427 | 436 | intptr_t ret = _wfindfirst64(_filename, &fd); |
428 | 437 | if (ret == -1) { |
429 | - memset(_fdata, 0, sizeof(struct _wfinddata64_t)); | |
438 | + memset(_fdata, 0, sizeof(struct __wfinddata64_t)); | |
430 | 439 | return ret; |
431 | 440 | } |
432 | 441 | _fdata->attrib = fd.attrib; |
@@ -455,7 +464,7 @@ __CRT_MAYBE_INLINE __cdecl __MINGW_NOTHROW intptr_t _wfindfirst64i32(const wchar | ||
455 | 464 | } |
456 | 465 | |
457 | 466 | __CRT_MAYBE_INLINE __cdecl __MINGW_NOTHROW intptr_t _wfindnext32i64(intptr_t _fp, struct _wfinddata32i64_t* _fdata) { |
458 | - struct _wfinddata64_t fd; | |
467 | + struct __wfinddata64_t fd; | |
459 | 468 | int ret = _wfindnext64(_fp,&fd); |
460 | 469 | if (ret == -1) { |
461 | 470 | memset(_fdata, 0, sizeof(struct _wfinddata32i64_t)); |
@@ -565,7 +574,7 @@ wchar_t * wmktemp(wchar_t *); | ||
565 | 574 | #define _findfirsti64 _findfirst64 |
566 | 575 | #define _findnexti64 _findnext64 |
567 | 576 | #define _wfinddata_t _wfinddata64i32_t |
568 | -#define _wfinddatai64_t _wfinddata64_t | |
577 | +#define _wfinddatai64_t __wfinddata64_t | |
569 | 578 | #define _wfindfirst _wfindfirst64i32 |
570 | 579 | #define _wfindnext _wfindnext64i32 |
571 | 580 | #define _wfindfirsti64 _wfindfirst64 |
@@ -228,7 +228,7 @@ typedef wchar_t _TCHAR; | ||
228 | 228 | #define _tfindfirsti64 _wfindfirsti64 |
229 | 229 | #define _tfindnexti64 _wfindnexti64 |
230 | 230 | #define _tfinddatai64_t _wfinddatai64_t |
231 | -#define _tfinddata64_t _wfinddata64_t | |
231 | +#define _tfinddata64_t __wfinddata64_t | |
232 | 232 | #define _tfinddata32_t _wfinddata32_t |
233 | 233 | #define _tfinddata32i64_t _wfinddata32i64_t |
234 | 234 | #define _tfinddata64i32_t _wfinddata64i32_t |
@@ -1,6 +1,6 @@ | ||
1 | 1 | /** |
2 | 2 | * @file wchar.h |
3 | - * Copyright 2012, 2013 MinGW.org project | |
3 | + * Copyright 2012-2014 MinGW.org Project | |
4 | 4 | * |
5 | 5 | * Permission is hereby granted, free of charge, to any person obtaining a |
6 | 6 | * copy of this software and associated documentation files (the "Software"), |
@@ -435,7 +435,15 @@ struct _wfinddatai64_t { | ||
435 | 435 | __int64 size; |
436 | 436 | wchar_t name[FILENAME_MAX]; |
437 | 437 | }; |
438 | -struct _wfinddata64_t { | |
438 | +/* MSDN data type documentation refers to the 64-bit variant of the | |
439 | + * following structure as "__wfinddata64_t", but _wfindfirst64() and | |
440 | + * _wfindnext64() function prototypes then use "_wfinddata64_t" when | |
441 | + * declaring their arguments; assume that the former is correct for | |
442 | + * the structure declaration, but preserve an alias for the less | |
443 | + * trusted MSDN function prototype usage. | |
444 | + */ | |
445 | +#define _wfinddata64_t __wfinddata64_t | |
446 | +struct __wfinddata64_t { | |
439 | 447 | unsigned attrib; |
440 | 448 | __time64_t time_create; |
441 | 449 | __time64_t time_access; |
@@ -492,8 +500,8 @@ intptr_t __cdecl __MINGW_NOTHROW _wfindfirst64i32 (const wchar_t*, struct _wfind | ||
492 | 500 | _CRTIMP int __cdecl __MINGW_NOTHROW _wfindnext (intptr_t, struct _wfinddata32_t*); |
493 | 501 | int __cdecl __MINGW_NOTHROW _wfindnext32i64 (intptr_t, struct _wfinddata32i64_t*); |
494 | 502 | int __cdecl __MINGW_NOTHROW _wfindnext64i32 (intptr_t, struct _wfinddata64i32_t*); |
495 | -_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst64(const wchar_t*, struct _wfinddata64_t*); | |
496 | -_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindnext64(intptr_t, struct _wfinddata64_t*); | |
503 | +_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst64(const wchar_t*, struct __wfinddata64_t*); | |
504 | +_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindnext64(intptr_t, struct __wfinddata64_t*); | |
497 | 505 | |
498 | 506 | /* _wfindfirst32 and _wfindnext32 do not exist in MSVCRT.DLL */ |
499 | 507 | _CRTALIAS intptr_t __cdecl __MINGW_NOTHROW _wfindfirst32 (const wchar_t* _v1, struct _wfinddata32_t* _v2) { |
@@ -505,10 +513,10 @@ _CRTALIAS int __cdecl __MINGW_NOTHROW _wfindnext32 (intptr_t _v1, struct _wfind | ||
505 | 513 | |
506 | 514 | #include <string.h> |
507 | 515 | __CRT_MAYBE_INLINE __cdecl __MINGW_NOTHROW intptr_t _wfindfirst32i64(const wchar_t* _filename, struct _wfinddata32i64_t* _fdata) { |
508 | - struct _wfinddata64_t fd; | |
516 | + struct __wfinddata64_t fd; | |
509 | 517 | intptr_t ret = _wfindfirst64(_filename, &fd); |
510 | 518 | if (ret == -1) { |
511 | - memset(_fdata, 0, sizeof(struct _wfinddata64_t)); | |
519 | + memset(_fdata, 0, sizeof(struct __wfinddata64_t)); | |
512 | 520 | return ret; |
513 | 521 | } |
514 | 522 | _fdata->attrib = fd.attrib; |
@@ -537,7 +545,7 @@ __CRT_MAYBE_INLINE __cdecl __MINGW_NOTHROW intptr_t _wfindfirst64i32(const wchar | ||
537 | 545 | } |
538 | 546 | |
539 | 547 | __CRT_MAYBE_INLINE __cdecl __MINGW_NOTHROW intptr_t _wfindnext32i64(intptr_t _fp, struct _wfinddata32i64_t* _fdata) { |
540 | - struct _wfinddata64_t fd; | |
548 | + struct __wfinddata64_t fd; | |
541 | 549 | int ret = _wfindnext64(_fp,&fd); |
542 | 550 | if (ret == -1) { |
543 | 551 | memset(_fdata, 0, sizeof(struct _wfinddata32i64_t)); |
@@ -578,7 +586,7 @@ __CRT_MAYBE_INLINE __cdecl __MINGW_NOTHROW intptr_t _wfindnext64i32(intptr_t _fp | ||
578 | 586 | |
579 | 587 | #else /* !defined(_USE_32BIT_TIME_T) */ |
580 | 588 | #define _wfinddata_t _wfinddata64i32_t |
581 | -#define _wfinddatai64_t _wfinddata64_t | |
589 | +#define _wfinddatai64_t __wfinddata64_t | |
582 | 590 | #define _wfindfirst _wfindfirst64i32 |
583 | 591 | #define _wfindnext _wfindnext64i32 |
584 | 592 | #define _wfindfirsti64 _wfindfirst64 |