mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-06-08 11:55:03 +02:00
Merge pull request #450 from okuoku/win32-cmake
Misc. fixes for Windows build
This commit is contained in:
commit
b9172a366c
4 changed files with 29 additions and 13 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
# Shared objects (inc. Windows DLLs)
|
# Shared objects (inc. Windows DLLs)
|
||||||
*.dll
|
*.dll
|
||||||
|
*.dll.*
|
||||||
*.so
|
*.so
|
||||||
*.so.*
|
*.so.*
|
||||||
*.dylib
|
*.dylib
|
||||||
|
@ -48,6 +49,7 @@ lib/chibi/process.c
|
||||||
lib/chibi/stty.c
|
lib/chibi/stty.c
|
||||||
lib/chibi/system.c
|
lib/chibi/system.c
|
||||||
lib/chibi/time.c
|
lib/chibi/time.c
|
||||||
|
lib/chibi/win32/process-win32.c
|
||||||
lib/srfi/144/math.c
|
lib/srfi/144/math.c
|
||||||
*.tgz
|
*.tgz
|
||||||
*.html
|
*.html
|
||||||
|
|
|
@ -250,8 +250,6 @@ foreach(e ${chibi-scheme-tests})
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
message(STATUS "Detecting library tests")
|
|
||||||
|
|
||||||
file(GLOB_RECURSE srfi_tests RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/lib
|
file(GLOB_RECURSE srfi_tests RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/lib
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/lib/srfi/*/test.sld)
|
${CMAKE_CURRENT_SOURCE_DIR}/lib/srfi/*/test.sld)
|
||||||
|
|
||||||
|
@ -270,6 +268,7 @@ set(testexcludes
|
||||||
chibi/doc-test # Depends (chibi time)
|
chibi/doc-test # Depends (chibi time)
|
||||||
chibi/system-test
|
chibi/system-test
|
||||||
chibi/tar-test # Depends (chibi system)
|
chibi/tar-test # Depends (chibi system)
|
||||||
|
chibi/process-test # Not applicable
|
||||||
)
|
)
|
||||||
|
|
||||||
set(testlibs)
|
set(testlibs)
|
||||||
|
@ -287,6 +286,5 @@ foreach(e ${testlibs})
|
||||||
COMMAND chibi-scheme -e "(import (${form}))"
|
COMMAND chibi-scheme -e "(import (${form}))"
|
||||||
-e "(run-tests)"
|
-e "(run-tests)"
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
message(STATUS "Test ${testname}")
|
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,9 @@ environment:
|
||||||
- ARCH: x86
|
- ARCH: x86
|
||||||
TOOLCHAIN: MinGW
|
TOOLCHAIN: MinGW
|
||||||
BUILDSYSTEM: CMAKE
|
BUILDSYSTEM: CMAKE
|
||||||
|
- ARCH: x64
|
||||||
|
TOOLCHAIN: MinGW
|
||||||
|
BUILDSYSTEM: CMAKE
|
||||||
- ARCH: x86
|
- ARCH: x86
|
||||||
TOOLCHAIN: MSVC
|
TOOLCHAIN: MSVC
|
||||||
BUILDSYSTEM: CMAKE
|
BUILDSYSTEM: CMAKE
|
||||||
|
|
|
@ -123,8 +123,13 @@
|
||||||
(define (file-group x) (stat-gid (if (stat? x) x (file-status x))))
|
(define (file-group x) (stat-gid (if (stat? x) x (file-status x))))
|
||||||
(define (file-represented-device x) (stat-rdev (if (stat? x) x (file-status x))))
|
(define (file-represented-device x) (stat-rdev (if (stat? x) x (file-status x))))
|
||||||
(define (file-size x) (stat-size (if (stat? x) x (file-status x))))
|
(define (file-size x) (stat-size (if (stat? x) x (file-status x))))
|
||||||
(define (file-block-size x) (stat-blksize (if (stat? x) x (file-status x))))
|
(cond-expand
|
||||||
(define (file-num-blocks x) (stat-blocks (if (stat? x) x (file-status x))))
|
(windows
|
||||||
|
(define (file-block-size x) 1)
|
||||||
|
(define (file-num-blocks x) (file-size x)))
|
||||||
|
(else
|
||||||
|
(define (file-block-size x) (stat-blksize (if (stat? x) x (file-status x))))
|
||||||
|
(define (file-num-blocks x) (stat-blocks (if (stat? x) x (file-status x))))))
|
||||||
(define (file-access-time x) (stat-atime (if (stat? x) x (file-status x))))
|
(define (file-access-time x) (stat-atime (if (stat? x) x (file-status x))))
|
||||||
(define (file-modification-time x) (stat-mtime (if (stat? x) x (file-status x))))
|
(define (file-modification-time x) (stat-mtime (if (stat? x) x (file-status x))))
|
||||||
(define (file-modification-time/safe x)
|
(define (file-modification-time/safe x)
|
||||||
|
@ -149,9 +154,13 @@
|
||||||
(define (file-character? x) (file-test-mode S_ISCHR x))
|
(define (file-character? x) (file-test-mode S_ISCHR x))
|
||||||
(define (file-block? x) (file-test-mode S_ISBLK x))
|
(define (file-block? x) (file-test-mode S_ISBLK x))
|
||||||
(define (file-fifo? x) (file-test-mode S_ISFIFO x))
|
(define (file-fifo? x) (file-test-mode S_ISFIFO x))
|
||||||
(define (file-link? x)
|
(cond-expand
|
||||||
(let ((st (if (stat? x) x (file-link-status x))))
|
(windows
|
||||||
(and st (S_ISLNK (stat-mode st)))))
|
(define (file-link? x) #f))
|
||||||
|
(else
|
||||||
|
(define (file-link? x)
|
||||||
|
(let ((st (if (stat? x) x (file-link-status x))))
|
||||||
|
(and st (S_ISLNK (stat-mode st)))))))
|
||||||
(define (file-socket? x) (file-test-mode S_ISSOCK x))
|
(define (file-socket? x) (file-test-mode S_ISSOCK x))
|
||||||
(define (file-exists? x) (and (if (stat? x) #t (file-status x)) #t))
|
(define (file-exists? x) (and (if (stat? x) #t (file-status x)) #t))
|
||||||
|
|
||||||
|
@ -180,8 +189,12 @@
|
||||||
;;> Returns the path the symbolic link \var{file} points to, or
|
;;> Returns the path the symbolic link \var{file} points to, or
|
||||||
;;> \scheme{#f} on error.
|
;;> \scheme{#f} on error.
|
||||||
|
|
||||||
(define (read-link file)
|
(cond-expand
|
||||||
(let* ((buf (make-string 512))
|
(windows
|
||||||
(res (readlink file buf 512)))
|
(define (read-link file) #f))
|
||||||
(and (positive? res)
|
(else
|
||||||
(substring buf 0 res))))
|
(define (read-link file)
|
||||||
|
(let* ((buf (make-string 512))
|
||||||
|
(res (readlink file buf 512)))
|
||||||
|
(and (positive? res)
|
||||||
|
(substring buf 0 res))))))
|
||||||
|
|
Loading…
Add table
Reference in a new issue