opt/wvdial/wvstreams-4.5.1-const.patch

66 lines
1.8 KiB
Diff

diff --git utils/strutils.cc utils/strutils.cc
index ef10988..c4ed1fb 100644
--- utils/strutils.cc
+++ utils/strutils.cc
@@ -315,7 +315,7 @@ WvString url_decode(WvStringParm str, bool no_space)
const char *iptr;
char *optr;
- char *idx1, *idx2;
+ const char *idx1, *idx2;
static const char hex[] = "0123456789ABCDEF";
WvString in, intmp(str), out;
@@ -967,7 +967,7 @@ WvString afterstr(WvStringParm line, WvStringParm a)
if (!line || !a)
return WvString::null;
- char *loc = strstr(line, a);
+ const char *loc = strstr(line, a);
if (loc == 0)
return "";
@@ -984,8 +984,8 @@ WvString beforestr(WvStringParm line, WvStringParm a)
return WvString::null;
WvString ret = line;
- ret.unique();
- char *loc = strstr(ret, a);
+ ret.unique();
+ char *loc = strstr(ret.edit(), a);
if (loc == 0)
return line;
--- utils/verstring.cc.orig 2009-05-19 21:14:35.533876383 +0200
+++ utils/verstring.cc 2009-05-19 21:15:05.193876300 +0200
@@ -147,7 +147,7 @@
bool is_new_verstr(const char *str)
{
- char *p = strchr(str, '.');
+ const char *p = strchr(str, '.');
if (p && strchr(p+1, '.'))
return true;
--- include/wvdigest.h.orig 2009-05-19 21:18:03.833876381 +0200
+++ include/wvdigest.h 2009-05-19 21:18:25.953876231 +0200
@@ -8,6 +8,7 @@
#define __WVDIGEST_H
#include "wvencoder.h"
+#include <stdint.h>
struct env_md_st;
struct env_md_ctx_st;
--- ipstreams/wvaddr.cc.orig 2009-05-19 21:20:01.753875972 +0200
+++ ipstreams/wvaddr.cc 2009-05-19 21:20:29.133878862 +0200
@@ -538,7 +538,7 @@
// If the netmask is not specified, it will default to all 1's.
void WvIPNet::string_init(const char string[])
{
- char *maskptr;
+ const char *maskptr;
int bits;
uint32_t imask;