diff mbox

Hurd port for gcc go PATCH 5-10(23)

Message ID 1480103967.24382.100.camel@gmail.com
State New
Headers show

Commit Message

Svante Signell Nov. 25, 2016, 7:59 p.m. UTC
* src_libgo_configure.ac.diff: Define GOOS=gnu and LIBGO_IS_GNU
* src_libgo_Makefile.am.diff: Add support for GNU/Hurd.
* src_libgo_Makefile.in.diff: Update accordingly with autreconf2.64
* src_libgo_mksysinfo.sh.diff: Define SYS_IOCTL to 0 if not defined,
 Fix: #define EWOULDBLOCK EAGAIN in <errno.h>
 Fix: #define st_dev st_fsid in <sysstat.h
* src_libgo_runtime_getncpu-gnu.c.diff: New file
* src_libgo_go_syscall_wait.c.diff: Define WCONTINUED to 0 if not
defined.
diff mbox

Patch

Index: gcc-6-6.2.1-4.1/src/libgo/runtime/getncpu-gnu.c
===================================================================
--- /dev/null
+++ gcc-6-6.2.1-4.1/src/libgo/runtime/getncpu-gnu.c
@@ -0,0 +1,16 @@ 
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+#include <unistd.h>
+
+#include "runtime.h"
+#include "defs.h"
+
+int32
+getproccount(void)
+{
+	int32 n;
+	n = (int32)sysconf(_SC_NPROCESSORS_ONLN);
+	return n > 1 ? n : 1;
+}