backport workaround for OpenBSD compiler bug

REL8_1_STABLE
Andrew Dunstan 20 years ago
parent 33e125cc0b
commit b243d39456
  1. 22
      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;

Loading…
Cancel
Save