MGE General C Library - API Documentation v1.8.0
Library of general C functions.
mge-errno.h
Go to the documentation of this file.
1
16/* **********************************************************************
17 * *
18 * Changelog *
19 * *
20 * Date Author Version Description *
21 * *
22 * 23/01/2017 MG 1.0.1 First release. *
23 * 29/01/2017 MG 1.0.2 Add getaddrinfo related errors. Remove *
24 * unnecessary _ERR suffix. *
25 * 03/02/2017 MG 1.0.3 Add config file errors. *
26 * 08/02/2017 MG 1.0.4 Add message errors. *
27 * 28/09/2017 MG 1.0.5 Add SSH error. *
28 * 04/11/2017 MG 1.0.6 Add Doxygen comments. *
29 * 09/11/2017 MG 1.0.7 Add SPDX license tag. *
30 * 02/01/2018 MG 1.0.8 Move to new source directory structure. *
31 * 31/01/2018 MG 1.0.9 Add Lock not found. *
32 * 17/05/2018 MG 1.0.10 Add Client blocked. *
33 * 08/06/2019 MG 1.0.11 clang-format coding style changes. *
34 * 12/03/2020 MG 1.0.12 Add identification error. *
35 * 03/12/2021 MG 1.0.13 Tighten SPDX tag. *
36 * 14/04/2022 MG 1.0.14 Add MGE_PROTO and MGE_GENERAL. *
37 * 16/09/2022 MG 1.0.15 Rename of portability.h *
38 * *
39 ************************************************************************
40 */
41
42#ifndef MGE_ERRNO_H
43#define MGE_ERRNO_H
44
45#include <sys/types.h>
46
48
50
51extern int mge_errno;
52extern int sav_errno;
53
54/* mge_errno values. */
55#define MGE_ERRNO 1
56#define MGE_GAI 2
57#define MGE_GAI_BIND 3
58#define MGE_PARAM 4
59#define MGE_DUPLICATE_NODE 5
60#define MGE_NODE_NOT_FOUND 6
61#define MGE_CONFIG_PARAM 7
62#define MGE_CONFIG_PARSE 8
63#define MGE_INVAL_MSG 9
64#define MGE_SSH 10
65#define MGE_LOCK_NOT_FOUND 11
66#define MGE_CLIENT_BLOCKED 12
67#define MGE_ID 13
68#define MGE_PROTO 14
69#define MGE_GENERAL 15
71const char *mge_strerror(const int mge_err);
72
74
75#endif /* ndef MGE_ERRNO_H */
BEGIN_C_DECLS int mge_errno
Error number.
Definition: errno.c:53
const char * mge_strerror(const int mge_err)
Return a string describing the error number.
Definition: error.c:52
int sav_errno
Used to store errno, gai_errno etc.
Definition: errno.c:54
Header file to ease portability.
#define BEGIN_C_DECLS
BEGIN_C_DECLS should be used at the beginning of declarations so that C++ compilers don't mangle thei...
Definition: mge-portability.h:48
#define END_C_DECLS
Use END_C_DECLS at the end of C declarations.
Definition: mge-portability.h:52