mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
(ABS): New macro, defined if not already defined.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1302 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3eb99042d6
commit
5054040415
3 changed files with 21 additions and 0 deletions
|
@ -103,6 +103,13 @@ LAMBDA(BOOL, (id _o), {if ([_o perform:SELECTOR]) return YES; else return NO;})
|
|||
_a < _b ? _a : _b; })
|
||||
#endif
|
||||
|
||||
#ifndef ABS
|
||||
#define ABS(a) \
|
||||
({typedef _ta = (a); \
|
||||
_ta _a = (a); \
|
||||
_a < 0 ? -_a : _a; })
|
||||
#endif
|
||||
|
||||
#ifndef STRINGIFY
|
||||
#define STRINGIFY(s) XSTRINGIFY(s)
|
||||
#define XSTRINGIFY(s) #s
|
||||
|
|
|
@ -103,6 +103,13 @@ LAMBDA(BOOL, (id _o), {if ([_o perform:SELECTOR]) return YES; else return NO;})
|
|||
_a < _b ? _a : _b; })
|
||||
#endif
|
||||
|
||||
#ifndef ABS
|
||||
#define ABS(a) \
|
||||
({typedef _ta = (a); \
|
||||
_ta _a = (a); \
|
||||
_a < 0 ? -_a : _a; })
|
||||
#endif
|
||||
|
||||
#ifndef STRINGIFY
|
||||
#define STRINGIFY(s) XSTRINGIFY(s)
|
||||
#define XSTRINGIFY(s) #s
|
||||
|
|
|
@ -103,6 +103,13 @@ LAMBDA(BOOL, (id _o), {if ([_o perform:SELECTOR]) return YES; else return NO;})
|
|||
_a < _b ? _a : _b; })
|
||||
#endif
|
||||
|
||||
#ifndef ABS
|
||||
#define ABS(a) \
|
||||
({typedef _ta = (a); \
|
||||
_ta _a = (a); \
|
||||
_a < 0 ? -_a : _a; })
|
||||
#endif
|
||||
|
||||
#ifndef STRINGIFY
|
||||
#define STRINGIFY(s) XSTRINGIFY(s)
|
||||
#define XSTRINGIFY(s) #s
|
||||
|
|
Loading…
Reference in a new issue