Skip to content
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

Fix: Redefining HAVE_DUP at Python 3.11 #11484

Closed
wants to merge 1 commit into from

Conversation

ichizok
Copy link
Contributor

@ichizok ichizok commented Nov 1, 2022

Python 3.11 defines HAVE_DUP at pyconfig.h, so should set undef HAVE_DUP at if_python3.c to avoid redefining.

gcc -c -I. -I/usr/local/share/asdf/installs/python/3.11.0/include/python3.11 -pthread -DDYNAMIC_PYTHON3_DLL=\"libpython3.11.so.1.0\" -Iproto -DHAVE_CONFIG_H   -DWE_ARE_PROFILING
 -Wall -Wextra -Wshadow -Wno-unknown-pragmas -g -ggdb3 -O0  -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -Wall -Wextra -Wshadow -Werror -Wno-error=maybe-uninitialized
   -o objects/if_python3.o if_python3.c
In file included from /usr/local/share/asdf/installs/python/3.11.0/include/python3.11/Python.h:12,
                 from if_python3.c:69:
/usr/local/share/asdf/installs/python/3.11.0/include/python3.11/pyconfig.h:292: error: "HAVE_DUP" redefined [-Werror]
  292 | #define HAVE_DUP 1
      |
In file included from vim.h:244,
                 from if_python3.c:32:
os_unix.h:481: note: this is the location of the previous definition
  481 | # define HAVE_DUP               // have dup()
      |

@codecov
Copy link

codecov bot commented Nov 1, 2022

Codecov Report

Merging #11484 (6698219) into master (7a7db04) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master   #11484   +/-   ##
=======================================
  Coverage   81.82%   81.82%           
=======================================
  Files         162      162           
  Lines      189746   189746           
  Branches    43135    43135           
=======================================
+ Hits       155253   155268   +15     
+ Misses      21923    21906   -17     
- Partials    12570    12572    +2     
Flag Coverage Δ
huge-clang-none 82.73% <ø> (+<0.01%) ⬆️
huge-gcc-none 54.66% <ø> (+<0.01%) ⬆️
huge-gcc-testgui 53.10% <ø> (+<0.01%) ⬆️
huge-gcc-unittests 0.29% <ø> (ø)
linux 82.50% <ø> (+<0.01%) ⬆️
mingw-x64-HUGE 76.43% <ø> (+<0.01%) ⬆️
mingw-x86-HUGE 77.29% <ø> (+0.01%) ⬆️
windows 78.09% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/if_python3.c 74.03% <ø> (ø)
src/netbeans.c 72.30% <0.00%> (-0.15%) ⬇️
src/gui.c 72.82% <0.00%> (-0.10%) ⬇️
src/channel.c 83.72% <0.00%> (-0.09%) ⬇️
src/buffer.c 87.05% <0.00%> (-0.08%) ⬇️
src/gui_w32.c 37.17% <0.00%> (-0.08%) ⬇️
src/search.c 85.14% <0.00%> (-0.05%) ⬇️
src/term.c 73.82% <0.00%> (+0.14%) ⬆️
src/if_xcmdsrv.c 76.88% <0.00%> (+0.17%) ⬆️
src/message.c 78.95% <0.00%> (+0.22%) ⬆️
... and 3 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants