mirror of
https://github.com/postgres/postgres.git
synced 2025-09-03 15:22:11 +03:00
Fix compile of entab to use stdarg.h. Clean up includes.
Marko Kreen
This commit is contained in:
@@ -11,8 +11,13 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "../../include/c.h"
|
||||
#if defined(WIN32) || defined(__CYGWIN__)
|
||||
#define PG_BINARY_R "rb"
|
||||
#else
|
||||
#define PG_BINARY_R "r"
|
||||
#endif
|
||||
|
||||
#define NUL '\0'
|
||||
|
||||
@@ -29,9 +34,7 @@ extern char *optarg;
|
||||
extern int optind;
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int tab_size = 8,
|
||||
min_spaces = 2,
|
||||
|
@@ -19,15 +19,13 @@
|
||||
|
||||
/*VARARGS*/
|
||||
void
|
||||
halt(const char *path, ...)
|
||||
halt(const char *format, ...)
|
||||
{
|
||||
va_list arg_ptr;
|
||||
char *format,
|
||||
*pstr;
|
||||
const char *pstr;
|
||||
void (*sig_func) ();
|
||||
|
||||
va_start(arg_ptr, path);
|
||||
format = va_arg(arg_ptr, char *);
|
||||
va_start(arg_ptr, format);
|
||||
if (strncmp(format, "PERROR", 6) != 0)
|
||||
vfprintf(stderr, format, arg_ptr);
|
||||
else
|
||||
|
Reference in New Issue
Block a user