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

Re: Patch 6.2.138 (extra)

Expand Messages
  • Walter Briscoe
    In message of Thu, 30 Oct 2003 12:15:29 in , Bram Moolenaar writes [snip] ... That suits me.
    Message 1 of 4 , Oct 30, 2003
    • 0 Attachment
      In message <200310301115.h9UBFTAw001106@...> of Thu, 30 Oct
      2003 12:15:29 in , Bram Moolenaar <Bram@...> writes

      [snip]

      >I am aware of your alternate solution. But it uses different mechanisms
      >that I don't understand. It would require much more testing on various
      >systems. After all, the original problem was that the code worked fine
      >on one system and didn't compile on another.
      >
      >The solution in patch 6.2.138 is straightforward and has been tested.
      >If there is no problem with this code I don't see a good reason to
      >change it again.
      >

      That suits me. Jim, does the following fix vim for you? I am afraid you
      will have to apply it by hand as you lack a patch program. Start at the
      bottom of the patch and work upwards. If this is too much, let me know
      privately and I will email it to you.

      Patch 6.2.138 (extra)
      Problem: Compilation problem on VMS with dynamic buffer on the stack.
      Solution: Read one byte less than the size of the buffer, so that we can
      check for the string length without an extra buffer.
      Files: src/os_vms.c


      *** ../vim-6.2.137/src/os_vms.c Sun May 4 22:44:43 2003
      --- src/os_vms.c Mon Oct 20 20:00:01 2003
      ***************
      *** 299,305 ****
      int
      vms_read(char *inbuf, size_t nbytes)
      {
      - char ibuf[nbytes];
      int status, function, len;
      float wait = 0.05;
      TT_MODE tt_mode;
      --- 298,303 ----
      ***************
      *** 309,325 ****
      tt_mode = get_tty();

      function = (IO$_READLBLK | IO$M_NOECHO | IO$M_TIMED | IO$M_ESCAPE);
      ! memset(ibuf, 0, sizeof(ibuf));

      while (1)
      {
      ! status = sys$qiow(0,iochan,function,&iosb,0,0,&ibuf,nbytes,0,0,0,0);
      ! len = strlen(ibuf);
      if (len > 0)
      - {
      - mch_memmove(inbuf, ibuf, len);
      break;
      - }
      lib$wait(&wait);
      }
      return len;
      --- 307,320 ----
      tt_mode = get_tty();

      function = (IO$_READLBLK | IO$M_NOECHO | IO$M_TIMED | IO$M_ESCAPE);
      ! memset(inbuf, 0, nbytes);

      while (1)
      {
      ! status = sys$qiow(0,iochan,function,&iosb,0,0,inbuf,nbytes-1,0,0,0,0);
      ! len = strlen(inbuf);
      if (len > 0)
      break;
      lib$wait(&wait);
      }
      return len;
      *** ../vim-6.2.137/src/version.c Wed Oct 29 14:37:09 2003
      --- src/version.c Wed Oct 29 14:38:52 2003
      ***************
      *** 639,640 ****
      --- 639,642 ----
      { /* Add new patch number below this line */
      + /**/
      + 138,
      /**/
      --
      Walter Briscoe
    Your message has been successfully submitted and would be delivered to recipients shortly.