-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eliminate WIN3264 macro instead of MSWIN #3932
Conversation
We use the existing WIN3264 macro instead.
Codecov Report
@@ Coverage Diff @@
## master #3932 +/- ##
==========================================
- Coverage 79.13% 79.13% -0.01%
==========================================
Files 105 105
Lines 141110 141110
==========================================
- Hits 111670 111667 -3
- Misses 29440 29443 +3
Continue to review full report at Codecov.
|
We use the existing WIN3264 macro instead.
We could do it the other way around, use MSWIN instead of WIN3264.
It's shorter and easier to read.
We can probably also use MSWIN instead of WIN32. There is an OR operation on
WIN32 and _WIN64, but I guess that when _WIN64 is defined WIN32 also is
defined.
So I think we can just use MSWIN nearly everywhere, and only use _WIN64 where
it really has to be the 64 bit version. All the rest works for both 32 and 64
bit MS-Windows.
…--
The MS-Windows registry is no more hostile than any other bunch of state
information... that is held in a binary format... a format that nobody
understands... and is replicated and cached in a complex and largely
undocumented way... and contains large amounts of duplicate and obfuscated
information... (Ben Peterson)
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|
Eliminate WIN3264 instead of MSWIN. We use MSWIN macro.
|
@mattn Thanks! This microsoft site is written as follows.
This means that the definition below is fine, right? #ifdef _WIN32
# define MSWIN
#endif Then, we can replace the part directly referencing |
I thought that defining Using |
Bram's comment:
Okay, let's use BTW, we have also |
Bram's comment:
https://groups.google.com/d/msg/vim_dev/XsEQZnQr8Ck/StHpy92xAwAJ
> It is best to separate the dependency on the compiler and Makefile from
> what we use throughout Vim code. "MSWIN" is the easiest to understand
> for all builds on MS-Windows. Then we can define it in one place in
> vim.h, depending on _WIN32 or WIN32 (WIN32 is defined in all the
> MS-Windows makefiles).
>
> We can keep using _WIN64 for 64-bit specific code.
Okay, let's use `MSWIN` and `_WIN64`.
There is a part which uses `WIN64` in `evalfunc.c`. It can be removed then.
BTW, we have also `FEAT_GUI_W32` and `FEAT_GUI_MSWIN`.
`FEAT_GUI_W32` is defined in the makefiles, and `FEAT_GUI_MSWIN` is defined in `vim.h`.
What do you think of this? Using `FEAT_GUI_MSWIN` is better?
Yes, since it's also used for 64-bit Windows, thus the "32" part is
confusing. I suppose FEAT_GUI is defined, so we can make it:
#if defined(FEAT_GUI) && defined(MSWIN)
# define FEAT_GUI_MSWIN
#endif
And remove other places where FEAT_GUI_MSWIN is defined.
…--
System administrators are just like women: You can't live with them and you
can't live without them.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|
All right. Thank you! -- |
I have a question. |
Recent versions of Visual Studio cannot open |
Yes. We need |
Use FEAT_MSWIN instead of _WIN32, WIN32 and WIN3264. Use FEAT_GUI_MSWIN instead of FEAT_GUI_W32.
Let me know when this is ready to include. |
My work has been completed, but the impact range is large, |
@mattn, @ntak and Windows developers: Reason: |
Hmm, you defined |
s/FEAT_MSWIN/MSWIN/ |
Thank you for your advice. |
Problem: Macros for MS-Windows are inconsistent, using "32", "3264 and others. Solution: Use MSWIN for all MS-Windows builds. Use FEAT_GUI_MSWIN for the GUI build. (Hirohito Higashi, closes vim/vim#3932) vim/vim@4f97475
Problem: Macros for MS-Windows are inconsistent, using "32", "3264 and others. Solution: Use MSWIN for all MS-Windows builds. Use FEAT_GUI_MSWIN for the GUI build. (Hirohito Higashi, closes vim/vim#3932) vim/vim@4f97475
Problem: Macros for MS-Windows are inconsistent, using "32", "3264 and others. Solution: Use MSWIN for all MS-Windows builds. Use FEAT_GUI_MSWIN for the GUI build. (Hirohito Higashi, closes vim/vim#3932) vim/vim@4f97475
Problem: Macros for MS-Windows are inconsistent, using "32", "3264 and others. Solution: Use MSWIN for all MS-Windows builds. Use FEAT_GUI_MSWIN for the GUI build. (Hirohito Higashi, closes vim/vim#3932) vim/vim@4f97475
Problem: Macros for MS-Windows are inconsistent, using "32", "3264 and others. Solution: Use MSWIN for all MS-Windows builds. Use FEAT_GUI_MSWIN for the GUI build. (Hirohito Higashi, closes vim/vim#3932) vim/vim@4f97475
Problem: Macros for MS-Windows are inconsistent, using "32", "3264 and others. Solution: Use MSWIN for all MS-Windows builds. Use FEAT_GUI_MSWIN for the GUI build. (Hirohito Higashi, closes vim/vim#3932) vim/vim@4f97475
Problem: Macros for MS-Windows are inconsistent, using "32", "3264 and others. Solution: Use MSWIN for all MS-Windows builds. Use FEAT_GUI_MSWIN for the GUI build. (Hirohito Higashi, closes vim/vim#3932) vim/vim@4f97475
Problem: Macros for MS-Windows are inconsistent, using "32", "3264 and others. Solution: Use MSWIN for all MS-Windows builds. Use FEAT_GUI_MSWIN for the GUI build. (Hirohito Higashi, closes vim/vim#3932) vim/vim@4f97475
) Problem: Macros for MS-Windows are inconsistent, using "32", "3264 and others. Solution: Use MSWIN for all MS-Windows builds. Use FEAT_GUI_MSWIN for the GUI build. (Hirohito Higashi, closes vim/vim#3932) vim/vim@4f97475
We use the existing WIN3264 macro instead.Define
FEAT_MSWIN
andFEAT_GUI_MSWIN
.Use
FEAT_MSWIN
MSWIN
instead of_WIN32
,WIN32
andWIN3264
.Use
FEAT_GUI_MSWIN
instead ofFEAT_GUI_W32
.