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 library Priority:  5 - Normal
Severity:  3 - Normal Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Operating System:  None

Add a New Comment(Rich Markup)

You are not logged in

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


Fri 19 Sep 2014 01:17:54 AM UTC, comment #3:

It looks like you did apply this patch:

Thanks! So this ticket can be closed.

While C99 may be 15 years old, C89 is the default mode of the gcc 4.2.1 compiler, which is the default compiler on OS X 10.6, which was released by Apple just 5 years ago in August 2009 and was not replaced by OS X 10.7 until July 2011. According to one company's survey just 6 weeks ago ( OS X 10.6 remains the second most popular version of OS X with 17.5% market share, behind OS X 10.9 with 45.7%. So it is important to continue to support users using OS X 10.6 and its older compiler.

Ryan Schmidt <ryandesign>
Sun 27 Jul 2014 12:35:13 PM UTC, comment #2:

The text version is available via the link "Original Format" at the bottom of the page, or directly at:

Ryan Schmidt <ryandesign>
Sun 27 Jul 2014 12:21:08 PM UTC, comment #1:

I could apply the patch if you attach it in a text format (the link you sent is in html format). Nevertheless, C99 is already 15 years old and I'll not spent much resources in keeping the code C89-compliant, except maybe for headers, as your patch does.

Nikos Mavrogiannopoulos <nmav>
Project Administrator
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:

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:

Ryan Schmidt <ryandesign>


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

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by nmav (Posted a comment)
  • -email is unavailable- added by ryandesign (Submitted the item)

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

    Only logged-in users can vote.




    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-09-20 nmav Open/ClosedOpen => Closed

    Back to the top

    Powered by Savane 3.3