• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

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

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revision5d4d798cbdf13ee79a85acc71df2a0d87b7a3759 (tree)
Zeit2015-11-18 15:57:52
Autorshimitei <shimitei@gmai...>
Commitershimitei

Log Message

Fix handling of tmpnam() return value in VC2015

VC2015ではtmpnam関数はフルパスを返すように変更されたため、VC2015以降ではtmpnam関数の戻り値を加工せずに扱う。
参考ページ
https://msdn.microsoft.com/ja-jp/library/bb531344.aspx#mt251
>以前のバージョンでは、tmpnam 関数および tmpnam_s 関数は、ドライブのルートにファイル名を生成していました (\sd3c など)。 現在、これらの関数は、一時ディレクトリに使用可能なファイル名パスを生成します。

Ändern Zusammenfassung

Diff

--- a/src/util.c
+++ b/src/util.c
@@ -287,7 +287,7 @@ static errr path_temp(char *buf, int max)
287287 if (!s) return (-1);
288288
289289 /* Format to length */
290-#ifndef WIN32
290+#if !defined(WIN32) || (defined(_MSC_VER) && (_MSC_VER >= 1900))
291291 (void)strnfmt(buf, max, "%s", s);
292292 #else
293293 (void)strnfmt(buf, max, ".%s", s);