File tree Expand file tree Collapse file tree 2 files changed +13
-29
lines changed Expand file tree Collapse file tree 2 files changed +13
-29
lines changed Original file line number Diff line number Diff line change 23
23
24
24
#include "timelib_config.h"
25
25
26
- #ifdef HAVE_SYS_TYPES_H
27
- #include <sys/types.h>
28
- #endif
29
-
30
- #if defined(HAVE_INTTYPES_H )
31
- #include <inttypes.h>
32
- #elif defined(HAVE_STDINT_H )
33
- #include <stdint.h>
34
- #endif
35
-
36
- # ifndef HAVE_INT32_T
37
- # if SIZEOF_INT == 4
38
- typedef int int32_t ;
39
- # elif SIZEOF_LONG == 4
40
- typedef long int int32_t ;
41
- # endif
42
- # endif
43
-
44
- # ifndef HAVE_UINT32_T
45
- # if SIZEOF_INT == 4
46
- typedef unsigned int uint32_t ;
47
- # elif SIZEOF_LONG == 4
48
- typedef unsigned long int uint32_t ;
49
- # endif
50
- # endif
26
+ #include "php_stdint.h"
51
27
52
28
#include <stdio.h>
53
29
@@ -62,8 +38,8 @@ typedef unsigned long int uint32_t;
62
38
#endif
63
39
64
40
#if defined(_MSC_VER )
65
- typedef __uint64 timelib_ull ;
66
- typedef __int64 timelib_sll ;
41
+ typedef uint64_t timelib_ull ;
42
+ typedef int64_t timelib_sll ;
67
43
# define TIMELIB_LL_CONST (n ) n ## i64
68
44
#else
69
45
typedef unsigned long long timelib_ull ;
Original file line number Diff line number Diff line change 19
19
#ifndef PHP_STDINT_H
20
20
#define PHP_STDINT_H
21
21
22
- #if PHP_WIN32
23
- # include "win32/php_stdint.h"
22
+ #if defined(_MSC_VER )
23
+ /* Make sure the regular stdint.h wasn't included already and prevent it to be
24
+ included afterwards. Though if some other library needs some stuff from
25
+ stdint.h included afterwards and misses it, we'd have to extend ours. On
26
+ the other hand, if stdint.h was included before, some conflicts might
27
+ happen so we'd likewise have to fix ours. */
28
+ # if !defined(_STDINT )
29
+ # define _STDINT
30
+ # include "win32/php_stdint.h"
31
+ # endif
24
32
# define HAVE_INT8_T 1
25
33
# define HAVE_UINT8_T 1
26
34
# define HAVE_INT16_T 1
You can’t perform that action at this time.
0 commit comments