Re: sa_family_t in cygwin compile of cvs - Mailing list pgsql-hackers

From deststar
Subject Re: sa_family_t in cygwin compile of cvs
Date
Msg-id 3EEFADD6.9020402@blueyonder.co.uk
Whole thread Raw
In response to Re: sa_family_t in cygwin compile of cvs + regression failure  (Jason Tishler <jason@tishler.net>)
Responses Re: sa_family_t in cygwin compile of cvs
Re: sa_family_t in cygwin compile of cvs
List pgsql-hackers
Jason Tishler wrote:
> On Sun, Jun 15, 2003 at 04:54:21PM +0100, deststar wrote:
>
>>On cygwin sa_family_t was undeclared, adding the following line:
>>typedef unsigned short sa_family_t;
>>to both:
>>src/port/getaddrinfo.c
>>src/include/libpq/pqcomm.h
>
>
> Isn't the attached or fixing Cygwin itself a better approach?
>
>
Yes it does seem better, attached is a proposed patch to cygwin.h &
configure.in (incase cygwin gets it in future)
Have tested with make installcheck & it works fine.
If you see no problems I will sumit to patches
thanks,
- Stuart
*** src/include/port/cygwin.h.orig    Thu May 22 18:20:28 2003
--- src/include/port/cygwin.h    Tue Jun 17 22:31:04 2003
***************
*** 21,23 ****
--- 21,28 ----
  #else
  #define DLLIMPORT __declspec (dllimport)
  #endif
+
+ #ifndef HAVE_SA_FAMILY_T
+ typedef unsigned short sa_family_t;
+ #endif
+
*** configure.in.orig    Sun Jun 15 05:07:58 2003
--- configure.in    Tue Jun 17 22:22:24 2003
***************
*** 855,860 ****
--- 855,866 ----
  [$ac_includes_default
  #include <netinet/in.h>])

+ AC_CHECK_TYPE(sa_family_t,
+               [AC_DEFINE(HAVE_SA_FAMILY_T,1,[Cygwin does not have sa_family_t defined so test])],
+               [],
+           [$ac_includes_default
+               #include <netinet/in.h>])
+
  AC_CACHE_CHECK([for PS_STRINGS], [pgac_cv_var_PS_STRINGS],
  [AC_TRY_LINK(
  [#include <machine/vmparam.h>

pgsql-hackers by date:

Previous
From: Gavin Sherry
Date:
Subject: Re: O_DIRECT in freebsd
Next
From: Bruce Momjian
Date:
Subject: Re: sa_family_t in cygwin compile of cvs