summaryrefslogtreecommitdiff
path: root/standalone/android/haskell-patches/unix-time_0.1.4_0001-hacks-for-android.patch
blob: cff7e76e372c08497a8244cb4c4cef7ec79135eb (plain)
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
From 4023b952871ad2bc248db887716d06932ac0dbb9 Mon Sep 17 00:00:00 2001
From: Joey Hess <joey@kitenet.net>
Date: Wed, 8 May 2013 14:00:19 -0400
Subject: [PATCH] hacks for android

---
 cbits/conv.c    |    4 +---
 unix-time.cabal |   28 ++--------------------------
 2 files changed, 3 insertions(+), 29 deletions(-)

diff --git a/cbits/conv.c b/cbits/conv.c
index 3b6a129..5a68f91 100644
--- a/cbits/conv.c
+++ b/cbits/conv.c
@@ -1,5 +1,3 @@
-#include "config.h"
-
 #if IS_LINUX
 /* Linux cheats AC_CHECK_FUNCS(strptime_l), sigh. */
 #define THREAD_SAFE 0
@@ -51,7 +49,7 @@ time_t c_parse_unix_time_gmt(char *fmt, char *src) {
 #else
     strptime(src, fmt, &dst);
 #endif
-    return timegm(&dst);
+    return NULL; /* timegm(&dst); */
 }
 
 void c_format_unix_time(char *fmt, time_t src, char* dst, int siz) {
diff --git a/unix-time.cabal b/unix-time.cabal
index a905d63..f32d952 100644
--- a/unix-time.cabal
+++ b/unix-time.cabal
@@ -8,7 +8,7 @@ Synopsis:               Unix time parser/formatter and utilities
 Description:            Fast parser\/formatter\/utilities for Unix time
 Category:               Data
 Cabal-Version:          >= 1.10
-Build-Type:             Configure
+Build-Type:             Simple
 Extra-Source-Files:     cbits/conv.c cbits/config.h.in configure configure.ac
 Extra-Tmp-Files:        config.log config.status autom4te.cache cbits/config.h
 
@@ -21,34 +21,10 @@ Library
                         Data.UnixTime.Types
                         Data.UnixTime.Sys
   Build-Depends:        base >= 4 && < 5
-                      , bytestring
+                      , bytestring (>= 0.10.3.0)
                       , old-time
   C-Sources:            cbits/conv.c
 
-Test-Suite doctests
-  Type:                 exitcode-stdio-1.0
-  HS-Source-Dirs:       test
-  Ghc-Options:          -threaded -Wall
-  Main-Is:              doctests.hs
-  Build-Depends:        base
-                      , doctest >= 0.9.3
-
-Test-Suite spec
-  Type:                 exitcode-stdio-1.0
-  Default-Language:     Haskell2010
-  Hs-Source-Dirs:       test
-  Ghc-Options:          -Wall
-  Main-Is:              Spec.hs
-  Other-Modules:        UnixTimeSpec
-  Build-Depends:        base
-                      , bytestring
-                      , hspec
-                      , old-locale
-                      , old-time
-                      , QuickCheck
-                      , time
-                      , unix-time
-
 Source-Repository head
   Type:                 git
   Location:             https://github.com/kazu-yamamoto/unix-time
-- 
1.7.10.4