diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-03-15 03:29:22 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-03-15 03:29:22 +0000 |
| commit | 1bc2d544b979164a276f9e6052f0b6d23af59b60 (patch) | |
| tree | 5373cea0da5a2587783dd5b805c90427143c7555 /contrib/seg | |
| parent | 89ab5c4abf48de8156b9284dda869f9ea2b2ad44 (diff) | |
| download | postgresql-1bc2d544b979164a276f9e6052f0b6d23af59b60.tar.gz | |
Localize our dependencies on the way to create NAN or INFINITY.
Per recent proposal to pghackers.
Diffstat (limited to 'contrib/seg')
| -rw-r--r-- | contrib/seg/seg.c | 4 | ||||
| -rw-r--r-- | contrib/seg/segparse.y | 8 |
2 files changed, 4 insertions, 8 deletions
diff --git a/contrib/seg/seg.c b/contrib/seg/seg.c index c26f9d27cd..b04441b1ed 100644 --- a/contrib/seg/seg.c +++ b/contrib/seg/seg.c @@ -755,7 +755,7 @@ seg_cmp(SEG * a, SEG * b) * a->lower == b->lower, so consider type of boundary. * * A '-' lower bound is < any other kind (this could only be relevant if - * -HUGE is used as a regular data value). A '<' lower bound is < any + * -HUGE_VAL is used as a regular data value). A '<' lower bound is < any * other kind except '-'. A '>' lower bound is > any other kind. */ if (a->l_ext != b->l_ext) @@ -813,7 +813,7 @@ seg_cmp(SEG * a, SEG * b) * a->upper == b->upper, so consider type of boundary. * * A '-' upper bound is > any other kind (this could only be relevant if - * HUGE is used as a regular data value). A '<' upper bound is < any + * HUGE_VAL is used as a regular data value). A '<' upper bound is < any * other kind. A '>' upper bound is > any other kind except '-'. */ if (a->u_ext != b->u_ext) diff --git a/contrib/seg/segparse.y b/contrib/seg/segparse.y index d8de412081..9ed9dcbdbd 100644 --- a/contrib/seg/segparse.y +++ b/contrib/seg/segparse.y @@ -6,10 +6,6 @@ #include <math.h> #include "segdata.h" - -#ifdef __CYGWIN__ -#define HUGE HUGE_VAL -#endif /* __CYGWIN__ */ #undef yylex /* falure to redefine yylex will result in calling the */ #define yylex seg_yylex /* wrong scanner when running inside postgres backend */ @@ -86,7 +82,7 @@ range: | boundary RANGE { ((SEG *)result)->lower = $1.val; - ((SEG *)result)->upper = HUGE; + ((SEG *)result)->upper = HUGE_VAL; ((SEG *)result)->l_sigd = $1.sigd; ((SEG *)result)->u_sigd = 0; ((SEG *)result)->l_ext = ( $1.ext ? $1.ext : '\0' ); @@ -94,7 +90,7 @@ range: } | RANGE boundary { - ((SEG *)result)->lower = -HUGE; + ((SEG *)result)->lower = -HUGE_VAL; ((SEG *)result)->upper = $2.val; ((SEG *)result)->l_sigd = 0; ((SEG *)result)->u_sigd = $2.sigd; |
