diff --git a/ChangeLog b/ChangeLog index d9031aab..f5a00c60 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2006-06-24 Benoît Dejean + + * libgtop-sysdeps.m4: + * sysdeps/solaris/glibtop_machine.h: + + Updated the GLIBTOP_SOLARIS_RELEASE + + Patch by hua.zhang@sun.com. + Closes #345821. + 2006-06-24 Benoît Dejean * configure.in: diff --git a/libgtop-sysdeps.m4 b/libgtop-sysdeps.m4 index cb889a5b..5d31f831 100644 --- a/libgtop-sysdeps.m4 +++ b/libgtop-sysdeps.m4 @@ -251,16 +251,16 @@ main (void) AC_MSG_RESULT($os_version_code) ;; solaris*) - os_major_version=`uname -r | sed 's/\([[0-9]]*\).\([[0-9]]\)\.*\([[0-9]]*\)/\1/'` - os_minor_version=`uname -r | sed 's/\([[0-9]]*\).\([[0-9]]\)\.*\([[0-9]]*\)/\2/'` - os_micro_version=`uname -r | sed 's/\([[0-9]]*\).\([[0-9]]\)\.*\([[0-9]]*\)/\3/'` + os_major_version=`uname -r | sed 's/\([[0-9]]*\).\([[0-9]]*\)\.*\([[0-9]]*\)/\1/'` + os_minor_version=`uname -r | sed 's/\([[0-9]]*\).\([[0-9]]*\)\.*\([[0-9]]*\)/\2/'` + os_micro_version=`uname -r | sed 's/\([[0-9]]*\).\([[0-9]]*\)\.*\([[0-9]]*\)/\3/'` test -z "$os_micro_version" && os_micro_version=0 - os_version_expr="$os_major_version 100 * $os_minor_version 10 * + $os_micro_version + p q" + os_version_expr="$os_major_version 10000 * $os_minor_version 100 * + $os_micro_version + p q" os_version_code=`echo "$os_version_expr" | dc` AC_MSG_CHECKING(for Solaris release code) AC_DEFINE_UNQUOTED(GLIBTOP_SOLARIS_RELEASE, $os_version_code, - [Solaris release code (eg. 251 for Solaris 2.5.1).]) + [Solaris release code (eg. 20501 for Solaris 2.5.1).]) AC_MSG_RESULT($os_version_code) ;; esac diff --git a/sysdeps/solaris/glibtop_machine.h b/sysdeps/solaris/glibtop_machine.h index 96dd4ae1..e2a2d0d9 100644 --- a/sysdeps/solaris/glibtop_machine.h +++ b/sysdeps/solaris/glibtop_machine.h @@ -64,7 +64,7 @@ struct _glibtop_machine int ticks; /* clock ticks, as returned by sysconf() */ unsigned long long boot; /* boot time, although it's ui32 in kstat */ void *libproc; /* libproc handle */ -#if GLIBTOP_SOLARIS_RELEASE >= 560 +#if GLIBTOP_SOLARIS_RELEASE >= 50600 void (*objname)(void *, uintptr_t, const char *, size_t); struct ps_prochandle *(*pgrab)(pid_t, int, int *); void (*pfree)(void *);