Hi,
Jeff Chan wrote:
Christian Stigen Larsen reports:
"I've made a simple C commandline program to query multi.surbl.org
I'd be very happy to receive comments. The program is available from http://surblhost.sourceforge.net (source only)."
I'm sending a little patch attached (configure.ac). It's needed to correct three small things :
- under solaris, this program shall also be linked against libnsl and libsocket
- you've hardcoded CFLAGS and LDFLAGS (-Wall) specific to gcc compiler. So, your program can't be build using other compilers. These flags are usually used as environnement variables. Things like : env CFLAGS="-Wall" ./configure
- functions shall be checked after libraries, as some of them depend on libraries. E.g., on my system, your configure script couldn't detect the existence of gethostbyname as this function is defined at libresolv, and as configure hadn't yet checked the library, the function wasn't found.
About the program itself, you hardcoded tlds and whitelists inside your program. So, if these lists change, your program shall be recompiled. IMHO, it's better to put them in some place (/usr/local/share/...).
The other comment regards the programming language. I program most things I need in C, and I digged into your source - it's well coded. But, IMHO, this is a kind of program easier to do in perl, mainly in the way you want to handle input parameters and print results.
And... it's a nice tool - thanks.
Jose-Marcio