home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 400-499 / ff473.lzh / CNewsSrc / cnews_src.lzh / notebook / problems < prev    next >
Text File  |  1991-01-07  |  25KB  |  628 lines

  1. .DA "10 Dec 1990"
  2. .TL
  3. Known Porting Problems With C News
  4. .AU
  5. Henry Spencer
  6. .AI
  7. Dept. of Zoology
  8. University of Toronto
  9. .SH
  10. Intro
  11. .PP
  12. C News in general is pretty portable.
  13. People have got it to run on a very wide range of systems with little
  14. trouble.
  15. Difficulties are usually problems in the system, not C News.
  16. Some of them, however, are widespread enough to be worth comment, for
  17. the guidance of people having problems.
  18. If you run into a novel problem,
  19. we are always interested in hearing about such things.
  20. .SH
  21. Unix Dependencies
  22. .PP
  23. The biggest portability glitch in C News is that it depends a lot on Unix
  24. utilities.
  25. The extensive use of complex shell files, \fIsed\fR and \fIawk\fR programs,
  26. and a wide range of lesser Unix utilities would make it quite difficult
  27. to move C News to a system that is seriously non-Unix-like.
  28. The actual C programs seldom depend on Unix in major ways.
  29. (An exception is the use
  30. of \fIread\fR system calls in \fIexpire\fR, to avoid difficulties with
  31. stdio end-of-file behavior;
  32. we now know how to avoid this but haven't implemented the fixes yet.)
  33. .PP
  34. We know that \fIawk\fR and the colon (:) operator of \fIexpr\fR are
  35. problem areas under Minix.
  36. .SH
  37. Shell Problems
  38. .PP
  39. C News seriously stress-tests shells.
  40. The current Minix shell is not robust enough
  41. in the face of complex inputs, botches some constructs entirely,
  42. and can run out of memory on the complex shell files.
  43. Any shell that is too old to implement comments begun
  44. by ``#'' is big trouble, since we use such comments everywhere.
  45. .PP
  46. Any system/shell combination that thinks that a shell script starting
  47. with ``#!\ /bin/sh'' should be run by the C Shell (because it starts
  48. with `#') is also big trouble:
  49. you will have to change that line to ``:\ use\ /bin/sh'' everywhere.
  50. We know that at least some releases of Xenix have this problem.
  51. It is not necessary that your kernel understand the ``#!'' feature\(emwe
  52. believe that nothing in C News relies on it\(embut it is essential that
  53. it not cause invocation of the C Shell.
  54. .PP
  55. We know that some Hewlett-Packard Unixes have broken shells, probably
  56. the result of mistakes in
  57. HP's efforts to make
  58. the shell 8-bit-clean; the symptom is
  59. that something like:
  60. .DS
  61. x=y
  62. if test " $x" != " y"
  63. then
  64.     echo oops
  65. fi
  66. .DE
  67. prints ``oops''.
  68. This is, again, big trouble, because we do that a lot.
  69. .PP
  70. Many people using 3B1s, aka UNIX PCs,
  71. run the Korn shell as their \fI/bin/sh\fR.
  72. Some other folks may do this too.
  73. Beware that \fIksh\fR was not fully \fIsh\fR-compatible for a
  74. long time, with some subtle differences in the
  75. ill-documented behavior of backquotes and backslashes.
  76. Some of the C News shell scripts,
  77. notably \fIinews\fR,
  78. are known to hit these bugs.
  79. We are \fItold\fR that current \fIksh\fRs have fixed them.
  80. .PP
  81. It is reliably reported that SunOS 4.0.\fIx\fR shells will dump core
  82. in some ill-defined circumstances, when the user environment (sum of all
  83. environment variables) is exactly the wrong size.
  84. Perhaps this has been fixed in 4.1.
  85. .PP
  86. It is reliably reported that the VAX 3.1 Ultrix shell is somewhat broken
  87. and gives various kinds of trouble.
  88. Switching to \fI/bin/sh5\fR (note that this requires fixing the first line
  89. of a zillion shell files) is reported to banish the problems.
  90. .PP
  91. In some environments, when processing batches which are not compressed,
  92. extremely mysterious malfunctions occur and messages reporting a
  93. \fIrelaynews\fR exit status of 1005 (and the like) are seen.
  94. This is believed to be a subtle shell bug that shows up
  95. when a pipeline is used as the condition in a shell \fIif\fR.
  96. Unless you use \fIc7encode\fRd transmission\(emwhich is very rare\(ema
  97. workaround is to comment out
  98. the following lines in \fIinput/newsrun\fR:
  99. .DS
  100. elif c7decode <$f 2>/dev/null | compress \-d >$text 2>/dev/null
  101. then
  102.     : okay
  103. .DE
  104. A minor bonus is that this will improve processing speed (!).
  105. We plan improvements to input processing, and this problem should be
  106. eliminated as a side effect of that.
  107. .PP
  108. (Note, this is \fInot\fR the well-known bug of many old shells,
  109. in which the choice of process whose exit status is picked up is
  110. semi-random in such situations.
  111. Exercise for the reader:  show that
  112. \fIthat\fR is not a problem in \fInewsrun\fR.)
  113. .SH
  114. Make vs. Test
  115. .PP
  116. There is a persistent problem on 3B2s with implementations of \fImake\fR
  117. that violate the SVID in a subtle way.
  118. They attempt to execute makefile commands directly, rather than via the
  119. shell, if the commands do not contain metacharacters.
  120. This means that if\(emas on many 3B2s\(em\fItest\fR is a shell builtin
  121. \fIand there is no /bin/test program\fR, the makefile line
  122. ``test\ \-s\ file'' will cause \fImake\fR to complain about an unknown
  123. command.
  124. (The SVID says that makefile commands must be executed as if by
  125. the shell, and the shell will execute this line correctly.)
  126. We've added `;' on the ends of such lines, which suffices to convince
  127. \fImake\fR to run a shell on the systems we've encountered, but AT&T
  128. is good at finding ways to break such workarounds.
  129. This problem is also known to occur in A/UX.
  130. .SH
  131. Offsetof
  132. .PP
  133. ANSI C requires C compilers to supply a macro \fIoffsetof\fR, which can
  134. be used to find the offset of a structure member within the structure.
  135. \fIRelaynews\fR's header-parsing code uses it,
  136. defining it if the system has not supplied it.
  137. Unfortunately, it is really hard to write a portable version of this.
  138. The implementation we currently use is:
  139. .DS
  140. #define offsetof(type, mem) ((char *)&((type *)NULL)\->mem \- (char *)NULL)
  141. .DE
  142. The table in \fIrelay/hdrdefs.c\fR
  143. puts invocations of \fIoffsetof\fR in initializers.
  144. This turns out to be a severe stress test for C compilers.
  145. A compilation error in \fIhdrdefs.c\fR is almost certain
  146. to be problems with this macro.
  147. Some compilers,
  148. notably the one in Microport System V for the 286,
  149. reject it.
  150. We have heard a report that System V Release 2 on the VAX silently
  151. miscompiles it!
  152. If you have trouble with \fIoffsetof\fR, you might try this version instead:
  153. .DS
  154. #define offsetof(type, mem) ((int)&((type *)NULL)\->mem)
  155. .DE
  156. .SH
  157. Fast Stdio Routines
  158. .PP
  159. We supply a set of fast standard-I/O routines that are compatible with
  160. most AT&T-derived implementations of \fIstdio\fR.
  161. They speed up C News quite a bit.
  162. However, they don't work on all Unixes.
  163. The tester program we supply, which the library-build procedure runs,
  164. is thought to diagnose such problems 100% of the time.
  165. It has been reported in the past that A/UX and Microport 386 stdios
  166. flunk the test.
  167. SunOS 4.0 used to pass the test falsely, but improvements in both
  168. the test and the routines
  169. seem to have cured the problems:
  170. 4.0.3 passes the test and
  171. as far as we can tell,
  172. the routines run correctly under it.
  173. .PP
  174. In any case, if you are feeling nervous or are having mysterious problems,
  175. telling \fIbuild\fR that you don't want to use the fast-stdio stuff is
  176. always safe.
  177. .SH
  178. void
  179. .PP
  180. Old compilers that don't understand the \fIvoid\fR type will choke on
  181. much of our code.
  182. There is a commented-out ``#define\ void\ int'' in \fInews.h\fR that
  183. cures most cases of this if you uncomment it.
  184. (We have a report that you might need to add ``\-Dvoid=int'' to the
  185. Makefile in \fIlibv7\fR if you're using that library.)
  186. C News does not rely on the ANSI C ``void\ *'' type as far as we know.
  187. .SH
  188. Read/write Modes in fopen
  189. .PP
  190. Unix V7 documented only ``r'', ``w'', and ``a'' as suitable mode arguments
  191. to \fIfopen\fR.
  192. It actually implemented the read/write modes, ``r+'', ``w+'', and ``a+'',
  193. as well, and C News relies on them.
  194. Unix reimplementations based on old documentation may have trouble here;
  195. we know that at least the older versions of Minix really don't implement
  196. these modes.
  197. .SH
  198. MAXLONG
  199. .PP
  200. The \fIrelay/cpu.h\fR file formerly defined a constant \fIMAXLONG\fR
  201. which is the biggest positive value of a \fIlong\fR.
  202. The definition was clever but failed on some odd systems (Unisys?).
  203. Current versions of C News
  204. generate the value dynamically in a less fallible way,
  205. and check the value for plausibility.
  206. (This is encountered when \fIrelaynews\fR is asked to
  207. process a single article, not a batch.
  208. This happens primarily when an article is posted locally, with \fIinews\fR.)
  209. It is still barely possible that the plausibility check will fail on some
  210. bizarre system.
  211. .SH
  212. df Output Format
  213. .PP
  214. The \fIspacefor\fR utility needs to understand the output format of \fIdf\fR.
  215. There are numerous variations on \fIdf\fR.
  216. \fIBuild\fR and the relevant makefiles know about the more common ones,
  217. but customization may be necessary.
  218. \fISpacefor\fR is commented well enough that it should be possible to
  219. figure out the necessary changes; usually the initializations of \fInr\fR
  220. and \fInf\fR are all that need changing.
  221. If there are colons (:) in your \fIdf\fR's output format, you should
  222. probably start from the ``sysv'' \fIspacefor\fR, which attempts to
  223. preprocess the output to get rid of System V garbage;
  224. otherwise the ``bsd'' one is a reasonable starting point.
  225. .PP
  226. One constant nuisance is \fIdf\fRs that are too stupid to take a directory
  227. name as an argument.
  228. The long-term solution to this is to edit a suitable variant of \fIspacefor\fR
  229. to know about the proper arguments.
  230. A short-term solution is to use the ``null'' variant, sacrificing space
  231. checking for the sake of getting something working.
  232. .PP
  233. We're told that HP-UX 7.0 users are best advised to
  234. choose the ``bsd'' variant of spacefor, and edit it to
  235. call \fIbdf\fR instead of \fIdf\fR.
  236. Similar approaches may be useful on other hybrid SysV/BSD systems.
  237. .SH
  238. Floating Point
  239. .PP
  240. The only place in C News where floating point is used, as far as we know,
  241. is in the calculation of expiry dates in \fIexpire\fR.
  242. This is not a performance bottleneck, so slow floating-point arithmetic
  243. is not a problem.
  244. Complete absence of floating point would require minor modifications to
  245. \fIexpire\fR.
  246. .SH
  247. 386 Optimizer vs. dbz
  248. .PP
  249. We have a reliable report that the System V 386 optimizer (invoked when
  250. \fIcc\fR is given the \fB\-O\fR option) miscompiles the \fIdbz\fR package
  251. badly enough to cripple it, without producing any error messages.
  252. The only fix is to compile \fIdbz\fR without \fB\-O\fR.
  253. .PP
  254. SCO Xenix/386 2.3 has the same problem.
  255. .SH
  256. nnafree and nnfree
  257. .PP
  258. We have a reliable report that
  259. the HP Spectrum C compiler has an optimiser bug that makes it throw up
  260. (with a 
  261. ``cc: Internal error 3279: Please contact your local HP representative''
  262. message)
  263. on the \fInnafree\fR macro
  264. (and \fInnfree\fR, a historical synonym)
  265. in \fIh/news.h\fR.
  266. The following revised version of
  267. the macro reportedly avoids
  268. the problem.
  269. .DS
  270. #define nnafree(mempp) do { if (*(mempp) != 0) { free((char *)*(mempp)); \e
  271.    *(mempp) = 0; }} while (0)
  272. .DE
  273. .PP
  274. It is also reliably reported that the Microport compiler objects to
  275. these macros in large model.
  276. Whether the above fix would suffice is not known.
  277. Manual expansion [barf!] is known to work, although it would be less
  278. painful to define a function containing the right code and change the
  279. macro to call the function.
  280. Code for a suitable function can, in fact, be found
  281. in \fIh/news.h\fR,
  282. inside `#ifdef\ lint'.
  283. .SH
  284. ANSI C
  285. .PP
  286. Although we made an effort to be ANSI-C compatible,
  287. lack of access to a real ANSI C compiler limits our ability to do this.
  288. A secondary problem is that it's really very difficult to get code that
  289. is 100% acceptable to both ANSI C compilers and older compilers.
  290. Some issues inevitably got resolved in favor of current compilers,
  291. and may cause complaints from ANSI C compilers.
  292. .PP
  293. Work is in progress on moving us closer to ANSI compatibility.
  294. Beware that if \fB__STDC__\fR is defined
  295. by your compiler but it is \fInot\fR ANSI compatible, you are on your
  296. own as far as we're concerned, even if the value is specified as 0.
  297. (We can't just use ``#if\ __STDC__'' because some preprocessors choke
  298. on the appearance of an unknown identifier in #if.)
  299. .SH
  300. GNU C
  301. .PP
  302. If compiling with the GNU compiler, you may need the
  303. \fB\-traditional\fR flag.
  304. Beware, also, that if you are using your system's \fIdbm\fR library,
  305. it contains functions that return structure values, and the GNU conventions
  306. for handling such values are incompatible with the ones in many AT&T-derived
  307. compilers.
  308. The
  309. \fB\-fpcc-struct-return\fR option cures this.
  310. .SH
  311. Awk Problems
  312. .PP
  313. A number of problems can arise if your \fIawk\fR has bugs, since the shell
  314. files rely on \fIawk\fR fairly extensively.
  315. For example, \fIawk\fR is a prime suspect if \fIspacefor\fR doesn't work.
  316. We've fixed the worst trouble spots, but would appreciate detailed information
  317. on any more.
  318. .PP
  319. One known problem that is hard to avoid is line-length limits in \fIawk\fR.
  320. In particular,
  321. for several purposes in control-message
  322. handling C News wants to build a ``canonical'' representation
  323. of the \fIsys\fR file, with backslashed newlines removed.
  324. This is done by
  325. NEWSBIN\fI/relay/canonsys.awk\fR.
  326. Most \fIawk\fRs have limits
  327. on line length, and some of the limits are too low to cope with long
  328. multiply-continued \fIsys\fR lines.
  329. 512-byte limits, found in a number of old \fIawk\fRs, are particularly
  330. troublesome.
  331. A quick look indicates that this will interfere, to some uncertain extent,
  332. with \fIcheckgroups\fR and \fIsendsys\fR.
  333. Big deal. :-)
  334. The complaint may also appear from
  335. \fInewgroup\fR, but there it should be harmless.
  336. .SH
  337. Systems Without Hard Links
  338. .PP
  339. Some vaguely Unixoid systems have trouble implementing real (``hard'') links.
  340. Examples are VMS in general and Eunice in particular.
  341. There are some hooks for dealing with this, but it's not trivial.
  342. .PP
  343. \fIRelaynews\fR will try to make symbolic links if real ones fail.
  344. There is one exception:
  345. if \fIrelaynews\fR cannot buffer up enough of the article in memory to
  346. find the `Newsgroups:' line, it will drop the article into a temporary
  347. file and will rely on being able to move that to the first of the
  348. `real' locations by manipulating links.
  349. This should essentially never happen except on 16-bit machines,
  350. and should be rare even on them.
  351. .PP
  352. \fIExpire\fR has a \fB\-l\fR option which
  353. tells it to consider the first filename of an article its `leader',
  354. not expiring the article under that name until it has expired under
  355. all others.
  356. This has not been tested much recently.
  357. .PP
  358. The locking system (both C routines and the \fInewslock\fR program)
  359. will need revision in some system-dependent way to avoid use of links.
  360. .PP
  361. There is one minor use of links in installation (\fIinews\fR is found
  362. in two places, and the Makefile attempts a link before doing a copy),
  363. and substantially more in the regression tests.
  364. .SH
  365. 16-bit Machines
  366. .PP
  367. C News has been tested on 16-bit machines\(emindeed, a good bit of the
  368. early development work was done on one\(emand does run on them.
  369. Nothing relies on ints being 32 bits.
  370. Nothing relies on pointers and ints being the same size, as far as we know.
  371. Nothing relies on large address spaces,
  372. although one or two modules come in separate small-space and large-space
  373. versions, and the small-space versions are slower.
  374. .PP
  375. However, there are some fundamental limits
  376. to consider.
  377. Both \fIrelaynews\fR and \fIexpire\fR\(emthe usual trouble spots for
  378. space shortages\(emwant to keep lots of stuff in core.
  379. There isn't any easy way around this one.
  380. .SH
  381. Number of File Descriptors
  382. .PP
  383. There is a constant, NOPENBFS, in \fIrelay/trbatch.c\fR, that defines
  384. how many batch files are kept open simultaneously.
  385. If you are feeding much news to more systems than this,
  386. \fIrelaynews\fR performance will suffer.
  387. .PP
  388. The major limit on NOPENBFS is available file descriptors
  389. (although on a 16-bit machine there might also be a shortage of memory
  390. for \fIstdio\fR buffers).
  391. Other parts of \fIrelaynews\fR want perhaps 10 file descriptors for
  392. other purposes, so with the usual total supply of 20, a NOPENBFS value
  393. of 10 is the right default.
  394. If you feed many people,
  395. and your kernel provides a process with more than 20 file
  396. descriptors,
  397. you probably want to boost
  398. NOPENBFS (this can be done with -DNOPENBFS=xxx in the makefile).
  399. Remember to leave about 10 descriptors worth of headroom.
  400. .SH
  401. Shell Processing Order
  402. .PP
  403. Normally, shell
  404. variable expansion should take place before scanning for syntax
  405. elements such as ``0<&1''.
  406. At least one reimplementation of the shell
  407. (specifically, Bash 1.04) does things in the
  408. wrong order.
  409. This is known to affect, at least, \fIrelay/sh/anne.jones\fR,
  410. which can be fixed by changing (circa line 44)
  411. .DS
  412. "")    USER="`who am i <&$fd |
  413. .DE
  414. to
  415. .DS
  416. "")    USER="`eval \e"who am i <&$fd\e" |
  417. .DE
  418. or so we are told.
  419. .SH
  420. Binary-Mode Fopen
  421. .PP
  422. In several places, the new
  423. \fIdbz\fR
  424. uses ANSI C ``binary mode'' fopen codes, e.g.
  425. `fopen(...,\ "r+b")'.
  426. The text/binary distinction involved is meaningless
  427. under Unix, and most Unix implementations just ignore trailing nonsense in
  428. the second argument of
  429. \fIfopen\fR,
  430. so it all works out nicely.
  431. .PP
  432. Unfortunately... at least one version of DEC's Ultrix objects to the `b's,
  433. we are told.
  434. Sigh.
  435. DEC will have to fix this to make their systems ANSI
  436. compatible, but heaven only knows how long that will take.
  437. .PP
  438. Meanwhile, the fix is to delete the `b's in the second arguments of the
  439. \fIfopen\fRs
  440. in three places in
  441. \fIdbminit()\fR
  442. in
  443. \fIdbz/dbz.c\fR,
  444. if your system has
  445. this particular bit of brain damage.
  446. .SH
  447. size_t
  448. .PP
  449. Some systems, notably from Microport, do not define the
  450. \fIsize_t\fR type in the \fI<sys/types.h>\fR header.
  451. Worse, the \fIsize_t\fR in that header doesn't necessarily bear any
  452. relationship to the ANSI C \fIsize_t\fR.
  453. This causes trouble in the \fIdbz\fR library in particular.
  454. The proper type for \fIsize_t\fR is whatever the C \fIsizeof\fR
  455. operator returns, nominally an unsigned type which is large enough to
  456. contain the size of any memory object.
  457. We think nothing relies too heavily on it being unsigned.
  458. Note that \fIsize_t\fR must also be suitable for use in the two middle
  459. arguments of \fIfread\fR and \fIfwrite\fR, the last argument of
  460. \fImemcpy\fR, \fImemchr\fR, and \fImemcmp\fR,
  461. and the argument of \fImalloc\fR.
  462. .SH
  463. Background Processes vs. csh
  464. .PP
  465. \fIInews\fR runs much of its processing in the background.
  466. We are told that this can hit problems, in some circumstances,
  467. with \fIcsh\fR's manipulations of signals, terminal modes, etc etc.
  468. We prefer a standard shell, and have made no attempt to understand the
  469. C shell's weirdnesses.
  470. We're aware that well-written programs can fail
  471. under the C shell due to bizarre problems with weird signals, etc., but
  472. we class this as the fault of the C shell and its co-conspirators and
  473. decline to contort our programs to compensate for its failings.
  474. We do
  475. sympathize with people victimized by it, but can be of no practical help.
  476. .SH
  477. Compress Options
  478. .PP
  479. Some imbecilic vendors have altered \fIcompress\fR so that it must be
  480. given a \fB\-u\fR option (instead of the standard \fB\-d\fR) to uncompress
  481. a file.
  482. The symptoms of this are strange:
  483. local postings and occasional outside articles come through all right
  484. (because they weren't compressed), but most outside traffic gets rejected
  485. by \fIrelaynews\fR, which complains that it lacks `Path:' lines.
  486. In general, a complaint about a lack of `Path:' tends to mean that
  487. \fIrelaynews\fR got fed total gibberish.
  488. .SH
  489. ulimit
  490. .PP
  491. Most versions of System V have the concept of \fIulimit\fR,
  492. a per-process limit on how big an individual file can be.
  493. This limit can be lowered by anyone but raised only by the super-user;
  494. normally \fIinit\fR or \fIlogin\fR initializes it to some suitable value.
  495. Unfortunately, many System Vs set it far too low, at 1 megabyte.
  496. This causes trouble with many things, but in particular,
  497. \fIrelaynews\fR, \fIexpire\fR, etc.
  498. need to be able to work with the \fIhistory\fR file,
  499. which can easily be several megabytes.
  500. It's necessary to deal with this on all paths by which
  501. any of these programs might be invoked:
  502. from \fIuucp\fR or other transport software bringing in news,
  503. from \fIcron\fR,
  504. and by users via \fIinews\fR for local postings.
  505. It is difficult to do this in a portable way when super-user privileges
  506. are needed.
  507. .SH
  508. Restricted Shells
  509. .PP
  510. There is an unfortunate interaction between the `#!' feature in shell files
  511. and the ``restricted shell'' feature found in some Unixes (notably System V):
  512. the restricted shell typically is just a different way of invoking
  513. \fI/bin/sh\fR, and in some versions, careless code just checks the first
  514. letter of the name the shell was invoked under to see if it was `r'.
  515. Unfortunately, if the system has the `#!' feature and there is a shell
  516. file named, say, \fIrnews\fR whose first line is `#!\ /bin/sh',
  517. this shell file will end up invoking the restricted shell!
  518. .PP
  519. Simply deleting the `#!' line might fix this; on systems which have the
  520. Korn shell, changing `#!\ /bin/sh' to `#!\ /bin/ksh' might work.
  521. Otherwise you will have
  522. to arrange to have your neighbors invoke \fIcunbatch\fR instead of
  523. \fIrnews\fR, or else write a simple \fIrnews\fR that invokes the real
  524. one under another name.
  525. It would be wise to check for other shell files whose names begin with `r',
  526. also, as \fIrnews\fR definitely isn't the only one.
  527. .SH
  528. Remote Invocation vs. Nonstandard Shells
  529. .\" thanks to Paul Eggert for most of this
  530. .PP
  531. When \fInewsrun\fR is invoked on a host that is not the news server,
  532. it uses \fIrsh\fP to propagate news batches to the server.
  533. It runs \fI/bin/sh\fR explicitly to avoid major difficulties with
  534. non-standard shells,
  535. but it has to rely on the invoker's login shell to run that one command.
  536. This means \fInewsrun\fR will emit spurious output
  537. if its invoker's login shell is the C shell
  538. and its invoker's \fI.cshrc\fR contains commands that generate output.
  539. A similar problem occurs with \fIbash\fP and \fI.bashrc\fP.
  540. .PP
  541. The simplest solution is to use \fI/bin/sh\fP
  542. as the login shell for \fInewsrun\fP's invoker.
  543. Otherwise, if you have a networked news server,
  544. check that the login shell is standard enough to invoke \fI/bin/sh\fP
  545. by executing the following command as \fInewsrun\fP's invoker.
  546. .DS
  547. rsh \fInewsserver\fP exec /bin/sh \-c true
  548. .DE
  549. This command should output nothing.
  550. .SH
  551. Values of Logical Operators
  552. .PP
  553. There seem to
  554. be compilers, e.g. the Ultrix one on DEC's new RISC workstations,
  555. that go into convulsions when they see something like
  556. .DS
  557. *p++ = isascii(c) && isalnum(c);
  558. .DE
  559. because they don't know how to generate a numeric value for `&&'.
  560. One or two places in C News use constructs like this.
  561. If you run into this, you might
  562. want to try replacing the
  563. right-hand side
  564. with something like ``(...)\ ?\ 1\ :\ 0'' to get the
  565. troublesome operator back into a conditional context.
  566. .PP
  567. A slightly related problem is that not everyone calls the run-remote-shell
  568. command \fIrsh\fR; on System V in particular, \fIrsh\fR means something
  569. different.
  570. For the moment we have opted to ignore this issue, as the possibilities
  571. for gratuitous differences boggle the mind.
  572. People facing this problem may wish to place an
  573. \fIrsh\fR shell file in the search path to invoke the right command in the
  574. right way, whatever that is.
  575. .SH
  576. Values of Logical Operators
  577. *p++ = isascii(c) && isalnum(c);
  578. .DE
  579. because they don't know how to generate a numeric value for `&&',
  580. or because they don't know how to turn that value into a `char'.
  581. One or two places in C News use constructs like this.
  582. If you run into this, you might
  583. ...
  584. .SH
  585. Empty Lines
  586. .PP
  587. Some backward operating systems (through which your C News distribution
  588. may have passed on its way to you), and perhaps some stupid text-handling
  589. software even on sane operating systems, do not recognize the notion of
  590. an empty line.
  591. They think all lines must have at least one character in them; the closest
  592. they can come to an empty line is a line consisting of a single blank.
  593. This matters because \fIrelaynews\fR will tolerate white space only in
  594. certain places in the \fIsys\fR file, and in particular, it tolerates
  595. empty lines but not lines consisting solely of white space.
  596. The result will be complaints (in \fIerrlog\fR) about white space in
  597. the \fIsys\fR line for a system named ``\ ''.
  598. .SH
  599. active-File Date
  600. .\" thanks to Simon J. Gerraty for this weirdie
  601. .PP
  602. On some Bull systems, at least ones running DPX/2 B.O.S. 1.0,
  603. apparently \fIrelaynews\fR updates the
  604. contents of the \fIactive\fR file correctly, but the file's date remains
  605. unchanged!
  606. This appears to be a kernel bug.
  607. It reportedly upsets some news readers.
  608. A workaround, said to be effective, is to add the line
  609. .DS
  610. utime(ctlfile(actrelnm), (time_t *)NULL);
  611. .DE
  612. after the call to \fInnafree\fR in \fIactfsync\fR
  613. in \fIlibbig/active.big.c\fR.
  614. .SH
  615. enum Operators
  616. .\" thanks to Scott Reynolds for this one
  617. .PP
  618. Some compilers have difficulty compiling the
  619. \fIreadnews\fR we supply,
  620. because they object to applying the `!' operator to an \fIenum\fR type.
  621. Changing the definition of \fIbooltype\fR in \fIrna/defs.h\fR to
  622. .DS
  623. typedef int bool;
  624. #define    false    0
  625. #define    true    1
  626. .DE
  627. is reported to solve this.
  628.