We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 359

Summary: Bad BeOS loadso error messages...
Product: SDL Reporter: Ryan C. Gordon <icculus>
Component: loadsoAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 1.2   
Hardware: x86   
OS: BeOS   

Description Ryan C. Gordon 2006-11-07 06:53:34 UTC
BeOS's loadso backend just reports "BeOS error" via SDL_GetError() if loading a shared library fails, and "Symbol not found" if symbol lookup fails.

This is due to incorrect documentation in The Be Book, which says these functions return B_ERROR on failure...however, load_add_on() actually returns a negative number that can be pushed through strerror() to find out what went wrong (get_image_symbol() may, too, but B_ERROR will work in strerror, too, so it doesn't hurt).

Also: since load_add_on() doesn't actually return B_ERROR, the current test in SDL will return a bogus library handle on failure and call it success.

---ryan.
Comment 1 Ryan C. Gordon 2006-11-07 10:38:59 UTC
Fixed in svn revision #2904 for 1.2 branch and #2905 for 1.3 branch.

--ryan.