mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 20:35:50 +00:00
Bugzilla Bug 92134 Sun Workshop 6 Update 2 _FCS_ fails to build due "jscpucfg" error
by : Roland.Mainz@informatik.med.uni-giessen.de r=cls a=dbaron
This commit is contained in:
parent
961c90812c
commit
e962707671
@ -18,7 +18,8 @@
|
|||||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||||
* Rights Reserved.
|
* Rights Reserved.
|
||||||
*
|
*
|
||||||
* Contributor(s):
|
* Contributor(s):
|
||||||
|
* Roland Mainz <roland.mainz@informatik.med.uni-giessen.de>
|
||||||
*
|
*
|
||||||
* Alternatively, the contents of this file may be used under the
|
* Alternatively, the contents of this file may be used under the
|
||||||
* terms of the GNU Public License (the "GPL"), in which case the
|
* terms of the GNU Public License (the "GPL"), in which case the
|
||||||
@ -36,6 +37,7 @@
|
|||||||
* Generate CPU-specific bit-size and similar #defines.
|
* Generate CPU-specific bit-size and similar #defines.
|
||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#ifdef CROSS_COMPILE
|
#ifdef CROSS_COMPILE
|
||||||
#include <prtypes.h>
|
#include <prtypes.h>
|
||||||
@ -207,7 +209,13 @@ int main(int argc, char **argv)
|
|||||||
int big_endian = 0, little_endian = 0, ntests = 0;
|
int big_endian = 0, little_endian = 0, ntests = 0;
|
||||||
|
|
||||||
if (sizeof(short) == 2) {
|
if (sizeof(short) == 2) {
|
||||||
union {
|
/* force |volatile| here to get rid of any compiler optimisations
|
||||||
|
* (var in register etc.) which may be appiled to |auto| vars -
|
||||||
|
* even those in |union|s...
|
||||||
|
* (|static| is used to get the same functionality for compilers
|
||||||
|
* which do not honor |volatile|...).
|
||||||
|
*/
|
||||||
|
volatile static union {
|
||||||
short i;
|
short i;
|
||||||
char c[2];
|
char c[2];
|
||||||
} u;
|
} u;
|
||||||
@ -219,7 +227,8 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (sizeof(int) == 4) {
|
if (sizeof(int) == 4) {
|
||||||
union {
|
/* force |volatile| here ... */
|
||||||
|
volatile static union {
|
||||||
int i;
|
int i;
|
||||||
char c[4];
|
char c[4];
|
||||||
} u;
|
} u;
|
||||||
@ -233,7 +242,8 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (sizeof(long) == 8) {
|
if (sizeof(long) == 8) {
|
||||||
union {
|
/* force |volatile| here ... */
|
||||||
|
volatile static union {
|
||||||
long i;
|
long i;
|
||||||
char c[8];
|
char c[8];
|
||||||
} u;
|
} u;
|
||||||
@ -263,8 +273,10 @@ int main(int argc, char **argv)
|
|||||||
printf("#define IS_LITTLE_ENDIAN 1\n");
|
printf("#define IS_LITTLE_ENDIAN 1\n");
|
||||||
printf("#undef IS_BIG_ENDIAN\n\n");
|
printf("#undef IS_BIG_ENDIAN\n\n");
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "%s: unknown byte order!\n", argv[0]);
|
fprintf(stderr, "%s: unknown byte order"
|
||||||
return 1;
|
"(big_endian=%d, little_endian=%d, ntests=%d)!\n",
|
||||||
|
argv[0], big_endian, little_endian, ntests);
|
||||||
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -344,5 +356,6 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
printf("#endif /* js_cpucfg___ */\n");
|
printf("#endif /* js_cpucfg___ */\n");
|
||||||
|
|
||||||
return 0;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user