diff options
author | Darren Tucker <dtucker@zip.com.au> | 2015-02-24 12:30:59 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2015-02-24 12:30:59 +1100 |
commit | dcc8997d116f615195aa7c9ec019fb36c28c6228 (patch) | |
tree | fe2b276636ec05203f48608e2ff734e4c76dbf68 /opacket.h | |
parent | 2285c30d51b7e2052c6526445abe7e7cc7e170a1 (diff) |
Convert two macros into functions.
Convert packet_send_debug and packet_disconnect from macros to
functions. Some older GCCs (2.7.x, 2.95.x) see to have problems with
variadic macros with only one argument so we convert these two into
functions. ok djm@
Diffstat (limited to 'opacket.h')
-rw-r--r-- | opacket.h | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -102,10 +102,11 @@ void packet_read_expect(int expected_type); | |||
102 | ssh_packet_get_string_ptr(active_state, (length_ptr)) | 102 | ssh_packet_get_string_ptr(active_state, (length_ptr)) |
103 | #define packet_get_cstring(length_ptr) \ | 103 | #define packet_get_cstring(length_ptr) \ |
104 | ssh_packet_get_cstring(active_state, (length_ptr)) | 104 | ssh_packet_get_cstring(active_state, (length_ptr)) |
105 | #define packet_send_debug(fmt, args...) \ | 105 | void packet_send_debug(const char *, ...) |
106 | ssh_packet_send_debug(active_state, (fmt), ##args) | 106 | __attribute__((format(printf, 1, 2))); |
107 | #define packet_disconnect(fmt, args...) \ | 107 | void packet_disconnect(const char *, ...) |
108 | ssh_packet_disconnect(active_state, (fmt), ##args) | 108 | __attribute__((format(printf, 1, 2))) |
109 | __attribute__((noreturn)); | ||
109 | #define packet_have_data_to_write() \ | 110 | #define packet_have_data_to_write() \ |
110 | ssh_packet_have_data_to_write(active_state) | 111 | ssh_packet_have_data_to_write(active_state) |
111 | #define packet_not_very_much_data_to_write() \ | 112 | #define packet_not_very_much_data_to_write() \ |