- Using stderr or not is now a macro in error.h

This commit is contained in:
ccremers 2006-08-06 18:01:23 +00:00
parent a8b93c7bc4
commit 9683d76598
3 changed files with 7 additions and 4 deletions

View File

@ -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
}

View File

@ -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 };

View File

@ -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
}