Patch: update Bonjour support to the newer non-deprecated API

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Patch: update Bonjour support to the newer non-deprecated API
Date: 2009-09-07 03:17:03
Message-ID: 17824.1252293423@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I've grown a bit tired of reading the "'DNSServiceRegistrationCreate' is
deprecated" warnings in OS X builds, and I'm also wondering whether any
of the recently reported problems with Snow Leopard might trace to our
use of an API that Apple has been deprecating since 2003. Hence,
attached is a patch that replaces our use of the DNSServiceDiscovery.h
API with the more modern dns_sd.h API. As-is, this would break Bonjour
functionality in OS X 10.2 and before, but I really doubt that anyone
still cares about that --- any objections out there?

Like the original coding, this will bind the Bonjour service name on
all available interfaces. I suspect that we ought to do something
different if we have been told to bind to a subset of interfaces,
but it's not entirely clear to me how to get the appropriate "interface
indexes" given the information we have (particularly, the listening
socket FDs). In any case, fixing that seems like added functionality.

In principle this might enable use of Bonjour on non-Apple OSes, but
I'm not personally interested enough to test that ...

Comments, objections?

regards, tom lane

Attachment Content-Type Size
unknown_filename text/plain 4.5 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2009-09-07 03:41:32 Re: Patch: update Bonjour support to the newer non-deprecated API
Previous Message Itagaki Takahiro 2009-09-07 03:15:21 CREATE LIKE INCLUDING COMMENTS and STORAGES