bugpng++, a C++ wrapper for libpng - Bugs: bug #46312, Compilation fails on MacOS X with...

 
 

bug #46312: Compilation fails on MacOS X with g++ 5.2 (MacPorts)

Submitted by:  None
Submitted on:  Wed 28 Oct 2015 03:31:34 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 08 May 2016 07:36:43 AM UTC, comment #1:

Just encountered this issue as well. Unfortunately the posted .hpp file introduces a subtle new problem. Under the default Linux/glibc config, the return value of strerror_r() is required to be used, and this change disregards it, so you'll get invalid data instead of error messages under Linux if you use this proposed fix.

Instead, if you change the conditions so that _GLIBC_ is required before using the GNU version, then it will only use that function when linked with glibc. When compiling with Clang's libc++, _GLIBC_ won't be defined and you'll get the version with the ignored return value.

I have used Travis CI to test this change with both Clang and GCC under both Linux and OSX, and it compiles successfully.

Adam Nielsen <malvineous>
Wed 28 Oct 2015 03:31:34 PM UTC, original submission:

Reason: strerror_r() is used with a char* return type.

I suggest using the variant that ignores the return value
and a really large buffer size. The attached code works.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #35325:  error.hpp added by None (3KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by malvineous (Posted a comment)
  •  

    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):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 28 Oct 2015 03:31:34 PM UTCNoneAttached File-=>Added error.hpp, #35325

    Back to the top


    Powered by Savane 3.1-cleanup1