Skip to content

Create a small wrapper for setenv() for portability to Windows #100

@coryan

Description

@coryan

Some of our tests need to set environment variables. We need a wrapper for ::setenv() as this is a Unix specific call. h/t @mbrukman that we can use this trick from abseil:

#ifdef WIN32
#include <windows.h>
#endif

#ifdef WIN32
      SetEnvironmentVariable(...);
#else
      setenv(...);
#endif

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.good first issueThis issue is a good place to started contributing to this repository.help wantedWe'd love to have community involvement on this issue.triage meI really want to be triaged.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions