Mercurial > gftp.yaz
changeset 325:0fcc6468a0af
2003-12-4 Brian Masney <masneyb@gftp.org>
* lib/cache.c lib/misc.c lib/protocols.c lib/rfc2068.c lib/rfc959.c
lib/sshv2.c lib/sslcommon.c src/text/gftp-text.c src/gtk/chmod_dialog.c
src/gtk/gftp-gtk.c src/gtk/menu-items.c src/gtk/misc-gtk.c
src/gtk/mkdir_dialog.c src/gtk/rename_dialog.c src/gtk/transfer.c -
when calling gftp_lookup_global_option() or
gftp_lookup_request_option(), if the value is an integer, declare
the variable type to be intptr_t. This fixes a bug on 64bit platforms
(from Gwenole Beauchesne <gbeauchesne@mandrakesoft.com>)
* lib/config_file.c (gftp_config_file_read_float) - 64bit fixup
* configure.in - increment version to 2.0.17pre0. Undefine _GNU_SOURCE.
Check for stdint.h.
* lib/gftp.h - include stdint.h if it is found on the system.
* src/gtk/gftp-gtk.c (CreateToolbar) - on startup, have the host edit
box grab the keyboard focus
author | masneyb |
---|---|
date | Fri, 05 Dec 2003 00:19:48 +0000 |
parents | 5966e9c236b8 |
children | cdabbe5c9a95 |
files | ChangeLog configure.in lib/cache.c lib/config_file.c lib/gftp.h lib/misc.c lib/protocols.c lib/rfc2068.c lib/rfc959.c lib/sshv2.c lib/sslcommon.c src/gftp.in |
diffstat | 12 files changed, 75 insertions(+), 36 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Fri Dec 05 00:16:33 2003 +0000 +++ b/ChangeLog Fri Dec 05 00:19:48 2003 +0000 @@ -1,3 +1,23 @@ +2003-12-4 Brian Masney <masneyb@gftp.org> + * lib/cache.c lib/misc.c lib/protocols.c lib/rfc2068.c lib/rfc959.c + lib/sshv2.c lib/sslcommon.c src/text/gftp-text.c src/gtk/chmod_dialog.c + src/gtk/gftp-gtk.c src/gtk/menu-items.c src/gtk/misc-gtk.c + src/gtk/mkdir_dialog.c src/gtk/rename_dialog.c src/gtk/transfer.c - + when calling gftp_lookup_global_option() or + gftp_lookup_request_option(), if the value is an integer, declare + the variable type to be intptr_t. This fixes a bug on 64bit platforms + (from Gwenole Beauchesne <gbeauchesne@mandrakesoft.com>) + + * lib/config_file.c (gftp_config_file_read_float) - 64bit fixup + + * configure.in - increment version to 2.0.17pre0. Undefine _GNU_SOURCE. + Check for stdint.h. + + * lib/gftp.h - include stdint.h if it is found on the system. + + * src/gtk/gftp-gtk.c (CreateToolbar) - on startup, have the host edit + box grab the keyboard focus + 2003-11-30 Brian Masney <masneyb@gftp.org> * lib/sshv2.c - cleaned up some of the code. Added a temporary fix for an upload crash that is happening on FreeBSD. @@ -1779,7 +1799,7 @@ * cvsclean - added this script - * *.[ch] - added $Id: ChangeLog,v 1.176 2003/12/01 01:21:13 masneyb Exp $ tags + * *.[ch] - added $Id: ChangeLog,v 1.177 2003/12/05 00:19:47 masneyb Exp $ tags * debian/* - updated files from Debian maintainer
--- a/configure.in Fri Dec 05 00:16:33 2003 +0000 +++ b/configure.in Fri Dec 05 00:19:48 2003 +0000 @@ -3,7 +3,7 @@ AC_INIT(lib/gftp.h) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(gftp,2.0.16) +AM_INIT_AUTOMAKE(gftp,2.0.17pre0) AC_ARG_ENABLE(gtk20, [ --disable-gtk20 Don't look for GTK+ 2.0 libraries], @@ -30,8 +30,6 @@ ALL_LINGUAS="am az ar be bg bn ca cs da de el es fi fr hr hu it ja ko mk ml ms nl no pl pt pt_BR ro ru sk sr sr@Latn sv tr uk zh_CN zh_TW" -AC_DEFINE(_GNU_SOURCE, 1, [Define for setting a GNU environment]) - AC_CANONICAL_HOST AC_PROG_CC AC_AIX @@ -54,7 +52,7 @@ AC_HEADER_DIRENT AC_HEADER_STDC AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS(fcntl.h libutil.h limits.h malloc.h pty.h strings.h sys/ioctl.h sys/time.h unistd.h) +AC_CHECK_HEADERS(fcntl.h libutil.h limits.h malloc.h pty.h strings.h sys/ioctl.h sys/time.h unistd.h stdint.h) AC_TYPE_SOCKLEN_T AC_TYPE_MODE_T @@ -285,4 +283,4 @@ AC_CHECK_PROG(DB2HTML, db2html, true, false) AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML) -AC_OUTPUT(Makefile docs/Makefile docs/sample.gftp/Makefile lib/Makefile src/gftp src/Makefile src/gtk/Makefile src/text/Makefile gftp.spec intl/Makefile po/Makefile.in intl/Makefile po/Makefile.in ) +AC_OUTPUT(Makefile docs/Makefile docs/sample.gftp/Makefile lib/Makefile src/gftp src/Makefile src/gtk/Makefile src/text/Makefile gftp.spec intl/Makefile po/Makefile.in )
--- a/lib/cache.c Fri Dec 05 00:16:33 2003 +0000 +++ b/lib/cache.c Fri Dec 05 00:19:48 2003 +0000 @@ -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; + intptr_t cache_ttl; ssize_t ret; time_t t;
--- a/lib/config_file.c Fri Dec 05 00:16:33 2003 +0000 +++ b/lib/config_file.c Fri Dec 05 00:19:48 2003 +0000 @@ -1048,10 +1048,10 @@ static int gftp_config_file_read_float (char *str, gftp_config_vars * cv, int line) { - float f; + union { intptr_t i; float f; } r; - f = strtod (str, NULL); - memcpy (&cv->value, &f, sizeof (cv->value)); + r.f = strtod (str, NULL); + memcpy (&cv->value, &r.i, sizeof (cv->value)); return (0); }
--- a/lib/gftp.h Fri Dec 05 00:16:33 2003 +0000 +++ b/lib/gftp.h Fri Dec 05 00:19:48 2003 +0000 @@ -57,6 +57,10 @@ #include <grp.h> #include <math.h> +#ifdef HAVE_STDINT_H +#include <stdint.h> +#endif + #ifdef HAVE_STRING_H #include <string.h> #else
--- a/lib/misc.c Fri Dec 05 00:16:33 2003 +0000 +++ b/lib/misc.c Fri Dec 05 00:19:48 2003 +0000 @@ -785,7 +785,7 @@ GList * files, * dirs, * dotdot, * tempitem, * insitem; GCompareFunc sortfunc; gftp_file * tempfle; - int sort_dirs_first; + intptr_t sort_dirs_first; files = dirs = dotdot = NULL;
--- a/lib/protocols.c Fri Dec 05 00:16:33 2003 +0000 +++ b/lib/protocols.c Fri Dec 05 00:19:48 2003 +0000 @@ -212,6 +212,7 @@ g_return_val_if_fail (tofile != NULL, GFTP_EFATAL); gftp_lookup_request_option (toreq, "maxkbs", &maxkbs); + if (maxkbs > 0) { toreq->logging_function (gftp_logging_misc, toreq, @@ -2222,7 +2223,7 @@ ssize_t gftp_fd_read (gftp_request * request, void *ptr, size_t size, int fd) { - long network_timeout; + intptr_t network_timeout; struct timeval tv; fd_set fset; ssize_t ret; @@ -2292,7 +2293,7 @@ ssize_t gftp_fd_write (gftp_request * request, const char *ptr, size_t size, int fd) { - long network_timeout; + intptr_t network_timeout; struct timeval tv; ssize_t w_ret; fd_set fset; @@ -2495,7 +2496,8 @@ int gftp_get_transfer_status (gftp_transfer * tdata, ssize_t num_read) { - int ret1, ret2, retries, sleep_time; + int ret1, ret2; + intptr_t retries, sleep_time; gftp_file * tempfle; struct timeval tv;
--- a/lib/rfc2068.c Fri Dec 05 00:16:33 2003 +0000 +++ b/lib/rfc2068.c Fri Dec 05 00:19:48 2003 +0000 @@ -54,7 +54,8 @@ { char *proxy_hostname, *proxy_config; rfc2068_params * params; - int proxy_port, ret; + intptr_t proxy_port; + int ret; g_return_val_if_fail (request != NULL, GFTP_EFATAL); g_return_val_if_fail (request->protonum == GFTP_HTTP_NUM, GFTP_EFATAL); @@ -181,7 +182,8 @@ 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; + intptr_t proxy_port; + int conn_ret; ssize_t ret; g_return_val_if_fail (request != NULL, GFTP_EFATAL); @@ -273,7 +275,8 @@ off_t startsize) { char *tempstr, *oldstr, *hf; - int restarted, use_http11; + int restarted; + intptr_t use_http11; rfc2068_params * params; off_t size; @@ -402,7 +405,7 @@ { rfc2068_params *params; char *tempstr, *hd; - int use_http11; + intptr_t use_http11; off_t ret; g_return_val_if_fail (request != NULL, GFTP_EFATAL); @@ -448,7 +451,7 @@ { rfc2068_params *params; char *tempstr, *hf; - int use_http11; + intptr_t use_http11; off_t size; g_return_val_if_fail (request != NULL, GFTP_EFATAL);
--- a/lib/rfc959.c Fri Dec 05 00:16:33 2003 +0000 +++ b/lib/rfc959.c Fri Dec 05 00:19:48 2003 +0000 @@ -189,7 +189,7 @@ char *startpos, *endpos, *newstr, *newval, tempport[6], *proxy_config, *utf8, savechar; size_t len; - int tmp; + intptr_t tmp; g_return_val_if_fail (request != NULL, NULL); g_return_val_if_fail (request->protonum == GFTP_FTP_NUM, NULL); @@ -216,7 +216,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': @@ -435,7 +435,8 @@ rfc959_connect (gftp_request * request) { char tempchar, *startpos, *endpos, *tempstr, *email, *proxy_hostname, *utf8; - int ret, resp, ascii_transfers, proxy_port; + int ret, resp; + intptr_t ascii_transfers, proxy_port; rfc959_parms * parms; g_return_val_if_fail (request != NULL, GFTP_EFATAL); @@ -609,7 +610,8 @@ { char *pos, *pos1, resp, *command; struct sockaddr_in data_addr; - int i, passive_transfer; + int i; + intptr_t passive_transfer; rfc959_parms * parms; socklen_t data_addr_len; unsigned int temp[6]; @@ -927,7 +929,8 @@ static int rfc959_accept_active_connection (gftp_request * request) { - int infd, ret, passive_transfer; + int infd, ret; + intptr_t passive_transfer; rfc959_parms * parms; #ifdef HAVE_IPV6 struct sockaddr_in cli_addr; @@ -975,7 +978,8 @@ { gftp_config_list_vars * tmplistvar; gftp_file_extensions * tempext; - int stlen, ascii_transfers; + int stlen; + intptr_t ascii_transfers; GList * templist; gftp_lookup_global_option ("ext", &tmplistvar); @@ -1040,7 +1044,8 @@ off_t startsize) { char *command, *tempstr, resp; - int ret, passive_transfer; + int ret; + intptr_t passive_transfer; rfc959_parms * parms; g_return_val_if_fail (request != NULL, GFTP_EFATAL); @@ -1115,7 +1120,8 @@ off_t startsize, off_t totalsize) { char *command, *tempstr, resp; - int ret, passive_transfer; + int ret; + intptr_t passive_transfer; rfc959_parms * parms; g_return_val_if_fail (request != NULL, GFTP_EFATAL); @@ -1306,7 +1312,8 @@ static int rfc959_list_files (gftp_request * request) { - int ret, show_hidden_files, resolve_symlinks, passive_transfer; + int ret; + intptr_t show_hidden_files, resolve_symlinks, passive_transfer; char *tempstr, parms[3]; g_return_val_if_fail (request != NULL, GFTP_EFATAL);
--- a/lib/sshv2.c Fri Dec 05 00:16:33 2003 +0000 +++ b/lib/sshv2.c Fri Dec 05 00:19:48 2003 +0000 @@ -848,7 +848,8 @@ static int sshv2_connect (gftp_request * request) { - int version, ret, ssh_use_askpass, sshv2_use_sftp_subsys, fdm; + int version, ret, fdm; + intptr_t ssh_use_askpass, sshv2_use_sftp_subsys; char **args, *tempstr, *p1, p2, *exepath, *ssh2_sftp_path; struct servent serv_struct; sshv2_params * params; @@ -2231,7 +2232,7 @@ static int sshv2_set_config_options (gftp_request * request) { - int ssh_need_userpass; + intptr_t ssh_need_userpass; gftp_lookup_request_option (request, "ssh_need_userpass", &ssh_need_userpass); request->need_userpass = ssh_need_userpass;
--- a/lib/sslcommon.c Fri Dec 05 00:16:33 2003 +0000 +++ b/lib/sslcommon.c Fri Dec 05 00:19:48 2003 +0000 @@ -271,7 +271,7 @@ gftp_ssl_startup (gftp_request * request) { char *entropy_source; - int entropy_len; + intptr_t entropy_len; if (gftp_ssl_initialized) return (0);
--- a/src/gftp.in Fri Dec 05 00:16:33 2003 +0000 +++ b/src/gftp.in Fri Dec 05 00:19:48 2003 +0000 @@ -1,10 +1,13 @@ #!/bin/sh -if [ "$DISPLAY " != " " ] && [ -f @prefix@/bin/gftp-gtk ]; then - exec @prefix@/bin/gftp-gtk ${1+"$@"} -elif [ -f @prefix@/bin/gftp-text ]; then - exec @prefix@/bin/gftp-text ${1+"$@"} +prefix=@prefix@ +exec_prefix=@exec_prefix@ + +if [ "$DISPLAY " != " " ] && [ -f @bindir@/gftp-gtk ]; then + exec @bindir@/gftp-gtk ${1+"$@"} +elif [ -f @bindir@/gftp-text ]; then + exec @bindir@/gftp-text ${1+"$@"} else - echo "Error: Can't find gFTP binaries installed in @prefix@/bin" + echo "Error: Can't find gFTP binaries installed in @bindir@" fi