acl/lib_acl_cpp/include/acl_cpp/stdlib/util.hpp

52 lines
1.4 KiB
C++
Raw Normal View History

#pragma once
2017-06-02 14:47:24 +08:00
#include "../acl_cpp_define.hpp"
2014-11-19 00:25:21 +08:00
namespace acl
{
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>ϵͳ<EFBFBD><EFBFBD><EFBFBD>ó<EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>Ĵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @return {int} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2014-11-19 00:25:21 +08:00
*/
ACL_CPP_API int last_error(void);
/**
* <EFBFBD>ֹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ô<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param errnum {int} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2014-11-19 00:25:21 +08:00
*/
ACL_CPP_API void set_error(int errnum);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>ϵͳ<EFBFBD><EFBFBD><EFBFBD>ó<EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>Ĵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD>ú<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֲ߳̾<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߳<EFBFBD>
* <EFBFBD><EFBFBD>ȫ<EFBFBD>ģ<EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Щ
* @return {const char *} <EFBFBD><EFBFBD><EFBFBD>ش<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD>Ϣ
2014-11-19 00:25:21 +08:00
*/
ACL_CPP_API const char* last_serror(void);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>ϵͳ<EFBFBD><EFBFBD><EFBFBD>ó<EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>Ĵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
* @param buf {char*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param size {int} buffer <EFBFBD>Ŀռ<EFBFBD><EFBFBD><EFBFBD>С
* @return {const char*} <EFBFBD><EFBFBD><EFBFBD>صĵ<EFBFBD>ַӦ<EFBFBD><EFBFBD> buffer <EFBFBD><EFBFBD>ͬ
2014-11-19 00:25:21 +08:00
*/
ACL_CPP_API const char* last_serror(char* buf, size_t size);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڱ<EFBFBD>׼C<EFBFBD><EFBFBD> strerror, <EFBFBD><EFBFBD><EFBFBD>ú<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǿ<EFBFBD>ƽ̨<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̰߳<EFBFBD>ȫ<EFBFBD>ģ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ö<EFBFBD>Ӧij<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* <EFBFBD>ŵĴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
* @param errnum {int} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param buf {char*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param size {int} buffer <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĵ<EFBFBD>С
* @return {const char*} <EFBFBD><EFBFBD><EFBFBD>صĵ<EFBFBD>ַӦ<EFBFBD><EFBFBD> buffer <EFBFBD><EFBFBD>ͬ
2014-11-19 00:25:21 +08:00
*/
ACL_CPP_API const char* string_error(int errnum, char* buf, size_t size);
ACL_CPP_API int strncasecmp_(const char *s1, const char *s2, size_t n);
ACL_CPP_API void assert_(bool n);
ACL_CPP_API void meter_time(const char *filename, int line, const char *info);
ACL_CPP_API long long get_curr_stamp(void);
ACL_CPP_API double stamp_sub(const struct timeval& from,
const struct timeval& sub);
2014-11-19 00:25:21 +08:00
} // namespace acl