Commit graph

230 commits

Author SHA1 Message Date
rfm
901b7b6975 Don't build synchronisation.m ... I don't think we need it any more.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29673 72102866-910b-0410-8b05-ffd578937521
2010-02-19 15:30:27 +00:00
rfm
97e7df0ac3 Attempt to link in ObjC2 compatibility code if we have an older runtime.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29670 72102866-910b-0410-8b05-ffd578937521
2010-02-19 12:51:02 +00:00
rfm
47810e15de move a bit more stuff into additions
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29666 72102866-910b-0410-8b05-ffd578937521
2010-02-18 16:18:54 +00:00
rfm
5f3f4452c2 Backward compatibility fixups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29663 72102866-910b-0410-8b05-ffd578937521
2010-02-18 11:40:58 +00:00
rfm
126b991b12 remove obsolete invocation stuff
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29649 72102866-910b-0410-8b05-ffd578937521
2010-02-15 17:14:12 +00:00
rfm
c4e1e08185 Rewrite NSNumber code to compile on most systems and to mostly conform to
style/coding standards.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29639 72102866-910b-0410-8b05-ffd578937521
2010-02-15 10:58:34 +00:00
rfm
255df37b43 Restore working NSNumber pending fixes to new version to get it to compile
and conform to coding standards/style.  Should get svn trunk working again.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29629 72102866-910b-0410-8b05-ffd578937521
2010-02-14 16:32:02 +00:00
theraven
e486341176 Rewritten NSNumber implementation. This fixes several OS X-compatibility issues:
The -pointerValue method now returns the value cast to a pointer, not some random value, as the documentation says it should.  This is a change from OpenStep, which said:

> It's an error to send this message to an NSValue that doesn't store a pointer.

The OS X docs now say:

> The receiver's value as a pointer to void. If the receiver was not created to hold a pointer-sized data item, the result is undefined.

This means that any NSNumber created with a word-sized integer should return the same value.

Fixed a number of corner-cases in the compare: implementation caused by incorrect type promotion.  The OS X docs say:

> The compare: method follows the standard C rules for type conversion.

The OS X implementation does not do this.  We now match Apple's conversion rules bug-for-bug: Every value is stored in the smallest signed type that will hold it, unless there is no unsigned type that can hold it, in which case it is stored in an `unsigned long long`, comparisons between integer and floating point values cast both to a double, comparisons between integer types perform a real comparison (so an unsigned long long is always greater than any negative number, at any precision).  The Apple implementation is actually quite sane, it is just completely unrelated to the documentation in any way.

We now use the same range of reusable objects.  Note that there is an error in Cocoa Design Patterns in the description of how Apple's implementation works.  Do not use this as a reference.

We now return `nil` when an NSNumber is sent an -init message.  This is consistent with Apple's implementation but breaks some things in the GNUstep test suite (which RFM said he will fix).

There is a small change in NSValue.h so that the locale parameter is now an `id` not an `NSString*`.  This is because, under recent OS X, it may also be an `NSLocale` instance.  I am not sure how much GNUstep supports `NSLocale`, but this change shouldn't affect anything.

The new (private) GSNumberTypes.h file lets you define macros that are instantiated with each of the names of primitive C types.  These might be useful for simplifying other classes that have -intValue, -floatValue, and so on methods, such as the `NSCell` family.

The old NSConcreteNumberTemplate and NSConcreteNumber stuff has been removed.  The code is now a bit more than 10% of the size of the old NSNumber code, and is hopefully maintainable now, so the next change won't require a complete rewrite.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29618 72102866-910b-0410-8b05-ffd578937521
2010-02-14 12:57:44 +00:00
rfm
f13d56d8ec merge back reorganisation branch
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29615 72102866-910b-0410-8b05-ffd578937521
2010-02-14 10:48:10 +00:00
nicola
5f32b1f53d Preliminary fix for allowing to build libraries in parallel
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29553 72102866-910b-0410-8b05-ffd578937521
2010-02-11 17:50:01 +00:00
theraven
23b31db6b3 Added -enumerateObjectsUsingBlock: implementation to NSArray.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29174 72102866-910b-0410-8b05-ffd578937521
2009-12-27 15:25:12 +00:00
gcasa
b7894ad188 * Source/GNUmakefile: Add synchronization.m to GNU_MFILES
and correct some formatting.
	* Source/synchronization.m: Fix @synchronize support on
	Windows.   The __weak__ attribute doesn't work on Windows.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29140 72102866-910b-0410-8b05-ffd578937521
2009-12-19 18:52:05 +00:00
rfm
16ce1cd7b3 lrge changes to remove mframe
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28778 72102866-910b-0410-8b05-ffd578937521
2009-10-05 16:00:28 +00:00
rfm
2fc494c446 a bit step towards removing obsolete mframe code.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28774 72102866-910b-0410-8b05-ffd578937521
2009-10-04 15:26:07 +00:00
rfm
13da6efeaf fixups for old openbsd system
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28749 72102866-910b-0410-8b05-ffd578937521
2009-09-27 18:48:03 +00:00
rfm
0276710916 assum presence of pthreads
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28633 72102866-910b-0410-8b05-ffd578937521
2009-09-08 16:32:56 +00:00
theraven
a0ab47ec7e Added NSCache (OS X 10.6) implementation.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28581 72102866-910b-0410-8b05-ffd578937521
2009-08-31 21:45:53 +00:00
gcasa
ee3edf222b * Headers/Foundation/Foundation.h
* Headers/Foundation/NSOperation.h
	* Source/GNUmakefile
	* Source/NSOperation.m: Initial implementation of NSOperation
	class.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28393 72102866-910b-0410-8b05-ffd578937521
2009-07-13 18:14:42 +00:00
nicola
0161f1793f Very minor portability tweak for GNUmakefiles
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28309 72102866-910b-0410-8b05-ffd578937521
2009-05-29 10:17:21 +00:00
rfm
e8145da819 makefile include fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28286 72102866-910b-0410-8b05-ffd578937521
2009-05-16 19:25:07 +00:00
rfm
a12d7ae190 Add some info output
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28267 72102866-910b-0410-8b05-ffd578937521
2009-05-04 07:23:46 +00:00
rfm
a4baaba7c5 more GC updates
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28223 72102866-910b-0410-8b05-ffd578937521
2009-04-16 09:07:13 +00:00
rfm
1549f5b5e7 Implement OSX10.5 NSMapTable API
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28086 72102866-910b-0410-8b05-ffd578937521
2009-03-16 10:54:59 +00:00
rfm
5010ea5718 concrete pointer functions class added ... incomplete
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27834 72102866-910b-0410-8b05-ffd578937521
2009-02-10 19:47:01 +00:00
rfm
a2e18e58d5 Add skeletal NSXML work as requested.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27824 72102866-910b-0410-8b05-ffd578937521
2009-02-09 16:16:11 +00:00
rfm
ed994b6d46 add NSPointerArray
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27660 72102866-910b-0410-8b05-ffd578937521
2009-01-23 17:49:37 +00:00
rfm
69e6876332 NSPointerFunctions added
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27655 72102866-910b-0410-8b05-ffd578937521
2009-01-22 18:43:47 +00:00
rfm
9ce6f3cc46 Add new class from macos-x
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27585 72102866-910b-0410-8b05-ffd578937521
2009-01-12 21:35:51 +00:00
rfm
d304d9ee34 garbage collection fixups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27578 72102866-910b-0410-8b05-ffd578937521
2009-01-12 12:48:46 +00:00
rfm
de720ef330 Separate out path configuration for ease of maintenance and quicker rebuild.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27553 72102866-910b-0410-8b05-ffd578937521
2009-01-07 12:26:30 +00:00
gcasa
9cca673155 Add comparison methods category for compatibility with OS X.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27424 72102866-910b-0410-8b05-ffd578937521
2008-12-25 23:38:58 +00:00
nicola
c2ee21b98b Removed GNUSTEP_CORE_SOFTWARE=YES from makefiles and instead set PACKAGE_NAME=gnustep-base
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27346 72102866-910b-0410-8b05-ffd578937521
2008-12-19 12:53:30 +00:00
nicola
0b340cc465 Set GNUSTEP_CORE_SOFTWARE to YES so that gnustep-base is installed by default in SYSTEM if gnustep-make has been configured with --disable-packages
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27333 72102866-910b-0410-8b05-ffd578937521
2008-12-18 18:37:45 +00:00
rfm
449681e8d7 Add exclusive mode for windows
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27241 72102866-910b-0410-8b05-ffd578937521
2008-12-07 06:50:14 +00:00
rfm
5b7d645d3d Don't override installation domain
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27148 72102866-910b-0410-8b05-ffd578937521
2008-11-27 13:53:17 +00:00
gcasa
500adbbfd3 Add @synchronize support. The synchronize.m file will be committed to GCC as soon as Andrew P. looks at it and it is tested fully. I am committing it here for cases where the compiler can parse @synchronize, but doesn't have the necessary functions in the runtime.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26869 72102866-910b-0410-8b05-ffd578937521
2008-09-24 04:38:27 +00:00
rfm
e0711a3b8d allow developers more time to adapt to LGPLv3
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26606 72102866-910b-0410-8b05-ffd578937521
2008-06-08 10:38:33 +00:00
rmottola
f124f367a6 Added FoundationErrors.h
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26349 72102866-910b-0410-8b05-ffd578937521
2008-03-18 20:34:35 +00:00
nicola
b8183cde37 Do not link anything against libgnustep-gui in any circumstances - at least if we're running a gnustep-make recent enough that we can control it.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26100 72102866-910b-0410-8b05-ffd578937521
2008-02-19 11:01:07 +00:00
rfm
46164184d4 Hack for mswindows without getnameinfo
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25923 72102866-910b-0410-8b05-ffd578937521
2008-01-10 16:05:41 +00:00
rfm
2243657e33 Simplify
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25855 72102866-910b-0410-8b05-ffd578937521
2008-01-04 10:28:27 +00:00
rfm
cd46236028 Update to GPL3 and LGPL3
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25482 72102866-910b-0410-8b05-ffd578937521
2007-09-14 11:36:11 +00:00
fredkiefer
bcb8518b51 Add NSErrorRecoveryAttempting protocol.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25353 72102866-910b-0410-8b05-ffd578937521
2007-07-25 12:48:57 +00:00
nicola
661c84a01d Implemented experimental library resource bundle versioning
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24841 72102866-910b-0410-8b05-ffd578937521
2007-03-09 19:09:08 +00:00
rfm
aad9626e15 Moved fiels for macos compatibility
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24759 72102866-910b-0410-8b05-ffd578937521
2007-03-04 15:26:35 +00:00
nicola
11e4f42b7c Updated configure and makefiles in the case when GNUSTEP_MAKEFILES is not set
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24660 72102866-910b-0410-8b05-ffd578937521
2007-02-20 00:09:10 +00:00
rfm
3c33db790d Use new make facilities if available, os that things should work if people
forget to source GNUstep.sh or set GNUSTEP_MAKEFILES


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24652 72102866-910b-0410-8b05-ffd578937521
2007-02-19 14:26:53 +00:00
rfm
707d090214 FHS suppoort update
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24599 72102866-910b-0410-8b05-ffd578937521
2007-02-16 08:09:55 +00:00
nicola
452f284e2d Added new xxx_INSTALL_DIR variables for resources to get it working with new gnustep-make
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24548 72102866-910b-0410-8b05-ffd578937521
2007-02-14 12:07:33 +00:00
rfm
684766313b Initial attempt at integration of NSNetServices support.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24272 72102866-910b-0410-8b05-ffd578937521
2006-12-27 14:11:14 +00:00