! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfdesktop does not compile under solaris in debug mode with sunstudio
Status:
CLOSED: FIXED
Product:
Xfdesktop
Component:
General

Comments

Description William Bonnet 2007-02-18 22:00:37 CET
User-Agent:       Mozilla/5.0 (X11; U; SunOS sun4u; fr-FR; rv:1.8.1) Gecko/20061228 Firefox/2.0
Build Identifier: 

The code xfdesktop-icon-view.c and desktop-menu.h use the __FUNCTION__ macro which is not standardized and does not compile with SunStudio C compiler. 

It should be replaced by __func__

Reproducible: Always
Comment 1 William Bonnet 2007-02-18 22:01:27 CET
Created attachment 1008 
Replace __FUNCTION__ by __func__
Comment 2 Brian J. Tarricone (not reading bugmail) 2007-02-18 22:22:45 CET
__func__ isn't defined everywhere either, so can't use that.  I just removed the redundant BD() stuff in the menu code (just use the libxfce4util DBG() macro instead), and modified the icon view macro to just print using DBG() as well.

Really though: building in debug mode is intended for developers (at least how I see it), though of course it's useful for users trying to track down problems.  I'm not really too concerned if debug mode fails on a few minority compilers/arches.
Comment 3 William Bonnet 2007-02-18 22:42:10 CET
Hi 

> __func__ isn't defined everywhere either, so can't use that.  I just removed
> the redundant BD() stuff in the menu code (just use the libxfce4util DBG()
> macro instead), and modified the icon view macro to just print using DBG() as
> well.

Thanks. 

I think i'll submit soon a small patch to libxfce4util since the GDB macro is not using __func__ for sunstudio CC but "??". One test is missing from the #ifdef stuff.
 
> Really though: building in debug mode is intended for developers (at least how
> I see it), though of course it's useful for users trying to track down
> problems.  I'm not really too concerned if debug mode fails on a few minority
> compilers/arches.

I am working to update the Solaris packages for Blastwave. Since i had a few problems i compiled in debug mode on my box to understand what's going on with my problem. Of course i'll switch to final when i will have fixed my packaging problems.

Thank you for your quick answer.


Comment 4 Rémi Hérilier 2007-04-13 17:49:43 CEST
> __func__ isn't defined everywhere either, so can't use that.

__func__ is a c99 predefined identifiers (section 6.4.2.2 in the c99 spec file).
Comment 5 Brian J. Tarricone (not reading bugmail) 2007-04-13 18:19:22 CEST
(In reply to comment #4)
> > __func__ isn't defined everywhere either, so can't use that.
> 
> __func__ is a c99 predefined identifiers (section 6.4.2.2 in the c99 spec
> file).
> 

And we don't require a c99-capable compiler...

Bug #2924

Reported by:
William Bonnet
Reported on: 2007-02-18
Last modified on: 2009-07-14

People

Assignee:
Brian J. Tarricone (not reading bugmail)
CC List:
0 users

Version

Attachments

Replace __FUNCTION__ by __func__ (1.25 KB, patch)
2007-02-18 22:01 CET , William Bonnet
no flags

Additional information