2014-12-10 18:23:11 +00:00
|
|
|
/*
|
|
|
|
* This file Copyright (C) 2014 Mnemosyne LLC
|
|
|
|
*
|
|
|
|
* It may be used under the GNU GPL versions 2 or 3
|
|
|
|
* or any future license endorsed by Mnemosyne LLC.
|
|
|
|
*
|
|
|
|
* $Id$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef TR_ERROR_TYPES_H
|
|
|
|
#define TR_ERROR_TYPES_H
|
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
|
|
|
|
#include <windows.h>
|
|
|
|
|
|
|
|
#define TR_ERROR_IS_ENOSPC(code) ((code) == ERROR_DISK_FULL)
|
|
|
|
|
2014-12-10 18:37:58 +00:00
|
|
|
#define TR_ERROR_EINVAL ERROR_INVALID_PARAMETER
|
|
|
|
|
2014-12-10 18:23:11 +00:00
|
|
|
#else /* _WIN32 */
|
|
|
|
|
|
|
|
#include <errno.h>
|
|
|
|
|
|
|
|
#define TR_ERROR_IS_ENOSPC(code) ((code) == ENOSPC)
|
|
|
|
|
2014-12-10 18:37:58 +00:00
|
|
|
#define TR_ERROR_EINVAL EINVAL
|
|
|
|
|
2014-12-10 18:23:11 +00:00
|
|
|
#endif /* _WIN32 */
|
|
|
|
|
|
|
|
#endif /* TR_ERROR_TYPES_H */
|