This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: errno.h: ESTRPIPE


Corinna Vinschen wrote:
On Mar 16 08:29, Ralf Corsepius wrote:
Corinna Vinschen wrote:
This error code is used in sound-related code which Yaakov is trying to
port to Cygwin.  After a discussion on the cygwin-patches mailing list,
we decided to add this error code.
Ouch ... bad decision.

Patch applied.
Please ifdef __CYGWIN__ it or revert it.

newlib should stay with well established standards and not be polluted with underdocumented, proprietary extensions.

The error code is used at least in Linux and Solaris.
It's not part of any POSIX or other standard I am aware about.

If there should be one, please point me to it.

If we generate
our own Cygwin-specific error codes we will at one point have a errno
list where the same error code is used for different purposes on
different systems.  I don't see that this gains anybody anything.

I don't have much of a problem with Cygwin wanting to adopt other OS's proprietary extensions. But this is not what your patch is doing.


Your patch is infecting newlib with Cygwin's wish to generalize ESTRIPE. This is wrong. ESTRIPE is a non-standardized and OS-specific extension, and therefore should be treated as such (i.e. #ifdef'ed).

C.f. the patch below.

Ralf


Index: libc/include/sys/errno.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/include/sys/errno.h,v
retrieving revision 1.14
diff -u -r1.14 errno.h
--- libc/include/sys/errno.h	15 Mar 2009 13:41:46 -0000	1.14
+++ libc/include/sys/errno.h	16 Mar 2009 15:32:56 -0000
@@ -151,8 +151,10 @@
 #define ECANCELED 140	/* Operation canceled */
 #define ENOTRECOVERABLE 141	/* State not recoverable */
 #define EOWNERDEAD 142	/* Previous owner died */
+#ifdef __CYGWIN__
+/* Non-POSIX extension */
 #define ESTRPIPE 143	/* Streams pipe error */
-
+#endif
 
 /* From cygwin32.  */
 #define EWOULDBLOCK EAGAIN	/* Operation would block */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]