<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>
GitLab
</title>

</head>
<body>
<style type="text/css">
img {
max-width: 100%; height: auto;
}
</style>
<div class="content">
<h3>
Philip Carns pushed to branch dev-stdio
at <a href="https://xgitlab.cels.anl.gov/darshan/darshan">darshan / darshan</a>
</h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://xgitlab.cels.anl.gov/darshan/darshan/commit/93a0e7a1ae18cf721646aa14fd55fa7f0321eb33">93a0e7a1</a></strong>
<div>
<span>by Phil Carns</span>
<i>at 2016-05-23T23:20:13-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap">fseeko64 wrapper</pre>
</li>
</ul>
<h4>2 changed files:</h4>
<ul>
<li class="file-stats">
<a href="#620f2ecad2bb6f74b2fcd0134963a841" style="text-decoration: none">
darshan-runtime/lib/darshan-stdio.c
</a>
</li>
<li class="file-stats">
<a href="#ad29afc395839758d41094872298bd0d" style="text-decoration: none">
darshan-runtime/share/ld-opts/darshan-stdio-ld-opts
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id="620f2ecad2bb6f74b2fcd0134963a841">
<a href="https://xgitlab.cels.anl.gov/darshan/darshan/commit/93a0e7a1ae18cf721646aa14fd55fa7f0321eb33#diff-0">
<strong>
darshan-runtime/lib/darshan-stdio.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="background: #ffdddd; color: #000000">--- a/darshan-runtime/lib/darshan-stdio.c
</span><span style="background: #ddffdd; color: #000000">+++ b/darshan-runtime/lib/darshan-stdio.c
</span><span style="color: #aaaaaa">@@ -61,7 +61,7 @@
</span>  * --------------
  * int      fseek(FILE *, long int, int);                   DONE
  * int      fseeko(FILE *, off_t, int);                     DONE
<span style="background: #ffdddd; color: #000000">- * int      fseeko64(FILE *, off_t, int);
</span><span style="background: #ddffdd; color: #000000">+ * int      fseeko64(FILE *, off_t, int);                   DONE
</span>  * int      fsetpos(FILE *, const fpos_t *);
  * int      fsetpos64(FILE *, const fpos_t *);
  * void     rewind(FILE *);
<span style="color: #aaaaaa">@@ -122,6 +122,7 @@ DARSHAN_FORWARD_DECL(vfscanf, int, (FILE *stream, const char *format, va_list ap
</span> DARSHAN_FORWARD_DECL(fgets, char*, (char *s, int size, FILE *stream));
 DARSHAN_FORWARD_DECL(fseek, int, (FILE *stream, long offset, int whence));
 DARSHAN_FORWARD_DECL(fseeko, int, (FILE *stream, off_t offset, int whence));
<span style="background: #ddffdd; color: #000000">+DARSHAN_FORWARD_DECL(fseeko64, int, (FILE *stream, off_t offset, int whence));
</span> 
 /* The stdio_file_runtime structure maintains necessary runtime metadata
  * for the STDIO file record (darshan_stdio_record structure, defined in
<span style="color: #aaaaaa">@@ -803,6 +804,37 @@ int DARSHAN_DECL(fseeko)(FILE *stream, off_t offset, int whence)
</span>     return(ret);
 }
 
<span style="background: #ddffdd; color: #000000">+int DARSHAN_DECL(fseeko64)(FILE *stream, off_t offset, int whence)
+{
+    int ret;
+    struct stdio_file_runtime* file;
+    double tm1, tm2;
+
+    MAP_OR_FAIL(fseeko64);
+
+    tm1 = darshan_core_wtime();
+    ret = __real_fseeko64(stream, offset, whence);
+    tm2 = darshan_core_wtime();
+
+    if(ret >= 0)
+    {
+        STDIO_LOCK();
+        stdio_runtime_initialize();
+        file = stdio_file_by_stream(stream);
+        if(file)
+        {
+            file->offset = ftell(stream);
+            DARSHAN_TIMER_INC_NO_OVERLAP(
+                file->file_record->fcounters[STDIO_F_META_TIME],
+                tm1, tm2, file->last_meta_end);
+            file->file_record->counters[STDIO_SEEKS] += 1;
+        }
+        STDIO_UNLOCK();
+    }
+
+    return(ret);
+}
+
</span> /**********************************************************
  * Internal functions for manipulating STDIO module state *
  **********************************************************/
</code></pre>

<br>
</li>
<li id="ad29afc395839758d41094872298bd0d">
<a href="https://xgitlab.cels.anl.gov/darshan/darshan/commit/93a0e7a1ae18cf721646aa14fd55fa7f0321eb33#diff-1">
<strong>
darshan-runtime/share/ld-opts/darshan-stdio-ld-opts
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="background: #ffdddd; color: #000000">--- a/darshan-runtime/share/ld-opts/darshan-stdio-ld-opts
</span><span style="background: #ddffdd; color: #000000">+++ b/darshan-runtime/share/ld-opts/darshan-stdio-ld-opts
</span><span style="color: #aaaaaa">@@ -17,6 +17,7 @@
</span> --wrap=fgets
 --wrap=fseek
 --wrap=fseeko
<span style="background: #ddffdd; color: #000000">+--wrap=fseeko64
</span> --wrap=fprintf
 --wrap=vfprintf
 --wrap=fputc
</code></pre>

<br>
</li>

</div>
<div class="footer" style="margin-top: 10px">
<p style="color: #777; font-size: small">

<br>
<a href="https://xgitlab.cels.anl.gov/darshan/darshan/commit/93a0e7a1ae18cf721646aa14fd55fa7f0321eb33">View it on GitLab</a>.
<br>
You're receiving this email because of your account on xgitlab.cels.anl.gov.
If you'd like to receive fewer emails, you can
adjust your notification settings.

</p>
</div>
</body>
</html>