[flow-tools] Repost: flow-tools 0.63 and DEC 4.0e compile problems

S Dawalt shane.dawalt@wright.edu
Wed, 29 Jan 2003 09:46:34 -0500


  Perhaps this message got wiped out by the recent list server problem.  So
here it is again:

   I downloaded flow-tools 0.63 and compiled it.  During
compilation I stumbled across a few (resolvable) anomalies
on my DEC Unix 4.0e system.

  Both flow-export.c and flow-import.c use strtouq().  The DEC Unix
4.0e box supports 64-bit ints through strtoul().  I hacked the code
to use strtoul instead.

  In the lib/ftstat.c, strtouq() is used even though STRTOUQ is
undef'd in ftconfig.h.  I made a modification to ftlib.h which
defaults strtouq to strtoul if !HAVE_STRTOUQ and !HAVE_STRTOULL.
Here's a diff:

*** ftlib.h.old Fri Jan 17 08:54:37 2003
--- ftlib.h Fri Jan 17 10:34:03 2003
***************
*** 2878,2883 ****
--- 2878,2885 ----
  #if !HAVE_STRTOUQ
  #if HAVE_STRTOULL
  #define strtouq strtoull
+ #else
+ #define strtouq strtoul
  #endif
  #endif

  And finally, src/Makefile ...

  The LDFLAGS are inserted into the compile commands prior to
"-lft" for each of the flow-tools binaries.  This causes
user-specified libraries to be searched before libft.a thus
giving me unresolved symbols (vsnprintf and snprintf).  To
correct, I modified Makefile.in by removing $(LDFLAGS) from the
LINK macro and inserting $(LDFLAGS) into the command for each
<tool>$(EXEEXT) rule.  I placed $(LDFLAGS) just after the
<tool>_LDADD macro expansion.  It might be best to prepend LDFLAGS
to LIBS as LIBS in the last expansion in the compile command.
I'll let you make that call.


Shane A. Dawalt
********************************************
Network Engineer
Wright State University
Dayton,  OH   45435    USA
Phone:  937-775-4089
Email:  shane.dawalt@wright.edu