aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/parser/pg_wrapper/win32_pg_compat.h
blob: 45ca931505db148945eb9d45a35fcbe0d70acdd5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once

/* required to prevent double definition of struct stat on WIN64 */
#if defined _VCRT_BUILD || defined _CORECRT_BUILD
#include <sys/stat.h>
#else

#define _CRT_NO_TIME_T
#include <sys/stat.h>
#undef _CRT_NO_TIME_T

/* copied from sys/stat.h
   need'em here due to disabled _CRT_NO_TIME_T */
#ifdef _USE_32BIT_TIME_T
    typedef __time32_t time_t;
#else
    typedef __time64_t time_t;
#endif

#endif

#undef fstat
#undef stat