Thu Apr 16 13:13:24 1998 Jason Molenda (crash@bugshack.cygnus.com)
authorJason Molenda <jmolenda@apple.com>
Thu, 16 Apr 1998 20:14:51 +0000 (20:14 +0000)
committerJason Molenda <jmolenda@apple.com>
Thu, 16 Apr 1998 20:14:51 +0000 (20:14 +0000)
        * rdi-share/etherdrv.c (EthernetWrite): Use strerror to get
        error string if in an ANSI C-ish environment.

gdb/ChangeLog
gdb/rdi-share/etherdrv.c

index aabd63a..38e372f 100644 (file)
@@ -1,3 +1,8 @@
+Thu Apr 16 13:13:24 1998  Jason Molenda  (crash@bugshack.cygnus.com)
+
+       * rdi-share/etherdrv.c (EthernetWrite): Use strerror to get
+       error string if in an ANSI C-ish environment.
+
 Wed Apr 15 18:59:48 1998  Mark Alexander  <marka@cygnus.com>
 
        * sparc-tdep.c (SPARC_HAS_FPU): Define.
index 46eeaf4..58462d4 100644 (file)
@@ -662,12 +662,17 @@ static int EthernetWrite(DriverCall *dc)
 #ifdef DEBUG
             perror("sendto");
 #endif
+
 #ifdef COMPILING_ON_WINDOWS
             panic("ethernet send failure\n");
 #else
             /* might not work for Windows */
             panic("ethernet send failure [%s]\n",
+#ifdef STDC_HEADERS
+                 strerror(errno));
+#else
                   errno < sys_nerr ? sys_errlist[errno] : "unknown errno");
+#endif /* STDC_HEADERS */
 #endif
         }
 #ifdef DEBUG