<!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 22:19:51 +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/8c04bb90590715797aa74dd2d740e638cff5f4f5">8c04bb90590715797aa74dd2d740e638cff5f4f5</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">Show more information on lseek() error</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/8c04bb90590715797aa74dd2d740e638cff5f4f5#diff-0">lib/grn.h</a></li>
          <li><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#diff-1">lib/ii.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/grn.h (+2 -0)</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/8c04bb90590715797aa74dd2d740e638cff5f4f5#L0L457">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L0L458">458</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L0L459">459</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L0L460">460</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/8c04bb90590715797aa74dd2d740e638cff5f4f5#L0L461">461</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L0L462">462</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L0L463">463</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L0L464">464</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L0L465">465</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L0L466">466</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/8c04bb90590715797aa74dd2d740e638cff5f4f5#L0L467">467</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L0L468">468</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L0L469">469</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/8c04bb90590715797aa74dd2d740e638cff5f4f5#L0R457">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L0R458">458</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L0R459">459</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L0R460">460</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/8c04bb90590715797aa74dd2d740e638cff5f4f5#L0R461">461</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L0R462">462</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L0R463">463</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L0R464">464</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L0R465">465</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L0R466">466</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L0R467">467</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/8c04bb90590715797aa74dd2d740e638cff5f4f5#L0R468">468</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L0R469">469</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L0R470">470</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L0R471">471</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">@@ -458,12 +458,14 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">typedef int grn_cond;</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> # else /* WIN64 */</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> #  define GRN_FMT_SOCKET &quot;u&quot;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> # endif /* WIN64 */</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+# define GRN_FMT_OFF_T GRN_FMT_LLD</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> #else /* WIN32 */</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> # define GRN_FMT_LLD  &quot;lld&quot;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> # define GRN_FMT_LLU  &quot;llu&quot;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> # define GRN_FMT_SIZE  &quot;zu&quot;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> # define GRN_FMT_SSIZE &quot;zd&quot;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> # define GRN_FMT_SOCKET &quot;d&quot;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+# define GRN_FMT_OFF_T &quot;jd&quot;</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"> #ifdef __GNUC__</span>
</pre>
            </td>
          </tr>
        </tbody>
      </table>
      <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/ii.c (+11 -3)</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/8c04bb90590715797aa74dd2d740e638cff5f4f5#L1L7400">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L1L7401">7401</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L1L7402">7402</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L1L7403">7403</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/8c04bb90590715797aa74dd2d740e638cff5f4f5#L1L7404">7404</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/8c04bb90590715797aa74dd2d740e638cff5f4f5#L1L7405">7405</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/8c04bb90590715797aa74dd2d740e638cff5f4f5#L1L7406">7406</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-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-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/8c04bb90590715797aa74dd2d740e638cff5f4f5#L1L7407">7407</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L1L7408">7408</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L1L7409">7409</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/8c04bb90590715797aa74dd2d740e638cff5f4f5#L1R7400">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L1R7401">7401</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L1R7402">7402</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L1R7403">7403</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-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L1R7404">7404</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/8c04bb90590715797aa74dd2d740e638cff5f4f5#L1R7405">7405</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/8c04bb90590715797aa74dd2d740e638cff5f4f5#L1R7406">7406</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/8c04bb90590715797aa74dd2d740e638cff5f4f5#L1R7407">7407</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/8c04bb90590715797aa74dd2d740e638cff5f4f5#L1R7408">7408</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/8c04bb90590715797aa74dd2d740e638cff5f4f5#L1R7409">7409</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/8c04bb90590715797aa74dd2d740e638cff5f4f5#L1R7410">7410</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/8c04bb90590715797aa74dd2d740e638cff5f4f5#L1R7411">7411</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/8c04bb90590715797aa74dd2d740e638cff5f4f5#L1R7412">7412</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/8c04bb90590715797aa74dd2d740e638cff5f4f5#L1R7413">7413</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/8c04bb90590715797aa74dd2d740e638cff5f4f5#L1R7414">7414</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L1R7415">7415</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L1R7416">7416</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/8c04bb90590715797aa74dd2d740e638cff5f4f5#L1R7417">7417</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">@@ -7401,9 +7401,17 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">grn_ii_buffer_fetch(grn_ctx *ctx, grn_ii_buffer *ii_buffer,</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre">           return;</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">-      if (grn_lseek(ii_buffer-&gt;tmpfd, block-&gt;head, SEEK_SET) != block-&gt;head) {</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">-        ERRNO_ERR(&quot;grn_lseek&quot;);</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">-        return;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+      {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+        off_t seeked_position;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+        seeked_position = grn_lseek(ii_buffer-&gt;tmpfd, block-&gt;head, SEEK_SET);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+        if (seeked_position != block-&gt;head) {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+          ERRNO_ERR(&quot;grn_lseek&quot;);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+          GRN_LOG(ctx, GRN_LOG_ERROR,</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+                  &quot;failed to grn_lseek(%&quot; GRN_FMT_OFF_T &quot;) -&gt; %&quot; GRN_FMT_OFF_T,</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+                  block-&gt;head,</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+                  seeked_position);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+          return;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+        }</span>
<span class="diff-not-changed" style="display: block; white-space: pre">       }</span>
<span class="diff-not-changed" style="display: block; white-space: pre">       if (grn_read(ii_buffer-&gt;tmpfd, block-&gt;buffer, bytesize) != bytesize) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre">         SERR(&quot;read&quot;);</span>
</pre>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
  </body>
</html>