updated
[gnutls.git] / src / libopts / autoopts / project.h
blobc0df391bc164f85dea4452e2433e1bc4ea323a4f
2 #ifndef AUTOGEN_PROJECT_H
3 #define AUTOGEN_PROJECT_H
5 #include "config.h"
6 #include "compat/compat.h"
7 #include "ag-char-map.h"
9 /*
10 * Procedure success codes
12 * USAGE: define procedures to return "tSuccess". Test their results
13 * with the SUCCEEDED, FAILED and HADGLITCH macros.
15 * Microsoft sticks its nose into user space here, so for Windows' sake,
16 * make sure all of these are undefined.
18 #undef SUCCESS
19 #undef FAILURE
20 #undef PROBLEM
21 #undef SUCCEEDED
22 #undef SUCCESSFUL
23 #undef FAILED
24 #undef HADGLITCH
26 #define SUCCESS ((tSuccess) 0)
27 #define FAILURE ((tSuccess)-1)
28 #define PROBLEM ((tSuccess) 1)
30 typedef int tSuccess;
32 #define SUCCEEDED(p) ((p) == SUCCESS)
33 #define SUCCESSFUL(p) SUCCEEDED(p)
34 #define FAILED(p) ((p) < SUCCESS)
35 #define HADGLITCH(p) ((p) > SUCCESS)
37 #ifndef STR
38 # define __STR(s) #s
39 # define STR(s) __STR(s)
40 #endif
42 #ifdef DEFINING
43 # define VALUE(s) = s
44 # define MODE
45 #else
46 # define VALUE(s)
47 # define MODE extern
48 #endif
50 #endif /* AUTOGEN_PROJECT_H */