This commit is contained in:
SongWei 2020-02-14 16:01:13 +11:00
parent 9ae959271e
commit 8879bb85de
2 changed files with 32 additions and 17 deletions

View File

@ -5,4 +5,17 @@ add_library(leoext SHARED lib.c)
include_directories(${CURL_INCLUDE_DIR})
target_link_libraries(leoext ${CURL_LIBRARIES})
set_target_properties(leoext PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32")
set(CMAKE_C_COMPILER gcc)
set(CMAKE_C_FLAGS "-m32 -L/usr/lib32")
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_C_COMPILER gcc)
set(CMAKE_C_FLAGS -m32)
set(CMAKE_FIND_ROOT_PATH /usr/lib32)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

View File

@ -11,7 +11,7 @@
(defun route-hello-world (env)
(declare (ignore env))
'(200 (:content-type "text/plain")
("hello")))
("hello world")))
(defun route-not-found (&optional env)
(declare (ignore env))
@ -60,7 +60,9 @@
(nil ,#'route-not-found)))
(if (not (find-package 'swank))
(woo:run
(sb-thread:make-thread
(lambda ()
(woo:run
(lambda (env)
;;(print env)
;;(print (type-of env))
@ -76,5 +78,5 @@
(getf env :request-method)
(getf env :request-uri)
route-function)
(funcall route-function env)))))
(funcall route-function env)))))))