Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-4546

Zabbix won't compile with a ANSI standard compiler

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Won't fix
    • Icon: Minor Minor
    • None
    • 1.8.10
    • Installation (I)
    • 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.

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

              Created:
              Updated:
              Resolved: