Open marcusmueller opened 6 years ago
Full list of files to check, because they don't contain the "This file is part of GNU Radio" string:
cmake/msvc/config.h @guruofquality cmake/msvc/sys/time.h @guruofquality cmake/msvc/unistd.h @guruofquality do you remember where these files are from?
cmake/msvc/config.h: I made this one for gnuradio. We can delete all of the #if _MSC_VER < 1800
at this point. That would make it a lot smaller
cmake/msvc/sys/time.h: Its from a microsoft forum (like https://social.msdn.microsoft.com/Forums/vstudio/en-US/430449b3-f6dd-4e18-84de-eebd26a8d668/gettimeofday?forum=vcgeneral) Its sort of a go to gettimeofday implementation, a lot of projects use it like https://github.com/LibVNC/libvncserver/blob/master/compat/msvc/sys/time.h But I would be partial to using std::chrono these days :-)
cmake/msvc/unistd.h: I made this one for gnuradio. I would rather delete it and just conditionally include <process.h>
in the one or two files that need it. And include guard/remove many of the <unistd.h>
throughout the code. Being an OS specific header and all.
For now, I'll say that as a quickfix, we'll just declare msvc/unistd.h
as "not a problem", as it arguably contains any significant code, and can easily be GPL'ed & assigned to FSF now that we know it's yours; generally, I agree: we should be looking into the unistd.h
usage globally - if it's really just the same as process.h
wherever it's included on windows, I wonder whether we're using correctly on *nix.
time.h would worry me a lot, but then: we're not using gettimeofday anywhere sensible; thus: we'll just remove that.
Oh, and config.h without any MSC_VER < 1800 basically only contains non-threadsafe libc (s)random()
, which we need to get rid of, in any case, and ssize_t
seems to be declared in other headers, specifically BaseTsd.h. With that, config.h boils down to
#include <BaseTsd>
#ifndef __cplusplus
# define inline __inline
#endif
which is much easier on the eye.
Let's get this over with after we do the next merge and formatting patch. There's anyway a lot of code to be purged in 3.8.
The goalpost of this has changed with the DCO, technically, but de facto we're as reliant on our tree being clean copyright-wise.
@marcusmueller do you just want a PR to delete these 3 compatibility header files and make sure everything compiles? It shouldnt be a big deal. have a decent visual studio development environment ready to go.
Remains a valid problem, and might need to be revisited. Much easier now with SPDX!
1585 demonstrates this might be a good idea. Things to check (please edit this and add if you find more. I will not close this issue before we know the origin of all files we use):