Remove unused function.

llvm-svn: 227633
This commit is contained in:
Alexey Samsonov 2015-01-30 23:04:54 +00:00
parent 3ef249c9c0
commit df0b22c5a8
3 changed files with 0 additions and 20 deletions

View File

@ -210,7 +210,6 @@ void DisableCoreDumperIfNecessary();
void DumpProcessMap();
bool FileExists(const char *filename);
const char *GetEnv(const char *name);
bool SetEnv(const char *name, const char *value);
const char *GetPwd();
char *FindPathToBinary(const char *name);
u32 GetUid();

View File

@ -120,17 +120,6 @@ void GetThreadStackTopAndBottom(bool at_initialization, uptr *stack_top,
*stack_bottom = (uptr)stackaddr;
}
bool SetEnv(const char *name, const char *value) {
void *f = dlsym(RTLD_NEXT, "setenv");
if (f == 0)
return false;
typedef int(*setenv_ft)(const char *name, const char *value, int overwrite);
setenv_ft setenv_f;
CHECK_EQ(sizeof(setenv_f), sizeof(f));
internal_memcpy(&setenv_f, &f, sizeof(f));
return setenv_f(name, value, 1) == 0;
}
bool SanitizerSetThreadName(const char *name) {
#ifdef PR_SET_NAME
return 0 == prctl(PR_SET_NAME, (unsigned long)name, 0, 0, 0); // NOLINT

View File

@ -187,14 +187,6 @@ TEST_F(ThreadListerTest, ResetMakesNewThreadsKnown) {
ASSERT_TRUE(HasElement(threads_after_extra, extra_tid));
}
TEST(SanitizerCommon, SetEnvTest) {
const char kEnvName[] = "ENV_FOO";
SetEnv(kEnvName, "value");
EXPECT_STREQ("value", getenv(kEnvName));
unsetenv(kEnvName);
EXPECT_EQ(0, getenv(kEnvName));
}
#if defined(__x86_64__) || defined(__i386__)
void *thread_self_offset_test_func(void *arg) {
bool result =