Zabbix won't compile with a ANSI standard compiler

XMLWordPrintable

    • Type: Incident report
    • Resolution: Won't fix
    • Priority: Minor
    • None
    • Affects Version/s: 1.8.10
    • Component/s: Installation (I)
    • Environment:
      Building on AIX 5.3 with the native compiler (xlc). These fixes are compatible with all ANSI standard compilers.

      GCC allows a bunch of non-ANSI-standard features that other compilers do not. In building on IBM's ANSI standard compiler, the following issues pop up.

      Some of the issues fixed in this attached patch:

      • Enumerations may not have a trailing comma on the last member
      • Extra semicolons are not allowed outside of a function definition (common in the _DECL macros)
      • uchar is often already defined. uchar should be switched to uint8_t, similar to the other new style types already in use by Zabbix.
      • Arithmetic is not legal on void pointers. This was the biggest work to memalloc, using built in conversion from void * to a memory address pointer (char*), and casts where that wasn't normal.

      I would also recommend using -ansi / -pedantic options with GCC to make sure Zabbix code stays ANSI compatible.

            Assignee:
            Unassigned
            Reporter:
            Corey Stup
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: