Commit graph

7221 commits

Author SHA1 Message Date
Richard Frith-Macdonald
f319725536 copying the local time zone just, returns it 2017-12-19 11:42:53 +00:00
Graham Lee
186d840ce6
Merge branch 'master' into json-signed-integers 2017-12-18 12:56:28 +00:00
David Chisnall
25e67bd107 Refactor weak symbol usage.
The Linux run-time linker doesn't allow weak references in one library
to be overridden by ones in another.  To work around this, we now
declare the runtime functions as weak and perform dynamic checks on
whether the symbols have been resolved and call the fallbacks as local
static functions if they are not present.
2017-12-17 10:57:25 +00:00
David Chisnall
e35eb61dbc Make object allocation and deallocation use the runtime.
All objects are now created and destroyed by the runtime, so we have
clean layering between -base and libobjc.
2017-12-13 18:22:08 +00:00
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
fredkiefer
97f9a02308 Add new symbolic link method to NSFileManager. 2017-12-03 21:55:33 +01:00
Graham Lee
05184a7e1a fix overflow of integer types when writing large unsigned long longs to JSON 2017-11-25 21:23:46 +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
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
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
Stefan Bidigaray
952884dd6a Fix bug in NSLocale ISO codes methods. 2017-08-24 11:03:11 -04:00
Richard Frith-Macdonald
f170693bca Fix error with Location header 2017-08-21 11:25:44 +01: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
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
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
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
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
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
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
5ab00e2c49 NSCalendar: add new calendar identifier constants
Add new calendar identifier constants to NSCalendar, to add
compatibility for newer OSX applications. Some identifiers do not hold
parity with the older equivalents and have been left unimplemented, with
the gregorian calendar as a fallback.
2017-06-29 21:18:16 +01:00
Daniel Ferreira
a9df1b104a NSGeometry: create NSEdgeInsets struct
Create the NSEdgeInsets struct in NSGeometry, introduced in OSX 10.7.
Add helper functions for creating these insets.

This struct is not used in Base. Rather, it is used as part of newer
APIs in GUI.
2017-06-29 21:18:16 +01:00
Richard Frith-Macdonald
383c3246ee partial fix for compiler without properties 2017-06-25 15:17:12 +01:00
Richard Frith-Macdonald
e1e0315e34 Use new NSFileManager behavior rather than operating system specific calls. 2017-06-21 11:25:05 +01:00
Richard Frith-Macdonald
24d29934cf Fix directory creation to match actual OSX sematics as determined by adding
a few testcases ...
The basic method should fail if the directory already exists.
The intermediate directories method should fail if the directory exists unless
the option to create intermediate directories is selected, in which case a
pre-existing directory is counted as a success.
2017-06-18 09:13:57 +01:00
Richard Frith-Macdonald
ed721bf4da Fix directory creation to use low level methods which consider the presence
of an existing directory to be an error, rather than the NSFileManager methods
that consider it a success.  The logic of distributed locking requires us to
fail if a directory already exists.
2017-06-17 06:52:05 +01:00
Richard Frith-MacDonald
a5a2e85423 improve debug log
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@40510 72102866-910b-0410-8b05-ffd578937521
2017-05-19 16:20:17 +00:00
Richard Frith-MacDonald
9400f9105d Make TLS client certificate issuer/owner names available
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@40508 72102866-910b-0410-8b05-ffd578937521
2017-05-19 11:38:48 +00:00
Richard Frith-MacDonald
1f786ad7a8 fixes for #47618
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@40462 72102866-910b-0410-8b05-ffd578937521
2017-04-09 12:45:18 +00:00
Richard Frith-MacDonald
073fb54804 apply bug #49021
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@40461 72102866-910b-0410-8b05-ffd578937521
2017-04-09 09:56:55 +00:00
Richard Frith-MacDonald
c6b8f4fb03 fix memory leak
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@40433 72102866-910b-0410-8b05-ffd578937521
2017-04-03 20:23:31 +00:00
Riccardo Mottola
b5b9126290 Correct format specifier to char*
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@40432 72102866-910b-0410-8b05-ffd578937521
2017-04-01 14:09:01 +00:00
Richard Frith-MacDonald
71d1d5c42b implement methods to create a stream to read from a URL
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@40420 72102866-910b-0410-8b05-ffd578937521
2017-03-27 09:44:13 +00:00
Richard Frith-MacDonald
173079f8f5 fix swapped arguments (spotted by Fred in testplant changes)
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@40419 72102866-910b-0410-8b05-ffd578937521
2017-03-27 09:27:12 +00:00
Richard Frith-MacDonald
7c9d7acafa Update NSComparisonResult to use NS_ENUM
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@40418 72102866-910b-0410-8b05-ffd578937521
2017-03-27 09:00:35 +00:00