summaryrefslogtreecommitdiffstats
path: root/server/util_script.c
diff options
context:
space:
mode:
authorAllan K. Edwards <ake@apache.org>2004-10-22 17:22:05 +0200
committerAllan K. Edwards <ake@apache.org>2004-10-22 17:22:05 +0200
commit6c775f9a3cb9a324a30d69ab96afd06ac9e2d624 (patch)
tree09586623ed876f4a3348aa34183f70a1de4a4074 /server/util_script.c
parentupdate transformation (diff)
downloadapache2-6c775f9a3cb9a324a30d69ab96afd06ac9e2d624.tar.xz
apache2-6c775f9a3cb9a324a30d69ab96afd06ac9e2d624.zip
WIN64: API changes to clean up Windows 64bit compile warnings
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105545 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/util_script.c')
-rw-r--r--server/util_script.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/server/util_script.c b/server/util_script.c
index f7788926b3..20845aa973 100644
--- a/server/util_script.c
+++ b/server/util_script.c
@@ -283,10 +283,10 @@ AP_DECLARE(void) ap_add_common_vars(request_rec *r)
* and find as much of the two that match as possible.
*/
-AP_DECLARE(int) ap_find_path_info(const char *uri, const char *path_info)
+AP_DECLARE(apr_size_t) ap_find_path_info(const char *uri, const char *path_info)
{
- int lu = strlen(uri);
- int lp = strlen(path_info);
+ apr_ssize_t lu = strlen(uri);
+ apr_size_t lp = strlen(path_info);
while (lu-- && lp-- && uri[lu] == path_info[lp]);
@@ -354,7 +354,7 @@ AP_DECLARE(void) ap_add_cgi_vars(request_rec *r)
apr_table_setn(e, "SCRIPT_NAME", r->uri);
}
else {
- int path_info_start = ap_find_path_info(r->uri, r->path_info);
+ apr_size_t path_info_start = ap_find_path_info(r->uri, r->path_info);
apr_table_setn(e, "SCRIPT_NAME",
apr_pstrndup(r->pool, r->uri, path_info_start));
@@ -394,12 +394,12 @@ static int set_cookie_doo_doo(void *v, const char *key, const char *val)
}
AP_DECLARE(int) ap_scan_script_header_err_core(request_rec *r, char *buffer,
- int (*getsfunc) (char *, int, void *),
+ int (*getsfunc) (char *, apr_size_t, void *),
void *getsfunc_data)
{
char x[MAX_STRING_LEN];
char *w, *l;
- int p;
+ apr_size_t p;
int cgi_status = HTTP_OK;
apr_table_t *merge;
apr_table_t *cookie_table;
@@ -581,9 +581,10 @@ AP_DECLARE(int) ap_scan_script_header_err_core(request_rec *r, char *buffer,
return OK;
}
-static int getsfunc_FILE(char *buf, int len, void *f)
+static int getsfunc_FILE(char *buf, apr_size_t len, void *f)
{
- return apr_file_gets(buf, len, (apr_file_t *) f) == APR_SUCCESS;
+ /* Cast to eliminate 64 bit warning */
+ return apr_file_gets(buf, (int)len, (apr_file_t *) f) == APR_SUCCESS;
}
AP_DECLARE(int) ap_scan_script_header_err(request_rec *r, apr_file_t *f,
@@ -592,7 +593,7 @@ AP_DECLARE(int) ap_scan_script_header_err(request_rec *r, apr_file_t *f,
return ap_scan_script_header_err_core(r, buffer, getsfunc_FILE, f);
}
-static int getsfunc_BRIGADE(char *buf, int len, void *arg)
+static int getsfunc_BRIGADE(char *buf, apr_size_t len, void *arg)
{
apr_bucket_brigade *bb = (apr_bucket_brigade *)arg;
const char *dst_end = buf + len - 1; /* leave room for terminating null */
@@ -650,11 +651,11 @@ struct vastrs {
const char *curpos;
};
-static int getsfunc_STRING(char *w, int len, void *pvastrs)
+static int getsfunc_STRING(char *w, apr_size_t len, void *pvastrs)
{
struct vastrs *strs = (struct vastrs*) pvastrs;
const char *p;
- int t;
+ apr_size_t t;
if (!strs->curpos || !*strs->curpos)
return 0;
@@ -674,7 +675,7 @@ static int getsfunc_STRING(char *w, int len, void *pvastrs)
}
else
strs->curpos += t;
- return t;
+ return (int)t;
}
/* ap_scan_script_header_err_strs() accepts additional const char* args...