delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1999/01/29/03:24:57

From: corinna DOT vinschen AT cityweb DOT de (Corinna Vinschen)
Subject: Patch to 990126: errno.cc
29 Jan 1999 03:24:57 -0800 :
Message-ID: <36B18BB4.FAB7717B.cygnus.cygwin32.developers@cityweb.de>
Mime-Version: 1.0
To: cygwin32-developers AT cygnus DOT com, DJ Delorie <dj AT delorie DOT com>

Hi!

This patch handles two more Windows errors, which are possible in device 
handling, in a cleaner way, than before. It implies an additional entry in 

	newlib/libc/include/sys/errno.h

to support ENOMEDIUM like Linux.

Regards,
Corinna


ChangeLog:
==========

Thu Jan 28 11:00:00  Corinna Vinschen  <corinna DOT vinschen AT cityweb DOT de>

        * errno.cc: Support for Windows errors ERROR_CRC and ERROR_NO_READY
        and for error ENOMEDIUM.


--- newlib/libc/include/sys/errno.h.orig        Thu Jan 21 11:12:34 1999
+++ newlib/libc/include/sys/errno.h     Fri Jan 29 11:17:11 1999
@@ -145,2 +145,3 @@ extern int *__imp__sys_nerr;
 #define ENOTSUP 134
+#define ENOMEDIUM 135

Index: errno.cc
===================================================================
RCS file: /src/cvsroot/winsup-990126/errno.cc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -1 -r1.1 -r1.2
--- errno.cc    1999/01/29 09:33:41     1.1
+++ errno.cc    1999/01/29 09:42:08     1.2
@@ -101,2 +101,4 @@ errmap[] =
   X (POSSIBLE_DEADLOCK,                EDEADLOCK),
+  X (CRC,                       EIO),
+  X (NOT_READY,                 ENOMEDIUM),
   { 0, NULL, 0}
@@ -275,2 +277,4 @@ extern const char __declspec(dllexport)
 /* ESTALE 133 */ "Stale NFS file handle",
+/* ENOTSUP 134 */   "134",
+/* ENOMEDIUM 135 */ "no medium"
 };
@@ -643,2 +647,5 @@ strerror (int errnum)
       error = "errno ENOTSUP triggered";
+      break;
+    case ENOMEDIUM:
+      error = "no medium";
       break;


- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019