This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
RE: [RFA] Declare getpagesize as int
- From: "Howland Craig D (Craig)" <howland at LGSInnovations dot com>
- To: <newlib at sourceware dot org>
- Date: Fri, 18 Sep 2009 17:52:29 -0400
- Subject: RE: [RFA] Declare getpagesize as int
- References: <20090918202936.GA12064@ednor.casa.cgf.cx>
What about stdlib/mallocr.c and sys/linux/malloc.c? They can use it
under some conditions, and have their own prototype with size_t that
would conflict with a changed unistd.h. That is, compile errors could
possibly occur. (There are lots of ifdefs, so it's hard to tell when
the problem might surface or remain latent.) If unistd.h is changed,
these probably need to be, too.
Craig
-----Original Message-----
From: newlib-owner@sourceware.org [mailto:newlib-owner@sourceware.org]
On Behalf Of Christopher Faylor
Sent: Friday, September 18, 2009 4:30 PM
To: newlib@sourceware.org
Subject: [RFA] Declare getpagesize as int
Any objections to this change?
It was motivated by: http://cygwin.com/ml/cygwin/2009-09/msg00449.html
cgf
2009-09-18 Christopher Faylor <me+cygwin@cgf.cx>
* libc/include/sys/unistd.h: Declare getpagesize as returning
POSIX-mandated int.
Index: libc/include/sys/unistd.h
===================================================================
RCS file: /cvs/uberbaum/newlib/libc/include/sys/unistd.h,v
retrieving revision 1.68
diff -d -u -r1.68 unistd.h
--- libc/include/sys/unistd.h 16 Oct 2008 23:03:40 -0000 1.68
+++ libc/include/sys/unistd.h 18 Sep 2009 20:29:18 -0000
@@ -81,7 +81,7 @@
int _EXFUN(getlogin_r, (char *name, size_t namesize) );
#endif
char _EXFUN(*getpass, (const char *__prompt));
-size_t _EXFUN(getpagesize, (void));
+int _EXFUN(getpagesize, (void));
#if defined(__CYGWIN__)
int _EXFUN(getpeereid, (int, uid_t *, gid_t *));
#endif