# include <sys/time.h>
# include <sys/types.h>
# include <unistd.h>
+# if defined(__hpux)
+# include <sys/pstat.h>
+# endif
#else
/// Version number. If this is left empty, the current date (in the format
/// YYMMDD) is used as a version number.
-static const string EngineVersion = "1.6.1";
+static const string EngineVersion = "";
static const string AppName = "Stockfish";
static const string AppTag = "";
int cpu_count() {
return Min(sysconf(_SC_NPROCESSORS_ONLN), 8);
}
+# elif defined(__hpux)
+int cpu_count() {
+ struct pst_dynamic psd;
+ if (pstat_getdynamic(&psd, sizeof(psd), (size_t)1, 0) == -1)
+ return 1;
+
+ return Min(psd.psd_proc_cnt, 8);
+}
# else
int cpu_count() {
return 1;