From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,9964e371ce0629d5 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-02-17 13:09:51 PST Newsgroups: comp.unix.osf.osf1 Path: gmd.de!newsserver.jvnc.net!nntpserver.pppl.gov!princeton!att-in!csn!magnus.acs.ohio-state.edu!math.ohio-state.edu!sdd.hp.com!decwrl!pa.dec.com!nntpd.lkg.dec.com!ryn.mro.dec.com!lama.lmo.dec.com!suresh From: suresh@lama.lmo.dec.com (Suresh Subramanian) Subject: Re: cxx include files for bsd-socket stuff Message-ID: Keywords: cxx, bsd-socket-lib, gun-to-my-head Sender: news@ryn.mro.dec.com (USENET News System) Reply-To: suresh@lama.lmo.dec.com (Suresh Subramanian) Organization: Digital Equipment Corporation References: <2jue09$4us@spool.cs.wisc.edu> Date: Thu, 17 Feb 1994 21:09:51 GMT All prototypes for all the socket calls were added in OSF/1 V2.0 As an work around (All the usual disclaimers - this info is from Digital internal infobase and not an official Digital recommendation; yata yata ...) Use this code with your socket functions (extended appropriately for any other socket functions you use): extern "C" { bzero(void *, int); gethostname(char *, int); struct servent *getservbyname(char *, char *); struct hostent *gethostbyname(char *); unsigned short htons(unsigned short); unsigned int htonl(unsigned int); /* * socket routines */ accept(int, void *, int *); bind(int, void *, int); connect(int, void *, int); listen(int, int); recv(int, char *, int, int); select(int, fd_set *, fd_set *, fd_set *, struct timeval *); send(int, char *, int, int); setsockopt(int, int, int, char *, int); shutdown(int, int); socket(int, int, int); } Note that these function defs are not in socket.h, or any other system header file, to my knowledge. I'm no language expert, but I think that K+R C will not complain about undefined functions, and defaults them to returning int, and the args don't matter. The linker finds them and everything works. C++ (and strict ansi C) will complain about undefined functions so you get compile errors. Good Luck!