shithub: openh264

Download patch

ref: e88348b76d917e03c4c38114456e32b328b8193c
parent: 56e5a110482c7f6358e9c0ae4ee1208e59acc56d
author: Martin Storsjö <[email protected]>
date: Fri Jan 24 05:29:27 EST 2014

Allow building tests on MSVC versions where stdint.h is missing

Of the supported MSVC versions, only 2008 actually is missing
stdint.h, it is included in MSVC since 2010.

--- a/test/BaseDecoderTest.h
+++ b/test/BaseDecoderTest.h
@@ -1,7 +1,7 @@
 #ifndef __BASEDECODERTEST_H__
 #define __BASEDECODERTEST_H__
 
-#include <stdint.h>
+#include "test_stdint.h"
 #include <limits.h>
 #include <fstream>
 #include "codec_api.h"
--- /dev/null
+++ b/test/test_stdint.h
@@ -1,0 +1,22 @@
+#ifndef TEST_STDINT_H
+#define TEST_STDINT_H
+
+#ifndef _MSC_VER
+
+#include <stdint.h>
+
+#else
+
+typedef signed char      int8_t  ;
+typedef unsigned char    uint8_t ;
+typedef short            int16_t ;
+typedef unsigned short   uint16_t;
+typedef int              int32_t ;
+typedef unsigned int     uint32_t;
+typedef __int64          int64_t ;
+typedef unsigned __int64 uint64_t;
+typedef short            int_least16_t;
+
+#endif
+
+#endif //TEST_STDINT_H
--- a/test/utils/BufferedData.h
+++ b/test/utils/BufferedData.h
@@ -3,7 +3,7 @@
 
 #include <stddef.h>
 #include <stdlib.h>
-#include <stdint.h>
+#include "../test_stdint.h"
 #include <algorithm>
 
 class BufferedData {