<!DOCTYPE html>
<html>
  <head>
  </head>
  <body>
    <dl style="line-height: 1.5; margin-left: 2em">
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">Author</dt>
      <dd style="margin-left: 8.5em">Kouhei Sutou &lt;kou****@clear*****&gt;</dd>
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">Date</dt>
      <dd style="margin-left: 8.5em">2015-04-16 23:04:16 +0900 (Thu, 16 Apr 2015)</dd>
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">New Revision</dt>
      <dd style="margin-left: 8.5em"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b">0d256265e47293a18d22fa932b88feca9a969a1b</a></dd>
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">Message</dt>
      <dd style="margin-left: 8.5em"><pre style="border: 1px solid #aaa; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; padding: 0.5em; width: auto">windows: fix mkstemp() implementation</pre></dd>
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">Modified files</dt>
      <dd style="margin-left: 8.5em">
        <ul>
          <li><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#diff-0">lib/util.c</a></li>
        </ul>
      </dd>
    </dl>

    <div class="diff-section" style="clear: both">
      <table style="border-collapse: collapse; border: 1px solid #aaa">
        <thead>
          <tr class="diff-header" style="border: 1px solid #aaa">
            <td colspan="3">
<pre style="border: 0; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">  Modified: lib/util.c (+9 -2)</span>
<span class="diff-header-mark" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">===================================================================</span>
</pre>
            </td>
          </tr>
        </thead>
        <tbody>
          <tr>
            <th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0L24">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0L25">25</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0L26">26</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0L27">27</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0L28">28</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0L29">29</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0L30">30</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0L31">31</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0L32">32</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0L33">33</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0L1349">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0L1350">1350</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0L1351">1351</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0L1352">1352</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0L1353">1353</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0L1354">1354</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0L1355">1355</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0L1356">1356</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0L1357">1357</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0L1358">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0L1359">1359</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0L1360">1360</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0L1361">1361</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0L1362">1362</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0L1363">1363</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0L1364">1364</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0L1365">1365</a></span>
</pre>
            </th>
            <th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R24">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R25">25</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R26">26</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R27">27</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R28">28</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R29">29</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R30">30</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R31">31</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R32">32</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R33">33</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R34">34</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R35">35</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R36">36</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R1352">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R1353">1353</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R1354">1354</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R1355">1355</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R1356">1356</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R1357">1357</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R1358">1358</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R1359">1359</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R1360">1360</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R1361">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R1362">1362</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R1363">1363</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R1364">1364</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R1365">1365</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R1366">1366</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R1367">1367</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R1368">1368</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R1369">1369</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R1370">1370</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R1371">1371</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/0d256265e47293a18d22fa932b88feca9a969a1b#L0R1372">1372</a></span>
</pre>
            </th>
            <td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -25,9 +25,12 @@</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> #include &lt;string.h&gt;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> #include &lt;stdio.h&gt;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> #include &lt;stdlib.h&gt;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+#include &lt;fcntl.h&gt;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+#include &lt;sys/stat.h&gt;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-not-changed" style="display: block; white-space: pre"> #ifdef WIN32</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> # include &lt;io.h&gt;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+# include &lt;share.h&gt;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> #endif /* WIN32 */</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-not-changed" style="display: block; white-space: pre"> grn_rc</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -1350,8 +1353,8 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">int</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> grn_mkstemp(char *path_template)</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> {</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   errno_t error;</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">-  int fd;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   size_t path_template_size;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+  int fd;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-not-changed" style="display: block; white-space: pre">   path_template_size = strlen(path_template) + 1;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   error = _mktemp_s(path_template, path_template_size);</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -1359,7 +1362,11 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">grn_mkstemp(char *path_template)</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre">     return -1;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   }</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">-  error = fopen_s(&amp;fd, path_template, &quot;wb&quot;);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+  error = _sopen_s(&amp;fd,</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+                   path_template,</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+                   _O_RDWR | _O_CREAT | _O_EXCL | _O_BINARY,</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+                   _SH_DENYNO,</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+                   _S_IREAD | _S_IWRITE);</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   if (error != 0) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     return -1;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   }</span>
</pre>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
  </body>
</html>