Commit Graph

1088 Commits

Author SHA1 Message Date
akallabeth
d87d598305 [winpr] add WINPR_ALIGN64 defines
Add defines to aling struct members to 8 bytes
2024-03-12 14:24:36 +01:00
Kai Pastor
f2f9c59b01 Disable WINPR_THREAD_POOL for mingw 7 2024-03-12 09:39:45 +01:00
Kai Pastor
47354c4519 Fix MSVC arm64 2024-03-12 08:40:42 +01:00
akallabeth
4732f379d4 [winpr,sysinfo] unify time function use
* Add new function winpr_GetTickCount64NS for high resolution tick
  count with (up to) nanosecond resolution
* Add new function winpr_GetUnixTimeNS for high resolution system time
  as nanoseconds since 1.1.1970
* Replace use of clock_gettime and gettimeofday in whole project with
  these new functions
* Add new macros WINPR_TIME_NS_TO_* and WINPR_TIME_NS_REM_* to convert
  the nano second count to less resolution or get the remainder in the
  desired resolution
2024-03-11 09:54:10 +01:00
akallabeth
b894199f72 [winpr,collections] add generic string clone functions
The ArrayList, HashTable, ... New functions require
void* (*fkt)(const void* ptr) type functions. Provide a generic wrapper
for CHAR and WCHAR strdup to eliminate warnings. Also export a
corresponding free function to avoid issues with runtime
differences.
2024-02-15 11:49:16 +01:00
Armin Novak
70f12ac871 [winpr,image] use fuzzy compare
* Add winpr_image_equal_ex to allow comparison of lossy compressed
  formats, ignoring color depth and alpha
* Adjust tests to utilize winpr_image_equal_ex
2024-02-14 19:04:50 +01:00
akallabeth
0d68cb4f42 [build,attr] fix WINPR_ATTR_MALLOC
* do not use this attribute if the free function takes pointer to pointer
* audio_format_new must be freed by audio_formats_free
2024-02-12 10:23:27 +01:00
akallabeth
b5660035ae [winpr,image] add support for WebP, JPEG and libpng 2024-02-07 10:04:08 +01:00
akallabeth
c415ec1110 [winpr,utils] use strerror_s or strerror_r
prefer to use strerror_s over strerror_r and strerror to convert errno
to strings.
2024-02-06 15:45:47 +01:00
akallabeth
ba8cf8cf21 [build] fix Wmismatched-deallocator warnings
With custom malloc function attributes the fail path in the _New
functions produces warnings due to allocator mismatches. Silence them.
2024-02-05 08:16:55 +01:00
akallabeth
bb42d425ed [gcc,clang] add support for attribute(malloc)
Mark all malloc like functions and add their appropriate free function
to let the compiler complain on mismatches
2024-02-02 15:10:40 +01:00
Armin Novak
6f723e9f4d [winpr,crt] add InitializeConstWCharFromUtf8 2023-12-12 19:36:54 +01:00
Armin Novak
30494d0c93 [winpr,crt] add return to ByteSwapUnicode 2023-12-12 19:36:54 +01:00
r-a-sattarov
dcefd4f861 E2K: added initial support of MCST Elbrus 2000 CPU architecture
Ref: https://en.wikipedia.org/wiki/Elbrus_(computer)
2023-12-04 11:51:46 +01:00
akallabeth
1b31852d32 [git] remove .gitignore
we do no longer allow in source builds, so remove all the .gitignore
files just hiding generated files
2023-11-28 12:14:55 +01:00
akallabeth
e3a84921de [core,gateway] fix TSG_PACKET_TYPE_QUARENC_RESPONSE
parsing of TSG_PACKET_TYPE_QUARENC_RESPONSE was incomplete, fix that
2023-11-20 18:00:42 +01:00
Armin Novak
f1ddc19806 [winpr,str] add winpr_vasprintf 2023-11-20 18:00:42 +01:00
David Fort
061148f856 [nla] initial server-side remote credential guard support
Adds support for server-side remote credential guard in NLA. When enabled that allows
the remote user to connect without shipping credentials in TSCred packets. Instead
it will send his TGT encoded with a TGS from the remote server. This way the server
is able to populate that TGT in a local credential cache without knowing the user's
password.

The patch only treats the NLA part and does not contain the associated RDPEAR channel
that allows to have the complete interaction to retrieve new access tokens.
2023-11-20 16:17:00 +01:00
David Fort
4e2e7e0eae [build] fix mingw build on Ubuntu 22.04
Seems like the version check was not ok and build was failing on Ubuntu 22.04.
2023-11-13 19:43:44 +01:00
akallabeth
13b44b8b77 [ifdef] properly check for defined 2023-11-10 09:58:23 +01:00
Armin Novak
98a4eb77ef [core] VirtualChannelChunkSize adjustments
* add CHANNEL_CHUNK_MAX_LENGTH
* remove duplicate definitions
* default to CHANNEL_CHUNK_MAX_LENGTH
2023-11-03 12:43:25 +01:00
akallabeth
92e453754b [CMake] add public headers to targets
Add all public headers to the respective library targets.
This helps an IDE to show the headers grouped to the correct target.
2023-10-19 13:43:57 +02:00
akallabeth
7a8e1442bf [warnings] add pragma to silence pedantic warnings 2023-10-17 11:07:11 +02:00
Armin Novak
60390ea40c [pragma] unify compiler diagnostics 2023-10-16 15:10:13 +02:00
Armin Novak
c91a250623 [warnings] add WINPR_FORMAT_ARG
with WINPR_FORMAT_ARG format strings are marked for MSVC to avoid
warnings
2023-10-16 15:10:13 +02:00
Armin Novak
9f7cfe51ba [pubsub] fix API definitons to avoid warnings 2023-10-16 15:10:13 +02:00
akallabeth
86acc8d31a [warnings] fixed reserved-identifer warnings 2023-09-25 08:39:01 +02:00
David Fort
8a39859612 [arm] various improvements
This patch moves the ARM configuration before starting the connection process, so
that we can do some provisioning of the FreeRDP settings with the items retrieved
from Azure.
Most notably that allows us to connect directly using RDSTLS security.
2023-09-04 10:24:56 +02:00
Armin Novak
3ea38175b4 [locale,keyboard] fix keyboard mapping on apple 2023-08-31 11:39:22 +02:00
akallabeth
4e824b243f [winpr] add WINPR_ATTR_FORMAT_ARG
this macro declares the function argument (pos,arg) to be a printf
style format string and enables compiler checks for that.
2023-08-25 12:56:36 +02:00
akallabeth
786279fd9f [winpr,api] add C23 [[deprecated]] support
* Support C23 attributes for WINPR_DEPRECATED* macros
* Support C23 attributes for WINPR_NORETURN macro
2023-08-25 12:56:36 +02:00
akallabeth
9cee9b3c08 [c standard] use WINPR_FALLTHROUGH
use the macro to silence intentional switch fallthrough locations
2023-08-25 12:56:36 +02:00
akallabeth
3e744e13c3 [smartcard] clean up function table wrapper 2023-08-23 12:26:27 +02:00
Marc-André Moreau
30c31d64e8 WinSCard dynamic API loading with /winscard-module cli argument 2023-08-23 12:26:27 +02:00
akallabeth
ad27cef021 [winpr,wtypes] add WINPR_RESTRICT macro 2023-08-22 15:39:00 +02:00
Armin Novak
dd9757d686 [server] add exerimental and unmaintained warnings 2023-08-21 15:42:10 +02:00
David Fort
2252d53001 [winpr] cipher enable setting the padding option
It happens that with some ciphers the standard behaviour that disables padding
is not desired. This patch adds a function to enable padding.
2023-08-16 10:19:15 +02:00
David Fort
a16c4efb98 mingw: fix build under Ubuntu 22.04 2023-08-02 09:37:32 +02:00
akallabeth
2b84309b10 [mingw] fix build issues on debian 12 2023-08-01 13:32:35 +02:00
Armin Novak
ef5c0e78ab [build] use define WINPR_FALLTHROUGH
with c17 compatible compilers annotate with [[fallthrough]]
2023-07-31 23:46:53 +02:00
Armin Novak
bd79d8f100 [winpr,rdtk] use png only if supported by winpr
rdtk compiles in bitmaps of fonts. if png format is supported by winpr,
prefer the png images, otherwise use bmp
2023-07-31 20:18:48 +02:00
Armin Novak
97cb8d9e57 [winpr,collections] simplify c++ casts 2023-07-31 10:12:23 +02:00
Armin Novak
d4b9812db2 [winpr,sync] define symbols unsigned long 2023-07-31 08:32:43 +02:00
Armin Novak
c9852a870b [winpr] use C++ compatible casts
use a macro for casts to avoid C++ warnings
2023-07-31 08:32:43 +02:00
Armin Novak
6683fb1b22 [winpr,nt] use C++ compatible cast 2023-07-31 08:32:43 +02:00
Armin Novak
2378551105 [winpr,stream] c++ compatible casts
use a macro to cast C or C++ compatible to avoid warnings
2023-07-31 08:32:43 +02:00
Armin Novak
b46a4ce750 [winpr,string] remove duplicate string functions
prefer standard C functions over window specific ones
2023-07-28 13:42:12 +02:00
Armin Novak
61625f1a2a [winpr,utils] fix cast warnings 2023-07-28 13:42:12 +02:00
Armin Novak
32b9eeb3c0 [winpr,sysinfo] deprecage GetVersionInfoEx
the function is deprecated under windows, so deprecate it in WinPR too
and remove/replace usage
2023-07-28 13:42:12 +02:00
Armin Novak
96112b28ab [winpr,stream] replace defines with inline functions 2023-07-28 13:13:50 +02:00