summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-08-03 01:00:55 +0200
committerwm4 <wm4@nowhere>2012-08-03 01:00:55 +0200
commitdebca222121fbbe5c615281958bc5a72fac3268f (patch)
tree142da49ea48bc3e35c7b54b0e75893f5355263db
parentdfbfc7e75ebfa9f7f4a0416e6d1f6a07500f290c (diff)
downloadmpv-debca222121fbbe5c615281958bc5a72fac3268f.tar.bz2
mpv-debca222121fbbe5c615281958bc5a72fac3268f.tar.xz
loader: remove weird kstat thing
Apparently the win32 binary codec loader used this to retrieve the CPU frequency on Solaris.
-rwxr-xr-xconfigure13
-rw-r--r--loader/win32.c47
2 files changed, 0 insertions, 60 deletions
diff --git a/configure b/configure
index d64e397b07..b0b94f6776 100755
--- a/configure
+++ b/configure
@@ -1436,18 +1436,6 @@ fi
echores "$_builtin_expect"
-echocheck "kstat"
-_kstat=no
-statement_check kstat.h 'kstat_open()' -lkstat && _kstat=yes
-if test "$_kstat" = yes ; then
- def_kstat="#define HAVE_LIBKSTAT 1"
- extra_ldflags="$extra_ldflags -lkstat"
-else
- def_kstat="#undef HAVE_LIBKSTAT"
-fi
-echores "$_kstat"
-
-
echocheck "posix4"
# required for nanosleep on some systems
_posix4=no
@@ -4216,7 +4204,6 @@ $def_builtin_expect
$def_dl
$def_dos_paths
$def_iconv
-$def_kstat
$def_macosx_bundle
$def_macosx_finder
$def_priority
diff --git a/loader/win32.c b/loader/win32.c
index 3f1ef66a49..635892f22d 100644
--- a/loader/win32.c
+++ b/loader/win32.c
@@ -66,9 +66,6 @@ for DLL to know too much about its environment.
#include <dirent.h>
#include <sys/time.h>
#include <sys/stat.h>
-#ifdef HAVE_KSTAT
-#include <kstat.h>
-#endif
#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
@@ -2149,47 +2146,6 @@ static double linux_cpuinfo_freq(void)
return freq;
}
-
-static double solaris_kstat_freq(void)
-{
-#if defined(HAVE_LIBKSTAT) && defined(KSTAT_DATA_INT32)
- /*
- * try to extract the CPU speed from the solaris kernel's kstat data
- */
- kstat_ctl_t *kc;
- kstat_t *ksp;
- kstat_named_t *kdata;
- int mhz = 0;
-
- kc = kstat_open();
- if (kc != NULL)
- {
- ksp = kstat_lookup(kc, "cpu_info", 0, "cpu_info0");
-
- /* kstat found and name/value pairs? */
- if (ksp != NULL && ksp->ks_type == KSTAT_TYPE_NAMED)
- {
- /* read the kstat data from the kernel */
- if (kstat_read(kc, ksp, NULL) != -1)
- {
- /*
- * lookup desired "clock_MHz" entry, check the expected
- * data type
- */
- kdata = (kstat_named_t *)kstat_data_lookup(ksp, "clock_MHz");
- if (kdata != NULL && kdata->data_type == KSTAT_DATA_INT32)
- mhz = kdata->value.i32;
- }
- }
- kstat_close(kc);
- }
-
- if (mhz > 0)
- return mhz * 1000.;
-#endif /* HAVE_LIBKSTAT */
- return -1; // kstat stuff is not available, CPU freq is unknown
-}
-
/*
* Measure CPU freq using the pentium's time stamp counter register (TSC)
*/
@@ -2216,9 +2172,6 @@ static double CPU_Freq(void)
if ((freq = linux_cpuinfo_freq()) > 0)
return freq;
- if ((freq = solaris_kstat_freq()) > 0)
- return freq;
-
return tsc_freq();
}