Re: socket library and gettimeofday function
Posted in 1995
This is bug B31977: C4GL LINKS LIBSOCKET.A WHICH IS NOT STANDARD ON SCO, BCOPY() UNDEFINED c4gl script links libsocket.a which is not delivered in the standard SCO package. Maybe should we use bycopy() instead of bcopy(). (genlib rdtime.c) If you are getting gettimeofday() undefined, then any of your time-keeping code using DATETIME and CURRENT is unlikely to work correctly. It depends, in part, on how good a dummy you have provided. The bug report identifies bcopy() as the missing function rather than gettimeofday(). An operational bcopy() can be created using: #include <string.h> void bcopy(src, dst, nbytes) char *src; char *dst; int nbytes; { memmove(dst, src, nbytes); } Note the use of memmove() -- bcopy() is defined to be safe on overlapping strings, and so is memmove(). It is not safe to memcpy() instead of memmove(). Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> >From: wlodek@aquila.ichp.waw.pl >Date: Thu, 16 Feb 1995 11:04:17 CET >X-Informix-List-Id: <news.11608> > >We have just moved to 4GL v.4.12.UE1 under the SCO UNIX 3.2v.4.2. >Then we try to compile anything ld fails because he cant' find the >libsocket.a library which is expected by the -l socket in c4gl script. >There is not such library in our system (we have full development >installed). When we removed -l socket from c4gl we've got undefined >"gettimeofday" symbol reference in libfesql.a. >For the while we've just patched the library with dummy >gettimeofday. > >Can anyone tell us what's going on ? >TIA.