Workaround a gcc/popt bug on UltraSparcs

Initial
Stephane Bortzmeyer 20 years ago
parent a0fc54c78b
commit f55f381a26

@ -82,7 +82,7 @@ main (argc, argv)
#endif #endif
unsigned char fill = ' '; unsigned char fill = ' ';
unsigned int fill_i; unsigned int fill_i;
unsigned short fill_requested = 0; boolean fill_requested = 0;
unsigned int i = 0; unsigned int i = 0;
char *plugin_name, *complete_plugin_name = NULL; char *plugin_name, *complete_plugin_name = NULL;
char *ext; char *ext;
@ -92,34 +92,34 @@ main (argc, argv)
void to_alarm (); /* our alarm() signal handler */ void to_alarm (); /* our alarm() signal handler */
void interrupted (); void interrupted ();
unsigned int timeout = 10; unsigned int timeout = 10;
unsigned short timeout_requested = 0; boolean timeout_requested = 0;
unsigned short size_requested = 0; boolean size_requested = 0;
char *url = ""; char *url = "";
#if USE_SIGACTION #if USE_SIGACTION
struct sigaction mysigaction; struct sigaction mysigaction;
#endif #endif
char *plugin_port_name, *port_name; char *plugin_port_name, *port_name;
unsigned short plugin_raw; boolean plugin_raw;
unsigned short port_to_use = USE_ECHO; boolean port_to_use = USE_ECHO;
unsigned short http = 0; boolean http = 0;
unsigned short smtp = 0; boolean smtp = 0;
unsigned short discard = 0; boolean discard = 0;
unsigned short chargen = 0; boolean chargen = 0;
unsigned short udp = 0; boolean udp = 0;
unsigned short icp = 0; boolean icp = 0;
unsigned short nocache = 0; boolean nocache = 0;
#ifdef ICP #ifdef ICP
icp_opcode opcode = ICP_OP_QUERY; icp_opcode opcode = ICP_OP_QUERY;
#endif #endif
unsigned short ttcp = 0; boolean ttcp = 0;
unsigned short tcp = 0; boolean tcp = 0;
unsigned short ssl = 0; boolean ssl = 0;
unsigned short stop_at_newlines = 1; boolean stop_at_newlines = 1;
#ifdef OPENSSL #ifdef OPENSSL
SSL_METHOD *meth; SSL_METHOD *meth;

@ -112,19 +112,27 @@ typedef union _CHANNEL
} }
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 struct result
{ {
unsigned short valid; boolean valid;
struct timeval timevalue; struct timeval timevalue;
}; };
unsigned short timeout_flag; boolean timeout_flag;
struct echoping_struct struct echoping_struct
{ {
unsigned short udp; /* Use the UDP protocol (TCP is the default) */ boolean udp; /* Use the UDP protocol (TCP is the default) */
unsigned short only_ipv4; boolean only_ipv4;
unsigned short only_ipv6; boolean only_ipv6;
unsigned short verbose; boolean verbose;
}; };
typedef struct echoping_struct echoping_options; typedef struct echoping_struct echoping_options;
#ifndef IN_PLUGIN #ifndef IN_PLUGIN
@ -226,7 +234,7 @@ int smtp_read_response_from_server ();
extern char *progname; extern char *progname;
extern unsigned short timeout_flag; extern boolean timeout_flag;
#ifndef HEADER_INCLUDED #ifndef HEADER_INCLUDED
#define HEADER_INCLUDED #define HEADER_INCLUDED

Loading…
Cancel
Save