[DEV] set all define type with stdint and correction of windows mkdir
This commit is contained in:
parent
105029620e
commit
4c235a876e
@ -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;
|
||||
}
|
||||
|
38
etk/types.h
38
etk/types.h
@ -14,40 +14,18 @@
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
#ifdef __TARGET_OS__MacOs
|
||||
// defien type : uintXX_t and intXX_t
|
||||
#include <stdint.h>
|
||||
#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;
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user