Commit graph

10422 commits

Author SHA1 Message Date
David Chisnall
c3921ee1f7 Refactor refcount usage.
This makes it easier for the runtime to change how reference counts are
stored by removing any refcount manipulation from -base when the runtime
provides accessors.  This should have no functionality change with
existing runtimes, but will let newer runtimes drop in alternative
representations easily.
2017-12-13 17:19:43 +00:00
David Chisnall
98205ac266 Fix a bug in NSMapTable.
In the simple constructors, we were using the pointer functions that use
pointer equality and a hash derrived from the pointer, rather than -isEqual:
and -hash.  This led to some subtle and confusingly broken behavior.
2017-12-11 16:30:18 +00:00
David Chisnall
6f206829f8 Avoid conflicts with runtime header.
Don't duplicate definitions from objc/blocks_runtime.h if it exists.
2017-12-11 16:30:18 +00:00
fredkiefer
97f9a02308 Add new symbolic link method to NSFileManager. 2017-12-03 21:55:33 +01:00
davidchisnall
4b56172ac8
Merge pull request #13 from zenny-chen/master
Get compatible with Apple LLVM API
2017-11-24 20:03:17 +00:00
Zenny Chen
fd5744356f
Update blocks_runtime.m 2017-11-19 13:14:17 +08:00
Zenny Chen
d0d7238172
Update GSBlocks.m
Compatible to the new-updated GSBlocks.h
2017-11-19 01:19:44 +08:00
Zenny Chen
4c0dc51305
Update blocks_runtime.m
Get compatible with new-updated Blocks API
2017-11-19 01:01:39 +08:00
Zenny Chen
f5428c1616
Update blocks_runtime.h
Get compatible with Clang
2017-11-19 00:16:20 +08:00
Zenny Chen
eb2c218781
Update GSBlocks.h
Get compatible with Clang
2017-11-19 00:13:21 +08:00
Richard Frith-Macdonald
9bbcd75d16 Fix for failure to check insertion point is at an existing item. 2017-11-16 14:56:20 +00:00
fredkiefer
7c68c30928 Protect against GSPrivateNativeCStringEncoding() corrupting the return
value of setlocale(). Bug #52331 reported by Jakub Wilk <jwilk@jwilk.net>.
2017-11-04 23:53:12 +01:00
stefanbidi
ded6cf852a * ChangeLog: Include ChangeLog entry for previous commit. 2017-10-26 11:06:08 -04:00
stefanbidi
8eed1d780c * Source/NSDateFormatter.m: Fix how UDateFormat is created. Fixes bug #52011. 2017-10-24 18:15:44 -04:00
Richard Frith-Macdonald
8bd7c048ac Improve handling of messaging to blocked thread 2017-09-06 09:32:07 +01:00
fredkiefer
78ce414d7d Merge pull request #10 from theiostream/more-defs
Add more definitions for WebKit
2017-08-27 17:30:47 +02:00
Stefan Bidigaray
952884dd6a Fix bug in NSLocale ISO codes methods. 2017-08-24 11:03:11 -04:00
Daniel Ferreira
f07da76c12 Update ChangeLog 2017-08-24 05:14:34 +10:00
Daniel Ferreira
0888a7761f NSURLDownload: export NSURLDownloadDelegate protocol
As of macOS 10.7, NSURLDownloadDelegate is exposed formally as a
protocol. This adds the declaration to make this true for GNUstep.
2017-08-24 05:14:13 +10:00
Daniel Ferreira
6762a35539 NSTextCheckingResult: define missing constants
Define missing constants in the NSTextCheckingResult header.
2017-08-24 05:14:13 +10:00
Richard Frith-Macdonald
10b865e2d5 Merge branch 'master' of ssh://github.com/gnustep/libs-base
Conflicts:
	ChangeLog
2017-08-21 11:27:13 +01:00
Richard Frith-Macdonald
f170693bca Fix error with Location header 2017-08-21 11:25:44 +01:00
Daniel Ferreira
9fe015296b Update ChangeLog 2017-08-05 04:15:44 +10:00
Daniel Ferreira
49a8940156 NSObjCRuntime: add availability macro definitions
Add empty definitions for OSX Availability macros for compatibility
purposes.
2017-08-05 04:15:36 +10:00
Wolfgang Lux
4e383e19d0 Fix incorrect unicode escape sequence, use common smiley character 2017-07-10 15:06:13 +02:00
Wolfgang Lux
bc285396da Characters outside the BMP cannot be converted to Latin 1 string encoding 2017-07-10 10:16:27 +02:00
Riccardo
6b455a589d Fix GetTickCount()/GetTickCount64() for different Windows versions 2017-07-07 10:50:10 +02:00
Richard Frith-Macdonald
99a3655108 surrogate pair test 2017-07-06 16:15:51 +01:00
Richard Frith-Macdonald
b19b4af0b0 ChaneLog entry for recent NSObject.m change 2017-07-04 09:16:09 +01:00
Richard Frith-Macdonald
cc2ee1d59b Improve diagnostic if reference count is incremented too far. 2017-07-03 14:33:32 +01:00
Richard Frith-Macdonald
c82dd20280 Avoid bogus compiler warning about string literal comparison 2017-06-30 07:37:05 +01:00
Daniel Ferreira
a8c2c4965d Update ChangeLog 2017-06-29 21:18:16 +01:00
Daniel Ferreira
270c1bcea9 NSFileManager: implement -attributesOfFileSystemForPath:withError:
Implement a method for getting attribytes of a file system path. Reuse
the implementation of -fileSystemAttributesAtPath: for this purpose but
export the last system errors to the caller. Make
-fileSystemAttributesAtPath: use the new implementation, without
exposing error info to the caller.
2017-06-29 21:18:16 +01:00
Daniel Ferreira
7636967f30 api: generate stubs for new classes
Generate class stubs (without any method definition) for
NSFileCoordinator, NSFilePresenter, NSFileVersion and NSURLSession.
2017-06-29 21:18:16 +01:00
Daniel Ferreira
e2831f34c1 NSURLConnection: expose NSURLConnectionDelegate as a protocol
Currently, NSURLConnectionDelegate methods were defined as a category of
an NSObject. The same definitions were copied over to a new
NSURLConnectionDelegate protocol, introduced in OSX 10.7.
2017-06-29 21:18:16 +01:00
Daniel Ferreira
8bd630f004 NSURLCredential: add stub for keychain-stored credential
Declare the NSURLCredentialPersistenceSynchronizable enumeration case to
NSURLCredential persistence options. Since GNUstep does not support
iCloud synchronization for credentials, this case will default to
NSURLCredentialPersistencePermanent.
2017-06-29 21:18:16 +01:00
Daniel Ferreira
814c19ecce NSURLProtectionSpace: improve authentication method handling
Improve handling of NSURL authentication methods. Make "HTMLForm"
authentication a no-op as it should be instead of making it fall back to
Basic authentication.

Add stubs for NTLM and Negotiate IIS methods. They should be easily
implementable given the current framework for authentication methods.

Add stubs for ClientCertificate and ServerTrust authentication methods.
A blocker for supporting them is the lack of a Security.framework
implementation (since they rely on SecTrustRef). They would also require
additions to the current SSL handling code for GNUstep https requests.
Also stub the -distinguishedNames property of NSURLProtectionSpace,
which also deals with certificate-related authentication methods.
2017-06-29 21:18:16 +01:00
Daniel Ferreira
aa70ff5300 NSURLRequest: add new values for NSURLCachePolicy
Add new values for the NSURLCachePolicy enum. Although
NSURLRequestReloadIgnoringLocalAndRemoteCacheData and
NSURLRequestReloadRevalidatingCacheData have been left unimplemented,
the same applies for the reference platform, so not supporting it does
not break API compatibility.
2017-06-29 21:18:16 +01:00
Daniel Ferreira
8df9e6d73d NSZone: implement NSMakeCollectable()
Implement NSMakeCollectable(), an interface which makes CoreFoundation
objects eligible for garbage collection.

Since garbage collection is a totally deprecated API, its implementation
is a no-op, which may cause objects that rely on it to leak. However, it
doesn't look like supporting actual garbage collection at this point
will bring a gain to the project -- and having this function available
will avoid breaking builds that rely on it.
2017-06-29 21:18:16 +01:00
Daniel Ferreira
d49db3ab29 NSProcessInfo: add stubs for new APIs
Add stubs for sudden termination APIs and for application activity
management methods.
2017-06-29 21:18:16 +01:00
Daniel Ferreira
cbfa4d8cc9 NSProcessInfo: implement getting system uptime
Introduce the systemUptime property to NSProcessInfo, which can compute
platform-independently what is the uptime of the system.
2017-06-29 21:18:16 +01:00
Daniel Ferreira
277ae581a6 NSHTTPCookie: fix bug in Set-Cookie parser
Fix a bug in NSHTTPCookie's Set-Cookie parser where it would fail to
parse more than one key-only cookie (such as "Secure; HTTPOnly;") in a
header.
2017-06-29 21:18:16 +01:00
Daniel Ferreira
644b676949 NSHTTPCookie: add support for HTTPOnly cookies
Add support for parsing HTTPOnly cookies (those that cannot be accessed
by clients). Implement -[NSHTTPCookie isHTTPOnly].
2017-06-29 21:18:16 +01:00
Daniel Ferreira
fae4ff3371 NSHTTPCookie: make -isSessionOnly and -isSecure properties
Make -[NSHTTPCookie isSessionOnly] and -[NSHTTPCookie isSecure] methods
become properties if possible, so that they can be also queried as
`cookie.sessionOnly` and `cookie.secure`. This increases compatibility
with applications that rely on this notation.
2017-06-29 21:18:16 +01:00
Daniel Ferreira
3111003ca1 NSFileManager: create NSFileManagerDelegate
Create NSFileManagerDelegate, a more modern manner to verify whether to
proceed a file operation after an error or whether an operation should
actually be performed by NSFileManager.

No functionality using the delegate is yet implemented.
2017-06-29 21:18:16 +01:00
Daniel Ferreira
2ec3c7bc27 NSURL: create stub for -getResourceValue:forKey:error:
Create an unimplemented stub for NSURL's -getResourceValue:... method,
which can gather a numerous set of information about a URL.

Define the constants which are passed into -getResourceValue:... for
requiring information so that a build that relies on this method does
not break.
2017-06-29 21:18:16 +01:00
Daniel Ferreira
41a00e1ad3 NSURL: create .fileURL property
Create the NSURL.fileURL property to increase compatibility with
applications that rely on this.
2017-06-29 21:18:16 +01:00
Daniel Ferreira
064df5ba69 NSURL: add stubs for alias functions
The OSX filesystem implements "aliases", a species of symlink which
tracks its source if it was moved. Create stubs for the NSURL functions
which handle these aliases.
2017-06-29 21:18:16 +01:00
Daniel Ferreira
e813dde02c NSURL: implement +fileURLWithPath:isDirectory:
Implement +[NSURL fileURLWithPath:isDirectory:], a class method added in
OSX 10.5, which was missing from the implementation.
2017-06-29 21:18:16 +01:00
Daniel Ferreira
314f437f43 NSCoder: implement NSSecureCoding stub
Implement stubs for NSSecureCoding which do not break projects that rely
on it.
2017-06-29 21:18:16 +01:00