• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

The MinGW.org Windows System Libraries


Commit MetaInfo

Revisão368f7458251031d44d4debe1cf4b0488d82b5ede (tree)
Hora2016-10-31 03:40:10
AutorKeith Marshall <keithmarshall@user...>
CommiterKeith Marshall

Mensagem de Log

Work around MSDN inconsistencies in _finddata_t naming.

Mudança Sumário

Diff

--- a/mingwrt/ChangeLog
+++ b/mingwrt/ChangeLog
@@ -1,5 +1,17 @@
11 2016-10-30 Keith Marshall <keithmarshall@users.sourceforge.net>
22
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+
315 Fix a potentially infinite printf() format conversion loop.
416
517 * mingwex/stdio/pformat.c (__pformat_emit_xfloat)
--- a/mingwrt/include/io.h
+++ b/mingwrt/include/io.h
@@ -221,6 +221,12 @@ int _findnexti64 (intptr_t, struct _finddatai64_t *);
221221 * to the original generic _findfirst()/_findnext() implementation).
222222 */
223223 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
224230
225231 _CRTIMP __cdecl __MINGW_NOTHROW
226232 intptr_t _findfirst64 (const char *, struct __finddata64_t *);
@@ -360,6 +366,13 @@ int _wfindnexti64 (intptr_t, struct _wfinddatai64_t *);
360366 * MSVCRT.DLL, after it originally appeared in MSVCR61.DLL.
361367 */
362368 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
363376
364377 _CRTIMP __cdecl __MINGW_NOTHROW
365378 intptr_t _wfindfirst64 (const wchar_t *, struct __wfinddata64_t *);
@@ -372,15 +385,26 @@ int _wfindnext64 (intptr_t, struct __wfinddata64_t *);
372385 * exclusive to it and its later derivatives; none of these are
373386 * available in any version of MSVCRT.DLL.
374387 */
375-struct __wfinddata32_t __struct_finddata_t (__time32_t, __int32);
388+struct _wfinddata32_t __struct_finddata_t (__time32_t, __int32);
376389 struct _wfinddata32i64_t __struct_finddata_t (__time32_t, __int64);
377390 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
378402
379403 _CRTIMP __cdecl __MINGW_NOTHROW
380-intptr_t _wfindfirst32 (const wchar_t *, struct __wfinddata32_t *);
404+intptr_t _wfindfirst32 (const wchar_t *, struct _wfinddata32_t *);
381405
382406 _CRTIMP __cdecl __MINGW_NOTHROW
383-int _wfindnext32 (intptr_t, struct __wfinddata32_t *);
407+int _wfindnext32 (intptr_t, struct _wfinddata32_t *);
384408
385409 _CRTIMP __cdecl __MINGW_NOTHROW
386410 intptr_t _wfindfirst32i64 (const wchar_t *, struct _wfinddata32i64_t *);
@@ -406,11 +430,11 @@ int _wfindnext64i32 (intptr_t, struct _wfinddata64i32_t *);
406430 */
407431 __CRT_ALIAS __cdecl __MINGW_NOTHROW
408432 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)); }
410434
411435 __CRT_ALIAS __cdecl __MINGW_NOTHROW
412436 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)); }
414438
415439 __CRT_ALIAS __cdecl __MINGW_NOTHROW
416440 intptr_t _wfindfirsti64 (const wchar_t *__filespec, struct _wfinddatai64_t *__search)
--- a/mingwrt/include/wchar.h
+++ b/mingwrt/include/wchar.h
@@ -268,8 +268,8 @@
268268 * ...and these, which are only available in the non-free run-times
269269 * from MSVCR80.DLL onwards:
270270 *
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 *);
273273 *
274274 * intptr_t _wfindfirst32i64 (wchar_t *, struct _wfinddata32i64_t *);
275275 * int _wfindnext32i64 (intptr_t, struct _wfinddata32i64_t *);