diff --git a/CMakeLists.txt b/CMakeLists.txt index f9ce8252f..18ef1e858 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,7 +123,14 @@ if(CMAKE_COMPILER_IS_GNUCC) else() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=i686") endif() + else() + if(CMAKE_POSITION_INDEPENDENT_CODE) + if(${CMAKE_VERSION} VERSION_LESS 2.8.9) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") + endif() + endif() endif() + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") CHECK_C_COMPILER_FLAG (-Wno-unused-result Wno-unused-result) if(Wno-unused-result) diff --git a/client/Windows/wf_interface.c b/client/Windows/wf_interface.c index b4969a933..87abe188d 100644 --- a/client/Windows/wf_interface.c +++ b/client/Windows/wf_interface.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #ifdef _MSC_VER diff --git a/include/freerdp/channels/rdpdr.h b/include/freerdp/channels/rdpdr.h index 9a3077a30..2d7f6401e 100644 --- a/include/freerdp/channels/rdpdr.h +++ b/include/freerdp/channels/rdpdr.h @@ -103,15 +103,6 @@ enum IRP_MN }; /* DR_CREATE_REQ.CreateDisposition */ -enum FILE_CREATE_DISPOSITION -{ - FILE_SUPERSEDE = 0x00000000, - FILE_OPEN = 0x00000001, - FILE_CREATE = 0x00000002, - FILE_OPEN_IF = 0x00000003, - FILE_OVERWRITE = 0x00000004, - FILE_OVERWRITE_IF = 0x00000005 -}; /* DR_CREATE_REQ.CreateOptions [MS-SMB2] */ diff --git a/winpr/include/winpr/nt.h b/winpr/include/winpr/nt.h index dccf6e69b..6664576bb 100644 --- a/winpr/include/winpr/nt.h +++ b/winpr/include/winpr/nt.h @@ -22,9 +22,71 @@ #include #include +#include #ifndef _WIN32 +/* Defined in winnt.h, do not redefine */ + +#define STATUS_WAIT_0 ((NTSTATUS)0x00000000L) +#define STATUS_ABANDONED_WAIT_0 ((NTSTATUS)0x00000080L) +#define STATUS_USER_APC ((NTSTATUS)0x000000C0L) +#define STATUS_TIMEOUT ((NTSTATUS)0x00000102L) +#define STATUS_PENDING ((NTSTATUS)0x00000103L) +#define DBG_EXCEPTION_HANDLED ((NTSTATUS)0x00010001L) +#define DBG_CONTINUE ((NTSTATUS)0x00010002L) +#define STATUS_SEGMENT_NOTIFICATION ((NTSTATUS)0x40000005L) +#define STATUS_FATAL_APP_EXIT ((NTSTATUS)0x40000015L) +#define DBG_TERMINATE_THREAD ((NTSTATUS)0x40010003L) +#define DBG_TERMINATE_PROCESS ((NTSTATUS)0x40010004L) +#define DBG_CONTROL_C ((NTSTATUS)0x40010005L) +#define DBG_PRINTEXCEPTION_C ((NTSTATUS)0x40010006L) +#define DBG_RIPEXCEPTION ((NTSTATUS)0x40010007L) +#define DBG_CONTROL_BREAK ((NTSTATUS)0x40010008L) +#define DBG_COMMAND_EXCEPTION ((NTSTATUS)0x40010009L) +#define STATUS_GUARD_PAGE_VIOLATION ((NTSTATUS)0x80000001L) +#define STATUS_DATATYPE_MISALIGNMENT ((NTSTATUS)0x80000002L) +#define STATUS_BREAKPOINT ((NTSTATUS)0x80000003L) +#define STATUS_SINGLE_STEP ((NTSTATUS)0x80000004L) +#define STATUS_LONGJUMP ((NTSTATUS)0x80000026L) +#define STATUS_UNWIND_CONSOLIDATE ((NTSTATUS)0x80000029L) +#define DBG_EXCEPTION_NOT_HANDLED ((NTSTATUS)0x80010001L) +#define STATUS_ACCESS_VIOLATION ((NTSTATUS)0xC0000005L) +#define STATUS_IN_PAGE_ERROR ((NTSTATUS)0xC0000006L) +#define STATUS_INVALID_HANDLE ((NTSTATUS)0xC0000008L) +#define STATUS_INVALID_PARAMETER ((NTSTATUS)0xC000000DL) +#define STATUS_NO_MEMORY ((NTSTATUS)0xC0000017L) +#define STATUS_ILLEGAL_INSTRUCTION ((NTSTATUS)0xC000001DL) +#define STATUS_NONCONTINUABLE_EXCEPTION ((NTSTATUS)0xC0000025L) +#define STATUS_INVALID_DISPOSITION ((NTSTATUS)0xC0000026L) +#define STATUS_ARRAY_BOUNDS_EXCEEDED ((NTSTATUS)0xC000008CL) +#define STATUS_FLOAT_DENORMAL_OPERAND ((NTSTATUS)0xC000008DL) +#define STATUS_FLOAT_DIVIDE_BY_ZERO ((NTSTATUS)0xC000008EL) +#define STATUS_FLOAT_INEXACT_RESULT ((NTSTATUS)0xC000008FL) +#define STATUS_FLOAT_INVALID_OPERATION ((NTSTATUS)0xC0000090L) +#define STATUS_FLOAT_OVERFLOW ((NTSTATUS)0xC0000091L) +#define STATUS_FLOAT_STACK_CHECK ((NTSTATUS)0xC0000092L) +#define STATUS_FLOAT_UNDERFLOW ((NTSTATUS)0xC0000093L) +#define STATUS_INTEGER_DIVIDE_BY_ZERO ((NTSTATUS)0xC0000094L) +#define STATUS_INTEGER_OVERFLOW ((NTSTATUS)0xC0000095L) +#define STATUS_PRIVILEGED_INSTRUCTION ((NTSTATUS)0xC0000096L) +#define STATUS_STACK_OVERFLOW ((NTSTATUS)0xC00000FDL) +#define STATUS_DLL_NOT_FOUND ((NTSTATUS)0xC0000135L) +#define STATUS_ORDINAL_NOT_FOUND ((NTSTATUS)0xC0000138L) +#define STATUS_ENTRYPOINT_NOT_FOUND ((NTSTATUS)0xC0000139L) +#define STATUS_CONTROL_C_EXIT ((NTSTATUS)0xC000013AL) +#define STATUS_DLL_INIT_FAILED ((NTSTATUS)0xC0000142L) +#define STATUS_FLOAT_MULTIPLE_FAULTS ((NTSTATUS)0xC00002B4L) +#define STATUS_FLOAT_MULTIPLE_TRAPS ((NTSTATUS)0xC00002B5L) +#define STATUS_REG_NAT_CONSUMPTION ((NTSTATUS)0xC00002C9L) +#define STATUS_STACK_BUFFER_OVERRUN ((NTSTATUS)0xC0000409L) +#define STATUS_INVALID_CRUNTIME_PARAMETER ((NTSTATUS)0xC0000417L) +#define STATUS_ASSERTION_FAILURE ((NTSTATUS)0xC0000420L) +#define STATUS_SXS_EARLY_DEACTIVATION ((NTSTATUS)0xC015000FL) +#define STATUS_SXS_INVALID_DEACTIVATION ((NTSTATUS)0xC0150010L) + +#endif + #define FACILITY_DEBUGGER 0x1 #define FACILITY_RPC_RUNTIME 0x2 #define FACILITY_RPC_STUBS 0x3 @@ -37,18 +99,18 @@ #define FACILITY_ACPI_ERROR_CODE 0x14 #define FACILITY_SXS_ERROR_CODE 0x15 -#define DBG_EXCEPTION_HANDLED ((NTSTATUS)0x00010001) -#define DBG_CONTINUE ((NTSTATUS)0x00010002) +//#define DBG_EXCEPTION_HANDLED ((NTSTATUS)0x00010001) +//#define DBG_CONTINUE ((NTSTATUS)0x00010002) #define DBG_REPLY_LATER ((NTSTATUS)0x40010001) #define DBG_UNABLE_TO_PROVIDE_HANDLE ((NTSTATUS)0x40010002) -#define DBG_TERMINATE_THREAD ((NTSTATUS)0x40010003) -#define DBG_TERMINATE_PROCESS ((NTSTATUS)0x40010004) -#define DBG_CONTROL_C ((NTSTATUS)0x40010005) -#define DBG_PRINTEXCEPTION_C ((NTSTATUS)0x40010006) -#define DBG_RIPEXCEPTION ((NTSTATUS)0x40010007) -#define DBG_CONTROL_BREAK ((NTSTATUS)0x40010008) -#define DBG_COMMAND_EXCEPTION ((NTSTATUS)0x40010009) -#define DBG_EXCEPTION_NOT_HANDLED ((NTSTATUS)0x80010001) +//#define DBG_TERMINATE_THREAD ((NTSTATUS)0x40010003) +//#define DBG_TERMINATE_PROCESS ((NTSTATUS)0x40010004) +//#define DBG_CONTROL_C ((NTSTATUS)0x40010005) +//#define DBG_PRINTEXCEPTION_C ((NTSTATUS)0x40010006) +//#define DBG_RIPEXCEPTION ((NTSTATUS)0x40010007) +//#define DBG_CONTROL_BREAK ((NTSTATUS)0x40010008) +//#define DBG_COMMAND_EXCEPTION ((NTSTATUS)0x40010009) +//#define DBG_EXCEPTION_NOT_HANDLED ((NTSTATUS)0x80010001) #define DBG_NO_STATE_CHANGE ((NTSTATUS)0xC0010001) #define DBG_APP_NOT_IDLE ((NTSTATUS)0xC0010002) @@ -71,11 +133,11 @@ #define STATUS_WAIT_63 ((NTSTATUS)0x0000003f) #define STATUS_ABANDONED ((NTSTATUS)0x00000080) #define STATUS_ABANDONED_WAIT_63 ((NTSTATUS)0x000000BF) -#define STATUS_USER_APC ((NTSTATUS)0x000000C0) +//#define STATUS_USER_APC ((NTSTATUS)0x000000C0) #define STATUS_KERNEL_APC ((NTSTATUS)0x00000100) #define STATUS_ALERTED ((NTSTATUS)0x00000101) -#define STATUS_TIMEOUT ((NTSTATUS)0x00000102) -#define STATUS_PENDING ((NTSTATUS)0x00000103) +//#define STATUS_TIMEOUT ((NTSTATUS)0x00000102) +//#define STATUS_PENDING ((NTSTATUS)0x00000103) #define STATUS_REPARSE ((NTSTATUS)0x00000104) #define STATUS_MORE_ENTRIES ((NTSTATUS)0x00000105) #define STATUS_NOT_ALL_ASSIGNED ((NTSTATUS)0x00000106) @@ -110,7 +172,7 @@ #define STATUS_WORKING_SET_LIMIT_RANGE ((NTSTATUS)0x40000002) #define STATUS_IMAGE_NOT_AT_BASE ((NTSTATUS)0x40000003) #define STATUS_RXACT_STATE_CREATED ((NTSTATUS)0x40000004) -#define STATUS_SEGMENT_NOTIFICATION ((NTSTATUS)0x40000005) +//#define STATUS_SEGMENT_NOTIFICATION ((NTSTATUS)0x40000005) #define STATUS_LOCAL_USER_SESSION_KEY ((NTSTATUS)0x40000006) #define STATUS_BAD_CURRENT_DIRECTORY ((NTSTATUS)0x40000007) #define STATUS_SERIAL_MORE_WRITES ((NTSTATUS)0x40000008) @@ -126,7 +188,7 @@ #define STATUS_EVENT_DONE ((NTSTATUS)0x40000012) #define STATUS_EVENT_PENDING ((NTSTATUS)0x40000013) #define STATUS_CHECKING_FILE_SYSTEM ((NTSTATUS)0x40000014) -#define STATUS_FATAL_APP_EXIT ((NTSTATUS)0x40000015) +//#define STATUS_FATAL_APP_EXIT ((NTSTATUS)0x40000015) #define STATUS_PREDEFINED_HANDLE ((NTSTATUS)0x40000016) #define STATUS_WAS_UNLOCKED ((NTSTATUS)0x40000017) #define STATUS_SERVICE_NOTIFICATION ((NTSTATUS)0x40000018) @@ -161,10 +223,10 @@ #define STATUS_SXS_RELEASE_ACTIVATION_CONTEXT ((NTSTATUS)0x4015000D) -#define STATUS_GUARD_PAGE_VIOLATION ((NTSTATUS)0x80000001) -#define STATUS_DATATYPE_MISALIGNMENT ((NTSTATUS)0x80000002) -#define STATUS_BREAKPOINT ((NTSTATUS)0x80000003) -#define STATUS_SINGLE_STEP ((NTSTATUS)0x80000004) +//#define STATUS_GUARD_PAGE_VIOLATION ((NTSTATUS)0x80000001) +//#define STATUS_DATATYPE_MISALIGNMENT ((NTSTATUS)0x80000002) +//#define STATUS_BREAKPOINT ((NTSTATUS)0x80000003) +//#define STATUS_SINGLE_STEP ((NTSTATUS)0x80000004) #define STATUS_BUFFER_OVERFLOW ((NTSTATUS)0x80000005) #define STATUS_NO_MORE_FILES ((NTSTATUS)0x80000006) #define STATUS_WAKE_SYSTEM_DEBUGGER ((NTSTATUS)0x80000007) @@ -196,10 +258,10 @@ #define STATUS_REDIRECTOR_HAS_OPEN_HANDLES ((NTSTATUS)0x80000023) #define STATUS_SERVER_HAS_OPEN_HANDLES ((NTSTATUS)0x80000024) #define STATUS_ALREADY_DISCONNECTED ((NTSTATUS)0x80000025) -#define STATUS_LONGJUMP ((NTSTATUS)0x80000026) +//#define STATUS_LONGJUMP ((NTSTATUS)0x80000026) #define STATUS_CLEANER_CARTRIDGE_INSTALLED ((NTSTATUS)0x80000027) #define STATUS_PLUGPLAY_QUERY_VETOED ((NTSTATUS)0x80000028) -#define STATUS_UNWIND_CONSOLIDATE ((NTSTATUS)0x80000029) +//#define STATUS_UNWIND_CONSOLIDATE ((NTSTATUS)0x80000029) #define STATUS_REGISTRY_HIVE_RECOVERED ((NTSTATUS)0x8000002A) #define STATUS_DLL_MIGHT_BE_INSECURE ((NTSTATUS)0x8000002B) #define STATUS_DLL_MIGHT_BE_INCOMPATIBLE ((NTSTATUS)0x8000002C) @@ -213,20 +275,20 @@ #define STATUS_CLUSTER_NETWORK_ALREADY_OFFLINE ((NTSTATUS)0x80130004) #define STATUS_CLUSTER_NODE_ALREADY_MEMBER ((NTSTATUS)0x80130005) -#define STATUS_WAIT_0 ((NTSTATUS)0x00000000) +//#define STATUS_WAIT_0 ((NTSTATUS)0x00000000) #define STATUS_UNSUCCESSFUL ((NTSTATUS)0xC0000001) #define STATUS_NOT_IMPLEMENTED ((NTSTATUS)0xC0000002) #define STATUS_INVALID_INFO_CLASS ((NTSTATUS)0xC0000003) #define STATUS_INFO_LENGTH_MISMATCH ((NTSTATUS)0xC0000004) -#define STATUS_ACCESS_VIOLATION ((NTSTATUS)0xC0000005) -#define STATUS_IN_PAGE_ERROR ((NTSTATUS)0xC0000006) +//#define STATUS_ACCESS_VIOLATION ((NTSTATUS)0xC0000005) +//#define STATUS_IN_PAGE_ERROR ((NTSTATUS)0xC0000006) #define STATUS_PAGEFILE_QUOTA ((NTSTATUS)0xC0000007) -#define STATUS_INVALID_HANDLE ((NTSTATUS)0xC0000008) +//#define STATUS_INVALID_HANDLE ((NTSTATUS)0xC0000008) #define STATUS_BAD_INITIAL_STACK ((NTSTATUS)0xC0000009) #define STATUS_BAD_INITIAL_PC ((NTSTATUS)0xC000000A) #define STATUS_INVALID_CID ((NTSTATUS)0xC000000B) #define STATUS_TIMER_NOT_CANCELED ((NTSTATUS)0xC000000C) -#define STATUS_INVALID_PARAMETER ((NTSTATUS)0xC000000D) +//#define STATUS_INVALID_PARAMETER ((NTSTATUS)0xC000000D) #define STATUS_NO_SUCH_DEVICE ((NTSTATUS)0xC000000E) #define STATUS_NO_SUCH_FILE ((NTSTATUS)0xC000000F) #define STATUS_INVALID_DEVICE_REQUEST ((NTSTATUS)0xC0000010) @@ -236,13 +298,13 @@ #define STATUS_UNRECOGNIZED_MEDIA ((NTSTATUS)0xC0000014) #define STATUS_NONEXISTENT_SECTOR ((NTSTATUS)0xC0000015) #define STATUS_MORE_PROCESSING_REQUIRED ((NTSTATUS)0xC0000016) -#define STATUS_NO_MEMORY ((NTSTATUS)0xC0000017) +//#define STATUS_NO_MEMORY ((NTSTATUS)0xC0000017) #define STATUS_CONFLICTING_ADDRESSES ((NTSTATUS)0xC0000018) #define STATUS_NOT_MAPPED_VIEW ((NTSTATUS)0xC0000019) #define STATUS_UNABLE_TO_FREE_VM ((NTSTATUS)0xC000001A) #define STATUS_UNABLE_TO_DELETE_SECTION ((NTSTATUS)0xC000001B) #define STATUS_INVALID_SYSTEM_SERVICE ((NTSTATUS)0xC000001C) -#define STATUS_ILLEGAL_INSTRUCTION ((NTSTATUS)0xC000001D) +//#define STATUS_ILLEGAL_INSTRUCTION ((NTSTATUS)0xC000001D) #define STATUS_INVALID_LOCK_SEQUENCE ((NTSTATUS)0xC000001E) #define STATUS_INVALID_VIEW_SIZE ((NTSTATUS)0xC000001F) #define STATUS_INVALID_FILE_FOR_SECTION ((NTSTATUS)0xC0000020) @@ -250,8 +312,8 @@ #define STATUS_ACCESS_DENIED ((NTSTATUS)0xC0000022) #define STATUS_BUFFER_TOO_SMALL ((NTSTATUS)0xC0000023) #define STATUS_OBJECT_TYPE_MISMATCH ((NTSTATUS)0xC0000024) -#define STATUS_NONCONTINUABLE_EXCEPTION ((NTSTATUS)0xC0000025) -#define STATUS_INVALID_DISPOSITION ((NTSTATUS)0xC0000026) +//#define STATUS_NONCONTINUABLE_EXCEPTION ((NTSTATUS)0xC0000025) +//#define STATUS_INVALID_DISPOSITION ((NTSTATUS)0xC0000026) #define STATUS_UNWIND ((NTSTATUS)0xC0000027) #define STATUS_BAD_STACK ((NTSTATUS)0xC0000028) #define STATUS_INVALID_UNWIND_TARGET ((NTSTATUS)0xC0000029) @@ -352,17 +414,17 @@ #define STATUS_RESOURCE_DATA_NOT_FOUND ((NTSTATUS)0xC0000089) #define STATUS_RESOURCE_TYPE_NOT_FOUND ((NTSTATUS)0xC000008A) #define STATUS_RESOURCE_NAME_NOT_FOUND ((NTSTATUS)0xC000008B) -#define STATUS_ARRAY_BOUNDS_EXCEEDED ((NTSTATUS)0xC000008C) -#define STATUS_FLOAT_DENORMAL_OPERAND ((NTSTATUS)0xC000008D) -#define STATUS_FLOAT_DIVIDE_BY_ZERO ((NTSTATUS)0xC000008E) -#define STATUS_FLOAT_INEXACT_RESULT ((NTSTATUS)0xC000008F) -#define STATUS_FLOAT_INVALID_OPERATION ((NTSTATUS)0xC0000090) -#define STATUS_FLOAT_OVERFLOW ((NTSTATUS)0xC0000091) -#define STATUS_FLOAT_STACK_CHECK ((NTSTATUS)0xC0000092) -#define STATUS_FLOAT_UNDERFLOW ((NTSTATUS)0xC0000093) -#define STATUS_INTEGER_DIVIDE_BY_ZERO ((NTSTATUS)0xC0000094) -#define STATUS_INTEGER_OVERFLOW ((NTSTATUS)0xC0000095) -#define STATUS_PRIVILEGED_INSTRUCTION ((NTSTATUS)0xC0000096) +//#define STATUS_ARRAY_BOUNDS_EXCEEDED ((NTSTATUS)0xC000008C) +//#define STATUS_FLOAT_DENORMAL_OPERAND ((NTSTATUS)0xC000008D) +//#define STATUS_FLOAT_DIVIDE_BY_ZERO ((NTSTATUS)0xC000008E) +//#define STATUS_FLOAT_INEXACT_RESULT ((NTSTATUS)0xC000008F) +//#define STATUS_FLOAT_INVALID_OPERATION ((NTSTATUS)0xC0000090) +//#define STATUS_FLOAT_OVERFLOW ((NTSTATUS)0xC0000091) +//#define STATUS_FLOAT_STACK_CHECK ((NTSTATUS)0xC0000092) +//#define STATUS_FLOAT_UNDERFLOW ((NTSTATUS)0xC0000093) +//#define STATUS_INTEGER_DIVIDE_BY_ZERO ((NTSTATUS)0xC0000094) +//#define STATUS_INTEGER_OVERFLOW ((NTSTATUS)0xC0000095) +//#define STATUS_PRIVILEGED_INSTRUCTION ((NTSTATUS)0xC0000096) #define STATUS_TOO_MANY_PAGING_FILES ((NTSTATUS)0xC0000097) #define STATUS_FILE_INVALID ((NTSTATUS)0xC0000098) #define STATUS_ALLOTTED_SPACE_EXCEEDED ((NTSTATUS)0xC0000099) @@ -465,7 +527,7 @@ #define STATUS_INVALID_PARAMETER_12 ((NTSTATUS)0xC00000FA) #define STATUS_REDIRECTOR_NOT_STARTED ((NTSTATUS)0xC00000FB) #define STATUS_REDIRECTOR_STARTED ((NTSTATUS)0xC00000FC) -#define STATUS_STACK_OVERFLOW ((NTSTATUS)0xC00000FD) +//#define STATUS_STACK_OVERFLOW ((NTSTATUS)0xC00000FD) #define STATUS_NO_SUCH_PACKAGE ((NTSTATUS)0xC00000FE) #define STATUS_BAD_FUNCTION_TABLE ((NTSTATUS)0xC00000FF) #define STATUS_VARIABLE_NOT_FOUND ((NTSTATUS)0xC0000100) @@ -521,12 +583,12 @@ #define STATUS_LOGON_SERVER_CONFLICT ((NTSTATUS)0xC0000132) #define STATUS_TIME_DIFFERENCE_AT_DC ((NTSTATUS)0xC0000133) #define STATUS_SYNCHRONIZATION_REQUIRED ((NTSTATUS)0xC0000134) -#define STATUS_DLL_NOT_FOUND ((NTSTATUS)0xC0000135) +//#define STATUS_DLL_NOT_FOUND ((NTSTATUS)0xC0000135) #define STATUS_OPEN_FAILED ((NTSTATUS)0xC0000136) #define STATUS_IO_PRIVILEGE_FAILED ((NTSTATUS)0xC0000137) -#define STATUS_ORDINAL_NOT_FOUND ((NTSTATUS)0xC0000138) -#define STATUS_ENTRYPOINT_NOT_FOUND ((NTSTATUS)0xC0000139) -#define STATUS_CONTROL_C_EXIT ((NTSTATUS)0xC000013A) +//#define STATUS_ORDINAL_NOT_FOUND ((NTSTATUS)0xC0000138) +//#define STATUS_ENTRYPOINT_NOT_FOUND ((NTSTATUS)0xC0000139) +//#define STATUS_CONTROL_C_EXIT ((NTSTATUS)0xC000013A) #define STATUS_LOCAL_DISCONNECT ((NTSTATUS)0xC000013B) #define STATUS_REMOTE_DISCONNECT ((NTSTATUS)0xC000013C) #define STATUS_REMOTE_RESOURCES ((NTSTATUS)0xC000013D) @@ -534,7 +596,7 @@ #define STATUS_LINK_TIMEOUT ((NTSTATUS)0xC000013F) #define STATUS_INVALID_CONNECTION ((NTSTATUS)0xC0000140) #define STATUS_INVALID_ADDRESS ((NTSTATUS)0xC0000141) -#define STATUS_DLL_INIT_FAILED ((NTSTATUS)0xC0000142) +//#define STATUS_DLL_INIT_FAILED ((NTSTATUS)0xC0000142) #define STATUS_MISSING_SYSTEMFILE ((NTSTATUS)0xC0000143) #define STATUS_UNHANDLED_EXCEPTION ((NTSTATUS)0xC0000144) #define STATUS_APP_INIT_FAILURE ((NTSTATUS)0xC0000145) @@ -783,8 +845,8 @@ #define STATUS_DIRECTORY_SERVICE_REQUIRED ((NTSTATUS)0xC00002B1) #define STATUS_REPARSE_ATTRIBUTE_CONFLICT ((NTSTATUS)0xC00002B2) #define STATUS_CANT_ENABLE_DENY_ONLY ((NTSTATUS)0xC00002B3) -#define STATUS_FLOAT_MULTIPLE_FAULTS ((NTSTATUS)0xC00002B4) -#define STATUS_FLOAT_MULTIPLE_TRAPS ((NTSTATUS)0xC00002B5) +//#define STATUS_FLOAT_MULTIPLE_FAULTS ((NTSTATUS)0xC00002B4) +//#define STATUS_FLOAT_MULTIPLE_TRAPS ((NTSTATUS)0xC00002B5) #define STATUS_DEVICE_REMOVED ((NTSTATUS)0xC00002B6) #define STATUS_JOURNAL_DELETE_IN_PROGRESS ((NTSTATUS)0xC00002B7) #define STATUS_JOURNAL_NOT_ACTIVE ((NTSTATUS)0xC00002B8) @@ -797,7 +859,7 @@ #define STATUS_WMI_READ_ONLY ((NTSTATUS)0xC00002C6) #define STATUS_WMI_SET_FAILURE ((NTSTATUS)0xC00002C7) #define STATUS_COMMITMENT_MINIMUM ((NTSTATUS)0xC00002C8) -#define STATUS_REG_NAT_CONSUMPTION ((NTSTATUS)0xC00002C9) +//#define STATUS_REG_NAT_CONSUMPTION ((NTSTATUS)0xC00002C9) #define STATUS_TRANSPORT_FULL ((NTSTATUS)0xC00002CA) #define STATUS_DS_SAM_INIT_FAILURE ((NTSTATUS)0xC00002CB) #define STATUS_ONLY_IF_CONNECTED ((NTSTATUS)0xC00002CC) @@ -922,7 +984,7 @@ #define STATUS_DS_GROUP_CONVERSION_ERROR ((NTSTATUS)0xC0000406) #define STATUS_VOLSNAP_PREPARE_HIBERNATE ((NTSTATUS)0xC0000407) #define STATUS_USER2USER_REQUIRED ((NTSTATUS)0xC0000408) -#define STATUS_STACK_BUFFER_OVERRUN ((NTSTATUS)0xC0000409) +//#define STATUS_STACK_BUFFER_OVERRUN ((NTSTATUS)0xC0000409) #define STATUS_NO_S4U_PROT_SUPPORT ((NTSTATUS)0xC000040A) #define STATUS_CROSSREALM_DELEGATION_FAILURE ((NTSTATUS)0xC000040B) #define STATUS_REVOCATION_OFFLINE_KDC ((NTSTATUS)0xC000040C) @@ -935,8 +997,8 @@ #define STATUS_AUTHENTICATION_FIREWALL_FAILED ((NTSTATUS)0xC0000413) #define STATUS_VDM_DISALLOWED ((NTSTATUS)0xC0000414) #define STATUS_HUNG_DISPLAY_DRIVER_THREAD ((NTSTATUS)0xC0000415) -#define STATUS_INVALID_CRUNTIME_PARAMETER ((NTSTATUS)0xC0000417) -#define STATUS_ASSERTION_FAILURE ((NTSTATUS)0xC0000420L) +//#define STATUS_INVALID_CRUNTIME_PARAMETER ((NTSTATUS)0xC0000417) +//#define STATUS_ASSERTION_FAILURE ((NTSTATUS)0xC0000420L) #define STATUS_CALLBACK_POP_STACK ((NTSTATUS)0xC0000423) #define STATUS_WOW_ASSERTION ((NTSTATUS)0xC0009898) @@ -1156,8 +1218,8 @@ #define STATUS_SXS_THREAD_QUERIES_DISABLED ((NTSTATUS)0xC015000B) #define STATUS_SXS_ASSEMBLY_MISSING ((NTSTATUS)0xC015000C) #define STATUS_SXS_PROCESS_DEFAULT_ALREADY_SET ((NTSTATUS)0xC015000E) -#define STATUS_SXS_EARLY_DEACTIVATION ((NTSTATUS)0xC015000F) -#define STATUS_SXS_INVALID_DEACTIVATION ((NTSTATUS)0xC0150010) +//#define STATUS_SXS_EARLY_DEACTIVATION ((NTSTATUS)0xC015000F) +//#define STATUS_SXS_INVALID_DEACTIVATION ((NTSTATUS)0xC0150010) #define STATUS_SXS_MULTIPLE_DEACTIVATION ((NTSTATUS)0xC0150011) #define STATUS_SXS_SYSTEM_DEFAULT_ACTIVATION_CONTEXT_EMPTY ((NTSTATUS)0xC0150012) #define STATUS_SXS_PROCESS_TERMINATION_REQUESTED ((NTSTATUS)0xC0150013) @@ -1182,6 +1244,57 @@ #define STATUS_GENERIC_COMMAND_FAILED ((NTSTATUS)0xC0150026) #define STATUS_SXS_FILE_HASH_MISSING ((NTSTATUS)0xC0150027) +/* Defined in winternl.h, always define since we do not include this header */ + +#define FILE_SUPERSEDE 0x00000000 +#define FILE_OPEN 0x00000001 +#define FILE_CREATE 0x00000002 +#define FILE_OPEN_IF 0x00000003 +#define FILE_OVERWRITE 0x00000004 +#define FILE_OVERWRITE_IF 0x00000005 +#define FILE_MAXIMUM_DISPOSITION 0x00000005 + +#define FILE_DIRECTORY_FILE 0x00000001 +#define FILE_WRITE_THROUGH 0x00000002 +#define FILE_SEQUENTIAL_ONLY 0x00000004 +#define FILE_NO_INTERMEDIATE_BUFFERING 0x00000008 + +#define FILE_SYNCHRONOUS_IO_ALERT 0x00000010 +#define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020 +#define FILE_NON_DIRECTORY_FILE 0x00000040 +#define FILE_CREATE_TREE_CONNECTION 0x00000080 + +#define FILE_COMPLETE_IF_OPLOCKED 0x00000100 +#define FILE_NO_EA_KNOWLEDGE 0x00000200 +#define FILE_OPEN_REMOTE_INSTANCE 0x00000400 +#define FILE_RANDOM_ACCESS 0x00000800 + +#define FILE_DELETE_ON_CLOSE 0x00001000 +#define FILE_OPEN_BY_FILE_ID 0x00002000 +#define FILE_OPEN_FOR_BACKUP_INTENT 0x00004000 +#define FILE_NO_COMPRESSION 0x00008000 + +#define FILE_OPEN_REQUIRING_OPLOCK 0x00010000 + +#define FILE_RESERVE_OPFILTER 0x00100000 +#define FILE_OPEN_REPARSE_POINT 0x00200000 +#define FILE_OPEN_NO_RECALL 0x00400000 +#define FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000 + +#define FILE_VALID_OPTION_FLAGS 0x00FFFFFF +#define FILE_VALID_PIPE_OPTION_FLAGS 0x00000032 +#define FILE_VALID_MAILSLOT_OPTION_FLAGS 0x00000032 +#define FILE_VALID_SET_FLAGS 0x00000036 + +#define FILE_SUPERSEDED 0x00000000 +#define FILE_OPENED 0x00000001 +#define FILE_CREATED 0x00000002 +#define FILE_OVERWRITTEN 0x00000003 +#define FILE_EXISTS 0x00000004 +#define FILE_DOES_NOT_EXIST 0x00000005 + +#ifndef _WIN32 + typedef struct _PEB PEB; typedef struct _PEB* PPEB; @@ -1261,40 +1374,6 @@ struct _TEB #define FILE_SHARE_WRITE 0x00000002 #define FILE_SHARE_DELETE 0x00000004 -#define FILE_DIRECTORY_FILE 0x00000001 -#define FILE_WRITE_THROUGH 0x00000002 -#define FILE_SEQUENTIAL_ONLY 0x00000004 -#define FILE_NO_INTERMEDIATE_BUFFERING 0x00000008 -#define FILE_SYNCHRONOUS_IO_ALERT 0x00000010 -#define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020 -#define FILE_NON_DIRECTORY_FILE 0x00000040 -#define FILE_CREATE_TREE_CONNECTION 0x00000080 -#define FILE_COMPLETE_IF_OPLOCKED 0x00000100 -#define FILE_NO_EA_KNOWLEDGE 0x00000200 -#define FILE_OPEN_REMOTE_INSTANCE 0x00000400 -#define FILE_RANDOM_ACCESS 0x00000800 -#define FILE_DELETE_ON_CLOSE 0x00001000 -#define FILE_OPEN_BY_FILE_ID 0x00002000 -#define FILE_OPEN_FOR_BACKUP_INTENT 0x00004000 -#define FILE_NO_COMPRESSION 0x00008000 -#define FILE_OPEN_REQUIRING_OPLOCK 0x00010000 -#define FILE_RESERVE_OPFILTER 0x00100000 -#define FILE_OPEN_REPARSE_POINT 0x00200000 -#define FILE_OPEN_NO_RECALL 0x00400000 -#define FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000 - -#define FILE_VALID_OPTION_FLAGS 0x00FFFFFF -#define FILE_VALID_PIPE_OPTION_FLAGS 0x00000032 -#define FILE_VALID_MAILSLOT_OPTION_FLAGS 0x00000032 -#define FILE_VALID_SET_FLAGS 0x00000036 - -#define FILE_SUPERSEDED 0x00000000 -#define FILE_OPENED 0x00000001 -#define FILE_CREATED 0x00000002 -#define FILE_OVERWRITTEN 0x00000003 -#define FILE_EXISTS 0x00000004 -#define FILE_DOES_NOT_EXIST 0x00000005 - typedef DWORD ACCESS_MASK; typedef ACCESS_MASK* PACCESS_MASK; diff --git a/winpr/include/winpr/synch.h b/winpr/include/winpr/synch.h index 136c0877a..45373ac00 100644 --- a/winpr/include/winpr/synch.h +++ b/winpr/include/winpr/synch.h @@ -29,6 +29,8 @@ #include #include +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/winpr/tools/makecert/CMakeLists.txt b/winpr/tools/makecert/CMakeLists.txt index 4089fd914..84386697a 100644 --- a/winpr/tools/makecert/CMakeLists.txt +++ b/winpr/tools/makecert/CMakeLists.txt @@ -25,12 +25,7 @@ set(${MODULE_PREFIX}_SRCS include_directories(${ZLIB_INCLUDE_DIRS}) include_directories(${OPENSSL_INCLUDE_DIR}) -add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS}) - -# This line compiles the static libraries with -fPIC to allow linking -# to shared libraries later on... -# TODO: Remove this non portable way of linking. -set_target_properties(${MODULE_NAME} PROPERTIES COMPILE_FLAGS "-fPIC") +add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS}) set(${MODULE_PREFIX}_LIBS ${ZLIB_LIBRARIES}