Minor problem with Solaris-2.5/SPARC-1/gcc-2.8.1

Поиск
Список
Период
Сортировка
От Ernst Molitor
Тема Minor problem with Solaris-2.5/SPARC-1/gcc-2.8.1
Дата
Msg-id 199812311134.MAA26574@mibi02.meb.uni-bonn.de
обсуждение исходный текст
Список pgsql-bugs
============================================================================
                        POSTGRESQL BUG REPORT TEMPLATE
============================================================================


Your name        :    Ernst Molitor
Your email address    :    ernst@mibi02.meb.uni-bonn.de


System Configuration
---------------------
  Architecture (example: Intel Pentium)      : Sun SPARC 1

  Operating System (example: Linux 2.0.26 ELF)     : SunOS 5.5 (Solaris 2.5)

  PostgreSQL version (example: PostgreSQL-6.4)  : PostgreSQL-6.5.x
    (current CVS sources, as of 12/31/98)

  Compiler used (example:  gcc 2.8.0)        : gcc 2.8.1


Please enter a FULL description of your problem:
------------------------------------------------

The SPARC has HAVE_LONG_LONG_INT_64 defined in include/config.h, the
"corresponding" HAVE_LONG_INT_64 is undefined. In
pgsql/src/backend/port/snprintf.c, the declaration of fmtnum is
"#ifndef'ed" depending on HAVE_LONG_INT_64, while the definition is
"#ifdef'ed" depending on HAVE_LONG_LONG_INT_64. This leads to an error
during compilation, since declaration and definition of fmtnum differ.


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

On the local Solaris-2.5/SPARC-1, the commands

./configure --enable-locale --with-perl; make

result in the problem described.


If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------

Changing the declaration (around line 119 in the file) to

-- snip, snip --
#ifndef HAVE_LONG_LONG_INT_64
static void fmtnum __P((long value, int base, int dosign, int ljust, int len, int zpad));
#else
static void fmtnum __P((long_long value, int base, int dosign, int ljust, int len, int zpad));
#endif
-- snip, snip --


and the (head of the) definition (around line 339) to

-- snip, snip --
#ifndef HAVE_LONG_LONG_INT_64
static void fmtnum __P((long value, int base, int dosign, int ljust, int len, int zpad))
#else
static void fmtnum __P((long_long value, int base, int dosign, int ljust, int len, int zpad))
#endif
{
-- snip, snip --

solves the compilation problem. In addition, the regression test
reports "ok" for int8.

PostgreSQL is a very impressive product.

Best wishes for the New Year,

Regards,

Yours

Ernst Molitor

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

Предыдущее
От: "Michael Leun"
Дата:
Сообщение: Bug in pg_dump?!
Следующее
От: Torsten Knodt
Дата:
Сообщение: PostGresSQL-6.4 backend killed connection to PSQL