This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3140 from adityamandaleeka/env_pal
Fix usage of environment in PAL
- Loading branch information
Showing
14 changed files
with
775 additions
and
617 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
/*++ | ||
Module Name: | ||
include/pal/environ.h | ||
Abstract: | ||
Header file for functions manipulating environment variables | ||
--*/ | ||
|
||
#ifndef __ENVIRON_H_ | ||
#define __ENVIRON_H_ | ||
|
||
#ifdef __cplusplus | ||
extern "C" | ||
{ | ||
#endif // __cplusplus | ||
|
||
/*++ | ||
Variables : | ||
palEnvironment: a global variable equivalent to environ on systems on | ||
which that exists, and a pointer to an array of environment | ||
strings on systems without environ. | ||
gcsEnvironment: critical section to synchronize access to palEnvironment | ||
--*/ | ||
extern char **palEnvironment; | ||
extern CRITICAL_SECTION gcsEnvironment; | ||
|
||
/*++ | ||
Function: | ||
EnvironInitialize | ||
Initialization function for the PAL environment code. | ||
--*/ | ||
BOOL EnvironInitialize(); | ||
|
||
/*++ | ||
Function: | ||
EnvironGetenv | ||
Get the value of environment variable with the given name. | ||
--*/ | ||
char *EnvironGetenv(const char *name, BOOL copyValue = TRUE); | ||
|
||
/*++ | ||
Function: | ||
EnvironPutenv | ||
Add the environment variable string provided to the PAL version | ||
of the environment. | ||
--*/ | ||
BOOL EnvironPutenv(const char *string, BOOL deleteIfEmpty); | ||
|
||
/*++ | ||
Function: | ||
EnvironUnsetenv | ||
Remove the environment variable with the given name from the PAL | ||
version of the environment if it exists. | ||
--*/ | ||
void EnvironUnsetenv(const char *name); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif // __cplusplus | ||
|
||
#endif /* __ENVIRON_H_ */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.