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

Issues with patches 118, 124, 142

Expand Messages
  • Dany St-Amant
    Hi, just tried to compile Vim with Project Builder and it was a bumpy ride. Three patches have broken one thing each: -cannot find runtime find within the
    Message 1 of 9 , Feb 6 7:36 PM
    • 0 Attachment
      Hi,

      just tried to compile Vim with Project Builder and it was a bumpy ride.
      Three patches have broken one thing each:

      -cannot find runtime find within the source directory (6.2.124)
      -FEAT_GUI_MAC not define for non-Makefile user (6.2.142)
      -os_unix.c not included by os_macosx.c (6.2.118)

      For the runtime path, the code now trigger on the 'build' part to
      know if Vim.app should be remove or not. If the goal of the fix
      was to allow the runtime directory to reside side by side with the
      Contents folder within Vim.app, the patch still work as intended.

      For the two other issues, the code now rely on HAVE_CONFIG_H
      as a way to know whether or not the code is compiled from an IDE
      or from a Makefile. Didn't try the make. Any volunteer?

      Dany
    • Bram Moolenaar
      ... It sounds like you fixed these problems, but no patch was included... -- hundred-and-one symptoms of being an internet addict: 74. Your most erotic dreams
      Message 2 of 9 , Feb 7 4:16 AM
      • 0 Attachment
        Dany St-Amant wrote:

        > just tried to compile Vim with Project Builder and it was a bumpy ride.
        > Three patches have broken one thing each:
        >
        > -cannot find runtime find within the source directory (6.2.124)
        > -FEAT_GUI_MAC not define for non-Makefile user (6.2.142)
        > -os_unix.c not included by os_macosx.c (6.2.118)
        >
        > For the runtime path, the code now trigger on the 'build' part to
        > know if Vim.app should be remove or not. If the goal of the fix
        > was to allow the runtime directory to reside side by side with the
        > Contents folder within Vim.app, the patch still work as intended.
        >
        > For the two other issues, the code now rely on HAVE_CONFIG_H
        > as a way to know whether or not the code is compiled from an IDE
        > or from a Makefile. Didn't try the make. Any volunteer?

        It sounds like you fixed these problems, but no patch was included...

        --
        hundred-and-one symptoms of being an internet addict:
        74. Your most erotic dreams are about cybersex

        /// 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 ///
        \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///
      • Dany St-Amant
        For some reason the attachment didn t make it through. Back to plain cut and paste. ... diff -cr vim6.2.242/src/misc1.c vim62/src/misc1.c ... ***************
        Message 3 of 9 , Feb 7 6:07 AM
        • 0 Attachment
          For some reason the attachment didn't make it through.
          Back to plain cut and paste.

          Le samedi, 7 fév 2004, à 07:16 Canada/Eastern, Bram Moolenaar a écrit :

          >
          > Dany St-Amant wrote:
          >
          >> just tried to compile Vim with Project Builder and it was a bumpy
          >> ride.
          >> Three patches have broken one thing each:
          >>
          >> -cannot find runtime find within the source directory (6.2.124)
          >> -FEAT_GUI_MAC not define for non-Makefile user (6.2.142)
          >> -os_unix.c not included by os_macosx.c (6.2.118)
          >>
          >> For the runtime path, the code now trigger on the 'build' part to
          >> know if Vim.app should be remove or not. If the goal of the fix
          >> was to allow the runtime directory to reside side by side with the
          >> Contents folder within Vim.app, the patch still work as intended.
          >>
          >> For the two other issues, the code now rely on HAVE_CONFIG_H
          >> as a way to know whether or not the code is compiled from an IDE
          >> or from a Makefile. Didn't try the make. Any volunteer?
          >
          > It sounds like you fixed these problems, but no patch was included...
          >

          diff -cr vim6.2.242/src/misc1.c vim62/src/misc1.c
          *** vim6.2.242/src/misc1.c Fri Feb 6 19:46:59 2004
          --- vim62/src/misc1.c Fri Feb 6 21:58:05 2004
          ***************
          *** 20,25 ****
          --- 20,28 ----

          static char_u *vim_version_dir __ARGS((char_u *vimdir));
          static char_u *remove_tail __ARGS((char_u *p, char_u *pend, char_u
          *name));
          + #if defined(USE_EXE_NAME) && defined(MACOS_X)
          + static char_u *remove_tail_with_ext __ARGS((char_u *p, char_u *pend,
          char_u *name));
          + #endif
          static int get_indent_str __ARGS((char_u *ptr, int ts));
          static int copy_indent __ARGS((int size, char_u *src));

          ***************
          *** 3337,3342 ****
          --- 3340,3349 ----
          char_u *p;
          char_u *pend;
          int vimruntime;
          + #ifdef MACOS_X
          + char_u *pend1;
          + char_u *pend2;
          + #endif

          #if defined(OS2) || defined(MSDOS) || defined(MSWIN)
          /* use "C:/" when $HOME is not set */
          ***************
          *** 3408,3415 ****
          /* remove "build/..." from exe_name, if present */
          if (p == exe_name)
          {
          ! pend = remove_tail(p, pend, (char_u *)"Contents/MacOS");
          ! pend = remove_tail(p, pend, (char_u *)"build");
          }
          # endif
          /* remove "src/" from exe_name, if present */
          --- 3415,3427 ----
          /* remove "build/..." from exe_name, if present */
          if (p == exe_name)
          {
          ! pend1 = remove_tail(p, pend, (char_u
          *)"Contents/MacOS");
          ! pend2 = remove_tail_with_ext(p, pend1, (char_u *)".app");
          ! pend = remove_tail(p, pend2, (char_u *)"build");
          ! /* When runnig from project builder get rid of the
          ! * build/???.app, otherwise keep the ???.app */
          ! if (pend2 == pend)
          ! pend = pend1;
          }
          # endif
          /* remove "src/" from exe_name, if present */
          ***************
          *** 3554,3559 ****
          --- 3566,3595 ----
          return newend;
          return pend;
          }
          +
          + #if defined(USE_EXE_NAME) && defined(MACOS_X)
          + /*
          + * If the string between "p" and "pend" ends in "???.ext/", return
          "pend" minus
          + * the length of "???.ext/". Otherwise return "pend".
          + */
          + static char_u *
          + remove_tail_with_ext(p, pend, ext)
          + char_u *p;
          + char_u *pend;
          + char_u *ext;
          + {
          + int len = (int)STRLEN(ext) + 1;
          + char_u *newend = pend - len;
          +
          + if (newend >= p
          + && fnamencmp(newend, ext, len - 1) == 0)
          + for (;newend != p && !vim_ispathsep(*(newend -1)); newend--);
          +
          + if (newend == p || vim_ispathsep(*(newend - 1)))
          + return newend;
          + return pend;
          + }
          + #endif

          /*
          * Call expand_env() and store the result in an allocated string.
          diff -cr vim6.2.242/src/os_macosx.c vim62/src/os_macosx.c
          *** vim6.2.242/src/os_macosx.c Fri Feb 6 19:46:55 2004
          --- vim62/src/os_macosx.c Fri Feb 6 20:57:08 2004
          ***************
          *** 13,19 ****
          */

          #ifdef MACOS_X_UNIX
          ! # include "vim.h"
          #else
          # include "os_mac.c"
          # include <TextEncodingConverter.h>
          --- 13,23 ----
          */

          #ifdef MACOS_X_UNIX
          ! # ifdef HAVE_CONFIG_H
          ! # include "vim.h"
          ! # else
          ! # include "os_unix.c"
          ! # endif
          #else
          # include "os_mac.c"
          # include <TextEncodingConverter.h>
          diff -cr vim6.2.242/src/vim.h vim62/src/vim.h
          *** vim6.2.242/src/vim.h Fri Feb 6 19:46:59 2004
          --- vim62/src/vim.h Fri Feb 6 21:17:43 2004
          ***************
          *** 75,81 ****
          Error: To compile for both MACOS X and Classic use a Classic
          Carbon
          #endif

          !
          #if defined(FEAT_GUI_MOTIF) \
          || defined(FEAT_GUI_GTK) \
          || defined(FEAT_GUI_ATHENA) \
          --- 75,84 ----
          Error: To compile for both MACOS X and Classic use a Classic
          Carbon
          #endif

          ! /* Unless made through the Makefile enforce GUI on Mac */
          ! #if defined(MACOS) && !defined(HAVE_CONFIG_H)
          ! # define FEAT_GUI_MAC
          ! #endif
          #if defined(FEAT_GUI_MOTIF) \
          || defined(FEAT_GUI_GTK) \
          || defined(FEAT_GUI_ATHENA) \
        • Bram Moolenaar
          ... OK, got it now. I ll await for comments before including this. I see a few drasting changes, such as including os_unix.c. Hopefully the #ifdefs are
          Message 4 of 9 , Feb 7 7:19 AM
          • 0 Attachment
            Dany St-Amant wrote:

            > For some reason the attachment didn't make it through.
            > Back to plain cut and paste.

            OK, got it now. I'll await for comments before including this. I see a
            few drasting changes, such as including os_unix.c. Hopefully the
            #ifdefs are correct for other situations.

            --
            hundred-and-one symptoms of being an internet addict:
            75. You start wondering whether you could actually upgrade your brain
            with a Pentium Pro microprocessor 80. The upgrade works just fine.

            /// 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 ///
            \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///
          • Eckehard Berns
            ... Building with a Makefile went fine with this patch. I also tried my luck with Xcode and it also seems to build quite fine (I had to work around some
            Message 5 of 9 , Feb 7 10:15 AM
            • 0 Attachment
              > OK, got it now. I'll await for comments before including this. I see
              > a
              > few drasting changes, such as including os_unix.c. Hopefully the
              > #ifdefs are correct for other situations.

              Building with a Makefile went fine with this patch. I also tried my
              luck with Xcode and it also seems to build quite fine (I had to work
              around some problem with ResMerger by hand, but I guess that's the
              fault of Xcode maybe). I had some hard time looking why the Xcode
              Vim.app wouldn't find the runtime files, but that problem was due to my
              path layout. I have a separate build directory under ~/src/build. So
              the Xcode Vim.app (thus residing in ~/src/build/Vim.app) would first
              strip "Contents/MacOS", then "Vim.app", would then find the "build",
              strip it too, continues to the line where "src" is stripped for other
              versions of Vim and come up with my home dir :) Well, I don't think one
              should take precautions for my case...

              --
              Eckehard Berns
            • Dany St-Amant
              ... I never liked my original incarnation of os_macosx.c, which was mainly including either os_unix.c or os_mac.c. But Project Builder, doesn t provide an easy
              Message 6 of 9 , Feb 7 12:53 PM
              • 0 Attachment
                Le samedi, 7 fév 2004, à 10:19 Canada/Eastern, Bram Moolenaar a écrit :

                >
                > Dany St-Amant wrote:
                >
                >> For some reason the attachment didn't make it through.
                >> Back to plain cut and paste.
                >
                > OK, got it now. I'll await for comments before including this. I see
                > a
                > few drasting changes, such as including os_unix.c. Hopefully the
                > #ifdefs are correct for other situations.

                I never liked my original incarnation of os_macosx.c, which was mainly
                including either os_unix.c or os_mac.c. But Project Builder, doesn't
                provide an easy way of including/excluding file based on some build
                option[1]. The other option I had thought about at the time was to
                wrap the
                entire os_unix.c (and os_mac.c) inside a #ifndef #endif but didn't
                sound
                better than what I finally shipped.

                [1] Project Builder allow something like this through Targets, but it
                would
                require one Target for each combo of option requiring file
                inclusion/exclusion
                (e.g.: Plain Vim, Vim with Perl, Vim with Python, Vim with Perl and
                Python)

                Dany
              • Benji Fisher
                ... Has this been made official yet? Do you want more testing first? --Benji Fisher
                Message 7 of 9 , Feb 19 5:31 AM
                • 0 Attachment
                  On Sat, Feb 07, 2004 at 04:19:04PM +0100, Bram Moolenaar wrote:
                  >
                  > Dany St-Amant wrote:
                  >
                  > > For some reason the attachment didn't make it through.
                  > > Back to plain cut and paste.
                  >
                  > OK, got it now. I'll await for comments before including this. I see a
                  > few drasting changes, such as including os_unix.c. Hopefully the
                  > #ifdefs are correct for other situations.

                  Has this been made official yet? Do you want more testing first?

                  --Benji Fisher
                • Bram Moolenaar
                  ... I have not heard anyone mention he tried the patch and it works... -- hundred-and-one symptoms of being an internet addict: 185. You order fast food over
                  Message 8 of 9 , Feb 19 6:07 AM
                  • 0 Attachment
                    Benji Fisher wrote:

                    > On Sat, Feb 07, 2004 at 04:19:04PM +0100, Bram Moolenaar wrote:
                    > >
                    > > Dany St-Amant wrote:
                    > >
                    > > > For some reason the attachment didn't make it through.
                    > > > Back to plain cut and paste.
                    > >
                    > > OK, got it now. I'll await for comments before including this. I see a
                    > > few drasting changes, such as including os_unix.c. Hopefully the
                    > > #ifdefs are correct for other situations.
                    >
                    > Has this been made official yet? Do you want more testing first?

                    I have not heard anyone mention he tried the patch and it works...

                    --
                    hundred-and-one symptoms of being an internet addict:
                    185. You order fast food over the Internet

                    /// 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 ///
                    \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///
                  • Eckehard Berns
                    ... I already replied to this one on Feb 7th. I tested the patch and it worked with a Makefile (without any problems) and with Xcode (with a few glitches). --
                    Message 9 of 9 , Feb 19 8:10 AM
                    • 0 Attachment
                      > > > > For some reason the attachment didn't make it through.
                      > > > > Back to plain cut and paste.
                      > > >
                      > > > OK, got it now. I'll await for comments before including this. I see a
                      > > > few drasting changes, such as including os_unix.c. Hopefully the
                      > > > #ifdefs are correct for other situations.
                      > >
                      > > Has this been made official yet? Do you want more testing first?
                      >
                      > I have not heard anyone mention he tried the patch and it works...

                      I already replied to this one on Feb 7th. I tested the patch and it
                      worked with a Makefile (without any problems) and with Xcode (with a few
                      glitches).

                      --
                      Eckehard Berns
                    Your message has been successfully submitted and would be delivered to recipients shortly.