mirror of
https://github.com/lifegpc/c-utils.git
synced 2026-06-08 22:28:54 +08:00
Update
This commit is contained in:
12
err.h
12
err.h
@@ -1,5 +1,6 @@
|
||||
#ifndef _UTILS_ERR_H
|
||||
#define _UTILS_ERR_H
|
||||
#if __cplusplus
|
||||
#include <string>
|
||||
|
||||
namespace err {
|
||||
@@ -11,4 +12,15 @@ namespace err {
|
||||
*/
|
||||
bool get_errno_message(std::string &out, int errnum);
|
||||
}
|
||||
extern "C" {
|
||||
#endif
|
||||
/**
|
||||
* @brief Get error message from errno
|
||||
* @param errnum errno
|
||||
* @return Output string. Need free memory by calling free.
|
||||
*/
|
||||
char* err_get_errno_message(int errnum);
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user