diff options
| author | Richard M. Stallman <rms@gnu.org> | 1994-07-25 20:47:20 +0000 |
|---|---|---|
| committer | Richard M. Stallman <rms@gnu.org> | 1994-07-25 20:47:20 +0000 |
| commit | e24f1d5575f04ba4c285b587817efecbb6b6ed10 (patch) | |
| tree | 3ca377b637772af7d9fba00054768d585a996a77 /src/sysdep.c | |
| parent | 0f0ed96e060b54dcac8f7f94ce24cbfd422da6a2 (diff) | |
| download | emacs-e24f1d5575f04ba4c285b587817efecbb6b6ed10.tar.gz | |
[!HAVE_H_ERRNO]: Declare h_errno.
(init_system_name): Set h_errno to 0 initially.
Diffstat (limited to 'src/sysdep.c')
| -rw-r--r-- | src/sysdep.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/sysdep.c b/src/sysdep.c index 0bb7b14826a..828ec00f619 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -59,6 +59,10 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #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 @@ init_system_name () 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)) |
