require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_GLIBCXX_ATOMIC_WORD_H)) {
    eval 'sub _GLIBCXX_ATOMIC_WORD_H () {1;}' unless defined(&_GLIBCXX_ATOMIC_WORD_H);
    eval 'sub _GLIBCXX_READ_MEM_BARRIER () { &__asm  &__volatile ("isync":::"memory");}' unless defined(&_GLIBCXX_READ_MEM_BARRIER);
    if(defined(&__NO_LWSYNC__)) {
	eval 'sub _GLIBCXX_WRITE_MEM_BARRIER () { &__asm  &__volatile ("sync":::"memory");}' unless defined(&_GLIBCXX_WRITE_MEM_BARRIER);
    } else {
	eval 'sub _GLIBCXX_WRITE_MEM_BARRIER () { &__asm  &__volatile ("lwsync":::"memory");}' unless defined(&_GLIBCXX_WRITE_MEM_BARRIER);
    }
}
1;
