From: jiyong.min Date: Mon, 3 Feb 2020 06:48:18 +0000 (+0900) Subject: Imported Upstream version 2.0.4 into tizen X-Git-Tag: accepted/tizen/unified/20200211.055821~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8f6159039d5e4122b31be327e7917055425ee1aa;p=platform%2Fupstream%2Flibjpeg-turbo.git Imported Upstream version 2.0.4 into tizen Change-Id: I41e1133b9528230fec8fcab09527e822ff6a233e --- 8f6159039d5e4122b31be327e7917055425ee1aa diff --cc tjbench.c index 46e0e9d,13a5bde..5688bfc --- a/tjbench.c +++ b/tjbench.c @@@ -41,16 -42,7 +42,16 @@@ printf("ERROR in line %d while %s:\n%s\n", __LINE__, op, err); \ retval = -1; goto bailout; \ } + +#if _USE_PRODUCT_TV - #define _throwunix(m) { \ ++#define THROW_UNIX(m) { \ + char err_str[256]; \ + strerror_r(errno, err_str, 256); \ + _throw(m, err_str) \ +} +#else - #define _throwunix(m) _throw(m, strerror(errno)) + #define THROW_UNIX(m) THROW(m, strerror(errno)) +#endif char tjErrorStr[JMSG_LENGTH_MAX] = "\0", tjErrorMsg[JMSG_LENGTH_MAX] = "\0"; int tjErrorLine = -1, tjErrorCode = -1; diff --cc tjunittest.c index c543196,da7c6ff..4e1eb61 --- a/tjunittest.c +++ b/tjunittest.c @@@ -347,14 -348,8 +348,14 @@@ static void writeJPEG(unsigned char *jp FILE *file = fopen(filename, "wb"); if (!file || fwrite(jpegBuf, jpegSize, 1, file) != 1) { +#if _USE_PRODUCT_TV + char err_str[256]; + strerror_r(errno, err_str, 256); + printf("ERROR: Could not write to %s.\n%s\n", filename, err_str); +#else printf("ERROR: Could not write to %s.\n%s\n", filename, strerror(errno)); +#endif - bailout() + BAILOUT() } bailout: