D
Dave Saville
Is the underscore prefix usual on OS/2? Was it usual when using real
EMX, since I get the impression the last time anyone who knew much about
perl looked at all this that was state-of-the-art?
EMX did not use the underscore prefix. Most OS/2 developers have
switched to gcc which does.
I ask because if you look at the source for ExtUtils::Mksymlists (the
module which writes the .def file), you will see that the Win32 section
makes allowances for symbols with an underscore prefix, but the OS/2
section does not.
Ha Ha
I don't believe either of those options will work. DynaLoader assumes it
can pass a function name, with no underscore, to DosQueryProcAddr, and
get a C-convention function address. If _System changes the calling
convention, that will obviously lead to segfaults; and unless
DosQueryProcAddr silently prepends an underscore, changing the export
list will just mean DynaLoader can't find the symbol.
There is code in EU::Mksymlists to handle bcc on Win32, which apparently
prepends underscores; it builds a .def file which maps the underscore-
prefixed symbol in the object file to a non-prefixed symbol in the DLL.
If your build system has changed to require this then presumably the
OS/2 code could be patched to do the same thing, but that feels like
moving backwards to me...
After a quick look are we not going to still have the same problem
with Dynaloader?
Presumably you have prebuilt DLLs with your perl install, which
presumably load properly? (Can you use List::Util?) If you find
os2/auto/List/Util/Util.dll under your @INC and print out the dynamic
symbol table (nm -D on my system; there may be a specialised tool on
yours), does the symbol boot_List__Util have an initial underscore or
not? Is there any way you can see its intended calling convention (I
suspect there isn't)?
All the prebuilt dll's have _'s - At least all the ones I looked at
have
[I haven't forgotten about your test results xthread, I'm just not
entirely sure what to do with them yet...]
No problem.