• 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ão8f3e997526003e41ff5e38447785c4d4ebd66664 (tree)
Hora2016-10-14 05:03:56
AutorKeith Marshall <keithmarshall@user...>
CommiterKeith Marshall

Mensagem de Log

Resolve some non-ANSI typedef omissions.

Mudança Sumário

Diff

--- a/mingwrt/ChangeLog
+++ b/mingwrt/ChangeLog
@@ -1,3 +1,14 @@
1+2016-10-13 Keith Marshall <keithmarshall@users.sourceforge.net>
2+
3+ Resolve some non-ANSI typedef omissions.
4+
5+ * include/sys/types.h (off_t, ssize_t): Always typedef them when...
6+ [_POSIX_C_SOURCE || !_NO_OLDNAMES]: ...either of these prevails.
7+
8+ * include/io.h (_fsize_t): Do not suppress its typedef when...
9+ [__STRICT_ANSI__]: ...this compiler option applies, irrespective of...
10+ [!(_IO_H && _WCHAR_H)]: ...this, which otherwise causes supression.
11+
112 2016-09-20 Keith Marshall <keithmarshall@users.sourceforge.net>
213
314 Prepare and tag mingwrt-3.22.2 patch release.
--- a/mingwrt/include/io.h
+++ b/mingwrt/include/io.h
@@ -96,10 +96,10 @@
9696 /* We must define _fsize_t, but some compilers (including GCC prior to
9797 * version 4.0), may choke if we try to do so more than once...
9898 */
99-#if ! (defined _IO_H && defined _WCHAR_H)
99+#if ! (defined _IO_H && defined _WCHAR_H) || defined __STRICT_ANSI__
100100 /* ...so DO NOT define it during direct <io.h> inclusion, (i.e. _IO_H
101101 * is defined), if <wchar.h> has already caused it to be defined, (i.e.
102- * _WCHAR_H is ALSO defined).
102+ * _WCHAR_H is ALSO defined, but __STRICT_ANSI__ is NOT).
103103 */
104104 typedef unsigned long _fsize_t;
105105 #endif /* ! (_IO_H && _WCHAR_H) */
--- a/mingwrt/include/sys/types.h
+++ b/mingwrt/include/sys/types.h
@@ -66,15 +66,17 @@
6666 */
6767 typedef __off32_t _off_t;
6868
69-# if _POSIX_C_SOURCE
69+# if _POSIX_C_SOURCE || ! defined _NO_OLDNAMES
7070 /* ...but note that this form should ALWAYS be preferred when
71- * compiling POSIX compatible source code.
71+ * compiling POSIX compatible source code, and should also be
72+ * made generally available unless Microsoft's old names have
73+ * been suppressed, (by defining _NO_OLDNAMES).
7274 */
7375 typedef _off_t off_t;
7476 # endif
7577 # if __GNUC__ < 4
7678 /* Some compilers, including GCC prior to v4, may get upset
77- * if we try to specifiy these typedefs more than once.
79+ * if we try to specify these typedefs more than once.
7880 */
7981 # define __have_typedef_off_t
8082 # endif
@@ -98,7 +100,7 @@
98100
99101 # if __GNUC__ < 4
100102 /* Some compilers, including GCC prior to v4, may get upset
101- * if we try to specifiy these typedefs more than once.
103+ * if we try to specify these typedefs more than once.
102104 */
103105 # define __have_typedef___off64_t
104106 # endif
@@ -112,15 +114,17 @@
112114 */
113115 typedef int _ssize_t;
114116
115-# if _POSIX_C_SOURCE
117+# if _POSIX_C_SOURCE || ! defined _NO_OLDNAMES
116118 /* ...but note that this form should ALWAYS be preferred when
117- * compiling POSIX compatible source code.
119+ * compiling POSIX compatible source code, and should also be
120+ * made generally available unless Microsoft's old names have
121+ * been suppressed, (by defining _NO_OLDNAMES).
118122 */
119123 typedef _ssize_t ssize_t;
120124 # endif
121125 # if __GNUC__ < 4
122126 /* Some compilers, including GCC prior to v4, may get upset
123- * if we try to specifiy these typedefs more than once.
127+ * if we try to specify these typedefs more than once.
124128 */
125129 # define __have_typedef_ssize_t
126130 # endif