Re: [HACKERS] ss_family in hba.c

From: Kurt Roeckx <Q(at)ping(dot)be>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>, pgsql-cygwin(at)postgreSQL(dot)org
Subject: Re: [HACKERS] ss_family in hba.c
Date: 2003-06-24 17:02:14
Message-ID: 20030624170214.GA20197@ping.be
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-cygwin pgsql-general pgsql-hackers pgsql-patches

On Mon, Jun 23, 2003 at 07:49:11PM -0400, Bruce Momjian wrote:
>
> I have applied a patch to CVS to fix the problem. It is all your patch,
> except for the part you got from me, which was wrong. :-(
>
> It took me a while to realize the subtlety of your patch. First, it
> removes the use of sa_family_t _except_ for cases that don't have
> SOCKADDR_STORAGE, where it is required. Second, it allows for a
> structure member named ss_family or __ss_family, tested via configure.
>
> This should fix most platforms. I am not sure how cygwin is going to
> handle this --- we might have to add a specific sa_family_t typedef for
> that platform --- MinGW does have sa_family_t, but probably doesn't need
> it anyway. Testing for the size of sa_family_t is possible via
> configure, but if only cygwin needs it, we can just hard-code that
> platform in the template files. Cygwin folks, would you test CVS and
> let me know.

There are probably other systems that don't have sa_family_t yet,
but they should be rather old. Even my Solaris 2.6 already seems
to have it.

What I was confused about is, is that cygwin seems to have a
struct sockaddr_storage in the first place (in winsock2.h). I'm
not sure what problem he really had since he only told it how he
solved it.

All that probably needed to change for cygwin was to no longer
use sa_family_t in the getaddrinfo.c.

Kurt

In response to

Responses

Browse pgsql-cygwin by date

  From Date Subject
Next Message Bruce Momjian 2003-06-24 19:04:05 Re: [HACKERS] ss_family in hba.c
Previous Message Jason Tishler 2003-06-24 12:12:30 Re: [HACKERS] ss_family in hba.c

Browse pgsql-general by date

  From Date Subject
Next Message Rod Taylor 2003-06-24 17:03:02 Re: [GENERAL] Documentation quality WAS: interesting
Previous Message nolan 2003-06-24 16:57:47 Re: [GENERAL] [pgsql-advocacy] Documentation quality WAS: interesting

Browse pgsql-hackers by date

  From Date Subject
Next Message Maksim Likharev 2003-06-24 17:30:27 Re: TO_CHAR SO SLOW???
Previous Message Yutaka tanida 2003-06-24 16:29:24 Re: lru cache replacement

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2003-06-24 19:04:05 Re: [HACKERS] ss_family in hba.c
Previous Message Tom Lane 2003-06-24 14:51:09 Re: Many Pl/PgSQL parameters -> AllocSetAlloc(128)?