Mail Archives: cygwin/1999/04/21/07:45:55
Hello,
I have to port a little C program to WindowsNT and I have some problems
with the following 'gethostname' command.
I just want to get the HOSTNAME value using :
- gcc with cygwin32 libs (local compilation)
and - egcs with mingw32 libs (cross-compilation)
None of these both solutions work.
Do you know why the following program can't give me the HOSTNAME value :
---------
main ()
{
char HOSTNAME[4096];
gethostname (HOSTNAME, 4096);
printf("HOST : %s",HOSTNAME) ;
}
---------
NB : it seems that WindowsNT requires to start up the Windows Sockets
API using WSAStartup() . Am I right ?
Thanks in advance ...
Aldo
--
=======================================================================
,',',',',',',' Aldo MAZZILLI | INRIA Rhone-Alpes |
,',',',',',',' aldo DOT mazzilli AT inrialpes DOT fr| 655, avenue de l'Europe |
,',',',',',',' Tel : 04 76 61 53 91 | 38330 Montbonnot St Martin |
,',',',',',',' Fax : 04 76 61 52 52 | FRANCE |
,',' *** Site WEB : http://www.inrialpes.fr/vasy/people/Aldo.Mazzilli |
=======================================================================
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
- Raw text -