Mercurial > urweb
diff src/cgi.sml @ 1164:8679ba87cf3c
sigfile directive
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 11 Feb 2010 09:10:01 -0500 |
parents | d4cd54a4ea06 |
children | d2ad997ca157 |
line wrap: on
line diff
--- a/src/cgi.sml Tue Feb 09 20:08:59 2010 -0500 +++ b/src/cgi.sml Thu Feb 11 09:10:01 2010 -0500 @@ -28,11 +28,24 @@ structure Cgi :> CGI = struct open Settings +open Print.PD Print val () = addProtocol {name = "cgi", compile = "", linkStatic = Config.lib ^ "/../liburweb_cgi.a", linkDynamic = "-lurweb_cgi", - persistent = false} + persistent = false, + code = fn () => box [string "void uw_global_custom() {", + newline, + case getSigFile () of + NONE => box [] + | SOME sf => box [string "extern char *uw_sig_file;", + newline, + string "uw_sig_file = \"", + string sf, + string "\";", + newline], + string "}", + newline]} end