From: Larry Butler (butler@cs.tulane.edu)
Date: 10/20/92


From: butler@cs.tulane.edu (Larry Butler)
Subject: Re: Does anyone need xv-2.21 binaries for jump 4.1?
Date: 21 Oct 1992 04:53:13 GMT


  I got several requests regarding what had to be done to compile xv. Well,
This is basicly it:
I got the sources from ftp.uu.net in
in the Makefile CC is: CC = gcc -traditional -O6
Note: if -traditional and -O6 are in CCOPTS they will not propagate to the
other makefiles (jpeg and tiff).
I'v never used diff so all I can tell you is this needs to be changed in
xvdir.c. It's about 45% into the file.

Change:

#ifdef DIRENT
# ifdef i386
      /* Not 100% sure d_reclen is correct, but it works... MWS 10/18/90 */
      fnames[i] = (char *) malloc(dp->d_reclen + 2); /* filetype + '\0'*/
# else
      fnames[i] = (char *) malloc(strlen(dp->d_name) + 3);
# endif
#else
      fnames[i] = (char *) malloc(dp->d_namlen + 2); /* +2=filetype + '\0'*/
#endif

to:

# ifdef i386
      /* Not 100% sure d_reclen is correct, but it works... MWS 10/18/90 */
      fnames[i] = (char *) malloc(dp->d_reclen + 2); /* filetype + '\0'*/
# else
      fnames[i] = (char *) malloc(strlen(dp->d_name) + 3);
# endif

Other info:
If -DDIRNET is set in the makefile it will cause plenty of errors.
I checked memory usage a couple of times during compilation, and one time
a total of 20M of real and virtual memory was being used.

Larry