diff src/fastcgi.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/fastcgi.sml	Tue Feb 09 20:08:59 2010 -0500
+++ b/src/fastcgi.sml	Thu Feb 11 09:10:01 2010 -0500
@@ -28,11 +28,24 @@
 structure Fastcgi :> FASTCGI = struct
 
 open Settings
+open Print.PD Print
 
 val () = addProtocol {name = "fastcgi",
                       compile = "",
                       linkStatic = Config.lib ^ "/../liburweb_fastcgi.a",
                       linkDynamic = "-lurweb_fastcgi",
-                      persistent = true}
+                      persistent = true,
+                      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