Closed Bug 327502 Opened 19 years ago Closed 19 years ago

use of setenv breaks solaris build

Categories

(Firefox :: Disability Access, defect)

Other
Solaris
defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: shanec, Assigned: ginnchen+exoracle)

References

Details

(Keywords: fixed1.8.1)

Attachments

(3 files)

User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1 Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1 Patch 210974 from bug 312092 broke solaris builds due to use of setenv, rather than use of PR_SetEnv (as is used elsewhere in the same files). Reproducible: Always Steps to Reproduce: Actual Results: export/home/trentm/as/Mozilla-devel/build/cvs1.8-ko4.0-ko/mozilla/toolkit/xre/nsAppRunner.cpp: In function `int XRE_main(int, char**, const nsXREAppData*)': /export/home/trentm/as/Mozilla-devel/build/cvs1.8-ko4.0-ko/mozilla/toolkit/xre/nsAppRunner.cpp:1871: error: ` setenv' undeclared (first use this function)
Blocks: 312092
The breakage was on Solaris 8. I haven't tried on Solaris 10, but it looks like SOlaris 10's headers *do* define setenv() (guarded by __XOPEN_SOURCE, POSIX, et al.). Perhaps using PR_SetEnv would be more appropriate. I'll attach a proposed patch.
Attachment #212127 - Flags: review?(benjamin)
This likely also affects xpfe's nsAppRunner.cpp but we don't build that.
Solaris 10 is fine. I didn't try Solaris 8 yet.
Firefox built OK with setenv on SunOS 5.8 Generic_108528-14 sun4u sparc with Sun C++ 5.5 Patch 113817-06 2004/01/29
OS: MacOS X → Solaris
Ginn, are you saying 5.8 built with setenv, not PR_SetEnv? If so, I still beleive it is more correct to use the PR api's here.
Assignee: nobody → ginn.chen
Status: UNCONFIRMED → ASSIGNED
Attachment #212464 - Flags: review?(benjamin)
Comment on attachment 212464 [details] [diff] [review] change to PR_GetEnv/PR_SetEnv Please change the if (gtkModules) to if (gtkModules && gtkModules) because with PR_GetEnv you're supposed to treat a null return and an empty string the same. There's no need to use %s to insert GTK_MODULES, you can put it in the format string directly.
Attachment #212464 - Flags: review?(benjamin) → review+
Attachment #212127 - Flags: review?(benjamin)
Attached patch patch v2Splinter Review
Attachment #212710 - Flags: superreview?
Attachment #212710 - Flags: superreview? → superreview?(neil)
Attachment #212710 - Flags: superreview?(neil) → superreview+
Checking in toolkit/xre/nsAppRunner.cpp; /cvsroot/mozilla/toolkit/xre/nsAppRunner.cpp,v <-- nsAppRunner.cpp new revision: 1.134; previous revision: 1.133 done Checking in xpfe/bootstrap/nsAppRunner.cpp; /cvsroot/mozilla/xpfe/bootstrap/nsAppRunner.cpp,v <-- nsAppRunner.cpp new revision: 1.450; previous revision: 1.449 done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Attachment #212710 - Flags: approval-branch-1.8.1?(benjamin)
Attachment #212710 - Flags: approval-branch-1.8.1?(benjamin) → approval-branch-1.8.1+
Checking in toolkit/xre/nsAppRunner.cpp; /cvsroot/mozilla/toolkit/xre/nsAppRunner.cpp,v <-- nsAppRunner.cpp new revision: 1.113.2.9; previous revision: 1.113.2.8 done Checking in xpfe/bootstrap/nsAppRunner.cpp; /cvsroot/mozilla/xpfe/bootstrap/nsAppRunner.cpp,v <-- nsAppRunner.cpp new revision: 1.442.2.3; previous revision: 1.442.2.2 done
Keywords: fixed1.8.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: