Начало
This commit is contained in:
15
tests/LargeFiles.c
Normal file
15
tests/LargeFiles.c
Normal file
@ -0,0 +1,15 @@
|
||||
#include <sys/types.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
|
||||
#define VALID_ARRAY_LENGTH 1
|
||||
#define INVALID_ARRAY_LENGTH -1
|
||||
|
||||
int main(int argc, const char **argv)
|
||||
{
|
||||
int a[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? VALID_ARRAY_LENGTH : INVALID_ARRAY_LENGTH];
|
||||
off_t offset = ftello(NULL);
|
||||
fseeko(NULL, offset, SEEK_SET);
|
||||
return 0;
|
||||
}
|
16
tests/LargeFiles64.c
Normal file
16
tests/LargeFiles64.c
Normal file
@ -0,0 +1,16 @@
|
||||
#include <sys/types.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
|
||||
#define VALID_ARRAY_LENGTH 1
|
||||
#define INVALID_ARRAY_LENGTH -1
|
||||
|
||||
int main(int argc, const char **argv)
|
||||
{
|
||||
int a[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? VALID_ARRAY_LENGTH : INVALID_ARRAY_LENGTH];
|
||||
off64_t offset = ftello64(NULL);
|
||||
fseeko64(NULL, offset, SEEK_SET);
|
||||
return 0;
|
||||
}
|
8
tests/LargeFilesWindows.c
Normal file
8
tests/LargeFilesWindows.c
Normal file
@ -0,0 +1,8 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
__int64 off = 0;
|
||||
_fseeki64(NULL, off, SEEK_SET);
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user