Frederik Seiffert
f67c99dbcc
win32: initialize Windows Sockets in NSObject only
...
And update to Windows Socket version 2.2. Also clean up the DllMain initialization to handle CRT init errors and call _CRT_INIT also on DLL/thread detach, and remove uneeded .idata section after removing WSAStartup() import.
WSAStartup() should not be called from DllMain according to MS documentation. Fixes #186 .
2021-08-11 19:32:21 +02:00
Frederik Seiffert
b2f2a3a429
win32: fix warnings
2021-08-11 19:32:21 +02:00
Frederik Seiffert
acde7b062a
Fix release method signature to match NSObject
2021-08-11 19:32:21 +02:00
Frederik Seiffert
27c06a9209
Fix various incorrect format string types
2021-08-11 19:32:21 +02:00
Frederik Seiffert
87dc8ab70c
Fix incorrect method signature in win32/NSMessagePort
2021-08-11 19:32:21 +02:00
Frederik Seiffert
5a46f744df
Fix incorrect string format in NSException
2021-08-11 19:32:21 +02:00
Frederik Seiffert
2d45396de0
Fix various incorrect log statements
2021-08-11 19:32:21 +02:00
Richard Frith-Macdonald
25b25080c3
Fix possible buffer overrun/corruption spotted by Fred.
2021-08-09 08:29:15 +01:00
Frederik Seiffert
35ef9423e0
Annotate callback functions with __stdcall on Windows
...
Fixes crash on exit on Windows x86.
2021-08-08 17:27:40 +02:00
Frederik Seiffert
55da62c1c1
Add missing import declaration on runtime declarations
...
Fixes warnings when building for Windows MSVC.
2021-08-08 17:27:40 +02:00
Frederik Seiffert
40f88bc622
Enable _C_BOOL on non GNU C compilers
2021-08-08 17:27:40 +02:00
Frederik Seiffert
3b8009654c
Improve robustness of finding devroot on Windows
...
Fixes possible infinite loop if developer root is not found.
Also disable devroot() code under MSVC, as there will be no MSYS environment.
2021-08-08 17:27:40 +02:00
Frederik Seiffert
b41953d274
More robust check for Windows ICU
...
Also ensure that we don't include both unicode/*.h and icu.h.
2021-08-08 17:27:40 +02:00
Frederik Seiffert
dc32970502
Add support for using ICU DLL from Windows 10
...
Requires Windows 10 version 1903 (May 2019 Update):
https://docs.microsoft.com/en-us/windows/win32/intl/international-components-for-unicode--icu-
Also adds missing configure check for unicode/utext.h.
2021-08-03 16:52:38 +02:00
Frederik Seiffert
cf2dae1e21
Improve NSThread thread priority error handling
...
Now using sched_get_priority_min/max instead of PTHREAD_MIN/MAX_PRIORITY defines, and prevent error log when min/max priority are equal (e.g. 0), which happens e.g. on Android when thread priorities are not settable.
2021-07-29 14:22:27 +02:00
Frederik Seiffert
abfe4e2a04
Use native threading and locking APIs on Windows
...
Removes dependency on pthread library and uses fast Slim Reader/Writer (SRW) locks for NSLock/NSRecursiveLock/NSCondition/NSConditionLock as well as all internal locks. Adds GS_MUTEX_*() macros in GSPThread.h, that are being used for all internal locking instead of pthread APIs.
Also adds support for thread priorities on Windows, fixes method signature of +[NSThread setThreadPriority:] to match Apple platforms, and adds error handling in same method.
2021-07-29 14:22:27 +02:00
Richard Frith-Macdonald
3b8bbb00ba
Try to make timezone parsing more robust: always use standard header for posix time zone files.
2021-07-29 10:35:19 +01:00
Richard Frith-Macdonald
0b3f2a9fb0
Fixup for incorrect method implementation used in sloppy parser.
2021-07-26 14:57:41 +01:00
Richard Frith-Macdonald
395fafde6f
Set file version consistently to avoid misunderstanding
2021-07-25 07:50:31 +01:00
Richard Frith-Macdonald
7245156336
Add sup[port for 64bit time transitions
2021-07-22 10:33:49 +01:00
Frederik Seiffert
a377a86094
Fix possible memory corruption in string handling
2021-07-19 12:23:15 +02:00
Frederik Seiffert
813ae35d39
Export GSPathHandling() in GNUstep headers.
...
Fixes linker errors for some tests under Windows MSVC.
2021-07-14 10:09:45 +02:00
Frederik Seiffert
47ed291b80
Fix possible heap corruption when converting to NSNonLossyASCIIStringEncoding.
2021-07-03 08:34:14 +02:00
Richard Frith-Macdonald
a29248bd4d
Differentiate between client/server for DO over TLS
2021-06-24 08:50:28 +01:00
Richard Frith-Macdonald
640198a395
add missing brace
2021-06-21 09:15:11 +01:00
Richard Frith-Macdonald
e34584e323
Encryption emprovements
2021-06-19 14:40:47 +01:00
Richard Frith-Macdonald
b252f4067a
remove a couple of redundent lines
2021-06-18 10:02:48 +01:00
rfm
a1b0c1c8db
Merge pull request #185 from triplef/fix-unicode-lookup
...
Fix lookup of string encodings with high numeric values in encoding table
2021-06-18 10:01:36 +01:00
Frederik Seiffert
8137b5a2a0
Fix lookup of string encodings with high numeric values in encoding table
2021-06-17 17:53:22 +02:00
Richard Frith-Macdonald
dd3b6c3d7f
fix typo in name
2021-06-17 16:22:31 +01:00
Richard Frith-Macdonald
7ea49c252b
encryption fixes and debug improvements
2021-06-03 14:59:09 +01:00
Richard Frith-Macdonald
e9d3ba8179
Improve debug logging ... use the I/O handle as the tag for debug logs so that they can more easily be matched to the object for which the I/O is taking place.
2021-06-03 14:54:16 +01:00
Richard Frith-Macdonald
2fc16eae5e
Tidyups for when TLS is not used
2021-06-02 14:12:28 +01:00
Richard Frith-Macdonald
f72f46efa4
Minor debug improvement
2021-06-02 13:32:44 +01:00
Richard Frith-Macdonald
a2298990fc
Improve debug logging and fix tls session startup when we have to try connecting to multiple possible destinations
2021-06-01 16:32:25 +01:00
Richard Frith-Macdonald
dd52dfb36d
Do more logging based on 'RMC' so we can track send/receive of messages
2021-06-01 16:31:21 +01:00
Richard Frith-Macdonald
29f76a5cba
minor thread safety fix
2021-05-31 14:27:42 +01:00
Richard Frith-Macdonald
e42d9fdc6b
New code for secure (encrypted) inter-host distrinuted objects.
2021-05-31 13:19:42 +01:00
Richard Frith-Macdonald
1bcb73f0f8
If space becomes available for a stream whose status is writing, we
...
should change the status to be open (the write completed).
2021-05-23 10:58:09 +01:00
Richard Frith-Macdonald
391c00b058
Added some debug logging
2021-05-19 11:15:29 +01:00
Richard Frith-Macdonald
12c88716d0
indentation tweaks
2021-05-19 11:06:10 +01:00
rfm
1aa11956b5
Merge pull request #183 from gnustep/windows-keepalive-fix
...
The portable way to detect if a socket is reusable or has been closed
2021-05-19 10:57:54 +01:00
Richard Frith-Macdonald
8b8fe60070
break out of loop if write fails
2021-05-15 17:53:44 +01:00
Richard Frith-Macdonald
ed9bb899a7
Support writing large chunks of data over tls on windows
2021-05-15 16:10:23 +01:00
Richard Frith-Macdonald
782e7aed31
Fix for -setHTTPMaximumConnectionLifetime:
2021-05-05 12:04:28 +01:00
Richard Frith-Macdonald
713c7c0f7e
Fix one character truncation of certificate name/issuer in debug output
2021-04-28 15:27:23 +01:00
Richard Frith-Macdonald
31f2528b93
Ignore GS_EXPORT_CLASS when generating documentation for base/additions
2021-04-23 06:56:00 +01:00
Richard Frith-Macdonald
bd5f2909e6
Simplify conversion of a string to data (use base class code) and fix to handle the insertion of BOM consistently (as on OSX) for encodings where the byte order matters but is not specified by the encoding.
2021-04-14 09:57:11 +01:00
Riccardo Mottola
19d76d2478
The portable way to detect if a socket is reusable or has been closed
...
was failed, since its test read would leave the file handle with a read
in progress, invalidating further background reads. More recent versions
of Windows seem to handle the unix way.
2021-04-13 23:59:45 +02:00
Frederik Seiffert
843800d413
Add support for libobjc2 runtime in NSObject on Windows
2021-03-29 11:22:00 +02:00