]> granicus.if.org Git - postgresql/commitdiff
From: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>
authorMarc G. Fournier <scrappy@hub.org>
Sun, 16 Mar 1997 19:05:00 +0000 (19:05 +0000)
committerMarc G. Fournier <scrappy@hub.org>
Sun, 16 Mar 1997 19:05:00 +0000 (19:05 +0000)
Subject: [HACKERS] Patches for 970316 compilation

I made a small pre-emptive change in the new datetime code to eliminate
calls to infnan(). Hopefully this will make Solaris (and probably other
non-GNUlib) systems happier. Didn't find fe-connect.h in the 970316
distribution, so made one up. Also, one of the test routines needs an
update for the geo-decls.h -> geo_decls.h name change.
Patches appear below...

src/backend/utils/adt/dt.c
src/interfaces/libpq++/examples/testlibpq5.cc

index 754c791e82d7e50d03c74a7fde31193da71671a7..815dc9915a6ac007f70457b4562d02ed7ed5540a 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.5 1997/03/16 05:32:03 scrappy Exp $
+ *    $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.6 1997/03/16 19:03:20 scrappy Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -39,15 +39,15 @@ extern char *tzname[2];
 extern long int timezone;
 extern int daylight;
 
-#define JTIME_INVALID          (infnan(0))
+#define JTIME_INVALID          (NAN)
 #define DATETIME_INVALID(j)    {*j = JTIME_INVALID;}
 #define DATETIME_IS_INVALID(j) (isnan(*j))
 
-#define JTIME_NOBEGIN          (infnan(-ERANGE))
+#define JTIME_NOBEGIN          (-HUGE_VAL)
 #define DATETIME_NOBEGIN(j)    {*j = JTIME_NOBEGIN;}
 #define DATETIME_IS_NOBEGIN(j) (*j == JTIME_NOBEGIN)
 
-#define JTIME_NOEND            (infnan(ERANGE))
+#define JTIME_NOEND            (HUGE_VAL)
 #define DATETIME_NOEND(j)      {*j = JTIME_NOEND;}
 #define DATETIME_IS_NOEND(j)   (*j == JTIME_NOEND)
 
index 8c299fe73bec1bdd2fe4427888a3547b9306433a..1b6d91bbf4c75dfd89c6e9bb4519475c82a325b3 100644 (file)
@@ -31,7 +31,7 @@ tuple 1: got
 #include <stdlib.h>
 extern "C" {
 #include "postgres.h"          // for Postgres types
-#include "utils/geo-decls.h" // for the POLYGON type
+#include "utils/geo_decls.h" // for the POLYGON type
 }
 
 main()