diff --git a/winpr/libwinpr/rpc/ndr_private.h b/winpr/libwinpr/rpc/ndr_private.h index 357857e52..489d565c5 100644 --- a/winpr/libwinpr/rpc/ndr_private.h +++ b/winpr/libwinpr/rpc/ndr_private.h @@ -35,11 +35,11 @@ extern const NDR_TYPE_MARSHALL_ROUTINE pfnMarshallRoutines[]; extern const NDR_TYPE_UNMARSHALL_ROUTINE pfnUnmarshallRoutines[]; extern const NDR_TYPE_FREE_ROUTINE pfnFreeRoutines[]; -extern const char SimpleTypeAlignment[]; -extern const char SimpleTypeBufferSize[]; -extern const char SimpleTypeMemorySize[]; +extern const unsigned char SimpleTypeAlignment[]; +extern const unsigned char SimpleTypeBufferSize[]; +extern const unsigned char SimpleTypeMemorySize[]; -extern const char NdrTypeFlags[]; +extern const unsigned char NdrTypeFlags[]; extern const char* FC_TYPE_STRINGS[]; #include "ndr_correlation.h" diff --git a/winpr/libwinpr/rpc/ndr_simple.c b/winpr/libwinpr/rpc/ndr_simple.c index 46af05478..7fdff8c21 100644 --- a/winpr/libwinpr/rpc/ndr_simple.c +++ b/winpr/libwinpr/rpc/ndr_simple.c @@ -31,7 +31,7 @@ #include "ndr_simple.h" #include "ndr_private.h" -const char SimpleTypeAlignment[] = +const unsigned char SimpleTypeAlignment[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x03, 0x03, 0x03, 0x07, 0x07, 0x01, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -51,7 +51,7 @@ const char SimpleTypeAlignment[] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const char SimpleTypeBufferSize[] = +const unsigned char SimpleTypeBufferSize[] = { 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x04, 0x04, 0x04, 0x08, 0x08, 0x02, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -71,7 +71,7 @@ const char SimpleTypeBufferSize[] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const char SimpleTypeMemorySize[] = +const unsigned char SimpleTypeMemorySize[] = { 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x04, 0x04, 0x04, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -91,7 +91,7 @@ const char SimpleTypeMemorySize[] = 0x92, 0x9D, 0x3A, 0x75, 0x92, 0x9D, 0x3A, 0x75, 0x92, 0x9D, 0x3A, 0x75, 0x92, 0x9D, 0x3A, 0x75, }; -const char NdrTypeFlags[] = +const unsigned char NdrTypeFlags[] = { 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x08, 0x08, 0x08, 0x08, 0x08, @@ -111,17 +111,17 @@ const char NdrTypeFlags[] = 0xAD, 0xAD, 0x9B, 0xBA, 0x9B, 0x9B, 0x0D, 0xB9, 0xAD, 0x19, 0x19, 0xBA, 0xDB, 0x09, 0x86, 0xB1, }; -char NdrGetSimpleTypeBufferAlignment(unsigned char FormatChar) +unsigned char NdrGetSimpleTypeBufferAlignment(unsigned char FormatChar) { return SimpleTypeAlignment[FormatChar]; } -char NdrGetSimpleTypeBufferSize(unsigned char FormatChar) +unsigned char NdrGetSimpleTypeBufferSize(unsigned char FormatChar) { return SimpleTypeAlignment[FormatChar]; } -char NdrGetSimpleTypeMemorySize(unsigned char FormatChar) +unsigned char NdrGetSimpleTypeMemorySize(unsigned char FormatChar) { return SimpleTypeMemorySize[FormatChar]; } @@ -131,7 +131,8 @@ int NdrGetTypeFlags(unsigned char FormatChar) return NdrTypeFlags[FormatChar]; } -void NdrSimpleTypeBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat) +void NdrSimpleTypeBufferSize(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char* pMemory, PFORMAT_STRING pFormat) { switch (*pFormat) { @@ -184,19 +185,19 @@ void NdrSimpleTypeBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory } } -void NdrSimpleTypeMarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, unsigned char FormatChar) +void NdrSimpleTypeMarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, + unsigned char FormatChar) { - } -void NdrSimpleTypeUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, unsigned char FormatChar) +void NdrSimpleTypeUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char* pMemory, unsigned char FormatChar) { - } -void NdrSimpleTypeFree(PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat) +void NdrSimpleTypeFree(PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, + PFORMAT_STRING pFormat) { - } #endif diff --git a/winpr/libwinpr/rpc/ndr_simple.h b/winpr/libwinpr/rpc/ndr_simple.h index 67e387a7d..ceb3ec655 100644 --- a/winpr/libwinpr/rpc/ndr_simple.h +++ b/winpr/libwinpr/rpc/ndr_simple.h @@ -24,14 +24,18 @@ #ifndef _WIN32 -void NdrSimpleTypeBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat); -void NdrSimpleTypeMarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, unsigned char FormatChar); -void NdrSimpleTypeUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, unsigned char FormatChar); -void NdrSimpleTypeFree(PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat); +void NdrSimpleTypeBufferSize(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char* pMemory, PFORMAT_STRING pFormat); +void NdrSimpleTypeMarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, + unsigned char FormatChar); +void NdrSimpleTypeUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char* pMemory, unsigned char FormatChar); +void NdrSimpleTypeFree(PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, + PFORMAT_STRING pFormat); -char NdrGetSimpleTypeBufferAlignment(unsigned char FormatChar); -char NdrGetSimpleTypeBufferSize(unsigned char FormatChar); -char NdrGetSimpleTypeMemorySize(unsigned char FormatChar); +unsigned char NdrGetSimpleTypeBufferAlignment(unsigned char FormatChar); +unsigned char NdrGetSimpleTypeBufferSize(unsigned char FormatChar); +unsigned char NdrGetSimpleTypeMemorySize(unsigned char FormatChar); int NdrGetTypeFlags(unsigned char FormatChar); #endif