require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_SYS_IEEE754_H_)) {
    eval 'sub _SYS_IEEE754_H_ () {1;}' unless defined(&_SYS_IEEE754_H_);
    require 'machine/endian.ph';
    eval 'sub SNG_EXPBITS () {8;}' unless defined(&SNG_EXPBITS);
    eval 'sub SNG_FRACBITS () {23;}' unless defined(&SNG_FRACBITS);
    if((defined(&_BYTE_ORDER) ? &_BYTE_ORDER : undef) == (defined(&_BIG_ENDIAN) ? &_BIG_ENDIAN : undef)) {
    } else {
    }
    eval 'sub DBL_EXPBITS () {11;}' unless defined(&DBL_EXPBITS);
    eval 'sub DBL_FRACHBITS () {20;}' unless defined(&DBL_FRACHBITS);
    eval 'sub DBL_FRACLBITS () {32;}' unless defined(&DBL_FRACLBITS);
    eval 'sub DBL_FRACBITS () {( &DBL_FRACHBITS +  &DBL_FRACLBITS);}' unless defined(&DBL_FRACBITS);
    if((defined(&_BYTE_ORDER) ? &_BYTE_ORDER : undef) == (defined(&_BIG_ENDIAN) ? &_BIG_ENDIAN : undef)) {
    } else {
    }
    if((defined(&__HAVE_LONG_DOUBLE) ? &__HAVE_LONG_DOUBLE : undef) + 0== 128) {
	eval 'sub EXT_EXPBITS () {15;}' unless defined(&EXT_EXPBITS);
	eval 'sub EXT_FRACHBITS () {48;}' unless defined(&EXT_FRACHBITS);
	eval 'sub EXT_FRACLBITS () {64;}' unless defined(&EXT_FRACLBITS);
	eval 'sub EXT_FRACBITS () {( &EXT_FRACLBITS +  &EXT_FRACHBITS);}' unless defined(&EXT_FRACBITS);
	eval 'sub EXT_TO_ARRAY32 {
	    my($u, $a) = @_;
    	    eval q( &do { ($a)[0] = ( &uint32_t)(($u). ($extu_ext->{ext_fracl}) >> 0); ($a)[1] = ( &uint32_t)(($u). ($extu_ext->{ext_fracl}) >> 32); ($a)[2] = ( &uint32_t)(($u). ($extu_ext->{ext_frach}) >> 0); ($a)[3] = ( &uint32_t)(($u). ($extu_ext->{ext_frach}) >> 32); }  &while( 0));
	}' unless defined(&EXT_TO_ARRAY32);
	if((defined(&_BYTE_ORDER) ? &_BYTE_ORDER : undef) == (defined(&_BIG_ENDIAN) ? &_BIG_ENDIAN : undef)) {
	} else {
	}
    }
    eval 'sub SNG_EXP_INFNAN () {255;}' unless defined(&SNG_EXP_INFNAN);
    eval 'sub DBL_EXP_INFNAN () {2047;}' unless defined(&DBL_EXP_INFNAN);
    if((defined(&__HAVE_LONG_DOUBLE) ? &__HAVE_LONG_DOUBLE : undef) + 0== 128) {
	eval 'sub EXT_EXP_INFNAN () {0x7fff;}' unless defined(&EXT_EXP_INFNAN);
    }
    eval 'sub SNG_EXP_BIAS () {127;}' unless defined(&SNG_EXP_BIAS);
    eval 'sub DBL_EXP_BIAS () {1023;}' unless defined(&DBL_EXP_BIAS);
    if((defined(&__HAVE_LONG_DOUBLE) ? &__HAVE_LONG_DOUBLE : undef) + 0== 128) {
	eval 'sub EXT_EXP_BIAS () {16383;}' unless defined(&EXT_EXP_BIAS);
    }
    eval 'sub sngu_sign () { ($sngu_sng->{sng_sign});}' unless defined(&sngu_sign);
    eval 'sub sngu_exp () { ($sngu_sng->{sng_exp});}' unless defined(&sngu_exp);
    eval 'sub sngu_frac () { ($sngu_sng->{sng_frac});}' unless defined(&sngu_frac);
    eval 'sub SNGU_ZEROFRAC_P {
        my($u) = @_;
	    eval q((($u). &sngu_frac != 0));
    }' unless defined(&SNGU_ZEROFRAC_P);
    eval 'sub dblu_sign () { ($dblu_dbl->{dbl_sign});}' unless defined(&dblu_sign);
    eval 'sub dblu_exp () { ($dblu_dbl->{dbl_exp});}' unless defined(&dblu_exp);
    eval 'sub dblu_frach () { ($dblu_dbl->{dbl_frach});}' unless defined(&dblu_frach);
    eval 'sub dblu_fracl () { ($dblu_dbl->{dbl_fracl});}' unless defined(&dblu_fracl);
    eval 'sub DBLU_ZEROFRAC_P {
        my($u) = @_;
	    eval q(((($u). &dblu_frach|($u). &dblu_fracl) != 0));
    }' unless defined(&DBLU_ZEROFRAC_P);
    if((defined(&__HAVE_LONG_DOUBLE) ? &__HAVE_LONG_DOUBLE : undef) + 0== 128) {
	eval 'sub extu_exp () { ($extu_ext->{ext_exp});}' unless defined(&extu_exp);
	eval 'sub extu_sign () { ($extu_ext->{ext_sign});}' unless defined(&extu_sign);
	eval 'sub extu_fracl () { ($extu_ext->{ext_fracl});}' unless defined(&extu_fracl);
	eval 'sub extu_frach () { ($extu_ext->{ext_frach});}' unless defined(&extu_frach);
	eval 'sub EXTU_ZEROFRAC_P {
	    my($u) = @_;
    	    eval q(((($u). &extu_frach|($u). &extu_fracl) != 0));
	}' unless defined(&EXTU_ZEROFRAC_P);
	unless(defined(&LDBL_NBIT)) {
	    eval 'sub LDBL_IMPLICIT_NBIT () {1;}' unless defined(&LDBL_IMPLICIT_NBIT);
	}
    }
}
1;
