require '_h2ph_pre.ph';

if(defined(&_ERRNO_H)) {
    undef(&EDOM) if defined(&EDOM);
    undef(&EILSEQ) if defined(&EILSEQ);
    undef(&ERANGE) if defined(&ERANGE);
    require 'linux/errno.ph';
    eval 'sub ENOTSUP () { &EOPNOTSUPP;}' unless defined(&ENOTSUP);
    unless(defined(&ECANCELED)) {
	eval 'sub ECANCELED () {125;}' unless defined(&ECANCELED);
    }
    unless(defined(&__ASSEMBLER__)) {
	if(!defined (defined(&_LIBC) ? &_LIBC : 0) || defined (defined(&_LIBC_REENTRANT) ? &_LIBC_REENTRANT : 0)) {
	    eval 'sub errno () {(* &__errno_location ());}' unless defined(&errno);
	}
    }
}
if(!defined (defined(&_ERRNO_H) ? &_ERRNO_H : 0)  && defined (defined(&__need_Emath) ? &__need_Emath : 0)) {
    eval 'sub EDOM () {33;}' unless defined(&EDOM);
    eval 'sub EILSEQ () {84;}' unless defined(&EILSEQ);
    eval 'sub ERANGE () {34;}' unless defined(&ERANGE);
}
1;
