summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorMarcus Müller <mmueller@gnuradio.org>2021-01-16 22:09:49 +0100
committerMartin Braun <martin@gnuradio.org>2021-02-23 14:28:30 +0100
commitf42166bba7dd3f4df5bc164473fcfe0880d057ef (patch)
tree76ddc783ab350e6a1e0706c51feaa4e8bc05a85a /cmake
parent499a09510db11c71178130af7e55ad7fc4db3c7d (diff)
MSVC: get rid of unused workaround headers
Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/msvc/config.h44
-rw-r--r--cmake/msvc/sys/time.h17
-rw-r--r--cmake/msvc/unistd.h7
3 files changed, 4 insertions, 64 deletions
diff --git a/cmake/msvc/config.h b/cmake/msvc/config.h
deleted file mode 100644
index ec307a8a1b..0000000000
--- a/cmake/msvc/config.h
+++ /dev/null
@@ -1,44 +0,0 @@
-#ifndef _MSC_VER // [
-#error "Use this header only with Microsoft Visual C++ compilers!"
-#endif // _MSC_VER ]
-
-#ifndef _MSC_CONFIG_H_ // [
-#define _MSC_CONFIG_H_
-
-////////////////////////////////////////////////////////////////////////
-// enable inline functions for C code
-////////////////////////////////////////////////////////////////////////
-#ifndef __cplusplus
-#define inline __inline
-#endif
-
-////////////////////////////////////////////////////////////////////////
-// rint functions
-////////////////////////////////////////////////////////////////////////
-#if _MSC_VER < 1800
-#include <math.h>
-static inline long lrint(double x) { return (long)(x > 0.0 ? x + 0.5 : x - 0.5); }
-static inline long lrintf(float x) { return (long)(x > 0.0f ? x + 0.5f : x - 0.5f); }
-static inline long long llrint(double x)
-{
- return (long long)(x > 0.0 ? x + 0.5 : x - 0.5);
-}
-static inline long long llrintf(float x)
-{
- return (long long)(x > 0.0f ? x + 0.5f : x - 0.5f);
-}
-static inline double rint(double x) { return (x > 0.0) ? floor(x + 0.5) : ceil(x - 0.5); }
-static inline float rintf(float x)
-{
- return (x > 0.0f) ? floorf(x + 0.5f) : ceilf(x - 0.5f);
-}
-#endif
-
-////////////////////////////////////////////////////////////////////////
-// random and srandom
-////////////////////////////////////////////////////////////////////////
-#include <stdlib.h>
-static inline long int random(void) { return rand(); }
-static inline void srandom(unsigned int seed) { srand(seed); }
-
-#endif // _MSC_CONFIG_H_ ]
diff --git a/cmake/msvc/sys/time.h b/cmake/msvc/sys/time.h
deleted file mode 100644
index df178d3039..0000000000
--- a/cmake/msvc/sys/time.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef _MSC_VER // [
-#error "Use this header only with Microsoft Visual C++ compilers!"
-#endif // _MSC_VER ]
-
-#ifndef _MSC_SYS_TIME_H_
-#define _MSC_SYS_TIME_H_
-
-#include < time.h >
-
-#if _MSC_VER < 1900
-struct timespec {
- time_t tv_sec; /*! \brief Seconds since 00:00:00 GMT, 1 January 1970 */
- long tv_nsec; /*! \brief Additional nanoseconds since tv_sec */
-};
-#endif
-
-#endif //_MSC_SYS_TIME_H_
diff --git a/cmake/msvc/unistd.h b/cmake/msvc/unistd.h
index de412e42a5..bb781160d7 100644
--- a/cmake/msvc/unistd.h
+++ b/cmake/msvc/unistd.h
@@ -1,10 +1,11 @@
+#ifndef _MSC_UNISTD_H_ // [
+#define _MSC_UNISTD_H_
#ifndef _MSC_VER // [
#error "Use this header only with Microsoft Visual C++ compilers!"
#endif // _MSC_VER ]
-#ifndef _MSC_UNISTD_H_ // [
-#define _MSC_UNISTD_H_
-
+// Just for getpid in the vmcircbuf classes
+// (at least as far as I can tell 2021)
#include <process.h>
#endif // _MSC_UNISTD_H_ ]