environ: Don't expose get_environ_ptr in csdlib
since it isn't defined in c/c++ standard Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
76803f4a07
commit
2f32c8dcf2
@ -42,9 +42,6 @@ namespace std
|
|||||||
|
|
||||||
// Environment variable support
|
// Environment variable support
|
||||||
|
|
||||||
#ifndef CONFIG_DISABLE_ENVIRON
|
|
||||||
using ::get_environ_ptr;
|
|
||||||
#endif
|
|
||||||
using ::getenv;
|
using ::getenv;
|
||||||
using ::putenv;
|
using ::putenv;
|
||||||
using ::clearenv;
|
using ::clearenv;
|
||||||
|
@ -62,7 +62,11 @@
|
|||||||
* function call. However, get_environ_ptr() can be used in its place.
|
* function call. However, get_environ_ptr() can be used in its place.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define environ get_environ_ptr()
|
#ifdef CONFIG_DISABLE_ENVIRON
|
||||||
|
# define environ NULL
|
||||||
|
#else
|
||||||
|
# define environ get_environ_ptr()
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_FS_LARGEFILE) && defined(CONFIG_HAVE_LONG_LONG)
|
#if defined(CONFIG_FS_LARGEFILE) && defined(CONFIG_HAVE_LONG_LONG)
|
||||||
# define mkstemp64 mkstemp
|
# define mkstemp64 mkstemp
|
||||||
@ -138,11 +142,7 @@ void arc4random_buf(FAR void *bytes, size_t nbytes);
|
|||||||
|
|
||||||
/* Environment variable support */
|
/* Environment variable support */
|
||||||
|
|
||||||
#ifdef CONFIG_DISABLE_ENVIRON
|
|
||||||
# define get_environ_ptr() NULL
|
|
||||||
#else
|
|
||||||
FAR char **get_environ_ptr(void);
|
FAR char **get_environ_ptr(void);
|
||||||
#endif
|
|
||||||
FAR char *getenv(FAR const char *name);
|
FAR char *getenv(FAR const char *name);
|
||||||
int putenv(FAR const char *string);
|
int putenv(FAR const char *string);
|
||||||
int clearenv(void);
|
int clearenv(void);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user