delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1998/02/03/03:55:51

From: sos AT prospect DOT com DOT ru (Sergey Okhapkin)
Subject: RE: XEmacs & cygwin.
3 Feb 1998 03:55:51 -0800 :
Message-ID: <01BD30B2.D935DE20.cygnus.cygwin32.developers@gater.krystalbank.msk.ru>
Reply-To: cygwin32-developers AT cygnus DOT com
To: "'Andy Piper'" <andyp AT parallax DOT co DOT uk>
Cc: "'cygwin32-developers AT cygnus DOT com'" <cygwin32-developers AT cygnus DOT com>

Andy Piper wrote:
> Setting h_errno causes a SIGSEGV. Is this a bug in cygwin?

Sure. It's a bug in netdb.h header. Here is the fix:

H:\usr\src\cygnus\cdk\winsup\include>diff -u netdb.h.orig netdb.h
--- netdb.h.orig        Thu Dec 11 12:56:58 1997
+++ netdb.h     Tue Feb 03 14:42:08 1998
@@ -116,7 +116,12 @@
  * (left in extern int h_errno).
  */

+#ifdef  __INSIDE_CYGWIN_NET__
 extern int h_errno;
+#else
+extern int * __imp_h_errno;
+#define h_errno (*__imp_h_errno)
+#endif

 #define        NETDB_INTERNAL -1 /* see errno */
 #define        NETDB_SUCCESS   0 /* no problem */

-- 
Sergey Okhapkin, http://www.lexa.ru/sos
Moscow, Russia
Looking for a job.


- Raw text -


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