Re: Cygwin PostgreSQL CVS Patch

From: Jason Tishler <Jason(dot)Tishler(at)dothill(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-ports(at)postgresql(dot)org
Subject: Re: Cygwin PostgreSQL CVS Patch
Date: 2001-01-18 17:59:45
Message-ID: 20010118125945.F1092@dothill.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-ports

On Tue, Jan 16, 2001 at 04:49:18PM +0100, Peter Eisentraut wrote:
> Jason Tishler writes:
>
> > diff -u -r1.155 config.h.in
> > --- src/include/config.h.in 2001/01/09 18:40:15 1.155
> > +++ src/include/config.h.in 2001/01/16 14:20:10
> > @@ -228,7 +228,7 @@
> > /*
> > * Define this if your operating system supports AF_UNIX family sockets.
> > */
> > -#if !defined(__CYGWIN__) && !defined(__QNX__) && !defined(__BEOS__)
> > +#if !defined(__QNX__) && !defined(__BEOS__)
> > # define HAVE_UNIX_SOCKETS 1
> > #endif
>
> I could have figured as much ;-) but after we went through the trouble of
> coping with old Cygwin's in dllinit.c we should do the same here. The
> question is again how to do that.

After seeing that config.h.in already included os.h, I thought that the
following was a reasonable way to improved the above to deal with b20.1
and the Net Release:

#if !(defined (__CYGWIN__) && CYGWIN_VERSION_DLL_MAJOR < 1001) && \
!defined(__QNX__) && !defined(__BEOS__)
# define HAVE_UNIX_SOCKETS 1
#endif

Unfortunately I didn't realize that os.h is included *after* the
AF_UNIX test, so the above will not work until cygwin/version.h is
included prior the test.

As I see it, I have two choices:

1. Add the following cruft right before the above:

#ifdef __CYGWIN__
#include <cygwin/version.h>
#endif

2. Move the including of os.h to somewhere before the above.

Any suggestions or guidance would be appreciated.

Thanks,
Jason

--
Jason Tishler
Director, Software Engineering Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp. Fax: +1 (732) 264-8798
82 Bethany Road, Suite 7 Email: Jason(dot)Tishler(at)dothill(dot)com
Hazlet, NJ 07730 USA WWW: http://www.dothill.com

In response to

Responses

Browse pgsql-ports by date

  From Date Subject
Next Message Tom Lane 2001-01-18 18:03:18 Re: Cygwin PostgreSQL CVS Patch
Previous Message Tom Lane 2001-01-18 17:59:00 Re: Cygwin PostgreSQL Regression Test Problems