Update upstream source from tag 'upstream/2.8.1+dfsg1'
Update to upstream version '2.8.1+dfsg1'
with Debian dir 84624410bb
This commit is contained in:
commit
f37e46dc33
@ -85,7 +85,7 @@ if ($ENV{BUILD_NUMBER})
|
||||
endif()
|
||||
set(WITH_LIBRARY_VERSIONING "ON")
|
||||
|
||||
set(RAW_VERSION_STRING "2.8.0")
|
||||
set(RAW_VERSION_STRING "2.8.1")
|
||||
if(EXISTS "${CMAKE_SOURCE_DIR}/.source_tag")
|
||||
file(READ ${CMAKE_SOURCE_DIR}/.source_tag RAW_VERSION_STRING)
|
||||
elseif(USE_VERSION_FROM_GIT_TAG)
|
||||
@ -532,7 +532,6 @@ add_definitions(-DWINPR_EXPORTS -DFREERDP_EXPORTS)
|
||||
if(NOT IOS)
|
||||
check_include_files(fcntl.h HAVE_FCNTL_H)
|
||||
check_include_files(unistd.h HAVE_UNISTD_H)
|
||||
check_include_files(execinfo.h HAVE_EXECINFO_H)
|
||||
check_include_files(inttypes.h HAVE_INTTYPES_H)
|
||||
check_include_files(sys/modem.h HAVE_SYS_MODEM_H)
|
||||
check_include_files(sys/filio.h HAVE_SYS_FILIO_H)
|
||||
@ -540,6 +539,18 @@ if(NOT IOS)
|
||||
check_include_files(sys/strtio.h HAVE_SYS_STRTIO_H)
|
||||
check_include_files(sys/select.h HAVE_SYS_SELECT_H)
|
||||
check_include_files(syslog.h HAVE_SYSLOG_H)
|
||||
check_include_files(execinfo.h HAVE_EXECINFO_HEADER)
|
||||
if (HAVE_EXECINFO_HEADER)
|
||||
check_symbol_exists(backtrace execinfo.h HAVE_EXECINFO_BACKTRACE)
|
||||
check_symbol_exists(backtrace_symbols execinfo.h HAVE_EXECINFO_BACKTRACE_SYMBOLS)
|
||||
check_symbol_exists(backtrace_symbols_fd execinfo.h HAVE_EXECINFO_BACKTRACE_SYMBOLS_FD)
|
||||
|
||||
# Some implementations (e.g. Android NDK API < 33) provide execinfo.h but do not define
|
||||
# the backtrace functions. Disable detection for these cases
|
||||
if (HAVE_EXECINFO_BACKTRACE AND HAVE_EXECINFO_BACKTRACE_SYMBOLS AND HAVE_EXECINFO_BACKTRACE_SYMBOLS_FD)
|
||||
set(HAVE_EXECINFO_H ON)
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
set(HAVE_FCNTL_H 1)
|
||||
set(HAVE_UNISTD_H 1)
|
||||
@ -861,18 +872,23 @@ if (WITH_DSP_FFMPEG)
|
||||
# Deactivate FFmpeg backend for sound, if the version is too old.
|
||||
# See libfreerdp/codec/dsp_ffmpeg.h
|
||||
file(STRINGS "${AVCODEC_INCLUDE_DIR}/libavcodec/version.h" AV_VERSION_FILE REGEX "LIBAVCODEC_VERSION_M[A-Z]+[\t ]*[0-9]+")
|
||||
if (EXISTS "${AVCODEC_INCLUDE_DIR}/libavcodec/version_major.h")
|
||||
file(STRINGS "${AVCODEC_INCLUDE_DIR}/libavcodec/version_major.h" AV_VERSION_FILE2 REGEX "LIBAVCODEC_VERSION_M[A-Z]+[\t ]*[0-9]+")
|
||||
list(APPEND AV_VERSION_FILE ${AV_VERSION_FILE2})
|
||||
endif()
|
||||
|
||||
FOREACH(item ${AV_VERSION_FILE})
|
||||
STRING(REGEX MATCH "LIBAVCODEC_VERSION_M[A-Z]+[\t ]*[0-9]+" litem ${item})
|
||||
IF(litem)
|
||||
string(REGEX REPLACE "[ \t]+" ";" VSPLIT_LINE ${litem})
|
||||
list(LENGTH VSPLIT_LINE VSPLIT_LINE_LEN)
|
||||
if (NOT "${VSPLIT_LINE_LEN}" EQUAL "2")
|
||||
message(ERROR "invalid entry in libavcodec version header ${item}")
|
||||
endif(NOT "${VSPLIT_LINE_LEN}" EQUAL "2")
|
||||
list(GET VSPLIT_LINE 0 VNAME)
|
||||
list(GET VSPLIT_LINE 1 VVALUE)
|
||||
set(${VNAME} ${VVALUE})
|
||||
ENDIF(litem)
|
||||
IF(litem)
|
||||
string(REGEX REPLACE "[ \t]+" ";" VSPLIT_LINE ${litem})
|
||||
list(LENGTH VSPLIT_LINE VSPLIT_LINE_LEN)
|
||||
if (NOT "${VSPLIT_LINE_LEN}" EQUAL "2")
|
||||
message(ERROR "invalid entry in libavcodec version header ${item}")
|
||||
endif(NOT "${VSPLIT_LINE_LEN}" EQUAL "2")
|
||||
list(GET VSPLIT_LINE 0 VNAME)
|
||||
list(GET VSPLIT_LINE 1 VVALUE)
|
||||
set(${VNAME} ${VVALUE})
|
||||
ENDIF(litem)
|
||||
ENDFOREACH(item ${AV_VERSION_FILE})
|
||||
|
||||
set(AVCODEC_VERSION "${LIBAVCODEC_VERSION_MAJOR}.${LIBAVCODEC_VERSION_MINOR}.${LIBAVCODEC_VERSION_MICRO}")
|
||||
|
||||
18
ChangeLog
18
ChangeLog
@ -1,3 +1,21 @@
|
||||
# 2022-10-12 Version 2.8.1
|
||||
|
||||
Notewhorth changes:
|
||||
* Fixed CVE-2022-39282
|
||||
* Fixed CVE-2022-39283
|
||||
* Added missing commit for backported #8041: Remove ALAW/ULAW codecs from linux backends (unreliable)
|
||||
* Added hash checks for android build script dependencies
|
||||
|
||||
Fixed issues:
|
||||
* Backported #8190: Fix build break with newer FFMPEG versions
|
||||
* Backported #8234: Updated flatpak with build script
|
||||
* Backported #8210: Better execinfo support check for android
|
||||
* Backported #7708: Header now defines DumpThreadHandles
|
||||
* Backported #8176: Check fullscreen state and not setting
|
||||
* Backported #8236: Send resize on window state change
|
||||
* Backported #7611: Audin macOS monterey fix
|
||||
* Backported #8291: Android build script update
|
||||
|
||||
# 2022-07-28 Version 2.8.0
|
||||
|
||||
Noteworthy changes:
|
||||
|
||||
@ -242,10 +242,6 @@ static BOOL audin_alsa_format_supported(IAudinDevice* device, const AUDIO_FORMAT
|
||||
|
||||
break;
|
||||
|
||||
case WAVE_FORMAT_ALAW:
|
||||
case WAVE_FORMAT_MULAW:
|
||||
return TRUE;
|
||||
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -154,12 +154,16 @@ static UINT audin_mac_set_format(IAudinDevice *device, const AUDIO_FORMAT *forma
|
||||
if (format->wBitsPerSample == 0)
|
||||
mac->audioFormat.mBitsPerChannel = 16;
|
||||
|
||||
mac->audioFormat.mBytesPerFrame = 0;
|
||||
mac->audioFormat.mBytesPerPacket = 0;
|
||||
mac->audioFormat.mChannelsPerFrame = mac->format.nChannels;
|
||||
mac->audioFormat.mFramesPerPacket = 1;
|
||||
|
||||
mac->audioFormat.mBytesPerFrame =
|
||||
mac->audioFormat.mChannelsPerFrame * (mac->audioFormat.mBitsPerChannel / 8);
|
||||
mac->audioFormat.mBytesPerPacket =
|
||||
mac->audioFormat.mBytesPerFrame * mac->audioFormat.mFramesPerPacket;
|
||||
|
||||
mac->audioFormat.mFormatFlags = audin_mac_get_flags_for_format(format);
|
||||
mac->audioFormat.mFormatID = audin_mac_get_format(format);
|
||||
mac->audioFormat.mFramesPerPacket = 1;
|
||||
mac->audioFormat.mReserved = 0;
|
||||
mac->audioFormat.mSampleRate = mac->format.nSamplesPerSec;
|
||||
return CHANNEL_RC_OK;
|
||||
|
||||
@ -113,10 +113,6 @@ static BOOL audin_oss_format_supported(IAudinDevice* device, const AUDIO_FORMAT*
|
||||
|
||||
break;
|
||||
|
||||
case WAVE_FORMAT_ALAW:
|
||||
case WAVE_FORMAT_MULAW:
|
||||
return TRUE;
|
||||
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -236,17 +236,6 @@ static BOOL audin_pulse_format_supported(IAudinDevice* device, const AUDIO_FORMA
|
||||
|
||||
break;
|
||||
|
||||
case WAVE_FORMAT_ALAW: /* A-LAW */
|
||||
case WAVE_FORMAT_MULAW: /* U-LAW */
|
||||
if (format->cbSize == 0 && (format->nSamplesPerSec <= PA_RATE_MAX) &&
|
||||
(format->wBitsPerSample == 8) &&
|
||||
(format->nChannels >= 1 && format->nChannels <= PA_CHANNELS_MAX))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -159,7 +159,7 @@ static UINT parallel_process_irp_read(PARALLEL_DEVICE* parallel, IRP* irp)
|
||||
return ERROR_INVALID_DATA;
|
||||
Stream_Read_UINT32(irp->input, Length);
|
||||
Stream_Read_UINT64(irp->input, Offset);
|
||||
buffer = (BYTE*)malloc(Length);
|
||||
buffer = (BYTE*)calloc(Length, sizeof(BYTE));
|
||||
|
||||
if (!buffer)
|
||||
{
|
||||
@ -178,6 +178,7 @@ static UINT parallel_process_irp_read(PARALLEL_DEVICE* parallel, IRP* irp)
|
||||
}
|
||||
else
|
||||
{
|
||||
Length = status;
|
||||
}
|
||||
|
||||
Stream_Write_UINT32(irp->output, Length);
|
||||
|
||||
@ -195,9 +195,12 @@ static BOOL tsmf_ffmpeg_init_stream(ITSMFDecoder* decoder, const TS_AM_MEDIA_TYP
|
||||
if (media_type->SubType == TSMF_SUB_TYPE_AVC1 &&
|
||||
media_type->FormatType == TSMF_FORMAT_TYPE_MPEG2VIDEOINFO)
|
||||
{
|
||||
size_t required = 6;
|
||||
/* The extradata format that FFmpeg uses is following CodecPrivate in Matroska.
|
||||
See http://haali.su/mkv/codecs.pdf */
|
||||
p = mdecoder->codec_context->extradata;
|
||||
if (mdecoder->codec_context->extradata_size < required)
|
||||
return FALSE;
|
||||
*p++ = 1; /* Reserved? */
|
||||
*p++ = media_type->ExtraData[8]; /* Profile */
|
||||
*p++ = 0; /* Profile */
|
||||
@ -206,17 +209,28 @@ static BOOL tsmf_ffmpeg_init_stream(ITSMFDecoder* decoder, const TS_AM_MEDIA_TYP
|
||||
*p++ = 0xe0 | 0x01; /* Reserved | #sps */
|
||||
s = media_type->ExtraData + 20;
|
||||
size = ((UINT32)(*s)) * 256 + ((UINT32)(*(s + 1)));
|
||||
required += size + 2;
|
||||
if (mdecoder->codec_context->extradata_size < required)
|
||||
return FALSE;
|
||||
memcpy(p, s, size + 2);
|
||||
s += size + 2;
|
||||
p += size + 2;
|
||||
required++;
|
||||
if (mdecoder->codec_context->extradata_size < required)
|
||||
return FALSE;
|
||||
*p++ = 1; /* #pps */
|
||||
size = ((UINT32)(*s)) * 256 + ((UINT32)(*(s + 1)));
|
||||
required += size + 2;
|
||||
if (mdecoder->codec_context->extradata_size < required)
|
||||
return FALSE;
|
||||
memcpy(p, s, size + 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
memcpy(mdecoder->codec_context->extradata, media_type->ExtraData,
|
||||
media_type->ExtraDataSize);
|
||||
if (mdecoder->codec_context->extradata_size < media_type->ExtraDataSize + 8)
|
||||
return FALSE;
|
||||
memset(mdecoder->codec_context->extradata + media_type->ExtraDataSize, 0, 8);
|
||||
}
|
||||
}
|
||||
@ -245,6 +259,9 @@ static BOOL tsmf_ffmpeg_set_format(ITSMFDecoder* decoder, TS_AM_MEDIA_TYPE* medi
|
||||
{
|
||||
TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*)decoder;
|
||||
|
||||
WINPR_ASSERT(mdecoder);
|
||||
WINPR_ASSERT(media_type);
|
||||
|
||||
switch (media_type->MajorType)
|
||||
{
|
||||
case TSMF_MAJOR_TYPE_VIDEO:
|
||||
@ -297,6 +314,9 @@ static BOOL tsmf_ffmpeg_set_format(ITSMFDecoder* decoder, TS_AM_MEDIA_TYPE* medi
|
||||
http://msdn.microsoft.com/en-us/library/dd757806.aspx */
|
||||
if (media_type->ExtraData)
|
||||
{
|
||||
if (media_type->ExtraDataSize < 12)
|
||||
return FALSE;
|
||||
|
||||
media_type->ExtraData += 12;
|
||||
media_type->ExtraDataSize -= 12;
|
||||
}
|
||||
|
||||
@ -420,6 +420,8 @@ static BOOL tsmf_gstreamer_set_format(ITSMFDecoder* decoder, TS_AM_MEDIA_TYPE* m
|
||||
http://msdn.microsoft.com/en-us/library/dd757806.aspx */
|
||||
if (media_type->ExtraData)
|
||||
{
|
||||
if (media_type->ExtraDataSize < 12)
|
||||
return FALSE;
|
||||
media_type->ExtraData += 12;
|
||||
media_type->ExtraDataSize -= 12;
|
||||
}
|
||||
|
||||
@ -386,7 +386,12 @@ static BOOL tsmf_read_format_type(TS_AM_MEDIA_TYPE* mediatype, wStream* s, UINT3
|
||||
|
||||
if (cbFormat > 176)
|
||||
{
|
||||
mediatype->ExtraDataSize = cbFormat - 176;
|
||||
const size_t nsize = cbFormat - 176;
|
||||
if (mediatype->ExtraDataSize < nsize)
|
||||
return FALSE;
|
||||
if (!Stream_CheckAndLogRequiredLength(TAG, s, nsize))
|
||||
return FALSE;
|
||||
mediatype->ExtraDataSize = nsize;
|
||||
mediatype->ExtraData = Stream_Pointer(s);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -69,16 +69,20 @@ UINT tsmf_ifman_rim_exchange_capability_request(TSMF_IFMAN* ifman)
|
||||
*/
|
||||
UINT tsmf_ifman_exchange_capability_request(TSMF_IFMAN* ifman)
|
||||
{
|
||||
UINT32 i;
|
||||
UINT32 v;
|
||||
UINT32 pos;
|
||||
UINT32 CapabilityType;
|
||||
UINT32 cbCapabilityLength;
|
||||
UINT32 numHostCapabilities;
|
||||
UINT32 i = 0;
|
||||
UINT32 v = 0;
|
||||
UINT32 pos = 0;
|
||||
UINT32 CapabilityType = 0;
|
||||
UINT32 cbCapabilityLength = 0;
|
||||
UINT32 numHostCapabilities = 0;
|
||||
|
||||
WINPR_ASSERT(ifman);
|
||||
if (!Stream_EnsureRemainingCapacity(ifman->output, ifman->input_size + 4))
|
||||
return ERROR_OUTOFMEMORY;
|
||||
|
||||
if (Stream_GetRemainingLength(ifman->input) < ifman->input_size)
|
||||
return ERROR_INVALID_DATA;
|
||||
|
||||
pos = Stream_GetPosition(ifman->output);
|
||||
Stream_Copy(ifman->input, ifman->output, ifman->input_size);
|
||||
Stream_SetPosition(ifman->output, pos);
|
||||
|
||||
@ -930,6 +930,8 @@ static UINT video_data_on_data_received(IWTSVirtualChannelCallback* pChannelCall
|
||||
Stream_Read_UINT16(s, data.PacketsInSample);
|
||||
Stream_Read_UINT32(s, data.SampleNumber);
|
||||
Stream_Read_UINT32(s, data.cbSample);
|
||||
if (!Stream_CheckAndLogRequiredLength(TAG, s, data.cbSample))
|
||||
return ERROR_INVALID_DATA;
|
||||
data.pSample = Stream_Pointer(s);
|
||||
|
||||
/*
|
||||
|
||||
@ -93,7 +93,7 @@ static BOOL xf_update_last_sent(xfDispContext* xfDisp)
|
||||
|
||||
static BOOL xf_disp_sendResize(xfDispContext* xfDisp)
|
||||
{
|
||||
DISPLAY_CONTROL_MONITOR_LAYOUT layout;
|
||||
DISPLAY_CONTROL_MONITOR_LAYOUT layout = { 0 };
|
||||
xfContext* xfc;
|
||||
rdpSettings* settings;
|
||||
|
||||
@ -242,7 +242,24 @@ static void xf_disp_OnTimer(void* context, TimerEventArgs* e)
|
||||
if (!xf_disp_check_context(context, &xfc, &xfDisp, &settings))
|
||||
return;
|
||||
|
||||
if (!xfDisp->activated || settings->Fullscreen)
|
||||
if (!xfDisp->activated || xfc->fullscreen)
|
||||
return;
|
||||
|
||||
xf_disp_sendResize(xfDisp);
|
||||
}
|
||||
|
||||
static void xf_disp_OnWindowStateChange(void* context, const WindowStateChangeEventArgs* e)
|
||||
{
|
||||
xfContext* xfc;
|
||||
xfDispContext* xfDisp;
|
||||
rdpSettings* settings;
|
||||
|
||||
WINPR_UNUSED(e);
|
||||
|
||||
if (!xf_disp_check_context(context, &xfc, &xfDisp, &settings))
|
||||
return;
|
||||
|
||||
if (!xfDisp->activated || !xfc->fullscreen)
|
||||
return;
|
||||
|
||||
xf_disp_sendResize(xfDisp);
|
||||
@ -274,6 +291,7 @@ xfDispContext* xf_disp_new(xfContext* xfc)
|
||||
PubSub_SubscribeActivated(xfc->context.pubSub, xf_disp_OnActivated);
|
||||
PubSub_SubscribeGraphicsReset(xfc->context.pubSub, xf_disp_OnGraphicsReset);
|
||||
PubSub_SubscribeTimer(xfc->context.pubSub, xf_disp_OnTimer);
|
||||
PubSub_SubscribeWindowStateChange(xfc->context.pubSub, xf_disp_OnWindowStateChange);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -287,6 +305,7 @@ void xf_disp_free(xfDispContext* disp)
|
||||
PubSub_UnsubscribeActivated(disp->xfc->context.pubSub, xf_disp_OnActivated);
|
||||
PubSub_UnsubscribeGraphicsReset(disp->xfc->context.pubSub, xf_disp_OnGraphicsReset);
|
||||
PubSub_UnsubscribeTimer(disp->xfc->context.pubSub, xf_disp_OnTimer);
|
||||
PubSub_UnsubscribeWindowStateChange(disp->xfc->context.pubSub, xf_disp_OnWindowStateChange);
|
||||
}
|
||||
|
||||
free(disp);
|
||||
|
||||
@ -57,7 +57,7 @@ if (NOT WIN32)
|
||||
endif()
|
||||
|
||||
# Soname versioning
|
||||
set(RAW_VERSION_STRING "2.8.0")
|
||||
set(RAW_VERSION_STRING "2.8.1")
|
||||
if(EXISTS "${CMAKE_SOURCE_DIR}/.source_tag")
|
||||
file(READ ${CMAKE_SOURCE_DIR}/.source_tag RAW_VERSION_STRING)
|
||||
elseif(USE_VERSION_FROM_GIT_TAG)
|
||||
@ -86,6 +86,18 @@ if(NOT IOS)
|
||||
check_include_files(stdbool.h WINPR_HAVE_STDBOOL_H)
|
||||
check_include_files(stdint.h WINPR_HAVE_STDINT_H)
|
||||
check_include_files(inttypes.h WINPR_HAVE_INTTYPES_H)
|
||||
check_include_files(execinfo.h HAVE_EXECINFO_HEADER)
|
||||
if (HAVE_EXECINFO_HEADER)
|
||||
check_symbol_exists(backtrace execinfo.h HAVE_EXECINFO_BACKTRACE)
|
||||
check_symbol_exists(backtrace_symbols execinfo.h HAVE_EXECINFO_BACKTRACE_SYMBOLS)
|
||||
check_symbol_exists(backtrace_symbols_fd execinfo.h HAVE_EXECINFO_BACKTRACE_SYMBOLS_FD)
|
||||
|
||||
# Some implementations (e.g. Android NDK API < 33) provide execinfo.h but do not define
|
||||
# the backtrace functions. Disable detection for these cases
|
||||
if (HAVE_EXECINFO_BACKTRACE AND HAVE_EXECINFO_BACKTRACE_SYMBOLS AND HAVE_EXECINFO_BACKTRACE_SYMBOLS_FD)
|
||||
set(HAVE_EXECINFO_H ON)
|
||||
endif()
|
||||
endif()
|
||||
else(NOT IOS)
|
||||
set(WINPR_HAVE_STDBOOL_H 1)
|
||||
set(WINPR_HAVE_STDINT_H 1)
|
||||
@ -107,7 +119,6 @@ else()
|
||||
if(NOT IOS)
|
||||
check_include_files(fcntl.h HAVE_FCNTL_H)
|
||||
check_include_files(unistd.h HAVE_UNISTD_H)
|
||||
check_include_files(execinfo.h HAVE_EXECINFO_H)
|
||||
check_include_files(inttypes.h HAVE_INTTYPES_H)
|
||||
check_include_files(sys/modem.h HAVE_SYS_MODEM_H)
|
||||
check_include_files(sys/filio.h HAVE_SYS_FILIO_H)
|
||||
|
||||
@ -40,39 +40,39 @@
|
||||
|
||||
#ifndef _strtoui64
|
||||
#define _strtoui64 strtoull
|
||||
#endif
|
||||
#endif /* _strtoui64 */
|
||||
|
||||
#ifndef _strtoi64
|
||||
#define _strtoi64 strtoll
|
||||
#endif
|
||||
#endif /* _strtoi64 */
|
||||
|
||||
#ifndef _rotl
|
||||
static INLINE UINT32 _rotl(UINT32 value, int shift)
|
||||
{
|
||||
return (value << shift) | (value >> (32 - shift));
|
||||
}
|
||||
#endif
|
||||
#endif /* _rotl */
|
||||
|
||||
#ifndef _rotl64
|
||||
static INLINE UINT64 _rotl64(UINT64 value, int shift)
|
||||
{
|
||||
return (value << shift) | (value >> (64 - shift));
|
||||
}
|
||||
#endif
|
||||
#endif /* _rotl64 */
|
||||
|
||||
#ifndef _rotr
|
||||
static INLINE UINT32 _rotr(UINT32 value, int shift)
|
||||
{
|
||||
return (value >> shift) | (value << (32 - shift));
|
||||
}
|
||||
#endif
|
||||
#endif /* _rotr */
|
||||
|
||||
#ifndef _rotr64
|
||||
static INLINE UINT64 _rotr64(UINT64 value, int shift)
|
||||
{
|
||||
return (value >> shift) | (value << (64 - shift));
|
||||
}
|
||||
#endif
|
||||
#endif /* _rotr64 */
|
||||
|
||||
#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2))
|
||||
|
||||
@ -95,7 +95,7 @@ static INLINE UINT64 _byteswap_uint64(UINT64 _val)
|
||||
((_val) >> 56));
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* (__GNUC__ > 4) || ... */
|
||||
|
||||
#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8))
|
||||
|
||||
@ -108,7 +108,7 @@ static INLINE UINT16 _byteswap_ushort(UINT16 _val)
|
||||
return (((_val) >> 8) | ((_val) << 8));
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* (__GNUC__ > 4) || ... */
|
||||
|
||||
#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
|
||||
#define MoveMemory(Destination, Source, Length) memmove((Destination), (Source), (Length))
|
||||
@ -131,7 +131,7 @@ extern "C"
|
||||
#ifndef _ERRNO_T_DEFINED
|
||||
#define _ERRNO_T_DEFINED
|
||||
typedef int errno_t;
|
||||
#endif
|
||||
#endif /* _ERRNO_T_DEFINED */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
@ -166,6 +166,6 @@ extern "C"
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif /* _WIN32 */
|
||||
|
||||
#endif /* WINPR_CRT_H */
|
||||
|
||||
@ -78,7 +78,7 @@ extern "C"
|
||||
#define _wcschr wcschr
|
||||
#define _wcsrchr wcsrchr
|
||||
|
||||
#endif
|
||||
#endif /* _WIN32 */
|
||||
|
||||
#if !defined(_WIN32) || defined(_UWP)
|
||||
|
||||
|
||||
@ -248,10 +248,7 @@ extern "C"
|
||||
/* CommandLineToArgvA is not present in the original Windows API, WinPR always exports it */
|
||||
|
||||
WINPR_API LPSTR* CommandLineToArgvA(LPCSTR lpCmdLine, int* pNumArgs);
|
||||
|
||||
#if defined(WITH_DEBUG_THREADS)
|
||||
WINPR_API VOID DumpThreadHandles(void);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@ -242,4 +242,4 @@ void _aligned_free(void* memblock)
|
||||
free(pMem->base_addr);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* _WIN32 */
|
||||
|
||||
@ -15,7 +15,13 @@ int TestThreadCreateProcess(int argc, char* argv[])
|
||||
BOOL status;
|
||||
DWORD exitCode;
|
||||
LPCTSTR lpApplicationName;
|
||||
LPTSTR lpCommandLine;
|
||||
|
||||
#ifdef _WIN32
|
||||
TCHAR lpCommandLine[200] = _T("cmd /C set");
|
||||
#else
|
||||
TCHAR lpCommandLine[200] = _T("printenv");
|
||||
#endif
|
||||
|
||||
LPSECURITY_ATTRIBUTES lpProcessAttributes;
|
||||
LPSECURITY_ATTRIBUTES lpThreadAttributes;
|
||||
BOOL bInheritHandles;
|
||||
@ -36,12 +42,6 @@ int TestThreadCreateProcess(int argc, char* argv[])
|
||||
|
||||
lpApplicationName = NULL;
|
||||
|
||||
#ifdef _WIN32
|
||||
lpCommandLine = _T("cmd /C set");
|
||||
#else
|
||||
lpCommandLine = _T("printenv");
|
||||
#endif
|
||||
|
||||
lpProcessAttributes = NULL;
|
||||
lpThreadAttributes = NULL;
|
||||
bInheritHandles = FALSE;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user