[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

version.c minor change

On PowerPC32, the INTERNAL_SYSCALL macro uses sizeof on its arguments
to make sure that none of them are long longs, which are not handled
correctly by the INTERNAL_SYSCALL macro.  However, that means that it
barfs if you hand it a char array of more than 4 bytes.  The patch
below puts a cast on the banner argument in __nptl_main to avoid
getting INTERNAL_SYSCALL confused.

If this isn't acceptable, then I will have to try to persuade Franz
Sirl to change the INTERNAL_SYSCALL macro.


diff -urN nptl-0.28/nptl/version.c libc/nptl/version.c
--- nptl-0.28/nptl/version.c	2003-01-14 14:52:34.000000000 +1100
+++ libc/nptl/version.c	2003-03-10 14:23:04.000000000 +1100
@@ -34,7 +34,7 @@
 __nptl_main (void)
-  INTERNAL_SYSCALL (write, err, 3, STDOUT_FILENO, banner, sizeof banner - 1);
+  INTERNAL_SYSCALL (write, err, 3, STDOUT_FILENO, (const char *) banner, sizeof banner - 1);
   _exit (0);

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]