diff options
Diffstat (limited to 'Modules/TestBigEndian.c')
-rw-r--r-- | Modules/TestBigEndian.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Modules/TestBigEndian.c b/Modules/TestBigEndian.c index c21cc7e..97647ed 100644 --- a/Modules/TestBigEndian.c +++ b/Modules/TestBigEndian.c @@ -1,4 +1,5 @@ -int main () { +int main (int ac, char*av[]) { + int ret = 1; /* Are we little or big endian? From Harbison&Steele. */ union { @@ -6,5 +7,9 @@ int main () { char c[sizeof (long)]; } u; u.l = 1; - return (u.c[sizeof (long) - 1] == 1)?1:0; + if(ac > 100) + { + ret = *av[0]; + } + return (u.c[sizeof (long) - 1] == 1)?ret:0; } |