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

Review possible dead code around EXV_HAVE_MMAP #2223

Open
piponazo opened this issue Apr 29, 2022 · 2 comments
Open

Review possible dead code around EXV_HAVE_MMAP #2223

piponazo opened this issue Apr 29, 2022 · 2 comments
Labels
good first issue platforms Cygwin, MinGW, cross-compilation, NetBSD, FreeBSD etc

Comments

@piponazo
Copy link
Collaborator

In #2219 (comment) we discussed about the possibility of having some dead code in our codebase around the EXV_HAVE_MMAP definition:

As far as I can see we have the following preprocessor conditions:
```cpp
#if defined EXV_HAVE_MMAP && defined EXV_HAVE_MUNMAP
...
#elif defined WIN32 && !defined __CYGWIN__
...
#else
...  <-- This is the area where we could have dead code
#endif

We need to find out if there is any UNIX platform without the system header sys/mman.h. If it does not exist, we could consider certain areas of the codebase as dead-code and remove them.

@piponazo piponazo added platforms Cygwin, MinGW, cross-compilation, NetBSD, FreeBSD etc good first issue labels Apr 29, 2022
@kmilos
Copy link
Collaborator

kmilos commented Oct 25, 2022

See also #2387

@kevinbackhouse
Copy link
Collaborator

My proposal in #2387 is to put a #error in the "dead code" area. Super-easy to revert if it turns out that somebody needs that code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue platforms Cygwin, MinGW, cross-compilation, NetBSD, FreeBSD etc
Projects
None yet
Development

No branches or pull requests

3 participants