#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 57 of file _stdlib.cpp.
58{
60 char* s = getenv(name);
61 if (s) {
63 return 0;
64 }
65 errno = ENOENT;
66 return -1;
67}
#define STRTOMBS_ER(str, mbs)
#define MBSTOSTR_ER(mbs, nmbs, str)
◆ __realpath()
| DCLCAPI int __realpath |
( |
const String & | _path, |
|
|
String & | _resolved ) |
Definition at line 83 of file _stdlib.cpp.
84{
85 char resolved[PATH_MAX + 1];
87 char* s = ::realpath(path, resolved);
88 if (s) {
90 return 0;
91 }
92 return -1;
93}
◆ __setenv()
| DCLCAPI int __setenv |
( |
const String & | _name, |
|
|
const String & | _value, |
|
|
bool | _overwrite = true ) |
Definition at line 69 of file _stdlib.cpp.
70{
73 return setenv(name, value, _overwrite ? 1 : 0);
74}
◆ __unsetenv()
| DCLCAPI int __unsetenv |
( |
const String & | _name | ) |
|
Definition at line 76 of file _stdlib.cpp.
77{
79 return unsetenv(name);
80}