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

Re: flock, FAGAIN, and FWOULDBLOCK



On Mon, Feb 23, 2009 at 04:20, Michael Kerrisk
<mtk.manpages@googlemail.com> wrote:
> * Generally POSIX requires that each error name must have  distinct
> associated value.  EAGAIN and EWOULDBLOCK are one of the few
> exceptions: POSIX permits, but does not require, that these error
> constants have the same value.  On most systems they of course do have
> the same value.  HP-UX is the most notable exception.

And VxWorks (which is probably used more than HP-UX).

Causes interesting compiler problems when porting code from VxWorks to
Linux that has

     case -EGAIN:
     case -EWOULDBLOCK:

Oops, duplicate case value...

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


Reply to: