Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!gem.mps.ohio-state.edu!ginosko!uunet!synsys!john From: john@synsys.UUCP (John C. Rossmann) Newsgroups: comp.unix.i386 Subject: Re: how about RN and Interactive? Summary: Change references to "struct direct" to "struct dirent" Message-ID: <345@synsys.UUCP> Date: 30 Aug 89 04:49:07 GMT References: <2071@kodak.UUCP> Reply-To: john@synsys.UUCP (John C. Rossmann) Organization: Synergistic Systems, Silver Spring, MD Lines: 45 In article <2071@kodak.UUCP> mark@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 , which is #included by .) John Rossmann (uunet!synsys!john)