[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Port insserv to kfreebsd?


On Mon, 2009-06-29 at 09:01:11 +0200, Petr Salinger wrote:
> Somewhen Guillem Jover wrote:
> > You should also probably return ENOSYS instead.
> Well, to be 100% correct, errno should be set to ENOSYS and return -1.
> The eventually implemented posix_fadvise() could only provide hint
> to the kernel memory and io management.
> The result of posix_fadvise() is not checked anyway.

The function returns the error value, see the man page, or the stub in
glibc (io/posix_fadvise.c).

> The proper upstream way should be to guard all usage
> of posix_fadvise() by something like
> "#if USE_FADVISE" instead of current
> "#if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 600"
> and either check by autoconf for presence of function and macros
> or put at the begin of insserv.c light variant like
> #define USE_FADVISE 1
> #endif

Sure on the feature check instead of system check, but to me having to
guard all instances of the call instead of doing it once, just seems
ugly, but then the one deciding is going to be Petter. :)


Reply to: