Re: [PORTS] Compile problems with 6.5 on RedHat 6.0 2.2.10

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: Alex Howansky <alex(at)wankwood(dot)com>
Cc: pgsql-ports(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: [PORTS] Compile problems with 6.5 on RedHat 6.0 2.2.10
Date: 1999-09-21 20:57:53
Message-ID: 199909212057.QAA17244@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-ports

Applied with minor cleanups. This will appear in 6.6.

>
> Your name : Alex Howansky
> Your email address : alex(at)wankwood(dot)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
>
Content-Description:

> *** 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 */
>

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-ports by date

  From Date Subject
Next Message Bruce Momjian 1999-09-21 21:29:32 Re: [PORTS] Port Bug Report: calling notify in pl/pgsql proc causes core dump
Previous Message Piotr Klaban 1999-09-21 10:09:20 Re: problem with postgresql-6.5.1-[1|2].i386.rpm