- 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
|
||||
vprintfstderr (char *fmt, va_list args)
|
||||
{
|
||||
#ifdef linux
|
||||
#ifdef USESTDERR
|
||||
vfprintf (stderr, fmt, args);
|
||||
#else
|
||||
// nothing for non-linux yet
|
||||
// no alternative yet
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
#ifndef ERROR
|
||||
#define ERROR
|
||||
|
||||
//! usestderr is defined iff we use it
|
||||
#define USESTDERR
|
||||
|
||||
//! Types of exit codes
|
||||
enum exittypes
|
||||
{ EXIT_NOATTACK = 0, EXIT_ERROR = 1, EXIT_NOCLAIM = 2, EXIT_ATTACK = 3 };
|
||||
|
@ -318,10 +318,10 @@ getOutputStream (void)
|
||||
if (globalError == 0)
|
||||
return (FILE *) globalStream;
|
||||
else
|
||||
#ifdef linux
|
||||
#ifdef USESTDERR
|
||||
return stderr;
|
||||
#else
|
||||
// For non-linux, we simply omit it
|
||||
// we simply omit it
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user