cvs commit: fptools/libraries/network Makefile fptools/libraries/ network/Network Socket.hsc fptools/libraries/network/cbits HsNet.c fptools/libraries/network/include HsNet.h

Simon Marlow simonmar@glass.cse.ogi.edu
Fri, 18 Oct 2002 08:26:29 -0700


simonmar    2002/10/18 08:26:29 PDT

  Modified files:
    libraries/network    Makefile 
    libraries/network/Network Socket.hsc 
    libraries/network/include HsNet.h 
  Added files:
    libraries/network/cbits HsNet.c 
  Log:
  It is better not to use #def in .hsc files, otherwise we have to
  arrange to include the appropriate _hsc.h file in the package.
  
  There was one use of #def in Network.Socket: my_inet_ntoa, and because
  of a bug in the build system the _hsc.o file wasn't being included in
  the library when SPLIT_OBJS is on.  The result is that if you compile
  against the net package in 5.04.1 and turn on optimisation (so that
  inet_ntoa gets inlined), you get a link error.
  
  This commit moves my_inet_ntoa into the HsNet.h header file, and keeps
  a static version in the library just in case the compiler fails to
  inline it (the same way we do it for all the inline functions in the
  base package).
  
  Revision  Changes    Path
  1.15      +5 -3      fptools/libraries/network/Makefile
  1.28      +0 -2      fptools/libraries/network/Network/Socket.hsc
  1.8       +13 -1     fptools/libraries/network/include/HsNet.h