patchTransport Sample Protocol - Patches: patch #6551, Fix compilation on Fedora 9

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #6551: Fix compilation on Fedora 9

Submitted by:  Robert de Vries <rhdv>
Submitted on:  Tue 24 Jun 2008 07:30:29 PM UTC  
 
Category: TSPPriority: 5 - Normal
Status: Works For MePrivacy: Public
Assigned to: Eric NOULARD <erk>Open/Closed: Open

Wed 25 Jun 2008 01:16:21 PM UTC, comment #3:

I'd say so too. This may lead to unexpected compilation problems on more exotic platforms, but it's worth it IMHO

Frederik Deweerdt <deweerdt>
Project Administrator
Wed 25 Jun 2008 01:14:31 PM UTC, comment #2:

Hi TSP admin's

what do you think about this?
Is it acceptable for you to enable _GNU_SOURCE
when we use gcc compiler?

I'm tempt to say yes but I'd like to have your opinion.

Eric NOULARD <erk>
Project AdministratorIn charge of this item.
Wed 25 Jun 2008 11:36:49 AM UTC, comment #1:

Hi Robert,

I think _GNU_SOURCE usage should be avoided alltogether
in fact tspfs may currently be the only exception.

TSPFS is using FUSE http://fuse.sourceforge.net
which is only available on Linux.
I don't even know if fuse may be compiled/used with
alternate compiler for Linux so I don't mind
_GNU_SOURCE for tspfs.

We specically avoid GNU specifics for "generic" part of TSP.

So your change may be OK
since if we have GNU compiler adding _GNU_SOURCE is not that
bad, but I would like testing for a compilation using
alternative compiler.

May be SunStudio for Linux
http://developers.sun.com/sunstudio/downloads/thankyou.jsp?submit=%A0FREE+Download%A0%BB%A0
or icc

or any other compiler on non Linux platform.

Eric NOULARD <erk>
Project AdministratorIn charge of this item.
Tue 24 Jun 2008 07:30:29 PM UTC, original submission:

In the gcc header file netdb.h the alias h_addr for h_addr_list[0] has been placed under __USE_MISC || __USE_GNU
These flags in turn are being enabled by _BSD_SOURCE or _SVID_SOURCE and the latter by _GNU_SOURCE.
I experimented with _BSD_SOURCE and the compilation failed as some other files required _SVID_SOURCE.
Then I experimented with _GNU_SOURCE and found that a couple of other files enabled the flag as well (tspfs.[ch]). (plus it sets the internal __USE_GNU flag).
As some of the files already rely on the _GNU_SOURCE flag I decided to put it under the CMAKE_COMPILER_IS_GCC in the top-level CMakeLists.txt file.
This requires then the removal of the locally set flags in tspfs.[ch].

Robert de Vries <rhdv>
Project Member

 

Attached Files
file #15930:  GNU_SOURCE.patch added by rhdv (2KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by deweerdt (Posted a comment)
  • -unavailable- added by erk (For opinion)
  • -unavailable- added by erk (For opinion)
  • -unavailable- added by erk (Posted a comment)
  • -unavailable- added by rhdv (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 25 Jun 2008 01:14:31 PM UTCerkCarbon-Copy-=>Added deweerdt
      Carbon-Copy-=>Added tsp_admin
    Tue 24 Jun 2008 07:30:29 PM UTCrhdvAttached File-=>Added GNU_SOURCE.patch, #15930

    Back to the top


    Powered by Savane 3.1-cleanup1