From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3858a89a714886ac X-Google-Attributes: gid103376,public From: dennison@telepath.com Subject: Re: GNAT sockets Date: 1998/12/30 Message-ID: <76e97t$f0g$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 427231279 References: <368a76d8.0@dial-in.encomix.es> X-Http-Proxy: 1.0 x7.dejanews.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Wed Dec 30 22:25:06 1998 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.5 [en] (WinNT; I) Date: 1998-12-30T00:00:00+00:00 List-Id: In article <368a76d8.0@dial-in.encomix.es>, "Daniel Fanjul" wrote: > Hello, > > I wrote this code to be compiled with GNAT (for Windows 95): > > #include "windows.h" > #include "windows32\sockets.h" > > int main () { > SOCKET s; > > s = socket (AF_INET, SOCK_STREAM, 0); > printf ("%d", s); > return 0; > } > > The output was -1. > > Can anybody help me? Oddly enough, -1 means you got an error. There should be a code in errno specifing exactly what error you got. The information I just gave you, along with the information you will need to decipher the errno value should be in your win32 documentation, or a good book on sockets. As an aside, there's a little-known feature of Gnat that allows you to compile Ada code with it. You really ought to try it out. ;-) -- T.E.D. -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own