Subject: Re: XFree86 2.1 and new stuff
To: None <Matthieu.Herrb@laas.fr>
From: Thomas Eberhardt <thomas@mathematik.uni-Bremen.de>
List: current-users
Date: 04/09/1994 21:38:15
> [...]
> 
> *** mit/config/imake.c.orig	Sat Jan 15 13:57:38 1994
> --- mit/config/imake.c	Thu Apr  7 20:32:36 1994
> ***************
> *** 742,748 ****
>   #if defined(SYSV) || defined(AMOEBA) || defined(_MINIX)
>   		freopen(tmpfname, "w+", tmpfd);
>   #else	/* !SYSV */
> ! 		ftruncate(fileno(tmpfd), 0);
>   #endif	/* !SYSV */
>   		initialized = TRUE;
>   	    fprintf (tmpfd, "# Makefile generated by imake - do not edit!\n");
> --- 742,748 ----
>   #if defined(SYSV) || defined(AMOEBA) || defined(_MINIX)
>   		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");
> [...]

There are two other places in imake.c which don't have consequences for
little endian architectures like the x86 but will probably cause trouble
if someone tries to build imake on big endian ones.

*** config/imake.c-	Fri Mar 11 14:41:57 1994
--- config/imake.c	Sat Apr  9 21:16:14 1994
***************
*** 591,597 ****
  	if ((infd = open(Imakefile, O_RDONLY)) < 0)
  		LogFatal("Cannot open %s for input.", Imakefile);
  	fstat(infd, &st);
! 	buf = Emalloc(st.st_size+1);
  	if (read(infd, buf, st.st_size) != st.st_size)
  		LogFatal("Cannot read all of %s:", Imakefile);
  	close(infd);
--- 591,597 ----
  	if ((infd = open(Imakefile, O_RDONLY)) < 0)
  		LogFatal("Cannot open %s for input.", Imakefile);
  	fstat(infd, &st);
! 	buf = Emalloc((int)(st.st_size+1));
  	if (read(infd, buf, st.st_size) != st.st_size)
  		LogFatal("Cannot read all of %s:", Imakefile);
  	close(infd);
***************
*** 732,738 ****
  		 */
  		fseek(tmpfd, 0, 0);
  		fstat(fileno(tmpfd), &st);
! 		pline = buf = Emalloc(st.st_size+1);
  		total_red = fread(buf, 1, st.st_size, tmpfd);
  		if (total_red != st.st_size)
  			LogFatal("cannot read %s\n", tmpMakefile);
--- 732,738 ----
  		 */
  		fseek(tmpfd, 0, 0);
  		fstat(fileno(tmpfd), &st);
! 		pline = buf = Emalloc((int)(st.st_size+1));
  		total_red = fread(buf, 1, st.st_size, tmpfd);
  		if (total_red != st.st_size)
  			LogFatal("cannot read %s\n", tmpMakefile);

-- 
/  Thomas Eberhardt <thomas@mathematik.uni-Bremen.de>  \            Moo!  (__)
| Center for Complex Systems and Visualization (CeVis) |_________/--------(oo)
|     University of Bremen, FB 3, Bibliothekstr. 1     |        * |______||\/
\_o_ D-28359 Bremen, Germany, FAX: +49 421 218-4236 _o_/          ^^     ^^

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