chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-hackers] [PATCH 6/8] Add chicken.time.posix module


From: Evan Hanson
Subject: [Chicken-hackers] [PATCH 6/8] Add chicken.time.posix module
Date: Thu, 2 Mar 2017 21:50:42 +1300

---
 README                | 1 +
 chicken-install.scm   | 1 +
 defaults.make         | 3 ++-
 distribution/manifest | 2 ++
 posix.scm             | 6 ++++++
 rules.make            | 3 +++
 6 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/README b/README
index 623d868a..9d960704 100644
--- a/README
+++ b/README
@@ -306,6 +306,7 @@
        |   |       |-- chicken.read-syntax.import.so
        |   |       |-- chicken.tcp.import.so
        |   |       |-- chicken.time.import.so
+       |   |       |-- chicken.time.posix.import.so
        |   |       |-- chicken.utils.import.so
        |   |       |-- modules.db
        |   |       |-- setup-api.import.so
diff --git a/chicken-install.scm b/chicken-install.scm
index c07a3cfe..e097e150 100644
--- a/chicken-install.scm
+++ b/chicken-install.scm
@@ -76,6 +76,7 @@
       "chicken.read-syntax.import.so"
       "chicken.tcp.import.so"
       "chicken.time.import.so"
+      "chicken.time.posix.import.so"
       "chicken.utils.import.so"
       "setup-api.import.so"
       "setup-api.so"
diff --git a/defaults.make b/defaults.make
index e535a9d2..d49ebccb 100644
--- a/defaults.make
+++ b/defaults.make
@@ -266,7 +266,8 @@ CHICKEN_PROGRAM_OPTIONS += $(if $(PROFILE_OBJECTS),-profile)
 PRIMITIVE_IMPORT_LIBRARIES = chicken chicken.csi chicken.foreign
 DYNAMIC_IMPORT_LIBRARIES = setup-api setup-download srfi-4
 DYNAMIC_CHICKEN_IMPORT_LIBRARIES = bitwise errno file.posix fixnum flonum \
-       format gc io keyword locative memory posix pretty-print random time
+       format gc io keyword locative memory posix pretty-print random \
+       time time.posix
 DYNAMIC_CHICKEN_COMPILER_IMPORT_LIBRARIES = user-pass
 DYNAMIC_CHICKEN_UNIT_IMPORT_LIBRARIES = continuation data-structures \
        eval expand file files internal irregex lolevel pathname port \
diff --git a/distribution/manifest b/distribution/manifest
index 5ec76b9a..36357bb0 100644
--- a/distribution/manifest
+++ b/distribution/manifest
@@ -327,6 +327,8 @@ chicken.tcp.import.scm
 chicken.tcp.import.c
 chicken.time.import.scm
 chicken.time.import.c
+chicken.time.posix.import.scm
+chicken.time.posix.import.c
 chicken.utils.import.scm
 chicken.utils.import.c
 srfi-4.import.scm
diff --git a/posix.scm b/posix.scm
index bf4fb8c4..1fc11d42 100644
--- a/posix.scm
+++ b/posix.scm
@@ -103,3 +103,9 @@
    perm/iwoth perm/iwusr perm/ixgrp perm/ixoth perm/ixusr port->fileno
    seek/cur seek/end seek/set set-file-position!)
 (import chicken chicken.posix))
+
+(module chicken.time.posix
+  (seconds->utc-time utc-time->seconds seconds->local-time
+   seconds->string local-time->seconds string->time time->string
+   local-timezone-abbreviation)
+(import chicken chicken.posix))
diff --git a/rules.make b/rules.make
index c5ce7542..a9c200a4 100644
--- a/rules.make
+++ b/rules.make
@@ -521,6 +521,7 @@ $(foreach lib, $(filter-out chicken,$(COMPILER_OBJECTS_1)),\
 $(eval $(call 
declare-emitted-import-lib-dependency,chicken.posix,$(POSIXFILE)))
 $(eval $(call 
declare-emitted-import-lib-dependency,chicken.errno,$(POSIXFILE)))
 $(eval $(call 
declare-emitted-import-lib-dependency,chicken.file.posix,$(POSIXFILE)))
+$(eval $(call 
declare-emitted-import-lib-dependency,chicken.time.posix,$(POSIXFILE)))
 $(eval $(call declare-emitted-import-lib-dependency,chicken.bitwise,library))
 $(eval $(call declare-emitted-import-lib-dependency,chicken.fixnum,library))
 $(eval $(call declare-emitted-import-lib-dependency,chicken.flonum,library))
@@ -809,11 +810,13 @@ posixunix.c: $(SRCDIR)posix.scm $(SRCDIR)posixunix.scm 
$(SRCDIR)posix-common.scm
        $(bootstrap-lib) -feature platform-unix \
        -emit-import-library chicken.errno \
        -emit-import-library chicken.file.posix \
+       -emit-import-library chicken.time.posix \
        -emit-import-library chicken.posix
 posixwin.c: $(SRCDIR)posix.scm $(SRCDIR)posixwin.scm $(SRCDIR)posix-common.scm 
$(SRCDIR)common-declarations.scm
        $(bootstrap-lib) -feature platform-windows \
        -emit-import-library chicken.errno \
        -emit-import-library chicken.file.posix \
+       -emit-import-library chicken.time.posix \
        -emit-import-library chicken.posix
 irregex.c: $(SRCDIR)irregex.scm $(SRCDIR)irregex-core.scm 
$(SRCDIR)irregex-utils.scm $(SRCDIR)common-declarations.scm
        $(bootstrap-lib) -emit-import-library chicken.irregex
-- 
2.11.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]