Mail Archives: djgpp/2002/06/13/08:30:17
Hello.
[Cross-posting to comp.os.msdos.djgpp too.]
Kai Ruottu wrote:
[snip]
> My opinion is that if one has a new 32-bit Windows, running DOS-
> hosted tools there is not sane. I have a Mingw-x-Djgpp2 cross-compiler
> on Win32 and a native Djgpp2 (not from the DJGPP2 distribution on the
> net but made by myself) on DOS, and they cannot even use the same names
> for the C++ headers... For instance the following files in the standard
>
> $prefix/include/g++-v3/bits
>
> (in gcc-3.x) should be renamed on DOS to be separate names in its 8+3
> naming convention :
>
> concept_check.h and concept_checks.h
> exception_defines.h and exception_support.h
> std_cstdarg.h, std_cstddef.h, std_cstdio.h and std_cstdlib.h
> stl_algo.h and stl_algobase.h
> stl_iterator.h, stl_iterator_base.h, stl_iterator_base_funcs.h and
> stl_iterator_base_types.h
> stl_multimap.h and stl_multiset.h
> valarray_array.h and valarray_meta.h
>
> (DOS-hosted tools seem to approve 'clipped' names, but clipping the
> 'name'-part causes these being same like 'concept_.h' for the first
> name pair)
The header files are renamed in the DJGPP port. The filenames are unique in
the first eight characters in the name and first three characters in the
extension, so that there is no clash, when the long filename is shortened into
the 8+3 convention. I think there is some DOS-/DJGPP-specific mapping table in
the DJGPP port that maps the renamed version of the name to the "real" name of
the header file. So the user is unaffected by the rename.
Take the iterators, for instance. In gpp31b.zip (the g++ 3.1 binaries
distribution for DJGPP) we have:
lang/cxx-v31/bits/stl_itbf.h
lang/cxx-v31/bits/stl_itbt.h
lang/cxx-v31/bits/stl_iterator.h
which map to stl_iterator.h stl_iterator_base_funcs.h and
stl_iterator_base_types.h. (I admit I'm not sure where stl_iterator_base.h
is.)
OK, try:
lang/cxx-v31/bits/stl_algo.h
lang/cxx-v31/bits/stlalgobase.h
which map to stl_algo.h and stl_algobase.h.
> While all the tools on other hosts approve these long names, the DOS-
> hosted tools cannot. So it may be better to generate the C++ executables
> for DOS somewhere else, on Win32, Linux,... where one can use these
> long standard header names. No need to modify the sources to use different
> '#include <header>' lines.
That's totally bogus. You do not need to modify your C++ code at all. The
DJGPP port handles mapping the name in the C++ sources to the actual filename
on disk. If you need to modify the C++ code, then it's a bug in the DJGPP
port.
[snip]
> The important question is why someone would use DOS as the compile platform
> for C++ if owning a Win9x, ME, NT, 2k or XP system too. Or Linux, FreeBSD
> etc. which all approve the long header names.
I guess that's up to the user. I prefer DJGPP over Cygwin, because DJGPP
integrates more nicely IMHO. But I haven't used Cygwin as much as DJGPP, so
I'm bound to be biased. 8)
Regards,
--
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]
- Raw text -