Skip site navigation (1) Skip section navigation (2)

Re: pgsql-server/src/backend/postmaster postmaster.c

From: Neil Conway <neilc(at)samurai(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql-server/src/backend/postmaster postmaster.c
Date: 2003-11-11 03:20:13
Message-ID: 87d6bzwpzm.fsf@mailbox.samurai.com (view raw or flat)
Thread:
Lists: pgsql-committers
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> 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


In response to

Responses

pgsql-committers by date

Next:From: Bruce MomjianDate: 2003-11-11 03:53:33
Subject: pgsql-server/src/backend Makefile utils/init/f ...
Previous:From: Bruce MomjianDate: 2003-11-11 03:12:39
Subject: Re: pgsql-server/src/backend/postmaster postmaster.c

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group