• R/O
  • SSH

標籤
無標籤

Frequently used words (click to add to your profile)

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

Mercurial Patch Queue for Windows System Libraries


File Info

修訂. 637c26973ed73f73fa2f3c4e92278f04ca8bb7f7
大小 1,194 bytes
時間 2019-03-31 21:25:12
作者 Keith Marshall
Log Message

Initial commit.

Content

# HG changeset patch
# Parent a14ae09b813e5716b5dfef381b89b57e11da0172
diff --git a/mingwrt/include/alloca.h b/mingwrt/include/alloca.h
--- a/mingwrt/include/alloca.h
+++ b/mingwrt/include/alloca.h
@@ -51,17 +51,33 @@
  * we may guarantee this, by selective inclusion from <stddef.h>
  */
 #define __need_size_t
 #include <stddef.h>
 
+#ifndef _BEGIN_C_DECLS
+#if __cplusplus
+#define _BEGIN_C_DECLS	extern "C" {
+#define _END_C_DECLS	}
+#else
+#define _BEGIN_C_DECLS
+#define _END_C_DECLS
+#endif
+#define __CRT_ALIAS	_CRTALIAS
+#endif
+
 _BEGIN_C_DECLS
 
 #if defined _GNU_SOURCE || ! defined _NO_OLDNAMES
+#if __GNUC__ >= 4
+#pragma message "expanding in-line alloca() implementation"
 /* This is the GNU standard API; it is also compatible with Microsoft's
  * original, but now deprecated, naming convention.
  */
-__CRT_ALIAS void *alloca( size_t __n ){ return __builtin_alloca( __n ); }
+__CRT_ALIAS __fastcall void *alloca( size_t __n ){ return __builtin_alloca( __n ); }
+#else
+#define alloca(__n)  __builtin_alloca(__n)
+#endif
 #endif	/* _GNU_SOURCE || !_NO_OLDNAMES */
 
 /* This represents the same API, but conforms to Microsoft's currently
  * preferred naming convention.
  */