add -fPIC option to the C compiler, required in f31
[vsys.git] / globals.ml
index 26230b8..ce12139 100644 (file)
@@ -1,8 +1,23 @@
-let frontend = ref ""
+(** Some things that didn't fit in elsewhere *)
 let backend = ref ""
 let debug = ref true
+let vsys_version = "0.99"
+let nochroot = ref false
+let conffile = ref ""
+let pid_filepath = ref "/var/run/vsys.pid"
+let log_filepath = ref "/var/log/vsys"
+let failsafe = ref false
 
-type fd_and_fname = string option * Unix.file_descr
+let logfd = ref Pervasives.stdout
+let logprint fmt = Printf.fprintf !logfd (fmt ^^ "%!")
+
+let debprint fmt = if (!debug) then Printf.fprintf !logfd (fmt ^^ "%!")
+let print fmt = Printf.printf (fmt ^^ "%!")
+
+type result = Success | Failed
+type fname_and_fd = string option * Unix.file_descr
+
+(* Relative path, never precededed by a '/' *)
 type relpath = Relpath of string
 
 exception Bad_path