[ros-dev] [ros-diffs] [sginsberg] 42829: - svchost: #ifdef _MSC_VER doesn't mean "using Microsoft's headers" anymore - ddraw, imm32, msxml3, oleaut32, riched20: Include typeof.h for typeof emulation when compiling under MSVC and remove from ReactOS-generic.rbuild (this can't go to port.h as the modules do not include it). - TCPIP: Fix a check for MSVC. - NDIS: Don't use floating point arithmetics in kernel mode -- spotted by MSVC trying to link to ftol (gcc inlined the operation). - SAMLIB: Use __VA_ARGS__ instead of gcc-specific macro manipulation. - WIN32CSR: Don't use gcc-specific \% if you want % in the string -- this is incorrect and will pass a broken string to swprintf (the code seems to be uncalled though, so this shouldn't change anything). Use %% instead. - Error out on MSVC implementation of logb -- it doesn't produce the same code as the gcc version. - Rename gcc's float.h to gcc_float.h and use #include instead of #include_next for consistency. - Remove leftover header guard from types.h - Remove superfluous brackets from PSEH2->MSVC defines -- this isn't necessary anymore after 41597 - Correction to 42216: MSVC *does* let you define types in a function, but only at the top of scope. Move back the C_ASSERT into KiAcquireGuardedMutex. - Simplify definition of alloca - scripts.cpp: Silence unavoidable warning. - Remove compile time warning from Uniata -- the code has been unused for 1 1/2 years and will probably remain so.

Timo Kreuzer timo.kreuzer at web.de
Sat Aug 22 00:38:13 CEST 2009


lol+1!


sginsberg at svn.reactos.org wrote:
> Author: sginsberg
> Date: Fri Aug 21 17:57:26 2009
> New Revision: 42829
>
> URL: http://svn.reactos.org/svn/reactos?rev=42829&view=rev
> Log:
> [...]
> - NDIS: Don't use floating point arithmetics in kernel mode -- spotted by MSVC trying to link to ftol (gcc inlined the operation).
> [...]
>
>
> Modified: trunk/reactos/drivers/network/ndis/ndis/config.c
> URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/config.c?rev=42829&r1=42828&r2=42829&view=diff
> ==============================================================================
> --- trunk/reactos/drivers/network/ndis/ndis/config.c [iso-8859-1] (original)
> +++ trunk/reactos/drivers/network/ndis/ndis/config.c [iso-8859-1] Fri Aug 21 17:57:26 2009
> @@ -705,7 +705,14 @@
>  
>      while (j < str.Length && str.Buffer[j] != '\0') j++;
>           
> -    *NetworkAddressLength = (UINT)((j/2)+0.5);
> +    if ((j % 2) == 0)
> +    {
> +        *NetworkAddressLength = (UINT)(j/2);
> +    }
> +    else
> +    {
> +        *NetworkAddressLength = (UINT)((j/2)+1);
> +    }
>  
>      if ((*NetworkAddressLength) == 0)
>      {
>
>   




More information about the Ros-dev mailing list