#include <dcl/Config.h>
#include <stdlib.h>
Go to the source code of this file.
◆ __DCL_STDLIB_H__
#define __DCL_STDLIB_H__ 20110918 |
◆ __getenv()
DCLCAPI int __getenv |
( |
const String & | _name, |
|
|
String & | _value ) |
- Returns
- == NULL or -1, see errno 환경변수에서 일치하는 것이 없으면 errno를 ENOENT로 설정하고 -1을 반환한다
Definition at line 40 of file _stdlib.cpp.
41{
43 char* s = ::getenv(name);
44 if (s) {
46 return 0;
47 }
48 errno = ENOENT;
49 return -1;
50}
#define STRTOMBS_ER(str, mbs)
#define MBSTOSTR_ER(mbs, nmbs, str)
◆ __realpath()
DCLCAPI int __realpath |
( |
const String & | _path, |
|
|
String & | _resolved ) |
Definition at line 65 of file _stdlib.cpp.
66{
67 char resolved[PATH_MAX + 1];
69 char* s = ::realpath(path, resolved);
70 if (s) {
72 return 0;
73 }
74 return -1;
75}
◆ __setenv()
DCLCAPI int __setenv |
( |
const String & | _name, |
|
|
const String & | _value, |
|
|
bool | _overwrite = true ) |
Definition at line 52 of file _stdlib.cpp.
53{
56 return ::setenv(name, value, _overwrite ? 1 : 0);
57}
◆ __unsetenv()
DCLCAPI int __unsetenv |
( |
const String & | _name | ) |
|
Definition at line 59 of file _stdlib.cpp.
60{
62 return ::unsetenv(name);
63}