Subject: Re: X11R6 is not ready for FreeBSD yet
To: Kaleb Keithley <kaleb@x.org>
From: Bakul Shah <bakul@netcom.com>
List: current-users
Date: 05/03/1994 18:56:48
{I am forwarding the relevant section of your email to the
 netbsd-current mailling list)

You write:
> I beg to differ. I compiled R6 on FreeBSD 1.1 GAMMA with only two
> trivial errors related to the lexical analyzer used by FreeBSD and
> presumable NetBSD. Note that BSDI's 386/BSD uses the same lex, so
> a fix might be as easy as changing "#ifdef __bsdi__" to "#if defined
> (__bsdi__) || defined(__FreeBSD__)"

Note that this is not necessary, atleast for NetBSD, if you define
LEX to be `lex -l', which generates yylineno & friends.  Also,
your fix does not work in fonts/PEX as yylineno is not declared in
lex.l

In NetBSD-current imake fails thanks to the off_t change --
ftruncate fails to truncate the generated Makefile!  The fix,
which should be safe for all, is to explcitly cast the second arg.
to (off_t) in imake.c:875: ftruncate(). [Patch attached below.]
I don't understand while 0 is not coerced to an off_t, as the
relevant header ofiles seem to be included.  But I didn't spend
time investigating.

The server fails to compile as MAP_FILE is not defined
(which should've been in <sys/mman.h>?).

xdm fails to link as _crypt could not be found.  I thought
the correct crypt would've gotten dynamically linked in????

Anyway, I didn't much time on this (though my machine spend
hours:-) -- I am reporting this in the hope it is useful to
someone else.

Bakul

PS: a few clients I tried seem to work fine even with my Sun3
X11R4 server but xterm seems to be huge...


*** config/imake/imake.c        Mon May  2 20:32:29 1994
--- config/imake/imake.c-dist   Sun Apr 17 17:10:29 1994
***************
*** 872,878 ****
  #if defined(SYSV) || defined(WIN32)
		freopen(tmpfname, "w+", tmpfd);
  #else /* !SYSV */
!               ftruncate(fileno(tmpfd), (off_t)0);
  #endif        /* !SYSV */
		initialized = TRUE;
	    fprintf (tmpfd, "# Makefile generated by imake - do not edit!\n");
--- 872,878 ----
  #if defined(SYSV) || defined(WIN32)
		freopen(tmpfname, "w+", tmpfd);
  #else /* !SYSV */
!               ftruncate(fileno(tmpfd), 0);
  #endif        /* !SYSV */
		initialized = TRUE;
	    fprintf (tmpfd, "# Makefile generated by imake - do not edit!\n");


------------------------------------------------------------------------------