<!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/9930d72aa1c5a596a0eaeb70f61d211ddf4d44d4">9930d72a</a></strong>
<div>
<span>by Phil Carns</span>
<i>at 2016-05-23T20:38:32-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap">fdopen wrapper</pre>
</li>
<li>
<strong><a href="https://xgitlab.cels.anl.gov/darshan/darshan/commit/e025a97f1a3ecae760b265992356b3977199ec67">e025a97f</a></strong>
<div>
<span>by Phil Carns</span>
<i>at 2016-05-23T20:42:01-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap">freopen 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/compare/11c80b443cafe3486518ae37b944470ef27a238a...e025a97f1a3ecae760b265992356b3977199ec67#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">@@ -15,6 +15,7 @@
</span>  *     - POSIX_FREADS
  *     - POSIX_FWRITES
  *     - POSIX_FSEEKS
<span style="background: #ddffdd; color: #000000">+ * - add regression test cases for all functions captured here
</span>  */
 
 /* catalog of stdio functions instrumented by this module
<span style="color: #aaaaaa">@@ -22,8 +23,8 @@
</span>  * functions for opening streams
  * --------------
  * FILE    *fdopen(int, const char *);                      DONE
<span style="background: #ffdddd; color: #000000">- * FILE    *fopen(const char *, const char *);
- * FILE    *freopen(const char *, const char *, FILE *);
</span><span style="background: #ddffdd; color: #000000">+ * FILE    *fopen(const char *, const char *);              DONE
+ * FILE    *freopen(const char *, const char *, FILE *);    DONE
</span>  *
  * functions for closing streams
  * --------------
<span style="color: #aaaaaa">@@ -92,6 +93,8 @@
</span> 
 DARSHAN_FORWARD_DECL(fopen, FILE*, (const char *path, const char *mode));
 DARSHAN_FORWARD_DECL(fopen64, FILE*, (const char *path, const char *mode));
<span style="background: #ddffdd; color: #000000">+DARSHAN_FORWARD_DECL(fdopen, FILE*, (int fd, const char *mode));
+DARSHAN_FORWARD_DECL(freopen, FILE*, (const char *path, const char *mode, FILE *stream));
</span> DARSHAN_FORWARD_DECL(fclose, int, (FILE *fp));
 DARSHAN_FORWARD_DECL(fwrite, size_t, (const void *ptr, size_t size, size_t nmemb, FILE *stream));
 DARSHAN_FORWARD_DECL(fread, size_t, (void *ptr, size_t size, size_t nmemb, FILE *stream));
<span style="color: #aaaaaa">@@ -291,6 +294,44 @@ FILE* DARSHAN_DECL(fopen64)(const char *path, const char *mode)
</span>     return(ret);
 }
 
<span style="background: #ddffdd; color: #000000">+FILE* DARSHAN_DECL(fdopen)(int fd, const char *mode)
+{
+    FILE* ret;
+    double tm1, tm2;
+
+    MAP_OR_FAIL(fdopen);
+
+    tm1 = darshan_core_wtime();
+    ret = __real_fdopen(fd, mode);
+    tm2 = darshan_core_wtime();
+
+    STDIO_LOCK();
+    stdio_runtime_initialize();
+    STDIO_RECORD_OPEN(ret, "UNKNOWN-FDOPEN", tm1, tm2);
+    STDIO_UNLOCK();
+
+    return(ret);
+}
+
+FILE* DARSHAN_DECL(freopen)(const char *path, const char *mode, FILE *stream)
+{
+    FILE* ret;
+    double tm1, tm2;
+
+    MAP_OR_FAIL(freopen);
+
+    tm1 = darshan_core_wtime();
+    ret = __real_freopen(path, mode, stream);
+    tm2 = darshan_core_wtime();
+
+    STDIO_LOCK();
+    stdio_runtime_initialize();
+    STDIO_RECORD_OPEN(ret, path, tm1, tm2);
+    STDIO_UNLOCK();
+
+    return(ret);
+}
+
</span> int DARSHAN_DECL(fclose)(FILE *fp)
 {
     struct stdio_file_runtime* file;
</code></pre>

<br>
</li>
<li id="ad29afc395839758d41094872298bd0d">
<a href="https://xgitlab.cels.anl.gov/darshan/darshan/compare/11c80b443cafe3486518ae37b944470ef27a238a...e025a97f1a3ecae760b265992356b3977199ec67#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">@@ -1,6 +1,8 @@
</span> --undefined=__wrap_fopen
 --wrap=fopen
 --wrap=fopen64
<span style="background: #ddffdd; color: #000000">+--wrap=fdopen
+--wrap=freopen
</span> --wrap=fclose
 --wrap=fwrite
 --wrap=fread
</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/compare/11c80b443cafe3486518ae37b944470ef27a238a...e025a97f1a3ecae760b265992356b3977199ec67">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>