[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libraries



> Still, in my opinion, a requirement for something like an explicit
> #include <tos/foo.h> would be a mistake which will cause immediate
> compatibility headaches, neccessity to edit sources, lotsa of
> superfluous #ifdef...#endif and the like.

Why? The idea is basically to keep the old header files for compatibility,
and to use the new standardized header files for new programs.

> I think that instead we should modify a little bit an organization
> and a compiler driver.  Let us assume that we have two different files
> .../include/tos/stdio.h and .../include/mint/stdio.h.  In sources
> one should have one, unequivocal, directive '#include <stdio.h>'.
> A compiler driver (like gcc, for example) with a flag '-tos' should
> search for header files like this:
>   .../include/tos/,.../include, <whatever else in include path>
> and with '-mint' flag like this:
>   .../include/mint/,.../include, <whatever else in include path>
> with a similar arrangement for libraries.  One of flags '-mint' '-tos'
> could/should be a default depending on a compiler configuration.
> You risk that way at most a neccessity to recompile a driver, which
> is really small program and can be redone even on the smallest
> machines.  So what are your comments?

This is exactly what I don't want. Let's have the same header files, no matter
what compiler is used, what architecture is used or whether MiNT is used
(should be used all the time :-).

> Julian asks why DTA is named _DTA in gcc header files.  I can guess
> that this was done to be consistent with a convention that
> internal "vendor names" start with '_' to avoid a polution of a name
> space.  If Pure C needs DTA instead this is easy to resolve by
> supplying in a "compatibility" header file "#define DTA _DTA".
> As for conflicts in prototypes I really cannot tell.  I have never
> seen Pure C compiler and I do not know where conflicts do occure.
> I can only tell that gcc headers try very hard to follow ANSI C
> Standard and comparing with other "more or less" Standard C compilers
> on other machines are pretty good at it.

If this is the reason, this should be done with all structures. However,
I still prefer to use the original names defined by Atari.

-- 
________________ 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 __________________