From 74f3b0ec7125eec02c08ba7d93a77a88a9d8f356 Mon Sep 17 00:00:00 2001 From: fedor Date: Tue, 14 Nov 2006 15:43:19 +0000 Subject: [PATCH] Include GSOnce macros so the baseadd library can see them. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24087 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ Headers/Additions/GNUstepBase/GSCategories.h | 14 ++++++++++++++ Source/Additions/GSFunctions.m | 1 + 3 files changed, 20 insertions(+) diff --git a/ChangeLog b/ChangeLog index 7c31a9a8a..c78f837b1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-11-14 Adam Fedor + + * Headers/Additions/GNUstepBase/GSCategories.h: Add GSOnce macros. + * Source/Additions/GSFunctions.m: Add GSCategories.h + 2006-11-13 Richard Frith-Macdonald * Source/NSCalendarDate.m: Fix a few string parsing errors (check that diff --git a/Headers/Additions/GNUstepBase/GSCategories.h b/Headers/Additions/GNUstepBase/GSCategories.h index 3e3b6f29c..28f01e454 100644 --- a/Headers/Additions/GNUstepBase/GSCategories.h +++ b/Headers/Additions/GNUstepBase/GSCategories.h @@ -110,6 +110,20 @@ extern "C" { #define NSDebugMLog(format, args...) #endif /* DEBUG */ +#define GSOnceFLog(format, args...) \ + do { static BOOL beenHere = NO; if (beenHere == NO) {\ + NSString *fmt = GSDebugFunctionMsg( \ + __PRETTY_FUNCTION__, __FILE__, __LINE__, format); \ + beenHere = YES; \ + NSLog(fmt , ## args); }} while (0) + +#define GSOnceMLog(format, args...) \ + do { static BOOL beenHere = NO; if (beenHere == NO) {\ + NSString *fmt = GSDebugMethodMsg( \ + self, _cmd, __FILE__, __LINE__, format); \ + beenHere = YES; \ + NSLog(fmt , ## args); }} while (0) + #ifdef GSWARN #define NSWarnLog(format, args...) \ do { if (GSDebugSet(@"NoWarn") == NO) { \ diff --git a/Source/Additions/GSFunctions.m b/Source/Additions/GSFunctions.m index ff9218624..9d9529a28 100644 --- a/Source/Additions/GSFunctions.m +++ b/Source/Additions/GSFunctions.m @@ -28,6 +28,7 @@ #include "config.h" #include "GNUstepBase/preface.h" #include "GNUstepBase/GSFunctions.h" +#include "GNUstepBase/GSCategories.h" #include "Foundation/Foundation.h" NSString *