bug-mailutils
[Top][All Lists]
Advanced

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

RE: [bug-mailutils] Error still persists after more than a year.


From: Sergey Poznyakoff
Subject: RE: [bug-mailutils] Error still persists after more than a year.
Date: Fri, 14 Oct 2005 23:53:21 EEST

Alain Magloire <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]