• Kirill Smelkov's avatar
    libgolang/gevent: Adjust to support Windows · 437bbd56
    Kirill Smelkov authored
    On Windows rthere is no fcntl
    
        golang/runtime\_runtime_gevent.cpp(4811): error C3861: 'S_ISBLK': identifier not found
        golang/runtime\_runtime_gevent.cpp(4823): error C2039: 'Fcntl': is not a member of 'golang::internal::syscall'
        .\golang/runtime/internal/syscall.h(36): note: see declaration of 'golang::internal::syscall'
        golang/runtime\_runtime_gevent.cpp(4823): error C2065: 'F_GETFL': undeclared identifier
        golang/runtime\_runtime_gevent.cpp(4823): error C3861: 'Fcntl': identifier not found
        golang/runtime\_runtime_gevent.cpp(4870): error C2065: 'O_ACCMODE': undeclared identifier
        golang/runtime\_runtime_gevent.cpp(4889): error C2039: 'Fcntl': is not a member of 'golang::internal::syscall'
        .\golang/runtime/internal/syscall.h(36): note: see declaration of 'golang::internal::syscall'
        golang/runtime\_runtime_gevent.cpp(4889): error C2065: 'F_SETFL': undeclared identifier
        golang/runtime\_runtime_gevent.cpp(4889): error C2065: 'O_NONBLOCK': undeclared identifier
        golang/runtime\_runtime_gevent.cpp(4889): error C3861: 'Fcntl': identifier not found
    
    and even if there would be gevent does not provide cooperative version
    of FileObject for non-POSIX platforms.
    
    -> Always use FileObjectThread on windows even for pipes.
    437bbd56
_runtime_gevent.pyx 12.8 KB