Sender: vheyndri AT rug DOT ac DOT be Message-Id: <35051AA4.C23@rug.ac.be> Date: Tue, 10 Mar 1998 11:49:08 +0100 From: Vik Heyndrickx Mime-Version: 1.0 To: Eli Zaretskii Cc: "Salvador Eduardo Tropea (SET)" , djgpp-workers AT delorie DOT com Subject: Re: errno constants in References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk Eli Zaretskii wrote: > > On Mon, 9 Mar 1998, Salvador Eduardo Tropea (SET) wrote: > > > It sounds better than having an errno too different than the UNIX one. > > I would definitely NOT change errno. Too many programs say things like > "if (errno == EEXIST)" etc. EEXIST has also a DOS error code equivalent. * There are unix/bsd error codes that do NOT have a DOS equivalent. * There are DOS error codes that do NOT have a unix/bsd equivalent. There is a problem in either direction for translating them, and we cannot always return EACCESS, can we. > > And perhaps (if no so much overhead is involved) we can even have both > > errno styles selectable through some variable. > > Is there really a need for this option? If we have both errno and > _dos_errno, an application could test both of them if it needs. Even if there were a need, it cannot be supported. It is no use to ask whether there is a need. > Portability (both to Posix and DOS compilers) is served well by having > both of these separate. Agreed. What could the problems be with _dos_errno being a global variable? Could this not break code that calls library functions from within interrupts? -- \ Vik /-_-_-_-_-_-_/ \___/ Heyndrickx / \ /-_-_-_-_-_-_/