[DEV] set all define type with stdint and correction of windows mkdir

This commit is contained in:
Edouard DUPIN 2013-04-17 21:01:17 +02:00
parent 105029620e
commit 4c235a876e
2 changed files with 13 additions and 31 deletions

View File

@ -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 */
#ifdef __TARGET_OS__Windows
if(0!=mkdir(path)
#else
if(0!=mkdir(path, mode)
#endif
&& errno != EEXIST) {
status = -1;
}

View File

@ -14,33 +14,11 @@
#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 enum {
ERR_NONE = 0, //!< No error, luckily everything went fine
ERR_FAIL, //!< Miscellaneous failure