Removed the "bool_t" type since it conflicts with the newer C standards.
The type was just replaced by "unsigned int" types.
This commit is contained in:
parent
02d7474a09
commit
0a20bdd5b4
20
src/common.h
20
src/common.h
@ -1,4 +1,4 @@
|
||||
/* $Id: common.h,v 1.2 2002-05-26 18:49:19 rjkaes Exp $
|
||||
/* $Id: common.h,v 1.3 2002-12-04 17:06:13 rjkaes Exp $
|
||||
*
|
||||
* This file groups all the headers required throughout the tinyproxy
|
||||
* system. All this information use to be in the "tinyproxy.h" header,
|
||||
@ -175,14 +175,16 @@
|
||||
|
||||
#define MAXLISTEN 1024 /* Max number of connections */
|
||||
|
||||
/* Useful function macros */
|
||||
#define min(a,b) ((a) < (b) ? (a) : (b))
|
||||
#define max(a,b) ((a) > (b) ? (a) : (b))
|
||||
/* Define boolean values */
|
||||
#ifndef FALSE
|
||||
# define FALSE 0
|
||||
# define TRUE (!FALSE)
|
||||
#endif
|
||||
|
||||
/* Make a new type: bool_t */
|
||||
typedef enum {
|
||||
FALSE = 0,
|
||||
TRUE = 1
|
||||
} bool_t;
|
||||
/* Useful function macros */
|
||||
#if !defined(min) || !defined(max)
|
||||
# define min(a,b) ((a) < (b) ? (a) : (b))
|
||||
# define max(a,b) ((a) > (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: conns.h,v 1.10 2002-05-23 18:23:29 rjkaes Exp $
|
||||
/* $Id: conns.h,v 1.11 2002-12-04 17:06:13 rjkaes Exp $
|
||||
*
|
||||
* See 'conns.c' for a detailed description.
|
||||
*
|
||||
@ -33,8 +33,9 @@ struct conn_s {
|
||||
/* The request line (first line) from the client */
|
||||
char *request_line;
|
||||
|
||||
bool_t connect_method;
|
||||
bool_t show_stats;
|
||||
/* Booleans */
|
||||
unsigned int connect_method;
|
||||
unsigned int show_stats;
|
||||
|
||||
/* Store the error response if there is one */
|
||||
char *error_string;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: reqs.c,v 1.87 2002-11-29 19:25:59 rjkaes Exp $
|
||||
/* $Id: reqs.c,v 1.88 2002-12-04 17:06:13 rjkaes Exp $
|
||||
*
|
||||
* This is where all the work in tinyproxy is actually done. Incoming
|
||||
* connections have a new child created for them. The child then
|
||||
@ -605,7 +605,7 @@ get_all_headers(int fd, hashmap_t hashofheaders)
|
||||
{
|
||||
char *header;
|
||||
ssize_t len;
|
||||
bool_t double_cgi = FALSE;
|
||||
unsigned int double_cgi = FALSE; /* boolean */
|
||||
|
||||
assert(fd >= 0);
|
||||
assert(hashofheaders != NULL);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: tinyproxy.c,v 1.41 2002-11-21 21:52:59 rjkaes Exp $
|
||||
/* $Id: tinyproxy.c,v 1.42 2002-12-04 17:06:14 rjkaes Exp $
|
||||
*
|
||||
* The initialize routine. Basically sets up all the initial stuff (logfile,
|
||||
* listening socket, config options, etc.) and then sits there and loops
|
||||
@ -46,8 +46,8 @@ extern FILE *yyin;
|
||||
*/
|
||||
struct config_s config;
|
||||
float load = 0.00;
|
||||
bool_t received_sighup = FALSE;
|
||||
bool_t processed_config_file = FALSE;
|
||||
unsigned int received_sighup = FALSE; /* boolean */
|
||||
unsigned int processed_config_file = FALSE; /* boolean */
|
||||
|
||||
/*
|
||||
* Handle a signal
|
||||
@ -150,7 +150,7 @@ int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int optch;
|
||||
bool_t godaemon = TRUE;
|
||||
unsigned int godaemon = TRUE; /* boolean */
|
||||
struct passwd *thisuser = NULL;
|
||||
struct group *thisgroup = NULL;
|
||||
char *conf_file = DEFAULT_CONF_FILE;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: tinyproxy.h,v 1.35 2002-11-26 21:44:43 rjkaes Exp $
|
||||
/* $Id: tinyproxy.h,v 1.36 2002-12-04 17:06:14 rjkaes Exp $
|
||||
*
|
||||
* See 'tinyproxy.c' for a detailed description.
|
||||
*
|
||||
@ -27,17 +27,17 @@
|
||||
|
||||
struct config_s {
|
||||
char *logf_name;
|
||||
bool_t syslog;
|
||||
unsigned int syslog; /* boolean */
|
||||
int port;
|
||||
char *stathost;
|
||||
bool_t quit;
|
||||
unsigned int quit; /* boolean */
|
||||
char *username;
|
||||
char *group;
|
||||
char *ipAddr;
|
||||
#ifdef FILTER_ENABLE
|
||||
char *filter;
|
||||
bool_t filter_url;
|
||||
bool_t filter_extended;
|
||||
unsigned int filter_url; /* boolean */
|
||||
unsigned int filter_extended; /* boolean */
|
||||
#endif /* FILTER_ENABLE */
|
||||
#ifdef XTINYPROXY_ENABLE
|
||||
char *my_domain;
|
||||
@ -53,12 +53,12 @@ struct config_s {
|
||||
char* dnsserver_location;
|
||||
char* dnsserver_socket;
|
||||
|
||||
bool_t via_http_header;
|
||||
unsigned int via_http_header; /* boolean */
|
||||
};
|
||||
|
||||
/* Global Structures used in the program */
|
||||
extern struct config_s config;
|
||||
extern bool_t received_sighup;
|
||||
extern bool_t processed_config_file;
|
||||
extern unsigned int received_sighup; /* boolean */
|
||||
extern unsigned int processed_config_file; /* boolean */
|
||||
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: utils.c,v 1.35 2002-11-21 21:51:34 rjkaes Exp $
|
||||
/* $Id: utils.c,v 1.36 2002-12-04 17:06:14 rjkaes Exp $
|
||||
*
|
||||
* Misc. routines which are used by the various functions to handle strings
|
||||
* and memory allocation and pretty much anything else we can think of. Also,
|
||||
@ -138,7 +138,7 @@ indicate_http_error(struct conn_s* connptr, int number, const char* string)
|
||||
* Safely creates filename and returns the low-level file descriptor.
|
||||
*/
|
||||
int
|
||||
create_file_safely(const char *filename, bool_t truncate_file)
|
||||
create_file_safely(const char *filename, unsigned int truncate_file)
|
||||
{
|
||||
struct stat lstatinfo;
|
||||
int fildes;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: utils.h,v 1.21 2002-11-21 21:52:03 rjkaes Exp $
|
||||
/* $Id: utils.h,v 1.22 2002-12-04 17:06:14 rjkaes Exp $
|
||||
*
|
||||
* See 'utils.h' for a detailed description.
|
||||
*
|
||||
@ -27,9 +27,10 @@ struct conn_s;
|
||||
extern int send_http_message(struct conn_s *connptr, int http_code,
|
||||
const char *error_title, const char *message);
|
||||
extern int send_http_error_message(struct conn_s *connptr);
|
||||
extern int indicate_http_error(struct conn_s* connptr, int number, const char *string);
|
||||
extern int indicate_http_error(struct conn_s* connptr, int number,
|
||||
const char *string);
|
||||
|
||||
extern int pidfile_create(const char *path);
|
||||
extern int create_file_safely(const char *filename, bool_t truncate_file);
|
||||
extern int create_file_safely(const char *filename, unsigned int truncate_file);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user