Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.5.30
    • Fix Version/s: 5.5.32
    • Component/s: None
    • Labels:
      None
    • Environment:
      NetBSD 6.1 (and 5.1 being checked)

      Description

      The attached file fixes some compile time errors with respect to NetBSD 6.1 (and 5.1). Also its recommended for GCC that the option -Wno-char-subscripts be used to silence annoying compiler warnings about using a char for an array subscript (GCC folks need a life).

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            achowe Anthony Howe added a comment -

            The _func_ patch doesn't appear to work (NetBSD 6.1, gcc 4.5.3), many of these warnings...

            Scanning dependencies of target strings
            [ 4%] Building C object strings/CMakeFiles/strings.dir/bchange.c.o
            In file included from /usr/local/src/mariadb-5.5.30/strings/strings_def.h:20:0,
            from /usr/local/src/mariadb-5.5.30/strings/bchange.c:39:
            /usr/local/src/mariadb-5.5.30/include/my_global.h:1453:0: warning: "_func_" redefined
            /usr/include/sys/cdefs.h:353:0: note: this is the location of the previous definition
            [ 4%] Building C object strings/CMakeFiles/strings.dir/bmove_upp.c.o
            In file included from /usr/local/src/mariadb-5.5.30/strings/strings_def.h:20:0,
            from /usr/local/src/mariadb-5.5.30/strings/bmove_upp.c:38:
            /usr/local/src/mariadb-5.5.30/include/my_global.h:1453:0: warning: "_func_" redefined
            /usr/include/sys/cdefs.h:353:0: note: this is the location of the previous definition
            [ 4%] Building C object strings/CMakeFiles/strings.dir/ctype-big5.c.o
            In file included from /usr/local/src/mariadb-5.5.30/strings/strings_def.h:20:0,
            from /usr/local/src/mariadb-5.5.30/strings/ctype-big5.c:30:
            /usr/local/src/mariadb-5.5.30/include/my_global.h:1453:0: warning: "_func_" redefined
            /usr/include/sys/cdefs.h:353:0: note: this is the location of the previous definition
            [ 4%] Building C object strings/CMakeFiles/strings.dir/ctype-bin.c.o
            In file included from /usr/local/src/mariadb-5.5.30/strings/strings_def.h:20:0,
            from /usr/local/src/mariadb-5.5.30/strings/ctype-bin.c:22:
            /usr/local/src/mariadb-5.5.30/include/my_global.h:1453:0: warning: "_func_" redefined
            /usr/include/sys/cdefs.h:353:0: note: this is the location of the previous definition

            My suggested fix was better.

            Show
            achowe Anthony Howe added a comment - The _ func _ patch doesn't appear to work (NetBSD 6.1, gcc 4.5.3), many of these warnings... Scanning dependencies of target strings [ 4%] Building C object strings/CMakeFiles/strings.dir/bchange.c.o In file included from /usr/local/src/mariadb-5.5.30/strings/strings_def.h:20:0, from /usr/local/src/mariadb-5.5.30/strings/bchange.c:39: /usr/local/src/mariadb-5.5.30/include/my_global.h:1453:0: warning: "_ func _" redefined /usr/include/sys/cdefs.h:353:0: note: this is the location of the previous definition [ 4%] Building C object strings/CMakeFiles/strings.dir/bmove_upp.c.o In file included from /usr/local/src/mariadb-5.5.30/strings/strings_def.h:20:0, from /usr/local/src/mariadb-5.5.30/strings/bmove_upp.c:38: /usr/local/src/mariadb-5.5.30/include/my_global.h:1453:0: warning: "_ func _" redefined /usr/include/sys/cdefs.h:353:0: note: this is the location of the previous definition [ 4%] Building C object strings/CMakeFiles/strings.dir/ctype-big5.c.o In file included from /usr/local/src/mariadb-5.5.30/strings/strings_def.h:20:0, from /usr/local/src/mariadb-5.5.30/strings/ctype-big5.c:30: /usr/local/src/mariadb-5.5.30/include/my_global.h:1453:0: warning: "_ func _" redefined /usr/include/sys/cdefs.h:353:0: note: this is the location of the previous definition [ 4%] Building C object strings/CMakeFiles/strings.dir/ctype-bin.c.o In file included from /usr/local/src/mariadb-5.5.30/strings/strings_def.h:20:0, from /usr/local/src/mariadb-5.5.30/strings/ctype-bin.c:22: /usr/local/src/mariadb-5.5.30/include/my_global.h:1453:0: warning: "_ func _" redefined /usr/include/sys/cdefs.h:353:0: note: this is the location of the previous definition My suggested fix was better.
            Hide
            wlad Vladislav Vaintroub added a comment -

            I might overlook something trivial, but how

            #if (_STDC_VERSION_ < 199901L) && !defined(_func_)
            as in my patch is the very same as

            #if _STDC_VERSION_ < 199901L

            1. ifndef _func_

            as in your patch? Could you please clarify?

            Thanks,
            Vladislav

            Show
            wlad Vladislav Vaintroub added a comment - I might overlook something trivial, but how #if (_ STDC_VERSION _ < 199901L) && !defined(_ func _) as in my patch is the very same as #if _ STDC_VERSION _ < 199901L ifndef _ func _ as in your patch? Could you please clarify? Thanks, Vladislav
            Hide
            achowe Anthony Howe added a comment -

            You version falls through to the #else line 1453, whereas my version enters the #if _STDC_VERSION_ < 199901L section before applying #ifndef _func_.

            Show
            achowe Anthony Howe added a comment - You version falls through to the #else line 1453, whereas my version enters the #if _ STDC_VERSION _ < 199901L section before applying #ifndef _ func _.
            Hide
            achowe Anthony Howe added a comment -

            Alternatively should work too:

            #ifndef _func_
            #if (_STDC_VERSION_ < 199901L)

            1. if _GNUC_ >= 2
            2. define _func_ _FUNCTION_
            3. else
            4. define _func_ "<unknown>"
            5. endif
              #elif defined(_MSC_VER)
            6. if _MSC_VER < 1300
            7. define _func_ "<unknown>"
            8. else
            9. define _func_ _FUNCTION_
            10. endif
              #elif defined(_BORLANDC_)
            11. define _func_ _FUNC_
              #else
            12. define _func_ "<unknown>"
              #endif
              #endif /* _func_ */
            Show
            achowe Anthony Howe added a comment - Alternatively should work too: #ifndef _ func _ #if (_ STDC_VERSION _ < 199901L) if _ GNUC _ >= 2 define _ func _ _ FUNCTION _ else define _ func _ "<unknown>" endif #elif defined(_MSC_VER) if _MSC_VER < 1300 define _ func _ "<unknown>" else define _ func _ _ FUNCTION _ endif #elif defined(_ BORLANDC _) define _ func _ _ FUNC _ #else define _ func _ "<unknown>" #endif #endif /* _ func _ */
            Hide
            wlad Vladislav Vaintroub added a comment -

            Yes, I like this most.

            Show
            wlad Vladislav Vaintroub added a comment - Yes, I like this most.

              People

              • Assignee:
                wlad Vladislav Vaintroub
                Reporter:
                achowe Anthony Howe
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours
                  4h