update cygwin uname checks

RESOLVED FIXED in mozilla1.1beta

Status

P3
normal
RESOLVED FIXED
17 years ago
14 years ago

People

(Reporter: netscape, Assigned: netscape)

Tracking

Trunk
mozilla1.1beta
x86
Windows 2000

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

When using cygwin's uname on w2k, OS_TARGET improperly gets set to
CYGWIN_NT-5.0.  It should be set to WINNT.
Created attachment 97444 [details] [diff] [review]
Set OS_TARGET when resetting OS_ARCH
This patch fixes the problem of not setting OS_TARGET whenever OS_ARCH is reset
for mks & cygwin.
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla1.2alpha
Comment on attachment 97444 [details] [diff] [review]
Set OS_TARGET when resetting OS_ARCH

r=dmose
Attachment #97444 - Flags: review+

Comment 4

16 years ago
Comment on attachment 97444 [details] [diff] [review]
Set OS_TARGET when resetting OS_ARCH

The changes to nsprpub/configure.in are not
necessary.
Attachment #97444 - Flags: needs-work+
The aren't necessary when building Mozilla as NSPR forces OS_TARGET to be WIN95
when --with-mozilla is set.  However, for the NSPR standalone builds, the wrong
value will be set and the various OS_TARGET tests in NSPR will not work as desired.

Comment 6

16 years ago
For the NSPR standalone builds, these changes still
aren't necessary.  NSPR's configure script does some
things in a different order from Mozilla's configure
script.  Perhaps this is why Mozilla's configure
script needs these changes but NSPR's configure script
doesn't.
Created attachment 97704 [details] [diff] [review]
Just update mozilla's configure.in

Wan-Teh, you're right. I must've grepped the wrong autoconf.mk in my previous
test.	 I obviously need a vacation from my vacation. :-P  OS_TARGET isn't set
before the win32 detection in NSPR & LDAP so it falls down to the test -z
"$OS_TARGET" case and sets OS_TARGET=OS_ARCH.
Attachment #97444 - Attachment is obsolete: true

Comment 8

16 years ago
Chris,  I think something like this would work for
mozilla/configure.in:

Index: configure.in
===================================================================
RCS file: /cvsroot/mozilla/configure.in,v
retrieving revision 1.1091
diff -u -r1.1091 configure.in
--- configure.in        3 Sep 2002 22:32:19 -0000       1.1091
+++ configure.in        4 Sep 2002 01:14:56 -0000
@@ -458,20 +458,17 @@
 MOZ_ENABLE_POSTSCRIPT=1

 if test -n "$CROSS_COMPILE"; then
-    OS_TARGET="${target_os}"
     OS_ARCH=`echo $target_os | sed -e 's|/|_|g'`
     OS_RELEASE=
     OS_TEST="${target_cpu}"
     case "${target_os}" in
         linux*)       OS_ARCH=Linux ;;
         solaris*)     OS_ARCH=SunOS OS_RELEASE=5 ;;
-        openvms*)     OS_TARGET=`uname -s`
-                      OS_ARCH=`uname -s | sed -e 's|/|_|g'`
+        openvms*)     OS_ARCH=`uname -s | sed -e 's|/|_|g'`
                       OS_RELEASE=`uname -r`
                       OS_TEST=`uname -Wh`;;
     esac
 else
-    OS_TARGET=`uname -s`
     OS_ARCH=`uname -s | sed -e 's|/|_|g'`
     OS_RELEASE=`uname -r`
     OS_TEST=`uname -m`

I also suspect that Mozilla's build system may not need
OS_TARGET at all; otherwise you won't be able to get
away with not setting OS_TARGET to WIN95 when you are
building on Windows NT/2000/XP.
Wan-Teh, that could work.  OS_TARGET needs to be set for win32 as we do have a
couple of checks for WINNT specific modules (under activex & installer). 
Hardcoding OS_TARGET was preferable to letting the users set random values for
OS_TARGET that may not be supported (like WIN98 & WINXP).  If we remove the
hardcoded values, we should add a check to make sure that OS_TARGET is set to
either WIN95 or WINNT if OS_ARCH=WINNT.
  

Comment 10

16 years ago
NSPR makes the distinction between WINNT and WIN95.
Mozilla only needs what NSPR calls WIN95.  This is
why I said Mozilla's build system may not need
OS_TARGET.

If you are building Mozilla with OS_TARGET=WINNT,
your definition of OS_TARGET is different from NSPR's.
> If you are building Mozilla with OS_TARGET=WINNT,
> your definition of OS_TARGET is different from NSPR's.

Yes, it is slightly different.  Where NSPR uses OS_TARGET to replace generic
win32 code with NT-enhanced win32 code, Mozilla uses OS_TARGET to enable the
compilation of modules that use NT-enhanced code only.  

Updated

16 years ago
Attachment #97704 - Flags: review+

Comment 12

16 years ago
Comment on attachment 97704 [details] [diff] [review]
Just update mozilla's configure.in

r=pavlov
Patch has been checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
Target Milestone: mozilla1.2alpha → mozilla1.1beta
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.