Configure script currently checks if shm_open() exists in libposix4. That's the deprecated location on Solaris. Unix 98 says that the correct compiler incantation in this case is -lrt, so this check should be added. Only if that fails should libposix4 be checked.
After looking into this further, it turns out that Mozilla doesn't actually use the shm_open() call, NSPR does. NSPR has -lposix4 hardcoded for linking against libnspr. So, I'm going to completely remove the shm_open test from the toplevel configure script as the library of choice will be loaded via libnspr's shared library dependencies.
Patch has been checked in. wtc, can we add shm_open() check for NSPR or are we going to punt on changing -lposix4 to -lrt ? Just switching the hardcode value is probably guaranteed to break older systems.
Status: UNCONFIRMED → NEW
Ever confirmed: true
On Solaris, -lposix4 was renamed -lrt in Solaris 7. So we can choose the right library without a shm_open() check in mozilla/nsprpub/configure.in.
Comment on attachment 51459 [details] [diff] [review] Use -lrt if os version is >= 5.7 cls, you have really mastered GNU make! :-) Your patch is good. I will just make some stylistic changes and check it in. Do you want it on the client branch too?
Attachment #51459 - Flags: needs-work+
Suggested changes for the NSPR patch (attachment 51459 [details] [diff] [review]). 1. Remove the leading underscore in _LIBPOSIX_TEST and _LIBPOSIX. 2. Change "LIBPOSIX" to "LIBRT" because -lrt is the new name and seems to be the standard name (it's also called -lrt on other Unix platforms). 3. I would change the comment to say something like: In Solaris 2.6 or earlier, -lrt is called -lposix4. Chris, could you check your patch in after making these changes? Thank you!
Modified patch has been checked into the trunk & the NSPRPUB_PRE_4_2_CLIENT_BRANCH branch. Checking in mozilla/nsprpub/pr/src/Makefile.in; /cvsroot/mozilla/nsprpub/pr/src/Makefile.in,v <-- Makefile.in new revision: 1.26; previous revision: 1.25 done Checking in nsprpub/pr/src/Makefile.in; /cvsroot/mozilla/nsprpub/pr/src/Makefile.in,v <-- Makefile.in new revision: 184.108.40.206; previous revision: 1.25 done
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.