Ben Schmidt wrote:

> [This copy contains the attachment. Also, I forgot to mention that
> simply changing the logic of preprocessing in, say, vim.h doesn't
> solve the problem. Features provided by the conflicting code are
> indeed needed together--you lose X functionality or MacRoman encoding
> functionality depending what is disabled, and there's no easy way to
> reconcile it by playing preprocessor games.]
> 
> Hi,
> 
> I recently had trouble compiling Vim on Mac OS X 10.4.9 with GTK2 GUI.
> As is mentioned in the Vim source, the X headers and Mac headers clash
> horribly. This means stuff has to be separated carefully into files
> that have X headers available and those that have Mac headers
> available, and they weren't quite sorted out right. The attached patch
> fixes it by moving code around:
> 
> - Moved from os_mac_conv.c to mac_gui.c and made static to that file:
> 
>    - mac_utf16_to_enc
>    - mac_enc_to_utf16
>    - mac_enc_to_cfstring
>    - mac_utf16_to_utf8
>    - mac_utf8_to_utf16

I suppose you had to do this because MACOS_CONVERT is defined.  Can't
you change vim.h not to define MACOS_CONVERT when building with GTK?

> - A chunk of code from option.c has also been moved to os_mac_conv.c
>    as 'mac_lang_init()'.
> 
> - And a preprocessor conditional in globals.h was changed so X headers
>    aren't expected when they aren't available.

This isn't quite right, Win32 also has the balloon eval functionality.
And GTK too, so how can you omit this?

> I thought it was the best of a bad bunch of options for fixing the issues.
> 
> It now compiles for me, configured with
> 
> ./configure --with-features=huge --enable-pythoninterp --enable-perlinterp
> --enable-rubyinterp --enable-tclinterp --enable-cscope --enable-gui=gtk2

What GTK did you install?

> It would be good to have this or a similar fix in the official distribution.

Only when I'm sure it doesn't break anything.

> Might this have an effect on MacVim, Bjorn, or vim-coco, Jiang (sorry
> if names wrong...memory is hazy)? If so, perhaps you could suggest a
> better solution?


-- 
ARTHUR:  Be quiet!
DENNIS:  --but by a two-thirds majority in the case of more--
ARTHUR:  Be quiet!  I order you to be quiet!
WOMAN:   Order, eh -- who does he think he is?
ARTHUR:  I am your king!
                                  The Quest for the Holy Grail (Monty Python)

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- 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
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui