Alain Magloire <[EMAIL PROTECTED]> wrote:

> I believe ECANCELED is an error number define by POSIX and accepted on
> almost all systems.

Yes, POSIX defines it indeed.

> The only problematic platform I remember was Cygwin,
> maybe the configure script should try and reset that number to something
> else
> 
> #define ECANCELED EINTR
> #define ECANCELED EACESS

This is potentially dangerous. Imagine the following code snippet:

switch (rc)
 {
  case ECANCELED:
     do_it();
     break;

  case EINTR:
     do_that();
     break;
 }

If we define ECANCELED to EINTR, cc will report a `duplicate case value'
error.
 
> #define ECANCELED 100000

Well, it is possible. We could use our MU_ERR_BASE for that, e.g.

#define ECANCELED (MU_ERR_BASE+300)

However, I'd like to find out more meaningful alternative.

Regards,
Sergey


_______________________________________________
Bug-mailutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-mailutils

Reply via email to