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)
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),solaris)
|
||||
XLDFLAGS += -lsocket
|
||||
XCPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS
|
||||
endif
|
||||
|
||||
########################################################################
|
||||
|
||||
all: chibi-scheme$(EXE) all-libs chibi-scheme.pc $(META_FILES)
|
||||
|
|
|
@ -35,6 +35,9 @@ else
|
|||
ifeq ($(shell uname -o),GNU/Linux)
|
||||
PLATFORM=linux
|
||||
else
|
||||
ifeq ($(shell uname),SunOS)
|
||||
PLATFORM=solaris
|
||||
else
|
||||
PLATFORM=unix
|
||||
endif
|
||||
endif
|
||||
|
@ -46,6 +49,7 @@ endif
|
|||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
########################################################################
|
||||
# Set default variables for the platform.
|
||||
|
@ -72,6 +76,14 @@ CLINKFLAGS = -shared
|
|||
LIBDL =
|
||||
RLDFLAGS=-Wl,-R$(LIBDIR)
|
||||
else
|
||||
ifeq ($(PLATFORM),solaris)
|
||||
SO = .so
|
||||
EXE =
|
||||
CLIBFLAGS = -fPIC
|
||||
CLINKFLAGS = -shared
|
||||
LIBDL = -ldl
|
||||
RLDFLAGS=-Wl,-R$(LIBDIR)
|
||||
else
|
||||
ifeq ($(PLATFORM),windows)
|
||||
SO = .dll
|
||||
EXE = .exe
|
||||
|
@ -112,6 +124,7 @@ endif
|
|||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),unix)
|
||||
#RLDFLAGS=-rpath $(LIBDIR)
|
||||
|
|
|
@ -5,9 +5,12 @@
|
|||
make-timeval make-tm timeval-seconds timeval-microseconds
|
||||
timezone-offset timezone-dst-time
|
||||
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-offset
|
||||
time-day-of-week time-day-of-year time-dst?
|
||||
tm? timeval? timezone?)
|
||||
(cond-expand
|
||||
(solaris)
|
||||
(else
|
||||
(export time-offset time-timezone-name)))
|
||||
(cond-expand
|
||||
(emscripten)
|
||||
(else
|
||||
|
|
|
@ -7,6 +7,22 @@
|
|||
(c-system-include "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
|
||||
predicate: tm?
|
||||
constructor: (make-tm tm_sec tm_min tm_hour
|
||||
|
@ -21,7 +37,7 @@
|
|||
(int tm_yday time-day-of-year)
|
||||
(int tm_isdst time-dst?)
|
||||
(string tm_zone time-timezone-name)
|
||||
(int tm_gmtoff time-offset))
|
||||
(int tm_gmtoff time-offset))))
|
||||
|
||||
;;> Accessors for the \scheme{tm} struct.
|
||||
;;/
|
||||
|
|
Loading…
Add table
Reference in a new issue