glib_compat: lift string functions from glib. remove unused API g_win32_error_message()

This commit is contained in:
Nguyen Anh Quynh
2016-12-26 22:36:47 +08:00
parent c5b8fbfbc6
commit 520f335a2a
4 changed files with 97 additions and 121 deletions

View File

@ -38,16 +38,6 @@ void error_set(Error **errp, ErrorClass err_class, const char *fmt, ...)
void error_set_errno(Error **errp, int os_error, ErrorClass err_class,
const char *fmt, ...) GCC_FMT_ATTR(4, 5);
#ifdef _WIN32
/**
* Set an indirect pointer to an error given a ErrorClass value and a
* printf-style human message, followed by a g_win32_error_message() string if
* @win32_err is not zero.
*/
void error_set_win32(Error **errp, int win32_err, ErrorClass err_class,
const char *fmt, ...) GCC_FMT_ATTR(4, 5);
#endif
/**
* Same as error_set(), but sets a generic error
*/
@ -56,11 +46,6 @@ void error_set_win32(Error **errp, int win32_err, ErrorClass err_class,
#define error_setg_errno(errp, os_error, fmt, ...) \
error_set_errno(errp, os_error, ERROR_CLASS_GENERIC_ERROR, \
fmt, ## __VA_ARGS__)
#ifdef _WIN32
#define error_setg_win32(errp, win32_err, fmt, ...) \
error_set_win32(errp, win32_err, ERROR_CLASS_GENERIC_ERROR, \
fmt, ## __VA_ARGS__)
#endif
/**
* Helper for open() errors