mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
build on Solaris-like systems
This commit is contained in:
parent
a01de232b2
commit
2311e41003
4 changed files with 54 additions and 17 deletions
5
Makefile
5
Makefile
|
@ -109,6 +109,11 @@ XLDFLAGS := $(LDFLAGS) $(RLDFLAGS) $(GCLDFLAGS) $(LIBDL) -lm
|
||||||
XCFLAGS := -Wall -g -g3 -O3 $(CFLAGS)
|
XCFLAGS := -Wall -g -g3 -O3 $(CFLAGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(PLATFORM),solaris)
|
||||||
|
XLDFLAGS += -lsocket
|
||||||
|
XCPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS
|
||||||
|
endif
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
all: chibi-scheme$(EXE) all-libs chibi-scheme.pc $(META_FILES)
|
all: chibi-scheme$(EXE) all-libs chibi-scheme.pc $(META_FILES)
|
||||||
|
|
|
@ -35,6 +35,9 @@ else
|
||||||
ifeq ($(shell uname -o),GNU/Linux)
|
ifeq ($(shell uname -o),GNU/Linux)
|
||||||
PLATFORM=linux
|
PLATFORM=linux
|
||||||
else
|
else
|
||||||
|
ifeq ($(shell uname),SunOS)
|
||||||
|
PLATFORM=solaris
|
||||||
|
else
|
||||||
PLATFORM=unix
|
PLATFORM=unix
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
@ -46,6 +49,7 @@ endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
# Set default variables for the platform.
|
# Set default variables for the platform.
|
||||||
|
@ -72,6 +76,14 @@ CLINKFLAGS = -shared
|
||||||
LIBDL =
|
LIBDL =
|
||||||
RLDFLAGS=-Wl,-R$(LIBDIR)
|
RLDFLAGS=-Wl,-R$(LIBDIR)
|
||||||
else
|
else
|
||||||
|
ifeq ($(PLATFORM),solaris)
|
||||||
|
SO = .so
|
||||||
|
EXE =
|
||||||
|
CLIBFLAGS = -fPIC
|
||||||
|
CLINKFLAGS = -shared
|
||||||
|
LIBDL = -ldl
|
||||||
|
RLDFLAGS=-Wl,-R$(LIBDIR)
|
||||||
|
else
|
||||||
ifeq ($(PLATFORM),windows)
|
ifeq ($(PLATFORM),windows)
|
||||||
SO = .dll
|
SO = .dll
|
||||||
EXE = .exe
|
EXE = .exe
|
||||||
|
@ -112,6 +124,7 @@ endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(PLATFORM),unix)
|
ifeq ($(PLATFORM),unix)
|
||||||
#RLDFLAGS=-rpath $(LIBDIR)
|
#RLDFLAGS=-rpath $(LIBDIR)
|
||||||
|
|
|
@ -5,9 +5,12 @@
|
||||||
make-timeval make-tm timeval-seconds timeval-microseconds
|
make-timeval make-tm timeval-seconds timeval-microseconds
|
||||||
timezone-offset timezone-dst-time
|
timezone-offset timezone-dst-time
|
||||||
time-second time-minute time-hour time-day time-month time-year
|
time-second time-minute time-hour time-day time-month time-year
|
||||||
time-day-of-week time-day-of-year time-dst? time-timezone-name
|
time-day-of-week time-day-of-year time-dst?
|
||||||
time-offset
|
|
||||||
tm? timeval? timezone?)
|
tm? timeval? timezone?)
|
||||||
|
(cond-expand
|
||||||
|
(solaris)
|
||||||
|
(else
|
||||||
|
(export time-offset time-timezone-name)))
|
||||||
(cond-expand
|
(cond-expand
|
||||||
(emscripten)
|
(emscripten)
|
||||||
(else
|
(else
|
||||||
|
|
|
@ -7,6 +7,22 @@
|
||||||
(c-system-include "time.h")
|
(c-system-include "time.h")
|
||||||
(c-system-include "sys/time.h")))
|
(c-system-include "sys/time.h")))
|
||||||
|
|
||||||
|
(cond-expand
|
||||||
|
(solaris
|
||||||
|
(define-c-struct tm
|
||||||
|
predicate: tm?
|
||||||
|
constructor: (make-tm tm_sec tm_min tm_hour
|
||||||
|
tm_mday tm_mon tm_year tm_isdst)
|
||||||
|
(int tm_sec time-second)
|
||||||
|
(int tm_min time-minute)
|
||||||
|
(int tm_hour time-hour)
|
||||||
|
(int tm_mday time-day)
|
||||||
|
(int tm_mon time-month)
|
||||||
|
(int tm_year time-year)
|
||||||
|
(int tm_wday time-day-of-week)
|
||||||
|
(int tm_yday time-day-of-year)
|
||||||
|
(int tm_isdst time-dst?)))
|
||||||
|
(else
|
||||||
(define-c-struct tm
|
(define-c-struct tm
|
||||||
predicate: tm?
|
predicate: tm?
|
||||||
constructor: (make-tm tm_sec tm_min tm_hour
|
constructor: (make-tm tm_sec tm_min tm_hour
|
||||||
|
@ -21,7 +37,7 @@
|
||||||
(int tm_yday time-day-of-year)
|
(int tm_yday time-day-of-year)
|
||||||
(int tm_isdst time-dst?)
|
(int tm_isdst time-dst?)
|
||||||
(string tm_zone time-timezone-name)
|
(string tm_zone time-timezone-name)
|
||||||
(int tm_gmtoff time-offset))
|
(int tm_gmtoff time-offset))))
|
||||||
|
|
||||||
;;> Accessors for the \scheme{tm} struct.
|
;;> Accessors for the \scheme{tm} struct.
|
||||||
;;/
|
;;/
|
||||||
|
|
Loading…
Add table
Reference in a new issue