17 #ifndef CMOCKA_PRIVATE_H_ 18 #define CMOCKA_PRIVATE_H_ 33 # define inline __inline 36 # define va_copy(dest, src) (dest = src) 39 # define strcasecmp _stricmp 40 # define strncasecmp _strnicmp 42 # if defined(HAVE__SNPRINTF_S) 44 # define snprintf(d, n, ...) _snprintf_s((d), (n), _TRUNCATE, __VA_ARGS__) 46 # if defined(HAVE__SNPRINTF) 48 # define snprintf _snprintf 50 # if !defined(HAVE_SNPRINTF) 51 # error "no snprintf compatible function found" 56 # if defined(HAVE__VSNPRINTF_S) 58 # define vsnprintf(s, n, f, v) _vsnprintf_s((s), (n), _TRUNCATE, (f), (v)) 60 # if defined(HAVE__VSNPRINTF) 62 # define vsnprintf _vsnprintf 64 # if !defined(HAVE_VSNPRINTF) 65 # error "No vsnprintf compatible function found" 82 # define PRIu64 "I64u" 86 # define PRIuMAX PRIu64 90 #define PRIxMAX "I64x" 94 #define PRIXMAX "I64X" 99 #ifndef __PRI64_PREFIX 100 # if __WORDSIZE == 64 101 # define __PRI64_PREFIX "l" 103 # define __PRI64_PREFIX "ll" 112 # define PRIu64 __PRI64_PREFIX "u" 116 # define PRIuMAX __PRI64_PREFIX "u" 120 #define PRIxMAX __PRI64_PREFIX "x" 124 #define PRIXMAX __PRI64_PREFIX "X" 130 #define SAFE_FREE(x) do { if ((x) != NULL) {free(x); x=NULL;} } while(0) 133 #define ZERO_STRUCT(x) memset((char *)&(x), 0, sizeof(x)) 136 #define ZERO_STRUCTP(x) do { if ((x) != NULL) memset((char *)(x), 0, sizeof(*(x))); } while(0) 139 #define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0])) 142 #define BURN_STRING(x) do { if ((x) != NULL) memset((x), 'X', strlen((x))); } while(0) 156 #define discard_const(ptr) ((void *)((uintptr_t)(ptr))) 161 #define discard_const_p(type, ptr) ((type *)discard_const(ptr))
WINBASEAPI BOOL WINAPI IsDebuggerPresent(VOID)