Assume __STDC__, remove non-__STDC__ code.
This commit is contained in:
parent
f74779bdab
commit
3613e24cdc
@ -98,11 +98,7 @@ static const char rcsid[] =
|
|||||||
#include "pathnames.h"
|
#include "pathnames.h"
|
||||||
#include "extern.h"
|
#include "extern.h"
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
|
||||||
#include <varargs.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static char version[] = "Version 6.00LS";
|
static char version[] = "Version 6.00LS";
|
||||||
#undef main
|
#undef main
|
||||||
|
@ -51,11 +51,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#if __STDC__
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
|
||||||
#include <varargs.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <link.h>
|
#include <link.h>
|
||||||
|
|
||||||
@ -2293,19 +2289,11 @@ die __P((void))
|
|||||||
* Generate an error message that can be later be retrieved via dlerror.
|
* Generate an error message that can be later be retrieved via dlerror.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
#if __STDC__
|
|
||||||
generror(char *fmt, ...)
|
generror(char *fmt, ...)
|
||||||
#else
|
|
||||||
generror(fmt, va_alist)
|
|
||||||
char *fmt;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
#if __STDC__
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
#else
|
|
||||||
va_start(ap);
|
|
||||||
#endif
|
|
||||||
vsnprintf (dlerror_buf, DLERROR_BUF_SIZE, fmt, ap);
|
vsnprintf (dlerror_buf, DLERROR_BUF_SIZE, fmt, ap);
|
||||||
dlerror_msg = dlerror_buf;
|
dlerror_msg = dlerror_buf;
|
||||||
|
|
||||||
@ -2313,21 +2301,12 @@ char *fmt;
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
#if __STDC__
|
|
||||||
xprintf(char *fmt, ...)
|
xprintf(char *fmt, ...)
|
||||||
#else
|
|
||||||
xprintf(fmt, va_alist)
|
|
||||||
char *fmt;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
char buf[256];
|
char buf[256];
|
||||||
va_list ap;
|
va_list ap;
|
||||||
#if __STDC__
|
|
||||||
va_start(ap, fmt);
|
|
||||||
#else
|
|
||||||
va_start(ap);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
va_start(ap, fmt);
|
||||||
vsnprintf(buf, sizeof(buf), fmt, ap);
|
vsnprintf(buf, sizeof(buf), fmt, ap);
|
||||||
(void)write(STDOUT_FILENO, buf, strlen(buf));
|
(void)write(STDOUT_FILENO, buf, strlen(buf));
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user