diff src/http.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/http.sml	Tue Feb 09 20:08:59 2010 -0500
+++ b/src/http.sml	Thu Feb 11 09:10:01 2010 -0500
@@ -28,12 +28,26 @@
 structure Http :> HTTP = struct
 
 open Settings
+open Print.PD Print
 
 val () = addProtocol {name = "http",
                       compile = "",
                       linkStatic = Config.lib ^ "/../liburweb_http.a",
                       linkDynamic = "-lurweb_http",
-                      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]}
+
 val () = setProtocol "http"
 
 end