acinclude.m4 (GLIBCPP_CHECK_CTYPE_SUPPORT): check for DJGPP <ctype.h>
* acinclude.m4 (GLIBCPP_CHECK_CTYPE_SUPPORT): check for DJGPP <ctype.h> (LIB_AC_PROG_CXX): replace [/\\] with [\\/] to work around older bash bug. * aclocal.m4: regenerated. * configure.target: set os_include_dir to config/os/djgpp under DJGPP. * configure: regenerated. * config/os/djgpp, config/os/djgpp/bits: new directories. * config/os/djgpp/bits/ctype_base.h, config/os/djgpp/bits/ctype_inline.h, config/os/djgpp/bits/ctype_noninline.h, config/os/djgpp/bits/os_defines.h: new files. From-SVN: r38958
This commit is contained in:
parent
b755792e3c
commit
6f87af20c3
8 changed files with 301 additions and 2 deletions
|
@ -1,3 +1,17 @@
|
|||
2001-01-12 Laurynas Biveinis <lauras@softhome.net>
|
||||
|
||||
* acinclude.m4 (GLIBCPP_CHECK_CTYPE_SUPPORT): check for DJGPP <ctype.h>
|
||||
(LIB_AC_PROG_CXX): replace [/\\] with [\\/] to work around older
|
||||
bash bug.
|
||||
* aclocal.m4: regenerated.
|
||||
* configure.target: set os_include_dir to config/os/djgpp under DJGPP.
|
||||
* configure: regenerated.
|
||||
* config/os/djgpp, config/os/djgpp/bits: new directories.
|
||||
* config/os/djgpp/bits/ctype_base.h,
|
||||
config/os/djgpp/bits/ctype_inline.h,
|
||||
config/os/djgpp/bits/ctype_noninline.h,
|
||||
config/os/djgpp/bits/os_defines.h: new files.
|
||||
|
||||
2001-01-11 Joseph S. Myers <jsm28@cam.ac.uk>
|
||||
|
||||
* include/c_std/bits/std_cstdio.h: Undef printf.
|
||||
|
|
|
@ -152,7 +152,7 @@ LIB_AC_PROG_CXX
|
|||
. [$]{glibcpp_basedir}/configure.host
|
||||
|
||||
case [$]{glibcpp_basedir} in
|
||||
/* | [A-Za-z]:[/\\]*) libgcj_flagbasedir=[$]{glibcpp_basedir} ;;
|
||||
/* | [A-Za-z]:[\\/]*) libgcj_flagbasedir=[$]{glibcpp_basedir} ;;
|
||||
*) glibcpp_flagbasedir='[$](top_builddir)/'[$]{glibcpp_basedir} ;;
|
||||
esac
|
||||
|
||||
|
@ -953,6 +953,23 @@ AC_DEFUN(GLIBCPP_CHECK_CTYPE_SUPPORT, [
|
|||
fi
|
||||
fi
|
||||
|
||||
dnl Test for <ctype> functionality -- DJGPP
|
||||
dnl FIXME: this test won't work if __dj_ENFORCE_FUNCTION_CALLS
|
||||
dnl is defined.
|
||||
if test $ctype_default = "yes"; then
|
||||
AC_MSG_CHECKING([<ctype> for DJGPP])
|
||||
AC_TRY_COMPILE([#include <ctype.h>],
|
||||
[int
|
||||
foo (int a)
|
||||
{ return __dj_ctype_flags[0] + __dj_ctype_flags[1];}], \
|
||||
ctype_djgpp=yes, ctype_djgpp=no)
|
||||
AC_MSG_RESULT($ctype_djgpp)
|
||||
if test $ctype_djgpp = "yes"; then
|
||||
ctype_include_dir="config/os/djgpp"
|
||||
ctype_default=no
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $ctype_default = "yes"; then
|
||||
ctype_include_dir="config/os/generic"
|
||||
AC_MSG_WARN("Using default ctype headers.")
|
||||
|
|
19
libstdc++-v3/aclocal.m4
vendored
19
libstdc++-v3/aclocal.m4
vendored
|
@ -164,7 +164,7 @@ LIB_AC_PROG_CXX
|
|||
. [$]{glibcpp_basedir}/configure.host
|
||||
|
||||
case [$]{glibcpp_basedir} in
|
||||
/* | [A-Za-z]:[/\\]*) libgcj_flagbasedir=[$]{glibcpp_basedir} ;;
|
||||
/* | [A-Za-z]:[\\/]*) libgcj_flagbasedir=[$]{glibcpp_basedir} ;;
|
||||
*) glibcpp_flagbasedir='[$](top_builddir)/'[$]{glibcpp_basedir} ;;
|
||||
esac
|
||||
|
||||
|
@ -965,6 +965,23 @@ AC_DEFUN(GLIBCPP_CHECK_CTYPE_SUPPORT, [
|
|||
fi
|
||||
fi
|
||||
|
||||
dnl Test for <ctype> functionality -- DJGPP
|
||||
dnl FIXME: this test won't work if __dj_ENFORCE_FUNCTION_CALLS
|
||||
dnl is defined.
|
||||
if test $ctype_default = "yes"; then
|
||||
AC_MSG_CHECKING([<ctype> for DJGPP])
|
||||
AC_TRY_COMPILE([#include <ctype.h>],
|
||||
[int
|
||||
foo (int a)
|
||||
{ return __dj_ctype_flags[0] + __dj_ctype_flags[1];}], \
|
||||
ctype_djgpp=yes, ctype_djgpp=no)
|
||||
AC_MSG_RESULT($ctype_djgpp)
|
||||
if test $ctype_djgpp = "yes"; then
|
||||
ctype_include_dir="config/os/djgpp"
|
||||
ctype_default=no
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $ctype_default = "yes"; then
|
||||
ctype_include_dir="config/os/generic"
|
||||
AC_MSG_WARN("Using default ctype headers.")
|
||||
|
|
58
libstdc++-v3/config/os/djgpp/bits/ctype_base.h
Normal file
58
libstdc++-v3/config/os/djgpp/bits/ctype_base.h
Normal file
|
@ -0,0 +1,58 @@
|
|||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997, 1998, 1999, 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.
|
||||
|
||||
//
|
||||
// ISO C++ 14882: 22.1 Locales
|
||||
//
|
||||
|
||||
struct ctype_base
|
||||
{
|
||||
typedef unsigned short mask;
|
||||
|
||||
// Non-standard typedefs.
|
||||
typedef unsigned char __to_type;
|
||||
|
||||
enum
|
||||
{
|
||||
space = __dj_ISSPACE, // Whitespace
|
||||
print = __dj_ISPRINT, // Printing
|
||||
cntrl = __dj_ISCNTRL, // Control character
|
||||
upper = __dj_ISUPPER, // UPPERCASE
|
||||
lower = __dj_ISLOWER, // lowercase
|
||||
alpha = __dj_ISALPHA, // Alphabetic
|
||||
digit = __dj_ISDIGIT, // Numeric
|
||||
punct = __dj_ISPUNCT, // Punctuation
|
||||
xdigit = __dj_ISXDIGIT, // Hexadecimal numeric
|
||||
alnum = __dj_ISAL, // Alphanumeric
|
||||
graph = __dj_ISGRAPH // Graphical
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
67
libstdc++-v3/config/os/djgpp/bits/ctype_inline.h
Normal file
67
libstdc++-v3/config/os/djgpp/bits/ctype_inline.h
Normal file
|
@ -0,0 +1,67 @@
|
|||
// Locale support -*- 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.
|
||||
|
||||
//
|
||||
// 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 throw()
|
||||
{ return _M_table[(unsigned char)(__c + 1)] & __m; }
|
||||
|
||||
const char*
|
||||
ctype<char>::
|
||||
is(const char* __low, const char* __high, mask* __vec) const throw()
|
||||
{
|
||||
while (__low < __high)
|
||||
*__vec++ = _M_table[(unsigned char)(*__low++)];
|
||||
return __high;
|
||||
}
|
||||
|
||||
const char*
|
||||
ctype<char>::
|
||||
scan_is(mask __m, const char* __low, const char* __high) const throw()
|
||||
{
|
||||
while (__low < __high && !this->is(__m, *__low))
|
||||
++__low;
|
||||
return __low;
|
||||
}
|
||||
|
||||
const char*
|
||||
ctype<char>::
|
||||
scan_not(mask __m, const char* __low, const char* __high) const throw()
|
||||
{
|
||||
while (__low < __high && this->is(__m, *__low) != 0)
|
||||
++__low;
|
||||
return __low;
|
||||
}
|
79
libstdc++-v3/config/os/djgpp/bits/ctype_noninline.h
Normal file
79
libstdc++-v3/config/os/djgpp/bits/ctype_noninline.h
Normal file
|
@ -0,0 +1,79 @@
|
|||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997, 1998, 1999, 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.
|
||||
|
||||
//
|
||||
// ISO C++ 14882: 22.1 Locales
|
||||
//
|
||||
|
||||
// Information as gleaned from DJGPP <ctype.h>
|
||||
|
||||
// DJGPP specific code
|
||||
extern unsigned short __dj_type_cflags[];
|
||||
extern unsigned char __dj_ctype_toupper[];
|
||||
extern unsigned char __dj_ctype_tolower[];
|
||||
|
||||
ctype<char>::ctype(const mask* __table = 0, bool __del = false,
|
||||
size_t __refs = 0)
|
||||
: _Ctype_nois<char>(__refs),
|
||||
_M_del(__table != 0 && __del),
|
||||
_M_toupper(__dj_ctype_toupper),
|
||||
_M_tolower(__dj_ctype_tolower),
|
||||
_M_ctable(NULL),
|
||||
_M_table(__table == 0 ? __dj_type_cflags : __table)
|
||||
{ }
|
||||
|
||||
char
|
||||
ctype<char>::do_toupper(char __c) const
|
||||
{ return _M_toupper[(int)(__c)+1]) }
|
||||
|
||||
const char*
|
||||
ctype<char>::do_toupper(char* __low, const char* __high) const
|
||||
{
|
||||
while (__low < __high)
|
||||
{
|
||||
*__low = ::toupper((int) *__low);
|
||||
++__low;
|
||||
}
|
||||
return __high;
|
||||
}
|
||||
|
||||
char
|
||||
ctype<char>::do_tolower(char __c) const
|
||||
{ return _M_tolower[(int)(__c)+1]) }
|
||||
|
||||
const char*
|
||||
ctype<char>::do_tolower(char* __low, const char* __high) const
|
||||
{
|
||||
while (__low < __high)
|
||||
{
|
||||
*__low = ::tolower((int) *__low);
|
||||
++__low;
|
||||
}
|
||||
return __high;
|
||||
}
|
44
libstdc++-v3/config/os/djgpp/bits/os_defines.h
Normal file
44
libstdc++-v3/config/os/djgpp/bits/os_defines.h
Normal file
|
@ -0,0 +1,44 @@
|
|||
// Specific definitions for DJGPP -*- 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. */
|
||||
|
||||
#define __off_t off_t
|
||||
#define __off64_t off64_t
|
||||
#define __ssize_t ssize_t
|
||||
|
||||
// FIXME: should there be '#undef POSIX_SOURCE'?
|
||||
|
||||
#endif
|
|
@ -87,6 +87,9 @@ case "${target_os}" in
|
|||
cygwin*)
|
||||
os_include_dir="config/os/newlib"
|
||||
;;
|
||||
*djgpp*)
|
||||
os_include_dir="config/os/djgpp"
|
||||
;;
|
||||
linux* | gnu*)
|
||||
os_include_dir="config/os/gnu-linux"
|
||||
;;
|
||||
|
|
Loading…
Add table
Reference in a new issue