wok-4.x view wvdial/stuff/wvdial-1.41-gcc4.2.diff @ rev 7586
Up: thunderbird to 3.1.7.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Thu Dec 09 18:24:09 2010 +0000 (2010-12-09) |
parents | 5ae5611235c6 |
children |
line source
1 --- wvdial-1.41/Makefile Sat Oct 3 05:40:30 1998
2 +++ wvdial-1.41+dom/Makefile Thu Mar 19 20:56:27 2009
3 @@ -1,10 +1,11 @@
4 TOPDIR=$(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
6 DEBUG=0
7 -PREFIX=/usr/local
8 -BINDIR=${PREFIX}/bin
9 -MANDIR=${PREFIX}/man
10 -PPPDIR=/etc/ppp/peers
11 +
12 +PREFIX=/usr
13 +BINDIR=${DESTDIR}/${PREFIX}/bin
14 +MANDIR=${DESTDIR]/${PREFIX}/man
15 +PPPDIR=${DESTDIR}/etc/ppp/peers
17 export TOPDIR DEBUG CC CXX
18 include rules.mk
19 --- wvdial-1.41/configfile/wvconf.cc Sun Nov 28 20:39:33 1999
20 +++ wvdial-1.41+dom/configfile/wvconf.cc Thu Mar 19 20:56:27 2009
21 @@ -130,7 +130,7 @@
22 // it must be an element for the current section *sect.
23 p = parse_value(from_file);
24 if (!p)
25 - p = ""; // allow empty entries
26 + p = (char*)""; // allow empty entries
28 from_file = trim_string(from_file);
29 if (from_file[0]) // nonblank option name
30 --- wvdial-1.41/rules.mk Thu Mar 19 21:04:33 2009
31 +++ wvdial-1.41+dom/rules.mk Thu Oct 21 00:37:00 1999
32 @@ -47,7 +47,7 @@
33 CFLAGS += -g -O6 -DDEBUG=0 -DNDEBUG
34 #CFLAGS += -fomit-frame-pointer # really evil
35 #CXXFLAGS += -fno-implement-inlines # causes trouble with egcs 1.0
36 -CXXFLAGS += -fno-rtti -fno-exceptions
37 +CXXFLAGS += -fno-rtti -fno-exceptions -fno-strict-aliasing
38 LDFLAGS += -g
39 endif
41 --- wvdial-1.41/streams/wvlog.cc Sat Jul 10 21:36:45 1999
42 +++ wvdial-1.41+dom/streams/wvlog.cc Thu Mar 19 20:56:27 2009
43 @@ -14,16 +14,16 @@
44 WvLogRcvBase *WvLog::default_receiver = NULL;
46 char *WvLogRcv::loglevels[WvLog::NUM_LOGLEVELS] = {
47 - "Crit",
48 - "Err",
49 - "Warn",
50 - "Notice",
51 - "Info",
52 - "*1",
53 - "*2",
54 - "*3",
55 - "*4",
56 - "*5",
57 + (char*)"Crit",
58 + (char*)"Err",
59 + (char*)"Warn",
60 + (char*)"Notice",
61 + (char*)"Info",
62 + (char*)"*1",
63 + (char*)"*2",
64 + (char*)"*3",
65 + (char*)"*4",
66 + (char*)"*5",
67 };
70 --- wvdial-1.41/streams/wvlog.h Wed Mar 24 04:41:37 1999
71 +++ wvdial-1.41+dom/streams/wvlog.h Thu Mar 19 20:56:27 2009
72 @@ -25,7 +25,7 @@
73 // or transmits log messages.
74 class WvLogRcvBase
75 {
76 - friend WvLog;
77 + friend class WvLog;
78 protected:
79 const char *appname(const WvLog *log) const;
80 virtual void log(const WvLog *source, int loglevel,
81 @@ -43,7 +43,7 @@
82 // to all registered WvLogRcv's.
83 class WvLog : public WvStream
84 {
85 - friend WvLogRcvBase;
86 + friend class WvLogRcvBase;
87 public:
88 enum LogLevel {
89 Critical = 0,
90 --- wvdial-1.41/streams/wvstream.cc Thu Oct 21 00:37:04 1999
91 +++ wvdial-1.41+dom/streams/wvstream.cc Thu Mar 19 20:56:27 2009
92 @@ -9,6 +9,7 @@
93 * for each stream.
94 */
95 #include "wvstream.h"
96 +#include <time.h>
97 #include <sys/time.h>
98 #include <sys/types.h>
99 #include <errno.h>
100 --- wvdial-1.41/streams/wvtimestream.h Wed Mar 24 04:41:37 1999
101 +++ wvdial-1.41+dom/streams/wvtimestream.h Thu Mar 19 20:56:27 2009
102 @@ -40,7 +40,7 @@
103 virtual bool test_set(SelectInfo &si);
105 // notify timestream that we have "ticked" once
106 - void WvTimeStream::tick();
107 + virtual void tick();
108 virtual void execute();
109 };
111 --- wvdial-1.41/utils/base64.cc Wed Mar 24 04:41:38 1999
112 +++ wvdial-1.41+dom/utils/base64.cc Thu Mar 19 20:56:27 2009
113 @@ -16,7 +16,7 @@
114 #include "base64.h"
115 #include <string.h>
117 -static char * alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
118 +const char * alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
119 "0123456789+/=";
121 char * base64_encode( char * str )
122 --- wvdial-1.41/utils/base64.h Wed Mar 24 04:41:38 1999
123 +++ wvdial-1.41+dom/utils/base64.h Thu Mar 19 20:56:27 2009
124 @@ -12,4 +12,4 @@
125 extern char * base64_encode( char * str );
126 extern char * base64_decode( char * str );
128 -#endif __BASE64_H
129 +#endif // __BASE64_H
130 --- wvdial-1.41/utils/wvbuffer.h Sun Jun 20 21:45:55 1999
131 +++ wvdial-1.41+dom/utils/wvbuffer.h Thu Mar 19 20:56:27 2009
132 @@ -10,6 +10,7 @@
133 #define __WVBUFFER_H
135 #include "wvlinklist.h"
136 +#include <string.h>
138 class WvMiniBuffer
139 {
140 --- wvdial-1.41/utils/wvhashtable.h Thu Oct 14 23:33:38 1999
141 +++ wvdial-1.41+dom/utils/wvhashtable.h Thu Mar 19 20:56:27 2009
142 @@ -139,7 +139,7 @@
143 _type_##List *sl() \
144 { return (_type_##List *)slots; } \
145 \
146 - ~##_classname_() \
147 + ~_classname_() \
148 { shutdown(); delete[] sl(); } \
149 \
150 void add(_type_ *data, bool auto_free) \
151 --- wvdial-1.41/utils/wvlinklist.h Thu Oct 14 23:33:38 1999
152 +++ wvdial-1.41+dom/utils/wvlinklist.h Thu Mar 19 20:56:27 2009
153 @@ -126,7 +126,7 @@
154 _newname_() \
155 { setup(); } \
156 \
157 - ~##_newname_() \
158 + ~_newname_() \
159 { shutdown(); _zap(); } \
160 \
161 void zap() \
162 --- wvdial-1.41/wvdial/wvdialer.cc Fri Nov 19 06:14:46 1999
163 +++ wvdial-1.41+dom/wvdial/wvdialer.cc Thu Mar 19 20:56:27 2009
164 @@ -21,26 +21,26 @@
167 static char * init_responses[] = {
168 - "ok",
169 - "error",
170 + (char*)"ok",
171 + (char*)"error",
172 NULL
173 };
175 static char * dial_responses[] = {
176 - "connect",
177 - "no carrier",
178 - "no dialtone",
179 - "no dial tone",
180 - "busy",
181 - "error",
182 - "voice",
183 - "fclass",
184 + (char*)"connect",
185 + (char*)"no carrier",
186 + (char*)"no dialtone",
187 + (char*)"no dial tone",
188 + (char*)"busy",
189 + (char*)"error",
190 + (char*)"voice",
191 + (char*)"fclass",
192 NULL
193 };
195 static char * prompt_strings[] = {
196 - "}!}",
197 - "!}!",
198 + (char*)"}!}",
199 + (char*)"!}!",
200 NULL
201 };
203 @@ -51,7 +51,7 @@
204 // WvDialer Public Functions
205 //**************************************************
207 -WvDialer::WvDialer( WvConf &_cfg, WvStringList *_sect_list, bool _chat_mode = false )
208 +WvDialer::WvDialer( WvConf &_cfg, WvStringList *_sect_list, bool _chat_mode )
209 /********************************************************/
210 : WvStreamClone( (WvStream **)&modem ),
211 cfg(_cfg), log( "WvDial", WvLog::Debug ),
212 @@ -360,40 +360,40 @@
213 {
214 OptInfo opts[] = {
215 // string options:
216 - { "Modem", &options.modem, NULL, "/dev/modem", 0 },
217 - { "Init1", &options.init1, NULL, "ATZ", 0 },
218 - { "Init2", &options.init2, NULL, "", 0 },
219 - { "Init3", &options.init3, NULL, "", 0 },
220 - { "Init4", &options.init4, NULL, "", 0 },
221 - { "Init5", &options.init5, NULL, "", 0 },
222 - { "Init6", &options.init6, NULL, "", 0 },
223 - { "Init7", &options.init7, NULL, "", 0 },
224 - { "Init8", &options.init8, NULL, "", 0 },
225 - { "Init9", &options.init9, NULL, "", 0 },
226 - { "Phone", &options.phnum, NULL, "", 0 },
227 - { "Dial Prefix", &options.dial_prefix, NULL, "", 0 },
228 - { "Area Code", &options.areacode, NULL, "", 0 },
229 - { "Dial Command", &options.dial_cmd, NULL, "ATDT", 0 },
230 - { "Username", &options.login, NULL, "", 0 },
231 - { "Login Prompt", &options.login_prompt, NULL, "", 0 },
232 - { "Password", &options.password, NULL, "", 0 },
233 - { "Password Prompt", &options.pass_prompt, NULL, "", 0 },
234 - { "PPPD Path", &options.where_pppd, NULL, "/usr/sbin/pppd", 0 },
235 - { "Force Address", &options.force_addr, NULL, "", 0 },
236 - { "Remote Name", &options.remote, NULL, "*", 0 },
237 - { "Default Reply", &options.default_reply,NULL, "ppp", 0 },
238 - { "ISDN", &options.isdn, NULL, "", 0 },
239 + { (char*)"Modem", &options.modem, NULL, (char*)"/dev/modem", 0 },
240 + { (char*)"Init1", &options.init1, NULL, (char*)"ATZ", 0 },
241 + { (char*)"Init2", &options.init2, NULL, (char*)"", 0 },
242 + { (char*)"Init3", &options.init3, NULL, (char*)"", 0 },
243 + { (char*)"Init4", &options.init4, NULL, (char*)"", 0 },
244 + { (char*)"Init5", &options.init5, NULL, (char*)"", 0 },
245 + { (char*)"Init6", &options.init6, NULL, (char*)"", 0 },
246 + { (char*)"Init7", &options.init7, NULL, (char*)"", 0 },
247 + { (char*)"Init8", &options.init8, NULL, (char*)"", 0 },
248 + { (char*)"Init9", &options.init9, NULL, (char*)"", 0 },
249 + { (char*)"Phone", &options.phnum, NULL, (char*)"", 0 },
250 + { (char*)"Dial Prefix", &options.dial_prefix, NULL, (char*)"", 0 },
251 + { (char*)"Area Code", &options.areacode, NULL, (char*)"", 0 },
252 + { (char*)"Dial Command", &options.dial_cmd, NULL, (char*)"ATDT", 0 },
253 + { (char*)"Username", &options.login, NULL, (char*)"", 0 },
254 + { (char*)"Login Prompt", &options.login_prompt, NULL, (char*)"", 0 },
255 + { (char*)"Password", &options.password, NULL, (char*)"", 0 },
256 + { (char*)"Password Prompt", &options.pass_prompt, NULL, (char*)"", 0 },
257 + { (char*)"PPPD Path", &options.where_pppd, NULL, (char*)"/usr/sbin/pppd", 0 },
258 + { (char*)"Force Address", &options.force_addr, NULL, (char*)"", 0 },
259 + { (char*)"Remote Name", &options.remote, NULL, (char*)"*", 0 },
260 + { (char*)"Default Reply", &options.default_reply,NULL, (char*)"ppp", 0 },
261 + { (char*)"ISDN", &options.isdn, NULL, (char*)"", 0 },
263 // int/bool options
264 - { "Baud", NULL, &options.baud, "", DEFAULT_BAUD },
265 - { "Carrier Check", NULL, &options.carrier_check, "", true },
266 - { "Stupid Mode", NULL, &options.stupid_mode, "", false },
267 - { "New PPPD", NULL, &options.new_pppd, "", true },
268 - { "Auto Reconnect", NULL, &options.auto_reconnect,"", true },
269 - { NULL, NULL, NULL, "", 0 }
270 + { (char*)"Baud", NULL, &options.baud, (char*)"", DEFAULT_BAUD },
271 + { (char*)"Carrier Check", NULL, &options.carrier_check, (char*)"", true },
272 + { (char*)"Stupid Mode", NULL, &options.stupid_mode, (char*)"", false },
273 + { (char*)"New PPPD", NULL, &options.new_pppd, (char*)"", true },
274 + { (char*)"Auto Reconnect", NULL, &options.auto_reconnect,(char*)"", true },
275 + { NULL, NULL, NULL, (char*)"", 0 }
276 };
278 - char * d = "Dialer Defaults";
279 + char * d = (char*)"Dialer Defaults";
281 for( int i=0; opts[i].name != NULL; i++ ) {
282 if( opts[i].str_member == NULL ) {
283 --- wvdial-1.41/wvdial/wvmodemscan.cc Mon Sep 13 22:07:35 1999
284 +++ wvdial-1.41+dom/wvdial/wvmodemscan.cc Thu Mar 19 20:56:27 2009
285 @@ -19,9 +19,9 @@
286 // startup at atz atq0 atv1 ate1 ats0 carrier dtr fastdial
287 // baudstep reinit done
288 static char *commands[WvModemScan::NUM_STAGES] = {
289 - NULL, "Q0 V1 E1", "Z", "S0=0",
290 - "&C1", "&D2", "S11=55", "+FCLASS=0", NULL,
291 - NULL, "", NULL
292 + NULL, (char*)"Q0 V1 E1", (char*)"Z", (char*)"S0=0",
293 + (char*)"&C1", (char*)"&D2", (char*)"S11=55", (char*)"+FCLASS=0", NULL,
294 + NULL, (char*)"", NULL
295 };
298 --- wvdial-1.41/wvdial/wvpapchap.cc Sun Jun 6 19:08:49 1999
299 +++ wvdial-1.41+dom/wvdial/wvpapchap.cc Thu Mar 19 20:56:27 2009
300 @@ -25,16 +25,16 @@
302 // PAP secrets:
303 nuke_contents();
304 - load_file( PAP_SECRETS );
305 + load_file( (char*)PAP_SECRETS );
306 do_secret( username, password, remote );
307 - if( write_file( PAP_SECRETS ) == false )
308 + if( write_file( (char*)PAP_SECRETS ) == false )
309 pap_success = false;
311 // CHAP secrets:
312 nuke_contents();
313 - load_file( CHAP_SECRETS );
314 + load_file( (char*)CHAP_SECRETS );
315 do_secret( username, password, remote );
316 - if( write_file( CHAP_SECRETS ) == false )
317 + if( write_file( (char*)CHAP_SECRETS ) == false )
318 chap_success = false;
319 }
321 --- wvdial-1.41/wvdial/wvpapchap.h Wed Mar 24 04:41:42 1999
322 +++ wvdial-1.41+dom/wvdial/wvpapchap.h Thu Mar 19 20:56:27 2009
323 @@ -43,4 +43,4 @@
324 const char * remote );
325 };
327 -#endif __WVPAPCHAP_H
328 +#endif // __WVPAPCHAP_H
329 --- wvdial-1.41/wvver.h Fri Jan 7 03:55:50 2000
330 +++ wvdial-1.41+dom/wvver.h Thu Mar 19 20:56:27 2009
331 @@ -28,4 +28,4 @@
332 #define TUNNELV_VER 0x00020000
333 #define TUNNELV_VER_STRING "2.00"
335 -#endif __WVDEFS_H
336 +#endif // __WVDEFS_H
338 --- wvdial-1.41/wvdial/wvmodemscan.cc
339 +++ wvdial-1.41/wvdial/wvmodemscan.cc
340 @@ -331,10 +331,8 @@
341 }
344 -static int filesort(const void *_e1, const void *_e2)
345 +static int filesort(const dirent **e1, const dirent **e2)
346 {
347 - dirent const * const *e1 = (dirent const * const *)_e1;
348 - dirent const * const *e2 = (dirent const * const *)_e2;
349 const char *p1, *p2;
350 int diff;