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

Re: Re: Cygwin PostgreSQL postmaster abort problem

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Jason Tishler <Jason(dot)Tishler(at)dothill(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-ports(at)postgresql(dot)org>
Subject: Re: Re: Cygwin PostgreSQL postmaster abort problem
Date: 2001-01-02 17:00:26
Message-ID: Pine.LNX.4.30.0101021749560.758-100000@peter.localdomain (view raw or flat)
Thread:
Lists: pgsql-ports
Jason Tishler writes:

> > >         * src/backend/utils/error/elog.c: Add conditional compilation to deal
> > >         with sys_nerr/_sys_nerr inconsistencies.
> > >         * src/backend/utils/error/exc.c: Ditto.
> >
> > This is the wrong place.
>
> Sorry, but I'm not that intimate with the PostgreSQL code so when I saw
> the following in elog.c and exc.c:
>
>     #ifdef __CYGWIN__
>     # define sys_nerr _sys_nerr
>     #endif
>     extern int  sys_nerr;

I guess there were some people before you that weren't that intimate with
the code either.  ;-)

> I thought that it was reasonable to change it to:
>
>     #ifdef __CYGWIN__
>     # define sys_nerr _sys_nerr
>     #else
>     extern int  sys_nerr;
>     #endif

I think if Cygwin's strerror() copes with out-of-range errno's, then we
can just leave of the whole business completely.

> > You should look into src/include/port/win.h to fix this.
>
> How is this file suppose to be used?  When I do a find, I get the
> following:

> Hence, no source file is currently including it.

src/include/port/anything.h is symlinked to src/include/port.h when you
run configure.  port.h is included by config.h, which is included by c.h,
which is included by postgres.h, which is included by just about
everything.  (Note to self:  Are that many levels really necessary?)

> > >         * src/utils/dllinit.c: Update to be consistent with Cygwin Net Release.
> >
> > Will this break old releases of Cygwin?
>
> I don't know since I don't have b20.1 or older lying around anymore --
> but my guess is yes.  However, without this change PostgreSQL does *not*
> build OOTB with the current Cygwin release.

Well, it's not like I really care, as I obviously don't use Cygwin, but
dropping support for old OS version just because new ones came out is not
that cool, unless you can make a really good argument that no one in their
right mind would use that old version anymore.

> Note that this file is no longer needed with current Cygwin releases.
> Cygwin provides its own "DllMain" now.  May be a compromise would be to
> have make check the Cygwin version and eliminate dllinit.c from the
> build if it is not necessary.  I am willing to submit such a patch if it
> was deemed reasonable.

Sounds great to me.  Maybe the CYGWIN_VERSION_API_MAJOR/MINOR symbols
could be used to #ifdef out the entire dllinit.c if not needed?  (A more
"correct" approach would probably be to check for the existance of
DllMain, but I'm not sure if you/we are up to that at this point.)

-- 
Peter Eisentraut      peter_e(at)gmx(dot)net       http://yi.org/peter-e/


In response to

Responses

pgsql-ports by date

Next:From: Jason TishlerDate: 2001-01-02 17:37:32
Subject: Cygwin PostgreSQL DLL PATH (regression test) Problem
Previous:From: HorĂ¡k DanielDate: 2001-01-02 13:08:13
Subject: RE: Porting to Win2k: ./configure failed

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