Wireshark-dev: [Wireshark-dev] io.h include guards

From: Graham Bloice <graham.bloice@xxxxxxxxxxxxx>
Date: Thu, 5 Nov 2015 21:44:55 +0000
README.developer states
 
Don't include <unistd.h> without protecting it with
    #ifdef HAVE_UNISTD_H
        ...
    #endif
and, if you're including it to get routines such as "open()", "close()",
"read()", and "write()" declared, also include <io.h> if present:
    #ifdef HAVE_IO_H
    #include <io.h>
    #endif
 
 so looking at io.h, it's included by 5 files, only one of which (ascend_scanner.c) adds the HAVE_IO_H guard, all the others use a _WIN32 guard.

ConfigureChecks.cmake doesn't run a check for io.h, and cmakeconfig.h.in doesn't have a #cmakdefine for HAVE_IO_H.

What's the best way to make this all consistent, fix CMake and the _WIN32 guards to use HAVE_IO_H, or change the docs and ascend_scanner to use _WIN32?


--
 
Graham Bloice