mingw with gcc 3.2
Code:
D:\dnsresol>gcc -c nslook.c -o nslook.o -Wall
nslook.c: In function `main':
nslook.c:225: warning: int format, long unsigned int arg (arg 2)
nslook.c:226: warning: int format, long unsigned int arg (arg 2)
nslook.c:227: warning: int format, long unsigned int arg (arg 2)
nslook.c:228: warning: int format, long unsigned int arg (arg 2)
nslook.c:229: warning: int format, long unsigned int arg (arg 2)
nslook.c:65: warning: unused variable `x'
i believe you should use %li. %i expects an int, and on systems where ints are only 16 bits, it won't work right.
other than that, usage of argv[0] in your little help screen should be discouraged, because it can possibly contain nothing depending on system.
i skimmed through the code very quickly, overall seems ok.
btw this is how i compiled it:
Code:
gcc -c nslook.c -o nslook.o -Wall
gcc -c dnsResolv.c -o dnsResolv.o -Wall
gcc -mconsole -Wall -s nslook.o dnsResolv.o -o nslook.exe -lwsock32