Commit graph

587 commits

Author SHA1 Message Date
Nicola Pero
0a0a147ae9 Updated for GCC 4.6
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31771 72102866-910b-0410-8b05-ffd578937521
2010-12-24 17:19:40 +00:00
Nicola Pero
30f098f9f8 Updated code to compile with GCC 4.6 and the new GNU Objective-C runtime
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31765 72102866-910b-0410-8b05-ffd578937521
2010-12-23 02:23:05 +00:00
Richard Frith-MacDonald
34457079a7 fix possible memory corruption
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31703 72102866-910b-0410-8b05-ffd578937521
2010-12-03 23:28:43 +00:00
Richard Frith-MacDonald
76b2adf16f cleanup foundation includes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31682 72102866-910b-0410-8b05-ffd578937521
2010-11-28 09:30:05 +00:00
Richard Frith-MacDonald
895a0f38ff add delivery notification requests and fix memory leak.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31571 72102866-910b-0410-8b05-ffd578937521
2010-10-28 22:50:38 +00:00
Richard Frith-MacDonald
b7f4faa90b Fix setup of HAVE_ICU
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31567 72102866-910b-0410-8b05-ffd578937521
2010-10-27 11:24:44 +00:00
Jonathan Gillaspie
9ef94a8e95 Prevent SegFault when FormatMessageW doesn't return a string on Windows.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31537 72102866-910b-0410-8b05-ffd578937521
2010-10-19 21:21:32 +00:00
Richard Frith-MacDonald
51287760d4 attempted fix for bug #31266
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31505 72102866-910b-0410-8b05-ffd578937521
2010-10-12 19:19:02 +00:00
Richard Frith-MacDonald
9c8d4406d5 add arbitrary struct set/get
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31504 72102866-910b-0410-8b05-ffd578937521
2010-10-12 13:34:01 +00:00
Richard Frith-MacDonald
7960aa3ec6 Re-instate change from svn revision 31412 (just trusting it's OK).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31502 72102866-910b-0410-8b05-ffd578937521
2010-10-12 11:55:04 +00:00
Richard Frith-MacDonald
0222fe1e6d Fix broken KVC
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31460 72102866-910b-0410-8b05-ffd578937521
2010-10-01 12:01:02 +00:00
Richard Frith-MacDonald
cc451397a4 bugfix
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31445 72102866-910b-0410-8b05-ffd578937521
2010-09-30 06:51:34 +00:00
Richard Frith-MacDonald
42828af0cc minor optimisations
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31433 72102866-910b-0410-8b05-ffd578937521
2010-09-28 13:23:53 +00:00
David Chisnall
7563e320b5 Add special case to KVC accessors for libobjc2: If there is a method with the
wrong types, try calling the method with the correct types.  This enables the
TDD-fixup code to run and generate a KVC-compliant version of an existing
method.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31412 72102866-910b-0410-8b05-ffd578937521
2010-09-24 19:31:46 +00:00
David Chisnall
ec239ebfaf Simplify the KVC getter code and make it return structs boxed in NSValues
(Apple-compatible).  This is currently slow, because we go via NSInvocation.
We could probably make it faster, but I am not inclined to optimise for
something that I sincerely hope is a very unusual use case.

Richard: Please check I haven't done something silly here...



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31411 72102866-910b-0410-8b05-ffd578937521
2010-09-24 19:20:16 +00:00
Richard Frith-MacDonald
8177a34a8f tweaks to avoid clang warnings
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31293 72102866-910b-0410-8b05-ffd578937521
2010-09-10 12:47:04 +00:00
David Chisnall
4488708e84 Fix a load of warnings from implicit function declarations. A lot were caused by ctype.h and string.h stuff being used everywhere in GNUstep but not included anywhere - they're now included in common.h (at least string.h should also be in Foundation.h - on OS X it is implicitly included via some chain of things from Foundation.h).
All of the sel_* stuff is now replaced with the newer APIs.  As a side-effect, a blob of code that was copied-and-pasted all over GNUstep has now been moved into ObjectiveC2 and just called.

Class posing with libobjc2 will now throw an exception, rather than just aborting.  



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31268 72102866-910b-0410-8b05-ffd578937521
2010-09-09 16:30:10 +00:00
David Chisnall
7a80adeb9b A huge blob of changes to make -base build with libobjc2, without using the old libobjc2 headers.
Most of these changes involve simply removing direct manipulation of any runtime structures and replacing them with runtime function calls.  For example class->name becomes class_getName(class) and so on.

libobjc2, like the Apple runtime, the NeXT runtime, and every version of the Objective-C spec, calls the class pointer in id isa.  A few files now have #define class_pointer isa at the top.  This line replaces class_pointer in the old GNU libobjc headers with isa so either class_pointer or isa can be used for accessing the class of an object.  Note: object_getClass() should be used in most cases because, in some future version of the runtime, this will skip things like lock classes and other hidden classes (e.g. KVO classes).

All of the old forwarding stuff has been removed.  Most of this stuff followed convoluted code paths that ended with an exception.  A few simply broke in exciting ways.  Hopefully no one has used them for the last ten years or so, but we can bring them back with some #ifndef stuff if they're really needed by anyone.

There is currently a bug in configure, which prevents dladdr() from being detected, so you need to manually tweak config.h to build - I have not fixed the fall-back code in objc-load.m to work with libobjc2, I just added a new version that uses the loader's functionality directly.  

Although -base now builds, it builds with a lot of warnings.  <string.h> is missing from a lot of files, so memcpy() and strlen() generate implicit function declaration warnings.  

Additionally, libobjc2 does still provide the sel_{get,register}_*() functions, but they're wrappers around the newer API ones.  These are deprecated and are not exposed in the headers.  Although they work, we should be replacing them with the libobjc2 versions as soon as possible.

This incorporates a patch by Eric.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31265 72102866-910b-0410-8b05-ffd578937521
2010-09-09 15:06:09 +00:00
Eric Wasylishen
345563c947 * Source/ObjectiveC2/runtime.h:
* Source/ObjectiveC2/runtime.m:
Implement protocol_copyMethodDescriptionList, protocol_copyProtocolList,
protocol_getMethodDescription, as well as a dummy version of
objc_copyProtocolList.
* Headers/Additions/GNUstepBase/GSObjCRuntime.h:
* Source/Additions/GSObjCRuntime.m:
Implement a convenience method, GSProtocolGetMethodDescriptionRecursive



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31254 72102866-910b-0410-8b05-ffd578937521
2010-09-08 20:30:19 +00:00
Richard Frith-MacDonald
6534f59613 fixup for error logging
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30913 72102866-910b-0410-8b05-ffd578937521
2010-07-03 05:54:56 +00:00
Richard Frith-MacDonald
069f03975c Improve detection of timezone on some systems.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30765 72102866-910b-0410-8b05-ffd578937521
2010-06-16 10:45:58 +00:00
Richard Frith-MacDonald
8da4b69f43 fix last change
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30737 72102866-910b-0410-8b05-ffd578937521
2010-06-15 13:02:36 +00:00
Richard Frith-MacDonald
21cc7900a3 fix potential problem deleting header
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30735 72102866-910b-0410-8b05-ffd578937521
2010-06-15 12:06:12 +00:00
Richard Frith-MacDonald
15f4308a20 various bugfixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30732 72102866-910b-0410-8b05-ffd578937521
2010-06-15 11:26:00 +00:00
Richard Frith-MacDonald
a3b778ce05 fix bad indirection
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30700 72102866-910b-0410-8b05-ffd578937521
2010-06-14 07:09:05 +00:00
Richard Frith-MacDonald
dcf5647de3 tweak for performance
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30673 72102866-910b-0410-8b05-ffd578937521
2010-06-11 12:00:02 +00:00
Richard Frith-MacDonald
aa3592307c minor optimisation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30671 72102866-910b-0410-8b05-ffd578937521
2010-06-11 10:49:21 +00:00
Richard Frith-MacDonald
fc6036c78d Fix equality check for mime documents.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30645 72102866-910b-0410-8b05-ffd578937521
2010-06-10 09:28:15 +00:00
Dave Wetzel
e3a7134ee5 * Source/Additions/GSXML.m:
check for NULL string
	stringWithUTF8String: raises on OSX if you feed it with a NULL string.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30641 72102866-910b-0410-8b05-ffd578937521
2010-06-09 20:40:41 +00:00
Richard Frith-MacDonald
8442e27d12 reduce copying while decoding multipart mime
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30639 72102866-910b-0410-8b05-ffd578937521
2010-06-09 17:34:19 +00:00
Richard Frith-MacDonald
d2a49f16a8 Fixes for bug #29845 and mime parsing improvements.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30635 72102866-910b-0410-8b05-ffd578937521
2010-06-09 15:03:37 +00:00
Richard Frith-MacDonald
fb4c91aeb4 Attempt to support OpenStep style property lists on OSX
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30520 72102866-910b-0410-8b05-ffd578937521
2010-06-01 09:43:28 +00:00
Richard Frith-MacDonald
aa0e8d0de1 support OSX encoding names in addition to IANA registered names.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30510 72102866-910b-0410-8b05-ffd578937521
2010-05-31 09:01:46 +00:00
Richard Frith-MacDonald
3c6801eae6 Revert code which belongs in gdl2 rather than base
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30508 72102866-910b-0410-8b05-ffd578937521
2010-05-31 07:18:54 +00:00
Dave Wetzel
64f6e96d0a added encodingNamed:
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30507 72102866-910b-0410-8b05-ffd578937521
2010-05-31 06:34:28 +00:00
Richard Frith-MacDonald
6388ec9d4f various minor bugfixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30470 72102866-910b-0410-8b05-ffd578937521
2010-05-29 06:42:38 +00:00
Richard Frith-MacDonald
b4c85fde93 attempt fix for bug #29910
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30425 72102866-910b-0410-8b05-ffd578937521
2010-05-19 07:01:23 +00:00
Wolfgang Lux
b32ebbe2d7 Fix bug in GSObjCAllSubclassesOfClass that made it return all
superclasses instead of all subclasses.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30267 72102866-910b-0410-8b05-ffd578937521
2010-05-01 09:42:52 +00:00
Richard Frith-MacDonald
87a9c8eb99 Fix error spotted by Fred.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30264 72102866-910b-0410-8b05-ffd578937521
2010-04-30 08:29:17 +00:00
Richard Frith-MacDonald
25b1c8549e fix for #29720
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30263 72102866-910b-0410-8b05-ffd578937521
2010-04-30 07:30:27 +00:00
Richard Frith-MacDonald
6aa7aea38c fix OSX specific file to not build elsewhere
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30223 72102866-910b-0410-8b05-ffd578937521
2010-04-23 15:59:50 +00:00
Dave Wetzel
9e723901b6 * Source/Additions/Unicode.m: replace objc_malloc with NSZoneMalloc
and objc_free with NSZoneFree

* Source/Additions/NSFileHandle+GNUstepBase.m: should work with ipv6
(The old code does fail on Snow Leopard, even with ipv4 addresses.)    

* Source/Additions/GSXML.m: added GSObjCRuntime.h
* Headers/Additions/GNUstepBase/GSObjCRuntime.h: 
replace objc_malloc with NSZoneMalloc and objc_free with NSZoneFree



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30221 72102866-910b-0410-8b05-ffd578937521
2010-04-23 04:06:17 +00:00
Richard Frith-MacDonald
f784646663 generalize define from __MINGW32__ to __MINGW__
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30001 72102866-910b-0410-8b05-ffd578937521
2010-03-19 12:10:11 +00:00
Richard Frith-MacDonald
97653c21a2 Made experimental API for sending emails available.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29999 72102866-910b-0410-8b05-ffd578937521
2010-03-18 09:56:51 +00:00
Richard Frith-MacDonald
2862bb966e commit to make backup of work-in-progress
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29995 72102866-910b-0410-8b05-ffd578937521
2010-03-17 15:46:20 +00:00
Richard Frith-MacDonald
b47fbf5094 added mingw64 tweaks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29983 72102866-910b-0410-8b05-ffd578937521
2010-03-16 15:08:20 +00:00
Adam Fedor
158495848a Define INADDR_NONE for Solaris.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29968 72102866-910b-0410-8b05-ffd578937521
2010-03-15 18:53:26 +00:00
Richard Frith-MacDonald
a7653da42c osx fixups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29909 72102866-910b-0410-8b05-ffd578937521
2010-03-12 14:01:36 +00:00
Richard Frith-MacDonald
1cf58483e2 tweak for OSX build
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29908 72102866-910b-0410-8b05-ffd578937521
2010-03-12 13:55:11 +00:00
Richard Frith-MacDonald
8632d7f34a improve setting of warning flags
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29899 72102866-910b-0410-8b05-ffd578937521
2010-03-11 08:08:08 +00:00