Loading ...
Sorry, an error occurred while loading the content.

Patch for compilation warnings on Mac OS X

Expand Messages
  • björn
    Hi, It seems something has changed in the os_unix.h header which causes three macros to be defined twice when compiling on Mac OS X and this resulted in
    Message 1 of 2 , Jun 18, 2009
    • 0 Attachment
      Hi,

      It seems something has changed in the os_unix.h header which causes
      three macros to be defined twice when compiling on Mac OS X and this
      resulted in several annoying warnings. The patch below takes care of
      this problem (sorry that the patch is not in the usual format, but it
      is so short that it didn't seem to matter too much).

      Björn


      diff --git a/src/os_mac.h b/src/os_mac.h
      index 7a54ee5..aae08bf 100644
      --- a/src/os_mac.h
      +++ b/src/os_mac.h
      @@ -268,9 +268,6 @@
      */

      #ifdef MACOS_X_UNIX
      -# define SIGPROTOARG (int)
      -# define SIGDEFARG(s) (s) int s;
      -# define SIGDUMMYARG 0
      # undef HAVE_AVAIL_MEM
      # ifndef HAVE_CONFIG_H
      # define RETSIGTYPE void

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Bram Moolenaar
      ... I think these were there for a reason. To stay on the safe side, does it work like this: #ifndef SIGPROTOARG # define SIGPROTOARG (int) #endif #ifndef
      Message 2 of 2 , Jun 18, 2009
      • 0 Attachment
        Bjorn Winckler wrote:

        > It seems something has changed in the os_unix.h header which causes
        > three macros to be defined twice when compiling on Mac OS X and this
        > resulted in several annoying warnings. The patch below takes care of
        > this problem (sorry that the patch is not in the usual format, but it
        > is so short that it didn't seem to matter too much).
        >
        > Björn
        >
        >
        > diff --git a/src/os_mac.h b/src/os_mac.h
        > index 7a54ee5..aae08bf 100644
        > --- a/src/os_mac.h
        > +++ b/src/os_mac.h
        > @@ -268,9 +268,6 @@
        > */
        >
        > #ifdef MACOS_X_UNIX
        > -# define SIGPROTOARG (int)
        > -# define SIGDEFARG(s) (s) int s;
        > -# define SIGDUMMYARG 0
        > # undef HAVE_AVAIL_MEM
        > # ifndef HAVE_CONFIG_H
        > # define RETSIGTYPE void

        I think these were there for a reason. To stay on the safe side, does
        it work like this:

        #ifndef SIGPROTOARG
        # define SIGPROTOARG (int)
        #endif
        #ifndef SIGDEFARG
        # define SIGDEFARG(s) (s) int s;
        #endif
        #ifndef SIGDUMMYARG
        # define SIGDUMMYARG 0
        #endif

        --
        Apparently, 1 in 5 people in the world are Chinese. And there are 5
        people in my family, so it must be one of them. It's either my mum
        or my dad. Or my older brother Colin. Or my younger brother
        Ho-Cha-Chu. But I think it's Colin.

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ download, build and distribute -- http://www.A-A-P.org ///
        \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_dev" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      Your message has been successfully submitted and would be delivered to recipients shortly.