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

Submitter:  Robert de Vries <rhdv>
Submitted:  Tue 24 Jun 2008 07:30:29 PM UTC
   
 
Category:  TSP Priority:  5 - Normal
Status:  Works For Me Privacy:  Public
Assigned to:  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>
Group 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>
Group administrator
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>
Group administrator
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>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

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
  • -email is unavailable- added by deweerdt (Posted a comment)
  • -email is unavailable- added by erk (For opinion)
  • -email is unavailable- added by erk (For opinion)
  • -email is unavailable- added by erk (Posted a comment)
  • -email is unavailable- added by rhdv (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-06-25 erk Carbon-Copy- Added deweerdt
        Carbon-Copy- Added tsp_admin
    2008-06-24 rhdv Attached File- Added GNU_SOURCE.patch, #15930

    Back to the top

    Powered by Savane 3.13-cf05.
    Corresponding source code