Discussion:
[perl #52346] config/gen/platform/darwin/dl.c uses deprecated functions
(too old to reply)
Seneca Cunningham
2008-04-01 00:58:07 UTC
Permalink
# New Ticket Created by "Seneca Cunningham"
# Please include the string: [perl #52346]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=52346 >


config/gen/platform/darwin/dl.c uses deprecated functions whose better
performing replacements (dlopen and friends) were added in OS X 10.3.

herodotus:parrot seneca$ make
[...]
config/gen/platform/darwin/dl.c: In function 'Parrot_dlopen':
config/gen/platform/darwin/dl.c:129: warning:
'NSCreateObjectFileImageFromFile' is deprecated (declared at
/usr/include/mach-o/dyld.h:145)
config/gen/platform/darwin/dl.c:133: warning: 'NSLinkModule' is
deprecated (declared at /usr/include/mach-o/dyld.h:161)
config/gen/platform/darwin/dl.c:137: warning:
'NSDestroyObjectFileImage' is deprecated (declared at
/usr/include/mach-o/dyld.h:147)
config/gen/platform/darwin/dl.c:144: warning: 'NSAddImage' is
deprecated (declared at /usr/include/mach-o/dyld.h:230)
config/gen/platform/darwin/dl.c: In function 'Parrot_dlsym':
config/gen/platform/darwin/dl.c:218: warning: 'NSIsSymbolNameDefined'
is deprecated (declared at /usr/include/mach-o/dyld.h:176)
config/gen/platform/darwin/dl.c:220: warning: 'NSLookupAndBindSymbol'
is deprecated (declared at /usr/include/mach-o/dyld.h:179)
config/gen/platform/darwin/dl.c:226: warning:
'NSIsSymbolNameDefinedInImage' is deprecated (declared at
/usr/include/mach-o/dyld.h:178)
config/gen/platform/darwin/dl.c:228: warning: 'NSLookupSymbolInImage'
is deprecated (declared at /usr/include/mach-o/dyld.h:182)
config/gen/platform/darwin/dl.c:235: warning: 'NSLookupSymbolInModule'
is deprecated (declared at /usr/include/mach-o/dyld.h:181)
config/gen/platform/darwin/dl.c:246: warning: 'NSAddressOfSymbol' is
deprecated (declared at /usr/include/mach-o/dyld.h:188)
config/gen/platform/darwin/dl.c: In function 'Parrot_dlclose':
config/gen/platform/darwin/dl.c:273: warning: 'NSUnLinkModule' is
deprecated (declared at /usr/include/mach-o/dyld.h:169)
config/gen/platform/darwin/dl.c:273: warning: cast from function call
of type '_Bool' to non-matching type 'int'
--
Seneca Cunningham
<***@gmail.com>
James Keenan via RT
2008-04-01 10:48:21 UTC
Permalink
This post might be inappropriate. Click to display it.
Will Coleda
2008-04-01 13:38:19 UTC
Permalink
On Tue, Apr 1, 2008 at 6:48 AM, James Keenan via RT
Post by James Keenan via RT
Post by Seneca Cunningham
config/gen/platform/darwin/dl.c uses deprecated functions whose better
performing replacements (dlopen and friends) were added in OS X 10.3.
Is it possible that these deprecations were only made in OS X 10.5?
It appears that Parrot's original approach to this was made on this
premise: "The dl* functions showed up in OS X 10.3, but they are just a
wrapper around the native dyld and NSModule API, so we'll use
the base API directly. This gives us wider compatibility, and
more control over the behavior." Do you think this is still valid?
kid51
I think we took the path of least resistance at the time.

IMO, we should find out when the newer ones were introduced, probe for
this information during config (probably just the OS version would be
sufficient), and then use the ones that are available to us. (This
would hopefully then avoid the deprecation warning entirely.)
--
Will "Coke" Coleda
James Keenan via RT
2009-05-02 13:45:05 UTC
Permalink
What I meant was, I'll apply this in a few days (sometime this weekend)
UNLESS I hear back from other darwin developers with complaints.
I tried the suggested deletion. It caused no problems for me on
Darwin/PPC. So +1 on the change.

kid51

Loading...