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

Re: USEBCOPY never defined

Expand Messages
  • Bram Moolenaar
    ... man bcopy: void bcopy(const void *src, void *dst, size_t len); man memmove: void * memmove(void *dst, const void *src, size_t len); The arguments are
    Message 1 of 2 , May 11, 2004
    • 0 Attachment
      Xavier de Gaye wrote:

      > I spotted this while trying to steal from Vim its handling of mch_memmove():
      >
      > In Vim62, configure.in: line 2261:
      >
      > dnl Check for memmove() before bcopy(), makes memmove() be used when both are
      > dnl present, fixes problem with incompatibility between Solaris 2.4 and 2.5.
      >
      > AC_TRY_RUN([#define mch_memmove(s,d,l) memmove(d,s,l) $bcopy_test_prog],
      > AC_DEFINE(USEMEMMOVE) AC_MSG_RESULT(memmove does),
      > AC_TRY_RUN([#define mch_memmove(s,d,l) bcopy(d,s,l) $bcopy_test_prog], <-- 2261
      > AC_DEFINE(USEBCOPY) AC_MSG_RESULT(bcopy does),
      > AC_TRY_RUN([#define mch_memmove(s,d,l) memcpy(d,s,l) $bcopy_test_prog],
      > AC_DEFINE(USEMEMCPY) AC_MSG_RESULT(memcpy does), AC_MSG_RESULT(no),
      > AC_MSG_ERROR(failed to compile test program)),
      > AC_MSG_ERROR(failed to compile test program)),
      > AC_MSG_ERROR(failed to compile test program))
      >
      >
      > After swapping the first two args of bcopy, line 2261 should be:
      >
      > AC_TRY_RUN([#define mch_memmove(s,d,l) bcopy(s,d,l) $bcopy_test_prog], <-- 2261
      > ^^^

      man bcopy:
      void bcopy(const void *src, void *dst, size_t len);

      man memmove:
      void * memmove(void *dst, const void *src, size_t len);

      The arguments are really swapped.

      --
      hundred-and-one symptoms of being an internet addict:
      244. You use more than 20 passwords.

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
      \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
    Your message has been successfully submitted and would be delivered to recipients shortly.