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
Hi,
Den 17. aug. 2006 kl. 10.16 skrev Jose Marcio Martins da Cruz:
I'm sending a little patch attached (configure.ac). It's needed to correct three small things :
Thanks a bunch!
But I couldn't find any attachment, at least in my mailer.
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/...).
I'll fix this. It is always a bit dirty to hardcode data.
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.
Very true. There is indeed a very nice such utility written in perl, but the depend-install broke on my system. :/ I wrote surblhost since I couldn't find any stand-alone version written in C.
And... it's a nice tool - thanks.
Thanks again for your suggestions. This is what open source is all about!
-- Christian Stigen Larsen, http://csl.sublevel3.org
Hi,
with the comments and patch from Jose Marcio Martins da Cruz I've released a new version of surblhost, available from:
http://surblhost.sourceforge.net
This version includes the configure-patch from Jose, as well as the ability to load whitelists and two-level TLDs.
The old lists are still there (and hardcoded), but now you can at least override them. I will phase out the hardcoded lists in the future, so they will reside in /usr/local/share or something like that.
Cheers, and have a great weekend!
-- Christian Stigen Larsen, http://csl.sublevel3.org