From 4ef82847fec2a3489c84b1a8bfcb6a173c1f77c2 Mon Sep 17 00:00:00 2001 From: Martin Baulig Date: Sun, 18 Feb 2001 14:27:27 +0000 Subject: [PATCH] Applied a patch from Laszlo PETER for 2001-02-18 Martin Baulig Applied a patch from Laszlo PETER for Solaris 8. * msg_limits.c: `struct msginfo' no longer has msgmap and msgssz. * sem_limits.c: `struct seminfo' no longer has a semmap field. --- sysdeps/solaris/ChangeLog | 8 ++++++++ sysdeps/solaris/msg_limits.c | 14 ++++++++++---- sysdeps/solaris/sem_limits.c | 18 +++++++++++++----- 3 files changed, 31 insertions(+), 9 deletions(-) diff --git a/sysdeps/solaris/ChangeLog b/sysdeps/solaris/ChangeLog index c873ba30..c620bb8c 100644 --- a/sysdeps/solaris/ChangeLog +++ b/sysdeps/solaris/ChangeLog @@ -1,3 +1,11 @@ +2001-02-18 Martin Baulig + + Applied a patch from Laszlo PETER + for Solaris 8. + + * msg_limits.c: `struct msginfo' no longer has msgmap and msgssz. + * sem_limits.c: `struct seminfo' no longer has a semmap field. + 1999-10-17 Martin Baulig * Makefile.am (libgtop_sysdeps_la_LIBADD): Added `@DL_LIB@'. diff --git a/sysdeps/solaris/msg_limits.c b/sysdeps/solaris/msg_limits.c index 2614e7d8..b38d8303 100644 --- a/sysdeps/solaris/msg_limits.c +++ b/sysdeps/solaris/msg_limits.c @@ -29,9 +29,11 @@ static struct nlist nlst[] = { {"msginfo"}, {NULL} }; static const unsigned long _glibtop_sysdeps_msg_limits = -(1L << GLIBTOP_IPC_MSGPOOL) + (1L << GLIBTOP_IPC_MSGMAP) + -(1L << GLIBTOP_IPC_MSGMAX) + (1L << GLIBTOP_IPC_MSGMNB) + -(1L << GLIBTOP_IPC_MSGMNI) + (1L << GLIBTOP_IPC_MSGSSZ) + +#if GLIBTOP_SOLARIS_RELEASE <= 570 +(1L << GLIBTOP_IPC_MSGMAP) + (1L << GLIBTOP_IPC_MSGSSZ) + +#endif +(1L << GLIBTOP_IPC_MSGPOOL) + (1L << GLIBTOP_IPC_MSGMAX) + +(1L << GLIBTOP_IPC_MSGMNB) + (1L << GLIBTOP_IPC_MSGMNI) + (1L << GLIBTOP_IPC_MSGTQL); /* Init function. */ @@ -63,11 +65,15 @@ glibtop_get_msg_limits_p (glibtop *server, glibtop_msg_limits *buf) sizeof(struct msginfo)) != sizeof(struct msginfo)) return; +#if GLIBTOP_SOLARIS_RELEASE <= 570 + /* These fields don't exist anymore in Solaris 8. + * Thanks to Laszlo PETER . */ buf->msgmap = minfo.msgmap; + buf->msgssz = minfo.msgssz; +#endif buf->msgmax = minfo.msgmax; buf->msgmnb = minfo.msgmnb; buf->msgmni = minfo.msgmni; - buf->msgssz = minfo.msgssz; buf->msgtql = minfo.msgtql; buf->msgpool = minfo.msgmni * minfo.msgmnb >> 10; buf->flags = _glibtop_sysdeps_msg_limits; diff --git a/sysdeps/solaris/sem_limits.c b/sysdeps/solaris/sem_limits.c index c7927638..e7e97436 100644 --- a/sysdeps/solaris/sem_limits.c +++ b/sysdeps/solaris/sem_limits.c @@ -29,11 +29,14 @@ static struct nlist nlst[] = { {"seminfo"}, {NULL} }; static const unsigned long _glibtop_sysdeps_sem_limits = -(1L << GLIBTOP_IPC_SEMMAP) + (1L << GLIBTOP_IPC_SEMMNI) + -(1L << GLIBTOP_IPC_SEMMNS) + (1L << GLIBTOP_IPC_SEMMNU) + -(1L << GLIBTOP_IPC_SEMMSL) + (1L << GLIBTOP_IPC_SEMOPM) + -(1L << GLIBTOP_IPC_SEMUME) + (1L << GLIBTOP_IPC_SEMUSZ) + -(1L << GLIBTOP_IPC_SEMVMX) + (1L << GLIBTOP_IPC_SEMAEM); +#if GLIBTOP_SOLARIS_RELEASE <= 570 +(1L << GLIBTOP_IPC_SEMMAP) + +#endif +(1L << GLIBTOP_IPC_SEMMNI) + (1L << GLIBTOP_IPC_SEMMNS) + +(1L << GLIBTOP_IPC_SEMMNU) + (1L << GLIBTOP_IPC_SEMMSL) + +(1L << GLIBTOP_IPC_SEMOPM) + (1L << GLIBTOP_IPC_SEMUME) + +(1L << GLIBTOP_IPC_SEMUSZ) + (1L << GLIBTOP_IPC_SEMVMX) + +(1L << GLIBTOP_IPC_SEMAEM); /* Init function. */ @@ -63,7 +66,12 @@ glibtop_get_sem_limits_p (glibtop *server, glibtop_sem_limits *buf) if(kvm_read(kd, nlst[0].n_value, (void *)&sinfo, sizeof(struct seminfo)) != sizeof(struct seminfo)) return; + +#if GLIBTOP_SOLARIS_RELEASE <= 570 + /* This field don't exist anymore in Solaris 8. + * Thanks to Laszlo PETER . */ buf->semmap = sinfo.semmap; +#endif buf->semmni = sinfo.semmni; buf->semmns = sinfo.semmns; buf->semmnu = sinfo.semmnu;