From 8c69afd992d7cc6c2fc7dea59c3c2bd3f3c21f15 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Tue, 29 Jan 2008 10:33:34 +0000 Subject: - be C99 friendly. Anonymous unions are a GNU extension. This change is size-neutral WRT -std=gnu99 and fixes several compilation errors for strict C99 mode. --- procps/top.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'procps') diff --git a/procps/top.c b/procps/top.c index fc393d43b..4df58f227 100644 --- a/procps/top.c +++ b/procps/top.c @@ -594,20 +594,20 @@ static void display_topmem_header(int scr_width) /* 9 */ char *anon; /* 10 */ char *map; /* 11 */ char *slab; - }; + } u; char *str[11]; } Z; -#define total Z.total -#define mfree Z.mfree -#define buf Z.buf -#define cache Z.cache -#define swaptotal Z.swaptotal -#define swapfree Z.swapfree -#define dirty Z.dirty -#define mwrite Z.mwrite -#define anon Z.anon -#define map Z.map -#define slab Z.slab +#define total Z.u.total +#define mfree Z.u.mfree +#define buf Z.u.buf +#define cache Z.u.cache +#define swaptotal Z.u.swaptotal +#define swapfree Z.u.swapfree +#define dirty Z.u.dirty +#define mwrite Z.u.mwrite +#define anon Z.u.anon +#define map Z.u.map +#define slab Z.u.slab #define str Z.str memset(&Z, 0, sizeof(Z)); -- cgit v1.2.3