1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-18 08:02:48 +00:00
freebsd-ports/x11-wm/fvwm95/files/patch-modules-FvwmIconMan-FvwmIconMan.c
Greg Lewis d242f8df42 . Unbreak compilation on 5.x (gcc 3.3).
PR:		58719
Submitted by:	Volker Stolz <stolz@i2.informatik.rwth-aachen.de>
2003-11-01 07:47:22 +00:00

37 lines
1.6 KiB
C

$FreeBSD$
--- modules/FvwmIconMan/FvwmIconMan.c.orig Thu Oct 30 12:53:01 2003
+++ modules/FvwmIconMan/FvwmIconMan.c Thu Oct 30 13:10:36 2003
@@ -315,6 +315,23 @@
return copy_string (s1, s2);
}
+#if __GNUC__ > 2
+#define SET_MANAGER(manager,field,value) \
+ do { \
+ int id = manager; \
+ if (id == -1) { \
+ for (id = 0; id < globals.num_managers; id++) { \
+ globals.managers[id].field = value; \
+ } \
+ } \
+ else if (id < globals.num_managers) { \
+ globals.managers[id].field = value; \
+ } \
+ else { \
+ ConsoleMessage ("Internal error in SET_MANAGER: %d\n", id); \
+ } \
+ } while (0)
+#else
#define SET_MANAGER(manager,field,value) \
do { \
int id = manager; \
@@ -330,6 +347,7 @@
ConsoleMessage ("Internal error in SET_MANAGER: %d\n", id); \
} \
} while (0)
+#endif /* GCC 2 */
static void read_in_resources (char *file)
{