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