[comp.os.minix] Help: compiling PC Simulator

EOAHMAD%NTIVAX.BITNET@cunyvm.cuny.edu (05/15/91)

I tried compiling PC simulator on an Ultrix OS on DEC MIPS R3000 workstations.
There are missing files in the include/sys directories,
fcntl.h, stream.h,stropts.h
I managed to find fcntl.h in include subdirectory.
I hope someone could explain to me the pursoses of these files so that I could
find a replacement or equivalents in other compilers.

Why can't C compilers use the same include files or at least the source codes
for the include files which are not common be included in portable sourcd
distributions?

Othman Ahmad, School of EEE, NTU Singapore 2263

ast@cs.vu.nl (Andy Tanenbaum) (05/16/91)

In article <53644@nigel.ee.udel.edu> EOAHMAD%NTIVAX.BITNET@cunyvm.cuny.edu writes:
>I tried compiling PC simulator on an Ultrix OS on DEC MIPS R3000 workstations.
>There are missing files in the include/sys directories,
>fcntl.h, stream.h,stropts.h
>
>Why can't C compilers use the same include files

I totally agree.  I didn't write the part that uses <stream.h> or <stropts.h>.
I don't even know what they do.

<fcntl.h> is POSIX, and is thus legal.  It is precisely this sort of stuff
that makes me want to move toward POSIX.

Andy Tanenbaum (ast@cs.vu.nl)

hp@vmars.tuwien.ac.at (Peter Holzer) (05/16/91)

EOAHMAD%NTIVAX.BITNET@cunyvm.cuny.edu writes:

>I tried compiling PC simulator on an Ultrix OS on DEC MIPS R3000 workstations.
>There are missing files in the include/sys directories,
>fcntl.h, stream.h,stropts.h
>I managed to find fcntl.h in include subdirectory.
>I hope someone could explain to me the pursoses of these files so that I could
>find a replacement or equivalents in other compilers.

>Why can't C compilers use the same include files or at least the source codes
>for the include files which are not common be included in portable sourcd
>distributions?

Because some header files are used for features of a certain OS
(streams are specific to System V Unix) that other OS's (e.g.
BSD/Ultrix) don't have. Supplying the header files without the
functions is meaningless. 

Ad fcntl.h: Ultrix has many many include files both in /usr/include and
/usr/include/sys to be compatible to both BSD and SysV. It looks like
the developers forgot about fcntl.h (Or some bozo rm'ed the symlink on
the disk the distribution tapes where made from :-)

--
|    _  | Peter J. Holzer                       | Think of it   |
| |_|_) | Technical University Vienna           | as evolution  |
| | |   | Dept. for Real-Time Systems           | in action!    |
| __/   | hp@vmars.tuwien.ac.at                 |     Tony Rand |

grundy@rtf.bt.co.uk (Martin Grundy) (05/20/91)

<stream.h> and <stropt.h> belong to STREAMS (device driver support) which
is a feature of Unix Sys V.3.2; definitely not Minix :-)

---------------------------------------------------------------------------
Martin Grundy                     |  email: grundy@rtf.bt.co.uk
British Telecom Customer Systems  |
Hyperion House                    |  phone: +44 273 762102
96-99 Queens Road                 |  fax:   +44 273 722038 or
Brighton BN1 3XF.                 |         +44 273 762071 (netfax)