delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/10/14/01:56:34

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <001701bf1608$d0e23ba0$028891c2@shadow.sk>
From: =?iso-8859-2?B?TWFyY2VsIE1var5puQ==?= <marcel AT shadow DOT sk>
To: <cygwin AT sourceware DOT cygnus DOT com>
Subject: mingw32 and winsocks
Date: Thu, 14 Oct 1999 07:56:10 +0200
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2014.211
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211

Hi all,

I have a question about using winsocks with mingw32. I compiled libpq
frontend library using mingw32 (gcc 2.95). There was no problem with the
compilation still no program connected to my DB. I tried to debug it with
gdb but I wasn't very succesful - gdb always faild with "Invalid
operation..." message. Finally I discovered that gethostbyname function
didn't work - it always returned NULL.
So I wrote a short program ...

#include <stdio.h>
#include <windows.h>

void main() {
        if (gethostbyname("www.microsoft.com") == NULL) {
                printf("failed...");
        }
}

...and it failed too.

Do you have an idea what's wrong ??

Thanks in advance
Marcel


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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