stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From far...@apache.org
Subject svn commit: r649680 - in /stdcxx/branches/4.2.x: etc/config/windows/configure.wsf include/loc/_ctype.h include/rw/_defs.h
Date Fri, 18 Apr 2008 20:18:54 GMT
Author: faridz
Date: Fri Apr 18 13:18:52 2008
New Revision: 649680

URL: http://svn.apache.org/viewvc?rev=649680&view=rev
Log:
2008-04-18 Farid Zaripov <farid_zaripov@epam.com>

	Merged changes from trunk.

	2008-04-18 Farid Zaripov <farid_zaripov@epam.com>
	* etc/config/windows/configure.wsf (linkFiles): Link with libraries,
	specified in LIBS config variable.
	(makeLibrary): Ditto.

	2008-04-18 Farid Zaripov <farid_zaripov@epam.com>
	* include/rw/_defs.h: #define new general purpose config macro _RWSTD_UWCHAR_INT_T.
	* include/loc/_ctype.h (narrow): Cast __c to _RWSTD_UWCHAR_INT_T to avoid warnings
	about signed/unsigned comparisons.

Modified:
    stdcxx/branches/4.2.x/etc/config/windows/configure.wsf
    stdcxx/branches/4.2.x/include/loc/_ctype.h
    stdcxx/branches/4.2.x/include/rw/_defs.h

Modified: stdcxx/branches/4.2.x/etc/config/windows/configure.wsf
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/etc/config/windows/configure.wsf?rev=649680&r1=649679&r2=649680&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/etc/config/windows/configure.wsf (original)
+++ stdcxx/branches/4.2.x/etc/config/windows/configure.wsf Fri Apr 18 13:18:52 2008
@@ -1015,7 +1015,7 @@
 
     command += joinArray(srcs.split(" "), "");
 
-    command += " /Fe\"" + stageDir + "\\" + outName + "\"" +
+    command += " " + LIBS + " /Fe\"" + stageDir + "\\" + outName + "\"" +
                " /link " + LDFLAGS;
 
     var message = "Linking with command \"" + command + "\"";
@@ -1042,7 +1042,7 @@
         var dllname = "\"" + stageDir + "\\" + basename(outFile, "\\.lib") + ".dll\"";
         var command = LD + " ";
         command += joinArray(objNames.split(" "), "");
-        command += " /Fe" + dllname + " /link /DLL " + LDFLAGS +
+        command += " " + LIBS + " /Fe" + dllname + " /link /DLL " + LDFLAGS +
                    " /IMPLIB:" + libname;
         var message = "Making library with command \"" + command + "\"";
         logLine(message);

Modified: stdcxx/branches/4.2.x/include/loc/_ctype.h
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/loc/_ctype.h?rev=649680&r1=649679&r2=649680&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/loc/_ctype.h (original)
+++ stdcxx/branches/4.2.x/include/loc/_ctype.h Fri Apr 18 13:18:52 2008
@@ -541,21 +541,20 @@
 inline char
 ctype<wchar_t>::narrow (char_type __c, char __dfault) const
 {
+    const _RWSTD_SIZE_T __inx = _RWSTD_STATIC_CAST (_RWSTD_UWCHAR_INT_T, __c);
+
     // optimize away all but the first call to the virtual do_widen()
-    if (   0 <= __c
-        && __c < sizeof _C_narrow_tab / sizeof *_C_narrow_tab
-        && _C_narrow_tab [__c])
-        return _C_narrow_tab [__c];
+    if (   __inx < sizeof _C_narrow_tab / sizeof *_C_narrow_tab
+        && _C_narrow_tab [__inx])
+        return _C_narrow_tab [__inx];
 
     // template argument provided to work around an HP aCC bug (PR #27087)
     ctype<wchar_t>* const __self = _RWSTD_CONST_CAST (ctype<wchar_t>*, this);
 
     const char __ch = do_narrow (__c, __dfault);
 
-    if (   0 <= __c
-        && __c < sizeof _C_narrow_tab / sizeof *_C_narrow_tab
-        && __ch != __dfault)
-        __self->_C_narrow_tab [__c] = __ch;
+    if (__inx < sizeof _C_narrow_tab / sizeof *_C_narrow_tab && __ch != __dfault)
+        __self->_C_narrow_tab [__inx] = __ch;
 
     return __ch;
 }

Modified: stdcxx/branches/4.2.x/include/rw/_defs.h
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/rw/_defs.h?rev=649680&r1=649679&r2=649680&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/rw/_defs.h (original)
+++ stdcxx/branches/4.2.x/include/rw/_defs.h Fri Apr 18 13:18:52 2008
@@ -1269,6 +1269,20 @@
 #endif   // _RWSTD_SSIZE_T
 
 
+// _RWSTD_UWCHAR_INT_T is "unsigned wchar_t"
+#ifndef _RWSTD_UWCHAR_INT_T
+#  if _RWSTD_CHAR_SIZE == _RWSTD_WCHAR_SIZE
+#    define _RWSTD_UWCHAR_INT_T unsigned char
+#  elif _RWSTD_SHRT_SIZE == _RWSTD_WCHAR_SIZE
+#    define _RWSTD_UWCHAR_INT_T unsigned short
+#  elif _RWSTD_INT_SIZE == _RWSTD_WCHAR_SIZE
+#    define _RWSTD_UWCHAR_INT_T unsigned int
+#  else
+#    define _RWSTD_UWCHAR_INT_T _RWSTD_SIZE_T
+#  endif
+#endif   // _RWSTD_UWCHAR_INT_T
+
+
 #if defined(SNI)
 #  define _RWSTD_USING_SNI(name) _USING(__SNI::name)
 #  if defined(_RWSTD_STRICT_ANSI)



Mime
View raw message