[PATCH] PowerPC64 - Fix INTERNAL_[V]SYSCALL_NCS macros to not cast return val to (int)

Roland McGrath roland@redhat.com
Sat Feb 12 01:00:00 GMT 2011


The test does not meet GNU formatting standards in the common trivial ways
that are obvious and easy to get right if you only look.  It lacks the
normal glibc copyright header and file comment.

It uses two different literals of different sorts for the same constant,
which is just nutty.  The clean way to write that is INT32_MAX+1, and then
of course use the same macro or variable in both places.

Using freopen there is just gratuitously strange.  There is no reason not
to simply use plain open and write to the returned fd.

It assumes you can malloc 2GB in one chunk, which is not necessarily going
to work for everybody.  You can test the same thing by allocating one
buffer of 2GB/UIO_MAXIOV and filling UIO_MAXIOV iovecs with the same
pointer.

It uses fprintf where printf is the natural thing to use.
The correct format string for ssize_t values is %zd.


Thanks,
Roland



More information about the Libc-alpha mailing list