X-Git-Url: http://git.tuebingen.mpg.de/?p=osl.git;a=blobdiff_plain;f=util.h;h=53221c99e6ac7b9fc68cda57ef60b08b4bd28206;hp=2e3c66fcf0214e5bb2b098d02cfce5758e5500e4;hb=e2950383a28766d521a69ec5660b8271f322cbdb;hpb=06fa6acd87ac23ee3ca422dbc56cf97a3c71aa09 diff --git a/util.h b/util.h index 2e3c66f..53221c9 100644 --- a/util.h +++ b/util.h @@ -26,7 +26,7 @@ static inline int osl_mkdir(const char *path, mode_t mode) { if (!mkdir(path, mode)) return 1; - return -ERRNO_TO_ERROR(errno); + return -E_OSL_MKDIR; } /** @@ -42,7 +42,7 @@ static inline int osl_mkdir(const char *path, mode_t mode) _static_inline_ int osl_rename(const char *old_path, const char *new_path) { if (rename(old_path, new_path) < 0) - return -ERRNO_TO_ERROR(errno); + return -E_OSL_RENAME; return 1; } @@ -50,5 +50,5 @@ _static_inline_ int osl_stat(const char *path, struct stat *buf) { if (stat(path, buf) >= 0) return 1; - return -ERRNO_TO_ERROR(errno); + return -E_OSL_STAT; }