CMake: Don't bother testing for _fseeki64 on Windows.

We don't appear to use it and if we ever do need it it's been available
since Visual Studio 2005 / MSVCR80.

Change-Id: Ifd44d78b96a21577ceea635653517a348ded50f7
Reviewed-on: https://code.wireshark.org/review/28778
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
Gerald Combs 2018-07-20 10:26:17 -07:00
parent c78b6cdcef
commit 977f4c2e68
3 changed files with 4 additions and 31 deletions

View File

@ -1,18 +0,0 @@
/*
* This code was copied from http://www.gromacs.org/
* and its toplevel COPYING file starts with:
*
* GROMACS is free software, distributed under the GNU General Public License
* (GPL) Version 2.
*/
#include <stdio.h>
int main(void)
{
__int64 off=0;
_fseeki64(NULL, off, SEEK_SET);
return 0;
}

View File

@ -67,17 +67,11 @@ MACRO(GMX_TEST_LARGE_FILES VARIABLE)
endif(FILE64_OK)
endif(NOT FILE64_OK)
if(NOT FILE64_OK)
# now check for Windows stuff
if(NOT FILE64_OK AND WIN32)
# Visual C++ has supported fseeki64 since Visual Studio 2005 / MSVCR80.
MESSAGE(STATUS "64-bit off_t is not present")
MESSAGE(STATUS "Checking for _fseeki64")
TRY_COMPILE(FILE64_OK "${CMAKE_BINARY_DIR}"
"${CMAKE_SOURCE_DIR}/cmake/TestWindowsFSeek.c")
if(FILE64_OK)
MESSAGE(STATUS "_fseeki64 is present")
set(HAVE__FSEEKI64 1 CACHE INTERNAL "64-bit file offsets require _fseeki64")
endif(FILE64_OK)
MESSAGE(STATUS "_fseeki64 is present")
set(HAVE__FSEEKI64 1 CACHE INTERNAL "64-bit file offsets require _fseeki64")
endif(NOT FILE64_OK)
if(NOT FILE64_OK)

View File

@ -98,9 +98,6 @@ PATH_SPECIFIC_WHITELISTED_LICENSES = {
'cmake/TestFileOffsetBits.c': [
'UNKNOWN',
],
'cmake/TestWindowsFSeek.c': [
'UNKNOWN',
],
# Generated header files by lex/yacc/whatever
'epan/dtd_grammar.h': [
'UNKNOWN',