[Unison-hackers] build errors on FreeBSD

Trevor Jim trevor at research.att.com
Sun Aug 28 14:51:02 EDT 2005


On Aug 27, 2005, at 10:20 AM, Dan Pelleg wrote:

> This can be fixed easily in pty.c:
>
> @@ -40,9 +41,10 @@
>  /* c_openpty: unit -> (int * Unix.file_descr) */
>  CAMLprim value c_openpty() {
>    int master,slave;
> +  value pair;
>    if (openpty(&master,&slave,NULL,NULL,NULL) < 0)
>      uerror("openpty", (value) 0);
> -  value pair = alloc_tuple(2);
> +  pair = alloc_tuple(2);
>    Store_field(pair,0,Val_int(master));
>    Store_field(pair,1,Val_int(slave));
>    return pair;
>
> AFAIK, the original form is not legal C (although it may be legal C+ 
> +, and
> accepted by some compilers).

This is legal C, declarations do not have to be at the
beginning of functions, I think with C99.  It has been
supported by gcc since at least version 3.0.  What
version are you running?

-Trevor



More information about the Unison-hackers mailing list