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

Enable out-of-tree builds. autoconfigure a clock for clock_gettime. … #48

Closed pooryorick closed 8 years ago

pooryorick commented 8 years ago

… Modify

myexec to not die on stderr output. Comment out net/ethernet.h include, which seems to be unnecessary, and isn't available under Cygwin.

bovine commented 8 years ago

I think net/ethernet.h was necessary for the MAC Address column type? Adding a AC_CHECK_HEADER for that file might be a better option.

resuna commented 8 years ago

If you never use the "mac" type, this will never be referenced.

In cygwin, where are these defined/declared?

struct ether_addr ether_aton ether_ntoa

bovine commented 8 years ago

@pooryorick Can you find out where cygwin defines those structs/typedefs?

resuna commented 8 years ago

@pooryorick I'd like to get this pulled in, for the clock changes, but we can't just kill net/ethernet.h ... we could merge and then undo that part of the patch if you can't provide an alternative.

bovine commented 8 years ago

One other user reports that no default cygwin headers include anything named "ether_*"

So it may be necessary to make the MAC Address column type become unavailable on such platforms, or define a substitute datatype and our own conversion functions.

resuna commented 8 years ago

Well, I can add this to configure.in:

AC_CHECK_HEADER(net/ethernet.h,[CTABLES_CFLAGS="$CTABLES_CFLAGS -DHAVE_NET_ETHERNET_H=1"])

And I can add this to ctable.h:

ifdef HAVE_NET_ETHERNET_H

include <net/ethernet.h>

endif

That will at least avoid compilation problems if you're not using MAC addresses.

On Thu, Jul 7, 2016 at 12:53 PM, Jeff Lawson notifications@github.com wrote:

One other user reports that no default cygwin headers include anything named "ether_*"

So it may be necessary to make the MAC Address column type become unavailable on such platforms, or define a substitute datatype and our own conversion functions.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/flightaware/speedtables/pull/48#issuecomment-231156468, or mute the thread https://github.com/notifications/unsubscribe/AAF0Oj53aeK6d_Imd-cHkJn83tIcUi1Oks5qTT0zgaJpZM4GMqWQ .

resuna commented 8 years ago

Looks like the three symbols that need to be defined for mac types to work are ether_aton, ether_ntoa, and struct ether_addr.

resuna commented 8 years ago

According to GNUlib documentation, the ether_* functions are missing on HP-UX 11, Cygwin, mingw, MSVC 9, Interix 3.5, and BeOS.

resuna commented 8 years ago

Implemented an "ethers.c" for platforms that don't have the ether_* functions. Added mac-ip tests into default configuration.