[Unison-hackers] build errors on FreeBSD
Dan Pelleg
daniel+unisonhackers at pelleg.org
Sun Aug 28 15:11:27 EDT 2005
On Sun, Aug 28, 2005 at 02:51:02PM -0400, Trevor Jim wrote:
> 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
>
The error was reported on FreeBSD 4.X system. The one such system I have
access to has gcc 2.95.4.
More recent systems (FreeBSD 5.0 was released around January 2003) have gcc
3.2.x or 3.4.x.
As I said, we patch for this ourselves, since the package build cluster
includes 4.X machines.
--Dan
More information about the Unison-hackers
mailing list