summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorhobbs <hobbs>2002-05-30 03:27:09 (GMT)
committerhobbs <hobbs>2002-05-30 03:27:09 (GMT)
commitb464ac8106dd466c8fc7ae3018e205bf0d69ef5f (patch)
tree2ac8f1f6e76a23dd45fffcc5b2d2f6a928444c32 /generic
parent06a24b87b9c810cdda2178d9b076750f15348a0b (diff)
downloadtcl-b464ac8106dd466c8fc7ae3018e205bf0d69ef5f.zip
tcl-b464ac8106dd466c8fc7ae3018e205bf0d69ef5f.tar.gz
tcl-b464ac8106dd466c8fc7ae3018e205bf0d69ef5f.tar.bz2
* unix/configure: regen'ed
* unix/configure.in: replaced bigendian check with autoconf standard AC_C_BIG_ENDIAN, which defined WORDS_BIGENDIAN on bigendian systems. * generic/tclUtf.c (Tcl_UniCharNcmp): * generic/tclInt.h (TclUniCharNcmp): use WORDS_BIGENDIAN instead of TCL_OPTIMIZE_UNICODE_COMPARE to enable memcmp alternative.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclInt.h14
-rw-r--r--generic/tclUtf.c8
2 files changed, 11 insertions, 11 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 59da527..a9bdc0f 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclInt.h,v 1.89 2002/05/29 10:35:45 dkf Exp $
+ * RCS: @(#) $Id: tclInt.h,v 1.90 2002/05/30 03:27:09 hobbs Exp $
*/
#ifndef _TCLINT
@@ -2361,20 +2361,20 @@ extern Tcl_Mutex tclObjMutex;
/*
*----------------------------------------------------------------
- * Macro used by the Tcl core to compare Unicode strings; this is
- * more efficient on a big-endian machine, and not hurtful on a
- * little-endian machine.
+ * Macro used by the Tcl core to compare Unicode strings. On
+ * big-endian systems we can use the more efficient memcmp, but
+ * this would not be lexically correct on little-endian systems.
* The ANSI C "prototype" for this macro is:
*
* EXTERN int TclUniCharNcmp _ANSI_ARGS_((CONST Tcl_UniChar *cs,
* CONST Tcl_UniChar *ct, unsigned long n));
*----------------------------------------------------------------
*/
-#ifdef TCL_OPTIMIZE_UNICODE_COMPARE
+#ifdef WORDS_BIGENDIAN
# define TclUniCharNcmp(cs,ct,n) memcmp((cs),(ct),(n)*sizeof(Tcl_UniChar))
-#else /* !TCL_OPTIMIZE_UNICODE_COMPARE */
+#else /* !WORDS_BIGENDIAN */
# define TclUniCharNcmp Tcl_UniCharNcmp
-#endif /* TCL_OPTIMIZE_UNICODE_COMPARE */
+#endif /* WORDS_BIGENDIAN */
#include "tclIntDecls.h"
diff --git a/generic/tclUtf.c b/generic/tclUtf.c
index 667bb6d..522b835 100644
--- a/generic/tclUtf.c
+++ b/generic/tclUtf.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUtf.c,v 1.25 2002/05/29 10:35:46 dkf Exp $
+ * RCS: @(#) $Id: tclUtf.c,v 1.26 2002/05/30 03:27:09 hobbs Exp $
*/
#include "tclInt.h"
@@ -1351,13 +1351,13 @@ Tcl_UniCharNcmp(cs, ct, n)
CONST Tcl_UniChar *ct; /* Unicode string cs is compared to. */
unsigned long n; /* Number of unichars to compare. */
{
-#ifdef TCL_OPTIMIZE_UNICODE_COMPARE
+#ifdef WORDS_BIGENDIAN
/*
* We are definitely on a big-endian machine; memcmp() is safe
*/
return memcmp(cs, ct, n*sizeof(Tcl_UniChar));
-#else /* !TCL_OPTIMIZE_UNICODE_COMPARE */
+#else /* !WORDS_BIGENDIAN */
/*
* We can't simply call memcmp() because that is not lexically correct.
*/
@@ -1367,7 +1367,7 @@ Tcl_UniCharNcmp(cs, ct, n)
}
}
return 0;
-#endif /* TCL_OPTIMIZE_UNICODE_COMPARE */
+#endif /* WORDS_BIGENDIAN */
}
/*