changeset 3:c7c914a43c06

fix errno conflict (twice?)
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Wed, 29 Jan 2025 12:37:44 +0000
parents 45f98bfd1dfb
children a5ac7c5c6917
files error.c
diffstat 1 files changed, 18 insertions(+), 94 deletions(-) [+]
line wrap: on
line diff
--- a/error.c	Wed Jan 29 12:37:00 2025 +0000
+++ b/error.c	Wed Jan 29 12:37:44 2025 +0000
@@ -1,109 +1,33 @@
+/* warning: as coverage improves here, should update error_{str,temp} */
 #include <errno.h>
-#include "error.h"
-
-/* warning: as coverage improves here, should update error_{str,temp} */
-
-int error_intr =
-#ifdef EINTR
-EINTR;
-#else
--1;
-#endif
 
-int error_nomem =
-#ifdef ENOMEM
-ENOMEM;
-#else
--2;
-#endif
+int error_intr = EINTR;
 
-int error_noent = 
-#ifdef ENOENT
-ENOENT;
-#else
--3;
-#endif
+int error_nomem = ENOMEM;
 
-int error_txtbsy =
-#ifdef ETXTBSY
-ETXTBSY;
-#else
--4;
-#endif
+int error_noent = ENOENT;
 
-int error_io =
-#ifdef EIO
-EIO;
-#else
--5;
-#endif
+int error_txtbsy = ETXTBSY;
 
-int error_exist =
-#ifdef EEXIST
-EEXIST;
-#else
--6;
-#endif
+int error_io = EIO;
 
-int error_timeout =
-#ifdef ETIMEDOUT
-ETIMEDOUT;
-#else
--7;
-#endif
+int error_exist = EEXIST;
+
+int error_timeout = ETIMEDOUT;
 
-int error_inprogress =
-#ifdef EINPROGRESS
-EINPROGRESS;
-#else
--8;
-#endif
+int error_inprogress = EINPROGRESS;
 
-int error_wouldblock =
-#ifdef EWOULDBLOCK
-EWOULDBLOCK;
-#else
--9;
-#endif
+int error_wouldblock = EWOULDBLOCK;
 
-int error_again =
-#ifdef EAGAIN
-EAGAIN;
-#else
--10;
-#endif
+int error_again = EAGAIN;
 
-int error_pipe =
-#ifdef EPIPE
-EPIPE;
-#else
--11;
-#endif
+int error_pipe = EPIPE;
 
-int error_perm =
-#ifdef EPERM
-EPERM;
-#else
--12;
-#endif
+int error_perm = EPERM;
 
-int error_acces =
-#ifdef EACCES
-EACCES;
-#else
--13;
-#endif
+int error_acces = EACCES;
 
-int error_nodevice =
-#ifdef ENXIO
-ENXIO;
-#else
--14;
-#endif
+int error_nodevice = ENXIO;
 
-int error_proto =
-#ifdef EPROTO
-EPROTO;
-#else
--15;
-#endif
+int error_proto = EPROTO;
+