1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
|
Only in gftp-2.0.15.orig: gftp.spec
diff -urBb gftp-2.0.15.orig/lib/cache.c gftp-2.0.15/lib/cache.c
--- gftp-2.0.15.orig/lib/cache.c 2003-08-11 20:04:37.000000000 -0400
+++ gftp-2.0.15/lib/cache.c 2004-01-05 01:27:39.078379808 -0500
@@ -118,7 +118,8 @@
gftp_new_cache_entry (gftp_request * request)
{
char *cachedir, *tempstr, *temp1str;
- int cache_fd, fd, cache_ttl;
+ int cache_fd, fd;
+ glong cache_ttl;
ssize_t ret;
time_t t;
diff -urBb gftp-2.0.15.orig/lib/config_file.c gftp-2.0.15/lib/config_file.c
--- gftp-2.0.15.orig/lib/config_file.c 2003-07-22 22:39:23.000000000 -0400
+++ gftp-2.0.15/lib/config_file.c 2004-01-05 01:29:24.792308848 -0500
@@ -1186,6 +1186,10 @@
gftp_config_list_vars * tmplistvar;
gftp_config_vars * tmpconfigvar;
+ g_assert(sizeof (void *) == sizeof (glong)); /* hacked 64-bit fixes... */
+ g_assert(sizeof (void *) == sizeof (gulong)); /* hacked 64-bit fixes... */
+ g_assert(sizeof (void *) == sizeof (gdouble)); /* hacked 64-bit fixes... */
+
if (gftp_global_options_htable != NULL &&
(tmpconfigvar = g_hash_table_lookup (gftp_global_options_htable,
key)) != NULL)
diff -urBb gftp-2.0.15.orig/lib/misc.c gftp-2.0.15/lib/misc.c
--- gftp-2.0.15.orig/lib/misc.c 2003-08-19 15:46:43.000000000 -0400
+++ gftp-2.0.15/lib/misc.c 2004-01-05 01:24:34.028511664 -0500
@@ -818,7 +818,7 @@
GList * files, * dirs, * dotdot, * tempitem, * insitem;
GCompareFunc sortfunc;
gftp_file * tempfle;
- int sort_dirs_first;
+ glong sort_dirs_first;
files = dirs = dotdot = NULL;
diff -urBb gftp-2.0.15.orig/lib/protocols.c gftp-2.0.15/lib/protocols.c
--- gftp-2.0.15.orig/lib/protocols.c 2003-08-21 16:24:08.000000000 -0400
+++ gftp-2.0.15/lib/protocols.c 2004-01-05 01:27:09.521873080 -0500
@@ -157,7 +157,7 @@
gftp_get_file (gftp_request * request, const char *filename, int fd,
off_t startsize)
{
- float maxkbs;
+ gdouble maxkbs;
g_return_val_if_fail (request != NULL, GFTP_EFATAL);
@@ -181,7 +181,7 @@
gftp_put_file (gftp_request * request, const char *filename, int fd,
off_t startsize, off_t totalsize)
{
- float maxkbs;
+ gdouble maxkbs;
g_return_val_if_fail (request != NULL, GFTP_EFATAL);
@@ -2109,7 +2109,7 @@
ssize_t
gftp_fd_read (gftp_request * request, void *ptr, size_t size, int fd)
{
- long network_timeout;
+ glong network_timeout;
struct timeval tv;
fd_set fset;
ssize_t ret;
@@ -2179,7 +2179,7 @@
ssize_t
gftp_fd_write (gftp_request * request, const char *ptr, size_t size, int fd)
{
- long network_timeout;
+ glong network_timeout;
struct timeval tv;
ssize_t w_ret;
fd_set fset;
@@ -2328,7 +2328,7 @@
double start_difftime;
gftp_file * tempfle;
struct timeval tv;
- float maxkbs;
+ gdouble maxkbs;
int waited;
gftp_lookup_request_option (tdata->fromreq, "maxkbs", &maxkbs);
@@ -2382,7 +2382,8 @@
int
gftp_get_transfer_status (gftp_transfer * tdata, ssize_t num_read)
{
- int ret1, ret2, retries, sleep_time;
+ int ret1, ret2;
+ glong retries, sleep_time;
gftp_file * tempfle;
struct timeval tv;
diff -urBb gftp-2.0.15.orig/lib/rfc2068.c gftp-2.0.15/lib/rfc2068.c
--- gftp-2.0.15.orig/lib/rfc2068.c 2003-08-03 14:44:29.000000000 -0400
+++ gftp-2.0.15/lib/rfc2068.c 2004-01-05 01:22:04.997167872 -0500
@@ -54,7 +54,7 @@
{
char *proxy_hostname, *proxy_config;
rfc2068_params * params;
- int proxy_port, ret;
+ glong proxy_port, ret;
g_return_val_if_fail (request != NULL, GFTP_EFATAL);
g_return_val_if_fail (request->protonum == GFTP_HTTP_NUM, GFTP_EFATAL);
@@ -181,7 +181,7 @@
rfc2068_send_command (gftp_request * request, const void *command, size_t len)
{
char *tempstr, *str, *proxy_hostname, *proxy_username, *proxy_password;
- int proxy_port, conn_ret;
+ glong proxy_port, conn_ret;
ssize_t ret;
g_return_val_if_fail (request != NULL, GFTP_EFATAL);
@@ -273,7 +273,7 @@
off_t startsize)
{
char *tempstr, *oldstr, *pos;
- int restarted, use_http11;
+ glong restarted, use_http11;
rfc2068_params * params;
off_t size;
@@ -392,7 +392,7 @@
{
rfc2068_params *params;
char *tempstr, *pos;
- int use_http11;
+ glong use_http11;
off_t ret;
g_return_val_if_fail (request != NULL, GFTP_EFATAL);
@@ -441,7 +441,7 @@
{
rfc2068_params *params;
char *tempstr, *pos;
- int use_http11;
+ glong use_http11;
off_t size;
g_return_val_if_fail (request != NULL, GFTP_EFATAL);
diff -urBb gftp-2.0.15.orig/lib/rfc959.c gftp-2.0.15/lib/rfc959.c
--- gftp-2.0.15.orig/lib/rfc959.c 2003-08-11 20:38:05.000000000 -0400
+++ gftp-2.0.15/lib/rfc959.c 2004-01-05 01:20:35.726739040 -0500
@@ -183,7 +183,7 @@
char *startpos, *endpos, *newstr, *newval, tempport[6], *proxy_config,
savechar;
size_t len;
- int tmp;
+ glong tmp;
g_return_val_if_fail (request != NULL, NULL);
g_return_val_if_fail (request->protonum == GFTP_FTP_NUM, NULL);
@@ -210,7 +210,7 @@
break;
case 'o':
gftp_lookup_request_option (request, "ftp_proxy_port", &tmp);
- g_snprintf (tempport, sizeof (tempport), "%d", tmp);
+ g_snprintf (tempport, sizeof (tempport), "%d", (int) tmp);
newval = tempport;
break;
case 'a':
@@ -415,7 +415,8 @@
rfc959_connect (gftp_request * request)
{
char tempchar, *startpos, *endpos, *tempstr, *email, *proxy_hostname;
- int ret, resp, ascii_transfers, proxy_port;
+ int ret, resp;
+ glong ascii_transfers, proxy_port;
rfc959_parms * parms;
g_return_val_if_fail (request != NULL, GFTP_EFATAL);
@@ -439,7 +440,7 @@
else if (strcasecmp (request->username, "anonymous") == 0)
gftp_set_password (request, email);
- if ((ret = gftp_connect_server (request, "ftp", proxy_hostname, proxy_port)) < 0)
+ if ((ret = gftp_connect_server (request, "ftp", proxy_hostname, (int) proxy_port)) < 0)
return (ret);
/* Get the banner */
@@ -575,7 +576,7 @@
{
char *pos, *pos1, resp, *command;
struct sockaddr_in data_addr;
- int i, passive_transfer;
+ glong i, passive_transfer;
rfc959_parms * parms;
socklen_t data_addr_len;
unsigned int temp[6];
@@ -893,7 +894,8 @@
static int
rfc959_accept_active_connection (gftp_request * request)
{
- int infd, ret, passive_transfer;
+ int infd, ret;
+ glong passive_transfer;
rfc959_parms * parms;
#ifdef HAVE_IPV6
struct sockaddr_in cli_addr;
@@ -941,7 +943,8 @@
{
gftp_config_list_vars * tmplistvar;
gftp_file_extensions * tempext;
- int stlen, ascii_transfers;
+ int stlen;
+ glong ascii_transfers;
GList * templist;
gftp_lookup_global_option ("ext", &tmplistvar);
@@ -1005,7 +1008,8 @@
off_t startsize)
{
char *command, *tempstr, resp;
- int ret, passive_transfer;
+ int ret;
+ glong passive_transfer;
rfc959_parms * parms;
g_return_val_if_fail (request != NULL, GFTP_EFATAL);
@@ -1078,7 +1082,8 @@
off_t startsize, off_t totalsize)
{
char *command, *tempstr, resp;
- int ret, passive_transfer;
+ int ret;
+ glong passive_transfer;
rfc959_parms * parms;
g_return_val_if_fail (request != NULL, GFTP_EFATAL);
@@ -1268,7 +1273,7 @@
static int
rfc959_list_files (gftp_request * request)
{
- int ret, show_hidden_files, resolve_symlinks, passive_transfer;
+ glong ret, show_hidden_files, resolve_symlinks, passive_transfer;
char *tempstr, parms[3];
g_return_val_if_fail (request != NULL, GFTP_EFATAL);
@@ -1305,7 +1310,7 @@
static ssize_t
rfc959_get_next_file_chunk (gftp_request * request, char *buf, size_t size)
{
- int i, j, ascii_transfers;
+ glong i, j, ascii_transfers;
rfc959_parms * parms;
ssize_t num_read;
@@ -1333,7 +1338,7 @@
static ssize_t
rfc959_put_next_file_chunk (gftp_request * request, char *buf, size_t size)
{
- int i, j, ascii_transfers;
+ glong i, j, ascii_transfers;
rfc959_parms * parms;
ssize_t num_wrote;
char *tempstr;
diff -urBb gftp-2.0.15.orig/lib/sshv2.c gftp-2.0.15/lib/sshv2.c
--- gftp-2.0.15.orig/lib/sshv2.c 2003-08-07 13:32:38.000000000 -0400
+++ gftp-2.0.15/lib/sshv2.c 2004-01-05 01:24:13.391648944 -0500
@@ -846,7 +846,8 @@
static int
sshv2_connect (gftp_request * request)
{
- int version, ret, ssh_use_askpass, sshv2_use_sftp_subsys, fdm;
+ int version, fdm, ret;
+ glong ssh_use_askpass, sshv2_use_sftp_subsys;
char **args, *tempstr, *p1, p2, *exepath, *ssh2_sftp_path;
struct servent serv_struct;
sshv2_params * params;
@@ -2226,7 +2227,7 @@
static int
sshv2_set_config_options (gftp_request * request)
{
- int ssh_need_userpass;
+ glong ssh_need_userpass;
gftp_lookup_request_option (request, "ssh_need_userpass", &ssh_need_userpass);
request->need_userpass = ssh_need_userpass;
diff -urBb gftp-2.0.15.orig/lib/sslcommon.c gftp-2.0.15/lib/sslcommon.c
--- gftp-2.0.15.orig/lib/sslcommon.c 2003-07-07 22:09:28.000000000 -0400
+++ gftp-2.0.15/lib/sslcommon.c 2004-01-05 01:22:14.764682984 -0500
@@ -271,7 +271,7 @@
gftp_ssl_startup (gftp_request * request)
{
char *entropy_source;
- int entropy_len;
+ glong entropy_len;
if (gftp_ssl_initialized)
return (0);
diff -urBb gftp-2.0.15.orig/src/gtk/chmod_dialog.c gftp-2.0.15/src/gtk/chmod_dialog.c
--- gftp-2.0.15.orig/src/gtk/chmod_dialog.c 2003-08-11 21:05:02.000000000 -0400
+++ gftp-2.0.15/src/gtk/chmod_dialog.c 2004-01-05 01:30:19.174041568 -0500
@@ -28,7 +28,8 @@
static void *
do_chmod_thread (void * data)
{
- int success, num, sj, network_timeout;
+ int success, num, sj;
+ glong network_timeout;
GList * filelist, * templist;
gftp_window_data * wdata;
gftp_file * tempfle;
diff -urBb gftp-2.0.15.orig/src/gtk/gftp-gtk.c gftp-2.0.15/src/gtk/gftp-gtk.c
--- gftp-2.0.15.orig/src/gtk/gftp-gtk.c 2003-08-11 21:05:02.000000000 -0400
+++ gftp-2.0.15/src/gtk/gftp-gtk.c 2004-01-05 01:32:48.813292944 -0500
@@ -152,8 +152,8 @@
static GtkWidget *
CreateMenus (GtkWidget * parent)
{
- int local_len, remote_len, len, i, trans_len, log_len, tools_len,
- ascii_transfers;
+ int local_len, remote_len, len, i, trans_len, log_len, tools_len;
+ glong ascii_transfers;
GtkAccelGroup *accel_group;
GtkWidget * tempwid;
static GtkItemFactoryEntry menu_items[] = {
@@ -489,7 +489,8 @@
static void
list_doaction (gftp_window_data * wdata)
{
- int num, dir, success, list_dblclk_action;
+ int num, dir, success;
+ glong list_dblclk_action;
GList *templist, *filelist;
gftp_file *tempfle;
@@ -591,7 +592,7 @@
{"application/x-rootwin-drop", 0, 1}
};
GtkWidget *box, *scroll_list, *parent;
- int listbox_file_height, colwidth;
+ glong listbox_file_height, colwidth;
char *titles[7], tempstr[50];
titles[0] = "";
@@ -718,7 +719,7 @@
*button;
gftp_config_list_vars * tmplistvar;
char *dltitles[2];
- int tmplookup;
+ glong tmplookup;
#if GTK_MAJOR_VERSION > 1
GtkTextBuffer * textbuf;
GtkTextIter iter;
@@ -981,7 +982,7 @@
sortrows (GtkCList * clist, gint column, gpointer data)
{
char sortcol_name[25], sortasds_name[25];
- int swap_col, sortcol, sortasds;
+ glong swap_col, sortcol, sortasds;
gftp_window_data * wdata;
GtkWidget * sort_wid;
GList * templist;
diff -urBb gftp-2.0.15.orig/src/gtk/menu-items.c gftp-2.0.15/src/gtk/menu-items.c
--- gftp-2.0.15.orig/src/gtk/menu-items.c 2003-08-11 21:05:02.000000000 -0400
+++ gftp-2.0.15/src/gtk/menu-items.c 2004-01-05 01:33:16.323110816 -0500
@@ -390,7 +390,8 @@
static void *
do_change_dir_thread (void * data)
{
- int success, sj, network_timeout;
+ int success, sj;
+ glong network_timeout;
gftp_window_data * wdata;
wdata = data;
diff -urBb gftp-2.0.15.orig/src/gtk/misc-gtk.c gftp-2.0.15/src/gtk/misc-gtk.c
--- gftp-2.0.15.orig/src/gtk/misc-gtk.c 2003-08-11 21:05:02.000000000 -0400
+++ gftp-2.0.15/src/gtk/misc-gtk.c 2004-01-05 01:35:42.604872608 -0500
@@ -39,7 +39,7 @@
ftp_log (gftp_logging_level level, gftp_request * request,
const char *string, ...)
{
- guint max_log_window_size;
+ gulong max_log_window_size;
int upd, free_logstr;
gftp_log * newlog;
char *logstr;
@@ -402,16 +402,18 @@
graphic = g_malloc0 (sizeof (*graphic));
graphic->pixmap = gdk_pixmap_create_from_xpm (widget->window,
&graphic->bitmap, &style->bg[GTK_STATE_NORMAL], exfile);
- g_free (exfile);
if (graphic->pixmap == NULL)
{
g_free (graphic);
ftp_log (gftp_logging_error, NULL, _("Error opening file %s: %s\n"),
exfile, g_strerror (errno));
+ g_free (exfile);
return (NULL);
}
+ g_free (exfile);
+
graphic->filename = g_strdup (filename);
g_hash_table_insert (graphic_hash_table, graphic->filename, graphic);
@@ -653,7 +655,8 @@
{
char *add_data[7] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL }, *pos;
gftp_config_list_vars * tmplistvar;
- int clist_num, show_hidden_files;
+ int clist_num;
+ glong show_hidden_files;
gftp_file_extensions * tempext;
char *tempstr, *str;
GdkBitmap * bitmap;
diff -urBb gftp-2.0.15.orig/src/gtk/mkdir_dialog.c gftp-2.0.15/src/gtk/mkdir_dialog.c
--- gftp-2.0.15.orig/src/gtk/mkdir_dialog.c 2003-08-11 21:05:02.000000000 -0400
+++ gftp-2.0.15/src/gtk/mkdir_dialog.c 2004-01-05 01:33:08.022372720 -0500
@@ -26,7 +26,8 @@
static void *
do_make_dir_thread (void * data)
{
- int success, sj, network_timeout;
+ int success, sj;
+ glong network_timeout;
gftp_window_data * wdata;
wdata = data;
diff -urBb gftp-2.0.15.orig/src/gtk/rename_dialog.c gftp-2.0.15/src/gtk/rename_dialog.c
--- gftp-2.0.15.orig/src/gtk/rename_dialog.c 2003-08-11 21:05:02.000000000 -0400
+++ gftp-2.0.15/src/gtk/rename_dialog.c 2004-01-05 01:28:44.003509688 -0500
@@ -27,7 +27,8 @@
static void *
do_rename_thread (void * data)
{
- int success, sj, network_timeout;
+ int success, sj;
+ glong network_timeout;
gftp_window_data * wdata;
wdata = data;
diff -urBb gftp-2.0.15.orig/src/gtk/transfer.c gftp-2.0.15/src/gtk/transfer.c
--- gftp-2.0.15.orig/src/gtk/transfer.c 2003-08-11 21:05:02.000000000 -0400
+++ gftp-2.0.15/src/gtk/transfer.c 2004-01-05 01:28:31.709378680 -0500
@@ -232,7 +232,8 @@
static void *
connect_thread (void *data)
{
- int ret, sj, retries, sleep_time, network_timeout;
+ int ret, sj;
+ glong retries, sleep_time, network_timeout;
static int conn_num;
gftp_request * request;
@@ -545,7 +546,8 @@
void *
gftp_gtk_transfer_files (void *data)
{
- int i, mode, tofd, fromfd, preserve_permissions;
+ int i, mode, tofd, fromfd;
+ glong preserve_permissions;
gftp_transfer * transfer;
char buf[8192];
off_t fromsize, total;
@@ -769,7 +771,8 @@
gftp_window_data * fromwdata, gftp_window_data * towdata,
GList * files, int copy_req)
{
- int dialog, append_transfers;
+ int dialog;
+ glong append_transfers;
gftp_curtrans_data * transdata;
GList * templist, *curfle;
gftp_transfer * tdata;
@@ -1026,7 +1029,8 @@
static void
on_next_transfer (gftp_transfer * tdata)
{
- int fd, refresh_files;
+ int fd;
+ glong refresh_files;
gftp_file * tempfle;
tdata->next_file = 0;
@@ -1403,7 +1407,7 @@
gint
update_downloads (gpointer data)
{
- int do_one_transfer_at_a_time;
+ glong do_one_transfer_at_a_time;
GList * templist, * next;
gftp_transfer * tdata;
@@ -1879,7 +1883,7 @@
char *dltitles[4], *add_data[4] = { NULL, NULL, NULL, NULL },
tempstr[50], temp1str[50], *pos, *title;
GtkWidget * tempwid, * scroll, * hbox;
- int i, overwrite_default;
+ glong i, overwrite_default;
gftp_file * tempfle;
GList * templist;
size_t len;
diff -urBb gftp-2.0.15.orig/src/text/gftp-text.c gftp-2.0.15/src/text/gftp-text.c
--- gftp-2.0.15.orig/src/text/gftp-text.c 2003-08-01 11:05:25.000000000 -0400
+++ gftp-2.0.15/src/text/gftp-text.c 2004-01-05 01:33:44.732791888 -0500
@@ -595,7 +595,7 @@
{
GList * files, * templist, * delitem;
char *color, *filespec, *tempstr;
- int sortcol, sortasds;
+ glong sortcol, sortasds;
gftp_file * fle;
time_t curtime;
@@ -875,7 +875,8 @@
int
gftp_text_transfer_files (gftp_transfer * transfer)
{
- int i, j, sw, tot, preserve_permissions;
+ int i, j, sw, tot;
+ glong preserve_permissions;
char buf[8192], *progress = "|/-\\";
struct timeval updatetime;
long fromsize, total;
|