[comp.unix.xenix] Problem with C-Kermit for Xenix 2.2.1

pc@cs.keele.ac.uk (Phil Cornes) (08/11/89)

I have source for C-Kermit with conditionals for Xenix.  This will not
compile due to an apparent problem with the include files types.h, 
inode.h and file.h.

They appear to have components which are mutually self-referencing and
I cannot find an order in which to #include them so that the program
will compile.

Can anyone assist me?

Mike Turner

thurm@shorty.CS.WISC.EDU (Matthew Thurmaier) (08/11/89)

In Article 7723  Phil Corners writes:

> I have source for C-Kermit with conditionals for Xenix.  This will not
> compile due to an apparent problem with the include files types.h, 
> inode.h and file.h.
> 
> They appear to have components which are mutually self-referencing and
> I cannot find an order in which to #include them so that the program
> will compile.
> 
> Can anyone assist me?
> 
> 

My experience shows that you need types.h first, then inode.h, then file.h.
actually, I didn't know of any inter-dependencies between inode and file,
but I do know that inode.h requires types.h.

Matthew.
Snail Mail:                                 E Mail:
Matthew J. Thurmaier                ...!{allegra,harvard,seismo}!shorty!matt
The Computer Classroom              matt@shorty.wisc.edu
6701 Seybold Road, Ste. 122
Madison, WI 53719
(608) 271-2171
                                  "why am I ALWAYS going somewhere?" >>-matt-->

jfh@rpp386.Dallas.TX.US (John F. Haugh II) (08/12/89)

In article <8146@spool.cs.wisc.edu> thurm@shorty.cs.wisc.edu (Matthew Thurmaier) writes:
>My experience shows that you need types.h first, then inode.h, then file.h.
>actually, I didn't know of any inter-dependencies between inode and file,
>but I do know that inode.h requires types.h.

The best thing you can do for your sanity is to fix your header files
so they know what their interdependencies are.

If inode.h requires types.h, then you need to have inode.h include
types.h.  The current scam is to have inodes.h include its files and
have each of them insure they aren't seen twice by the compiler.

For example, inodes.h would begin with

#include <sys/types.h>

and types.h would begin with

#ifndef _H_TYPES
#define _H_TYPES

...

#endif

If you take the time to add these lines yourself you won't ever
have to worry about them.  And when you finally get that POSIX
and ANSI compliant system we all wish for, you will be ready for
what you see ...
-- 
John F. Haugh II                        +-Quote of the month club: ------------
VoiceNet: (512) 832-8832   Data: -8835  | "Chocolate Teddy Grahams are just
InterNet: jfh@rpp386.cactus.org         |  reincarnated Space Food Sticks."
UUCPNet:  {texbell|bigtex}!rpp386!jfh   +------------     -- Richard Sexton ---