mark@kodak.UUCP (Mark Hilliard) (08/30/89)
Thanks to all of those who answered on the news problem with Interactive Unix. That problem has been fixed! Now for the next one: 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 = Stop. If you can make any sence of this please help shed some light on it. Mark Hilliard
john@synsys.UUCP (John C. Rossmann) (08/30/89)
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 <sys/fs/s5dir.h>,
which is #included by <sys/dir.h>.)
John Rossmann (uunet!synsys!john)
jim@hcr.UUCP (Jim Sullivan) (08/31/89)
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 This message is produced when the pre-processor encounters a directive with extra tokens at the end (oh, really? :-). This is the result of a change in the pre-processor from previous releases. In previous releases of the pre-processor, the construct: #ifdef i386 code code code #endif i386 was legal. The offending line in the current pre-processor is the "#endif i386" line. "i386" is considered a token and the "#endif" directive does not take and extra tokens so the error message gets printed. I guess that someone in ANSI though that extra tokens were evil and should be removed (I agree actually). The construct is often used in large programs with many #ifdefs to indicate where an #ifdef for a particular #define ends. The correct form is: #endif /* i386 */ So you can ignore the extra token messages or write a awk script to change them into legal #endif statements (this exercise is left to the user) >"ngdata.c", line 187: syntax error >"ngdata.c", line 194: dirp undefined >"ngdata.c", line 197: warning: illegal pointer/integer combination, op = > I think that this is a syntax error :-) Jim Sullivan
sauron@dsoft.UUCP (Ron Stanions) (12/23/89)
I too had this problem with news2.11 on a system running 386/ix, and just today finished installing rn myself. to fix some problems with rn, all I did was add #include <dirent.h> to the start of the file (ngdata.c and term.c I think) and change the references from "struct direct ..." to "struct dirent" wherever and whenever they occurred. this seems to have worked fantastically. for news2.11 I beleive all I did was to add #include <sys/ptem.h>, though I suspect I had to do a few more things that I really don't remember any more. sorry as for all those statements that say: file.c: ## extra tokens (ignored) after directive these are a result of information on #endif and #else statements. 386/ix's compiler doesn't like things like #ifdef TIOCTL ... #else !TIOCTL ... #endif TIOCTL the TIOCTL and !TIOCTL after #else and #endif are only commentary, and come up as warnings to 386/ix cc. also #ifdef TIOCTL; produces a similar warning. it doesn't like the semicolon. I edited ALL occurances of these things out of all the .c and .h files and recompiled everything without a single warning message, and the system appears to be running very happily indeed right now! Ron Stanions -- sauron@dsoft \_/\--/\_/ All things posted by me are dsoft system administrator < \ / > by-products of a deranged mind ...!tronsbox!dsoft!sauron \ / from spending too many hours Dragonsoft Development |)(| trying to make uucp work! Livingston NJ (201)992-9819 -- --Sauron
sauron@dsoft.UUCP (Ron Stanions) (12/23/89)
I had this problem with news2.11 on a system running 386/ix, and just today finished installing rn successfully myself. to fix some problems with rn, all I did was add #include <dirent.h> to the start of the file (ngdata.c and term.c I think) and change the references from "struct direct ..." to "struct dirent" wherever and whenever they occurred. this seems to have worked fantastically. for news2.11 I beleive all I did was to add #include <sys/ptem.h>, though I suspect I had to do a few more things that I really don't remember any more. sorry as for all those statements that say: file.c: ## extra tokens (ignored) after directive these are a result of information on #endif and #else statements. 386/ix's compiler doesn't like things like #ifdef TIOCTL ... #else !TIOCTL /* this is an extra token */ ... #endif TIOCTL /* this is an extra token */ the TIOCTL and !TIOCTL after #else and #endif are only commentary, and come up as warnings to 386/ix cc. also #ifdef TIOCTL; produces a similar warning. it doesn't like the semicolon. I edited ALL occurances of these things out of all the .c and .h files and recompiled everything without a single warning message, and the system appears to be running very happily indeed right now! Ron Stanions -- sauron@dsoft \_/\--/\_/ All things posted by me are dsoft system administrator < \ / > by-products of a deranged mind ...!tronsbox!dsoft!sauron \ / from spending too many hours Dragonsoft Development |)(| trying to make uucp work! Livingston NJ (201)992-9819 -- --Sauron