[news.software.b] patch 17 problems with dirent.h on uport V/386

mwg@inxsvcs.UUCP (Phil Blecker) (02/08/89)

I just got around to installing the patches that were posted in
unix-pc.sources on Microport V/386. I've become a little used to having
compatibility problems with <dirent.h>, and noticed that it looked like
somebody did something about it. So I defined USG in the Makefile, and
READDIR and DIRENT in defs.h. Unfortunately, this resulted in a number of
source files trying to include <dirent.h> twice. The compiler I'm using
(Greenhills) doesn't like multiple typedef's.

So, the following files;

  expire.c inews.c readr.c rfuncs.c visual.c

should have:

  #ifdef USG
  #include <dirent.h>
  #endif

changed to something like:

  #ifdef USG
  #   ifdef READDIR
  #      ifndef	DIRENT
  #         include <dirent.h>
  #      endif
  #   else
  #      include <dirent.h>
  #   endif
  #endif

as long as "params.h" includes <dirent.h> when READDIR and DIRENT are defined.
At least I didn't have to go around making sure that struct dirent made sense
this time. What an improvement!
-- 
Phil Blecker +1 818 243-3053           none of my ideas belong to me and
uunet!inxsvcs!mwg                      i can't see anything wrong with that