From 4c235a876e96a91f416cf54d3e8dfca0c8b909dc Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Wed, 17 Apr 2013 21:01:17 +0200 Subject: [PATCH] [DEV] set all define type with stdint and correction of windows mkdir --- etk/os/FSNode.cpp | 6 +++++- etk/types.h | 38 ++++++++------------------------------ 2 files changed, 13 insertions(+), 31 deletions(-) diff --git a/etk/os/FSNode.cpp b/etk/os/FSNode.cpp index 3ff0160..3f23ffb 100644 --- a/etk/os/FSNode.cpp +++ b/etk/os/FSNode.cpp @@ -267,7 +267,11 @@ static int32_t FSNODE_LOCAL_mkdir(const char *path, mode_t mode) int32_t status = 0; if (stat(path, &st) != 0) { /* Directory does not exist. EEXIST for race condition */ - if( 0!=mkdir(path, mode) + #ifdef __TARGET_OS__Windows + if(0!=mkdir(path) + #else + if(0!=mkdir(path, mode) + #endif && errno != EEXIST) { status = -1; } diff --git a/etk/types.h b/etk/types.h index af5bc62..8bc5373 100644 --- a/etk/types.h +++ b/etk/types.h @@ -14,40 +14,18 @@ #include #include #include - -#ifdef __TARGET_OS__MacOs +// defien type : uintXX_t and intXX_t #include -#else -#ifndef __int8_t_defined -# define __int8_t_defined - typedef signed char int8_t; - typedef signed short int int16_t; - typedef int int32_t; - typedef signed long long int int64_t; -#endif - -#ifndef __uint8_t_defined -# define __uint8_t_defined - typedef unsigned char uint8_t; - typedef unsigned short int uint16_t; - typedef unsigned int uint32_t; -# if __WORDSIZE == 64 - typedef unsigned long int uint64_t; -# else - typedef unsigned long long int uint64_t; -# endif -#endif -#endif -typedef uint32_t uniChar_t; +typedef uint32_t uniChar_t; typedef enum { - ERR_NONE = 0, //!< No error, luckily everything went fine - ERR_FAIL, //!< Miscellaneous failure - ERR_INVAL, //!< Invalid entry parameter - ERR_MEM, //!< Dynamic memory allocation failure - ERR_TIMEOUT, //!< Request time out - ERR_BUSY, //!< Element curently Busy + ERR_NONE = 0, //!< No error, luckily everything went fine + ERR_FAIL, //!< Miscellaneous failure + ERR_INVAL, //!< Invalid entry parameter + ERR_MEM, //!< Dynamic memory allocation failure + ERR_TIMEOUT, //!< Request time out + ERR_BUSY, //!< Element curently Busy }erreurCode_te;