crouch@zaphod.axion.bt.co.uk (chris rouch) (05/11/89)
From article <6364@cbnews.ATT.COM>, by cbema!las@cbnews.ATT.COM (cbema!las): > In article <793@cimcor.mn.org> jim_d@cimcor.mn.org (Jim Dahlberg) writes: > >>Larry, I started to compile Jove 4.12 on our SysV, but also found it >>difficult. Unfortunately I really don't have time to work on it. >>Fortunately, you have done it, so could you tell 'the net' how you did it? > > Sure. Happy to oblige. [diffs deleted ] Thanks for the patches, Larry. I needed a couple more to get jove to build on hp-ux 6.21. These involved changes to scandir.c and recover.c. The context diffs are included below. Once all the patches are applied jove builds and runs just fine. Chris Rouch -------------------------------------------------------------------------- crouch@axion.bt.co.uk RT3141, BTRL, Martlesham Heath, Ipswich +44 473 646093 "A woman drove me to drink, and I didn't even have the courtesy to thank her" -----cut here---------------------------------------------------------------- #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of shell archive." # Contents: scandir.diff recover.diff # Wrapped by crouch@crunchie on Thu May 11 16:14:04 1989 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f scandir.diff -a "${1}" != "-c" ; then echo shar: Will not over-write existing file \"scandir.diff\" else echo shar: Extracting \"scandir.diff\" \(1487 characters\) sed "s/^X//" >scandir.diff <<'END_OF_scandir.diff' X*** scandir.c~ Tue Feb 28 20:54:57 1989 X--- scandir.c Thu May 11 16:11:37 1989 X*************** X*** 31,40 **** X #else X # define DIRSIZE(entry) (entry->d_name[DIRSIZ-1]=='\0' ? strlen(entry->d_name) : DIRSIZ) X X- typedef struct { X- int d_fd; /* File descriptor for this directory */ X- } DIR; X- X DIR * X opendir(dir) X char *dir; X--- 31,36 ---- X*************** X*** 42,50 **** X DIR *dp = (DIR *) malloc(sizeof *dp); X struct stat stbuf; X X! if ((dp->d_fd = open(dir, 0)) == -1) X return 0; X! if ((fstat(dp->d_fd, &stbuf) == -1) || !(stbuf.st_mode & S_IFDIR)) { X closedir(dp); X return 0; /* this isn't a directory! */ X } X--- 38,46 ---- X DIR *dp = (DIR *) malloc(sizeof *dp); X struct stat stbuf; X X! if ((dp->dd_fd = open(dir, 0)) == -1) X return 0; X! if ((fstat(dp->dd_fd, &stbuf) == -1) || !(stbuf.st_mode & S_IFDIR)) { X closedir(dp); X return 0; /* this isn't a directory! */ X } X*************** X*** 54,60 **** X closedir(dp) X DIR *dp; X { X! (void) close(dp->d_fd); X free((char *) dp); X } X X--- 50,56 ---- X closedir(dp) X DIR *dp; X { X! (void) close(dp->dd_fd); X free((char *) dp); X } X X*************** X*** 65,71 **** X static struct direct dir; X X do X! if (read(dp->d_fd, &dir, sizeof dir) != sizeof dir) X return 0; X #if defined(elxsi) && defined(SYSV) X /* X--- 61,67 ---- X static struct direct dir; X X do X! if (read(dp->dd_fd, &dir, sizeof dir) != sizeof dir) X return 0; X #if defined(elxsi) && defined(SYSV) X /* END_OF_scandir.diff if test 1487 -ne `wc -c <scandir.diff`; then echo shar: \"scandir.diff\" unpacked with wrong size! fi # end of overwriting check fi if test -f recover.diff -a "${1}" != "-c" ; then echo shar: Will not over-write existing file \"recover.diff\" else echo shar: Extracting \"recover.diff\" \(1110 characters\) sed "s/^X//" >recover.diff <<'END_OF_recover.diff' X*** recover.c~ Thu May 11 10:36:35 1989 X--- recover.c Thu May 11 15:21:19 1989 X*************** X*** 63,71 **** X X #ifndef BSD4_2 X X- typedef struct { X- int d_fd; /* File descriptor for this directory */ X- } DIR; X X DIR * X opendir(dir) X--- 63,68 ---- X*************** X*** 73,79 **** X { X DIR *dp = (DIR *) malloc(sizeof *dp); X X! if ((dp->d_fd = open(dir, 0)) == -1) X return NULL; X return dp; X } X--- 70,76 ---- X { X DIR *dp = (DIR *) malloc(sizeof *dp); X X! if ((dp->dd_fd = open(dir, 0)) == -1) X return NULL; X return dp; X } X*************** X*** 81,87 **** X closedir(dp) X DIR *dp; X { X! (void) close(dp->d_fd); X free(dp); X } X X--- 78,84 ---- X closedir(dp) X DIR *dp; X { X! (void) close(dp->dd_fd); X free(dp); X } X X*************** X*** 92,98 **** X static struct direct dir; X X do X! if (read(dp->d_fd, &dir, sizeof dir) != sizeof dir) X return NULL; X #if defined(elxsi) && defined(SYSV) X /* X--- 89,95 ---- X static struct direct dir; X X do X! if (read(dp->dd_fd, &dir, sizeof dir) != sizeof dir) X return NULL; X #if defined(elxsi) && defined(SYSV) X /* END_OF_recover.diff if test 1110 -ne `wc -c <recover.diff`; then echo shar: \"recover.diff\" unpacked with wrong size! fi # end of overwriting check fi echo shar: End of shell archive. exit 0