Unix Technical Forum

Re: [PATCHES] Use non-deprecated APIs for dynloader/darwin.c

This is a discussion on Re: [PATCHES] Use non-deprecated APIs for dynloader/darwin.c within the pgsql Hackers forums, part of the PostgreSQL category; --> On Oct 8, 2006, at 14:29, Tom Lane wrote: > Looks good, but I don't think we want to ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-12-2008, 06:11 AM
Chris Campbell
 
Posts: n/a
Default Re: [PATCHES] Use non-deprecated APIs for dynloader/darwin.c

On Oct 8, 2006, at 14:29, Tom Lane wrote:

> Looks good, but I don't think we want to abandon OSX 10.2 support
> just yet. I'll revise this to use a configure probe for dlopen.


Maybe we can abandon Mac OS X 10.2 in 8.3 and later? And not back-
port these patches to the 7.x, 8.0, and 8.1 branches?

BTW, I think the configure probe (only on Darwin, correct?) should
test for the existence of <dlfcn.h>.

> My inclination is to apply this one now, since it only affects OSX
> and should be easily testable, but to hold off on your other patch
> for portable Bonjour support until 8.3 devel starts. The portability
> implications of that one are unclear, and I don't know how to test it
> either, so I think putting it in now is too much risk.


The Bonjour patch wasn't intended to be portable to other platforms
just yet. As submitted, it has the same risks/advantages as this
dlopen() patch -- it only works on 10.3 and later, but isn't
deprecated in 10.4.

If we want to keep 10.2 support for Bonjour, we can test for both
DNSServiceDiscovery.h and dns_sd.h in ./configure, and prefer
dns_sd.h if it's found (which will be the case for 10.3 and 10.4) but
use DNSServiceDiscovery.h if not (which will be the case for 10.2).

Thanks!

- Chris


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-12-2008, 06:11 AM
Tom Lane
 
Posts: n/a
Default Re: [PATCHES] Use non-deprecated APIs for dynloader/darwin.c

Chris Campbell <chris@bignerdranch.com> writes:
> On Oct 8, 2006, at 14:29, Tom Lane wrote:
>> Looks good, but I don't think we want to abandon OSX 10.2 support
>> just yet. I'll revise this to use a configure probe for dlopen.


> Maybe we can abandon Mac OS X 10.2 in 8.3 and later? And not back-
> port these patches to the 7.x, 8.0, and 8.1 branches?


I don't see any particular reason to abandon 10.2 at all, as long as
all it's costing us is a couple dozen lines in dynloader/darwin.c.
As for back-porting, I don't see a strong reason to do that either.
Apple will presumably maintain the compatibility APIs for a long
while yet.

> BTW, I think the configure probe (only on Darwin, correct?) should
> test for the existence of <dlfcn.h>.


I realized that configure is already probing for dlopen(), so I just
used HAVE_DLOPEN. We can add a separate test for the header file if
it proves really necessary, but I bet it's not.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-12-2008, 08:04 AM
Bruce Momjian
 
Posts: n/a
Default Re: [PATCHES] Use non-deprecated APIs fordynloader/darwin.c


The Darwin dlopen() patch has already been applied. Where are we on the
Bonjour patch? Do we want code that works on Darwin 10.2 and 10.3?

---------------------------------------------------------------------------

Chris Campbell wrote:
> On Oct 8, 2006, at 14:29, Tom Lane wrote:
>
> > Looks good, but I don't think we want to abandon OSX 10.2 support
> > just yet. I'll revise this to use a configure probe for dlopen.

>
> Maybe we can abandon Mac OS X 10.2 in 8.3 and later? And not back-
> port these patches to the 7.x, 8.0, and 8.1 branches?
>
> BTW, I think the configure probe (only on Darwin, correct?) should
> test for the existence of <dlfcn.h>.
>
> > My inclination is to apply this one now, since it only affects OSX
> > and should be easily testable, but to hold off on your other patch
> > for portable Bonjour support until 8.3 devel starts. The portability
> > implications of that one are unclear, and I don't know how to test it
> > either, so I think putting it in now is too much risk.

>
> The Bonjour patch wasn't intended to be portable to other platforms
> just yet. As submitted, it has the same risks/advantages as this
> dlopen() patch -- it only works on 10.3 and later, but isn't
> deprecated in 10.4.
>
> If we want to keep 10.2 support for Bonjour, we can test for both
> DNSServiceDiscovery.h and dns_sd.h in ./configure, and prefer
> dns_sd.h if it's found (which will be the case for 10.3 and 10.4) but
> use DNSServiceDiscovery.h if not (which will be the case for 10.2).
>
> Thanks!
>
> - Chris
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings


--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-12-2008, 09:07 AM
Bruce Momjian
 
Posts: n/a
Default Bonjour patch


With no new version from the author and no working version for all
supported OS/X version, I am saving this patch for 8.4.

This has been saved for the 8.4 release:

http://momjian.postgresql.org/cgi-bin/pgpatches_hold

---------------------------------------------------------------------------

Chris Campbell wrote:
> On Oct 8, 2006, at 14:29, Tom Lane wrote:
>
> > Looks good, but I don't think we want to abandon OSX 10.2 support
> > just yet. I'll revise this to use a configure probe for dlopen.

>
> Maybe we can abandon Mac OS X 10.2 in 8.3 and later? And not back-
> port these patches to the 7.x, 8.0, and 8.1 branches?
>
> BTW, I think the configure probe (only on Darwin, correct?) should
> test for the existence of <dlfcn.h>.
>
> > My inclination is to apply this one now, since it only affects OSX
> > and should be easily testable, but to hold off on your other patch
> > for portable Bonjour support until 8.3 devel starts. The portability
> > implications of that one are unclear, and I don't know how to test it
> > either, so I think putting it in now is too much risk.

>
> The Bonjour patch wasn't intended to be portable to other platforms
> just yet. As submitted, it has the same risks/advantages as this
> dlopen() patch -- it only works on 10.3 and later, but isn't
> deprecated in 10.4.
>
> If we want to keep 10.2 support for Bonjour, we can test for both
> DNSServiceDiscovery.h and dns_sd.h in ./configure, and prefer
> dns_sd.h if it's found (which will be the case for 10.3 and 10.4) but
> use DNSServiceDiscovery.h if not (which will be the case for 10.2).
>
> Thanks!
>
> - Chris
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings


--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-12-2008, 09:07 AM
Bruce Momjian
 
Posts: n/a
Default Re: [PATCHES] Use non-deprecated APIs fordynloader/darwin.c


Ah, I already had this on the TODO list with URLs, so I will not put it
in the hold queue.

---------------------------------------------------------------------------

Chris Campbell wrote:
> On Oct 8, 2006, at 14:29, Tom Lane wrote:
>
> > Looks good, but I don't think we want to abandon OSX 10.2 support
> > just yet. I'll revise this to use a configure probe for dlopen.

>
> Maybe we can abandon Mac OS X 10.2 in 8.3 and later? And not back-
> port these patches to the 7.x, 8.0, and 8.1 branches?
>
> BTW, I think the configure probe (only on Darwin, correct?) should
> test for the existence of <dlfcn.h>.
>
> > My inclination is to apply this one now, since it only affects OSX
> > and should be easily testable, but to hold off on your other patch
> > for portable Bonjour support until 8.3 devel starts. The portability
> > implications of that one are unclear, and I don't know how to test it
> > either, so I think putting it in now is too much risk.

>
> The Bonjour patch wasn't intended to be portable to other platforms
> just yet. As submitted, it has the same risks/advantages as this
> dlopen() patch -- it only works on 10.3 and later, but isn't
> deprecated in 10.4.
>
> If we want to keep 10.2 support for Bonjour, we can test for both
> DNSServiceDiscovery.h and dns_sd.h in ./configure, and prefer
> dns_sd.h if it's found (which will be the case for 10.3 and 10.4) but
> use DNSServiceDiscovery.h if not (which will be the case for 10.2).
>
> Thanks!
>
> - Chris
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings


--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-12-2008, 09:07 AM
Bruce Momjian
 
Posts: n/a
Default Re: [PATCHES] Use non-deprecated APIs fordynloader/darwin.c


Actually, can we now say we only support OS/X 10.3 and later. If so, we
can use the patch unchanged.

---------------------------------------------------------------------------

Bruce Momjian wrote:
>
> Ah, I already had this on the TODO list with URLs, so I will not put it
> in the hold queue.
>
> ---------------------------------------------------------------------------
>
> Chris Campbell wrote:
> > On Oct 8, 2006, at 14:29, Tom Lane wrote:
> >
> > > Looks good, but I don't think we want to abandon OSX 10.2 support
> > > just yet. I'll revise this to use a configure probe for dlopen.

> >
> > Maybe we can abandon Mac OS X 10.2 in 8.3 and later? And not back-
> > port these patches to the 7.x, 8.0, and 8.1 branches?
> >
> > BTW, I think the configure probe (only on Darwin, correct?) should
> > test for the existence of <dlfcn.h>.
> >
> > > My inclination is to apply this one now, since it only affects OSX
> > > and should be easily testable, but to hold off on your other patch
> > > for portable Bonjour support until 8.3 devel starts. The portability
> > > implications of that one are unclear, and I don't know how to test it
> > > either, so I think putting it in now is too much risk.

> >
> > The Bonjour patch wasn't intended to be portable to other platforms
> > just yet. As submitted, it has the same risks/advantages as this
> > dlopen() patch -- it only works on 10.3 and later, but isn't
> > deprecated in 10.4.
> >
> > If we want to keep 10.2 support for Bonjour, we can test for both
> > DNSServiceDiscovery.h and dns_sd.h in ./configure, and prefer
> > dns_sd.h if it's found (which will be the case for 10.3 and 10.4) but
> > use DNSServiceDiscovery.h if not (which will be the case for 10.2).
> >
> > Thanks!
> >
> > - Chris
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 5: don't forget to increase your free space map settings

>
> --
> Bruce Momjian <bruce@momjian.us> http://momjian.us
> EnterpriseDB http://www.enterprisedb.com
>
> + If your life is a hard drive, Christ can be your backup. +
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster


--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:14 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com