Skip to content

Commit

Permalink
Ensure some stdio functions are not #define'd
Browse files Browse the repository at this point in the history
  • Loading branch information
grondo committed Jul 6, 2007
1 parent 83311c0 commit 6d426ac
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2007-07-06 Mark Grondona <[email protected]>

* src/interposer/io-watchdog-interposer.c :
Ensure some stdio functions are not #defined, and undef them if so.

2007-07-05 Mark Grondona <[email protected]>

* io-watchdog.spec : Add BuildRequires.
Expand All @@ -13,7 +18,6 @@
some overhead, it is disabled by default, and enabled via
the option --exact-timeout and config parameter exact-timeout.

* : tag v0.5.

2007-01-17 Mark Grondona <[email protected]>

Expand Down
12 changes: 12 additions & 0 deletions src/interposer/io-watchdog-interposer.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,9 @@ static inline void register_write_activity (int n)
log_debug ("gettimeofday: %s\n", strerror (errno));
}

#if defined vfprintf
#undef vfprintf
#endif
int vfprintf (FILE *fp, const char *fmt, va_list args)
{
int rc = -1;
Expand All @@ -339,6 +342,9 @@ int vfprintf (FILE *fp, const char *fmt, va_list args)
return (rc);
}

#if defined vprintf
#undef vprintf
#endif
int vprintf (const char *fmt, va_list args)
{
int rc = ((*ctx.ops.vprintf) (fmt, args));
Expand All @@ -347,6 +353,9 @@ int vprintf (const char *fmt, va_list args)
return (rc);
}

#if defined fprintf
#undef fprintf
#endif
int fprintf (FILE *fp, const char *fmt, ...)
{
int rc;
Expand All @@ -362,6 +371,9 @@ int fprintf (FILE *fp, const char *fmt, ...)
return (rc);
}

#if defined printf
#undef printf
#endif
int printf (const char *fmt, ...)
{
int rc;
Expand Down

0 comments on commit 6d426ac

Please sign in to comment.