Re: Unison Uprintf obsolete
"Benjamin C. Pierce" <[email protected]>
| Newsgroups | gmane.network.unison.devel |
|---|---|
| Message-ID | <[email protected]> |
Thanks for the patch, Christopher. I’ve incorporated it in the trunk and am cc’ing the unison-hackers list so that people know that there may be other issues lurking with the 4.02 OCaml update.
- Benjamin
> From: Christopher Zimmermann <[email protected]>
> Subject: Unison Uprintf obsolete
> Date: Fri, 19 Sep 2014 16:36:49 +0200
>
> Hello,
>
> I am porting OCaml stuff for OpenBSD. We updated to OCaml 4.02 some
> weeks ago. Since the upgrade the stable unison port is segfaulting in
> different places. One place is the Uprintf module, whose use of
> Obj.magic is no longer safe. Since its only use is in ubase/util.ml
> and its additional functionality is provided by the OCaml stdlib
> since 3.09 I propose the following diff:
>
> --- ubase/util.ml.orig Fri Sep 19 12:38:42 2014
> +++ ubase/util.ml Fri Sep 19 12:39:27 2014
> @@ -62,7 +62,8 @@
> if s <> !infos then begin clear_infos (); infos := s; show_infos ()
> end
> let msg f =
> - clear_infos (); Uprintf.eprintf (fun () -> flush stderr; show_infos()) f
> + clear_infos ();
> + Printf.kfprintf (fun _ -> flush stderr; show_infos ()) stderr f
>
> let msg : ('a, out_channel, unit) format -> 'a = msg
>
>
> with this diff the Uprintf module can be removed.
>
>
> Regards,
> Christopher
>
>
> --
> http://gmerlin.de
> OpenPGP: http://gmerlin.de/christopher.pub
> F190 D013 8F01 AA53 E080 3F3C F17F B0A1 D44E 4FEE
> From: Christopher Zimmermann <[email protected]>
> Subject: Unison Uprintf obsolete
> Date: September 19, 2014 at 10:36:49 AM EDT
> To: [email protected]
>
>
> Hello,
>
> I am porting OCaml stuff for OpenBSD. We updated to OCaml 4.02 some
> weeks ago. Since the upgrade the stable unison port is segfaulting in
> different places. One place is the Uprintf module, whose use of
> Obj.magic is no longer safe. Since its only use is in ubase/util.ml
> and its additional functionality is provided by the OCaml stdlib
> since 3.09 I propose the following diff:
>
> --- ubase/util.ml.orig Fri Sep 19 12:38:42 2014
> +++ ubase/util.ml Fri Sep 19 12:39:27 2014
> @@ -62,7 +62,8 @@
> if s <> !infos then begin clear_infos (); infos := s; show_infos ()
> end
> let msg f =
> - clear_infos (); Uprintf.eprintf (fun () -> flush stderr; show_infos
> ()) f
> + clear_infos ();
> + Printf.kfprintf (fun _ -> flush stderr; show_infos ()) stderr f
>
> let msg : ('a, out_channel, unit) format -> 'a = msg
>
>
> with this diff the Uprintf module can be removed.
>
>
> Regards,
> Christopher
>
>
> --
> http://gmerlin.de
> OpenPGP: http://gmerlin.de/christopher.pub
> F190 D013 8F01 AA53 E080 3F3C F17F B0A1 D44E 4FEE
>
>
_______________________________________________
Unison-hackers mailing list
[email protected]
http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers