Navigation

    Kopano
    • Register
    • Login
    • Search
    • Categories
    • Get Official Kopano Support
    • Recent
    Statement regarding the closure of the Kopano community forum and the end of the community edition

    Stop violating C and C++ reserved names

    Kopano Groupware Core
    2
    6
    1427
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • bulibuta
      bulibuta last edited by

      Hi,

      The last snapshot (1281) of kopano core does not build memory.hpp on OpenBSD/amd64 because ctype ends up being included (I think through cwtype) which already define _U and the like (used for templates in the header file).

      According to the C and C++ standard names starting with underscore uppercase letter are reserved. Is there anything wrong with using T instead of _T, U instead of _U and so on and so forth? I see no problem with that on my system.

      For a full diff checkout this link. Can this be applied to the official tree? (Actually now that I look at it there is also __p and other stuff that this patch does not fix. Sigh.)

      Paul Irofti

      1 Reply Last reply Reply Quote 0
      • A Former User
        A Former User last edited by

        Yes, you are right that _ are reserved identifiers (and we should fix it).
        Does it cause a build error in your environment?

        1 Reply Last reply Reply Quote 0
        • bulibuta
          bulibuta last edited by

          Yes it does. Comes from ctype.h as mentioned in my original post.

          1 Reply Last reply Reply Quote 0
          • A Former User
            A Former User last edited by

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • A Former User
              A Former User last edited by

              Some 1550 lines with instances of reserved identifiers have been edited (particularly the short ones also used by ctype). There are more left, but unless there are (still) compile errors, I would prefer doing them in the next devel cycle.

              1 Reply Last reply Reply Quote 0
              • bulibuta
                bulibuta last edited by

                Hi,

                Thanks for your help with this issue. If your changes included the ones I posted in my diff then it surely compiles on OpenBSD and there will be one less patch (58 total) needed for Kopano in my tree.

                Paul

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post