Magellan Linux

Annotation of /trunk/mozilla/patches/mozilla-1.7.5-stackgrowth.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 153 - (hide annotations) (download)
Tue May 8 20:52:56 2007 UTC (17 years, 1 month ago) by niro
File size: 931 byte(s)
-import

1 niro 153 --- js/src/jscpucfg.c 15 Nov 2003 00:10:56 -0000 3.21
2     +++ js/src/jscpucfg.c 22 Oct 2004 05:45:36 -0000
3     @@ -153,19 +153,34 @@ static int Log2(unsigned int n)
4     */
5     static void BitsPerByte(void)
6     {
7     bpb = 8;
8     }
9    
10     +#ifdef __GNUC__
11     +#if (__GNUC__ > 2)
12     +__attribute__((noinline))
13     +#endif
14     +static int StackGrowthDirection(int *dummy1addr)
15     +{
16     + int *dummy2 = alloca (sizeof (int));
17     +
18     + return (dummy2 < dummy1addr) ? -1 : 1;
19     +}
20     +
21     +#else /* __GNUC__ */
22     +
23     static int StackGrowthDirection(int *dummy1addr)
24     {
25     int dummy2;
26    
27     return (&dummy2 < dummy1addr) ? -1 : 1;
28     }
29    
30     +#endif /* __GNUC__ */
31     +
32     int main(int argc, char **argv)
33     {
34     int sizeof_char, sizeof_short, sizeof_int, sizeof_int64, sizeof_long,
35     sizeof_float, sizeof_double, sizeof_word, sizeof_dword;
36     int bits_per_int64_log2, align_of_short, align_of_int, align_of_long,
37     align_of_int64, align_of_float, align_of_double, align_of_pointer,