flightaware / speedtables

Speed tables is a high-performance memory-resident database. The speed table compiler reads a table definition and generates a set of C access routines to create, manipulate and search tables containing millions of rows. Currently oriented towards Tcl.
https://flightaware.github.io/speedtables/
BSD 3-Clause "New" or "Revised" License
65 stars 15 forks source link

Don't assume runtime libpq location (and fix other Nix compatibility issues) #79

Closed agbrooks closed 3 years ago

agbrooks commented 3 years ago

This PR makes a few changes in order to add pgtcl support to our internal speedtables Nix package:

  1. Set the libpq lib directory with pg_config, just like we do for the include directory.
  2. Follow symlinks when finding the pgtcl directory.
  3. Fix a strncpy invocation that risks clobbering a string terminator. This triggers a stringop-truncation warning for recent versions of gcc. If I'm not mistaken, there's at least one place where we could have been bitten by this.