[PATCH] fadvise(2) system call
John Baldwin
jhb at freebsd.org
Tue Nov 1 14:01:53 UTC 2011
On Monday, October 31, 2011 6:16:27 pm Ed Schouten wrote:
> Hi John,
>
> * John Baldwin <jhb at freebsd.org>, 20111031 22:17:
> > I also really do think that posix_*() truly is far uglier to read. In the
> > worst case, imagine something like this:
> >
> > char *cp;
> >
> > cp = posix_malloc(posix_strlen(some_string) + 1);
> > posix_strcpy(cp, s);
> > posix_printf("%s\n", cp);
> >
> > *blech*
>
> I do agree it's ugly, but at least it's standardized. The fact is that
> it's easier to explain to someone "this code doesn't build on $NONBSD,
> because $NONBSD lacks POSIX conformance" than saying "this code doesn't
> build on $NONBSD because it uses BSD-specific crap". As I mentioned
> previously, there is no fadvise() on Linux. There's no gain in
> compatibility by implementing it -- it's just syntactic sugar.
Hmmm, there is an fadvise(2) manpage. I had presumed from that it was
a public interface.
--
John Baldwin
More information about the freebsd-arch
mailing list