| 
            Last change
 on this file since 1180 was             1166, checked in by rossy, 4 years ago           | 
        
        
          | 
             
Daodan: Replace MinGW build env with an up-to-date MSYS2 env 
 
           | 
        
        
          | 
            File size:
            1.3 KB
           | 
        
      
      
| Line |   | 
|---|
| 1 | /**
 | 
|---|
| 2 |  * This file has no copyright assigned and is placed in the Public Domain.
 | 
|---|
| 3 |  * This file is part of the mingw-w64 runtime package.
 | 
|---|
| 4 |  * No warranty is given; refer to the file DISCLAIMER.PD within this package.
 | 
|---|
| 5 |  */
 | 
|---|
| 6 | 
 | 
|---|
| 7 | #ifndef _SYS_TIME_H_
 | 
|---|
| 8 | #define _SYS_TIME_H_
 | 
|---|
| 9 | 
 | 
|---|
| 10 | #include <time.h>
 | 
|---|
| 11 | 
 | 
|---|
| 12 | #ifdef  __cplusplus
 | 
|---|
| 13 | extern "C" {
 | 
|---|
| 14 | #endif
 | 
|---|
| 15 | 
 | 
|---|
| 16 | #include <_timeval.h>
 | 
|---|
| 17 | 
 | 
|---|
| 18 | #ifndef _TIMEZONE_DEFINED /* also in sys/time.h */
 | 
|---|
| 19 | #define _TIMEZONE_DEFINED
 | 
|---|
| 20 | /* Provided for compatibility with code that assumes that
 | 
|---|
| 21 |    the presence of gettimeofday function implies a definition
 | 
|---|
| 22 |    of struct timezone. */
 | 
|---|
| 23 | struct timezone
 | 
|---|
| 24 | {
 | 
|---|
| 25 |   int tz_minuteswest; /* of Greenwich */
 | 
|---|
| 26 |   int tz_dsttime;     /* type of dst correction to apply */
 | 
|---|
| 27 | };
 | 
|---|
| 28 | 
 | 
|---|
| 29 |   extern int __cdecl mingw_gettimeofday (struct timeval *p, struct timezone *z);
 | 
|---|
| 30 | 
 | 
|---|
| 31 | #endif /* _TIMEZONE_DEFINED */
 | 
|---|
| 32 | 
 | 
|---|
| 33 | /*
 | 
|---|
| 34 |    Implementation as per:
 | 
|---|
| 35 |    The Open Group Base Specifications, Issue 6
 | 
|---|
| 36 |    IEEE Std 1003.1, 2004 Edition
 | 
|---|
| 37 | 
 | 
|---|
| 38 |    The timezone pointer arg is ignored.  Errors are ignored.
 | 
|---|
| 39 | */
 | 
|---|
| 40 | #ifndef _GETTIMEOFDAY_DEFINED
 | 
|---|
| 41 | #define _GETTIMEOFDAY_DEFINED
 | 
|---|
| 42 | int __cdecl gettimeofday(struct timeval *__restrict__,
 | 
|---|
| 43 |                          void *__restrict__  /* tzp (unused) */);
 | 
|---|
| 44 | #endif
 | 
|---|
| 45 | 
 | 
|---|
| 46 | #ifdef  __cplusplus
 | 
|---|
| 47 | }
 | 
|---|
| 48 | #endif
 | 
|---|
| 49 | 
 | 
|---|
| 50 | /* Adding timespec definition.  */
 | 
|---|
| 51 | #include <sys/timeb.h>
 | 
|---|
| 52 | 
 | 
|---|
| 53 | 
 | 
|---|
| 54 | #endif /* _SYS_TIME_H_ */
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.