aboutsummaryrefslogtreecommitdiff
path: root/libgo/go
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2012-11-06 18:28:21 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2012-11-06 18:28:21 +0000
commitfb3f38da2a7d45b88c838b3ac55fe40479961790 (patch)
tree89ff7fdde0dc578287fb6c80a46652eaf78f3ddf /libgo/go
parent855a44ee8f73b4c53a0bad7780baa85d043b890f (diff)
downloadgcc-fb3f38da2a7d45b88c838b3ac55fe40479961790.zip
gcc-fb3f38da2a7d45b88c838b3ac55fe40479961790.tar.gz
gcc-fb3f38da2a7d45b88c838b3ac55fe40479961790.tar.bz2
compiler, libgo: Fixes to prepare for 64-bit int.
From-SVN: r193254
Diffstat (limited to 'libgo/go')
-rw-r--r--libgo/go/bytes/indexbyte.c4
-rw-r--r--libgo/go/log/syslog/syslog_c.c6
-rw-r--r--libgo/go/syscall/signame.c6
3 files changed, 9 insertions, 7 deletions
diff --git a/libgo/go/bytes/indexbyte.c b/libgo/go/bytes/indexbyte.c
index 9c72e61..1f4399c 100644
--- a/libgo/go/bytes/indexbyte.c
+++ b/libgo/go/bytes/indexbyte.c
@@ -13,11 +13,11 @@
We deliberately don't split the stack in case it does call the
library function, which shouldn't need much stack space. */
-int IndexByte (struct __go_open_array, char)
+intgo IndexByte (struct __go_open_array, char)
asm ("bytes.IndexByte")
__attribute__ ((no_split_stack));
-int
+intgo
IndexByte (struct __go_open_array s, char b)
{
char *p;
diff --git a/libgo/go/log/syslog/syslog_c.c b/libgo/go/log/syslog/syslog_c.c
index 3b4cddd..d79cba3 100644
--- a/libgo/go/log/syslog/syslog_c.c
+++ b/libgo/go/log/syslog/syslog_c.c
@@ -6,14 +6,16 @@
#include <syslog.h>
+#include "runtime.h"
+
/* We need to use a C function to call the syslog function, because we
can't represent a C varargs function in Go. */
-void syslog_c(int, const char*)
+void syslog_c(intgo, const char*)
asm ("log_syslog.syslog_c");
void
-syslog_c (int priority, const char *msg)
+syslog_c (intgo priority, const char *msg)
{
syslog (priority, "%s", msg);
}
diff --git a/libgo/go/syscall/signame.c b/libgo/go/syscall/signame.c
index 5ff0b09..c2d3b9f 100644
--- a/libgo/go/syscall/signame.c
+++ b/libgo/go/syscall/signame.c
@@ -10,10 +10,10 @@
#include "arch.h"
#include "malloc.h"
-String Signame (int sig) asm ("syscall.Signame");
+String Signame (intgo sig) asm ("syscall.Signame");
String
-Signame (int sig)
+Signame (intgo sig)
{
const char* s = NULL;
char buf[100];
@@ -27,7 +27,7 @@ Signame (int sig)
if (s == NULL)
{
- snprintf(buf, sizeof buf, "signal %d", sig);
+ snprintf(buf, sizeof buf, "signal %ld", (long) sig);
s = buf;
}
len = __builtin_strlen (s);