Commit graph

854 commits

Author SHA1 Message Date
Frederik Seiffert
40f88bc622 Enable _C_BOOL on non GNU C compilers 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
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
Frederik Seiffert
47ed291b80 Fix possible heap corruption when converting to NSNonLossyASCIIStringEncoding. 2021-07-03 08:34:14 +02:00
Frederik Seiffert
8137b5a2a0 Fix lookup of string encodings with high numeric values in encoding table 2021-06-17 17:53:22 +02:00
Frederik Seiffert
0582eddd96 Export string constants and annotate exported function implementations
Moves scattered string constants to externs.m, and removes obsolete code replacing constant strings.
2021-03-27 17:36:15 +01:00
Richard Frith-Macdonald
7c9c3b8605 Fix potential deadlock found by Wolfgang 2021-02-22 15:59:29 +00:00
Richard Frith-Macdonald
edc771775f fix missing check to see whether we have already initialised 2021-02-18 21:27:21 +00:00
Richard Frith-Macdonald
958449e90f Initialise XMLParser in main thread 2021-02-18 21:18:41 +00:00
Frederik Seiffert
61709e6101 Support building on Windows with Clang MSVC target 2021-02-03 15:02:27 +01:00
Richard Frith-Macdonald
09e527c0fd Fix to make value pointed to by mutationsPtr be unsigned long. 2020-12-04 11:08:16 -05:00
Richard Frith-Macdonald
8141fe03f7 use memcpy rather than strncpy to avoid compiler warning 2020-12-03 12:29:53 -05:00
Richard Frith-Macdonald
1b7bf26bea Merge changes for NSURLSession from EngageHub (formerly Brainstorm). 2020-11-29 06:57:47 -05:00
Richard Frith-Macdonald
0dbd863dde Add optimisation for the use of GSImmutableString so that it can make use of the layout of the underlying mutable string that the GSImmutableString is a proxy for. 2020-11-22 09:55:39 -05:00
Richard Frith-Macdonald
3bb72398ee Report YES for GSImmutableString being a proxy 2020-11-22 08:08:00 -05:00
Richard Frith-Macdonald
1170e0c0c1 add casts to avoid compiler warnings 2020-11-20 01:42:33 -05:00
Richard Frith-Macdonald
8178e52806 Correct checks for validity of the second UTF16 value in a surrogate pair 2020-11-19 08:27:06 -05:00
Richard Frith-Macdonald
d4df4b6d87 Add methods to control size of in-memory queue os emails 2020-11-14 04:25:34 +00:00
Richard Frith-Macdonald
938f280b87 Implement fast enumeration for insensitive dictionary 2020-09-08 15:14:19 +01:00
Richard Frith-Macdonald
1ddcb25b7e Avcoid coverity warning 2020-08-23 16:01:21 +01:00
Richard Frith-Macdonald
32f306b615 avoid coverity warning 2020-08-23 15:48:47 +01:00
Richard Frith-Macdonald
48c270b9ca Improve -contentFile to check the content-type header before content-disposition 2020-08-08 19:30:18 +01:00
Frederik Seiffert
5dfda50d82 Implement -[NSXMLParser initWithStream:]. 2020-05-05 19:41:22 +02:00
Richard Frith-Macdonald
132729e6e0 Add casts to avoid compiler warnings bout type of method 2020-04-15 10:40:41 +01:00
Richard Frith-Macdonald
09e9354f08 Fully type method implementatyion pointers. 2020-04-15 10:31:55 +01:00
Richard Frith-Macdonald
53f5957030 When building outside GNUstep (additions for apple), include the runtime
declarations and fix error in casting self.
2020-04-14 17:18:24 +01:00
Richard Frith-Macdonald
2e07244f8e Updates to move towards ARC 2020-02-08 16:42:17 +00:00
fredkiefer
d1d9cd65a1 Handle case where scheme is missing from the URL. 2020-01-24 23:27:30 +01:00
Frederik Seiffert
5036cb4734 Fixed incorrect while loops for noreturn functions
Silences warnings "function declared 'noreturn' should not return [-Winvalid-noreturn]".
2020-01-06 22:21:20 +01:00
Marcus Müller
5bfbf62f06 Guard inclusion of <malloc.h> as to not break FreeBSD 2019-08-16 01:11:18 +02:00
Frederik Seiffert
e3be0c0476 Use UTF-8 as default encoding on Android.
Android uses UTF-8 as default encoding, e.g. for file paths.

This fixes file handling support for paths containing non-ASCII characters on Android, which would previously throw an exception as they couldn't be converted to C strings using ISO Latin 1 encoding.
2019-08-14 11:46:21 +02:00
Richard Frith-Macdonald
dd36855923 Improved memory usage reporting mechanisms 2019-08-08 17:20:25 +01:00
fredkiefer
d774dda8a7 * Source/GSXML.m (fatalErrorFunction): Use correct function to get
line number.
* Source/NSOperation.m (_execute): Surround with NS_DURING to free
lock on error.
2019-07-01 22:58:55 +02:00
Richard Frith-Macdonald
3f7d54a33f improve reportingn of memory usage 2019-06-11 14:07:10 +01:00
Richard Frith-Macdonald
dc481825ec remove leftover logging 2019-02-27 17:24:39 +00:00
Richard Frith-Macdonald
06019034b0 header line folding fix 2019-02-15 14:13:14 +00:00
Richard Frith-Macdonald
d6ef10f224 fixes for encoding in mime header encoded word 2019-02-14 11:19:33 +00:00
fredkiefer
a31506564e * Source/Additions/Unicode.m: Move variable u to the correct scope
and initialize it.
2019-01-06 23:33:45 +01:00
Richard Frith-Macdonald
280b2cbe83 Changes for keeping a connection in use 2018-12-04 13:34:53 +00:00
Riccardo Mottola
441f13828d add missing header 2018-08-07 15:46:02 +02:00
Richard Frith-Macdonald
15af957fd0 Fix typo in error message 2018-07-27 09:28:51 +01:00
Richard Frith-Macdonald
caedb21b51 missed in last git commit 2018-07-14 10:27:55 +01:00
Richard Frith-Macdonald
e60b2004af UTF8 parsing improvements 2018-07-14 07:25:40 +01:00
Richard Frith-Macdonald
bc2dd4b627 try to improve startup reliability 2018-04-12 18:08:53 +01:00
Richard Frith-Macdonald
3ced3237e8 Use standard locks rathere than obsolete lazy lock classes 2018-04-10 14:59:35 +01:00
Richard Frith-Macdonald
7274cbaa55 Minor unicode range handling improvements 2018-04-09 11:55:46 +01:00
Richard Frith-Macdonald
b3ce87ff4f tweaks to keep static checker happy 2018-02-11 12:03:52 +00:00
Richard Frith-Macdonald
f72708742a Avoid compiler warnings 2018-02-11 09:46:07 +00:00
Richard Frith-Macdonald
c515993d45 avoid checker warning 2018-02-07 13:31:26 +00:00