mirror of
https://github.com/rkd77/elinks.git
synced 2025-06-30 22:19:29 -04:00
Make elinks tcc (tiny C compiler) friendly.
If you want to try tcc use CC=tcc ./configure and make LD=tcc. I built ELinks with tcc, but ELinks segfaults.
This commit is contained in:
parent
20f587a725
commit
d18809522e
@ -15,8 +15,9 @@ struct object {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#define OBJECT_HEAD(type) \
|
#define OBJECT_HEAD(type) \
|
||||||
LIST_HEAD(type); \
|
type *next; \
|
||||||
struct object object;
|
type *prev; \
|
||||||
|
struct object object
|
||||||
|
|
||||||
struct object_head {
|
struct object_head {
|
||||||
OBJECT_HEAD(struct object *);
|
OBJECT_HEAD(struct object *);
|
||||||
|
@ -847,7 +847,7 @@ load_uri(struct uri *uri, struct uri *referrer, struct download *download,
|
|||||||
struct cache_entry *cached;
|
struct cache_entry *cached;
|
||||||
struct connection *conn;
|
struct connection *conn;
|
||||||
struct uri *proxy_uri, *proxied_uri;
|
struct uri *proxy_uri, *proxied_uri;
|
||||||
enum connection_state connection_state = S_OK;
|
int connection_state = S_OK;
|
||||||
|
|
||||||
if (download) {
|
if (download) {
|
||||||
download->conn = NULL;
|
download->conn = NULL;
|
||||||
|
@ -86,8 +86,8 @@ int has_keepalive_connection(struct connection *);
|
|||||||
void add_keepalive_connection(struct connection *conn, long timeout_in_seconds,
|
void add_keepalive_connection(struct connection *conn, long timeout_in_seconds,
|
||||||
void (*done)(struct connection *));
|
void (*done)(struct connection *));
|
||||||
|
|
||||||
void abort_connection(struct connection *, int);
|
void abort_connection(struct connection *, enum connection_state);
|
||||||
void retry_connection(struct connection *, int);
|
void retry_connection(struct connection *, enum connection_state);
|
||||||
|
|
||||||
void change_connection(struct download *old, struct download *new,
|
void change_connection(struct download *old, struct download *new,
|
||||||
enum connection_priority newpri, int interrupt);
|
enum connection_priority newpri, int interrupt);
|
||||||
|
@ -77,7 +77,7 @@ static struct dnsquery *dns_queue = NULL;
|
|||||||
|
|
||||||
static INIT_LIST_HEAD(dns_cache);
|
static INIT_LIST_HEAD(dns_cache);
|
||||||
|
|
||||||
static void done_dns_lookup(struct dnsquery *query, int res);
|
static void done_dns_lookup(struct dnsquery *query, enum dns_result res);
|
||||||
|
|
||||||
|
|
||||||
/* DNS cache management: */
|
/* DNS cache management: */
|
||||||
@ -136,7 +136,7 @@ del_dns_cache_entry(struct dnsentry *dnsentry)
|
|||||||
|
|
||||||
/* Synchronous DNS lookup management: */
|
/* Synchronous DNS lookup management: */
|
||||||
|
|
||||||
int
|
enum dns_result
|
||||||
do_real_lookup(unsigned char *name, struct sockaddr_storage **addrs, int *addrno,
|
do_real_lookup(unsigned char *name, struct sockaddr_storage **addrs, int *addrno,
|
||||||
int in_thread)
|
int in_thread)
|
||||||
{
|
{
|
||||||
|
@ -140,7 +140,7 @@ static INIT_LIST_HEAD(strerror_buf); /* struct strerror_val */
|
|||||||
* It never returns NULL (if one changes that, be warn that
|
* It never returns NULL (if one changes that, be warn that
|
||||||
* callers may not test for this condition) --Zas */
|
* callers may not test for this condition) --Zas */
|
||||||
unsigned char *
|
unsigned char *
|
||||||
get_state_message(int state, struct terminal *term)
|
get_state_message(enum connection_state state, struct terminal *term)
|
||||||
{
|
{
|
||||||
unsigned char *e;
|
unsigned char *e;
|
||||||
struct strerror_val *s;
|
struct strerror_val *s;
|
||||||
|
@ -126,7 +126,7 @@ static void ftp_pass_info(struct socket *, struct read_buffer *);
|
|||||||
static void ftp_retr_file(struct socket *, struct read_buffer *);
|
static void ftp_retr_file(struct socket *, struct read_buffer *);
|
||||||
static void ftp_got_final_response(struct socket *, struct read_buffer *);
|
static void ftp_got_final_response(struct socket *, struct read_buffer *);
|
||||||
static void got_something_from_data_connection(struct connection *);
|
static void got_something_from_data_connection(struct connection *);
|
||||||
static void ftp_end_request(struct connection *, int);
|
static void ftp_end_request(struct connection *, enum connection_state);
|
||||||
static struct ftp_connection_info *add_file_cmd_to_str(struct connection *);
|
static struct ftp_connection_info *add_file_cmd_to_str(struct connection *);
|
||||||
static void ftp_data_accept(struct connection *conn);
|
static void ftp_data_accept(struct connection *conn);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user