On Fri, Jan 01, 2010 at 11:45:19PM +0100, Simon Josefsson wrote: > Robert Millan <[email protected]> writes: > > > When importing getline.c into GNU GRUB, it failed to build due to undefined > > ssize_t. Here's a fix (I believe including <sys/types.h> is portable > > enough, > > please let me know if I'm wrong). > > I don't your this patch is the right solution -- the gnulib getline > module depends on the stdio module, which contains this: > > #if ((@GNULIB_FSEEKO@ && @REPLACE_FSEEKO@) \ > || (@GNULIB_FTELLO@ && @REPLACE_FTELLO@) \ > || (@GNULIB_GETDELIM@ && !...@have_decl_getdelim@) \ > || (@GNULIB_GETLINE@ && (!...@have_decl_getline@ || @REPLACE_GETLINE@)) \ > || defined GNULIB_POSIXCHECK) > /* Get off_t and ssize_t. */ > # include <sys/types.h> > #endif > > Aren't you using the gnulib stdio module, or is the code not working > somehow? > > If you don't want to use the gnulib stdio module, you could add your > patch into a gnulib local directory. But there are no guarantees the > gnulib getline module will work in this case.
Well, actually, I import Gnulib code by hand. I know it's not optimal, but I haven't had time to figure out how to make gnulib-tool play nice with our (somewhat unusual) build system. So no, the stdio module wasn't being included. Maybe you want to consider removing this dependency, I think other projects could be in a similar situation than GRUB is. -- Robert Millan "Be the change you want to see in the world" -- Gandhi
