Applied a patch from Laszlo PETER <Laszlo.Peter@ireland.sun.com> for
2001-02-18 Martin Baulig <baulig@suse.de> Applied a patch from Laszlo PETER <Laszlo.Peter@ireland.sun.com> 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.
This commit is contained in:
committed by
Martin Baulig
parent
9da5658ba1
commit
4ef82847fe
@@ -1,3 +1,11 @@
|
||||
2001-02-18 Martin Baulig <baulig@suse.de>
|
||||
|
||||
Applied a patch from Laszlo PETER <Laszlo.Peter@ireland.sun.com>
|
||||
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 <martin@home-of-linux.org>
|
||||
|
||||
* Makefile.am (libgtop_sysdeps_la_LIBADD): Added `@DL_LIB@'.
|
||||
|
@@ -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 <Laszlo.Peter@ireland.sun.com>. */
|
||||
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;
|
||||
|
@@ -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 <Laszlo.Peter@ireland.sun.com>. */
|
||||
buf->semmap = sinfo.semmap;
|
||||
#endif
|
||||
buf->semmni = sinfo.semmni;
|
||||
buf->semmns = sinfo.semmns;
|
||||
buf->semmnu = sinfo.semmnu;
|
||||
|
Reference in New Issue
Block a user