changeset 8330:60adc323cfe7

[!HAVE_H_ERRNO]: Declare h_errno. (init_system_name): Set h_errno to 0 initially.
author Richard M. Stallman <rms@gnu.org>
date Mon, 25 Jul 1994 20:47:20 +0000
parents 49a8b5185da4
children 14ddb4c66461
files src/sysdep.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/sysdep.c	Mon Jul 25 20:46:46 1994 +0000
+++ b/src/sysdep.c	Mon Jul 25 20:47:20 1994 +0000
@@ -59,6 +59,10 @@
 #undef fwrite
 #endif
 
+#ifndef HAVE_H_ERRNO
+extern int h_errno;
+#endif
+
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -2040,6 +2044,9 @@
       int count;
       for (count = 0; count < 10; count++)
 	{
+#ifdef TRY_AGAIN
+	  h_errno = 0;
+#endif
 	  hp = gethostbyname (hostname);
 #ifdef TRY_AGAIN
 	  if (! (hp == 0 && h_errno == TRY_AGAIN))