Commit graph

8643 commits

Author SHA1 Message Date
rfm
25505b2e67 Some more leak improvements 2024-11-14 14:45:05 +00:00
rfm
dd3367de3b atexit improvements 2024-11-14 12:52:43 +00:00
rfm
e64b7dc6b3 iuse bundle identifier for user defaults 2024-11-13 23:11:10 +00:00
rfm
b2e198cb0d Fix notification removal bug from last update 2024-11-12 15:08:06 +00:00
rfm
28ba7788ce Fix the case where we replace a value already in the map 2024-11-12 14:27:06 +00:00
rfm
b78b2e2030 hash/map table and pointer functions fixups 2024-11-12 12:03:24 +00:00
rfm
c981920679 Revert "Retain count fixes"
This reverts commit 544dcce482.
2024-11-10 20:13:39 +00:00
Hugo Melder
6681a3da47
Initial port of WinObjC's KVO implementation to GNUstep (#420)
* GSAtomic: Add prefix to macro definitions

* NSKVOSupport: Import

* NSKVOSupport: Add test cases

* NSKVOSwizzling: Ugly C Rewrite

* NSKeyValueObserving: Use old implementation as fallback

* NSKeyValueObserving: Rename TypeEncodingCases header

* NSKVOSupport: Fix new objects not being added to NSKeyValueChangeNew set on set mutation

* NSKeyValueMutableSet: Fix will and didChange notifications for set operations

* NSKeyValueMutableSet: Document Accessor Search Patterns

* NSKVOSupport: Add toMany test

* NSKeyValueCoding: Change notifications when changing value via setValue:forKey:

* NSKVOSupport: Add more tests

* NSKVOSupport: Do not wrap block in try/finally to avoid crash in windows

* NSKVOSwizzling: use _alloca on Windows

* NSKVOSupport: Do not autorelease newWithObservee:

* NSKVOSupport: Do not leak Observee and TestFacade objects

* Improve runtime detection in makefile

* Add file extension of source file in GNUMakefile

* NSKVOSupport: Remove @status comments

* NSKVOSupport: Implement private notify method

* NSUserDefaults: KVO Support and fix macOS incompatibilities

* NSKeyValueObserving: Set old to null if nil

* NSKeyValueObserving: Remove cached new value

* NSMethodSignature: Add signature cache

* NSKVOSupport: Remove ObjC2 features and mark tests failing on GCC as hopeful

* Call class method instead of private _keyPathsForValuesAffectingValueForKey

* Move _keyPathsForValuesAffectingValueForKey body into class method and statically construct empty NSSet

* NSUserDefaults: Change notification should contain old value from other domains aswell

* NSUserDefaults: Fetch new value from all domains

* NSKVOInternal: Fixup filename in header

* NSUserDefaults: Go through search list instead of only one domain in KVO change

* Making indentation a bit less worse

* Add NSUserDefaults KVO tests

* NSKVOSupport: NSUserDefaults test small fixes

* Add autoreleasepool

* NSUserDefaults: Only emit change notifications if value changed

* Avoid compiler warnings and tidy some of the whitespace/formatting

---------

Co-authored-by: Frederik Seiffert <frederik@algoriddim.com>
Co-authored-by: rfm <richardfrithmacdonald@gmail.com>
Co-authored-by: rfm <rfm@gnu.org>
2024-11-10 17:05:23 +01:00
rfm
544dcce482 Retain count fixes 2024-11-10 14:14:42 +00:00
rfm
44222342b0 Fix for issue 461 2024-11-09 11:09:22 +00:00
rfm
fe5efb6aa2 OSX 10.15 file offset methods 2024-11-08 15:19:40 +00:00
rfm
4961287024 issue 325 2024-11-08 11:52:27 +00:00
rfm
f180575e37 Fix for issue 459 2024-11-08 10:33:32 +00:00
rfm
b8d0003b43 Update FSF address as requested by Gregory 2024-11-08 10:33:32 +00:00
rfm
0271f62ab2 Fix for issue 452 2024-11-08 10:33:32 +00:00
rfm
ca84bde33b Add a bit of information about handler callback methods to comments/docs. 2024-11-08 10:33:32 +00:00
rfm
d0bff27c77 Tweaks to NSDate changes 2024-11-08 10:33:32 +00:00
rfm
7a59450341 Reapply "Implement NSDate as a small object (tagged pointer) - clang/libobjc2 only (#451)" because of GUI breakage: apps hang when loading NSMenu
This reverts commit cac43f7bfc.
2024-11-08 10:33:32 +00:00
Riccardo Mottola
fab621bb2d Revert "Implement NSDate as a small object (tagged pointer) - clang/libobjc2 only (#451)" because of GUI breakage: apps hang when loading NSMenu
This reverts commit 8fd2c06ddd.
2024-11-08 10:33:32 +00:00
Hugo Melder
d53a732576 NSThread: Implement +detatchThreadWithBlock: and -initWithBlock: (#454)
* NSThread: Implement +detatchThreadWithBlock: and -initWithBlock:

* Remove extraneous include

* NSThread: Define GSThreadBlock so that GCC stub impl does not fail

* Add missing spaces - trivial style fixup

---------

Co-authored-by: rfm <richardfrithmacdonald@gmail.com>
2024-11-08 10:33:32 +00:00
rfm
1ad65abdaa Fix for issue 453 2024-11-08 10:33:32 +00:00
Hugo Melder
ab5d06da6a NSKeyValueCoding: Safe-Caching for -[NSObject valueForKey:] (#445)
* KVC Caching Implementation

* Do not ignore struct name when comparing type encoding as NSPoint and NSSize have the same layout

* Use fast-path when using Objective-C 2

* Guard old ValueForKey function when using the fast-path

* Add basic NSKeyValueCoding tests

* Update Copyright Years

* NSKeyValueCoding+Caching: Add Versioning to IVar Slot

* safe_caching: Remove Guards

* Add type encoding helper header

* Rename geometry structs (NSRect, NSPoint, NSSize) for toll-free bridging with CoreGraphics

* Move CG struct definitions to CFCGTypes.h

* Update known struct encoding prefixes

* Windows 64-bit is LLP64 and not LP64

* Re-order to avoid complier warning

---------

Co-authored-by: rfm <richardfrithmacdonald@gmail.com>
2024-11-08 10:33:32 +00:00
rfm
3e55c3b296 safety fix in case code incorrectly tries to use the reuslt of forwarding a method to the undo manager. 2024-11-08 10:33:32 +00:00
Hugo Melder
f940412e0e NSString: Fix -commonPrefixWithString:options: behaviour (#455)
* Update changelog

* NSString: fix -commonPrefixWithString:options: behaviour

* NSString: More test cases
2024-11-08 10:33:32 +00:00
Hugo Melder
01b719f2af Implement NSDate as a small object (tagged pointer) - clang/libobjc2 only (#451)
* Implement GSSmallObject Class

* Remove private concrete class access

* Change secondary bias

* NSDate: Get interval from rhs object in comparison

* Add prefix to CONCRETE_CLASS_NAME  macro
2024-11-08 10:33:32 +00:00
rfm
0ad7e3f8ef Make files closer to gnustep coding style (automated fixups using uncrustify) 2024-11-08 10:33:32 +00:00
rfm
f6c0c5a5c0 Improve errors for copying. 2024-11-08 10:33:32 +00:00
Hugo Melder
3333d9fb73 NSString: Cache ICU collator in thread-local storage (#450)
* Add ICU collator caching

* Update ChangeLog
2024-11-08 10:33:32 +00:00
hmelder
4edbe633d4 Fix typo in ifdef 2024-11-08 10:33:32 +00:00
Hugo Melder
3c34150e05 NSOperationQueue: Proper names for worker threads (#437)
* NSOperationQueue: Give Worker Threads a name

* Update Changelog

* Remove empty string test
2024-11-08 10:33:32 +00:00
hmelder
7667d0c3c4 NSThread: Add warning when truncating thread name 2024-11-08 10:33:32 +00:00
Hugo Melder
b177fa5f01 Add Branch Prediction Macros and Error checks in Android Initialisation (#438)
* Add Branch Prediction Macros

* Rigorous Error Handling when using JNI
2024-11-08 10:33:32 +00:00
rfm
7c2ccb3035 avoid compiler warning 2024-11-08 10:33:32 +00:00
rfm
a1913e5540 NSURLSession rewrite (#422)
* clang-format: Do not use tabs

* Ignore clangd cache and compile_commands

* NSBlockOperation: Fix memory leak

* NSHTTPCookie: Fix expires date parsing

* NSHTTPCookie: Release DateFormatter after use

* NSOperation: Remove all objects at end of execution

* Reimplementation of NSURLSession

* NSURLSession: Update expiration dates in test

* Update ChangeLog

* Fix trivial compiler warning caused by missing import

* Import GSDispatch.h for definition of DISPATCH_QUEUE_SERIAL

* Import common.h early to avoid header conflict

* Fix import order to avoid conflicts and ensure we have correct localisation macro

* Check for presence of dispatch_cancel

* Cancel timer using dispatch_source_cancel() if dispatch_cancel() is missing.

* NSURLSession: Replace dispatch_io with dispatch_source in unit test HTTP server

---------

Co-authored-by: hmelder <service@hugomelder.com>
2024-11-08 10:33:32 +00:00
Hugo Melder
e3208590b1 NSThread: Fix threadPriority and setThreadPriority: on Android by using setpriority instead of pthread (#436)
* Update Changelog

* Use {get, set}priority for -[NSThread setThreadPriority] on Android
2024-11-08 10:33:32 +00:00
Earl Robsham
3e808dc173 Update -[NSMutableArray removeLastObject] (#433)
* Update `-[NSMutableArray removeLastObject]`

Updates the following implementation to avoid raising an exception if the array is already empty (or notifying observers if applicable):
 * `-[NSMutableArray removeLastObject]`
 * `-[GSMutableArray removeLastObject]`
 * `-[NSKeyValueMutableArray removeLastObject]`
 * `-[NSKeyValueIvarMutableArray removeLastObject]`

This brings the behavior of `-[NSMutableArray removeLastObject]` inline with the Apple implementation, improving compatibility for code bases which use both GNUStep and Apple objc/Foundation implementations.

* Add `-[NSMutableArray removeLastObject]` test case

Adds a test case to ensure `-[NSMutableArray removeLastObject]` does not raise an exception when called on an empty array.
2024-11-08 10:33:31 +00:00
rfm
c3b208a85a avoid compiler warning 2024-11-08 10:33:31 +00:00
rfm
7dfdabd675 Supply function pointer prototype to avoid compiler warnings 2024-11-08 10:33:31 +00:00
rfm
f162e0f97e Changes for index.html output 2024-10-21 20:55:21 +01:00
rfm
80216e6328 Don't override the default stylesheet 2024-09-16 19:36:28 +01:00
Hugo Melder
81b3c721bc
NSUserDefaults: Retrieve native UI languages from Windows and Android System APIs (#426)
* Create NSString Win32Additions Category

* NSUserDefaults: Fetch Windows UI language information

* NSUserDefaults: Add winnls include

* Android Native UI Language

* NSUserDefaults: Replace incorrect separator on Windows

* NSProcessInfo: BCP-47 Note

* GSConfig: Bump MinGW WINVER to Vista

* NSString+Win32Additions: Do not add array to arp twice

* NSUserDefaults: Increase default length
2024-08-07 16:26:16 +02:00
rfm
9bdad8d56b Add option to set stylesheet 2024-08-06 20:17:38 +01:00
rfm
6c43f6c831 iFixup trace function type/name 2024-08-06 20:17:05 +01:00
rfm
04f0d76904 Fix use of obsolete/deprecated method. 2024-07-31 10:24:04 +01:00
rfm
6d8f546c08 fix trivial typo 2024-07-31 10:22:48 +01:00
rfm
28a6e6ebbd Final batch of GC cleanups (for the forseeable future). 2024-07-25 17:11:34 +01:00
rfm
b49af95359 Hide internals of _NSZone struct for consistency with OSX 2024-07-23 13:06:24 +01:00
rfm
52c127c950 GC was deprecated several releases ago and notinally removed a couple of releases ago ... delete more remnants of the old code. 2024-07-22 15:14:13 +01:00
rfm
a1514249f3 Tweaks to match OSX pointer array behaviors more accurately. 2024-07-22 12:22:40 +01:00
rfm
5699959d39 zeroing weak memory is now treated as weak memory since GC has been dropped 2024-07-21 09:46:33 +01:00
rfm
c46d447100 Deprecate/remove old GC options 2024-07-21 09:16:09 +01:00
rfm
c435c6d7d6 Remove/update confusing comments. Separate acquire and assign operations for pointer functions. 2024-07-17 15:42:33 +01:00
rfm
2c1a993612 Update hadling of nil args to match OS-X 2024-07-17 11:32:01 +01:00
rfm
1a1e7f7fc5 Acquiring existing memory does not use a funtion on OSX, copy that behavior. 2024-07-16 19:43:28 +01:00
rfm
b677ea402a Add some simple pointer functions personality tests 2024-07-16 12:07:32 +01:00
rfm
4629a4e1f6 Tweaks related to issue #311 2024-07-15 17:19:16 +01:00
rfm
b91ff38636 issue 424 2024-07-09 17:03:39 +01:00
rfm
33e5b72a97 fix last modifiecation 2024-07-07 16:59:25 +01:00
rfm
9442ff8dac github issue 378 2024-07-07 13:56:20 +01:00
rfm
cb68ba8864 Make notification delivery a little more predictable (issue #423) 2024-07-04 11:48:58 +01:00
rfm
0cf5955e00 Avoid (some cases of) compiler warning; mixing declarations and code is incompatible with standards before C99 2024-07-03 16:21:13 +01:00
rfm
3fedf31c2d
Revert "NSURLSession Reimplementation (#411)"
This reverts commit 07233534e6.
2024-07-02 19:19:14 +01:00
Hugo Melder
07233534e6
NSURLSession Reimplementation (#411)
* clang-format: Do not use tabs

* Ignore clangd cache and compile_commands

* NSBlockOperation: Fix memory leak

* NSHTTPCookie: Fix expires date parsing

* NSOperation: Remove all objects at end of execution

* Reimplementation of NSURLSession

* Update ChangeLog
2024-07-02 15:58:48 +02:00
rfm
9367c2d796 use memory management notation for clang static analyzer 2024-06-23 10:35:16 +01:00
rfm
7532837db4 fix method names 2024-06-21 21:18:17 +01:00
rfm
2c0ee5bf49 avoid compiler static analyzer warning 2024-06-21 17:28:49 +01:00
rfm
d49b6a46ce Debug improvements 2024-06-21 16:43:50 +01:00
rfm
4233f6a9d6 fix dead assignments 2024-06-21 15:02:55 +01:00
rfm
5a09b09fe3 iAdd comment on why we use fork() 2024-06-21 12:34:34 +01:00
rfm
ea1f5a0d12 Fix dead initialisations 2024-06-21 12:23:52 +01:00
rfm
da181e9ab0 Remove dead assignments. 2024-06-21 12:17:15 +01:00
rfm
8e0000770d Do not use vfork since its behavior is undefined for our use-case 2024-06-21 12:02:13 +01:00
rfm
a08d7f8b0f Tolerate nil cwrelease methods for content 2024-06-21 11:51:26 +01:00
rfm
4ad8d6ba38 Avoid compiler warning 2024-06-21 11:45:38 +01:00
rfm
235bb21df3 Fix obscure memory management issues 2024-06-19 15:28:48 +01:00
rfm
1c2b81d724 Fix C-string termination issues and a few dead assignments 2024-06-19 14:53:51 +01:00
rfm
9c9c918a8c Fix ranged initialisation index errors 2024-06-19 14:20:37 +01:00
rfm
5dbec4e707 Avoid excess copies of dictionary keys 2024-06-19 12:07:16 +01:00
rfm
7c4a7469a9 Fix potential leaks 2024-06-19 11:28:34 +01:00
rfm
da1a69e4bd Fix potential use after dealloc 2024-06-19 11:08:58 +01:00
rfm
6f94c90d98 fix leak 2024-06-18 12:03:01 +01:00
rfm
4d0b00776c Memory leak improvments 2024-06-18 11:23:15 +01:00
rfm
c9af996377 fix return value to be autoreleased 2024-06-12 13:54:10 +01:00
rfm
a4b661d633 Fix non-portabe use of dot syntax. Fix excess release. Conform to coding style. 2024-06-12 11:05:10 +01:00
rfm
92247d13c9
Merge pull request #419 from 2xsaiko/outgoing/nsfmurls
Implement -[NSFileManager URLsForDirectory:inDomains:]
2024-06-12 11:00:49 +01:00
Gregory Casamento
ced4cd0531
Merge pull request #410 from gnustep/NSExpression_branch 2024-06-11 11:46:56 -04:00
Marco Rebhan
952e076084
Implement -[NSFileManager URLsForDirectory:inDomains:] 2024-06-11 17:14:36 +02:00
rfm
a541a467bf cosmetic fixes (indentation etc) 2024-06-11 13:41:08 +01:00
rfm
3bcb484691
Merge pull request #416 from gnustep/enumerateSubstringInRange
Fix broken enumerateSubstringsInRange:options:usingBlock: implementation
2024-06-11 13:29:48 +01:00
rfm
67c53d6598 No exception when closing a file more than once 2024-06-10 11:51:47 +01:00
Litherum
e39309a7e9 -[NSFileHandle initWithFileDescriptor:] logs a message each time fstat() doesn't succeed on UNIX
fstat() on UNIX isn't guaranteed to always succeed, even if the file handle is valid. Special files may or may not support fstat() in the kernel.

(For context, I'm working on a Vulkan application. Vulkan has facilities to send certain objects across processes by representing the objects as file descriptors. These file descriptors still need to be close()d, which makes them good candidates for wrapping an NSFileHandle around them, but they do not support fstat(). I'm creating multiple of these each frame in the application, which means the line "unable to get status of descriptor" appears very often in the terminal while my application is running.)
2024-06-09 14:17:29 -07:00
Hugo Melder
4d3926d250
Implement -[NSString enumerateLinesUsingBlock:] (#407)
* Implement -[NSString enumerateLinesUsingBlock:]

* Fix formatting

* Use GNUstep CALL_BLOCK macro
2024-06-04 22:19:45 +02:00
hmelder
0c69d096ca NSString: Fix broken enumerateSubstringsInRange:options:usingBlock: implementation 2024-06-04 12:10:20 +02:00
hmelder
c6d288aae9 NSPredicate: Remove whitespace 2024-05-31 14:24:57 +02:00
hmelder
094bc55120 NSPredicate: Fix BETWEEN operation on other data types and constants 2024-05-31 14:24:57 +02:00
rfm
f19650b9df fix bad type case 2024-05-31 09:39:52 +01:00
Gregory John Casamento
d3d53ab23f Clean up tests 2024-05-31 00:20:09 -04:00
rfm
cfc158b4ce Remove obslete code 2024-05-30 11:28:49 +01:00
rfm
58ae7db59a fixup headers for deletion of obsolete lock code 2024-05-30 11:06:23 +01:00
rfm
241e2a47ca locking updates (fine grained locking rather than global lock) 2024-05-30 10:40:52 +01:00
Gregory John Casamento
25ebe42c22 Merge branch 'master' of github.com:gnustep/libs-base into NSExpression_branch 2024-05-30 01:10:52 -04:00
Gregory John Casamento
5c1e4e8eda Update to fix remaining issues with new NSExpression classes 2024-05-28 19:10:11 -04:00
Gregory John Casamento
48ab2e2bc7 Add implementation of expressionValueWithObject:context: to GSAggregateExpression 2024-05-28 15:03:26 -04:00
Gregory John Casamento
a49ae59a79 Add description method and a few minor changes 2024-05-26 16:16:40 -04:00
rfm
1e0023dc43 fix uninitialised variable 2024-05-26 16:49:22 +01:00
Gregory John Casamento
0a440a5303 Add missing NSMinusSetExpression 2024-05-26 09:11:21 -04:00
Gregory John Casamento
dc9ff1ff6f Add declarations and skeletons for new subclasses 2024-05-26 08:39:44 -04:00
Gregory John Casamento
392a626444 Add missing enum values, add skeleton implementations for metods, add simple tests 2024-05-25 00:39:34 -04:00
Gregory John Casamento
f6eb49bdf7 Add skeleton for 10.5 methods 2024-05-24 16:55:16 -04:00
Gregory John Casamento
c5defb6f3c Get rid of whitespace 2024-05-24 14:37:24 -04:00
Gregory John Casamento
5eea30b530 Add 10.6 NSExpression methods 2024-05-24 14:28:04 -04:00
Doug Simons
0935f77d8f
Merge pull request #405 from gnustep/small_xml_fixes
Two small xml fixes
2024-05-15 09:26:57 -06:00
Frederik Seiffert
94a6cb9919 Fix Unicode includes in NSString.m
Fixes compilation using ICU bundled with Windows.
2024-05-15 17:09:00 +02:00
Doug Simons
fdffcbdd27
Update NSXMLElement.m to satisfy older compilers 2024-05-14 15:56:43 -06:00
Doug Simons
f5f8f61e54
oops! Put the other bracket back in. 2024-05-14 15:44:44 -06:00
Doug Simons
256700d57d
avoid using Obj-C 2.0 notation 2024-05-14 15:40:22 -06:00
Doug Simons
50f447f5b8
Fix execute_xpath() to return an NSError when expression can't be evaluated; Remove previous attributes when setting attributes; Add related tests 2024-05-14 15:25:07 -06:00
rfm
3f994d3ee1 avoid compiler warnings 2024-05-12 15:07:49 +01:00
rfm
e9cfa9558b removed unused import 2024-05-12 10:14:02 +01:00
rfm
adbc7c2631
Merge pull request #400 from gnustep/nsurlhandle_cache
GSFileURLHandle: Remove file handle caching
2024-05-12 10:11:28 +01:00
rfm
35bb9f48ef regular expression range search 2024-05-12 10:03:15 +01:00
rfm
1fdf6395bd
Merge pull request #370 from ethanc8/ethanc8-3
Implement +[NSRegularExpression escapedPatternForString:] and -[NSString enumerateSubstringsInRange:options:usingBlock]
2024-05-12 09:32:34 +01:00
rfm
00a95fef78 trivial coding style fixups 2024-05-09 12:20:45 +01:00
hmelder
77e3453020 Remove FIXMEs 2024-05-08 16:06:44 +02:00
hmelder
6155329b64 NSIndexSet: Implement enumerateRangesInRange convenience methods 2024-05-08 16:06:44 +02:00
hmelder
f6eaa5bd03 NSURLSession: Call completion handler on failed request 2024-05-08 16:05:17 +02:00
rfm
6011b3c528 Protect bfd symbol lookup for thread safety 2024-05-07 11:24:26 +01:00
hmelder
a1dff584a4 GSFileURLHandle: Remove caching functionality 2024-05-06 18:06:50 +02:00
hmelder
a127d4ee75 GSFileURLHandle: Expose internal cache 2024-05-06 10:44:22 +02:00
hmelder
e1fcc2db35 GSFileURLHandle: Use NSCache and limit cache size 2024-05-06 10:38:07 +02:00
williameveretteggplant
21a48f6136
NotificationCenter removeObserver (#396)
This modifies the NotificationCenter class to do the following:

- add an ivar to the class for an array to hold observers that need to be released when they are removed
- adds an observer to that array if the observer is of class GSNotificationObserver
- upon removing an observer, check if it is in that array, if so remove it from the array and release it.

This replaces the previous implementation which checked the class of the observer as it was being removed, which would cause a crash if the observer had been deallocated.
2024-04-30 18:44:26 +02:00
rfm
a5beb6ab31 Fix for bug #399 2024-04-29 13:11:35 +01:00
hmelder
10eaba4f13 Fix dummy function signature 2024-04-28 23:22:20 +02:00
hmelder
8ec158ad05 Guard Windows Header Include 2024-04-28 23:22:20 +02:00
hmelder
8a93628ecb NSThread: Fix behaviour and Implement setName on Win32 2024-04-28 23:22:20 +02:00
Frederik Carlier
810a39b1f8
Map CURLE_COULDNT_CONNECT to NSURLErrorCannotConnectToHost (#388)
Map `CURLE_COULDNT_CONNECT` to `NSURLErrorCannotConnectToHost`.

When connecting to an IPv6 socket fails, curl easy will return `CURLE_COULDNT_CONNECT`.  GNUstep currently maps `easyCode == CURLE_COULDNT_CONNECT && failureErrno == ETIMEDOUT` to `NSURLErrorTimedOut`, in all other scenarios `CURLE_COULDNT_CONNECT` is not handled.

This would cause the `NSURLSession/test01` to fail on (certain) systems with IPv6 enabled.

This PR maps all other values of `CURLE_COULDNT_CONNECT` to `NSURLErrorCannotConnectToHost`.
Additionally, it also stores the value of `easyCode` in the `NSUnderlyingErrorKey` to make troubleshooting (slightly) easier.
2024-04-21 10:26:24 +01:00
hmelder
1d33c2095f Fix formatting 2024-04-17 23:32:56 +02:00
hmelder
279d91e0f3 NSTimeZone: Import NSScanner 2024-04-17 23:32:56 +02:00
hmelder
2918bd992e Refactor +[NSTimeZone timeZoneArray] 2024-04-17 23:32:56 +02:00
Frederik Seiffert
7842a79839 Removed obsolete GS_ARC_COMPATIBLE define (replaced by OBJC_CAP_ARC) 2024-04-15 09:55:14 +02:00
Frederik Seiffert
ec8a7a3e97 Add +[NSObject _TrivialAllocInit] to enable fast-path alloc / init methods with libobjc2 2.2 2024-04-15 09:55:14 +02:00
rfm
a2b8f34661 Some web servers send empty headers ... tolerate it. 2024-04-04 10:59:00 +01:00
Gregory Casamento
3c1db49f4f
Merge pull request #384 from qmfrederik/dummy-nsnetservices 2024-04-03 23:49:03 -04:00
rfm
d52708e020 Fix for #385 2024-04-02 11:07:14 +01:00
Frederik Carlier
97c01d8064
NSNetService and NSNetServiceBrowser: Gracefully fail when no-backend implementation
Always compile `NSNetService` and `NSNetServiceBrowser`, but have their
`intialize` method return `nil` if libavahi and mDNS are unavailable.

This:
- Results in a clear error message if code which was compiled against a
  copy of GNUstep with avahi/mDNS support runs on a copy of GNUstep which
  doesn't have avahi/mDNS support.
- Avoids code which uses `NSNetService` or `NSNetServiceBrowser` to
  successfully compile (because the classes are defined in the header)
  but then failing to link (because there is no implementation for these
  classes).
2024-03-31 11:37:23 +00:00
Frederik Carlier
07d17a16a7 Generate pkg-config configuration file for libs-base
This commit generates a `gnustep-base.pc` file which is installed in `/lib/pkgconfig` and contains the GNUstep base version number, the libraries to link (equivalent to `gnustep-config --base-libs`) with and the C flags to use (equivalent to `gnustep-config --objc-flags`).
2024-03-30 15:56:22 +00:00
rfm
61da0dab96 fix possible dereference of null pointer 2024-03-11 14:36:22 +00:00
hmelder
ca1d07dcf2 Implement +[NSDate now] 2024-03-11 11:48:28 +01:00
rfm
88b73acd8b more leak fixes 2024-03-04 11:52:42 +00:00
rfm
e8813346e5 more leak fixes 2024-03-04 10:49:58 +00:00