From: no AT email DOT addr (Thomas Mulgrew) Newsgroups: comp.os.msdos.djgpp Subject: Winsock.h parse error problem Date: 28 Dec 1997 08:23:50 GMT Organization: The Internet Group Ltd Lines: 24 Message-ID: <6852am$hkb$1@newsource.ihug.co.nz> NNTP-Posting-Host: p37-max27.auck.ihug.co.nz Mime-Version: 1.0 Content-Type: Text/Plain; charset=US-ASCII To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk I'm completely new to socket programming (or windows for that matter), and having a bit of trouble getting started. When I compile a file that #includes winsock.h (using gcc -Zwin32 prog.cpp -c -o prog.o or something along those lines), the compiler reports parse errors while in the winsock.h file. Generated by lines like this: struct hostent FAR * PASCAL FAR gethostbyname(const char FAR * name); And the parse error is reported to be "before __attribute__" I'm not exactly sure what FAR means in a 32bit addressing mode context, but that aside I believe the line is declaring a function 'gethostbyname', to be called using the pascal calling convention, and which returns a pointer to a hostent structure. What I would like to know is: what does 'FAR' mean here (can I throw them out)? Do I need to change winsock.h in order to make it parse properly?, and ultimately, how do I make this file parse? -Tom