News for hackers. Stuff that matters.
Re:R3 – High-performance URL router library in C by pedro93 on Saturday May 17, 2014 @11:23PM (#7762038)
The behavior of (strndiff / strdiff) is different from strncmp or strcmp. strn?cmp does not return the offset. they are different functions.

and in order to ship this package to deb, deploy to different platform, use autotools to test C features is a requirement. (we used to build the project with cmake before we use autotools)

Re:R3 – High-performance URL router library in C by nwmcsween on Saturday May 17, 2014 @11:47PM (#7762088)
Reading it again strdiff is the same as strspn, but your's doesn't actually handle c strings and reads past null. You can do feature tests yourself without pulling in the whole autotools mess: http://git.musl-libc.org/cgit/musl/tree/configure
Re:R3 – High-performance URL router library in C by pedro93 on Sunday May 18, 2014 @01:54AM (#7762309)
Thanks! that helps!
Re:R3 – High-performance URL router library in C by shadowmint on Sunday May 18, 2014 @03:09AM (#7762426)
Is it still possible to build using cmake?

I too reliably avoid libraries that depend on these old bloated tools (although I appreciate its helpful for packaging; the script complexity and lack of portability is undeniably a trade off cost in using automake; the usefulness of this library for me would be for a static embedded use case, where automake is of questionable value)

Re:R3 – High-performance URL router library in C by pedro93 on Monday May 19, 2014 @01:07AM (#7765797)
well. implementing these feature testing scripts is kinda waste of time. so I rather to pick up autotools, which provides a integrated features.

to use it for a static embedded use case, you may write your own build script to compile the library (it's not hard to write one). the cflags are describe in src/Makefile.am

and you can use pkg-config to list the flags you need.

Re:R3 – High-performance URL router library in C by danudey on Sunday May 18, 2014 @02:16PM (#7763784)
One thing you might want to consider (or might not) is looking at Mongrel 2. It uses ANSI C and supports a variety of platforms, using only gmake and standard macros. I haven't looked at the code very much myself, but it's a pretty neat accomplishments.