Skip to content

Commit

Permalink
Fixed c flags to allow compilation with 3.1 for me, and made work wit…
Browse files Browse the repository at this point in the history
…h newer racket.
  • Loading branch information
endobson committed Nov 24, 2012
1 parent 19889f3 commit a9a3f1a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions build.rkt
Expand Up @@ -3,12 +3,12 @@

(define (build)
(define launcher "/usr/bin/env")
(define compiler '("g++"))
(define compiler '("clang"))
(define os (system-type 'os))
(define shared-library-flags
(case os
((unix) '("-shared"))
((macosx) '("-dynamiclib" "-undefined" "suppress" "-flat_namespace"))))
((macosx) '("-dynamiclib" "-lLLVM-3.1" "-lstdc++"))))
(define architecture-flags
(case os
((unix) '("-m32"))
Expand Down Expand Up @@ -37,7 +37,7 @@
(close-output-port in)
(close-input-port out)
(subprocess-wait process)
(unless (= (subprocess-status process) 0) (error 'g++ "Returned non zero exit code"))))
(unless (= (subprocess-status process) 0) (error 'c-compiler "Returned non zero exit code"))))

(define (llvm-config flags)
(define (remove-blanks lst)
Expand Down
9 changes: 5 additions & 4 deletions private/ffi/lib.rkt
Expand Up @@ -5,11 +5,12 @@


(require/typed ffi/unsafe
(opaque FFI-Lib ffi-lib?)
(#:opaque FFI-Lib ffi-lib?)
(#:opaque CType ctype?)
;very specific type for this use case
(get-ffi-obj (Symbol FFI-Lib Any -> (-> Any)))
(_cprocedure ((Listof Any) Any -> Any))
(_void Any)
(get-ffi-obj (Symbol FFI-Lib CType -> (-> Any)))
(_cprocedure ((Listof CType) CType -> CType))
(_void CType)
(ffi-lib (Path -> FFI-Lib)))

(require (only-in ffi/unsafe _fun (-> ffi:->)))
Expand Down

0 comments on commit a9a3f1a

Please sign in to comment.