2
0
mirror of https://github.com/boostorg/nowide.git synced 2026-01-19 04:22:12 +00:00
Files
nowide/config/check_lfs_support.cpp
Alexander Grund a0327e0b74 Update license headers
Use the more concise format omitting the reference to the license file
and refer to the URL only.
2022-07-13 12:35:54 +02:00

30 lines
580 B
C++

//
// Copyright (c) 2020 Alexander Grund
//
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
#define _LARGEFILE_SOURCE
#ifndef _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS 64
#endif
#include <stdio.h>
void check(FILE* f)
{
#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
(void)_fseeki64(f, 0, SEEK_CUR);
(void)_ftelli64(f);
#else
// Check that those functions and off_t are available
(void)fseeko(f, off_t(0), SEEK_CUR);
(void)ftello(f);
#endif
}
int main()
{
check(nullptr);
}