tools/entab/halt.c compile fix - Mailing list pgsql-patches

From Niels Breet
Subject tools/entab/halt.c compile fix
Date
Msg-id 3269.84.24.185.131.1112646101.squirrel@breet.com
Whole thread Raw
Responses Re: tools/entab/halt.c compile fix
List pgsql-patches
This patch changes the use of varargs.h to stdarg.h as
required by GCC.

Niels Breet



Index: halt.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/tools/entab/halt.c,v
retrieving revision 1.5
diff -c -r1.5 halt.c
*** halt.c      22 Mar 2001 04:01:45 -0000      1.5
--- halt.c      4 Apr 2005 20:09:03 -0000
***************
*** 5,11 ****
  **            This is used to print out error messages and exit
  */

! #include <varargs.h>
  #include <signal.h>
  #include <stdio.h>
  #include <errno.h>
--- 5,11 ----
  **            This is used to print out error messages and exit
  */

! #include <stdarg.h>
  #include <signal.h>
  #include <stdio.h>
  #include <errno.h>
***************
*** 19,33 ****

  /*VARARGS*/
  void
! halt(va_alist)
! va_dcl
  {
        va_list         arg_ptr;
        char       *format,
                           *pstr;
        void            (*sig_func) ();

!       va_start(arg_ptr);
        format = va_arg(arg_ptr, char *);
        if (strncmp(format, "PERROR", 6) != 0)
                vfprintf(stderr, format, arg_ptr);
--- 19,32 ----

  /*VARARGS*/
  void
! halt(const char *path, ...)
  {
        va_list         arg_ptr;
        char       *format,
                           *pstr;
        void            (*sig_func) ();

!       va_start(arg_ptr, path);
        format = va_arg(arg_ptr, char *);
        if (strncmp(format, "PERROR", 6) != 0)
                vfprintf(stderr, format, arg_ptr);



pgsql-patches by date:

Previous
From: Robert Treat
Date:
Subject: update some urls
Next
From: "Qingqing Zhou"
Date:
Subject: remove an unused variable waitingForSignal