diff lib/config_file.c @ 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 853981bbd4d7
children 532eb171d5c2
line wrap: on
line diff
--- 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);
 }