Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
darshan
darshan
Commits
09926b48
Commit
09926b48
authored
May 23, 2016
by
Philip Carns
Browse files
fputc wrapper
parent
c2a08740
Changes
2
Hide whitespace changes
Inline
Side-by-side
darshan-runtime/lib/darshan-stdio.c
View file @
09926b48
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
* --------------
* --------------
* int fprintf(FILE *, const char *, ...); DONE
* int fprintf(FILE *, const char *, ...); DONE
* int vfprintf(FILE *, const char *, va_list); DONE
* int vfprintf(FILE *, const char *, va_list); DONE
* int fputc(int, FILE *);
* int fputc(int, FILE *);
DONE
* int fputs(const char *, FILE *);
* int fputs(const char *, FILE *);
* size_t fwrite(const void *, size_t, size_t, FILE *); DONE
* size_t fwrite(const void *, size_t, size_t, FILE *); DONE
* int putc(int, FILE *);
* int putc(int, FILE *);
...
@@ -102,6 +102,7 @@ DARSHAN_FORWARD_DECL(freopen, FILE*, (const char *path, const char *mode, FILE *
...
@@ -102,6 +102,7 @@ DARSHAN_FORWARD_DECL(freopen, FILE*, (const char *path, const char *mode, FILE *
DARSHAN_FORWARD_DECL
(
fclose
,
int
,
(
FILE
*
fp
));
DARSHAN_FORWARD_DECL
(
fclose
,
int
,
(
FILE
*
fp
));
DARSHAN_FORWARD_DECL
(
fflush
,
int
,
(
FILE
*
fp
));
DARSHAN_FORWARD_DECL
(
fflush
,
int
,
(
FILE
*
fp
));
DARSHAN_FORWARD_DECL
(
fwrite
,
size_t
,
(
const
void
*
ptr
,
size_t
size
,
size_t
nmemb
,
FILE
*
stream
));
DARSHAN_FORWARD_DECL
(
fwrite
,
size_t
,
(
const
void
*
ptr
,
size_t
size
,
size_t
nmemb
,
FILE
*
stream
));
DARSHAN_FORWARD_DECL
(
fputc
,
int
,
(
int
c
,
FILE
*
stream
));
DARSHAN_FORWARD_DECL
(
fprintf
,
int
,
(
FILE
*
stream
,
const
char
*
format
,
...));
DARSHAN_FORWARD_DECL
(
fprintf
,
int
,
(
FILE
*
stream
,
const
char
*
format
,
...));
DARSHAN_FORWARD_DECL
(
vfprintf
,
int
,
(
FILE
*
stream
,
const
char
*
format
,
va_list
));
DARSHAN_FORWARD_DECL
(
vfprintf
,
int
,
(
FILE
*
stream
,
const
char
*
format
,
va_list
));
DARSHAN_FORWARD_DECL
(
fread
,
size_t
,
(
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
));
...
@@ -419,6 +420,27 @@ size_t DARSHAN_DECL(fwrite)(const void *ptr, size_t size, size_t nmemb, FILE *st
...
@@ -419,6 +420,27 @@ size_t DARSHAN_DECL(fwrite)(const void *ptr, size_t size, size_t nmemb, FILE *st
return
(
ret
);
return
(
ret
);
}
}
int
DARSHAN_DECL
(
fputc
)(
int
c
,
FILE
*
stream
)
{
int
ret
;
double
tm1
,
tm2
;
MAP_OR_FAIL
(
fputc
);
tm1
=
darshan_core_wtime
();
ret
=
__real_fputc
(
c
,
stream
);
tm2
=
darshan_core_wtime
();
STDIO_LOCK
();
stdio_runtime_initialize
();
if
(
ret
!=
EOF
)
STDIO_RECORD_WRITE
(
stream
,
1
,
tm1
,
tm2
,
0
);
STDIO_UNLOCK
();
return
(
ret
);
}
int
DARSHAN_DECL
(
vfprintf
)(
FILE
*
stream
,
const
char
*
format
,
va_list
ap
)
int
DARSHAN_DECL
(
vfprintf
)(
FILE
*
stream
,
const
char
*
format
,
va_list
ap
)
{
{
int
ret
;
int
ret
;
...
...
darshan-runtime/share/ld-opts/darshan-stdio-ld-opts
View file @
09926b48
...
@@ -16,3 +16,4 @@
...
@@ -16,3 +16,4 @@
--wrap=fseek
--wrap=fseek
--wrap=fprintf
--wrap=fprintf
--wrap=vfprintf
--wrap=vfprintf
--wrap=fputc
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment