github.com/razvanm/vanadium-go-1.3@v0.0.0-20160721203343-4a65068e5915/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 darwin dragonfly freebsd linux netbsd openbsd
     6  
     7  #include "libcgo.h"
     8  
     9  #include <stdlib.h>
    10  
    11  /* Stub for calling setenv */
    12  void
    13  x_cgo_setenv(char **arg)
    14  {
    15  	setenv(arg[0], arg[1], 1);
    16  }
    17  
    18  /* Stub for calling unsetenv */
    19  void
    20  x_cgo_unsetenv(char *arg)
    21  {
    22  	unsetenv(arg);
    23  }