[gnutls-devel] [sr #108614] Reinstate support for C89

Ryan Schmidt INVALID.NOREPLY at gnu.org
Mon Jul 14 08:24:19 CEST 2014


URL:
  <http://savannah.gnu.org/support/?108614>

                 Summary: Reinstate support for C89
                 Project: GnuTLS
            Submitted by: ryandesign
            Submitted on: Mon 14 Jul 2014 06:24:18 AM GMT
                Category: Core library
                Priority: 5 - Normal
                Severity: 3 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
        Operating System: None

    _______________________________________________________

Details:

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:


/opt/local/include/gnutls/gnutls.h:172: error: comma at end of enumerator
list
/opt/local/include/gnutls/gnutls.h:186: error: comma at end of enumerator
list
/opt/local/include/gnutls/gnutls.h:244: error: comma at end of enumerator
list
/opt/local/include/gnutls/gnutls.h:295: error: comma at end of enumerator
list
/opt/local/include/gnutls/gnutls.h:394: error: comma at end of enumerator
list
/opt/local/include/gnutls/gnutls.h:434: error: comma at end of enumerator
list
/opt/local/include/gnutls/gnutls.h:485: error: comma at end of enumerator
list
/opt/local/include/gnutls/gnutls.h:599: error: comma at end of enumerator
list
/opt/local/include/gnutls/gnutls.h:618: error: comma at end of enumerator
list
/opt/local/include/gnutls/gnutls.h:668: error: comma at end of enumerator
list
/opt/local/include/gnutls/gnutls.h:688: error: comma at end of enumerator
list
/opt/local/include/gnutls/gnutls.h:722: error: comma at end of enumerator
list
/opt/local/include/gnutls/gnutls.h:1598: error: comma at end of enumerator
list
/opt/local/include/gnutls/gnutls.h:1937: error: comma at end of enumerator
list
/opt/local/include/gnutls/gnutls.h:2085: error: comma at end of enumerator
list


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




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/support/?108614>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




More information about the Gnutls-devel mailing list