From 96730bf47b6417ee579de06f230552a3196cf0a2 Mon Sep 17 00:00:00 2001 From: nicola Date: Mon, 2 Oct 2006 16:30:52 +0000 Subject: [PATCH] Use GNUSTEP_IS_FLATTENED and work around a compiler bug git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23723 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 11 +++++++++++ Source/GSTheme.m | 10 +++++++++- configure | 6 +++--- configure.ac | 6 +++--- 4 files changed, 26 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9892b1e88..8ffa4ac83 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2006-10-02 Nicola Pero + + * configure.ac: Check the new variable GNUSTEP_IS_FLATTENED, + and default to yes. + * configure: Regenerated. + + * Source/GSTheme.m: Worked arond a compiler bug that would abort + compilation on GCC 3.3.3 20040412 (Red Hat Linux 3.3.3-7). Avoid + [NSMutableSet set] as the compiler is confusing +(id)set with + -(void)set. + 2006-10-02 08:19-EDT Gregory John Casamento * Source/NSDocumentController.m: Correct grammar in diff --git a/Source/GSTheme.m b/Source/GSTheme.m index 6f0a11471..428261f59 100644 --- a/Source/GSTheme.m +++ b/Source/GSTheme.m @@ -31,6 +31,7 @@ #include "Foundation/NSNotification.h" #include "Foundation/NSNull.h" #include "Foundation/NSPathUtilities.h" +#include "Foundation/NSSet.h" #include "Foundation/NSUserDefaults.h" #include "GNUstepGUI/GSTheme.h" #include "AppKit/NSApplication.h" @@ -1561,7 +1562,14 @@ static GSThemePanel *sharedPanel = nil; - (void) update: (id)sender { NSArray *array; - NSMutableSet *set = [NSMutableSet set]; + + /* Avoid [NSMutableSet set] that confuses GCC 3.3.3. It seems to confuse + * this static +(id)set method with the instance -(void)set, so it would + * refuse to compile saying + * GSTheme.m:1565: error: void value not ignored as it ought to be + */ + NSMutableSet *set = AUTORELEASE([NSMutableSet new]); + NSString *selected = RETAIN([[matrix selectedCell] title]); unsigned existing = [[matrix cells] count]; NSFileManager *mgr = [NSFileManager defaultManager]; diff --git a/configure b/configure index ae26d1d69..08ef53a2f 100755 --- a/configure +++ b/configure @@ -2863,13 +2863,13 @@ fi #-------------------------------------------------------------------- # Set location of GNUstep dirs for later use GNUSTEP_HDIR=$GNUSTEP_SYSTEM_ROOT/Library/Headers -if test "$GNUSTEP_FLATTENED" = yes; then - GNUSTEP_LDIR=$GNUSTEP_SYSTEM_ROOT/Library/Libraries -else +if test "$GNUSTEP_IS_FLATTENED" = no; then clean_target_os=`$GNUSTEP_MAKEFILES/clean_os.sh $target_os` clean_target_cpu=`$GNUSTEP_MAKEFILES/clean_cpu.sh $target_cpu` obj_dir=$clean_target_cpu/$clean_target_os GNUSTEP_LDIR=$GNUSTEP_SYSTEM_ROOT/Library/Libraries/$obj_dir +else + GNUSTEP_LDIR=$GNUSTEP_SYSTEM_ROOT/Library/Libraries fi CPPFLAGS="$CPPFLAGS -I$GNUSTEP_HDIR" LDFLAGS="$LDFLAGS -L$GNUSTEP_LDIR/$LIBRARY_COMBO -L$GNUSTEP_LDIR" diff --git a/configure.ac b/configure.ac index 58a6f1897..585abebff 100644 --- a/configure.ac +++ b/configure.ac @@ -64,13 +64,13 @@ AC_PATH_X # Added for checking the existence of ungif. Note that #-------------------------------------------------------------------- # Set location of GNUstep dirs for later use GNUSTEP_HDIR=$GNUSTEP_SYSTEM_ROOT/Library/Headers -if test "$GNUSTEP_FLATTENED" = yes; then - GNUSTEP_LDIR=$GNUSTEP_SYSTEM_ROOT/Library/Libraries -else +if test "$GNUSTEP_IS_FLATTENED" = no; then clean_target_os=`$GNUSTEP_MAKEFILES/clean_os.sh $target_os` clean_target_cpu=`$GNUSTEP_MAKEFILES/clean_cpu.sh $target_cpu` obj_dir=$clean_target_cpu/$clean_target_os GNUSTEP_LDIR=$GNUSTEP_SYSTEM_ROOT/Library/Libraries/$obj_dir +else + GNUSTEP_LDIR=$GNUSTEP_SYSTEM_ROOT/Library/Libraries fi CPPFLAGS="$CPPFLAGS -I$GNUSTEP_HDIR" LDFLAGS="$LDFLAGS -L$GNUSTEP_LDIR/$LIBRARY_COMBO -L$GNUSTEP_LDIR"