- 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.
svn path=/trunk/; revision=42829
<compilerflag>/Zl</compilerflag>
<compilerflag>/Zi</compilerflag>
<compilerflag>/W1</compilerflag>
- <compilerflag>/FIwine/typeof.h</compilerflag>
</group>
<group compilerset="gcc">
/* INCLUDES ******************************************************************/
-#ifdef _MSC_VER
+#if 0
#define _CRT_SECURE_NO_DEPRECATE 1
#endif
<include base="ReactOS">include/reactos/wine</include>
<define name="__WINESRC__" />
<define name="USE_WIN32_OPENGL" />
+ <compilerflag compilerset="msc">/FIwine/typeof.h</compilerflag>
<library>advapi32</library>
<library>dxguid</library>
<include base="ReactOS">include/reactos/wine</include>
<define name="__WINESRC__" />
<redefine name="_WIN32_WINNT">0x600</redefine>
+ <compilerflag compilerset="msc">/FIwine/typeof.h</compilerflag>
<file>imm.c</file>
<file>version.rc</file>
<library>wine</library>
<define name="_WINE" />
<redefine name="_WIN32_WINNT">0x601</redefine>
<define name="LIBXML_STATIC" />
+ <compilerflag compilerset="msc">/FIwine/typeof.h</compilerflag>
<library>libxml2</library>
<library>libxslt</library>
<library>wine</library>
<define name="PROXY_DELEGATION"/>
<define name="REGISTER_PROXY_DLL"/>
<define name="ENTRY_PREFIX">OLEAUTPS_</define>
+ <compilerflag compilerset="msc">/FIwine/typeof.h</compilerflag>
<file>connpt.c</file>
<file>dispatch.c</file>
<file>hash.c</file>
<include base="riched20">.</include>
<include base="ReactOS">include/reactos/wine</include>
<define name="__WINESRC__" />
+ <compilerflag compilerset="msc">/FIwine/typeof.h</compilerflag>
<linkerflag linkerset="ld">-enable-stdcall-fixup</linkerflag>
<file>caret.c</file>
<file>clipboard.c</file>
#ifdef NDEBUG
-#define DPRINT(args...)
+#define DPRINT(...)
#define CHECKPOINT
#else
-#define DPRINT(args...) do { DebugPrint("(SAMLIB:%s:%d) ",__FILE__,__LINE__); DebugPrint(args); } while(0)
+#define DPRINT(...) do { DebugPrint("(SAMLIB:%s:%d) ",__FILE__,__LINE__); DebugPrint(__VA_ARGS__); } while(0)
#define CHECKPOINT do { DebugPrint("(SAMLIB:%s:%d) Checkpoint\n",__FILE__,__LINE__); } while(0)
#endif
-#define DPRINT1(args...) do { DebugPrint("(SAMLIB:%s:%d) ",__FILE__,__LINE__); DebugPrint(args); } while(0)
+#define DPRINT1(...) do { DebugPrint("(SAMLIB:%s:%d) ",__FILE__,__LINE__); DebugPrint(__VA_ARGS__); } while(0)
#define CHECKPOINT1 do { DebugPrint("(SAMLIB:%s:%d) Checkpoint\n",__FILE__,__LINE__); } while(0)
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)
{
("About to call send routine %x\n",
(*((PADDRESS_FILE)Request.Handle.AddressHandle)->Send)));
- if( (*((PADDRESS_FILE)Request.Handle.AddressHandle)->Send) )
+ if( (*((PADDRESS_FILE)Request.Handle.AddressHandle)->Send != NULL) )
Status = (*((PADDRESS_FILE)Request.Handle.AddressHandle)->Send)(
Request.Handle.AddressHandle,
DgramInfo->SendDatagramInformation,
i++;
} else {
#ifdef _MSC_VER
-#pragma message ("HACK HACK HACK Disabling warning HACK HACK HACK")
#pragma warning(push)
-#pragma warning(disable:4333)
+#pragma warning(disable:4333) // right shift by too large amount, data loss
#endif
fis[7] |= (plba[3] >> 24) & 0x0f;
#ifdef _MSC_VER
*
*/
-#ifdef __GNUC__
-#include_next<float.h>
-#endif
-
-#ifdef _MSC_VER
+#if defined(__GNUC__)
+#include <gcc_float.h>
+#elif defined(_MSC_VER)
#include <msc_float.h>
+#else
+#error
#endif
#ifndef _MINGW_FLOAT_H_
#endif /* RC_INVOKED */
#ifndef NO_OLDNAMES
-#undef alloca
-#ifdef __GNUC__
-#define alloca(x) __builtin_alloca((x))
-#else
#define alloca _alloca
#endif
-#endif
#ifdef HEAPHOOK
#ifndef _HEAPHOOK_DEFINED
# endif
#endif
-#ifdef _WINE
-#ifndef _PID_T_
-#define _PID_T_
+#if defined(_WINE)
#ifndef _WIN64
typedef int _pid_t;
#else
typedef _pid_t pid_t;
#endif /* __pid_t_defined */
#endif
-#endif /* Not _PID_T_ */
#endif
#endif /* !_INC_TYPES */
#include <excpt.h>
-#define _SEH2_TRY __try {
-#define _SEH2_FINALLY } __finally {
-#define _SEH2_EXCEPT(...) } __except(__VA_ARGS__) {
-#define _SEH2_END }
+#define _SEH2_TRY __try
+#define _SEH2_FINALLY __finally
+#define _SEH2_EXCEPT(...) __except(__VA_ARGS__)
+#define _SEH2_END
#define _SEH2_GetExceptionInformation() (GetExceptionInformation())
#define _SEH2_GetExceptionCode() (GetExceptionCode())
#include "scripts.h"
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable:4351) // elements of array 'array' will be default initialized
+#endif
+
struct SCRIPTS_ScriptsSet
{
private:
}
};
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
int
WINAPI
GetStringScripts
("fxtract\n\t"
: "=t" (__junk), "=u" (__val) : "0" (__x));
#else
+#error REVIEW ME
__asm fld [__x];
__asm fxtract;
__asm fstp st(0);
NULL);
}
-/* KiAcquireGuardedMutex depends on these bits being right */
-C_ASSERT((GM_LOCK_WAITER_WOKEN * 2) == GM_LOCK_WAITER_INC);
-
VOID
FASTCALL
KiAcquireGuardedMutex(IN OUT PKGUARDED_MUTEX GuardedMutex)
{
ULONG BitsToRemove, BitsToAdd;
LONG OldValue, NewValue;
+
+ /* We depend on these bits being just right */
+ C_ASSERT((GM_LOCK_WAITER_WOKEN * 2) == GM_LOCK_WAITER_INC);
/* Increase the contention count */
GuardedMutex->Contention++;
while((ptr = wcschr(szProcessName, L'\\')))
ptr[0] = L'_';
- swprintf(szBuffer, L"Console\\\%SystemRoot\%%S", &szProcessName[wLength]);
+ swprintf(szBuffer, L"Console\\%%SystemRoot%%%S", &szProcessName[wLength]);
DPRINT("#3 Path : %S\n", szBuffer);
if (RegOpenKeyExW(hKey, szBuffer, 0, samDesired, hSubKey) == ERROR_SUCCESS)
{
- swprintf(GuiData->szProcessName, L"\%SystemRoot\%%S", &szProcessName[wLength]);
+ swprintf(GuiData->szProcessName, L"%%SystemRoot%%%S", &szProcessName[wLength]);
RegCloseKey(hKey);
return TRUE;
}