diff --git a/ChangeLog b/ChangeLog index 222bb1b6..910d24d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +1998-10-03 Martin Baulig + + * include/glibtop/global.h: Only include system header files + if we are `_IN_LIBGTOP'. + (G_GNUC_NORETURN, G_GNUC_CONST, G_GNUC_UNUSED): Added those + definitions if we are `_IN_LIBGTOP'. + 1998-09-29 Sung-Hyun Nam * configure.in (ALL_LINGUAS): add `ko' diff --git a/include/glibtop/global.h b/include/glibtop/global.h index dbd4ab04..1e55e01e 100644 --- a/include/glibtop/global.h +++ b/include/glibtop/global.h @@ -51,6 +51,25 @@ # define __P(protos) () #endif +#ifdef _IN_LIBGTOP + +/* Provide macros to feature the GCC function attribute. + */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) +#define G_GNUC_NORETURN \ + __attribute__((noreturn)) +#define G_GNUC_CONST \ + __attribute__((const)) +#define G_GNUC_UNUSED \ + __attribute__((unused)) +#else /* !__GNUC__ */ +#define G_GNUC_NORETURN +#define G_GNUC_CONST +#define G_GNUC_UNUSED +#endif /* !__GNUC__ */ + +#endif /* _IN_LIBGTOP */ + #if TIME_WITH_SYS_TIME # include # include @@ -97,10 +116,16 @@ #endif #include + +#ifdef _IN_LIBGTOP + #include #include #include #include + +#endif /* _IN_LIBGTOP */ + #include #include