b35a89101508d6cf88c8b3f930d5005036e1b39c
3 * Copyright (C) 2011 Team XBMC
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with XBMC; see the file COPYING. If not, write to
18 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
19 * http://www.gnu.org/copyleft/gpl.html
23 #pragma warning(disable:4005) // Disable "warning C4005: '_WINSOCKAPI_' : macro redefinition"
25 #pragma warning(default:4005)
28 #include "../pthread_win32/pthread.h"
29 #include "../pthreads.h"
32 #if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64
33 # define __USE_FILE_OFFSET64 1
36 typedef signed __int32
int32_t;
37 typedef signed __int64
int64_t;
38 typedef unsigned __int8
uint8_t;
39 typedef unsigned __int16
uint16_t;
40 typedef unsigned __int32
uint32_t;
41 typedef unsigned __int64
uint64_t;
43 #if defined __USE_FILE_OFFSET64
44 typedef int64_t off_t
;
45 typedef uint64_t ino_t
;
48 #define usleep(t) Sleep((t)/1000)
49 #define snprintf _snprintf
53 #if defined(_MSC_VER) /* Microsoft C Compiler ONLY */
54 #pragma warning (push)
56 /* prevent inclusion of wingdi.h */
58 #if defined(_MSC_VER) /* Microsoft C Compiler ONLY */
67 int tz_minuteswest
; /* minutes west of Greenwich */
68 int tz_dsttime
; /* type of dst correction */
72 \brief implements similar unix call under windows
73 \return 0 on success, -1 on failure (if pcur_time was NULL)
74 \param pcur_time points to a timeval structure, should not be NULL
75 \param tz points to a timezone structure, may be NULL
77 extern int gettimeofday(struct timeval
*pcur_time
, struct timezone
*tz
);