wok-4.x diff wvdial/stuff/wvdial-1.41-gcc4.2.diff @ rev 2665

Add: wvdial 1.41
author Dominique Corbex <domcox@users.sourceforge.net>
date Sun Apr 19 12:15:29 2009 +0200 (2009-04-19)
parents
children 92cae9ac27b8
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/wvdial/stuff/wvdial-1.41-gcc4.2.diff	Sun Apr 19 12:15:29 2009 +0200
     1.3 @@ -0,0 +1,336 @@
     1.4 +--- wvdial-1.41/Makefile	Sat Oct  3 05:40:30 1998
     1.5 ++++ wvdial-1.41+dom/Makefile	Thu Mar 19 20:56:27 2009
     1.6 +@@ -1,10 +1,11 @@
     1.7 + TOPDIR=$(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
     1.8 + 
     1.9 + DEBUG=0
    1.10 +-PREFIX=/usr/local
    1.11 +-BINDIR=${PREFIX}/bin
    1.12 +-MANDIR=${PREFIX}/man
    1.13 +-PPPDIR=/etc/ppp/peers
    1.14 ++
    1.15 ++PREFIX=/usr
    1.16 ++BINDIR=${DESTDIR}/${PREFIX}/bin
    1.17 ++MANDIR=${DESTDIR]/${PREFIX}/man
    1.18 ++PPPDIR=${DESTDIR}/etc/ppp/peers
    1.19 + 
    1.20 + export TOPDIR DEBUG CC CXX
    1.21 + include rules.mk
    1.22 +--- wvdial-1.41/configfile/wvconf.cc	Sun Nov 28 20:39:33 1999
    1.23 ++++ wvdial-1.41+dom/configfile/wvconf.cc	Thu Mar 19 20:56:27 2009
    1.24 +@@ -130,7 +130,7 @@
    1.25 + 	    // it must be an element for the current section *sect.
    1.26 + 	    p = parse_value(from_file);
    1.27 + 	    if (!p)
    1.28 +-		p = "";		// allow empty entries
    1.29 ++		  p = (char*)"";		// allow empty entries
    1.30 + 
    1.31 + 	    from_file = trim_string(from_file);
    1.32 + 	    if (from_file[0])	// nonblank option name
    1.33 +--- wvdial-1.41/rules.mk	Thu Mar 19 21:04:33 2009
    1.34 ++++ wvdial-1.41+dom/rules.mk	Thu Oct 21 00:37:00 1999
    1.35 +@@ -47,7 +47,7 @@
    1.36 + CFLAGS += -g -O6 -DDEBUG=0 -DNDEBUG
    1.37 + #CFLAGS += -fomit-frame-pointer  # really evil
    1.38 + #CXXFLAGS += -fno-implement-inlines  # causes trouble with egcs 1.0
    1.39 +-CXXFLAGS += -fno-rtti -fno-exceptions
    1.40 ++CXXFLAGS += -fno-rtti -fno-exceptions -fno-strict-aliasing
    1.41 + LDFLAGS += -g
    1.42 + endif
    1.43 + 
    1.44 +--- wvdial-1.41/streams/wvlog.cc	Sat Jul 10 21:36:45 1999
    1.45 ++++ wvdial-1.41+dom/streams/wvlog.cc	Thu Mar 19 20:56:27 2009
    1.46 +@@ -14,16 +14,16 @@
    1.47 + WvLogRcvBase *WvLog::default_receiver = NULL;
    1.48 + 
    1.49 + char *WvLogRcv::loglevels[WvLog::NUM_LOGLEVELS] = {
    1.50 +-    "Crit",
    1.51 +-    "Err",
    1.52 +-    "Warn",
    1.53 +-    "Notice",
    1.54 +-    "Info",
    1.55 +-    "*1",
    1.56 +-    "*2",
    1.57 +-    "*3",
    1.58 +-    "*4",
    1.59 +-    "*5",
    1.60 ++  (char*)"Crit",
    1.61 ++  (char*)"Err",
    1.62 ++  (char*)"Warn",
    1.63 ++  (char*)"Notice",
    1.64 ++  (char*)"Info",
    1.65 ++  (char*)"*1",
    1.66 ++  (char*)"*2",
    1.67 ++  (char*)"*3",
    1.68 ++  (char*)"*4",
    1.69 ++  (char*)"*5",
    1.70 + };
    1.71 + 
    1.72 + 
    1.73 +--- wvdial-1.41/streams/wvlog.h	Wed Mar 24 04:41:37 1999
    1.74 ++++ wvdial-1.41+dom/streams/wvlog.h	Thu Mar 19 20:56:27 2009
    1.75 +@@ -25,7 +25,7 @@
    1.76 + // or transmits log messages.
    1.77 + class WvLogRcvBase
    1.78 + {
    1.79 +-    friend WvLog;
    1.80 ++    friend class WvLog;
    1.81 + protected:
    1.82 +     const char *appname(const WvLog *log) const;
    1.83 +     virtual void log(const WvLog *source, int loglevel,
    1.84 +@@ -43,7 +43,7 @@
    1.85 + // to all registered WvLogRcv's.
    1.86 + class WvLog : public WvStream
    1.87 + {
    1.88 +-    friend WvLogRcvBase;
    1.89 ++    friend class WvLogRcvBase;
    1.90 + public:
    1.91 +     enum LogLevel {
    1.92 + 	Critical = 0,
    1.93 +--- wvdial-1.41/streams/wvstream.cc	Thu Oct 21 00:37:04 1999
    1.94 ++++ wvdial-1.41+dom/streams/wvstream.cc	Thu Mar 19 20:56:27 2009
    1.95 +@@ -9,6 +9,7 @@
    1.96 +  * for each stream.
    1.97 +  */
    1.98 + #include "wvstream.h"
    1.99 ++#include <time.h>
   1.100 + #include <sys/time.h>
   1.101 + #include <sys/types.h>
   1.102 + #include <errno.h>
   1.103 +--- wvdial-1.41/streams/wvtimestream.h	Wed Mar 24 04:41:37 1999
   1.104 ++++ wvdial-1.41+dom/streams/wvtimestream.h	Thu Mar 19 20:56:27 2009
   1.105 +@@ -40,7 +40,7 @@
   1.106 +     virtual bool test_set(SelectInfo &si);
   1.107 +     
   1.108 +     // notify timestream that we have "ticked" once
   1.109 +-    void WvTimeStream::tick();
   1.110 ++    virtual void tick();
   1.111 +     virtual void execute();
   1.112 + };
   1.113 + 
   1.114 +--- wvdial-1.41/utils/base64.cc	Wed Mar 24 04:41:38 1999
   1.115 ++++ wvdial-1.41+dom/utils/base64.cc	Thu Mar 19 20:56:27 2009
   1.116 +@@ -16,7 +16,7 @@
   1.117 + #include "base64.h"
   1.118 + #include <string.h>
   1.119 + 
   1.120 +-static char * alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
   1.121 ++const char * alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
   1.122 + 			 "0123456789+/=";
   1.123 + 
   1.124 + char * base64_encode( char * str )
   1.125 +--- wvdial-1.41/utils/base64.h	Wed Mar 24 04:41:38 1999
   1.126 ++++ wvdial-1.41+dom/utils/base64.h	Thu Mar 19 20:56:27 2009
   1.127 +@@ -12,4 +12,4 @@
   1.128 + extern char * base64_encode( char * str );
   1.129 + extern char * base64_decode( char * str );
   1.130 + 
   1.131 +-#endif __BASE64_H
   1.132 ++#endif // __BASE64_H
   1.133 +--- wvdial-1.41/utils/wvbuffer.h	Sun Jun 20 21:45:55 1999
   1.134 ++++ wvdial-1.41+dom/utils/wvbuffer.h	Thu Mar 19 20:56:27 2009
   1.135 +@@ -10,6 +10,7 @@
   1.136 + #define __WVBUFFER_H
   1.137 + 
   1.138 + #include "wvlinklist.h"
   1.139 ++#include <string.h>
   1.140 + 
   1.141 + class WvMiniBuffer
   1.142 + {
   1.143 +--- wvdial-1.41/utils/wvhashtable.h	Thu Oct 14 23:33:38 1999
   1.144 ++++ wvdial-1.41+dom/utils/wvhashtable.h	Thu Mar 19 20:56:27 2009
   1.145 +@@ -139,7 +139,7 @@
   1.146 +     _type_##List *sl()							\
   1.147 + 	{ return (_type_##List *)slots; }				\
   1.148 +     									\
   1.149 +-    ~##_classname_()							\
   1.150 ++    ~_classname_()							\
   1.151 +         { shutdown(); delete[] sl(); }					\
   1.152 +     									\
   1.153 +     void add(_type_ *data, bool auto_free)				\
   1.154 +--- wvdial-1.41/utils/wvlinklist.h	Thu Oct 14 23:33:38 1999
   1.155 ++++ wvdial-1.41+dom/utils/wvlinklist.h	Thu Mar 19 20:56:27 2009
   1.156 +@@ -126,7 +126,7 @@
   1.157 +     _newname_()						\
   1.158 + 	{ setup(); }					\
   1.159 + 							\
   1.160 +-    ~##_newname_() 					\
   1.161 ++    ~_newname_() 					\
   1.162 + 	{ shutdown(); _zap(); }				\
   1.163 + 							\
   1.164 +     void zap()						\
   1.165 +--- wvdial-1.41/wvdial/wvdialer.cc	Fri Nov 19 06:14:46 1999
   1.166 ++++ wvdial-1.41+dom/wvdial/wvdialer.cc	Thu Mar 19 20:56:27 2009
   1.167 +@@ -21,26 +21,26 @@
   1.168 + 
   1.169 + 
   1.170 + static char *	init_responses[] = {
   1.171 +-	"ok",
   1.172 +-	"error",
   1.173 ++  (char*)"ok",
   1.174 ++  (char*)"error",
   1.175 + 	NULL
   1.176 + };
   1.177 + 
   1.178 + static char *	dial_responses[] = {
   1.179 +-	"connect",
   1.180 +-	"no carrier",
   1.181 +-	"no dialtone",
   1.182 +-	"no dial tone",
   1.183 +-	"busy",
   1.184 +-	"error",
   1.185 +-	"voice",
   1.186 +-	"fclass",
   1.187 ++  (char*)"connect",
   1.188 ++  (char*)"no carrier",
   1.189 ++  (char*)"no dialtone",
   1.190 ++  (char*)"no dial tone",
   1.191 ++  (char*)"busy",
   1.192 ++  (char*)"error",
   1.193 ++  (char*)"voice",
   1.194 ++  (char*)"fclass",
   1.195 + 	NULL
   1.196 + };
   1.197 + 
   1.198 + static char *	prompt_strings[] = {
   1.199 +-	"}!}",
   1.200 +-	"!}!",
   1.201 ++  (char*)"}!}",
   1.202 ++  (char*)"!}!",
   1.203 + 	NULL
   1.204 + };
   1.205 + 
   1.206 +@@ -51,7 +51,7 @@
   1.207 + //       WvDialer Public Functions
   1.208 + //**************************************************
   1.209 + 
   1.210 +-WvDialer::WvDialer( WvConf &_cfg, WvStringList *_sect_list, bool _chat_mode = false )
   1.211 ++WvDialer::WvDialer( WvConf &_cfg, WvStringList *_sect_list, bool _chat_mode )
   1.212 + /********************************************************/
   1.213 + : WvStreamClone( (WvStream **)&modem ),
   1.214 +     cfg(_cfg), log( "WvDial", WvLog::Debug ),
   1.215 +@@ -360,40 +360,40 @@
   1.216 + {
   1.217 +     OptInfo opts[] = {
   1.218 +     // string options:
   1.219 +-    	{ "Modem",           &options.modem,        NULL, "/dev/modem",     0 },
   1.220 +-    	{ "Init1",           &options.init1,        NULL, "ATZ",            0 },
   1.221 +-    	{ "Init2",           &options.init2,        NULL, "",               0 },
   1.222 +-    	{ "Init3",           &options.init3,        NULL, "",               0 },
   1.223 +-    	{ "Init4",           &options.init4,        NULL, "",               0 },
   1.224 +-    	{ "Init5",           &options.init5,        NULL, "",               0 },
   1.225 +-    	{ "Init6",           &options.init6,        NULL, "",               0 },
   1.226 +-    	{ "Init7",           &options.init7,        NULL, "",               0 },
   1.227 +-    	{ "Init8",           &options.init8,        NULL, "",               0 },
   1.228 +-    	{ "Init9",           &options.init9,        NULL, "",               0 },
   1.229 +-    	{ "Phone",           &options.phnum,        NULL, "",               0 },
   1.230 +-    	{ "Dial Prefix",     &options.dial_prefix,  NULL, "",               0 },
   1.231 +-    	{ "Area Code",       &options.areacode,     NULL, "",               0 },
   1.232 +-    	{ "Dial Command",    &options.dial_cmd,     NULL, "ATDT",           0 },
   1.233 +-    	{ "Username",        &options.login,        NULL, "",               0 },
   1.234 +-    	{ "Login Prompt",    &options.login_prompt, NULL, "",               0 },
   1.235 +-    	{ "Password",        &options.password,     NULL, "",               0 },
   1.236 +-    	{ "Password Prompt", &options.pass_prompt,  NULL, "",               0 },
   1.237 +-    	{ "PPPD Path",       &options.where_pppd,   NULL, "/usr/sbin/pppd", 0 },
   1.238 +-    	{ "Force Address",   &options.force_addr,   NULL, "",               0 },
   1.239 +-    	{ "Remote Name",     &options.remote,       NULL, "*",              0 },
   1.240 +-    	{ "Default Reply",   &options.default_reply,NULL, "ppp",	    0 },
   1.241 +-    	{ "ISDN",	     &options.isdn,	    NULL, "",		    0 },
   1.242 ++	  { (char*)"Modem",           &options.modem,        NULL, (char*)"/dev/modem",     0 },
   1.243 ++	  { (char*)"Init1",           &options.init1,        NULL, (char*)"ATZ",            0 },
   1.244 ++	  { (char*)"Init2",           &options.init2,        NULL, (char*)"",               0 },
   1.245 ++	  { (char*)"Init3",           &options.init3,        NULL, (char*)"",               0 },
   1.246 ++	  { (char*)"Init4",           &options.init4,        NULL, (char*)"",               0 },
   1.247 ++	  { (char*)"Init5",           &options.init5,        NULL, (char*)"",               0 },
   1.248 ++	  { (char*)"Init6",           &options.init6,        NULL, (char*)"",               0 },
   1.249 ++	  { (char*)"Init7",           &options.init7,        NULL, (char*)"",               0 },
   1.250 ++	  { (char*)"Init8",           &options.init8,        NULL, (char*)"",               0 },
   1.251 ++	  { (char*)"Init9",           &options.init9,        NULL, (char*)"",               0 },
   1.252 ++	  { (char*)"Phone",           &options.phnum,        NULL, (char*)"",               0 },
   1.253 ++	  { (char*)"Dial Prefix",     &options.dial_prefix,  NULL, (char*)"",               0 },
   1.254 ++	  { (char*)"Area Code",       &options.areacode,     NULL, (char*)"",               0 },
   1.255 ++	  { (char*)"Dial Command",    &options.dial_cmd,     NULL, (char*)"ATDT",           0 },
   1.256 ++	  { (char*)"Username",        &options.login,        NULL, (char*)"",               0 },
   1.257 ++	  { (char*)"Login Prompt",    &options.login_prompt, NULL, (char*)"",               0 },
   1.258 ++	  { (char*)"Password",        &options.password,     NULL, (char*)"",               0 },
   1.259 ++	  { (char*)"Password Prompt", &options.pass_prompt,  NULL, (char*)"",               0 },
   1.260 ++	  { (char*)"PPPD Path",       &options.where_pppd,   NULL, (char*)"/usr/sbin/pppd", 0 },
   1.261 ++	  { (char*)"Force Address",   &options.force_addr,   NULL, (char*)"",               0 },
   1.262 ++	  { (char*)"Remote Name",     &options.remote,       NULL, (char*)"*",              0 },
   1.263 ++	  { (char*)"Default Reply",   &options.default_reply,NULL, (char*)"ppp",	        0 },
   1.264 ++	  { (char*)"ISDN",	     	  &options.isdn,	     NULL, (char*)"",		        0 },
   1.265 + 
   1.266 +     // int/bool options
   1.267 +-    	{ "Baud",            NULL, &options.baud,          "", DEFAULT_BAUD },
   1.268 +-    	{ "Carrier Check",   NULL, &options.carrier_check, "", true         },
   1.269 +-    	{ "Stupid Mode",     NULL, &options.stupid_mode,   "", false        },
   1.270 +-    	{ "New PPPD",	     NULL, &options.new_pppd, 	   "", true         },
   1.271 +-    	{ "Auto Reconnect",  NULL, &options.auto_reconnect,"", true	    },
   1.272 +-    	{ NULL,		     NULL, NULL,                   "", 0            }
   1.273 ++	  { (char*)"Baud",            NULL, &options.baud,          (char*)"", DEFAULT_BAUD },
   1.274 ++	  { (char*)"Carrier Check",   NULL, &options.carrier_check, (char*)"", true         },
   1.275 ++	  { (char*)"Stupid Mode",     NULL, &options.stupid_mode,   (char*)"", false        },
   1.276 ++	  { (char*)"New PPPD",	      NULL, &options.new_pppd, 	    (char*)"", true         },
   1.277 ++	  { (char*)"Auto Reconnect",  NULL, &options.auto_reconnect,(char*)"", true  	    },
   1.278 ++	  { NULL,		     		  NULL, NULL,                   (char*)"", 0            }
   1.279 +     };
   1.280 + 
   1.281 +-    char *	d = "Dialer Defaults";
   1.282 ++    char *	d = (char*)"Dialer Defaults";
   1.283 + 
   1.284 +     for( int i=0; opts[i].name != NULL; i++ ) {
   1.285 +     	if( opts[i].str_member == NULL ) {
   1.286 +--- wvdial-1.41/wvdial/wvmodemscan.cc	Mon Sep 13 22:07:35 1999
   1.287 ++++ wvdial-1.41+dom/wvdial/wvmodemscan.cc	Thu Mar 19 20:56:27 2009
   1.288 +@@ -19,9 +19,9 @@
   1.289 + // startup at atz atq0 atv1 ate1 ats0 carrier dtr fastdial
   1.290 + // baudstep reinit done
   1.291 + static char *commands[WvModemScan::NUM_STAGES] = {
   1.292 +-    NULL, "Q0 V1 E1", "Z", "S0=0",
   1.293 +-    "&C1", "&D2", "S11=55", "+FCLASS=0", NULL,
   1.294 +-    NULL, "", NULL
   1.295 ++  NULL, (char*)"Q0 V1 E1", (char*)"Z", (char*)"S0=0",
   1.296 ++  (char*)"&C1", (char*)"&D2", (char*)"S11=55", (char*)"+FCLASS=0", NULL,
   1.297 ++  NULL, (char*)"", NULL
   1.298 + };
   1.299 + 
   1.300 + 
   1.301 +--- wvdial-1.41/wvdial/wvpapchap.cc	Sun Jun  6 19:08:49 1999
   1.302 ++++ wvdial-1.41+dom/wvdial/wvpapchap.cc	Thu Mar 19 20:56:27 2009
   1.303 +@@ -25,16 +25,16 @@
   1.304 + 
   1.305 +     // PAP secrets:
   1.306 +     nuke_contents();
   1.307 +-    load_file( PAP_SECRETS );
   1.308 ++    load_file( (char*)PAP_SECRETS );
   1.309 +     do_secret( username, password, remote );
   1.310 +-    if( write_file( PAP_SECRETS ) == false )
   1.311 ++    if( write_file( (char*)PAP_SECRETS ) == false )
   1.312 + 	pap_success = false;
   1.313 + 
   1.314 +     // CHAP secrets:
   1.315 +     nuke_contents();
   1.316 +-    load_file( CHAP_SECRETS );
   1.317 ++    load_file( (char*)CHAP_SECRETS );
   1.318 +     do_secret( username, password, remote );
   1.319 +-    if( write_file( CHAP_SECRETS ) == false )
   1.320 ++    if( write_file( (char*)CHAP_SECRETS ) == false )
   1.321 + 	chap_success = false;
   1.322 + }
   1.323 + 
   1.324 +--- wvdial-1.41/wvdial/wvpapchap.h	Wed Mar 24 04:41:42 1999
   1.325 ++++ wvdial-1.41+dom/wvdial/wvpapchap.h	Thu Mar 19 20:56:27 2009
   1.326 +@@ -43,4 +43,4 @@
   1.327 + 		    const char * remote );
   1.328 + };
   1.329 + 
   1.330 +-#endif __WVPAPCHAP_H
   1.331 ++#endif // __WVPAPCHAP_H
   1.332 +--- wvdial-1.41/wvver.h	Fri Jan  7 03:55:50 2000
   1.333 ++++ wvdial-1.41+dom/wvver.h	Thu Mar 19 20:56:27 2009
   1.334 +@@ -28,4 +28,4 @@
   1.335 + #define TUNNELV_VER		0x00020000
   1.336 + #define TUNNELV_VER_STRING	"2.00"
   1.337 + 
   1.338 +-#endif __WVDEFS_H
   1.339 ++#endif // __WVDEFS_H