how about RN and Interactive?

John C. Rossmann john at synsys.UUCP
Wed Aug 30 14:49:07 AEST 1989


In article <2071 at kodak.UUCP> mark at kodak.UUCP () writes:
+Not liking readnews, we wanted to compile the rn package.  I can tell you that
+there were lots of problems.  We were able to fix most of them but the
+following error has us stimied:
+
+
+ngdata.c: 132: extra tokens (ignored) after directive
+ngdata.c: 141: extra tokens (ignored) after directive
+ngdata.c: 168: extra tokens (ignored) after directive
+ngdata.c: 177: extra tokens (ignored) after directive
+"ngdata.c", line 187: syntax error
+"ngdata.c", line 194: dirp undefined
+"ngdata.c", line 197: warning: illegal pointer/integer combination, op =
+
+If you can make any sence of this please help shed some light on it.
+
+Mark Hilliard


I ran into the same problem both on Sys V/386 and AIX PS/2: You have to
change the references to "struct direct" to "struct dirent" in the source
files ngdata.c and utils.c.

The problem arises because of System V's implementation of the directory
access library (opendir(), readdir(), etc., directory(3C) ). System V
"borrowed" these functions from BSD in preparation for the eventual move to
long file names. They gave the functions the same names as the Berkeley
counterparts, but the data structures aren't the same. "Configure" sees
the opendir()/readdir() functions and rightly decides to use them to
access directories. BUT, the rn code assumes that this is the BSD
implementation. The SysV equivalent of a "struct direct" in BSD is the
"struct dirent"; it's declared in /usr/include/sys/dirent.h (which is
included by /usr/include/dirent.h). The .h's will be picked up by
ndir.h in rn if you've done your Configure right. (At least it works
that way for SysV/386 3.2 and AIX PS/2.)

Oh, SysV couldn't call the new entry structure a "struct direct" because
of compatibility with existing SysV systems and code. In the old/current
SysV directory structure where a directory entry is an i-number + 14
characters, the old/current style of a directory entry is declared as
"struct direct" -- this goes back at least to V7. (See <sys/fs/s5dir.h>,
which is #included by <sys/dir.h>.)


John Rossmann		(uunet!synsys!john)



More information about the Comp.unix.i386 mailing list