mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Fixes for latest egcs cvs
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@6422 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
718fbfc5c4
commit
f1313e073c
5 changed files with 65 additions and 59 deletions
|
@ -1,3 +1,9 @@
|
|||
2000-04-05 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Headers/gnustep/base/NSException.h: remove 'volatile' from function
|
||||
and method declarations - no longer supported in gcc.
|
||||
* Source/NSException.m: ditto
|
||||
|
||||
2000-04-05 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Tools/gdomap.c: init_probe() fix bug placing incorrect responder
|
||||
|
|
|
@ -37,24 +37,24 @@
|
|||
NSDictionary *_e_info;
|
||||
}
|
||||
|
||||
+ (NSException *)exceptionWithName:(NSString *)name
|
||||
reason:(NSString *)reason
|
||||
userInfo:(NSDictionary *)userInfo;
|
||||
+ (volatile void)raise:(NSString *)name
|
||||
format:(NSString *)format,...;
|
||||
+ (volatile void)raise:(NSString *)name
|
||||
format:(NSString *)format
|
||||
arguments:(va_list)argList;
|
||||
+ (NSException*) exceptionWithName: (NSString*)name
|
||||
reason: (NSString*)reason
|
||||
userInfo: (NSDictionary*)userInfo;
|
||||
+ (void) raise: (NSString*)name
|
||||
format: (NSString*)format,...;
|
||||
+ (void) raise: (NSString*)name
|
||||
format: (NSString*)format
|
||||
arguments: (va_list)argList;
|
||||
|
||||
- (id)initWithName:(NSString *)name
|
||||
reason:(NSString *)reason
|
||||
userInfo:(NSDictionary *)userInfo;
|
||||
- (volatile void)raise;
|
||||
- (id) initWithName: (NSString*)name
|
||||
reason: (NSString*)reason
|
||||
userInfo: (NSDictionary*)userInfo;
|
||||
- (void) raise;
|
||||
|
||||
// Querying Exceptions
|
||||
- (NSString *)name;
|
||||
- (NSString *)reason;
|
||||
- (NSDictionary *)userInfo;
|
||||
- (NSString*) name;
|
||||
- (NSString*) reason;
|
||||
- (NSDictionary*) userInfo;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -75,14 +75,14 @@ typedef struct _NSHandler
|
|||
NSException *exception;
|
||||
} NSHandler;
|
||||
|
||||
typedef volatile void NSUncaughtExceptionHandler(NSException *exception);
|
||||
typedef void NSUncaughtExceptionHandler(NSException *exception);
|
||||
|
||||
extern NSUncaughtExceptionHandler *_NSUncaughtExceptionHandler;
|
||||
#define NSGetUncaughtExceptionHandler() _NSUncaughtExceptionHandler
|
||||
#define NSSetUncaughtExceptionHandler(proc) \
|
||||
(_NSUncaughtExceptionHandler = (proc))
|
||||
|
||||
/* NS_DURING, NS_HANDLER and NS_ENDHANDLER are always used like:
|
||||
/* NS_DURING, NS_HANDLER and NS_ENDHANDLER are always used like:
|
||||
|
||||
NS_DURING
|
||||
some code which might raise an error
|
||||
|
@ -133,18 +133,18 @@ extern void _NSRemoveHandler( NSHandler *handler );
|
|||
|
||||
@interface NSAssertionHandler : NSObject
|
||||
|
||||
+ (NSAssertionHandler *)currentHandler;
|
||||
+ (NSAssertionHandler*) currentHandler;
|
||||
|
||||
- (void)handleFailureInFunction:(NSString *)functionName
|
||||
file:(NSString *)fileName
|
||||
lineNumber:(int)line
|
||||
description:(NSString *)format,...;
|
||||
- (void) handleFailureInFunction: (NSString*)functionName
|
||||
file: (NSString*)fileName
|
||||
lineNumber: (int)line
|
||||
description: (NSString*)format,...;
|
||||
|
||||
- (void)handleFailureInMethod:(SEL)aSelector
|
||||
object:object
|
||||
file:(NSString *)fileName
|
||||
lineNumber:(int)line
|
||||
description:(NSString *)format,...;
|
||||
- (void) handleFailureInMethod: (SEL)aSelector
|
||||
object: object
|
||||
file: (NSString*)fileName
|
||||
lineNumber: (int)line
|
||||
description: (NSString*)format,...;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -156,11 +156,11 @@ extern void _NSRemoveHandler( NSHandler *handler );
|
|||
do { \
|
||||
if (!(condition)) { \
|
||||
[[NSAssertionHandler currentHandler] \
|
||||
handleFailureInMethod:_cmd \
|
||||
object:self \
|
||||
file:[NSString stringWithCString:__FILE__] \
|
||||
lineNumber:__LINE__ \
|
||||
description:(desc) , ## args]; \
|
||||
handleFailureInMethod: _cmd \
|
||||
object: self \
|
||||
file: [NSString stringWithCString: __FILE__] \
|
||||
lineNumber: __LINE__ \
|
||||
description: (desc) , ## args]; \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
|
@ -168,10 +168,10 @@ extern void _NSRemoveHandler( NSHandler *handler );
|
|||
do { \
|
||||
if (!(condition)) { \
|
||||
[[NSAssertionHandler currentHandler] \
|
||||
handleFailureInFunction:[NSString stringWithCString:__PRETTY_FUNCTION__] \
|
||||
file:[NSString stringWithCString:__FILE__] \
|
||||
lineNumber:__LINE__ \
|
||||
description:(desc) , ## args]; \
|
||||
handleFailureInFunction: [NSString stringWithCString: __PRETTY_FUNCTION__] \
|
||||
file: [NSString stringWithCString: __FILE__] \
|
||||
lineNumber: __LINE__ \
|
||||
description: (desc) , ## args]; \
|
||||
} \
|
||||
} while(0)
|
||||
#endif
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
(class_getInstanceMethod(object_get_class(OBJ), SEL)->method_imp)
|
||||
|
||||
#if 1
|
||||
volatile void objc_fatal(const char* msg);
|
||||
void objc_fatal(const char* msg);
|
||||
#else
|
||||
#define objc_fatal(FMT, args...) \
|
||||
do { fprintf (stderr, (FMT), ##args); abort(); } while (0)
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
#include <Foundation/NSThread.h>
|
||||
#include <Foundation/NSDictionary.h>
|
||||
|
||||
static volatile void
|
||||
_NSFoundationUncaughtExceptionHandler(NSException *exception)
|
||||
static void
|
||||
_NSFoundationUncaughtExceptionHandler (NSException *exception)
|
||||
{
|
||||
fprintf(stderr, "Uncaught exception %s, reason: %s\n",
|
||||
[[exception name] cString], [[exception reason] cString]);
|
||||
|
@ -44,16 +44,16 @@ _NSFoundationUncaughtExceptionHandler(NSException *exception)
|
|||
|
||||
@implementation NSException
|
||||
|
||||
+ (NSException*) exceptionWithName: (NSString *)name
|
||||
reason: (NSString *)reason
|
||||
userInfo: (NSDictionary *)userInfo
|
||||
+ (NSException*) exceptionWithName: (NSString*)name
|
||||
reason: (NSString*)reason
|
||||
userInfo: (NSDictionary*)userInfo
|
||||
{
|
||||
return AUTORELEASE([[self alloc] initWithName: name reason: reason
|
||||
userInfo: userInfo]);
|
||||
}
|
||||
|
||||
+ (volatile void) raise: (NSString *)name
|
||||
format: (NSString *)format,...
|
||||
+ (void) raise: (NSString*)name
|
||||
format: (NSString*)format,...
|
||||
{
|
||||
va_list args;
|
||||
|
||||
|
@ -63,9 +63,9 @@ _NSFoundationUncaughtExceptionHandler(NSException *exception)
|
|||
va_end(args);
|
||||
}
|
||||
|
||||
+ (volatile void) raise: (NSString *)name
|
||||
format: (NSString *)format
|
||||
arguments: (va_list)argList
|
||||
+ (void) raise: (NSString*)name
|
||||
format: (NSString*)format
|
||||
arguments: (va_list)argList
|
||||
{
|
||||
NSString *reason;
|
||||
NSException *except;
|
||||
|
@ -75,9 +75,9 @@ _NSFoundationUncaughtExceptionHandler(NSException *exception)
|
|||
[except raise];
|
||||
}
|
||||
|
||||
- (id) initWithName: (NSString *)name
|
||||
reason: (NSString *)reason
|
||||
userInfo: (NSDictionary *)userInfo
|
||||
- (id) initWithName: (NSString*)name
|
||||
reason: (NSString*)reason
|
||||
userInfo: (NSDictionary*)userInfo
|
||||
{
|
||||
ASSIGN(_e_name, name);
|
||||
ASSIGN(_e_reason, reason);
|
||||
|
@ -85,7 +85,7 @@ _NSFoundationUncaughtExceptionHandler(NSException *exception)
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
- (void) dealloc
|
||||
{
|
||||
DESTROY(_e_name);
|
||||
DESTROY(_e_reason);
|
||||
|
@ -93,7 +93,7 @@ _NSFoundationUncaughtExceptionHandler(NSException *exception)
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (volatile void) raise
|
||||
- (void) raise
|
||||
{
|
||||
NSThread *thread;
|
||||
NSHandler *handler;
|
||||
|
@ -116,17 +116,17 @@ _NSFoundationUncaughtExceptionHandler(NSException *exception)
|
|||
longjmp(handler->jumpState, 1);
|
||||
}
|
||||
|
||||
- (NSString *) name
|
||||
- (NSString*) name
|
||||
{
|
||||
return _e_name;
|
||||
}
|
||||
|
||||
- (NSString *) reason
|
||||
- (NSString*) reason
|
||||
{
|
||||
return _e_reason;
|
||||
}
|
||||
|
||||
- (NSDictionary *) userInfo
|
||||
- (NSDictionary*) userInfo
|
||||
{
|
||||
return _e_info;
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ _NSFoundationUncaughtExceptionHandler(NSException *exception)
|
|||
return self;
|
||||
}
|
||||
|
||||
- (id) copyWithZone: (NSZone *)zone
|
||||
- (id) copyWithZone: (NSZone*)zone
|
||||
{
|
||||
if (NSShouldRetainWithZone(self, zone))
|
||||
return RETAIN(self);
|
||||
|
@ -186,7 +186,7 @@ _NSFoundationUncaughtExceptionHandler(NSException *exception)
|
|||
|
||||
|
||||
void
|
||||
_NSAddHandler( NSHandler *handler )
|
||||
_NSAddHandler (NSHandler* handler)
|
||||
{
|
||||
NSThread *thread;
|
||||
|
||||
|
@ -196,7 +196,7 @@ _NSAddHandler( NSHandler *handler )
|
|||
}
|
||||
|
||||
void
|
||||
_NSRemoveHandler( NSHandler *handler )
|
||||
_NSRemoveHandler (NSHandler* handler)
|
||||
{
|
||||
NSThread *thread;
|
||||
|
||||
|
|
|
@ -467,7 +467,7 @@ objc_get_type_qualifiers (const char* type)
|
|||
#ifdef objc_fatal
|
||||
#undef objc_fatal
|
||||
#endif
|
||||
volatile void
|
||||
void
|
||||
objc_fatal(const char* msg)
|
||||
{
|
||||
write(2, msg, (int)strlen((const char*)msg));
|
||||
|
|
Loading…
Reference in a new issue