~ chicken-core (chicken-5) 753112e79896a861f554fb91ae5d89a6f33cb4fa
commit 753112e79896a861f554fb91ae5d89a6f33cb4fa
Author: Evan Hanson <evhan@foldling.org>
AuthorDate: Fri Feb 24 14:12:21 2017 +1300
Commit: Evan Hanson <evhan@foldling.org>
CommitDate: Thu Mar 2 16:37:28 2017 +1300
Add chicken.time.posix module
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
Trap