Compile problems with 6.5 on RedHat 6.0 2.2.10

Поиск
Список
Период
Сортировка
От Alex Howansky
Тема Compile problems with 6.5 on RedHat 6.0 2.2.10
Дата
Msg-id Pine.LNX.3.95.990615122025.30329A-200000@mel.litton-wed.com
обсуждение исходный текст
Ответы Re: [PORTS] Compile problems with 6.5 on RedHat 6.0 2.2.10  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список pgsql-ports
Your name               : Alex Howansky
Your email address      : alex@wankwood.com

System Configuration
---------------------
  Architecture (example: Intel Pentium)         : PII
  Operating System (example: Linux 2.0.26 ELF)  : RedHat 6.0 2.2.10
  PostgreSQL version (example: PostgreSQL-6.5)  : PostgreSQL-6.5
  Compiler used (example:  gcc 2.8.0)           : egcs-2.91.66

Please enter a FULL description of your problem:
------------------------------------------------
Compilation failed on these three files, complaining about MAXINT being
undeclared:
  src/backend/optimizer/path/costsize.c
  src/backend/utils/adt/date.c
  src/backend/utils/adt/float.c

If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------
I edited the three files so that the section that defines MAXINT matched
the definition in src/backend/optimizer/geqo/geqo_eval.c. My patch is
attached.

--
Alex Howansky
Wankwood Associates
http://www.wankwood.com

*** src/backend/optimizer/path/costsize.c.orig    Tue Jun 15 11:17:12 1999
--- src/backend/optimizer/path/costsize.c    Tue Jun 15 11:54:19 1999
***************
*** 22,30 ****
  #define MAXINT          INT_MAX
  #endif
  #else
- #ifdef HAVE_VALUES_H
  #include <values.h>
- #endif
  #endif
  
  #include "nodes/relation.h"
--- 22,28 ----
*** src/backend/utils/adt/date.c.orig    Tue Jun 15 11:24:16 1999
--- src/backend/utils/adt/date.c    Tue Jun 15 11:58:48 1999
***************
*** 37,42 ****
--- 37,47 ----
  #endif
  #ifdef HAVE_LIMITS_H
  #include <limits.h>
+ #ifndef MAXINT
+ #define MAXINT INT_MAX
+ #endif
+ #else
+ #include <values.h>
  #endif
  #include "access/xact.h"
  #include "utils/builtins.h"        /* where function declarations go */
*** src/backend/utils/adt/float.c.orig    Tue Jun 15 11:26:58 1999
--- src/backend/utils/adt/float.c    Tue Jun 15 11:58:52 1999
***************
*** 58,63 ****
--- 58,68 ----
  #include "postgres.h"
  #ifdef HAVE_LIMITS_H
  #include <limits.h>
+ #ifndef MAXINT
+ #define MAXINT INT_MAX
+ #endif
+ #else
+ #include <values.h>
  #endif
  #include "fmgr.h"
  #include "utils/builtins.h"        /* for ftod() prototype */

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

Предыдущее
От: "Hub.Org News Admin"
Дата:
Сообщение: ...
Следующее
От: haglin@theory.CS.Mankato.MSUS.EDU
Дата:
Сообщение: My Experience