Commit 9563e445 authored by Jean-Paul Saman's avatar Jean-Paul Saman

misc/test_dr: Allow building with mingw32

parent 7c9e7480
...@@ -20,7 +20,11 @@ ...@@ -20,7 +20,11 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* *
*****************************************************************************/ *****************************************************************************/
#ifdef WIN32
# define PRI64d "I64u"
#else
# define PRI64d "llu"
#endif
#define BOZO_VARS(sname) \ #define BOZO_VARS(sname) \
int i_err = 0; \ int i_err = 0; \
...@@ -33,7 +37,7 @@ ...@@ -33,7 +37,7 @@
#define BOZO_DOJOB(fname) \ #define BOZO_DOJOB(fname) \
if(!(i_loop_count & 0xffff)) \ if(!(i_loop_count & 0xffff)) \
fprintf(stdout, "\r iteration count: %22llu", i_loop_count); \ fprintf(stdout, "\r iteration count: %22"PRI64d, i_loop_count); \
i_loop_count++; \ i_loop_count++; \
p_descriptor = dvbpsi_Gen##fname##Dr(&s_decoded, 0); \ p_descriptor = dvbpsi_Gen##fname##Dr(&s_decoded, 0); \
p_new_decoded = dvbpsi_Decode##fname##Dr(p_descriptor); p_new_decoded = dvbpsi_Decode##fname##Dr(p_descriptor);
...@@ -67,7 +71,7 @@ ...@@ -67,7 +71,7 @@
s_decoded.name <<= 1; \ s_decoded.name <<= 1; \
} while(!i_err \ } while(!i_err \
&& (++i < bitcount)); \ && (++i < bitcount)); \
fprintf(stdout, "\r iteration count: %22llu", i_loop_count); \ fprintf(stdout, "\r iteration count: %22"PRI64d, i_loop_count); \
if(i_err) \ if(i_err) \
fprintf(stdout, " FAILED !!!\n"); \ fprintf(stdout, " FAILED !!!\n"); \
else \ else \
...@@ -77,7 +81,7 @@ ...@@ -77,7 +81,7 @@
#define BOZO_check_integer(name, bitcount) \ #define BOZO_check_integer(name, bitcount) \
if(!i_err && (s_decoded.name != p_new_decoded->name)) \ if(!i_err && (s_decoded.name != p_new_decoded->name)) \
{ \ { \
fprintf(stderr, "\nError: integer %s %llu -> %llu\n", #name, \ fprintf(stderr, "\nError: integer %s %"PRI64d" -> %"PRI64d"\n", #name, \
(long long unsigned int)s_decoded.name, \ (long long unsigned int)s_decoded.name, \
(long long unsigned int)p_new_decoded->name); \ (long long unsigned int)p_new_decoded->name); \
i_err = 1; \ i_err = 1; \
...@@ -100,7 +104,7 @@ ...@@ -100,7 +104,7 @@
#define BOZO_end_boolean(name) \ #define BOZO_end_boolean(name) \
s_decoded.name += 12; \ s_decoded.name += 12; \
} while(!i_err && (s_decoded.name <= 12)); \ } while(!i_err && (s_decoded.name <= 12)); \
fprintf(stdout, "\r iteration count: %22llu", i_loop_count); \ fprintf(stdout, "\r iteration count: %22"PRI64d, i_loop_count); \
if(i_err) \ if(i_err) \
fprintf(stdout, " FAILED !!!\n"); \ fprintf(stdout, " FAILED !!!\n"); \
else \ else \
...@@ -116,4 +120,3 @@ ...@@ -116,4 +120,3 @@
s_decoded.name, p_new_decoded->name); \ s_decoded.name, p_new_decoded->name); \
i_err = 1; \ i_err = 1; \
} }
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