• 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ão1d9d68e1214ff0588f91aba60b82d3b612044bdc (tree)
Hora2016-09-15 05:26:25
AutorKeith Marshall <keithmarshall@user...>
CommiterKeith Marshall

Mensagem de Log

Relax strict ISO-C conformity to facilitate C99 support.

Mudança Sumário

Diff

--- a/mingwrt/ChangeLog
+++ b/mingwrt/ChangeLog
@@ -1,3 +1,13 @@
1+2016-09-14 Keith Marshall <keithmarshall@users.sourceforge.net>
2+
3+ Relax strict ISO-C conformity to facilitate C99 support.
4+
5+ * include/stdlib.h (_atoi64, _exit) [__STRICT_ANSI__]: Convention
6+ dictates that the Microsoft specific functions should not be declared;
7+ however, C99 provides equivalents in atoll() and _Exit(), for which we
8+ gratuituously use them to provide inline implementations; thus...
9+ [_ISOC99_SOURCE && !__NO_INLINE__]: ...declare them anyway.
10+
111 2016-09-13 Keith Marshall <keithmarshall@users.sourceforge.net>
212
313 Suppress expected header warnings when running testsuite.
--- a/mingwrt/include/stdlib.h
+++ b/mingwrt/include/stdlib.h
@@ -522,6 +522,22 @@ typedef struct { long quot, rem; } ldiv_t;
522522 _CRTIMP __cdecl __MINGW_NOTHROW div_t div (int, int) __MINGW_ATTRIB_CONST;
523523 _CRTIMP __cdecl __MINGW_NOTHROW ldiv_t ldiv (long, long) __MINGW_ATTRIB_CONST;
524524
525+#if !defined __STRICT_ANSI__ || (defined _ISOC99_SOURCE && !defined __NO_INLINE__)
526+/* Although not nominally valid in "__STRICT_ANSI__" mode, when compiling C99
527+ * source, we use Microsoft's _exit() function to facilitate our provision of
528+ * an inline implementation of ISO-C99's _Exit() function.
529+ */
530+_CRTIMP __cdecl __MINGW_NOTHROW void _exit (int) __MINGW_ATTRIB_NORETURN;
531+
532+#ifdef __MSVCRT__
533+/* Similarly, we use Microsoft's MSVCRT.DLL specific _atoi64() function,
534+ * to facilitate an inline implementation of ISO-C99's atoll() function.
535+ */
536+_CRTIMP __cdecl __MINGW_NOTHROW __int64 _atoi64 (const char *);
537+
538+#endif /* __MSVCRT__ */
539+#endif /* !__STRICT_ANSI__ || (_ISOC99_SOURCE && !__NO_INLINE__) */
540+
525541 #if !defined (__STRICT_ANSI__)
526542 /* NOTE: Officially the three following functions are obsolete. The Win32 API
527543 * functions SetErrorMode, Beep and Sleep are their replacements.
@@ -531,8 +547,6 @@ _CRTIMP __cdecl __MINGW_NOTHROW void _beep (unsigned int, unsigned int) __MINGW
531547 _CRTIMP __cdecl __MINGW_NOTHROW void _seterrormode (int) __MINGW_ATTRIB_DEPRECATED;
532548 _CRTIMP __cdecl __MINGW_NOTHROW void _sleep (unsigned long) __MINGW_ATTRIB_DEPRECATED;
533549
534-_CRTIMP __cdecl __MINGW_NOTHROW void _exit (int) __MINGW_ATTRIB_NORETURN;
535-
536550 /* _onexit is a Microsoft extension. Use atexit for portability. */
537551 /* Note: This is in startup code, not imported directly from dll */
538552 typedef int (* _onexit_t)(void);
@@ -562,7 +576,6 @@ _CRTIMP __cdecl __MINGW_NOTHROW wchar_t *_ltow (long, wchar_t *, int);
562576 _CRTIMP __cdecl __MINGW_NOTHROW wchar_t *_ultow (unsigned long, wchar_t *, int);
563577
564578 #ifdef __MSVCRT__
565-_CRTIMP __cdecl __MINGW_NOTHROW __int64 _atoi64 (const char *);
566579 _CRTIMP __cdecl __MINGW_NOTHROW char* _i64toa (__int64, char *, int);
567580 _CRTIMP __cdecl __MINGW_NOTHROW char* _ui64toa (unsigned __int64, char *, int);
568581 _CRTIMP __cdecl __MINGW_NOTHROW __int64 _wtoi64 (const wchar_t *);