- Using stderr or not is now a macro in error.h
This commit is contained in:
parent
a8b93c7bc4
commit
9683d76598
@ -14,10 +14,10 @@ error_die (void)
|
|||||||
void
|
void
|
||||||
vprintfstderr (char *fmt, va_list args)
|
vprintfstderr (char *fmt, va_list args)
|
||||||
{
|
{
|
||||||
#ifdef linux
|
#ifdef USESTDERR
|
||||||
vfprintf (stderr, fmt, args);
|
vfprintf (stderr, fmt, args);
|
||||||
#else
|
#else
|
||||||
// nothing for non-linux yet
|
// no alternative yet
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
#ifndef ERROR
|
#ifndef ERROR
|
||||||
#define ERROR
|
#define ERROR
|
||||||
|
|
||||||
|
//! usestderr is defined iff we use it
|
||||||
|
#define USESTDERR
|
||||||
|
|
||||||
//! Types of exit codes
|
//! Types of exit codes
|
||||||
enum exittypes
|
enum exittypes
|
||||||
{ EXIT_NOATTACK = 0, EXIT_ERROR = 1, EXIT_NOCLAIM = 2, EXIT_ATTACK = 3 };
|
{ EXIT_NOATTACK = 0, EXIT_ERROR = 1, EXIT_NOCLAIM = 2, EXIT_ATTACK = 3 };
|
||||||
|
@ -318,10 +318,10 @@ getOutputStream (void)
|
|||||||
if (globalError == 0)
|
if (globalError == 0)
|
||||||
return (FILE *) globalStream;
|
return (FILE *) globalStream;
|
||||||
else
|
else
|
||||||
#ifdef linux
|
#ifdef USESTDERR
|
||||||
return stderr;
|
return stderr;
|
||||||
#else
|
#else
|
||||||
// For non-linux, we simply omit it
|
// we simply omit it
|
||||||
return NULL;
|
return NULL;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user