Bruce Momjian <[EMAIL PROTECTED]> writes:
> We define the variable only on Win32/BeOS.  Any ideas on how to do this
> better?

int
set_non_blocking(some_type socket)
{
    int ret;

#ifdef SOME_UNIX_PLATFORM
    ret  = ...;
#else

#ifdef SOME_WINDOWS_PLATFORM
    ret = ...;
#else
    ret = ...;
#endif

    return ret;
}

This function shouldn't be in the critical path for anything, so ISTM
that we can hide this platform-specific ugliness inside a function
without any harm.

-Neil


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to