Re: Rendezvous/Bonjour broken in 8.1 beta

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pmagnoli(at)systemevolution(dot)it, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Rendezvous/Bonjour broken in 8.1 beta
Date: 2005-09-08 23:46:08
Message-ID: 4320CD40.2060805@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan wrote:

> Tom Lane wrote:
>
>>
>> Grumble. Are you going to send in a patch? I can test that the OS X
>> side still works, but I can't test Windows.
>>
>
> I can make a patch and see that it configures and compiles. But I
> can't test it.
>
> I guess that will be an advance, though.
>
>

It gets a lot worse. The Windows SDK does not export the same API. None
of the DNSfoo things we refer to in postmaster.c are defined in the
supplied header file (not to mention other idiocies I was able to
negotiate past). Apparently Apple have never heard of code portability.

I have no idea what I'm looking for in here, so I don't intend to take
anything further - someone who actually cares about this might like to
try ;-)

Below are shown diffs to configure.in and postmaster.c that I made to
get as far as I did.

cheers

andrew

Index: configure.in
===================================================================
RCS file: /cvsroot/pgsql/configure.in,v
retrieving revision 1.425
diff -c -r1.425 configure.in
*** configure.in 25 Aug 2005 02:28:03 -0000 1.425
--- configure.in 8 Sep 2005 23:43:14 -0000
***************
*** 755,761 ****
fi

if test "$with_bonjour" = yes ; then
! AC_CHECK_HEADER(DNSServiceDiscovery/DNSServiceDiscovery.h, [],
[AC_MSG_ERROR([header file <DNSServiceDiscovery/DNSServiceDiscovery.h>
is required for Bonjour])])
fi


--- 755,765 ----
fi

if test "$with_bonjour" = yes ; then
! if test "$PORTNAME" = "win32"; then
! AC_CHECK_HEADER(dns_sd.h, [], [AC_MSG_ERROR([header file
<dns_sd.h> is required for Bonjour])])
! else
!
AC_CHECK_HEADER(DNSServiceDiscovery/DNSServiceDiscovery.h, [],
[AC_MSG_ERROR([header file <DNSServiceDiscovery/DNSServiceDiscovery.h>
is required for Bonjour])])
! fi
fi

Index: src/backend/postmaster/postmaster.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/backend/postmaster/postmaster.c,v
retrieving revision 1.467
diff -c -r1.467 postmaster.c
*** src/backend/postmaster/postmaster.c 20 Aug 2005 23:26:17 -0000
1.467
--- src/backend/postmaster/postmaster.c 8 Sep 2005 23:39:50 -0000
***************
*** 89,96 ****
--- 89,104 ----
#endif

#ifdef USE_BONJOUR
+ #ifdef WIN32
+ #include <stdint.h>
+ #define _MSL_STDINT_H
+ #include <dns_sd.h>
+ #undef _MSL_STDINT_H
+ typedef int DNSServiceRegistrationReplyErrorType;
+ #else
#include <DNSServiceDiscovery/DNSServiceDiscovery.h>
#endif
+ #endif

#include "access/xlog.h"
#include "bootstrap/bootstrap.h"

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-09-08 23:57:22 Re: Rendezvous/Bonjour broken in 8.1 beta
Previous Message Peter Eisentraut 2005-09-08 22:51:58 Re: initdb profiles