This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[libstdc++] more vxworks/windiss cross support



This primarily adds config support for *-*-vxworks targets, and fixes some minor cosmetic nits. I have /not/ bumped the autotools versions as I pre- approved yesterday, because there are actual improvements that can be made with those versions, and that's a separate issue.

Committed to trunk only.  (New targets have traditionally been okay for
stage 3, since they can't break anything.)


2003-10-20 Phil Edwards <phil@codesourcery.com>


	* configure.ac:  Fix comment typo.
	* configure.host:  Add vxworks to host_os switch.
	* crossconfig.m4:  Remove old commented os_include_dir variables
	left over from autotools transition.
	(*-vxworks):  New stanza.
	(*-windiss):  Add missing symbols.
	* configure:  Regenerate.
	* config/os/vxworks/ctype_base.h, config/os/vxworks/ctype_inline.h,
	config/os/vxworks/ctype_noninline.h, config/os/vxworks/os_defines.h:
	New files.
	* config/os/windiss/os_defines.h:  Define __C9X__.


Index: configure.ac =================================================================== RCS file: /cvs/gcc/gcc/libstdc++-v3/configure.ac,v retrieving revision 1.9 diff -u -p -r1.9 configure.ac --- configure.ac 16 Oct 2003 22:37:48 -0000 1.9 +++ configure.ac 20 Oct 2003 18:17:07 -0000 @@ -297,7 +297,7 @@ AC_SUBST(LIBSUPCXX_PICFLAGS)

 dnl In autoconf 2.5x, AC_OUTPUT is replaced by four AC_CONFIG_* macros,
 dnl which can all be called multiple times as needed, plus one (different)
-dnl AC_OUPUT macro.  This one lists the files to be created:
+dnl AC_OUTPUT macro.  This one lists the files to be created:
 AC_CONFIG_FILES( \
   Makefile \
   AC_FOREACH([DIR], glibcxx_SUBDIRS, [DIR/Makefile ])
Index: configure.host
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/configure.host,v
retrieving revision 1.19
diff -u -p -r1.19 configure.host
--- configure.host	19 Oct 2003 20:58:22 -0000	1.19
+++ configure.host	20 Oct 2003 18:17:07 -0000
@@ -186,6 +186,9 @@ case "${host_os}" in
   solaris2.[789] | solaris2.1[0-9])
     os_include_dir="os/solaris/solaris2.7"
     ;;
+  vxworks)
+    os_include_dir="os/vxworks"
+    ;;
   windiss*)
     os_include_dir="os/windiss"
     ;;
Index: crossconfig.m4
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/crossconfig.m4,v
retrieving revision 1.7
diff -u -p -r1.7 crossconfig.m4
--- crossconfig.m4	16 Oct 2003 21:01:01 -0000	1.7
+++ crossconfig.m4	20 Oct 2003 18:17:07 -0000
@@ -43,7 +43,6 @@ case "${host}" in
     ;;

   *-freebsd*)
-    #os_include_dir="os/bsd/freebsd"
     AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
       machine/endian.h machine/param.h sys/machine.h sys/types.h \
       fp.h locale.h float.h inttypes.h sys/resource.h sys/stat.h \
@@ -101,7 +100,6 @@ case "${host}" in
     fi
     ;;
   *-hpux*)
-    #os_include_dir="os/hpux"
     AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
       machine/endian.h machine/param.h sys/machine.h sys/types.h \
       fp.h locale.h float.h inttypes.h])
@@ -126,7 +124,6 @@ case "${host}" in
     esac
     ;;
   *-linux* | *-uclinux* | *-gnu*)
-    #os_include_dir="os/gnu-linux"
     AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
       machine/endian.h machine/param.h sys/machine.h sys/types.h \
       fp.h locale.h float.h inttypes.h])
@@ -155,14 +152,12 @@ case "${host}" in
     fi
     ;;
   *-mingw32*)
-    #os_include_dir="os/mingw32"
     AC_CHECK_HEADERS([sys/types.h locale.h float.h])
     GLIBCXX_CHECK_LINKER_FEATURES
     GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
     GLIBCXX_CHECK_WCHAR_T_SUPPORT
     ;;
   *-netbsd*)
-    #os_include_dir="os/bsd/netbsd"
     AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
       machine/endian.h machine/param.h sys/machine.h sys/types.h \
       fp.h locale.h float.h inttypes.h])
@@ -188,7 +183,6 @@ case "${host}" in
     fi
     ;;
   *-qnx6.1* | *-qnx6.2*)
-    #os_include_dir="os/qnx/qnx6.1"
     SECTION_FLAGS='-ffunction-sections -fdata-sections'
     AC_SUBST(SECTION_FLAGS)
     GLIBCXX_CHECK_LINKER_FEATURES
@@ -330,32 +324,75 @@ case "${host}" in
     AC_DEFINE(HAVE_MODFF)
     AC_DEFINE(HAVE_HYPOT)
     ;;
+  *-vxworks)
+    AC_DEFINE(HAVE_MMAP)
+    AC_DEFINE(HAVE_ACOSF)
+    AC_DEFINE(HAVE_ASINF)
+    AC_DEFINE(HAVE_ATAN2F)
+    AC_DEFINE(HAVE_ATANF)
+    AC_DEFINE(HAVE_CEILF)
+    AC_DEFINE(HAVE_COSF)
+    AC_DEFINE(HAVE_COSHF)
+    AC_DEFINE(HAVE_EXPF)
+    AC_DEFINE(HAVE_FABSF)
+    AC_DEFINE(HAVE_FLOORF)
+    AC_DEFINE(HAVE_FMODF)
+    AC_DEFINE(HAVE_HYPOT)
+    AC_DEFINE(HAVE_LOG10F)
+    AC_DEFINE(HAVE_LOGF)
+    AC_DEFINE(HAVE_POWF)
+    AC_DEFINE(HAVE_SINF)
+    AC_DEFINE(HAVE_SINHF)
+    AC_DEFINE(HAVE_SQRTF)
+    AC_DEFINE(HAVE_TANF)
+    AC_DEFINE(HAVE_TANHF)
+    ;;
   *-windiss*)
-    #os_include_dir="os/windiss"
     AC_DEFINE(HAVE_ACOSF)
+    AC_DEFINE(HAVE_ACOSL)
     AC_DEFINE(HAVE_ASINF)
+    AC_DEFINE(HAVE_ASINL)
     AC_DEFINE(HAVE_ATAN2F)
+    AC_DEFINE(HAVE_ATAN2L)
     AC_DEFINE(HAVE_ATANF)
+    AC_DEFINE(HAVE_ATANL)
     AC_DEFINE(HAVE_CEILF)
+    AC_DEFINE(HAVE_CEILL)
     AC_DEFINE(HAVE_COPYSIGN)
     AC_DEFINE(HAVE_COPYSIGNF)
     AC_DEFINE(HAVE_COSF)
+    AC_DEFINE(HAVE_COSL)
     AC_DEFINE(HAVE_COSHF)
+    AC_DEFINE(HAVE_COSHL)
     AC_DEFINE(HAVE_EXPF)
+    AC_DEFINE(HAVE_EXPL)
     AC_DEFINE(HAVE_FABSF)
+    AC_DEFINE(HAVE_FABSL)
     AC_DEFINE(HAVE_FLOORF)
+    AC_DEFINE(HAVE_FLOORL)
     AC_DEFINE(HAVE_FMODF)
+    AC_DEFINE(HAVE_FMODL)
     AC_DEFINE(HAVE_FREXPF)
+    AC_DEFINE(HAVE_FREXPL)
     AC_DEFINE(HAVE_LDEXPF)
+    AC_DEFINE(HAVE_LDEXPL)
     AC_DEFINE(HAVE_LOG10F)
+    AC_DEFINE(HAVE_LOG10L)
     AC_DEFINE(HAVE_LOGF)
     AC_DEFINE(HAVE_MODFF)
+    AC_DEFINE(HAVE_MODFL)
     AC_DEFINE(HAVE_POWF)
+    AC_DEFINE(HAVE_POWL)
     AC_DEFINE(HAVE_SINF)
+    AC_DEFINE(HAVE_SINL)
     AC_DEFINE(HAVE_SINHF)
+    AC_DEFINE(HAVE_SINHL)
     AC_DEFINE(HAVE_SQRTF)
+    AC_DEFINE(HAVE_SQRTL)
     AC_DEFINE(HAVE_TANF)
+    AC_DEFINE(HAVE_TANL)
     AC_DEFINE(HAVE_TANHF)
+    AC_DEFINE(HAVE_TANHL)
     ;;
   *)
     AC_MSG_ERROR([No support for this host/target combination.])
Index: config/os/vxworks/ctype_base.h
===================================================================
RCS file: config/os/vxworks/ctype_base.h
diff -N config/os/vxworks/ctype_base.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ config/os/vxworks/ctype_base.h	20 Oct 2003 18:17:07 -0000
@@ -0,0 +1,59 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2003 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 22.1  Locales
+//
+
+// Information extracted from target/h/ctype.h.
+
+  struct ctype_base
+  {
+    // Non-standard typedefs.
+    typedef const unsigned char* 	__to_type;
+
+    // NB: Offsets into ctype<char>::_M_table force a particular size
+    // on the mask type. Because of this, we don't use an enum.
+    typedef unsigned char 	mask;
+    static const mask upper    	= _C_UPPER;
+    static const mask lower 	= _C_LOWER;
+    static const mask alpha 	= _C_UPPER | _C_LOWER;
+    static const mask digit 	= _C_NUMBER;
+    static const mask xdigit 	= _C_HEX_NUMBER;
+    static const mask space 	= _C_WHITE_SPACE | _C_CONTROL;
+    static const mask print 	= (_C_UPPER | _C_LOWER | _C_NUMBER
+				   | _C_WHITE_SPACE | _C_PUNCT);
+    static const mask graph 	= _C_UPPER | _C_LOWER | _C_NUMBER | _C_PUNCT;
+    static const mask cntrl 	= _C_CONTROL;
+    static const mask punct 	= _C_PUNCT;
+    static const mask alnum 	= _C_UPPER | _C_LOWER | _C_NUMBER;
+  };
+
+
+
Index: config/os/vxworks/ctype_inline.h
===================================================================
RCS file: config/os/vxworks/ctype_inline.h
diff -N config/os/vxworks/ctype_inline.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ config/os/vxworks/ctype_inline.h	20 Oct 2003 18:17:07 -0000
@@ -0,0 +1,71 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2000, 2003 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 22.1  Locales
+//
+
+// Information as gleaned from target/h/ctype.h
+
+// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
+// functions go in ctype.cc
+
+  bool
+  ctype<char>::
+  is(mask __m, char __c) const
+  { return __ctype[static_cast<unsigned char>(__c)] & __m; }
+
+  const char*
+  ctype<char>::
+  is(const char* __low, const char* __high, mask* __vec) const
+  {
+    while (__low < __high)
+      *__vec++ = __ctype[static_cast<unsigned char>(*__low++)];
+    return __high;
+  }
+
+  const char*
+  ctype<char>::
+  scan_is(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high
+	   && !(__ctype[static_cast<unsigned char>(*__low)] & __m))
+      ++__low;
+    return __low;
+  }
+
+  const char*
+  ctype<char>::
+  scan_not(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high
+	   && (__ctype[static_cast<unsigned char>(*__low)] & __m))
+      ++__low;
+    return __low;
+  }
Index: config/os/vxworks/ctype_noninline.h
===================================================================
RCS file: config/os/vxworks/ctype_noninline.h
diff -N config/os/vxworks/ctype_noninline.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ config/os/vxworks/ctype_noninline.h	20 Oct 2003 18:17:07 -0000
@@ -0,0 +1,81 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 22.1  Locales
+//
+// Information as gleaned from target/h/ctype.h
+
+  const ctype_base::mask*
+  ctype<char>::classic_table() throw()
+  { return __ctype; }
+
+  ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
+		     size_t __refs)
+  : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+  _M_toupper(NULL), _M_tolower(NULL),
+  _M_table(__table ? __table : classic_table())
+  { }
+
+  ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
+  : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+  _M_toupper(NULL), _M_tolower(NULL),
+  _M_table(__table ? __table : classic_table())
+  { }
+
+  char
+  ctype<char>::do_toupper(char __c) const
+  { return __toupper(__c); }
+
+  const char*
+  ctype<char>::do_toupper(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = __toupper(*__low);
+	++__low;
+      }
+    return __high;
+  }
+
+  char
+  ctype<char>::do_tolower(char __c) const
+  { return __tolower(__c); }
+
+  const char*
+  ctype<char>::do_tolower(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = __tolower(*__low);
+	++__low;
+      }
+    return __high;
+  }
Index: config/os/vxworks/os_defines.h
===================================================================
RCS file: config/os/vxworks/os_defines.h
diff -N config/os/vxworks/os_defines.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ config/os/vxworks/os_defines.h	20 Oct 2003 18:17:07 -0000
@@ -0,0 +1,37 @@
+// Specific definitions for VxWorks  -*- C++ -*-
+
+// Copyright (C) 2000, 2003 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+
+#ifndef _GLIBCPP_OS_DEFINES
+#define _GLIBCPP_OS_DEFINES 1
+
+// System-specific #define, typedefs, corrections, etc, go here.  This
+// file will come before all others.
+
+#endif
Index: config/os/windiss/os_defines.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/config/os/windiss/os_defines.h,v
retrieving revision 1.2
diff -u -p -r1.2 os_defines.h
--- config/os/windiss/os_defines.h	5 Jul 2003 04:05:33 -0000	1.2
+++ config/os/windiss/os_defines.h	20 Oct 2003 18:17:07 -0000
@@ -33,5 +33,6 @@

 // System-specific #define, typedefs, corrections, etc, go here.  This
 // file will come before all others.
+#define __C9X__ 1 // for sinf etc

#endif


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]