OMIT_GNULIB_MODULE_futimens = true
OMIT_GNULIB_MODULE_utimensat = true
OMIT_GNULIB_MODULE_file-has-acl = true
+OMIT_GNULIB_MODULE_nproc = true
#include <sys/time.h>
#include <sys/utime.h>
#include <math.h>
+#include <nproc.h>
/* Include (most) CRT headers *before* ms-w32.h. */
#include <ms-w32.h>
return num_of_processors;
}
+/* Emulate Gnulib's 'num_processors'. We cannot use the Gnulib
+ version because it unconditionally calls APIs that aren't available
+ on old MS-Windows versions. */
+unsigned long
+num_processors (enum nproc_query query)
+{
+ /* We ignore QUERY. */
+ return w32_get_nproc ();
+}
+
static void
sample_system_load (ULONGLONG *idle, ULONGLONG *kernel, ULONGLONG *user)
{
return val - 2;
}
-/* FIXME: Remove, merging any of its special features into num-processors. */
-DEFUN ("w32-get-nproc", Fw32_get_nproc,
- Sw32_get_nproc, 0, 0, 0,
- doc: /* Return the number of system's processor execution units. */)
- (void)
-{
- return make_fixnum (w32_get_nproc ());
-}
-
\f
void
syms_of_ntproc (void)
defsubr (&Sw32_get_keyboard_layout);
defsubr (&Sw32_set_keyboard_layout);
- defsubr (&Sw32_get_nproc);
-
DEFVAR_LISP ("w32-quote-process-args", Vw32_quote_process_args,
doc: /* Non-nil enables quoting of process arguments to ensure correct parsing.
Because Windows does not directly pass argv arrays to child processes,