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

55759Re: [patch] has("win64") returns 0 in 64-bit Vim

Expand Messages
  • Bram Moolenaar
    Jan 6, 2010
    • 0 Attachment
      Sergey Khorev wrote:

      > Hi,
      >
      > > In many places in the code _WIN64 is checked for, but the list for has()
      > > uses WIN64.
      > >
      > > Perhaps we should change them all to WIN64 to be consistent with WIN32,
      > > and then define WIN64 in vim.h when _WIN64 is defined.
      >
      > That will be inconsistent with WIN32 because it is defined in Makefile :)
      > What about changing all occurrences of _WIN64 to WIN64 and defining
      > WIN64 in makefile?
      >
      > On second thought, I don't like either ways. It seems more consistent
      > to change the single occurrence of WIN64 in eval.c to _WIN64. Anyway,
      > 64-bit binary returns 1 for has("win32") so we don't have to make
      > WIN64 to behave like another WIN32.

      The simplest would be to change the #ifdef:

      *** ../vim-7.2.325/src/eval.c 2009-12-31 13:18:05.000000000 +0100
      --- src/eval.c 2010-01-06 16:28:23.000000000 +0100
      ***************
      *** 11453,11459 ****
      #if defined(UNIX) && (defined(__CYGWIN32__) || defined(__CYGWIN__))
      "win32unix",
      #endif
      ! #ifdef WIN64
      "win64",
      #endif
      #ifdef EBCDIC
      --- 11453,11459 ----
      #if defined(UNIX) && (defined(__CYGWIN32__) || defined(__CYGWIN__))
      "win32unix",
      #endif
      ! #if defined(WIN64) || defined(_WIN64)
      "win64",
      #endif
      #ifdef EBCDIC


      Does that work without the change to the Makefile?

      --
      Where do you want to crash today?

      /// 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 ///
    • Show all 10 messages in this topic