Commit 549b5df2 authored by Alexander Alekhin's avatar Alexander Alekhin

build: workaround issues with C compilation mode

- cvdef.h + cvRound (double only)
- highgui_c.h
parent 58d28061
...@@ -480,7 +480,7 @@ Cv64suf; ...@@ -480,7 +480,7 @@ Cv64suf;
// Integer types portatibility // Integer types portatibility
#ifdef OPENCV_STDINT_HEADER #ifdef OPENCV_STDINT_HEADER
#include OPENCV_STDINT_HEADER #include OPENCV_STDINT_HEADER
#else #elif defined(__cplusplus)
#if defined(_MSC_VER) && _MSC_VER < 1600 /* MSVS 2010 */ #if defined(_MSC_VER) && _MSC_VER < 1600 /* MSVS 2010 */
namespace cv { namespace cv {
typedef signed char int8_t; typedef signed char int8_t;
...@@ -517,9 +517,15 @@ typedef ::int64_t int64_t; ...@@ -517,9 +517,15 @@ typedef ::int64_t int64_t;
typedef ::uint64_t uint64_t; typedef ::uint64_t uint64_t;
} }
#endif #endif
#else // pure C
#include <stdint.h>
#endif #endif
//! @} //! @}
#ifndef __cplusplus
#include "opencv2/core/fast_math.hpp" // define cvRound(double)
#endif
#endif // OPENCV_CORE_CVDEF_H #endif // OPENCV_CORE_CVDEF_H
...@@ -135,8 +135,10 @@ CVAPI(int) cvNamedWindow( const char* name, int flags CV_DEFAULT(CV_WINDOW_AUTOS ...@@ -135,8 +135,10 @@ CVAPI(int) cvNamedWindow( const char* name, int flags CV_DEFAULT(CV_WINDOW_AUTOS
CVAPI(void) cvSetWindowProperty(const char* name, int prop_id, double prop_value); CVAPI(void) cvSetWindowProperty(const char* name, int prop_id, double prop_value);
CVAPI(double) cvGetWindowProperty(const char* name, int prop_id); CVAPI(double) cvGetWindowProperty(const char* name, int prop_id);
#ifdef __cplusplus // FIXIT remove in OpenCV 4.0
/* Get window image rectangle coordinates, width and height */ /* Get window image rectangle coordinates, width and height */
CVAPI(cv::Rect)cvGetWindowImageRect(const char* name); CVAPI(cv::Rect)cvGetWindowImageRect(const char* name);
#endif
/* display image within window (highgui windows remember their content) */ /* display image within window (highgui windows remember their content) */
CVAPI(void) cvShowImage( const char* name, const CvArr* image ); CVAPI(void) cvShowImage( const char* name, const CvArr* image );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment