[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: libraries
- To: <@DMSWWU1A.uni-muenster.de:NTOMCZAK@UALTAVM.BITNET> (Michal Jaegermann)
- Subject: Re: libraries
- From: Julian F. Reschke <julian@GINA.UNI-MUENSTER.DE>
- Date: Wed, 20 Jan 93 11:27:12 MET DST
- Cc: mint@terminator.rs.itd.umich.edu (MiNT-Liste)
- In-reply-to: <9301192316.AA18432@math.uni-muenster.de>; from "Michal Jaegermann" at Jan 19, 93 4:12 pm
- Organization: Westfaelische Wilhelms-Universitaet, Muenster, Germany Department of Mathematics
>
> > When using Pure, I have:
>
> > #include <tos.h>
>
> > DTA *dta = Fgetdta ();
>
>
> > With the MiNT include files, I have:
>
>
> > #include <osbind.h>
>
> > _DTA *dta = Fgetdta ();
>
> > And so on. Yes, I can resolve all that with conditional includes and
> > defines, but I really hate that. That's why I propose to make a fresh
> > start (of course you can continue to use the old header files with
> > old sources).
>
> Fresh start with what? I am not sure if we can help it. There is
> quite a bit of code already around and there is no standard authority
> which could resolve such differences. Pure C (even as Turbo C) was a
> relative late comer to the scene and they did not pay an attention to
> what was already around (or apparently to ANSI Standard as well) nor
> they really had to. Well, I rely on your word for it since I did not
> have an opportunity to even look at this compiler not mentioning
> writing some code for it. And there are also some other compilers
> like Lattice C and Prospero C - not even touching K&R stuff. How
> about them?
A fresh start with TOS header files (I thought that this was clear by now :-).
I don't want to change existing code -- people can continue to use their
old header files. And, btw: when Turbo C came out, it was the first ANSI
compiler that was really usable (that was back in '88). The authority
you are looking for is Eric Smith and the official system documentation.
And, of course, the new specification is useful for all compilers (note
that it's not *really* important that the header files are identical; it's
only important that they define the same things and are found in the same
places).
> Besides such differences are not very hard to reconcile even without a
> ton of #ifdefs. This is the reason that gcc has a header file
> <compiler.h> where you can put neccessary defines there and you can
> even put #ifdef... #include <tos.h> ... #endif in <osbind.h>, or
> vice-versa, when a need will arise and things are nearly transparent.
> For this you need header files for both compilers. I know that this
> is not an ideal situation but I doubt if we can help it. Note that
> gcc header files were carefuly written to make such adjustments
> relatively easy. On the top of it gcc header files alredy have a file
> <tos.h>, and a few other similar, with the following contents:
>
> /*
> <tos.h>
> This header is "Public Domain".
> (P) 1992 by Markus M. Nick
>
> This header makes it easier to compile sources with both PureC/TurboC
> and GNU-CC. Now you needn't include different header files any more.
>
> Please send your comments and suggestions to:
> Markus_Nick@mz.maus.de
> */
>
> #ifndef __TOS__
>
> #include <osbind.h>
>
> #define __TOS__
> #endif
>
> so you should be able to use it instead of <osbind.h> even if the name
> <tos.h> is a bad one (as you know perfectly well your OS does not have
> to be TOS).
>
> Regards,
> Michal
> ntomczak@vm.ucs.ualberta.ca
>
But that is exactly the thing that I *hate*. I don't want to clutter all
my header files and include directories with nested includes and tons
of defines.
Again: I am speaking of a new set of header files. I don't say that the
old header files have to be removed.
--
________________ cut here _________________________
Julian F. Reschke, Hensenstr. 142, D-W4400 Muenster
eMail: julian@math.uni-muenster.de, jr@ms.maus.de
________ correct me if I'm wrong __________________
- Follow-Ups:
- libraries
- From: "Nicholas S Castellano" <entropy@terminator.rs.itd.umich.edu>