Skip site navigation (1) Skip section navigation (2)

Use non-deprecated APIs for dynloader/darwin.c

From: Chris Campbell <chris(at)bignerdranch(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: Use non-deprecated APIs for dynloader/darwin.c
Date: 2006-10-08 01:04:26
Message-ID: (view raw or whole thread)
Lists: pgsql-hackerspgsql-patches
Re: Darwin stuff is getting deprecated

Mac OS X has included dlopen() and friends etc since Mac OS X 10.3.  
 From the dlopen(3) man page:

      Mac OS X 10.3 incorporated the dlcompat package written by  
Jorge Acereda
      <jacereda(at)users(dot)sourceforge(dot)net> and Peter O'Gorman <ogor-

      In Mac OS X 10.4, dlopen was rewritten to be a native part of  

The attached patch switches to using those APIs in src/backend/port/ 
dynloader/darwin.c (and passes "make check").

(1) This change requires Mac OS X 10.3 and later. Do we currently  
support PostgreSQL on older versions of Mac OS X?

(2) The pg_* functions are such trivial wrappers for the OS's APIs --  
should they be turned into macros in dynloader/darwin.h and we can  
just delete the .c file?

(3) If we need to continue supporting Mac OS X 10.2 and earlier, I  
guess we'll need to add a configure test for the presence of dlopen 
()? Is that a check that should only be run on Darwin, or all platforms?


- Chris

Attachment: dynloader.patch
Description: application/octet-stream (2.7 KB)


pgsql-hackers by date

Next:From: David FetterDate: 2006-10-08 01:22:19
Subject: Re: pg_dump exclusion switches and functions/types
Previous:From: Sergey E. KoposovDate: 2006-10-07 23:23:16
Subject: Re: FailedAssertion() in 8.2beta1

pgsql-patches by date

Next:From: Tom LaneDate: 2006-10-08 18:29:25
Subject: Re: Use non-deprecated APIs for dynloader/darwin.c
Previous:From: Chris CampbellDate: 2006-10-07 23:13:26
Subject: Use dns_sd.h for Bonjour

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group