require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_MIPS_LIMITS_H_)) {
    eval 'sub _MIPS_LIMITS_H_ () {1;}' unless defined(&_MIPS_LIMITS_H_);
    require 'sys/cdefs.ph';
    eval 'sub CHAR_BIT () {8;}' unless defined(&CHAR_BIT);
    eval 'sub MB_LEN_MAX () {6;}' unless defined(&MB_LEN_MAX);
    eval 'sub SCHAR_MAX () {0x7f;}' unless defined(&SCHAR_MAX);
    eval 'sub SCHAR_MIN () {(-0x7f-1);}' unless defined(&SCHAR_MIN);
    eval 'sub UCHAR_MAX () {0xff;}' unless defined(&UCHAR_MAX);
    eval 'sub CHAR_MAX () {0x7f;}' unless defined(&CHAR_MAX);
    eval 'sub CHAR_MIN () {(-0x7f-1);}' unless defined(&CHAR_MIN);
    eval 'sub USHRT_MAX () {0xffff;}' unless defined(&USHRT_MAX);
    eval 'sub SHRT_MAX () {0x7fff;}' unless defined(&SHRT_MAX);
    eval 'sub SHRT_MIN () {(-0x7fff-1);}' unless defined(&SHRT_MIN);
    eval 'sub UINT_MAX () {0xffffffff;}' unless defined(&UINT_MAX);
    eval 'sub INT_MAX () {0x7fffffff;}' unless defined(&INT_MAX);
    eval 'sub INT_MIN () {(-0x7fffffff-1);}' unless defined(&INT_MIN);
    eval 'sub UID_MAX () { &UINT_MAX;}' unless defined(&UID_MAX);
    eval 'sub GID_MAX () { &UINT_MAX;}' unless defined(&GID_MAX);
    if((defined(&__POSIX_VISIBLE) ? &__POSIX_VISIBLE : 0) || (defined(&__XPG_VISIBLE) ? &__XPG_VISIBLE : 0)) {
	unless(defined(&SIZE_MAX)) {
	    eval 'sub SIZE_MAX () { &ULONG_MAX;}' unless defined(&SIZE_MAX);
	}
	eval 'sub SSIZE_MAX () { &LONG_MAX;}' unless defined(&SSIZE_MAX);
    }
    if((defined(&__BSD_VISIBLE) ? &__BSD_VISIBLE : 0)) {
	eval 'sub SIZE_T_MAX () { &ULONG_MAX;}' unless defined(&SIZE_T_MAX);
	eval 'sub UQUAD_MAX () {(( &u_quad_t)0-1);}' unless defined(&UQUAD_MAX);
	eval 'sub QUAD_MAX () {(( &quad_t)( &UQUAD_MAX >> 1));}' unless defined(&QUAD_MAX);
	eval 'sub QUAD_MIN () {(- &QUAD_MAX-1);}' unless defined(&QUAD_MIN);
    }
}
1;
