Nmap Development mailing list archives
Re: <netdb.h> in nsock/src/
From: Henri Doreau <henri.doreau () gmail com>
Date: Wed, 1 May 2013 17:14:13 +0200
Hello, 2013/5/1 Gisle Vanem <gvanem () broadpark no>:
It looks good. But there are more problems in the nsock/src/*proxy*.c files regarding support for my "old" MSVC.
Ok, I've applied it as of r30821. Let's fix things step by step.
I use ver. 16.00 from VC-Express 2010 which should still be good enough for nmap-development. In proxy_socks4.c + proxy_http.c you use GCC features like: /* ---- PROXY DEFINITION ---- */ static const struct proxy_op ProxyOpsHttp = { .node_new = proxy_http_node_new, .node_delete = proxy_http_node_delete, .handler = proxy_http_handler, }; This is no good for MSVC. I'll address the other MSVC problems later.
Waw, that terribly sucks! C99 designated initializers are neither new nor GNU-specific... I didn't find anything on the web about proper C99 support by MSVC. Do you confirm? If so I'll change that to use traditional initialization, which I find less readable.
Concerning strtok_r, would it be ok to simply #define strtok_r strtok_s?Why not add a macro for this to nbase.h? As we do for strcasecmp() etc? But using 'strtok_s' would exclude MingW users. This is a pity IMHO. I suggest adding the attached patch for 'strtok_r' to nbase_str.c. (ripped from libcurl). So you should add a configure test for 'HAVE_STRTOK_R'. I have little knowledge of autotools.
Yes, nbase is probably the place where to put this. Though I don't get what's the problem with MingW users? How does compilation work for them? Which symbols do they have access to? I'm a bit reluctant to add a function that's already available everywhere (under different names). Thanks for your help. Regards -- Henri _______________________________________________ Sent through the dev mailing list http://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
Current thread:
- <netdb.h> in nsock/src/ Gisle Vanem (Apr 30)
- Re: <netdb.h> in nsock/src/ Henri Doreau (Apr 30)
- Re: <netdb.h> in nsock/src/ Gisle Vanem (May 01)
- Re: <netdb.h> in nsock/src/ Henri Doreau (May 01)
- Re: <netdb.h> in nsock/src/ Gisle Vanem (May 01)
- Re: <netdb.h> in nsock/src/ Henri Doreau (May 01)
- Re: <netdb.h> in nsock/src/ Patrick Donnelly (May 01)
- Re: <netdb.h> in nsock/src/ Gisle Vanem (May 01)
- Re: <netdb.h> in nsock/src/ Henri Doreau (Apr 30)
- Re: <netdb.h> in nsock/src/ Henri Doreau (May 02)