Annotation of embedaddon/ntp/sntp/libopts/autoopts/project.h, revision 1.1.1.1

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>