# HG changeset patch # User masneyb # Date 1071348734 0 # Node ID 0f34108f27b7cfc8c5d51819a513101a365bbfdd # Parent 5f9d5aee0c1c70d466215ea0b6997ea4a902bfa6 2003-12-10 Brian Masney * lib/gftp.h src/text/gftp-text.h src/gtk/gftp-gtk.h - added GFTP_LOG_FUNCTION_ATTRIBUTES that is only defined when compiled against gcc. When this is set, it will specify the function is printf() type function so that extra checks can be done by the compiler. This is to fix problems with older Sun compilers. diff -r 5f9d5aee0c1c -r 0f34108f27b7 ChangeLog --- a/ChangeLog Sat Dec 13 20:36:39 2003 +0000 +++ b/ChangeLog Sat Dec 13 20:52:14 2003 +0000 @@ -1,4 +1,10 @@ 2003-12-10 Brian Masney + * lib/gftp.h src/text/gftp-text.h src/gtk/gftp-gtk.h - added + GFTP_LOG_FUNCTION_ATTRIBUTES that is only defined when compiled + against gcc. When this is set, it will specify the function is + printf() type function so that extra checks can be done by the + compiler. This is to fix problems with older Sun compilers. + * src/gtk/gftp-gtk.c src/gtk/menu-items.c src/gtk/misc-gtk.c - check for a timeout from the remote server when refreshing the directory listing and changing directores. If it did, reconnect to the server. @@ -1834,7 +1840,7 @@ * cvsclean - added this script - * *.[ch] - added $Id: ChangeLog,v 1.184 2003/12/13 20:36:37 masneyb Exp $ tags + * *.[ch] - added $Id: ChangeLog,v 1.185 2003/12/13 20:52:12 masneyb Exp $ tags * debian/* - updated files from Debian maintainer diff -r 5f9d5aee0c1c -r 0f34108f27b7 lib/gftp.h --- a/lib/gftp.h Sat Dec 13 20:36:39 2003 +0000 +++ b/lib/gftp.h Sat Dec 13 20:52:14 2003 +0000 @@ -133,6 +133,12 @@ #endif +#ifdef __GNUC__ +# define GFTP_LOG_FUNCTION_ATTRIBUTES __attribute__((format(printf, 3, 4))) +#else +# define GFTP_LOG_FUNCTION_ATTRIBUTES +#endif + /* Server types (used by FTP protocol from SYST command) */ #define GFTP_DIRTYPE_UNIX 1 #define GFTP_DIRTYPE_EPLF 2 diff -r 5f9d5aee0c1c -r 0f34108f27b7 src/gtk/gftp-gtk.h --- a/src/gtk/gftp-gtk.h Sat Dec 13 20:36:39 2003 +0000 +++ b/src/gtk/gftp-gtk.h Sat Dec 13 20:52:14 2003 +0000 @@ -291,7 +291,7 @@ void ftp_log ( gftp_logging_level level, gftp_request * request, const char *string, - ... ) __attribute__((format(printf, 3, 4))); + ... ) GFTP_LOG_FUNCTION_ATTRIBUTES; void refresh ( gftp_window_data * wdata ); diff -r 5f9d5aee0c1c -r 0f34108f27b7 src/text/gftp-text.h --- a/src/text/gftp-text.h Sat Dec 13 20:36:39 2003 +0000 +++ b/src/text/gftp-text.h Sat Dec 13 20:52:14 2003 +0000 @@ -53,7 +53,7 @@ /* gftp-text.h */ void gftp_text_log ( gftp_logging_level level, gftp_request * request, - const char *string, ... ) __attribute__((format(printf, 3, 4))); + const char *string, ... ) GFTP_LOG_FUNCTION_ATTRIBUTES; int gftp_text_open ( gftp_request * request, char *command, gpointer *data );