summaryrefslogtreecommitdiff
path: root/src/cgi.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2010-02-11 09:10:01 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2010-02-11 09:10:01 -0500
commitabe2d7ed6e151579cd6f13fd0ce92e29bb83a23d (patch)
tree07742ac1accf17b7abc4153c890887c5a20ad464 /src/cgi.sml
parent861dbf0153f3383666dc0f3c35675d0b9a625b8d (diff)
sigfile directive
Diffstat (limited to 'src/cgi.sml')
-rw-r--r--src/cgi.sml15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/cgi.sml b/src/cgi.sml
index f4426a70..9099d429 100644
--- a/src/cgi.sml
+++ b/src/cgi.sml
@@ -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