Commit graph

2245 commits

Author SHA1 Message Date
Gregoro John Casamento
532b85c7a9 Win64 fixes for GNUstep 2019-03-14 08:47:41 -04:00
Ivan Vučica
9d67048ff0 GSTLS.h: Change guard to check for /value/ of GS_USE_GNUTLS.
Previously, code checked for whether its defined or not. This
preprocessor  constant might be defined with a zero value
indicating desire not to use GnuTLS, which would still pass the
old check.
2019-02-12 19:19:01 +00:00
Richard Frith-Macdonald
d5db493e18 Fix preprocessor constant used to protect gnutls use 2019-01-16 16:20:42 +00:00
Richard Frith-Macdonald
6f3bd6ac97 Expose GNU TLS wrappers and add methods to get certificate expiry 2019-01-16 09:56:08 +00:00
David Chisnall
3847c54f3f Add NSConstantString implementation for v2 ABI.
This is largely the version from the newabi branch, but with a few
cleanups made possible by other bug fixes in the GSString
implementations.
2018-12-27 13:44:45 +00:00
Wolfgang Lux
a27c577370 Remove reference to the copyWithZone: implementation of NSObject 2018-12-06 14:19:50 +01:00
Richard Frith-Macdonald
458b8a1e79 expose gnustep specific methods for old code 2018-12-05 10:43:59 +00:00
Richard Frith-Macdonald
280b2cbe83 Changes for keeping a connection in use 2018-12-04 13:34:53 +00:00
Fred Kiefer
a6106f550e
Merge branch 'master' into nscalendar-withIdentifier 2018-06-15 10:02:10 +02:00
Richard Frith-Macdonald
ed286536e2 Add GSTLSServerName option 2018-05-18 20:26:35 +01:00
Graham Lee
c5fac90b86 add +[NSCalendar calendarWithIdentifier:] 2018-04-30 18:02:28 +01:00
Riccardo Mottola
6f7e480913 Detect if platform is missing spin locks and provide an dummy implementation. Emit warning during compilation and runtime (in debug) 2018-04-23 20:37:28 +02:00
David Chisnall
970c8cbd05 Revert "Fix memory corruption in NSException."
Accidentally included unrelated changes.

This reverts commit 3b1e94ec5d.
2018-04-07 20:03:33 +01:00
David Chisnall
3b1e94ec5d Fix memory corruption in NSException.
If compiling without backtrace or BFD support, we initialise the
location to store return addresses incorrectly, leaving a dangling
pointer which we then right over.

Most consumers never read this, so it seemed to work most of the time by
just overwriting a random bit of memory.

This probably has security implications, because throwing an exception
can clobber random bits of memory, though not with attacker-controlled
data.
2018-04-07 11:02:04 +01:00
Richard Frith-Macdonald
cc7a146796 More changes to make lock tracking more robust 2018-04-04 14:42:20 +01:00
Richard Frith-Macdonald
d6612ef880 Fixes in experimental code 2018-03-27 09:55:29 +01:00
Richard Frith-Macdonald
76014b0983 add missing declaration 2018-03-26 20:12:50 +01:00
Richard Frith-Macdonald
05439fe15d Experimental deadlock detection code 2018-03-26 15:20:48 +01:00
Richard Frith-Macdonald
81102fae85 improve logging of http comms and of deadlocks 2018-03-16 15:11:02 +00:00
Richard Frith-Macdonald
7c1b9b4d15 fix style errors 2018-03-15 14:09:14 +00:00
Richard Frith-Macdonald
1937b36b86 Update assertion macros to support multiple arguments 2018-02-06 09:35:34 +00:00
Richard Frith-Macdonald
d8e7607582 Tweaks to let comp[iler know that methods to raise an exception don't return. 2018-01-25 10:05:52 +00:00
Richard Frith-Macdonald
925f1dd5e1 Add Yavor Doganov's patches for tests and config. Add fixes for GSXML
validation of xml documents
2018-01-14 12:30:13 +00:00
Richard Frith-Macdonald
31257785d6 External entity resolution turned off by default for security 2018-01-11 16:39:21 +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
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
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
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
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
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
Daniel Ferreira
be874e5d8f NSDate: declare system clock change notification
Declare a system clock change notification. Base still does not emit
this notification, but this allows applications that wait for it not to
have their build broken.
2017-06-29 21:18:16 +01:00
Daniel Ferreira
58db96f385 NSObjCRuntime: create NS_ROOT_CLASS macro
Create the NS_ROOT_CLASS macro, a wrapper around the objc_root_class
compiler attribute.
2017-06-29 21:18:16 +01:00