diff options
author | Enrico Tassi <Enrico.Tassi@inria.fr> | 2013-12-11 10:35:47 +0100 |
---|---|---|
committer | Enrico Tassi <Enrico.Tassi@inria.fr> | 2013-12-11 10:35:47 +0100 |
commit | b9585af9ef6e280ec1aa53e50833a3fa58c1763c (patch) | |
tree | 74d1ba00dd59ded7e76b389d42c17735b1508e5f /ide | |
parent | 4832692db5c21c178ff5825fc75496543f02875a (diff) |
Fix CoqIDE compilation under standard version of lablgtk2
We use the win32 specific function only if WIN32 is defined
Diffstat (limited to 'ide')
-rw-r--r-- | ide/coq.ml | 4 | ||||
-rw-r--r-- | ide/coq.mli | 3 | ||||
-rw-r--r-- | ide/coqide_main.ml4 | 1 |
3 files changed, 7 insertions, 1 deletions
diff --git a/ide/coq.ml b/ide/coq.ml index 8442493b4..87387c5f9 100644 --- a/ide/coq.ml +++ b/ide/coq.ml @@ -343,6 +343,8 @@ let open_coqtop_pipe prog args = Unix.out_channel_of_descr ide2top_w, (fun () -> Unix.close top2ide_r; Unix.close ide2top_w) +let gio_channel_of_descr_socket = ref Glib.Io.channel_of_descr + let open_coqtop_socket prog args = let s = Unix.socket Unix.PF_INET Unix.SOCK_STREAM 0 in Unix.bind s (Unix.ADDR_INET (Unix.inet_addr_loopback,0)); @@ -363,7 +365,7 @@ let open_coqtop_socket prog args = Unix.set_nonblock cs; pid, Unix.in_channel_of_descr cs, - Glib.Io.channel_of_descr_socket cs, + !gio_channel_of_descr_socket cs, Unix.out_channel_of_descr cs, (fun () -> Unix.close cs; Unix.close s) diff --git a/ide/coq.mli b/ide/coq.mli index 4fe6a2188..aa8346348 100644 --- a/ide/coq.mli +++ b/ide/coq.mli @@ -92,6 +92,9 @@ val killer : (int -> unit) ref val soft_killer : (int -> unit) ref val interrupter : (int -> unit) ref +(** In win32, sockets are not like regular files *) +val gio_channel_of_descr_socket : (Unix.file_descr -> Glib.Io.channel) ref + val final_countdown : unit -> unit (** [final_countdown] triggers an exit of coqide after some last cycles for closing remaining coqtop zombies *) diff --git a/ide/coqide_main.ml4 b/ide/coqide_main.ml4 index 48983dff7..5c960c444 100644 --- a/ide/coqide_main.ml4 +++ b/ide/coqide_main.ml4 @@ -91,6 +91,7 @@ let () = Coq.killer := win32_kill; Coq.soft_killer := win32_kill; Coq.interrupter := win32_interrupt; + Coq.gio_channel_of_descr_socket := Glib.Io.channel_of_descr_socket; set_win32_path (); reroute_stdout_stderr () END |