Initial HP-UX port

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
diff --git a/options.c b/options.c
index bd7dc99..f1c0ea7 100644
--- a/options.c
+++ b/options.c
@@ -329,7 +329,7 @@
 		return 1;
 	}
 
-	max_cpu = sysconf(_SC_NPROCESSORS_ONLN);
+	max_cpu = cpus_online();
 
 	for (i = 0; i < sizeof(int) * 8; i++) {
 		if ((1 << i) & *val) {
@@ -366,7 +366,7 @@
 	strip_blank_front(&str);
 	strip_blank_end(str);
 
-	max_cpu = sysconf(_SC_NPROCESSORS_ONLN);
+	max_cpu = cpus_online();
 
 	while ((cpu = strsep(&str, ",")) != NULL) {
 		char *str2, *cpu2;
@@ -2095,7 +2095,7 @@
 	sprintf(buf, "%llu", mb_memory);
 	fio_keywords[1].replace = strdup(buf);
 
-	l = sysconf(_SC_NPROCESSORS_ONLN);
+	l = cpus_online();
 	sprintf(buf, "%lu", l);
 	fio_keywords[2].replace = strdup(buf);
 }