require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_GLIBCXX_GCC_GTHR_SINGLE_H)) {
    eval 'sub _GLIBCXX_GCC_GTHR_SINGLE_H () {1;}' unless defined(&_GLIBCXX_GCC_GTHR_SINGLE_H);
    eval 'sub __GTHREAD_ONCE_INIT () {0;}' unless defined(&__GTHREAD_ONCE_INIT);
    eval 'sub __GTHREAD_MUTEX_INIT () {0;}' unless defined(&__GTHREAD_MUTEX_INIT);
    eval 'sub __GTHREAD_MUTEX_INIT_FUNCTION {
        my($mx) = @_;
	    eval q( &do {}  &while (0));
    }' unless defined(&__GTHREAD_MUTEX_INIT_FUNCTION);
    eval 'sub __GTHREAD_RECURSIVE_MUTEX_INIT () {0;}' unless defined(&__GTHREAD_RECURSIVE_MUTEX_INIT);
    eval 'sub _GLIBCXX_UNUSED () { &__attribute__(( &__unused__));}' unless defined(&_GLIBCXX_UNUSED);
    if(defined(&_LIBOBJC)) {
    } else {
	eval 'sub __gthread_active_p {
	    my($void) = @_;
    	    eval q({ 0; });
	}' unless defined(&__gthread_active_p);
	eval 'sub __gthread_once () {
	    eval q(( &__gthread_once_t * &__once  &_GLIBCXX_UNUSED,  &void (* &__func) ( &void)  &_GLIBCXX_UNUSED) { 0; });
	}' unless defined(&__gthread_once);
	eval 'sub __gthread_key_create () {
	    eval q(( &__gthread_key_t * &__key  &_GLIBCXX_UNUSED,  &void (* &__func) ( &void *)  &_GLIBCXX_UNUSED) { 0; });
	}' unless defined(&__gthread_key_create);
	eval 'sub __gthread_getspecific {
	    my($_GLIBCXX_UNUSED) = @_;
    	    eval q({ 0; });
	}' unless defined(&__gthread_getspecific);
	eval 'sub __gthread_setspecific {
	    my($_GLIBCXX_UNUSED,$_GLIBCXX_UNUSED) = @_;
    	    eval q({ 0; });
	}' unless defined(&__gthread_setspecific);
	eval 'sub __gthread_mutex_destroy {
	    my($_GLIBCXX_UNUSED) = @_;
    	    eval q({ 0; });
	}' unless defined(&__gthread_mutex_destroy);
	eval 'sub __gthread_mutex_lock {
	    my($_GLIBCXX_UNUSED) = @_;
    	    eval q({ 0; });
	}' unless defined(&__gthread_mutex_lock);
	eval 'sub __gthread_mutex_trylock {
	    my($_GLIBCXX_UNUSED) = @_;
    	    eval q({ 0; });
	}' unless defined(&__gthread_mutex_trylock);
	eval 'sub __gthread_mutex_unlock {
	    my($_GLIBCXX_UNUSED) = @_;
    	    eval q({ 0; });
	}' unless defined(&__gthread_mutex_unlock);
	eval 'sub __gthread_recursive_mutex_lock {
	    my($__mutex) = @_;
    	    eval q({  &__gthread_mutex_lock ($__mutex); });
	}' unless defined(&__gthread_recursive_mutex_lock);
	eval 'sub __gthread_recursive_mutex_trylock {
	    my($__mutex) = @_;
    	    eval q({  &__gthread_mutex_trylock ($__mutex); });
	}' unless defined(&__gthread_recursive_mutex_trylock);
	eval 'sub __gthread_recursive_mutex_unlock {
	    my($__mutex) = @_;
    	    eval q({  &__gthread_mutex_unlock ($__mutex); });
	}' unless defined(&__gthread_recursive_mutex_unlock);
	eval 'sub __gthread_recursive_mutex_destroy {
	    my($__mutex) = @_;
    	    eval q({  &__gthread_mutex_destroy ($__mutex); });
	}' unless defined(&__gthread_recursive_mutex_destroy);
    }
    undef(&_GLIBCXX_UNUSED) if defined(&_GLIBCXX_UNUSED);
}
1;
