require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_MACHINE_VARARGS_H_)) {
    eval 'sub _MACHINE_VARARGS_H_ () {1;}' unless defined(&_MACHINE_VARARGS_H_);
    require 'machine/stdarg.ph';
    if((defined(&__GNUC__) ? &__GNUC__ : undef) == 1) {
	eval 'sub __va_ellipsis () {1;}' unless defined(&__va_ellipsis);
    } else {
	eval 'sub __va_ellipsis () {...;}' unless defined(&__va_ellipsis);
    }
    eval 'sub va_alist () { &__builtin_va_alist;}' unless defined(&va_alist);
    eval 'sub va_dcl () {\'long __builtin_va_alist\';  &__va_ellipsis;}' unless defined(&va_dcl);
    undef(&va_start) if defined(&va_start);
    eval 'sub va_start {
        my($ap) = @_;
	    eval q((($ap) = *( &va_list *) &__builtin_saveregs(), ($ap). &pad = 0));
    }' unless defined(&va_start);
}
1;
