[TELNET] Don't compile it on MSVC

[CMAKE] Use the same MSVC build flags for x64 as for x86
[SMLIB] Fix MSVC warnings
[MODULES] Don't include optional modules on x64
[NTOSKRNL] Add some missing globals and definitions for x64
[CSRSRV] Fix an MSVC warning

svn path=/trunk/; revision=60325
This commit is contained in:
Timo Kreuzer 2013-09-22 21:04:06 +00:00
parent 9ffa1e73af
commit bec4ac17fc
8 changed files with 38 additions and 12 deletions

View file

@ -10,7 +10,9 @@ add_subdirectory(netstat)
add_subdirectory(nslookup)
add_subdirectory(ping)
add_subdirectory(route)
add_subdirectory(telnet)
#if(NOT MSVC)
add_subdirectory(telnet)
#endif()
add_subdirectory(tracert)
add_subdirectory(whois)
add_subdirectory(wlanconf)

View file

@ -59,11 +59,9 @@ if(MSVC_IDE)
endif()
endif()
if(${_MACHINE_ARCH_FLAG} MATCHES X86)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO /INCREMENTAL:NO /SAFESEH:NO /NODEFAULTLIB /RELEASE")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /MANIFEST:NO /INCREMENTAL:NO /SAFESEH:NO /NODEFAULTLIB /RELEASE")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /MANIFEST:NO /INCREMENTAL:NO /SAFESEH:NO /NODEFAULTLIB /RELEASE")
endif()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO /INCREMENTAL:NO /SAFESEH:NO /NODEFAULTLIB /RELEASE")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /MANIFEST:NO /INCREMENTAL:NO /SAFESEH:NO /NODEFAULTLIB /RELEASE")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /MANIFEST:NO /INCREMENTAL:NO /SAFESEH:NO /NODEFAULTLIB /RELEASE")
if(MSVC_IDE AND (CMAKE_VERSION MATCHES "ReactOS"))
# for VS builds we'll only have en-US in resource files
@ -160,13 +158,13 @@ function(generate_import_lib _libname _dllname _spec_file)
set(_def_file ${CMAKE_CURRENT_BINARY_DIR}/${_libname}_exp.def)
set(_asm_stubs_file ${CMAKE_CURRENT_BINARY_DIR}/${_libname}_stubs.asm)
# Generate the asm stub file and the def file for import library
add_custom_command(
OUTPUT ${_asm_stubs_file} ${_def_file}
COMMAND native-spec2def --ms --kill-at -a=${SPEC2DEF_ARCH} --implib -n=${_dllname} -d=${_def_file} -l=${_asm_stubs_file} ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file} native-spec2def)
if(MSVC_IDE)
# Compile the generated asm stub file
add_custom_command(

View file

@ -225,7 +225,9 @@ typedef struct _CSR_SERVER_DLL
PCSR_SHUTDOWNPROCESS_CALLBACK ShutdownProcessCallback;
ULONG Unknown2[3];
} CSR_SERVER_DLL, *PCSR_SERVER_DLL;
#ifndef _WIN64
C_ASSERT(FIELD_OFFSET(CSR_SERVER_DLL, SharedSection) == 0x3C);
#endif
typedef
NTSTATUS

View file

@ -109,12 +109,12 @@ SmLookupSubsystem (IN PWSTR Name,
}
else
{
Source.Length = kvpi->DataLength;
Source.MaximumLength = kvpi->DataLength;
Source.Length = (USHORT)kvpi->DataLength;
Source.MaximumLength = (USHORT)kvpi->DataLength;
Source.Buffer = (PWCHAR) & kvpi->Data;
Destination.Length = 0;
Destination.MaximumLength = (2 * KeyValueInformationLength);
Destination.MaximumLength = (USHORT)(2 * KeyValueInformationLength);
Destination.Buffer = DestinationBuffer;
Status = RtlExpandEnvironmentStrings_U (Environment,

View file

@ -1,4 +1,6 @@
if(NOT ARCH STREQUAL "amd64")
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/rostests/)
add_subdirectory(rostests)
endif()
@ -10,3 +12,5 @@ endif()
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/wallpaper/)
add_subdirectory(wallpaper)
endif()
endif()

View file

@ -262,6 +262,20 @@ MiIsPdeForAddressValid(PVOID Address)
/* Sign extend 48 bits */
#define MiProtoPteToPte(x) (PMMPTE)(((LONG64)(x)->u.Long) >> 16)
//
// Decodes a Prototype PTE into the underlying PTE
//
#define MiSubsectionPteToSubsection(x) \
(PMMPTE)((x)->u.Subsect.SubsectionAddress >> 16)
FORCEINLINE
VOID
MI_MAKE_SUBSECTION_PTE(IN PMMPTE NewPte,
IN PVOID Segment)
{
ASSERT(FALSE);
}
FORCEINLINE
VOID
MI_MAKE_PROTOTYPE_PTE(IN PMMPTE NewPte,

View file

@ -26,6 +26,10 @@ extern PMMPTE MmDebugPte;
MMPTE ValidKernelPde = {{PTE_VALID|PTE_READWRITE|PTE_DIRTY|PTE_ACCESSED}};
MMPTE ValidKernelPte = {{PTE_VALID|PTE_READWRITE|PTE_DIRTY|PTE_ACCESSED}};
/* The same, but for local pages */
MMPTE ValidKernelPdeLocal = {{PTE_VALID|PTE_READWRITE|PTE_DIRTY|PTE_ACCESSED}};
MMPTE ValidKernelPteLocal = {{PTE_VALID|PTE_READWRITE|PTE_DIRTY|PTE_ACCESSED}};
/* Template PDE for a demand-zero page */
MMPDE DemandZeroPde = {{MM_READWRITE << MM_PTE_SOFTWARE_PROTECTION_BITS}};
MMPTE DemandZeroPte = {{MM_READWRITE << MM_PTE_SOFTWARE_PROTECTION_BITS}};

View file

@ -296,7 +296,9 @@ CsrSbCreateSession(IN PSB_API_MSG ApiMessage)
CsrDeallocateProcess(CsrProcess);
CsrDeallocateThread(CsrThread);
CsrReleaseProcessLock();
return Status;
/* Strange as it seems, NTSTATUSes are actually returned */
return (BOOLEAN)Status;
}
/* Setup Process Data */