replace #elif with equiv. #else - #if defined() ... #endif for non-ANSI-C preprocessors
This commit is contained in:
+9
-5
@@ -2,8 +2,10 @@ static char *sccsId = "@(#)ca_printf.c 1.2\t7/27/92";
|
||||
|
||||
#if defined(UNIX) || defined(VMS)
|
||||
# include <stdio.h>
|
||||
#elif defined(vxWorks)
|
||||
#else
|
||||
# if defined(vxWorks)
|
||||
# include <vxWorks.h>
|
||||
# endif
|
||||
#endif
|
||||
#include <varargs.h>
|
||||
|
||||
@@ -28,14 +30,15 @@ va_dcl
|
||||
|
||||
pformat = va_arg(args, char *);
|
||||
|
||||
# if defined(UNIX) || defined(VMS)
|
||||
#if defined(UNIX) || defined(VMS)
|
||||
{
|
||||
status = vfprintf(
|
||||
stderr,
|
||||
pformat,
|
||||
args);
|
||||
}
|
||||
# elif defined(vxWorks)
|
||||
#else
|
||||
# if defined(vxWorks)
|
||||
{
|
||||
int logMsgArgs[6];
|
||||
int i;
|
||||
@@ -55,9 +58,10 @@ va_dcl
|
||||
logMsgArgs[6]);
|
||||
|
||||
}
|
||||
# else
|
||||
# else
|
||||
#### dont compile in this case ####
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
va_end(args);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user