Nmap Development mailing list archives

Problem with errno under VS2013


From: Daniel Miller <bonsaiviking () gmail com>
Date: Mon, 24 Nov 2014 20:59:02 -0600

List,

I've run into a problem that I hope someone with more Windows experience
can help me with. In nmap-update, the rename_file function does an unlink,
then a rename. It checks the return value of the unlink call, as well as
the value of errno, since we don't care whether the destination file
existed before the rename.

Unfortunately, errno is not being set. I suspect this may have something to
do with the change in r33798 that altered the way nbase_winunix.h handles
the inclusion of error.h, but it's not straightforward because
nmap-update.c has always included errno.h *before* nbase.h.

When debugging, the pseudo-register @err,hr shows ERROR_FILE_NOT_FOUND with
a value of 2, which corresponds directly to the ENOENT error we are trying
to check for. I just don't understand why it's not being set in errno.

Dan
_______________________________________________
Sent through the dev mailing list
http://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/

Current thread: