Add Irix 5.2, 6.3 support.
authorAlexandre Oliva <aoliva@redhat.com>
Wed, 7 Mar 2001 18:35:46 +0000 (18:35 +0000)
committerBenjamin Kosnik <bkoz@gcc.gnu.org>
Wed, 7 Mar 2001 18:35:46 +0000 (18:35 +0000)
2001-03-07  Alexandre Oliva  <aoliva@redhat.com>

Add Irix 5.2, 6.3 support.
        * config/os/irix/bits: Renamed too...
        * config/os/irix/irix6.5/bits: this.
        * config/os/irix/irix5.2/bits: New, copied from irix6.5/bits.
        * config/os/irix/irix5.2/bits/ctype_base.h: Use _U, _L, _N,
        _X, _S, _P, _C and _B instead of IRIX-6.5 _IS* macros.
        * config/os/irix/irix5.2/bits/ctype_noninline.h
        (ctype<char>::ctype): Initialize _M_table with __ctype.
        * configure.target: Adjust.

From-SVN: r40294

17 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/config/os/irix/bits/atomicity.h [deleted file]
libstdc++-v3/config/os/irix/bits/ctype_base.h [deleted file]
libstdc++-v3/config/os/irix/bits/ctype_inline.h [deleted file]
libstdc++-v3/config/os/irix/bits/ctype_noninline.h [deleted file]
libstdc++-v3/config/os/irix/bits/os_defines.h [deleted file]
libstdc++-v3/config/os/irix/irix5.2/bits/atomicity.h [new file with mode: 0644]
libstdc++-v3/config/os/irix/irix5.2/bits/ctype_base.h [new file with mode: 0644]
libstdc++-v3/config/os/irix/irix5.2/bits/ctype_inline.h [new file with mode: 0644]
libstdc++-v3/config/os/irix/irix5.2/bits/ctype_noninline.h [new file with mode: 0644]
libstdc++-v3/config/os/irix/irix5.2/bits/os_defines.h [new file with mode: 0644]
libstdc++-v3/config/os/irix/irix6.5/bits/atomicity.h [new file with mode: 0644]
libstdc++-v3/config/os/irix/irix6.5/bits/ctype_base.h [new file with mode: 0644]
libstdc++-v3/config/os/irix/irix6.5/bits/ctype_inline.h [new file with mode: 0644]
libstdc++-v3/config/os/irix/irix6.5/bits/ctype_noninline.h [new file with mode: 0644]
libstdc++-v3/config/os/irix/irix6.5/bits/os_defines.h [new file with mode: 0644]
libstdc++-v3/configure.target

index 2e6b71d3a05912dc290647f18f41bdbad8f0ca9f..ee266bcd3803d2ec4f7d2c9e1ec3b3b52c523f5e 100644 (file)
@@ -1,3 +1,15 @@
+2001-03-07  Alexandre Oliva  <aoliva@redhat.com>
+
+       Add Irix 5.2, 6.3 support.
+        * config/os/irix/bits: Renamed too...
+        * config/os/irix/irix6.5/bits: this.
+        * config/os/irix/irix5.2/bits: New, copied from irix6.5/bits.
+        * config/os/irix/irix5.2/bits/ctype_base.h: Use _U, _L, _N,
+        _X, _S, _P, _C and _B instead of IRIX-6.5 _IS* macros.
+        * config/os/irix/irix5.2/bits/ctype_noninline.h
+        (ctype<char>::ctype): Initialize _M_table with __ctype.
+        * configure.target: Adjust.
+    
 2001-03-06  Benjamin Kosnik  <bkoz@redhat.com>
 
        libstdc++/2181
diff --git a/libstdc++-v3/config/os/irix/bits/atomicity.h b/libstdc++-v3/config/os/irix/bits/atomicity.h
deleted file mode 100644 (file)
index c7f5c83..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-// Low-level functions for atomic operations: IRIX version  -*- C++ -*-
-
-// Copyright (C) 2000, 2001 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 _BITS_ATOMICITY_H
-#define _BITS_ATOMICITY_H      1
-
-#include <mutex.h>
-
-typedef long _Atomic_word;
-
-static inline _Atomic_word
-__exchange_and_add (_Atomic_word* __mem, int __val)
-{
-  return (_Atomic_word) test_then_add ((unsigned long*) __mem, __val);
-}
-
-
-static inline void
-__atomic_add (_Atomic_word* __mem, int __val)
-{
-  __exchange_and_add (__mem, __val);
-}
-
-#endif /* atomicity.h */
diff --git a/libstdc++-v3/config/os/irix/bits/ctype_base.h b/libstdc++-v3/config/os/irix/bits/ctype_base.h
deleted file mode 100644 (file)
index 08557d1..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-// Locale support -*- C++ -*-
-
-// Copyright (C) 1997-1999 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 /usr/include/ctype.h on irix 6.5
-  
-  struct ctype_base
-  {
-    // Non-standard typedefs.
-    typedef int*               __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 int       mask;
-    static const mask upper            = _ISupper;
-    static const mask lower    = _ISlower;
-    static const mask alpha    = _ISalpha;
-    static const mask digit    = _ISdigit;
-    static const mask xdigit   = _ISxdigit;
-    static const mask space    = _ISspace;
-    static const mask print    = _ISprint;
-    static const mask graph    = _ISgraph;
-    static const mask cntrl    = _IScntrl;
-    static const mask punct    = _ISpunct;
-    static const mask alnum    = _ISalnum;
-  };
diff --git a/libstdc++-v3/config/os/irix/bits/ctype_inline.h b/libstdc++-v3/config/os/irix/bits/ctype_inline.h
deleted file mode 100644 (file)
index 6a20c09..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-// Locale support -*- C++ -*-
-
-// Copyright (C) 2000 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
-//
-  
-// 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 (_M_table)[__c] & __m; }
-
-  const char*
-  ctype<char>::
-  is(const char* __low, const char* __high, mask* __vec) const
-  {
-    while (__low < __high)
-      *__vec++ = (_M_table)[*__low++];
-    return __high;
-  }
-
-  const char*
-  ctype<char>::
-  scan_is(mask __m, const char* __low, const char* __high) const
-  {
-    while (__low < __high && !((_M_table)[*__low] & __m))
-      ++__low;
-    return __low;
-  }
-
-  const char*
-  ctype<char>::
-  scan_not(mask __m, const char* __low, const char* __high) const
-  {
-    while (__low < __high && ((_M_table + 1)[*__low] & __m) != 0)
-      ++__low;
-    return __low;
-  }
-
-
-
-
-
diff --git a/libstdc++-v3/config/os/irix/bits/ctype_noninline.h b/libstdc++-v3/config/os/irix/bits/ctype_noninline.h
deleted file mode 100644 (file)
index 8045feb..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-// Locale support -*- C++ -*-
-
-// Copyright (C) 1997-1999 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 /usr/include/ctype.h
-
-  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_ctable(NULL), 
-    _M_table(!__table ? 
-             (const mask*) (__libc_attr._ctype_tbl->_class + 1) : __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 = do_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 = do_tolower(*__low);
-       ++__low;
-      }
-    return __high;
-  }
-
diff --git a/libstdc++-v3/config/os/irix/bits/os_defines.h b/libstdc++-v3/config/os/irix/bits/os_defines.h
deleted file mode 100644 (file)
index f4988c1..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-// Specific definitions for IRIX  -*- C++ -*-
-
-// Copyright (C) 2000 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
-
-/* System-specific #define, typedefs, corrections, etc, go here.  This
-   file will come before all others. */
-
-/* We need large file support.  There are two ways to turn it on:
-   by defining either _LARGEFILE64_SOURCE or _SGI_SOURCE.  However,
-   it does not actually work to define only the former, as then
-   <sys/stat.h> is invalid: `st_blocks' is defined to be a macro,
-   but then used as a field name.  So, we have to turn on 
-   _SGI_SOURCE.  That only works if _POSIX_SOURCE is turned off,
-   so we have to explicitly turn it off.  (Some of the libio C files
-   explicitly try to turn it on.)  _SGI_SOURCE is actually turned on 
-   implicitly via the command-line.  */
-#undef _POSIX_SOURCE
-
-#define __off_t off_t
-#define __off64_t off64_t
-#define __ssize_t ssize_t
-
-/* GCC does not use thunks on IRIX.  */
-#define _G_USING_THUNKS 0
-
-#endif
-
-
diff --git a/libstdc++-v3/config/os/irix/irix5.2/bits/atomicity.h b/libstdc++-v3/config/os/irix/irix5.2/bits/atomicity.h
new file mode 100644 (file)
index 0000000..bac483e
--- /dev/null
@@ -0,0 +1,50 @@
+// Low-level functions for atomic operations: IRIX version  -*- C++ -*-
+
+// Copyright (C) 2001 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 _BITS_ATOMICITY_H
+#define _BITS_ATOMICITY_H      1
+
+#include <mutex.h>
+
+typedef long _Atomic_word;
+
+static inline _Atomic_word
+__exchange_and_add (_Atomic_word* __mem, int __val)
+{
+  return (_Atomic_word) test_then_add ((unsigned long*) __mem, __val);
+}
+
+
+static inline void
+__atomic_add (_Atomic_word* __mem, int __val)
+{
+  __exchange_and_add (__mem, __val);
+}
+
+#endif /* atomicity.h */
diff --git a/libstdc++-v3/config/os/irix/irix5.2/bits/ctype_base.h b/libstdc++-v3/config/os/irix/irix5.2/bits/ctype_base.h
new file mode 100644 (file)
index 0000000..2626cd3
--- /dev/null
@@ -0,0 +1,55 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997-1999, 2001 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 /usr/include/ctype.h on irix 5.2
+  
+  struct ctype_base
+  {
+    // Non-standard typedefs.
+    typedef unsigned int*              __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            = _U;
+    static const mask lower    = _L;
+    static const mask alpha    = _U | _L;
+    static const mask digit    = _N;
+    static const mask xdigit   = _X;
+    static const mask space    = _S;
+    static const mask print    = _U | _L | _N | _P | _B;
+    static const mask graph    = _U | _L | _N | _P;
+    static const mask cntrl    = _C;
+    static const mask punct    = _P;
+    static const mask alnum    = _U | _L | _N;
+  };
diff --git a/libstdc++-v3/config/os/irix/irix5.2/bits/ctype_inline.h b/libstdc++-v3/config/os/irix/irix5.2/bits/ctype_inline.h
new file mode 100644 (file)
index 0000000..400b3a7
--- /dev/null
@@ -0,0 +1,72 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2001 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
+//
+  
+// 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 (_M_table)[__c] & __m; }
+
+  const char*
+  ctype<char>::
+  is(const char* __low, const char* __high, mask* __vec) const
+  {
+    while (__low < __high)
+      *__vec++ = (_M_table)[*__low++];
+    return __high;
+  }
+
+  const char*
+  ctype<char>::
+  scan_is(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high && !((_M_table)[*__low] & __m))
+      ++__low;
+    return __low;
+  }
+
+  const char*
+  ctype<char>::
+  scan_not(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high && ((_M_table + 1)[*__low] & __m) != 0)
+      ++__low;
+    return __low;
+  }
+
+
+
+
+
diff --git a/libstdc++-v3/config/os/irix/irix5.2/bits/ctype_noninline.h b/libstdc++-v3/config/os/irix/irix5.2/bits/ctype_noninline.h
new file mode 100644 (file)
index 0000000..cf4b527
--- /dev/null
@@ -0,0 +1,71 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997-1999, 2001 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 /usr/include/ctype.h
+
+  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_ctable(NULL), 
+    _M_table(!__table ? __ctype : __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 = do_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 = do_tolower(*__low);
+       ++__low;
+      }
+    return __high;
+  }
+
diff --git a/libstdc++-v3/config/os/irix/irix5.2/bits/os_defines.h b/libstdc++-v3/config/os/irix/irix5.2/bits/os_defines.h
new file mode 100644 (file)
index 0000000..b4e2a1f
--- /dev/null
@@ -0,0 +1,58 @@
+// Specific definitions for IRIX  -*- C++ -*-
+
+// Copyright (C) 2001 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
+
+/* System-specific #define, typedefs, corrections, etc, go here.  This
+   file will come before all others. */
+
+/* We need large file support.  There are two ways to turn it on:
+   by defining either _LARGEFILE64_SOURCE or _SGI_SOURCE.  However,
+   it does not actually work to define only the former, as then
+   <sys/stat.h> is invalid: `st_blocks' is defined to be a macro,
+   but then used as a field name.  So, we have to turn on 
+   _SGI_SOURCE.  That only works if _POSIX_SOURCE is turned off,
+   so we have to explicitly turn it off.  (Some of the libio C files
+   explicitly try to turn it on.)  _SGI_SOURCE is actually turned on 
+   implicitly via the command-line.  */
+#undef _POSIX_SOURCE
+
+#define __off_t off_t
+#define __off64_t off64_t
+#define __ssize_t ssize_t
+
+/* GCC does not use thunks on IRIX.  */
+#define _G_USING_THUNKS 0
+
+#endif
+
+
+
diff --git a/libstdc++-v3/config/os/irix/irix6.5/bits/atomicity.h b/libstdc++-v3/config/os/irix/irix6.5/bits/atomicity.h
new file mode 100644 (file)
index 0000000..c7f5c83
--- /dev/null
@@ -0,0 +1,50 @@
+// Low-level functions for atomic operations: IRIX version  -*- C++ -*-
+
+// Copyright (C) 2000, 2001 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 _BITS_ATOMICITY_H
+#define _BITS_ATOMICITY_H      1
+
+#include <mutex.h>
+
+typedef long _Atomic_word;
+
+static inline _Atomic_word
+__exchange_and_add (_Atomic_word* __mem, int __val)
+{
+  return (_Atomic_word) test_then_add ((unsigned long*) __mem, __val);
+}
+
+
+static inline void
+__atomic_add (_Atomic_word* __mem, int __val)
+{
+  __exchange_and_add (__mem, __val);
+}
+
+#endif /* atomicity.h */
diff --git a/libstdc++-v3/config/os/irix/irix6.5/bits/ctype_base.h b/libstdc++-v3/config/os/irix/irix6.5/bits/ctype_base.h
new file mode 100644 (file)
index 0000000..08557d1
--- /dev/null
@@ -0,0 +1,55 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997-1999 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 /usr/include/ctype.h on irix 6.5
+  
+  struct ctype_base
+  {
+    // Non-standard typedefs.
+    typedef int*               __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 int       mask;
+    static const mask upper            = _ISupper;
+    static const mask lower    = _ISlower;
+    static const mask alpha    = _ISalpha;
+    static const mask digit    = _ISdigit;
+    static const mask xdigit   = _ISxdigit;
+    static const mask space    = _ISspace;
+    static const mask print    = _ISprint;
+    static const mask graph    = _ISgraph;
+    static const mask cntrl    = _IScntrl;
+    static const mask punct    = _ISpunct;
+    static const mask alnum    = _ISalnum;
+  };
diff --git a/libstdc++-v3/config/os/irix/irix6.5/bits/ctype_inline.h b/libstdc++-v3/config/os/irix/irix6.5/bits/ctype_inline.h
new file mode 100644 (file)
index 0000000..6a20c09
--- /dev/null
@@ -0,0 +1,72 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2000 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
+//
+  
+// 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 (_M_table)[__c] & __m; }
+
+  const char*
+  ctype<char>::
+  is(const char* __low, const char* __high, mask* __vec) const
+  {
+    while (__low < __high)
+      *__vec++ = (_M_table)[*__low++];
+    return __high;
+  }
+
+  const char*
+  ctype<char>::
+  scan_is(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high && !((_M_table)[*__low] & __m))
+      ++__low;
+    return __low;
+  }
+
+  const char*
+  ctype<char>::
+  scan_not(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high && ((_M_table + 1)[*__low] & __m) != 0)
+      ++__low;
+    return __low;
+  }
+
+
+
+
+
diff --git a/libstdc++-v3/config/os/irix/irix6.5/bits/ctype_noninline.h b/libstdc++-v3/config/os/irix/irix6.5/bits/ctype_noninline.h
new file mode 100644 (file)
index 0000000..8045feb
--- /dev/null
@@ -0,0 +1,72 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997-1999 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 /usr/include/ctype.h
+
+  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_ctable(NULL), 
+    _M_table(!__table ? 
+             (const mask*) (__libc_attr._ctype_tbl->_class + 1) : __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 = do_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 = do_tolower(*__low);
+       ++__low;
+      }
+    return __high;
+  }
+
diff --git a/libstdc++-v3/config/os/irix/irix6.5/bits/os_defines.h b/libstdc++-v3/config/os/irix/irix6.5/bits/os_defines.h
new file mode 100644 (file)
index 0000000..f4988c1
--- /dev/null
@@ -0,0 +1,57 @@
+// Specific definitions for IRIX  -*- C++ -*-
+
+// Copyright (C) 2000 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
+
+/* System-specific #define, typedefs, corrections, etc, go here.  This
+   file will come before all others. */
+
+/* We need large file support.  There are two ways to turn it on:
+   by defining either _LARGEFILE64_SOURCE or _SGI_SOURCE.  However,
+   it does not actually work to define only the former, as then
+   <sys/stat.h> is invalid: `st_blocks' is defined to be a macro,
+   but then used as a field name.  So, we have to turn on 
+   _SGI_SOURCE.  That only works if _POSIX_SOURCE is turned off,
+   so we have to explicitly turn it off.  (Some of the libio C files
+   explicitly try to turn it on.)  _SGI_SOURCE is actually turned on 
+   implicitly via the command-line.  */
+#undef _POSIX_SOURCE
+
+#define __off_t off_t
+#define __off64_t off64_t
+#define __ssize_t ssize_t
+
+/* GCC does not use thunks on IRIX.  */
+#define _G_USING_THUNKS 0
+
+#endif
+
+
index 0b9029cb3290d4f206a6febfe90d5c9e877f90c5..1da593fc52991a3daaf98c66e11ae188edaa1bab 100644 (file)
@@ -84,8 +84,12 @@ case "${target_os}" in
   linux* | gnu*)
     os_include_dir="config/os/gnu-linux"
     ;;
-  irix6.5*)
-    os_include_dir="config/os/irix"
+  irix[1-6] | irix[1-5].* | irix6.[0-4])
+   # This is known to work on at least IRIX 5.2 and 6.3.
+   os_include_dir="config/os/irix/irix5.2"
+   ;;
+  irix6.5)
+    os_include_dir="config/os/irix/irix6.5"
     ;;
   netbsd*)
     os_include_dir="config/os/bsd/netbsd"