va_list

Поиск
Список
Период
Сортировка
От Petr Vavrinec
Тема va_list
Дата
Msg-id Pine.LNX.3.93.991216230853.20909A-100000@pdpro.is.pdas.cz
обсуждение исходный текст
Список pgsql-ports
If PostgreSQL failed to compile on your computer or you found a bug that
is likely to be specific to one platform then please fill out this form
and e-mail it to pgsql-ports@postgresql.org.

To report any other bug, fill out the form below and e-mail it to
pgsql-bugs@postgresql.org.

If you not only found the problem but solved it and generated a patch
then e-mail it to pgsql-patches@postgresql.org instead.  Please use the
command "diff -c" to generate the patch.

You may also enter a bug report at http://www.postgresql.org/ instead of
e-mail-ing this form.

============================================================================
                        POSTGRESQL BUG REPORT TEMPLATE
============================================================================


Your name        :   Petr Vavřinec
Your email address    :   uva@seznam.cz


System Configuration
---------------------
  Architecture (example: Intel Pentium)      :   Intel Pentium

  Operating System (example: Linux 2.0.26 ELF)     :   Linux 2.2.13

  PostgreSQL version (example: PostgreSQL-6.5.2):   PostgreSQL-6.5.2

  Compiler used (example:  gcc 2.8.0)        :   egcs-2.91.66


Please enter a FULL description of your problem:
------------------------------------------------
Postgres failed to compile with this configuration:

--prefix=/home/pgsql --with-tcl --with-perl --enable-hba --enable-locale

`make' died with this error message:

gmake[2]: Entering directory `/home/packages/src/postgresql-6.5.2/src/backend/lib'
gcc -I../../include -I../../backend   -O2 -Wall -Wmissing-prototypes -I..    -c stringinfo.c -o stringinfo.o
stringinfo.c: In function `appendStringInfo':
stringinfo.c:115: `va_list' undeclared (first use in this function)
stringinfo.c:115: (Each undeclared identifier is reported only once
stringinfo.c:115: for each function it appears in.)
stringinfo.c:115: parse error before `args'
stringinfo.c:121: warning: implicit declaration of function `va_start'
stringinfo.c:121: `args' undeclared (first use in this function)
stringinfo.c:123: warning: implicit declaration of function `va_end'
gmake[2]: *** [stringinfo.o] Error 1
gmake[2]: Leaving directory `/home/packages/src/postgresql-6.5.2/src/backend/lib'
gmake[1]: *** [lib.dir] Error 2
gmake[1]: Leaving directory `/home/packages/src/postgresql-6.5.2/src/backend'
gmake: *** [all] Error 2

Please describe a way to repeat the problem.   Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------

The same errors I received during compilation of following programs:

backend/lib/stringinfo.c
backend/utils/adt/arrayfuncs.c
backend/utils/error/elog.c
backend/utils/error/format.c
backend/utils/fmgr/fmgr.c
backend/utils/misc/trace.c

My problems was easily reproducible by any attempt to compile by hand
any of the above programs.

If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------
I added to all listed programs the header:

#include <stdarg.h>

...and it seems to have fixed the problem. Please note that I am not
a C programmer and I could be easily wrong. Nevertheless I'm sending
you attached patch because in my humble opinion the headers can't do
any harm...
For the time being everything seems to work for me here.

Best regards, hope my info can be of some help

    Petr

(the patch is to be run from the 'src' directory with -p0)

*** ./backend/lib/stringinfo.c    1999/12/16 12:11:22    1.1
--- ./backend/lib/stringinfo.c    1999/12/16 14:51:38
***************
*** 8,20 ****
   *
   * Copyright (c) 1994, Regents of the University of California
   *
!  *      $Id: stringinfo.c,v 1.1 1999/12/16 12:11:22 postgres Exp postgres $
   *
   *-------------------------------------------------------------------------
   */

  #include <stdio.h>
  #include <string.h>

  #include "postgres.h"
  #include "lib/stringinfo.h"
--- 8,21 ----
   *
   * Copyright (c) 1994, Regents of the University of California
   *
!  *      $Id: stringinfo.c,v 1.1 1999/12/16 12:11:22 postgres Exp $
   *
   *-------------------------------------------------------------------------
   */

  #include <stdio.h>
  #include <string.h>
+ #include <stdarg.h>

  #include "postgres.h"
  #include "lib/stringinfo.h"
*** ./backend/utils/adt/arrayfuncs.c    1999/12/16 16:13:20    1.1
--- ./backend/utils/adt/arrayfuncs.c    1999/12/16 16:13:45
***************
*** 13,18 ****
--- 13,19 ----
   */

  #include <ctype.h>
+ #include <stdarg.h>

  #include "postgres.h"

*** ./backend/utils/error/elog.c    1999/12/16 15:02:17    1.1
--- ./backend/utils/error/elog.c    1999/12/16 15:02:35
***************
*** 20,25 ****
--- 20,26 ----
  #include <errno.h>
  #include <unistd.h>
  #include <signal.h>
+ #include <stdarg.h>

  #include "postgres.h"
  #ifdef USE_SYSLOG
*** ./backend/utils/error/format.c    1999/12/16 15:02:45    1.1
--- ./backend/utils/error/format.c    1999/12/16 15:03:15
***************
*** 11,16 ****
--- 11,18 ----
   *
   *-------------------------------------------------------------------------
   */
+ #include <stdarg.h>
+
  #include "postgres.h"

  #define FormMaxSize        1024
*** ./backend/utils/fmgr/fmgr.c    1999/12/16 15:03:36    1.1
--- ./backend/utils/fmgr/fmgr.c    1999/12/16 15:03:56
***************
*** 12,17 ****
--- 12,19 ----
   *-------------------------------------------------------------------------
   */

+ #include <stdarg.h>
+
  #include "postgres.h"

  #include "catalog/pg_language.h"
*** ./backend/utils/misc/trace.c    1999/12/16 15:04:07    1.1
--- ./backend/utils/misc/trace.c    1999/12/16 15:04:22
***************
*** 15,20 ****
--- 15,21 ----
  #include <sys/types.h>
  #include <sys/stat.h>
  #include <fcntl.h>
+ #include <stdarg.h>

  #include "postgres.h"


------------------------------------------------------------------------------
 | Petr Vavrinec                  In a world without fences, who needs Gates ?
 | uva@pdas.cz                               -- SSC



В списке pgsql-ports по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [PORTS] QNX4 port
Следующее
От: Jens Skakkebaek
Дата:
Сообщение: STATUS_ACCESS_VIOLATION -- help!