#define CK_ATTRIBUTE_NORETURN
#endif /* GCC 2.5 */
#include <sys/types.h>
+
/*
* Used to create the linker script for hiding lib-local symbols. Shall
* be put directly in front of the exported symbol.
*/
#define CK_EXPORT
+
/*
* Used for MSVC to create the export attribute
* CK_DLL_EXP is defined during the compilation of the library
* on the command line.
*/
#ifndef CK_DLL_EXP
-#define CK_DLL_EXP extern
+# if defined(_MSC_VER)
+# define CK_DLL_EXP __declspec(dllimport)
+# else
+# define CK_DLL_EXP extern
+# endif
#endif
+
/* check version numbers */
#define CHECK_MAJOR_VERSION (@CHECK_MAJOR_VERSION@)
#define CHECK_MINOR_VERSION (@CHECK_MINOR_VERSION@)
#define NULL ((void*)0)
#endif
+#if defined(_MSC_VER)
+#define pid_t int
+#endif
+
/**
* Type for a test case
*
*
* @since 0.9.3
*/
+#if !defined(_MSC_VER)
CK_DLL_EXP pid_t CK_EXPORT check_fork (void);
+#endif
/**
* Wait for the pid and exit.
*
* @since 0.9.3
*/
+#if !defined(_MSC_VER)
CK_DLL_EXP void CK_EXPORT
check_waitpid_and_exit (pid_t pid)
CK_ATTRIBUTE_NORETURN;
+#endif
#ifdef __cplusplus
CK_CPPEND
#include <WinSock2.h> /* struct timeval, API used in gettimeofday implementation */
#include <io.h> /* read, write */
#include <process.h> /* getpid */
+#include <BaseTsd.h> /* for ssize_t */
+typedef SSIZE_T ssize_t;
#endif /* _MSC_VER */
/* defines size_t */
if have_visibility_hidden
libcheck_visibility_args = ['-DCK_DLL_EXP=extern __attribute__ ((visibility ("default")))']
else
- libcheck_visibility_args = ['-DCK_DLL_EXP=extern']
+ if host_system == 'windows'
+ libcheck_visibility_args = ['-DCK_DLL_EXP=__declspec(dllexport)']
+ else
+ libcheck_visibility_args = ['-DCK_DLL_EXP=extern']
+ endif
endif
libcheck = static_library('check',
gst_check = shared_library('gstcheck-@0@'.format(apiversion),
gst_check_sources,
- c_args : gst_c_args,
+ c_args : gst_c_args + ['-DGST_EXPORTS'],
version : libversion,
soversion : soversion,
install : true,
subdir('controller')
subdir('net')
subdir('helpers')
-# FIXME: make check work on windows
-if host_machine.system() != 'windows'
subdir('check')
-endif
pkg_files = ['gstreamer-base',
'gstreamer-controller',
+ 'gstreamer-check',
'gstreamer-net',
'gstreamer'
]
-if host_machine.system() != 'windows'
- pkgconf.set('checklibdir', join_paths(meson.build_root(), gst_check.outdir()))
- pkg_files += ['gstreamer-check']
-endif
+pkgconf.set('checklibdir', join_paths(meson.build_root(), gst_check.outdir()))
foreach p : pkg_files
infile = p + '.pc.in'
subdir('benchmarks')
-# FIXME: make check work on windows
-if host_machine.system() != 'windows'
subdir('check')
-endif
if not get_option('disable_examples')
subdir('examples')
endif