Patch for PostgreSQL 7.0.3 to compile on Tru64 UNIX v5.0A with Compaq C T6.4-212 (dtk)

Started by Douglas Carmichaelover 25 years ago4 messagespatches
Jump to latest
#1Douglas Carmichael
dcarmich@mail.ourservers.net

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

Your name : Douglas Carmichael
Your email address : dcarmich@ourservers.net

System Configuration
---------------------
Architecture (example: Intel Pentium) : DEC/Compaq Alpha

Operating System (example: Linux 2.0.26 ELF) : Compaq Tru64 UNIX v5.0A rev 1094

PostgreSQL version (example: PostgreSQL-7.0): PostgreSQL-7.0.3

Compiler used (example: gcc 2.8.0) : Compaq C T6.4-212 (dtk)

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

I have patches to src/backend/utils/adt/float.c and
src/backend/utils/adt/numeric.c to get PostgreSQL 7.0.3 to compile on Tru64
v5.0A with Compaq C T6.4-212 (dtk).

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

N/A

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

diff -cr postgresql-7.0.3_old/src/backend/utils/adt/float.c postgresql-7.0.3/src/backend/utils/adt/float.c
*** postgresql-7.0.3_old/src/backend/utils/adt/float.c	Wed Apr 12 12:15:49 2000
--- postgresql-7.0.3/src/backend/utils/adt/float.c	Fri Apr 13 22:13:10 2001
***************
*** 68,74 ****
  #include "utils/builtins.h"

#ifndef NAN
! #define NAN (0.0/0.0)
#endif

  #ifndef SHRT_MAX
--- 68,74 ----
  #include "utils/builtins.h"

#ifndef NAN
! #define NAN 0
#endif

  #ifndef SHRT_MAX
diff -cr postgresql-7.0.3_old/src/backend/utils/adt/numeric.c postgresql-7.0.3/src/backend/utils/adt/numeric.c
*** postgresql-7.0.3_old/src/backend/utils/adt/numeric.c	Wed Apr 12 12:15:50 2000
--- postgresql-7.0.3/src/backend/utils/adt/numeric.c	Fri Apr 13 22:15:55 2001
***************
*** 41,47 ****
  #endif

#ifndef NAN
! #define NAN (0.0/0.0)
#endif

--- 41,47 ----
  #endif

#ifndef NAN
! #define NAN 0
#endif

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Douglas Carmichael (#1)
Re: Patch for PostgreSQL 7.0.3 to compile on Tru64 UNIX v5.0A with Compaq C T6.4-212 (dtk)

Douglas Carmichael <dcarmich@chef.ourservers.net> writes:

I have patches to src/backend/utils/adt/float.c and
src/backend/utils/adt/numeric.c to get PostgreSQL 7.0.3 to compile on Tru64
v5.0A with Compaq C T6.4-212 (dtk).

I don't believe this patch is either correct (NaN is *not* the same as
zero) or necessary --- we have reports that 7.1 builds out of the box on
Tru64, and no such hack is used.

regards, tom lane

#3Bruce Momjian
bruce@momjian.us
In reply to: Douglas Carmichael (#1)
Re: Patch for PostgreSQL 7.0.3 to compile on Tru64 UNIX v5.0A with Compaq C T6.4-212 (dtk)

Please try 7.1. It should work fine.

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

Your name : Douglas Carmichael
Your email address : dcarmich@ourservers.net

System Configuration
---------------------
Architecture (example: Intel Pentium) : DEC/Compaq Alpha

Operating System (example: Linux 2.0.26 ELF) : Compaq Tru64 UNIX v5.0A rev 1094

PostgreSQL version (example: PostgreSQL-7.0): PostgreSQL-7.0.3

Compiler used (example: gcc 2.8.0) : Compaq C T6.4-212 (dtk)

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

I have patches to src/backend/utils/adt/float.c and
src/backend/utils/adt/numeric.c to get PostgreSQL 7.0.3 to compile on Tru64
v5.0A with Compaq C T6.4-212 (dtk).

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

N/A

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

diff -cr postgresql-7.0.3_old/src/backend/utils/adt/float.c postgresql-7.0.3/src/backend/utils/adt/float.c
*** postgresql-7.0.3_old/src/backend/utils/adt/float.c	Wed Apr 12 12:15:49 2000
--- postgresql-7.0.3/src/backend/utils/adt/float.c	Fri Apr 13 22:13:10 2001
***************
*** 68,74 ****
#include "utils/builtins.h"

#ifndef NAN
! #define NAN (0.0/0.0)
#endif

#ifndef SHRT_MAX
--- 68,74 ----
#include "utils/builtins.h"

#ifndef NAN
! #define NAN 0
#endif

#ifndef SHRT_MAX
diff -cr postgresql-7.0.3_old/src/backend/utils/adt/numeric.c postgresql-7.0.3/src/backend/utils/adt/numeric.c
*** postgresql-7.0.3_old/src/backend/utils/adt/numeric.c	Wed Apr 12 12:15:50 2000
--- postgresql-7.0.3/src/backend/utils/adt/numeric.c	Fri Apr 13 22:15:55 2001
***************
*** 41,47 ****
#endif

#ifndef NAN
! #define NAN (0.0/0.0)
#endif

--- 41,47 ----
#endif

#ifndef NAN
! #define NAN 0
#endif

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
#4Peter Eisentraut
peter_e@gmx.net
In reply to: Douglas Carmichael (#1)
Re: Patch for PostgreSQL 7.0.3 to compile on Tru64 UNIX v5.0A with Compaq C T6.4-212 (dtk)

Douglas Carmichael writes:

I have patches to src/backend/utils/adt/float.c and
src/backend/utils/adt/numeric.c to get PostgreSQL 7.0.3 to compile on Tru64
v5.0A with Compaq C T6.4-212 (dtk).

Maybe you need to pass -ieee to the compiler?

--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter