Skip site navigation (1) Skip section navigation (2)

tools/entab/halt.c compile fix

From: "Niels Breet" <niels(at)breet(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: tools/entab/halt.c compile fix
Date: 2005-04-04 20:21:41
Message-ID: 3269.84.24.185.131.1112646101.squirrel@breet.com (view raw or flat)
Thread:
Lists: 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);



Responses

pgsql-patches by date

Next:From: Neil ConwayDate: 2005-04-05 00:09:42
Subject: Re: avg(int2) and avg(int8) micro-opt
Previous:From: Alvaro HerreraDate: 2005-04-04 16:18:06
Subject: Re: Bug in DROP NOT NULL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group