• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 //  Copyright (c) 2020 Alexander Grund
3 //
4 //  Distributed under the Boost Software License, Version 1.0. (See
5 //  accompanying file LICENSE or copy at http://www.boost.org/LICENSE.txt)
6 //
7 
8 #define _LARGEFILE_SOURCE
9 #ifndef _FILE_OFFSET_BITS
10 #define _FILE_OFFSET_BITS 64
11 #endif
12 
13 #include <stdio.h>
14 
check(FILE * f)15 void check(FILE* f)
16 {
17 #if defined(_WIN32) && !defined(__CYGWIN__)
18     (void)_fseeki64(f, 0, SEEK_CUR);
19     (void)_ftelli64(f);
20 #else
21     // Check that those functions and off_t are available
22     (void)fseeko(f, off_t(0), SEEK_CUR);
23     (void)ftello(f);
24 #endif
25 }
26 
main()27 int main()
28 {
29     check(nullptr);
30 }
31