This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] Add TPF config support to libstdc++
- From: Phil Edwards <phil at jaj dot com>
- To: Ulrich Weigand <weigand at i1 dot informatik dot uni-erlangen dot de>
- Cc: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org, darcypj at us dot ibm dot com
- Date: Thu, 18 Dec 2003 18:12:48 -0500
- Subject: Re: [PATCH] Add TPF config support to libstdc++
- References: <200312182254.XAA07941@faui1d.informatik.uni-erlangen.de>
On Thu, Dec 18, 2003 at 11:54:20PM +0100, Ulrich Weigand wrote:
> *************** case "${host_os}" in
> *** 186,191 ****
> --- 186,194 ----
> solaris2.[789] | solaris2.1[0-9])
> os_include_dir="os/solaris/solaris2.7"
> ;;
> + tpf)
> + os_include_dir="os/tpf"
> + ;;
This should already be handled by the defaults, I believe.
> + // TPF is a big endian OS, let it be known here.
> + #define _BIG_ENDIAN 1
> + #define BIG_ENDIAN 1
This is wrong. _BIG_ENDIAN is okay; it's used while building libmath.
BIG_ENDIAN is not okay. This file will be seen by every program using the C++
library; you cannot define user-space macros like that.
Besides, mathconf.h checks _BIG_ENDIAN and defines BIG_ENDIAN.
> + #include <features.h>
> +
> + // We must not see the optimized string functions GNU libc defines.
> + #define __NO_STRING_INLINES
You don't need to include features.h just to define this... the Linux
version includes that header to get the definition of __GLIBC__, which it
then tests.
Phil
--
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.
- Brian W. Kernighan