fukamachi / woo

A fast non-blocking HTTP server on top of libev
http://ultra.wikia.com/wiki/Woo_(kaiju)
MIT License
1.27k stars 96 forks source link

Fixes to run on LispWorks. #111

Closed julian-baldwin closed 7 months ago

julian-baldwin commented 7 months ago

Fixes fukamachi/woo#110 by ensuring the socket output buffer is allocated in a static segment as required by LispWorks' FLI. Modify woo.syscall:errno to support LispWorks via sys:errno-value to prevent comparison with nil in socket callbacks. These two changes are required for Woo to run on LispWorks.

This PR also makes use of lw:file-size to determine the length of a file. This is not essential, but an obvious optimisation to avoid opening files for the sole reason of determining their length.

All changes are conditionalised to LispWorks in keeping with existing code style and tested on Intel macOS 13.6.1 using LispWorks 8.0.1 Enterprise. This PR provides the bare minimum set of changes to permit starting a server and responding to requests. It does not fix other issues such as signal handling problems.

fukamachi commented 7 months ago

Thank you!