-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathold-time-1.1.0.3.diff
105 lines (100 loc) · 3.18 KB
/
old-time-1.1.0.3.diff
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
diff -urN a/Setup.hs b/Setup.hs
--- a/Setup.hs 2014-11-21 13:44:17.000000000 +0300
+++ b/Setup.hs 2021-02-05 13:38:53.827521700 +0300
@@ -3,4 +3,4 @@
import Distribution.Simple
main :: IO ()
-main = defaultMainWithHooks autoconfUserHooks
+main = defaultMain
diff -urN a/System/Time.hsc b/System/Time.hsc
--- a/System/Time.hsc 2014-11-21 13:44:17.000000000 +0300
+++ b/System/Time.hsc 2021-02-05 13:38:53.834061900 +0300
@@ -1,5 +1,6 @@
#if __GLASGOW_HASKELL__ >= 701
{-# LANGUAGE Trustworthy #-}
+{-# LANGUAGE CApiFFI #-}
#endif
-----------------------------------------------------------------------------
@@ -734,17 +735,17 @@
foreign import ccall unsafe "HsTime.h __hscore_localtime_r"
localtime_r :: Ptr CTime -> Ptr CTm -> IO (Ptr CTm)
#else
-foreign import ccall unsafe "time.h localtime"
+foreign import capi "time.h localtime"
localtime :: Ptr CTime -> IO (Ptr CTm)
#endif
#if HAVE_GMTIME_R
foreign import ccall unsafe "HsTime.h __hscore_gmtime_r"
gmtime_r :: Ptr CTime -> Ptr CTm -> IO (Ptr CTm)
#else
-foreign import ccall unsafe "time.h gmtime"
+foreign import capi "time.h gmtime"
gmtime :: Ptr CTime -> IO (Ptr CTm)
#endif
-foreign import ccall unsafe "time.h mktime"
+foreign import capi "time.h mktime"
mktime :: Ptr CTm -> IO CTime
#if HAVE_GETTIMEOFDAY
@@ -760,6 +761,6 @@
foreign import ccall unsafe "time.h ftime" ftime :: Ptr CTimeB -> IO ()
#endif
#else
-foreign import ccall unsafe "time.h time" time :: Ptr CTime -> IO CTime
+foreign import capi "time.h time" time :: Ptr CTime -> IO CTime
#endif
#endif /* ! __HUGS__ */
diff -urN a/include/HsTimeConfig.h b/include/HsTimeConfig.h
--- a/include/HsTimeConfig.h 1970-01-01 03:00:00.000000000 +0300
+++ b/include/HsTimeConfig.h 2021-02-05 13:38:53.865349000 +0300
@@ -0,0 +1,18 @@
+#define HAVE_DECL_ALTZONE 0
+#define HAVE_DECL_TZNAME 0
+#define HAVE_INTTYPES_H 1
+#define HAVE_MEMORY_H 1
+#define HAVE_STDINT_H 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STRING_H 1
+#define HAVE_SYS_STAT_H 1
+#define HAVE_SYS_TIMEB_H 1
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_TIME_H 1
+#define PACKAGE_BUGREPORT "[email protected]"
+#define PACKAGE_NAME "Haskell old-time package"
+#define PACKAGE_STRING "Haskell old-time package 1.0"
+#define PACKAGE_TARNAME "old-time"
+#define PACKAGE_URL ""
+#define PACKAGE_VERSION "1.0"
+#define STDC_HEADERS 1
diff -urN a/old-time.cabal b/old-time.cabal
--- a/old-time.cabal 2021-02-05 13:38:54.000000000 +0300
+++ b/old-time.cabal 2021-02-05 13:38:53.880976900 +0300
@@ -8,7 +8,7 @@
bug-reports: https://github.com/haskell/old-time/issues
synopsis: Time library
category: System
-build-type: Configure
+build-type: Simple
cabal-Version: >=1.10
description:
This package provides the old time library.
@@ -28,12 +28,6 @@
install-sh
old-time.buildinfo
-extra-tmp-files:
- autom4te.cache
- config.log
- config.status
- include/HsTimeConfig.h
-
source-repository head
type: git
location: https://github.com/haskell/old-time.git
@@ -48,6 +42,9 @@
c-sources:
cbits/timeUtils.c
+ extra-ghci-libraries:
+ ucrtbase
+
include-dirs: include
includes: HsTime.h
install-includes: