GNOME Bugzilla – Bug 342963
modules/sftp-method.c uses __FUNCTION__ instead of G_GNUC_FUNCTION
Last modified: 2006-07-23 09:42:09 UTC
Please describe the problem: With 2.15.1, modules/sftp-method.c uses __FUNCTION__ in a number of debug messages. __FUNCTION__ is a gcc-ism; C9X provides __func__ and glib provides a portable define G_GNUC_FUNCTION. Since sftp-method.c is already including the necessary glib header files, it's trivial to change all the __FUNCTION__ instances to G_GNUC_FUNCTION. Steps to reproduce: Build gnome-vfs-2.15.1 with a compiler other than gcc. Actual results: Compile failure in sftp-method.c: cc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.. -I../imported/neon -mt -DORBIT2=1 -I/local/gnu/include/glib-2.0 -I/local/gnu/lib/64/glib-2.0/include -I/local/gnu/include/libxml2 -I/local/gnu/include/gconf/2 -I/local/gnu/include/orbit-2.0 -mt -DORBIT2=1 -I/local/gnu/include/glib-2.0 -I/local/gnu/lib/64/glib-2.0/include -I/local/gnu/include/gconf/2 -I/local/gnu/include/orbit-2.0 -I/local/krb5/include -D_FILE_OFFSET_BITS=64 -D_BSD_SOURCE -D_LARGEFILE64_SOURCE -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -DSSH_PROGRAM=\"/local/bin/ssh\" -DG_DISABLE_DEPRECATED -DGNOME_VFS_PREFIX=\"/local/gnu\" -DGNOME_VFS_DATADIR=\"/local/gnu/share\" -DGNOME_VFS_LIBDIR=\"/local/gnu/lib/64\" -DGNOME_VFS_SYSCONFDIR=\"/etc/local/gnu\" -DG_LOG_DOMAIN=\"gnome-vfs-modules\" -I/local/include -I/local/gnu/include -I/local/openssl/include -I/local/include -I/local/gnu/include -I/local/openssl/include -Xa -xO2 -xstrconst -mt -KPIC -xtarget=native -xarch=amd64 -c sftp-method.c -KPIC -DPIC -o .libs/sftp-method.o "sftp-method.c", line 2392: undefined symbol: __FUNCTION__ cc: acomp failed for sftp-method.c Expected results: Source file compiles Does this happen every time? Yes Other information: The trivial patch is attached
Created attachment 66232 [details] [review] patch changing all instances of __FUNCTION__ to G_GNUC_FUNCTION
Commited to cvs HEAD. Thanks.
*** Bug 348367 has been marked as a duplicate of this bug. ***