2016-12-06 17:05:56 +00:00
|
|
|
|
#ifndef __LIB_EX_CONST_H__
|
|
|
|
|
#define __LIB_EX_CONST_H__
|
|
|
|
|
|
|
|
|
|
#include "ex_platform.h"
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* On Windows PATH_MAX does not exist but MAX_PATH does.
|
|
|
|
|
* WinAPI MAX_PATH limit is only 256. MSVCR fuctions does not have this limit.
|
|
|
|
|
* Redefine PATH_MAX for Windows to support longer path names.
|
|
|
|
|
*/
|
|
|
|
|
#if defined(EX_OS_WIN32)
|
|
|
|
|
# define EX_PATH_MAX 1024
|
|
|
|
|
#elif defined(EX_OS_LINUX)
|
|
|
|
|
# ifdef PATH_MAX
|
|
|
|
|
# define EX_PATH_MAX PATH_MAX
|
|
|
|
|
# else
|
|
|
|
|
# define EX_PATH_MAX 1024
|
|
|
|
|
# endif
|
|
|
|
|
#elif defined(EX_OS_MACOS)
|
|
|
|
|
# define EX_PATH_MAX 1024 /* Recommended value for OSX. */
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* Path and string macros. */
|
|
|
|
|
#if defined(EX_OS_WIN32)
|
|
|
|
|
# define EX_PATH_SEP L';'
|
|
|
|
|
# define EX_PATH_SEP_STR L";"
|
|
|
|
|
# define EX_SEP L'\\'
|
|
|
|
|
# define EX_SEP_STR L"\\"
|
|
|
|
|
#else
|
|
|
|
|
# define EX_PATH_SEP L':'
|
|
|
|
|
# define EX_PATH_SEP_STR L":"
|
|
|
|
|
# define EX_SEP L'/'
|
|
|
|
|
# define EX_SEP_STR L"/"
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#define EX_CURRENT_DIR L'.'
|
|
|
|
|
#define EX_CURRENT_DIR_STR L"."
|
|
|
|
|
#define EX_NULL_END L'\0'
|
|
|
|
|
|
2016-12-14 15:34:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//====================================================
|
|
|
|
|
// error code.
|
|
|
|
|
//====================================================
|
|
|
|
|
#define EXRV_OK 0
|
|
|
|
|
#define EXRV_SYS_ERR 1 // ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD><F3A3ACBF><EFBFBD>ʹ<EFBFBD><CAB9>GetLastError<6F><72><EFBFBD><EFBFBD>errno<6E><6F><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
#define EXRV_FAILED 2 // <20><><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>
|
|
|
|
|
|
|
|
|
|
//#define EXRV_CANNOT_FOUND 9
|
|
|
|
|
#define EXRV_CANNOT_CREATE 10
|
|
|
|
|
#define EXRV_CANNOT_OPEN 11
|
|
|
|
|
#define EXRV_CANNOT_SET 12
|
|
|
|
|
#define EXRV_CANNOT_REMOVE 13
|
|
|
|
|
#define EXRV_NOT_START 14
|
|
|
|
|
#define EXRV_NOT_EXISTS 14
|
|
|
|
|
|
2016-12-06 17:05:56 +00:00
|
|
|
|
#endif // __LIB_EX_CONST_H__
|