helpGnuTLS - Support: sr #108614, Reinstate support for C89

 
 

sr #108614: Reinstate support for C89

Submitted by:  Ryan Schmidt <ryandesign>
Submitted on:  Mon 14 Jul 2014 06:24:18 AM UTC  
 
Category: Core libraryPriority: 5 - Normal
Severity: 3 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: OpenOperating System: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Mon 14 Jul 2014 06:24:18 AM UTC, original submission:

Hello, I'm with the MacPorts package management system, which recently updated its gnutls package from version 3.1.x to 3.3.5. We've found that now, software that uses gnutls cannot be compiled in c89 mode because of errors like this:

For more info, see:

https://trac.macports.org/ticket/44323

These problems are not seen in c99 mode, where a comma at the end of an enumerator list is legal.

c99 mode is used by default by clang, which is included in the developer tools on Mac OS X v10.6 and later. However, c89 is used by default by the old versions of gcc included in the developer tools on Mac OS X v10.6 and earlier, and that's also the default compiler there.

One could say "well, just build in c99 mode", but I feel that's an onerous requirement to place on every software package that uses gnutls. Therefore, to better support earlier Mac OS X versions, I propose you remove the commas at the end of your enumerator lists. I made this patch to do this, and it seems to work:

https://trac.macports.org/attachment/ticket/44323/patch-c89.diff

Ryan Schmidt <ryandesign>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by ryandesign (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):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup