After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 342963 - modules/sftp-method.c uses __FUNCTION__ instead of G_GNUC_FUNCTION
modules/sftp-method.c uses __FUNCTION__ instead of G_GNUC_FUNCTION
Status: RESOLVED FIXED
Product: gnome-vfs
Classification: Deprecated
Component: Build
2.15.x
Other All
: Normal normal
: ---
Assigned To: gnome-vfs maintainers
gnome-vfs maintainers
: 348367 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-05-25 23:04 UTC by Tim Mooney
Modified: 2006-07-23 09:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch changing all instances of __FUNCTION__ to G_GNUC_FUNCTION (25.30 KB, patch)
2006-05-25 23:11 UTC, Tim Mooney
committed Details | Review

Description Tim Mooney 2006-05-25 23:04:26 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
Comment 1 Tim Mooney 2006-05-25 23:11:16 UTC
Created attachment 66232 [details] [review]
patch changing all instances of __FUNCTION__ to G_GNUC_FUNCTION
Comment 2 Christian Kellner 2006-07-13 13:24:12 UTC
Commited to cvs HEAD. Thanks.
Comment 3 Christian Kellner 2006-07-23 09:42:09 UTC
*** Bug 348367 has been marked as a duplicate of this bug. ***