File: mingw_time.h

package info (click to toggle)
emacs25 25.1%2B1-4%2Bdeb9u1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 131,428 kB
  • ctags: 97,538
  • sloc: lisp: 1,107,716; ansic: 305,108; objc: 16,577; makefile: 5,931; sh: 2,547; perl: 1,567; yacc: 1,566; cpp: 1,287; xml: 1,110; php: 1,035; pascal: 1,011; python: 831; cs: 770; ada: 725; awk: 640; ruby: 396; erlang: 153; java: 27
file content (32 lines) | stat: -rw-r--r-- 994 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* Fix issues related to MinGW 4.x handling of time data types.  */

#ifndef _MINGW_TIME_H
#define _MINGW_TIME_H

/* The @#$%^&! MinGW developers stopped updating the values of
   __MINGW32_VERSION, __MINGW32_MAJOR_VERSION, and
   __MINGW32_MINOR_VERSION values in v4.x of the runtime, to
   "discourage its uses".  So the values of those macros can no longer
   be trusted, and we need the workaround below, to have a single set
   of macros we can trust.  (The .17 minor version is arbitrary.)  */
#ifdef __MINGW32__
#include <_mingw.h>
#endif
/* MinGW64 doesn't have this problem, and does not define
   __MINGW_VERSION.  */
#ifndef __MINGW64_VERSION_MAJOR
# ifndef __MINGW_VERSION
#  define __MINGW_VERSION 3.17
#  undef __MINGW_MAJOR_VERSION
#  define __MINGW_MAJOR_VERSION 3
#  undef __MINGW_MINOR_VERSION
#  define __MINGW_MINOR_VERSION 17
#  undef __MINGW_PATCHLEVEL
#  define __MINGW_PATCHLEVEL 0
# endif
#endif
#if __MINGW_MAJOR_VERSION >= 4
# define _USE_32BIT_TIME_T
#endif

#endif