Mercurial > dropbear
comparison dbutil.h @ 801:7dcb46da72d9 ecc
merge in HEAD
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 21 May 2013 12:09:35 +0800 |
parents | 2202e854d187 504f33c684b5 |
children | 4095b6d7c9fc |
comparison
equal
deleted
inserted
replaced
799:c344607b7341 | 801:7dcb46da72d9 |
---|---|
33 void startsyslog(); | 33 void startsyslog(); |
34 #endif | 34 #endif |
35 | 35 |
36 #ifdef __GNUC__ | 36 #ifdef __GNUC__ |
37 #define ATTRIB_PRINTF(fmt,args) __attribute__((format(printf, fmt, args))) | 37 #define ATTRIB_PRINTF(fmt,args) __attribute__((format(printf, fmt, args))) |
38 #define ATTRIB_NORETURN __attribute__((noreturn)) | |
39 #define ATTRIB_SENTINEL __attribute__((sentinel)) | |
38 #else | 40 #else |
39 #define ATTRIB_PRINTF(fmt,args) | 41 #define ATTRIB_PRINTF(fmt,args) |
40 #endif | |
41 | |
42 #ifdef __GNUC__ | |
43 #define ATTRIB_NORETURN __attribute__((noreturn)) | |
44 #else | |
45 #define ATTRIB_NORETURN | 42 #define ATTRIB_NORETURN |
43 #define ATTRIB_SENTINEL | |
46 #endif | 44 #endif |
47 | 45 |
48 extern void (*_dropbear_exit)(int exitcode, const char* format, va_list param) ATTRIB_NORETURN; | 46 extern void (*_dropbear_exit)(int exitcode, const char* format, va_list param) ATTRIB_NORETURN; |
49 extern void (*_dropbear_log)(int priority, const char* format, va_list param); | 47 extern void (*_dropbear_log)(int priority, const char* format, va_list param); |
50 | 48 |
55 | 53 |
56 void fail_assert(const char* expr, const char* file, int line) ATTRIB_NORETURN; | 54 void fail_assert(const char* expr, const char* file, int line) ATTRIB_NORETURN; |
57 | 55 |
58 #ifdef DEBUG_TRACE | 56 #ifdef DEBUG_TRACE |
59 void dropbear_trace(const char* format, ...) ATTRIB_PRINTF(1,2); | 57 void dropbear_trace(const char* format, ...) ATTRIB_PRINTF(1,2); |
58 void dropbear_trace2(const char* format, ...) ATTRIB_PRINTF(1,2); | |
60 void printhex(const char * label, const unsigned char * buf, int len); | 59 void printhex(const char * label, const unsigned char * buf, int len); |
61 void printmpint(const char *label, mp_int *mp); | 60 void printmpint(const char *label, mp_int *mp); |
62 extern int debug_trace; | 61 extern int debug_trace; |
63 #endif | 62 #endif |
64 | 63 |