[Python-checkins] CVS: python/dist/src acconfig.h,1.48,1.49 config.h.in,2.96,2.97 configure,1.213,1.214 configure.in,1.221,1.222
Martin v. L?wis
loewis@users.sourceforge.net
Tue, 26 Jun 2001 15:22:39 -0700
Update of /cvsroot/python/python/dist/src
In directory usw-pr-cvs1:/tmp/cvs-serv31084
Modified Files:
acconfig.h config.h.in configure configure.in
Log Message:
Support using UCS-4 as the Py_UNICODE type:
Add configure option --enable-unicode.
Add config.h macros Py_USING_UNICODE, PY_UNICODE_TYPE, Py_UNICODE_SIZE,
SIZEOF_WCHAR_T.
Define Py_UCS2.
Encode and decode large UTF-8 characters into single Py_UNICODE values
for wide Unicode types; likewise for UTF-16.
Remove test whether sizeof Py_UNICODE is two.
Index: acconfig.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/acconfig.h,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -r1.48 -r1.49
*** acconfig.h 2001/06/24 20:59:45 1.48
--- acconfig.h 2001/06/26 22:22:36 1.49
***************
*** 105,108 ****
--- 105,117 ----
#undef HAVE_WCHAR_H
+ /* Define if you want to have a Unicode type. */
+ #undef Py_USING_UNICODE
+
+ /* Define as the integral type used for Unicode representation. */
+ #undef PY_UNICODE_TYPE
+
+ /* Define as the size of the unicode type. */
+ #undef Py_UNICODE_SIZE
+
/* Define if malloc(0) returns a NULL pointer */
#undef MALLOC_ZERO_RETURNS_NULL
Index: config.h.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/config.h.in,v
retrieving revision 2.96
retrieving revision 2.97
diff -C2 -r2.96 -r2.97
*** config.h.in 2001/06/24 21:18:25 2.96
--- config.h.in 2001/06/26 22:22:36 2.97
***************
*** 164,167 ****
--- 164,176 ----
#undef HAVE_WCHAR_H
+ /* Define if you want to have a Unicode type. */
+ #undef Py_USING_UNICODE
+
+ /* Define as the integral type used for Unicode representation. */
+ #undef PY_UNICODE_TYPE
+
+ /* Define as the size of the unicode type. */
+ #undef Py_UNICODE_SIZE
+
/* Define if malloc(0) returns a NULL pointer */
#undef MALLOC_ZERO_RETURNS_NULL
***************
*** 284,287 ****
--- 293,299 ----
/* The number of bytes in a void *. */
#undef SIZEOF_VOID_P
+
+ /* The number of bytes in a wchar_t. */
+ #undef SIZEOF_WCHAR_T
/* Define if you have the _getpty function. */
Index: configure
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure,v
retrieving revision 1.213
retrieving revision 1.214
diff -C2 -r1.213 -r1.214
*** configure 2001/06/24 21:18:25 1.213
--- configure 2001/06/26 22:22:36 1.214
***************
*** 1,5 ****
#! /bin/sh
! # From configure.in Revision: 1.220
# Guess values for system-dependent variables and create Makefiles.
--- 1,5 ----
#! /bin/sh
! # From configure.in Revision: 1.221
[...4643 lines suppressed...]
if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 6835 "configure"
#include "confdefs.h"
#include <sys/types.h>
***************
*** 6799,6803 ****
SRCDIRS="Parser Grammar Objects Python Modules"
echo $ac_n "checking for build directories""... $ac_c" 1>&6
! echo "configure:6802: checking for build directories" >&5
for dir in $SRCDIRS; do
if test ! -d $dir; then
--- 6881,6885 ----
SRCDIRS="Parser Grammar Objects Python Modules"
echo $ac_n "checking for build directories""... $ac_c" 1>&6
! echo "configure:6884: checking for build directories" >&5
for dir in $SRCDIRS; do
if test ! -d $dir; then
Index: configure.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure.in,v
retrieving revision 1.221
retrieving revision 1.222
diff -C2 -r1.221 -r1.222
*** configure.in 2001/06/24 21:18:25 1.221
--- configure.in 2001/06/26 22:22:36 1.222
***************
*** 373,378 ****
AC_MSG_CHECKING([whether to enable ipv6])
AC_ARG_ENABLE(ipv6,
! [ --enable-ipv6 Enable ipv6 (with ipv4) support
! --disable-ipv6 Disable ipv6 support],
[ case "$enableval" in
no)
--- 373,378 ----
AC_MSG_CHECKING([whether to enable ipv6])
AC_ARG_ENABLE(ipv6,
! [ --enable-ipv6 Enable ipv6 (with ipv4) support
! --disable-ipv6 Disable ipv6 support],
[ case "$enableval" in
no)
***************
*** 1579,1599 ****
)
! # check for usable wchar_t
! usable_wchar_t="unkown"
! AC_MSG_CHECKING(for usable wchar_t)
! AC_TRY_RUN([
! #include "wchar.h"
! #include "wctype.h"
! main() {
! wchar_t s;
! if (sizeof(s) == 2)
! exit(0);
! else
! exit(1);
! }
! ],
! AC_DEFINE(HAVE_USABLE_WCHAR_T) usable_wchar_t="yes",
! usable_wchar_t="no")
! AC_MSG_RESULT($usable_wchar_t)
# check for endianness
--- 1579,1634 ----
)
! # determine wchar_t size
! if test "$wchar_h" = yes
! then
! AC_CHECK_SIZEOF(wchar_t)
! fi
!
! AC_MSG_CHECKING(what type to use for unicode)
! AC_ARG_ENABLE(unicode,
! [ --enable-unicode[=ucs2,ucs4] Enable Unicode strings (default is yes)],,enable_unicode=yes)
!
! if test $enable_unicode = yes
! then
! # Let Py_UNICODE size depend on wchar_t size
! case "$ac_cv_sizeof_wchar_t" in
! 2) enable_unicode="ucs2";;
! 4) enable_unicode="ucs4";;
! *) enable_unicode="ucs4";; # default to UCS-4
! esac
! fi
!
! case "$enable_unicode" in
! ucs2) unicode_size="2"
! AC_DEFINE(Py_UNICODE_SIZE,2)
! ;;
! ucs4) unicode_size="4"
! AC_DEFINE(Py_UNICODE_SIZE,4)
! ;;
! esac
!
! if test "$enable_unicode" = "no"
! then
! AC_MSG_RESULT(not used)
! else
! AC_DEFINE(Py_USING_UNICODE)
! if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
! then
! PY_UNICODE_TYPE="wchar_t"
! AC_DEFINE(HAVE_USABLE_WCHAR_T)
! AC_DEFINE(PY_UNICODE_TYPE,wchar_t)
! elif test "$ac_cv_sizeof_short" = "$unicode_size"
! then
! PY_UNICODE_TYPE="unsigned short"
! AC_DEFINE(PY_UNICODE_TYPE,unsigned short)
! elif test "$ac_cv_sizeof_long" = "$unicode_size"
! then
! PY_UNICODE_TYPE="unsigned long"
! AC_DEFINE(PY_UNICODE_TYPE,unsigned long)
! else
! PY_UNICODE_TYPE="no type found"
! fi
! AC_MSG_RESULT($PY_UNICODE_TYPE)
! fi
# check for endianness