This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [RFA] Declare getpagesize as int
Ken Werner wrote:
> On Saturday 19 September 2009 04:31:05 am Christopher Faylor wrote:
>> On Fri, Sep 18, 2009 at 06:58:37PM -0400, Jeff Johnston wrote:
>> >On 18/09/09 04:29 PM, Christopher Faylor wrote:
>> >> Any objections to this change?
>> >
>> >No, please go ahead. Also please change the declaration in
>> >libc/sys/linux/include/sys/unistd.h.
>>
>> Thanks, Jeff.
>>
>> Done.
>>
>> cgf
>>
>
> Hi,
>
> The attached patch declares getpagesize to return an int on the SPU as
> well. Thanks.
> -ken
Oh, that was too quick. Forget my former patch. Here is the correct one. :)
Sorry for the inconvenience caused.
-ken
libgloss/ChangeLog:
2009-09-21 Ken Werner <ken.werner@de.ibm.com>
* spu/getpagesize.c: Align getpagesize implementation to POSIX
Index: src/libgloss/spu/getpagesize.c
===================================================================
--- src.orig/libgloss/spu/getpagesize.c
+++ src/libgloss/spu/getpagesize.c
@@ -34,15 +34,9 @@
#include <unistd.h>
#include "jsre.h"
-size_t
+int
getpagesize (void)
{
- int sys;
-
- /*
- * linux/ppc has int getpagesize(void), but even if size_t were 8 bytes
- * we are OK since we are converting the int returned from
- * __send_to_ppe.
- */
+ vector unsigned int sys;
return __send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_GETPAGESIZE, &sys);
}