1
0
mirror of https://github.com/postgres/postgres.git synced 2025-04-29 13:56:47 +03:00

backport workaround for OpenBSD compiler bug

This commit is contained in:
Andrew Dunstan 2006-06-17 14:49:02 +00:00
parent 33e125cc0b
commit b243d39456

View File

@ -18,10 +18,9 @@
void seg_yyerror(const char *message); void seg_yyerror(const char *message);
int seg_yyparse( void *result ); int seg_yyparse( void *result );
float seg_atof( char *value ); static float seg_atof(char *value);
long threshold; static char strbuf[25] = {
char strbuf[25] = {
'0', '0', '0', '0', '0', '0', '0', '0', '0', '0',
'0', '0', '0', '0', '0', '0', '0', '0', '0', '0',
'0', '0', '0', '0', '0', '0', '0', '0', '0', '0',
@ -108,30 +107,39 @@ range:
boundary: boundary:
SEGFLOAT { SEGFLOAT {
/* temp variable avoids a gcc 3.3.x bug on Sparc64 */
float val = seg_atof($1);
$$.ext = '\0'; $$.ext = '\0';
$$.sigd = significant_digits($1); $$.sigd = significant_digits($1);
$$.val = seg_atof($1); $$.val = val;
} }
| |
EXTENSION SEGFLOAT { EXTENSION SEGFLOAT {
/* temp variable avoids a gcc 3.3.x bug on Sparc64 */
float val = seg_atof($2);
$$.ext = $1[0]; $$.ext = $1[0];
$$.sigd = significant_digits($2); $$.sigd = significant_digits($2);
$$.val = seg_atof($2); $$.val = val;
} }
; ;
deviation: deviation:
SEGFLOAT { SEGFLOAT {
/* temp variable avoids a gcc 3.3.x bug on Sparc64 */
float val = seg_atof($1);
$$.ext = '\0'; $$.ext = '\0';
$$.sigd = significant_digits($1); $$.sigd = significant_digits($1);
$$.val = seg_atof($1); $$.val = val;
} }
; ;
%% %%
float static float
seg_atof(char *value) seg_atof(char *value)
{ {
Datum datum; Datum datum;