github.com/aloncn/graphics-go@v0.0.1/src/runtime/cgo/gcc_setenv.c (about) 1 // Copyright 2011 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // +build cgo 6 // +build darwin dragonfly freebsd linux netbsd openbsd solaris 7 8 #include "libcgo.h" 9 10 #include <stdlib.h> 11 12 /* Stub for calling setenv */ 13 void 14 x_cgo_setenv(char **arg) 15 { 16 setenv(arg[0], arg[1], 1); 17 } 18 19 /* Stub for calling unsetenv */ 20 void 21 x_cgo_unsetenv(char *arg) 22 { 23 unsetenv(arg); 24 }