diff --git a/SRC/echoping.c b/SRC/echoping.c index 49a0b87..4025107 100644 --- a/SRC/echoping.c +++ b/SRC/echoping.c @@ -82,7 +82,7 @@ main (argc, argv) #endif unsigned char fill = ' '; unsigned int fill_i; - unsigned short fill_requested = 0; + boolean fill_requested = 0; unsigned int i = 0; char *plugin_name, *complete_plugin_name = NULL; char *ext; @@ -92,34 +92,34 @@ main (argc, argv) void to_alarm (); /* our alarm() signal handler */ void interrupted (); unsigned int timeout = 10; - unsigned short timeout_requested = 0; - unsigned short size_requested = 0; + boolean timeout_requested = 0; + boolean size_requested = 0; char *url = ""; #if USE_SIGACTION struct sigaction mysigaction; #endif char *plugin_port_name, *port_name; - unsigned short plugin_raw; - unsigned short port_to_use = USE_ECHO; - unsigned short http = 0; - unsigned short smtp = 0; - unsigned short discard = 0; - unsigned short chargen = 0; - unsigned short udp = 0; - unsigned short icp = 0; + boolean plugin_raw; + boolean port_to_use = USE_ECHO; + boolean http = 0; + boolean smtp = 0; + boolean discard = 0; + boolean chargen = 0; + boolean udp = 0; + boolean icp = 0; - unsigned short nocache = 0; + boolean nocache = 0; #ifdef ICP icp_opcode opcode = ICP_OP_QUERY; #endif - unsigned short ttcp = 0; - unsigned short tcp = 0; - unsigned short ssl = 0; + boolean ttcp = 0; + boolean tcp = 0; + boolean ssl = 0; - unsigned short stop_at_newlines = 1; + boolean stop_at_newlines = 1; #ifdef OPENSSL SSL_METHOD *meth; diff --git a/SRC/echoping.h b/SRC/echoping.h index ddb5c66..2e850c6 100644 --- a/SRC/echoping.h +++ b/SRC/echoping.h @@ -112,19 +112,27 @@ typedef union _CHANNEL } CHANNEL; +#if __sparc__ && __GNUC__ +/* There is a bug in gcc 2.95 and gcc 3.3 on UltraSparc platforms, that is triggered when you give addresses of shorts to the popt library. See + for instance Debian bug #254322. Alignment bug? */ +typedef unsigned int boolean; +#else +typedef unsigned int boolean; +#endif + struct result { - unsigned short valid; + boolean valid; struct timeval timevalue; }; -unsigned short timeout_flag; +boolean timeout_flag; struct echoping_struct { - unsigned short udp; /* Use the UDP protocol (TCP is the default) */ - unsigned short only_ipv4; - unsigned short only_ipv6; - unsigned short verbose; + boolean udp; /* Use the UDP protocol (TCP is the default) */ + boolean only_ipv4; + boolean only_ipv6; + boolean verbose; }; typedef struct echoping_struct echoping_options; #ifndef IN_PLUGIN @@ -226,7 +234,7 @@ int smtp_read_response_from_server (); extern char *progname; -extern unsigned short timeout_flag; +extern boolean timeout_flag; #ifndef HEADER_INCLUDED #define HEADER_INCLUDED