Commit graph

100 commits

Author SHA1 Message Date
rfm
a5beb6ab31 Fix for bug #399 2024-04-29 13:11:35 +01:00
rfm
46e7064393 Stream debug and event handling improvements 2024-01-30 15:08:31 +00:00
rfm
c739ac81bd Another path fix 2023-12-19 14:24:13 +00:00
rfm
07fed93200 Improvements for github issue 352 2023-11-23 16:39:58 +00:00
rfm
8b4a8820a8 Fix to ensure correct version of mheader fiel is imported 2023-10-30 14:30:06 +00:00
Richard Frith-Macdonald
a5a9423c10 Return error if task directory is bad 2023-10-10 17:01:52 +01:00
Frederik Seiffert
0582eddd96 Export string constants and annotate exported function implementations
Moves scattered string constants to externs.m, and removes obsolete code replacing constant strings.
2021-03-27 17:36:15 +01:00
Gregory John Casamento
753c907938 Fix address for FSF and License name in all headers in base 2019-12-09 18:36:00 -05:00
Richard Frith-Macdonald
911c5cdd66 make class lookup more reliable 2019-02-14 12:37:44 +00:00
David Chisnall
df3eed2452 Turn GS_REPLACE_CONSTANT_STRING into a no-op with the new ABI.
With the classic GCC / NeXT ABI, NSConstantString is a simple pair of a
length and a buffer.  This means that calling -hash calculates the hash
each call, which makes it expensive to use constant strings as
dictionary keys.  The GS_REPLACE_CONSTANT_STRING macro replaces a
constant string with an immutable NSString object, which has an instance
variable for storing the hash.

With the new ABI, NSConstantString has a different layout that includes
space for a hash.  This means that there is no advantage in replacing it
with an NSString (and there is a disadvantage in that it now requires
memory allocation and can be accidentally deallocated), so don't do it.
2019-01-02 17:00:47 +00:00
Richard Frith-Macdonald
3b1324d73d Add GSExceptionStackTrace user default setting 2018-06-12 16:43:15 +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
ebfe915619 Fixups for stack handling 2018-03-27 07:06:17 +01:00
Richard Frith-Macdonald
05439fe15d Experimental deadlock detection code 2018-03-26 15:20:48 +01:00
Richard Frith-MacDonald
3aa0288d37 Locale fixups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39655 72102866-910b-0410-8b05-ffd578937521
2016-04-09 05:49:16 +00:00
Richard Frith-MacDonald
62d2bcbabc changes for use of _WIN32 define on windows
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39492 72102866-910b-0410-8b05-ffd578937521
2016-03-09 13:16:16 +00:00
Richard Frith-MacDonald
3bbe9ff957 more tweaks ... move base64 encoding to shared private function
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38954 72102866-910b-0410-8b05-ffd578937521
2015-08-30 09:23:27 +00:00
Richard Frith-MacDonald
841ddf78e0 memory usage interrogation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38799 72102866-910b-0410-8b05-ffd578937521
2015-07-15 14:14:21 +00:00
Richard Frith-MacDonald
999fda788a Thread diagnositc changes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38768 72102866-910b-0410-8b05-ffd578937521
2015-07-08 12:54:15 +00:00
Richard Frith-MacDonald
8556e8e744 Some optimisation for searcvhes in strings
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38517 72102866-910b-0410-8b05-ffd578937521
2015-05-22 08:34:36 +00:00
Richard Frith-MacDonald
8a265fe615 Improve thread ID and name code to match OSX. Add some initial getaddrinfo code
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38442 72102866-910b-0410-8b05-ffd578937521
2015-03-31 09:14:01 +00:00
Richard Frith-MacDonald
022c5be3eb NSLog updates for consistency with latest OSX
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38370 72102866-910b-0410-8b05-ffd578937521
2015-03-01 19:37:28 +00:00
Richard Frith-MacDonald
cb1bb1c7e7 Add GSLogOffset to include time zone offset in NSLog output
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38018 72102866-910b-0410-8b05-ffd578937521
2014-07-28 14:40:29 +00:00
Richard Frith-MacDonald
2f72f4b86e try to locate msys via PATH as last resort
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37598 72102866-910b-0410-8b05-ffd578937521
2014-01-13 17:32:31 +00:00
Richard Frith-MacDonald
97cecc058e tweaks to keep static analyzer happy
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36527 72102866-910b-0410-8b05-ffd578937521
2013-04-14 16:25:27 +00:00
Richard Frith-MacDonald
d314f0f843 experiment with slower but better hashes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36344 72102866-910b-0410-8b05-ffd578937521
2013-03-12 16:11:10 +00:00
Richard Frith-MacDonald
e6c15aef54 crude KVO setter for structs
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35324 72102866-910b-0410-8b05-ffd578937521
2012-07-27 16:48:49 +00:00
Richard Frith-MacDonald
d3b4830a65 try to work round selinux restrictions on invocations
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34660 72102866-910b-0410-8b05-ffd578937521
2012-01-29 16:57:06 +00:00
Richard Frith-MacDonald
37f6b7aac6 define _XOPEN_SOURCE to 600 throughout
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33984 72102866-910b-0410-8b05-ffd578937521
2011-10-14 12:00:02 +00:00
Richard Frith-MacDonald
fbdcab1d55 solaris thread-saff errrno fix
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33983 72102866-910b-0410-8b05-ffd578937521
2011-10-14 11:40:34 +00:00
Richard Frith-MacDonald
ee4d1aef0f Tweaks to support UTF-8 literal string encoding supported by more recent
compilers.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33972 72102866-910b-0410-8b05-ffd578937521
2011-10-12 14:28:44 +00:00
David Chisnall
4cdea64975 Make -base compile almost without warnings again. Fixes:
- Using the correct format specifier
- Remove substringFromRange: (GNUstep extension) from NSString.h and use the non-deprecated version in -base.
- Delete definitions of methods that are the same in both a class and a category on that class (NSArray and NSObject).

Two files still have warnings:

- The GNUTLS stuff is using a load of deprecated APIs.
- xmlparse.m replaces a method using a category.  This method seems to always return nil.  Not sure what it's meant to do, or why it isn't a delegate of some kind.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33756 72102866-910b-0410-8b05-ffd578937521
2011-08-16 16:04:43 +00:00
Richard Frith-MacDonald
9831216043 Start stuff for handling cleanup on process exit.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33344 72102866-910b-0410-8b05-ffd578937521
2011-06-19 09:26:03 +00:00
Richard Frith-MacDonald
61bc059d4a Cleanup ... avoid accessing the 'isa' variable directly.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32247 72102866-910b-0410-8b05-ffd578937521
2011-02-20 16:21:43 +00:00
Richard Frith-MacDonald
7047f9e6d4 more changes to avoid leak warnings
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32093 72102866-910b-0410-8b05-ffd578937521
2011-02-12 09:00:18 +00:00
Richard Frith-MacDonald
705e1a32ca Attempts to prevent leak warnings from static analyser
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32090 72102866-910b-0410-8b05-ffd578937521
2011-02-12 06:51:42 +00:00
Richard Frith-MacDonald
11e6f51bf4 remove unused code
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32089 72102866-910b-0410-8b05-ffd578937521
2011-02-12 06:12:39 +00:00
Richard Frith-MacDonald
992b57e83b Fix major mamory corruption problem.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32085 72102866-910b-0410-8b05-ffd578937521
2011-02-11 18:53:24 +00:00
Richard Frith-MacDonald
51cf9b9cf9 Reapply some changes with modifications
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32074 72102866-910b-0410-8b05-ffd578937521
2011-02-11 14:07:49 +00:00
Richard Frith-MacDonald
336c7bf021 Revert back to working code!
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32072 72102866-910b-0410-8b05-ffd578937521
2011-02-11 13:53:54 +00:00
Richard Frith-MacDonald
2a1389023f revert last
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32069 72102866-910b-0410-8b05-ffd578937521
2011-02-11 12:43:47 +00:00
Richard Frith-MacDonald
7a7efb3484 temporarily revert to get code to compile again.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32064 72102866-910b-0410-8b05-ffd578937521
2011-02-11 12:29:50 +00:00
David Chisnall
fa8afdc28a Added exception-safe version of the GS_BEGINITEMBUF() macro. As a side effect, this should silence the zero-sized VLA warnings in the static analyser.
Note: This macro is currently only used on GCC 4+ and clang.  It depends on __attribute__((cleanup)), which was introduced some time in the 3.x series, but I'm not sure exactly when (3.2 / 3.3 I think), so someone who cares about gcc 3.x can tweak this if they want (not sure if anyone does - I think most people use 2.95, 4.x, or clang).



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32059 72102866-910b-0410-8b05-ffd578937521
2011-02-11 12:06:25 +00:00
Richard Frith-MacDonald
bc34d0505f Minor cleanups.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32031 72102866-910b-0410-8b05-ffd578937521
2011-02-10 10:52:54 +00:00
Richard Frith-MacDonald
b6f476a7eb Cleanups plus minor OSX compatibility tweak
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31781 72102866-910b-0410-8b05-ffd578937521
2010-12-27 07:03:50 +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
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
d763014aa5 cleanup fast enumeration issues
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29647 72102866-910b-0410-8b05-ffd578937521
2010-02-15 16:56:31 +00:00
Richard Frith-MacDonald
21d597e740 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
Richard Frith-MacDonald
e0c9ae4e2d pass more info to notification functions
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29068 72102866-910b-0410-8b05-ffd578937521
2009-11-27 07:53:38 +00:00