mainGnuTLS - Support: sr #107860, The read_file function is too...

 
 

sr #107860: The read_file function is too generic, clashes with similarly named functions in user applications

Submitter:  Martin Storsjö <mstorsjo>
Submitted:  Mon 31 Oct 2011 03:24:38 PM UTC
   
 
Category:  Core library Priority:  5 - Normal
Severity:  2 - Minor Status:  Done
Privacy:  Public Assigned to:  nmav
Open/Closed:  Closed Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 16 Nov 2011 01:54:18 PM UTC, comment #4: 

The new solution using #defines seem to work just fine as well. Thanks!

Martin Storsjö <mstorsjo>
Wed 16 Nov 2011 01:28:20 PM UTC, comment #3: 

I've modified the solution here to use config.h #define's instead.  Please test.  I'm closing this meanwhile...

Simon Josefsson <jas>
Group administrator
Tue 01 Nov 2011 08:37:23 AM UTC, comment #2: 

Great, thanks!

Martin Storsjö <mstorsjo>
Tue 01 Nov 2011 07:43:51 AM UTC, comment #1: 

Thanks for reporting that. I have renamed it to gl_read_file() so it shouldn't class any more.

Nikos Mavrogiannopoulos <nmav>
Group administrator
Mon 31 Oct 2011 03:24:38 PM UTC, original submission:  

The read_file function is a very generic name, which can cause clashes with functions named similarly in calling applications, if linking gnutls statically. (One concrete case was in the ffmpeg/avconv applications, where the function has been renamed as a preparation for adding gnutls support: http://git.libav.org/?p=libav.git;a=commitdiff;h=02170990fdb2a05c6eaf5fd449f440ec51c0f822)

The attached patch renames this function and the other ones in gl/read-file.h, by adding a leading underscore. Any other prefix that would be internal to gnutls would work just as well.

Martin Storsjö <mstorsjo>

 

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

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jas (Posted a comment)
  • -email is unavailable- added by nmav (Posted a comment)
  • -email is unavailable- added by mstorsjo (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.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-11-16 jas Open/ClosedOpen Closed
    2011-11-01 nmav StatusNone Done
        Assigned toNone nmav
    2011-10-31 mstorsjo Attached File- Added 0001-Rename-the-read_file-function-family.patch, #24255

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code