renamed ltostr() to LI_ltostr() to fix compile on HP/UX (fixes #465)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1951 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.17
Jan Kneschke 16 years ago
parent 41e836b410
commit 51826fc05c

@ -281,7 +281,7 @@ int buffer_append_long_hex(buffer *b, unsigned long value) {
return 0;
}
int ltostr(char *buf, long val) {
int LI_ltostr(char *buf, long val) {
char swap;
char *end;
int len = 1;
@ -320,7 +320,7 @@ int buffer_append_long(buffer *b, long val) {
if (b->used == 0)
b->used++;
b->used += ltostr(b->ptr + (b->used - 1), val);
b->used += LI_ltostr(b->ptr + (b->used - 1), val);
return 0;
}

@ -103,7 +103,7 @@ int buffer_to_lower(buffer *b);
int buffer_to_upper(buffer *b);
/** deprecated */
int ltostr(char *buf, long val);
int LI_ltostr(char *buf, long val);
char hex2int(unsigned char c);
char int2hex(char i);

@ -1174,9 +1174,9 @@ int http_auth_digest_generate_nonce(server *srv, mod_auth_plugin_data *p, buffer
MD5_Update(&Md5Ctx, (unsigned char *)"+", 1);
/* we assume sizeof(time_t) == 4 here, but if not it ain't a problem at all */
ltostr(hh, srv->cur_ts);
LI_ltostr(hh, srv->cur_ts);
MD5_Update(&Md5Ctx, (unsigned char *)hh, strlen(hh));
ltostr(hh, rand());
LI_ltostr(hh, rand());
MD5_Update(&Md5Ctx, (unsigned char *)hh, strlen(hh));
MD5_Final(h, &Md5Ctx);

@ -813,7 +813,7 @@ static int cgi_create_env(server *srv, connection *con, plugin_data *p, buffer *
cgi_env_add(&env, CONST_STR_LEN("SERVER_PROTOCOL"), s, strlen(s));
ltostr(buf,
LI_ltostr(buf,
#ifdef HAVE_IPV6
ntohs(srv_sock->addr.plain.sa_family == AF_INET6 ? srv_sock->addr.ipv6.sin6_port : srv_sock->addr.ipv4.sin_port)
#else
@ -859,7 +859,7 @@ static int cgi_create_env(server *srv, connection *con, plugin_data *p, buffer *
#endif
cgi_env_add(&env, CONST_STR_LEN("REMOTE_ADDR"), s, strlen(s));
ltostr(buf,
LI_ltostr(buf,
#ifdef HAVE_IPV6
ntohs(con->dst_addr.plain.sa_family == AF_INET6 ? con->dst_addr.ipv6.sin6_port : con->dst_addr.ipv4.sin_port)
#else
@ -880,7 +880,7 @@ static int cgi_create_env(server *srv, connection *con, plugin_data *p, buffer *
#endif
/* request.content_length < SSIZE_MAX, see request.c */
ltostr(buf, con->request.content_length);
LI_ltostr(buf, con->request.content_length);
cgi_env_add(&env, CONST_STR_LEN("CONTENT_LENGTH"), buf, strlen(buf));
cgi_env_add(&env, CONST_STR_LEN("SCRIPT_FILENAME"), CONST_BUF_LEN(con->physical.path));
cgi_env_add(&env, CONST_STR_LEN("SCRIPT_NAME"), CONST_BUF_LEN(con->uri.path));

@ -442,7 +442,7 @@ static int http_list_directory_sizefmt(char *buf, off_t size) {
u++;
}
out += ltostr(out, size);
out += LI_ltostr(out, size);
out[0] = '.';
out[1] = remain + '0';
out[2] = *u;

@ -1844,7 +1844,7 @@ static int fcgi_create_env(server *srv, handler_ctx *hctx, size_t request_id) {
fcgi_env_add(p->fcgi_env, CONST_STR_LEN("GATEWAY_INTERFACE"), CONST_STR_LEN("CGI/1.1"));
ltostr(buf,
LI_ltostr(buf,
#ifdef HAVE_IPV6
ntohs(srv_sock->addr.plain.sa_family ? srv_sock->addr.ipv6.sin6_port : srv_sock->addr.ipv4.sin_port)
#else
@ -1864,7 +1864,7 @@ static int fcgi_create_env(server *srv, handler_ctx *hctx, size_t request_id) {
}
fcgi_env_add(p->fcgi_env, CONST_STR_LEN("SERVER_ADDR"), s, strlen(s));
ltostr(buf,
LI_ltostr(buf,
#ifdef HAVE_IPV6
ntohs(con->dst_addr.plain.sa_family ? con->dst_addr.ipv6.sin6_port : con->dst_addr.ipv4.sin_port)
#else
@ -1914,7 +1914,7 @@ static int fcgi_create_env(server *srv, handler_ctx *hctx, size_t request_id) {
/* CGI-SPEC 6.1.2 and FastCGI spec 6.3 */
/* request.content_length < SSIZE_MAX, see request.c */
ltostr(buf, con->request.content_length);
LI_ltostr(buf, con->request.content_length);
fcgi_env_add(p->fcgi_env, CONST_STR_LEN("CONTENT_LENGTH"), buf, strlen(buf));
}

@ -1426,7 +1426,7 @@ static int scgi_create_env(server *srv, handler_ctx *hctx) {
/* CGI-SPEC 6.1.2, FastCGI spec 6.3 and SCGI spec */
/* request.content_length < SSIZE_MAX, see request.c */
ltostr(buf, con->request.content_length);
LI_ltostr(buf, con->request.content_length);
scgi_env_add(p->scgi_env, CONST_STR_LEN("CONTENT_LENGTH"), buf, strlen(buf));
scgi_env_add(p->scgi_env, CONST_STR_LEN("SCGI"), CONST_STR_LEN("1"));
@ -1450,7 +1450,7 @@ static int scgi_create_env(server *srv, handler_ctx *hctx) {
scgi_env_add(p->scgi_env, CONST_STR_LEN("GATEWAY_INTERFACE"), CONST_STR_LEN("CGI/1.1"));
ltostr(buf,
LI_ltostr(buf,
#ifdef HAVE_IPV6
ntohs(srv_sock->addr.plain.sa_family ? srv_sock->addr.ipv6.sin6_port : srv_sock->addr.ipv4.sin_port)
#else
@ -1470,7 +1470,7 @@ static int scgi_create_env(server *srv, handler_ctx *hctx) {
}
scgi_env_add(p->scgi_env, CONST_STR_LEN("SERVER_ADDR"), s, strlen(s));
ltostr(buf,
LI_ltostr(buf,
#ifdef HAVE_IPV6
ntohs(con->dst_addr.plain.sa_family ? con->dst_addr.ipv6.sin6_port : con->dst_addr.ipv4.sin_port)
#else

@ -225,7 +225,7 @@ static int build_ssi_cgi_vars(server *srv, connection *con, plugin_data *p) {
);
ssi_env_add(p->ssi_cgi_env, CONST_STRING("GATEWAY_INTERFACE"), "CGI/1.1");
ltostr(buf,
LI_ltostr(buf,
#ifdef HAVE_IPV6
ntohs(srv_sock->addr.plain.sa_family ? srv_sock->addr.ipv6.sin6_port : srv_sock->addr.ipv4.sin_port)
#else
@ -247,7 +247,7 @@ static int build_ssi_cgi_vars(server *srv, connection *con, plugin_data *p) {
/* CGI-SPEC 6.1.2 and FastCGI spec 6.3 */
/* request.content_length < SSIZE_MAX, see request.c */
ltostr(buf, con->request.content_length);
LI_ltostr(buf, con->request.content_length);
ssi_env_add(p->ssi_cgi_env, CONST_STRING("CONTENT_LENGTH"), buf);
}

@ -227,9 +227,9 @@ URIHANDLER_FUNC(mod_usertrack_uri_handler) {
MD5_Update(&Md5Ctx, (unsigned char *)"+", 1);
/* we assume sizeof(time_t) == 4 here, but if not it ain't a problem at all */
ltostr(hh, srv->cur_ts);
LI_ltostr(hh, srv->cur_ts);
MD5_Update(&Md5Ctx, (unsigned char *)hh, strlen(hh));
ltostr(hh, rand());
LI_ltostr(hh, rand());
MD5_Update(&Md5Ctx, (unsigned char *)hh, strlen(hh));
MD5_Final(h, &Md5Ctx);

Loading…
Cancel
Save