|
Revision 1650, 1.5 kB
(checked in by ensc, 4 years ago)
|
Esetenv(): added
|
- Property svn:eol-style set to
native
- Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
#ifndef H_ENSC_IN_WRAPPERS_H |
|---|
| 19 |
# error wrappers_handler.hc can not be used in this way |
|---|
| 20 |
#endif |
|---|
| 21 |
|
|---|
| 22 |
inline static WRAPPER_DECL void * |
|---|
| 23 |
Emalloc(size_t size) |
|---|
| 24 |
{ |
|---|
| 25 |
register void *res = malloc(size); |
|---|
| 26 |
FatalErrnoError(res==0 && size!=0, "malloc()"); |
|---|
| 27 |
return res; |
|---|
| 28 |
} |
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
inline static WRAPPER_DECL void * |
|---|
| 32 |
Erealloc( void *ptr, |
|---|
| 33 |
size_t new_size) |
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 |
{ |
|---|
| 37 |
register void *res = realloc(ptr, new_size); |
|---|
| 38 |
FatalErrnoError(res==0 && new_size!=0, "realloc()"); |
|---|
| 39 |
|
|---|
| 40 |
return res; |
|---|
| 41 |
} |
|---|
| 42 |
|
|---|
| 43 |
inline static WRAPPER_DECL void |
|---|
| 44 |
Esetenv(char const *key, char const *val, int override) |
|---|
| 45 |
{ |
|---|
| 46 |
FatalErrnoError(setenv(key,val,override)==-1, "setenv()"); |
|---|
| 47 |
} |
|---|