diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2006-06-17 14:49:02 +0000 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2006-06-17 14:49:02 +0000 |
commit | b243d3945647002321353d1c4360c1f684a07bf7 (patch) | |
tree | bf3053ad37f26bfe822b205c664463dee671010b | |
parent | 33e125cc0b19bcb1111feb00fce8731898459e31 (diff) | |
download | postgresql-b243d3945647002321353d1c4360c1f684a07bf7.tar.gz postgresql-b243d3945647002321353d1c4360c1f684a07bf7.zip |
backport workaround for OpenBSD compiler bug
-rw-r--r-- | contrib/seg/segparse.y | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/contrib/seg/segparse.y b/contrib/seg/segparse.y index 8a3b0b0160c..e847a376395 100644 --- a/contrib/seg/segparse.y +++ b/contrib/seg/segparse.y @@ -18,10 +18,9 @@ void seg_yyerror(const char *message); int seg_yyparse( void *result ); - float seg_atof( char *value ); + static float seg_atof(char *value); - long threshold; - char strbuf[25] = { + static char strbuf[25] = { '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', @@ -108,30 +107,39 @@ range: boundary: SEGFLOAT { + /* temp variable avoids a gcc 3.3.x bug on Sparc64 */ + float val = seg_atof($1); + $$.ext = '\0'; $$.sigd = significant_digits($1); - $$.val = seg_atof($1); + $$.val = val; } | EXTENSION SEGFLOAT { + /* temp variable avoids a gcc 3.3.x bug on Sparc64 */ + float val = seg_atof($2); + $$.ext = $1[0]; $$.sigd = significant_digits($2); - $$.val = seg_atof($2); + $$.val = val; } ; deviation: SEGFLOAT { + /* temp variable avoids a gcc 3.3.x bug on Sparc64 */ + float val = seg_atof($1); + $$.ext = '\0'; $$.sigd = significant_digits($1); - $$.val = seg_atof($1); + $$.val = val; } ; %% -float +static float seg_atof(char *value) { Datum datum; |