Problems with "errno" and "h_errno"

Nazaroff Alexey NAZARETH@prima.tu-chel.ac.ru
Tue Mar 11 22:22:00 GMT 1997


   1. Problem Description

   While building WGET-1.4.3 I faced some problems concerning
"non-traditional" definition of "errno" and "h_errno" in the  headers
shipped with B17.1. Namely, <errno.h> (I mean <sys/errno.h>)
contains #define of "errno" as a kind of functional call.
Thus, old-fashioned programs containing
   ...
   extern int errno;
   ...
       instead of
   ...
   #include <errno.h>
   ...
       pass compilation OK, but linker reports numerous unresolved
references to symbol "errno" (this error occurs, for instance, in
ftp.c and http.c from original WGET-1.4.3 distribution).

   However, this problem was easy to solve, and error with "h_errno"
appeared to be more annoying. Among 3 files containing definition
of "h_errno" one of them (namely <netdb.h>) contains the same buggy
"extern int h_errno;" , the two others (<mywinsock.h> and
<Windows32/sockets.h>) contain
   ...
   #define  WSAGetLastError()
   ...
   That fact forces the *NIX program to use Windows Sockets directly,
and I consider it too bulky.

   2. Consideration | Deliberation | Discussion

   This is my first experience, my first message, since I've obtained
this Beta17.1 only 2 weeks ago. I anchor my hopes on this project,
because 1) only it can compete with commercial environments, 2) it is
of great use in porting "mathematics" written for Sun, SGI and other
powerful platforms. So I beg your pardon if I outline a problem that
is already solved or it can be solved rapidly. Looking (carefully,
I hope) through mailing lists, I didn't find anyone who encountered
such a problem. I understand, that absence of discussion may indicate
that the problem is quite negligible.
   Porting of numerous FTP-oriented applications to Win[95 NT] is
very interesting and useful task, so any information, solutions and
recommendations on this subject is of great use for me (I hope I'm
not alone with my problems).
   Solutions on making GNU "configure" mechanism work on non-UNIX
machines with non-UNIX layout of directories are also very helpful.

   Thank you anyway,
   
   Alex G. Nazaroff
   
   nazareth@prima.tu-chel.ac.ru
   Chelyabinsk State Tech,
   Russia
   






   
-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".



More information about the Cygwin mailing list