Commit Graph

1271 Commits

Author SHA1 Message Date
Armin Novak
a9be86ecfa [winpr,platform] add C23 [[nodiscard]] 2026-02-24 16:10:05 +01:00
Armin Novak
262dade595 [cmake] Define WINPR_DEFINE_ATTR_NODISCARD
* Do not define WINPR_ATTR_NODISCARD if WINPR_DEFINE_ATTR_NODISCARD is
  not defined.
* Define WINPR_DEFINE_ATTR_NODISCARD via CMake to enable this for
  internal use only
2026-02-20 09:01:54 +01:00
Armin Novak
d48452faf3 [winpr,utils] Add Queue_Capacity 2026-02-18 15:43:40 +01:00
Armin Novak
b78cb455cb [winpr,queue] improve queue management
* Fix Queue_EnsureCapacity reallocation handling, ensure queue->tail is
  properly updated.
* Fix allocation behaviour, use growthFactor * 32 as block size.
* Add doxygen for Queue_New
2026-02-18 15:43:39 +01:00
Armin Novak
57dfd75231 [winpr,utils] add MessageQueue_Capacity 2026-02-18 14:26:03 +01:00
Armin Novak
399d92f26e [winpr] mark function pointers [[nodiscard]] 2026-02-15 23:57:23 +01:00
Armin Novak
5f7f1672ff [winpr,utils] add application details getter/setter
* Allow an application to set a vendor/product/version namespace to search
  for configuration files/settings/...
* Replace all WINPR_VENDOR_STRING et al macros with these getters
2026-01-29 22:47:40 +01:00
Armin Novak
81d6ed2784 [winpr,path] modify GetCombinedPath
Allow the subPath argument to be a format string with variadic
arguments. This allows to generate a subPath on the fly. This change is
API compatible.
2026-01-29 22:47:30 +01:00
Armin Novak
ba07955689 [client,sdl] handle clipboard events in SdlContext 2026-01-27 15:22:40 +01:00
akallabeth
b5b451e35b Merge pull request #12192 from akallabeth/nodiscard
[winpr,platform] drop C23 [[nodiscard]]
2026-01-27 13:17:49 +01:00
Armin Novak
f443c1bc6f [winpr,platform] drop C23 [[nodiscard]]
In WINPR_ATTR_NODISCARD drop the C23 [[nodiscard]] until we figure out
how to avoid compiler errors on fedora/gcc 15
2026-01-27 12:59:22 +01:00
akallabeth
cf63326799 [winpr,platform] fix duplicate deprecation define 2026-01-27 12:15:03 +01:00
akallabeth
1e4c1cd526 [winpr] mark all WINPR_ATTR_MALLOC also nodiscard 2026-01-26 13:39:41 +01:00
akallabeth
7d943a9c21 [documentation] fix a few doxygen warnings 2026-01-25 09:38:33 +01:00
akallabeth
2501c274f5 [winpr,platform] add WINPR_ATTR_NODISCARD macro
* add macro WINPR_ATTR_NODISCARD
* adjust C-23 checks for macros according to
  https://en.cppreference.com/w/c/language/attributes.html
2026-01-23 17:13:54 +01:00
Armin Novak
efe920c705 [winpr,platform] make WINPR_DEPRECATED_VAR more verbose
explicitly state [deprecated] in the compiler warning to make it more
visible why the warning was emitted.
2026-01-21 16:41:26 +01:00
akallabeth
afc204df03 [winpr,wlog] mark WLog_Print_dbg_tag printf style
Add proper compiler attributes to WLog_Print_dbg_tag so the compiler can
warn about format string violations
2026-01-16 11:36:55 +01:00
akallabeth
14897e1bba [winpr,nt] FSInformationClass2Tag parameter
Use UINT32 as input parameter as we might have an invalid value not
contained in the FILE_INFORMATION_CLASS enum
2026-01-09 09:24:24 +01:00
akallabeth
f7f0dd2ba4 [winpr,secapi] document KERB_LOGON_SUBMIT_TYPE
* Add _WIN32_WINNT version defines for enum values
* define KerbInvalidValue for windows
2026-01-09 09:24:21 +01:00
Armin Novak
5e72694954 [winpr,secapi] remove reserved identifier 2026-01-08 11:07:38 +01:00
Armin Novak
4b277189ee [winpr,cast] use temporary variable in WINPR_ASSERTING_INT_CAST
avoid calling C++ functions twice by storing the input variable
2026-01-07 11:29:03 +01:00
akallabeth
acf04f1087 [winpr,platform] add C11 thread_local support 2025-12-10 15:22:54 +01:00
David Fort
65bb6c59fc rdpear: handle basic NTLM commands and fix server-side
This patch adds the handling of basic NTLM commands. Because there's some mysterious
4 zero bytes after pickle header in Kerberos packets, not present in NTLM commands, the
patch also had to rework a bit the packet parsing / forging.

The patch also addresses a server-side bug when parsing supplemental creds, if the client
was sending an empty list, we were considering this as an error.

And finally we also implement the parsing of MSV1_0_REMOTE_SUPPLEMENTAL_CREDENTIAL.
This breaks the public API, anyway this was basically unused (as not parsed before) and
the previous API was wrong as what we receive is MSV1_0_REMOTE_SUPPLEMENTAL_CREDENTIAL
not MSV1_0_SUPPLEMENTAL_CREDENTIAL, so I guess the API breakage is ok.
2025-12-04 11:31:09 +01:00
akallabeth
ce87165719 [c,attributes] mark functions with attirbute malloc 2025-11-07 11:20:39 +01:00
akallabeth
3db117283a [winpr,print] mark function WINPR_ATTR_MALLOC 2025-10-28 11:14:01 +01:00
akallabeth
0dd6d838bb [winpr,json] add WINPR_JSON_AddIntegerToObject
This function adds a integer value (in contrast to real values with
WINPR_JSON_AddNumberToObject) to a JSON object.
2025-10-28 11:13:44 +01:00
akallabeth
74648eb3a9 [c,standard] use C99 inline 2025-09-26 11:29:26 +02:00
Armin Novak
8f8cd89f69 [winpr,json] add jansson support
* Split JSON implementations in separate files
* Simplify JSON detection
* Add jansson implementation
2025-09-25 15:09:28 +02:00
Armin Novak
75787a62de [winpr,json] fix json-c case insensitive object get 2025-09-23 12:33:31 +02:00
akallabeth
a7c4a1a022 [winpr,platform] add macro to disable deprecations 2025-09-02 09:04:39 +02:00
akallabeth
2552408b8a [api] fix missing C++ guards 2025-08-29 12:25:32 +02:00
akallabeth
df89b04424 [winpr,wlog] Add specialized text log functions
The generic WLog_PrintMessage(VA) functions lack proper checks of the
supplied format strings.
Add WLog_PrintTextMessage(VA) functions that do compile time checks of
supplied format strings to uncover usage errors early and use them in
the logger macros.
2025-08-13 15:07:51 +02:00
akallabeth
6284bba9f0 [clang-tidy] fix various warnings
* silence tidy warnings for public API symbols (we can't fix these for
  compatibility reasons)
* fix issues with casting
2025-08-11 14:11:40 +02:00
David Fort
4f909a36a5 winpr: re-introduce the credentials module
The credential module from FreeRDP2 was removed, but sometime you still need to
have support for Cred[Marshal|Unmarshal]Credential especially when it's a
smartcard logon and that the cert sha1 is encoded using these functions.
2025-07-10 16:07:01 +02:00
akallabeth
ef6b4efdf4 [winpr,file] fix definition of winpr_CreateFile 2025-06-05 13:55:01 +02:00
Armin Novak
07e39ede20 [winpr,file] Add winpr_CreateFile wrapper
Allows creation of a file HANDLE from a utf-8 name
2025-06-05 11:58:47 +02:00
Armin Novak
f1fa7b56c2 [winpr,file] add GetLogicalDriveStrings[A|W] 2025-06-05 11:58:47 +02:00
akallabeth
aadc257ecd [utils,json] add functions to read from file 2025-05-26 19:36:40 +02:00
akallabeth
d139c8799b [winpr,wtypes] align BOOL typedef with objc.h header 2025-05-26 08:56:44 +02:00
akallabeth
866d89992c [winpr,bitstream] remove unnecessary casts 2025-03-20 09:15:25 +01:00
Armin Novak
e4df43a37a [freerdp] fix argument consistency, casts 2025-03-19 19:32:09 +01:00
Armin Novak
b14f9e8965 [winpr] refactor complex expressions
* avoid unnecessary casts
2025-03-19 19:00:09 +01:00
Armin Novak
3e6707c443 [warnings] fix issues from ci builder 2025-03-12 12:02:04 +01:00
Biswapriyo Nath
27e9c4f951 [winpr,nt] Fix incorrect name in FILE_INFORMATION_CLASS
This renames FileUnknownInformation1 with FileCompletionInformation which is documented in
https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/ne-wdm-_file_information_class
2025-03-09 08:54:44 +00:00
akallabeth
3186977e15 [cmake] Invert WITH_FREERDP_3x_DEPRECATED
API breaking change, with this logic the symbol needs to be manually
defined by an API user. So, to fix this:
* Rename to DROP_FREERDP_3x_DEPRECATED
* Invert logic, so a undefined value enables the symbols
2025-03-06 15:30:26 +01:00
akallabeth
71bc44935a [winpr,bcrypt] declare WCHAR constants c99 compatible 2025-03-05 23:49:04 +01:00
akallabeth
42d210d133 [winpr,nt] Add FSInformationClass2Tag 2025-03-05 22:27:33 +01:00
akallabeth
d03b4b91d5 [cmake,freerdp] add WITH_FREERDP_3x_DEPRECATED
This new CMake option (ON by default) allows building the library with
all symbols deprecated during 3.x release cycle disabled.
This allows compatibility testing external applications for future
FreeRDP 4.x support
2025-03-04 13:26:45 +01:00
akallabeth
ec030e8255 [winpr,stream] implement reference counting for streams 2025-02-27 20:30:25 +01:00
akallabeth
5b9a1b5b1f [winpr,clipboard] define guard DIBv5 support 2025-02-27 08:33:39 +01:00