Commit 6876ad37 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

runtime: maybe fix Windows build broken by cgo setenv CL

R=rsc
CC=golang-dev
https://golang.org/cl/4428078
parent c783e68f
......@@ -28,18 +28,20 @@ CGO_OFILES=\
$(GOOS)_$(GOARCH).o\
util.o\
OFILES=\
iscgo.$O\
callbacks.$O\
_cgo_import.$O\
$(CGO_OFILES)\
ifeq ($(GOOS),windows)
CGO_LDFLAGS=-lm -mthreads
else
CGO_LDFLAGS=-lpthread
CGO_OFILES+=setenv.o\
endif
OFILES=\
iscgo.$O\
callbacks.$O\
_cgo_import.$O\
$(CGO_OFILES)\
ifeq ($(GOOS),freebsd)
OFILES+=\
freebsd.$O\
......
// Copyright 20111 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 "libcgo.h"
#include <stdlib.h>
/* Stub for calling setenv */
static void
xlibcgo_setenv(char **arg)
{
setenv(arg[0], arg[1], 1);
}
void (*libcgo_setenv)(char**) = xlibcgo_setenv;
......@@ -4,8 +4,6 @@
#include "libcgo.h"
#include <stdlib.h>
/* Stub for calling malloc from Go */
static void
x_cgo_malloc(void *p)
......@@ -51,12 +49,3 @@ xlibcgo_thread_start(ThreadStart *arg)
}
void (*libcgo_thread_start)(ThreadStart*) = xlibcgo_thread_start;
/* Stub for calling setenv */
static void
xlibcgo_setenv(char **arg)
{
setenv(arg[0], arg[1], 1);
}
void (*libcgo_setenv)(char**) = xlibcgo_setenv;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment