--------------------- PatchSet 3234 Date: 2001/10/20 08:16:17 Author: serassio Branch: cygwin Tag: (none) Log: Manually merged changes from HEAD after cvsmerge crash Members: src/HttpHeader.c:1.4.2.3->1.4.2.4 src/asn.c:1.5.4.2->1.5.4.3 src/authenticate.c:1.4.20.7->1.4.20.8 src/cachemgr.c:1.3.28.2->1.3.28.3 src/comm.c:1.4.20.5->1.4.20.6 src/ftp.c:1.5.16.4->1.5.16.5 src/helper.c:1.3.22.5->1.3.22.6 src/http.c:1.5.16.4->1.5.16.5 src/ipc.c:1.3.28.3->1.3.28.4 src/neighbors.c:1.6.10.4->1.6.10.5 src/peer_select.c:1.4.2.2->1.4.2.3 src/protos.h:1.9.2.17->1.9.2.18 src/snmp_agent.c:1.3.28.2->1.3.28.3 src/store_log.c:1.4.26.1->1.4.26.2 src/structs.h:1.12.2.12->1.12.2.13 Index: squid/src/HttpHeader.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/HttpHeader.c,v retrieving revision 1.4.2.3 retrieving revision 1.4.2.4 diff -u -r1.4.2.3 -r1.4.2.4 --- squid/src/HttpHeader.c 19 Oct 2001 19:05:09 -0000 1.4.2.3 +++ squid/src/HttpHeader.c 20 Oct 2001 08:16:17 -0000 1.4.2.4 @@ -1,6 +1,6 @@ /* - * $Id: HttpHeader.c,v 1.4.2.3 2001/10/19 19:05:09 serassio Exp $ + * $Id: HttpHeader.c,v 1.4.2.4 2001/10/20 08:16:17 serassio Exp $ * * DEBUG: section 55 HTTP Header * AUTHOR: Alex Rousskov @@ -688,7 +688,7 @@ { assert_eid(id); assert(Headers[id].type == ftDate_1123); /* must be of an appropriate type */ - assert(time >= 0); + assert(htime >= 0); httpHeaderAddEntry(hdr, httpHeaderEntryCreate(id, NULL, mkrfc1123(htime))); } Index: squid/src/asn.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/asn.c,v retrieving revision 1.5.4.2 retrieving revision 1.5.4.3 diff -u -r1.5.4.2 -r1.5.4.3 --- squid/src/asn.c 19 Oct 2001 19:05:09 -0000 1.5.4.2 +++ squid/src/asn.c 20 Oct 2001 08:16:17 -0000 1.5.4.3 @@ -1,6 +1,6 @@ /* - * $Id: asn.c,v 1.5.4.2 2001/10/19 19:05:09 serassio Exp $ + * $Id: asn.c,v 1.5.4.3 2001/10/20 08:16:17 serassio Exp $ * * DEBUG: section 53 AS Number handling * AUTHOR: Duane Wessels, Kostas Anagnostakis @@ -148,11 +148,12 @@ /* initialize the radix tree structure */ +extern int max_keylen; /* yuck.. this is in lib/radix.c */ + CBDATA_TYPE(ASState); void asnInit(void) { - extern int max_keylen; static int inited = 0; max_keylen = 40; CBDATA_INIT_TYPE(ASState); Index: squid/src/authenticate.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/authenticate.c,v retrieving revision 1.4.20.7 retrieving revision 1.4.20.8 diff -u -r1.4.20.7 -r1.4.20.8 --- squid/src/authenticate.c 19 Oct 2001 19:05:09 -0000 1.4.20.7 +++ squid/src/authenticate.c 20 Oct 2001 08:16:17 -0000 1.4.20.8 @@ -1,6 +1,6 @@ /* - * $Id: authenticate.c,v 1.4.20.7 2001/10/19 19:05:09 serassio Exp $ + * $Id: authenticate.c,v 1.4.20.8 2001/10/20 08:16:17 serassio Exp $ * * DEBUG: section 29 Authenticator * AUTHOR: Duane Wessels @@ -931,7 +931,7 @@ * called to add another auth scheme module */ void -authSchemeAdd(char *type, AUTHSSETUP * setup) +authSchemeAdd(const char *type, AUTHSSETUP * setup) { int i; debug(29, 4) ("authSchemeAdd: adding %s\n", type); Index: squid/src/cachemgr.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/cachemgr.c,v retrieving revision 1.3.28.2 retrieving revision 1.3.28.3 diff -u -r1.3.28.2 -r1.3.28.3 --- squid/src/cachemgr.c 2 Sep 2001 08:46:08 -0000 1.3.28.2 +++ squid/src/cachemgr.c 20 Oct 2001 08:16:17 -0000 1.3.28.3 @@ -1,6 +1,6 @@ /* - * $Id: cachemgr.c,v 1.3.28.2 2001/09/02 08:46:08 serassio Exp $ + * $Id: cachemgr.c,v 1.3.28.3 2001/10/20 08:16:17 serassio Exp $ * * DEBUG: section 0 CGI Cache Manager * AUTHOR: Duane Wessels @@ -163,9 +163,9 @@ */ #define safe_free(str) { if (str) { xfree(str); (str) = NULL; } } static const char *safe_str(const char *str); -static char *xstrtok(char **str, char del); +static const char *xstrtok(char **str, char del); static void print_trailer(void); -static void auth_html(char *host, int port, const char *user_name); +static void auth_html(const char *host, int port, const char *user_name); static void error_html(const char *msg); static char *menu_url(cachemgr_request * req, const char *action); static int parse_status_line(const char *sline, const char **statusStr); @@ -192,7 +192,7 @@ return strspn(str, "\t -+01234567890./\n") == strlen(str); } -static char * +static const char * xstrtok(char **str, char del) { if (*str) { @@ -226,7 +226,7 @@ } static void -auth_html(char *host, int port, const char *user_name) +auth_html(const char *host, int port, const char *user_name) { if (!user_name) user_name = ""; Index: squid/src/comm.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/comm.c,v retrieving revision 1.4.20.5 retrieving revision 1.4.20.6 diff -u -r1.4.20.5 -r1.4.20.6 --- squid/src/comm.c 19 Oct 2001 19:05:10 -0000 1.4.20.5 +++ squid/src/comm.c 20 Oct 2001 08:16:17 -0000 1.4.20.6 @@ -1,6 +1,6 @@ /* - * $Id: comm.c,v 1.4.20.5 2001/10/19 19:05:10 serassio Exp $ + * $Id: comm.c,v 1.4.20.6 2001/10/20 08:16:17 serassio Exp $ * * DEBUG: section 5 Socket Functions * AUTHOR: Harvest Derived @@ -920,7 +920,7 @@ /* Select for Writing on FD, until SIZE bytes are sent. Call * *HANDLER when complete. */ void -comm_write(int fd, char *buf, int size, CWCB * handler, void *handler_data, FREE * free_func) +comm_write(int fd, const char *buf, int size, CWCB * handler, void *handler_data, FREE * free_func) { CommWriteStateData *state = fd_table[fd].rwstate; debug(5, 5) ("comm_write: FD %d: sz %d: hndl %p: data %p.\n", @@ -931,7 +931,7 @@ fd_table[fd].rwstate = NULL; } fd_table[fd].rwstate = state = memPoolAlloc(comm_write_pool); - state->buf = buf; + state->buf = (char *) buf; state->size = size; state->offset = 0; state->handler = handler; Index: squid/src/ftp.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/ftp.c,v retrieving revision 1.5.16.4 retrieving revision 1.5.16.5 diff -u -r1.5.16.4 -r1.5.16.5 --- squid/src/ftp.c 19 Oct 2001 19:05:10 -0000 1.5.16.4 +++ squid/src/ftp.c 20 Oct 2001 08:16:18 -0000 1.5.16.5 @@ -1,6 +1,6 @@ /* - * $Id: ftp.c,v 1.5.16.4 2001/10/19 19:05:10 serassio Exp $ + * $Id: ftp.c,v 1.5.16.5 2001/10/20 08:16:18 serassio Exp $ * * DEBUG: section 9 File Transfer Protocol (FTP) * AUTHOR: Harvest Derived @@ -163,7 +163,7 @@ static void ftpUnhack(FtpStateData * ftpState); static void ftpScheduleReadControlReply(FtpStateData *, int); static void ftpHandleControlReply(FtpStateData *); -static char *ftpHtmlifyListEntry(char *line, FtpStateData * ftpState); +static char *ftpHtmlifyListEntry(const char *line, FtpStateData * ftpState); static void ftpFailed(FtpStateData *, err_type); static void ftpFailedErrorMessage(FtpStateData *, err_type); @@ -635,7 +635,7 @@ } static char * -ftpHtmlifyListEntry(char *line, FtpStateData * ftpState) +ftpHtmlifyListEntry(const char *line, FtpStateData * ftpState) { LOCAL_ARRAY(char, icon, 2048); LOCAL_ARRAY(char, href, 2048 + 40); @@ -687,7 +687,7 @@ return html; } if ((parts = ftpListParseParts(line, ftpState->flags)) == NULL) { - char *p; + const char *p; snprintf(html, 8192, "%s\n", line); for (p = line; *p && xisspace(*p); p++); if (*p && !xisspace(*p)) @@ -2378,7 +2378,7 @@ ftpFailedErrorMessage(FtpStateData * ftpState, err_type error) { ErrorState *err; - char *command, *reply; + const char *command, *reply; /* Translate FTP errors into HTTP errors */ err = NULL; switch (error) { @@ -2471,8 +2471,8 @@ static void ftpAppendSuccessHeader(FtpStateData * ftpState) { - char *mime_type = NULL; - char *mime_enc = NULL; + const char *mime_type = NULL; + const char *mime_enc = NULL; String urlpath = ftpState->request->urlpath; const char *filename = NULL; const char *t = NULL; Index: squid/src/helper.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/helper.c,v retrieving revision 1.3.22.5 retrieving revision 1.3.22.6 diff -u -r1.3.22.5 -r1.3.22.6 --- squid/src/helper.c 30 Aug 2001 17:13:11 -0000 1.3.22.5 +++ squid/src/helper.c 20 Oct 2001 08:16:18 -0000 1.3.22.6 @@ -1,6 +1,6 @@ /* - * $Id: helper.c,v 1.3.22.5 2001/08/30 17:13:11 serassio Exp $ + * $Id: helper.c,v 1.3.22.6 2001/10/20 08:16:18 serassio Exp $ * * DEBUG: section 29 Helper process maintenance * AUTHOR: Harvest Derived? @@ -64,7 +64,7 @@ char *progname; char *shortname; char *procname; - char *args[HELPER_MAX_ARGS]; + const char *args[HELPER_MAX_ARGS]; char fd_note_buf[FD_DESC_SZ]; helper_server *srv; int nargs = 0; @@ -140,7 +140,7 @@ char *progname; char *shortname; char *procname; - char *args[HELPER_MAX_ARGS]; + const char *args[HELPER_MAX_ARGS]; char fd_note_buf[FD_DESC_SZ]; helper_stateful_server *srv; int nargs = 0; Index: squid/src/http.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/http.c,v retrieving revision 1.5.16.4 retrieving revision 1.5.16.5 diff -u -r1.5.16.4 -r1.5.16.5 --- squid/src/http.c 30 Sep 2001 20:38:14 -0000 1.5.16.4 +++ squid/src/http.c 20 Oct 2001 08:16:18 -0000 1.5.16.5 @@ -1,6 +1,6 @@ /* - * $Id: http.c,v 1.5.16.4 2001/09/30 20:38:14 serassio Exp $ + * $Id: http.c,v 1.5.16.5 2001/10/20 08:16:18 serassio Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -878,7 +878,7 @@ if (*orig_request->peer_login == '*') { /* Special mode, to pass the username to the upstream cache */ char loginbuf[256]; - char *username = "-"; + const char *username = "-"; if (orig_request->auth_user_request) username = authenticateUserRequestUsername(orig_request->auth_user_request); snprintf(loginbuf, sizeof(loginbuf), "%s%s", username, orig_request->peer_login + 1); Index: squid/src/ipc.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/ipc.c,v retrieving revision 1.3.28.3 retrieving revision 1.3.28.4 diff -u -r1.3.28.3 -r1.3.28.4 --- squid/src/ipc.c 30 Sep 2001 20:38:14 -0000 1.3.28.3 +++ squid/src/ipc.c 20 Oct 2001 08:16:18 -0000 1.3.28.4 @@ -1,6 +1,6 @@ /* - * $Id: ipc.c,v 1.3.28.3 2001/09/30 20:38:14 serassio Exp $ + * $Id: ipc.c,v 1.3.28.4 2001/10/20 08:16:18 serassio Exp $ * * DEBUG: section 54 Interprocess Communication * AUTHOR: Duane Wessels @@ -56,7 +56,7 @@ } int -ipcCreate(int type, const char *prog, char *const args[], const char *name, int *rfd, int *wfd) +ipcCreate(int type, const char *prog, const char *const args[], const char *name, int *rfd, int *wfd) { pid_t pid; struct sockaddr_in CS; @@ -281,7 +281,7 @@ #if HAVE_SETSID setsid(); #endif - execvp(prog, args); + execvp(prog, (char *const *) args); debug_log = fdopen(2, "a+"); debug(50, 0) ("ipcCreate: %s: %s\n", prog, xstrerror()); _exit(1); Index: squid/src/neighbors.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/neighbors.c,v retrieving revision 1.6.10.4 retrieving revision 1.6.10.5 diff -u -r1.6.10.4 -r1.6.10.5 --- squid/src/neighbors.c 19 Oct 2001 19:05:10 -0000 1.6.10.4 +++ squid/src/neighbors.c 20 Oct 2001 08:16:18 -0000 1.6.10.5 @@ -1,6 +1,6 @@ /* - * $Id: neighbors.c,v 1.6.10.4 2001/10/19 19:05:10 serassio Exp $ + * $Id: neighbors.c,v 1.6.10.5 2001/10/20 08:16:18 serassio Exp $ * * DEBUG: section 15 Neighbor Routines * AUTHOR: Harvest Derived @@ -66,7 +66,7 @@ static int NLateReplies = 0; static peer *first_ping = NULL; -char * +const char * neighborTypeStr(const peer * p) { if (p->type == PEER_NONE) Index: squid/src/peer_select.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/peer_select.c,v retrieving revision 1.4.2.2 retrieving revision 1.4.2.3 diff -u -r1.4.2.2 -r1.4.2.3 --- squid/src/peer_select.c 16 Apr 2001 11:55:39 -0000 1.4.2.2 +++ squid/src/peer_select.c 20 Oct 2001 08:16:18 -0000 1.4.2.3 @@ -1,6 +1,6 @@ /* - * $Id: peer_select.c,v 1.4.2.2 2001/04/16 11:55:39 rbcollins Exp $ + * $Id: peer_select.c,v 1.4.2.3 2001/10/20 08:16:18 serassio Exp $ * * DEBUG: section 44 Peer Selection Algorithm * AUTHOR: Duane Wessels @@ -66,7 +66,7 @@ int timeouts; } PeerStats; -static char *DirectStr[] = +static const char *DirectStr[] = { "DIRECT_UNKNOWN", "DIRECT_NO", Index: squid/src/protos.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/protos.h,v retrieving revision 1.9.2.17 retrieving revision 1.9.2.18 diff -u -r1.9.2.17 -r1.9.2.18 --- squid/src/protos.h 19 Oct 2001 19:05:10 -0000 1.9.2.17 +++ squid/src/protos.h 20 Oct 2001 08:16:18 -0000 1.9.2.18 @@ -1,6 +1,6 @@ /* - * $Id: protos.h,v 1.9.2.17 2001/10/19 19:05:10 serassio Exp $ + * $Id: protos.h,v 1.9.2.18 2001/10/20 08:16:18 serassio Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -118,8 +118,8 @@ /* Note: Allocations is done using the cbdataAlloc macro */ extern void *cbdataInternalFree(void *p); extern int cbdataValid(const void *p); -extern void cbdataInitType(cbdata_type type, char *label, int size, FREE * free_func); -extern cbdata_type cbdataAddType(cbdata_type type, char *label, int size, FREE * free_func); +extern void cbdataInitType(cbdata_type type, const char *label, int size, FREE * free_func); +extern cbdata_type cbdataAddType(cbdata_type type, const char *label, int size, FREE * free_func); extern int cbdataLocked(const void *p); extern void clientdbInit(void); @@ -163,7 +163,7 @@ extern void comm_remove_close_handler(int fd, PF *, void *); extern int comm_udp_sendto(int, const struct sockaddr_in *, int, const void *, int); extern void comm_write(int fd, - char *buf, + const char *buf, int size, CWCB * handler, void *handler_data, @@ -666,7 +666,7 @@ extern void peerNoteDigestGone(peer * p); extern int neighborUp(const peer * e); extern CBDUNL peerDestroy; -extern char *neighborTypeStr(const peer * e); +extern const char *neighborTypeStr(const peer * e); extern peer_t neighborType(const peer *, const request_t *); extern void peerConnectFailed(peer *); extern void peerConnectSucceded(peer *); @@ -769,7 +769,7 @@ extern char *authenticateUserRequestUsername(auth_user_request_t *); extern int authenticateValidateUser(auth_user_request_t *); extern void authenticateOnCloseConnection(ConnStateData * conn); -extern void authSchemeAdd(char *type, AUTHSSETUP * setup); +extern void authSchemeAdd(const char *type, AUTHSSETUP * setup); extern void refreshAddToList(const char *, int, time_t, int, time_t); extern int refreshIsCachable(const StoreEntry *); @@ -929,8 +929,8 @@ extern void storeSwapFileNumberSet(StoreEntry * e, sfileno filn); extern void storeFsInit(void); extern void storeFsDone(void); -extern void storeFsAdd(char *, STSETUP *); -extern void storeReplAdd(char *, REMOVALPOLICYCREATE *); +extern void storeFsAdd(const char *, STSETUP *); +extern void storeReplAdd(const char *, REMOVALPOLICYCREATE *); /* store_modules.c */ extern void storeFsSetup(void); @@ -1082,7 +1082,7 @@ extern double doubleAverage(double, double, int, int); extern void debug_trap(const char *); extern void logsFlush(void); -extern char *checkNullString(char *p); +extern const char *checkNullString(const char *p); extern void squid_getrusage(struct rusage *r); extern double rusage_cputime(struct rusage *r); extern int rusage_maxrss(struct rusage *r); @@ -1192,7 +1192,7 @@ */ extern int ipcCreate(int type, const char *prog, - char *const args[], + const char *const args[], const char *name, int *rfd, int *wfd); Index: squid/src/snmp_agent.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/snmp_agent.c,v retrieving revision 1.3.28.2 retrieving revision 1.3.28.3 diff -u -r1.3.28.2 -r1.3.28.3 --- squid/src/snmp_agent.c 2 Sep 2001 08:46:08 -0000 1.3.28.2 +++ squid/src/snmp_agent.c 20 Oct 2001 08:16:18 -0000 1.3.28.3 @@ -1,6 +1,6 @@ /* - * $Id: snmp_agent.c,v 1.3.28.2 2001/09/02 08:46:08 serassio Exp $ + * $Id: snmp_agent.c,v 1.3.28.3 2001/10/20 08:16:18 serassio Exp $ * * DEBUG: section 49 SNMP Interface * AUTHOR: Kostas Anagnostakis @@ -77,7 +77,7 @@ snmp_confFn(variable_list * Var, snint * ErrP) { variable_list *Answer = NULL; - char *cp = NULL; + const char *cp = NULL; debug(49, 5) ("snmp_confFn: Processing request with magic %d!\n", Var->name[8]); *ErrP = SNMP_ERR_NOERROR; switch (Var->name[LEN_SQ_CONF]) { Index: squid/src/store_log.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/store_log.c,v retrieving revision 1.4.26.1 retrieving revision 1.4.26.2 diff -u -r1.4.26.1 -r1.4.26.2 --- squid/src/store_log.c 14 Mar 2001 22:17:34 -0000 1.4.26.1 +++ squid/src/store_log.c 20 Oct 2001 08:16:18 -0000 1.4.26.2 @@ -1,6 +1,6 @@ /* - * $Id: store_log.c,v 1.4.26.1 2001/03/14 22:17:34 rbcollins Exp $ + * $Id: store_log.c,v 1.4.26.2 2001/10/20 08:16:18 serassio Exp $ * * DEBUG: section 20 Storage Manager Logging Functions * AUTHOR: Duane Wessels @@ -35,7 +35,7 @@ #include "squid.h" -static char *storeLogTags[] = +static const char *storeLogTags[] = { "CREATE", "SWAPIN", Index: squid/src/structs.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/structs.h,v retrieving revision 1.12.2.12 retrieving revision 1.12.2.13 diff -u -r1.12.2.12 -r1.12.2.13 --- squid/src/structs.h 19 Oct 2001 19:05:10 -0000 1.12.2.12 +++ squid/src/structs.h 20 Oct 2001 08:16:19 -0000 1.12.2.13 @@ -1,6 +1,6 @@ /* - * $Id: structs.h,v 1.12.2.12 2001/10/19 19:05:10 serassio Exp $ + * $Id: structs.h,v 1.12.2.13 2001/10/20 08:16:19 serassio Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -146,7 +146,7 @@ */ struct _authscheme_entry { - char *typestr; + const char *typestr; AUTHSACTIVE *Active; AUTHSADDHEADER *AddHeader; AUTHSADDTRAILER *AddTrailer; @@ -177,7 +177,7 @@ /* private data types */ struct _authScheme { /* pointer to the authscheme_list's string entry */ - char *typestr; + const char *typestr; /* the scheme id in the authscheme_list */ int Id; /* the scheme's configuration details. */ @@ -1435,7 +1435,7 @@ }; struct _RemovalPolicy { - char *_type; + const char *_type; void *_data; void (*Free) (RemovalPolicy * policy); void (*Add) (RemovalPolicy * policy, StoreEntry * entry, RemovalPolicyNode * node); @@ -1520,7 +1520,7 @@ }; struct _SwapDir { - char *type; + const char *type; int cur_size; int low_size; int max_size; @@ -1658,7 +1658,7 @@ }; struct _refresh_t { - char *pattern; + const char *pattern; regex_t compiled_pattern; time_t min; double pct; @@ -2108,7 +2108,7 @@ */ struct _storefs_entry { - char *typestr; + const char *typestr; STFSPARSE *parsefunc; STFSRECONFIGURE *reconfigurefunc; STFSSHUTDOWN *donefunc; @@ -2119,7 +2119,7 @@ */ struct _storerepl_entry { - char *typestr; + const char *typestr; REMOVALPOLICYCREATE *create; }; @@ -2153,7 +2153,7 @@ }; struct cache_dir_option { - char *name; + const char *name; void (*parse) (SwapDir * sd, const char *option, const char *value, int reconfiguring); void (*dump) (StoreEntry * e, const char *option, SwapDir * sd); };