[klibc] [PATCH] gen_init_cpio processes file from a file list
dododge at dododge.net
Thu Sep 16 22:46:01 PDT 2004
On Thu, Sep 16, 2004 at 11:51:38PM +0200, Sam Ravnborg wrote:
> > @@ -1,3 +1,4 @@
> > +#define _GNU_SOURCE
> > #include <stdio.h>
> In general the executables in the kernel shall be able to compile on
> solaris, cygwin and Linux.
> Will usage of _GNU_SOURCE prevent this?
I believe the reason _GNU_SOURCE is defined is that the code is using
the GNU "getline" function. getline is non-standard and does not
appear to exist on Solaris 9.
Some other potential issues that gcc notices:
- the patch introduces three sscanf calls that assume uid_t and
gid_t are really "int".
- if you compile on Linux with -std=c99 or -std=c89, the
definitions of things like S_IFBLK and S_IFCHR get hidden.
Setting _XOPEN_SOURCE will make them visible again.
More information about the klibc