stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: svn commit: r581935 - in /incubator/stdcxx/trunk: include/loc/_punct.cc src/file.cpp
Date Fri, 05 Oct 2007 03:41:18 GMT
faridz@apache.org wrote:
> Author: faridz
> Date: Thu Oct  4 07:45:07 2007
> New Revision: 581935
> 
> URL: http://svn.apache.org/viewvc?rev=581935&view=rev

Has this change been sufficiently tested on trunk before being
merging out to the branch?

Martin

> Log:
> 2007-10-04 Farid Zaripov <farid_zaripov@epam.com>
> 
> 	* Merged the head of branches/4.2.0
> 
> Modified:
>     incubator/stdcxx/trunk/include/loc/_punct.cc
>     incubator/stdcxx/trunk/src/file.cpp
> 
> Modified: incubator/stdcxx/trunk/include/loc/_punct.cc
> URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/loc/_punct.cc?rev=581935&r1=581934&r2=581935&view=diff
> ==============================================================================
> --- incubator/stdcxx/trunk/include/loc/_punct.cc (original)
> +++ incubator/stdcxx/trunk/include/loc/_punct.cc Thu Oct  4 07:45:07 2007
> @@ -87,7 +87,10 @@
>  
>              typedef _STD::char_traits<_CharT> _Traits;
>  
> -            if (__bits & 1UL << __k) {
> +            const _RWSTD_SIZE_T __mask =
> +                _RWSTD_STATIC_CAST(_RWSTD_SIZE_T, 1UL) << __k;
> +
> +            if (__bits & __mask) {
>                  // `name' is still in the set, see if the next char matches
>                  // (case insensitive comparison done if `ctp' is nonzero)
>                  if (   __pos < __sizes [__k]
> @@ -108,7 +111,7 @@
>  
>                          // this match is a duplicate of the last best one
>                          // remove this match from the set
> -                        __bits &= ~(1UL << __k);
> +                        __bits &= ~__mask;
>                          --__nmatch;
>                      }
>                      else if (   __sizes [__k] < __sizes [__inx]
> @@ -137,7 +140,7 @@
>  
>                      // clear the bit for the `name' that failed to match
>                      // and decrement the numeber of matches
> -                    __bits &= ~(1UL << __k);
> +                    __bits &= ~__mask;
>                      --__nmatch;
>                  }
>              }
> 
> Modified: incubator/stdcxx/trunk/src/file.cpp
> URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/src/file.cpp?rev=581935&r1=581934&r2=581935&view=diff
> ==============================================================================
> --- incubator/stdcxx/trunk/src/file.cpp (original)
> +++ incubator/stdcxx/trunk/src/file.cpp Thu Oct  4 07:45:07 2007
> @@ -475,13 +475,18 @@
>  }
>  
>  
> +#ifdef _WIN64
> +// disable MSVC warning: conversion from '__int64' to 'long', possible loss of data
> +#pragma warning (disable: 4244)
> +#endif
> +
>  _RWSTD_EXPORT long
>  __rw_fseek (void *file, int flags, _RWSTD_PTRDIFF_T offset, int origin)
>  {
>      if (flags & _RWSTD_IOS_STDIO) {
>          FILE* const fp = _RWSTD_STATIC_CAST (FILE*, file);
>  
> -        const int pos = fseek (fp, offset, origin);
> +        const int pos = fseek (fp, long (offset), origin);
>          if (pos < 0)
>              return long (pos);
>  
> @@ -522,6 +527,11 @@
>  
>      return write (fd, buf, size);
>  }
> +
> +#ifdef _WIN64
> +// restore MSVC warning: conversion from '__int64' to 'long', possible loss of data
> +#pragma warning (default: 4244)
> +#endif
>  
>  
>  _RWSTD_EXPORT extern const void* __rw_std_streams[];
> 
> 
> 


Mime
View raw message