#1074 and #1057 Fixing build breakers on Cygwin and msvc MinGW to be further investigaged. add checkSum to test functions
This commit is contained in:
parent
5cf87e19dd
commit
d7463fd114
@ -1253,7 +1253,7 @@ namespace Action {
|
||||
|
||||
// -i{tgt}- reading from stdin?
|
||||
Exiv2::DataBuf stdIn;
|
||||
bool bStdin = Params::instance().target_ | Params::ctStdInOut;
|
||||
bool bStdin = (Params::instance().target_ & Params::ctStdInOut)?true:false;
|
||||
if ( bStdin ) Params::instance().getStdin(stdIn);
|
||||
|
||||
if ( rc == 0 && !(Params::instance().target_ & Params::ctXmpRaw)
|
||||
|
||||
@ -325,7 +325,7 @@ namespace Exiv2 {
|
||||
if (hKernel) {
|
||||
GetFileInformationByHandle_t pfcn_GetFileInformationByHandle = (GetFileInformationByHandle_t)GetProcAddress(hKernel, "GetFileInformationByHandle");
|
||||
if (pfcn_GetFileInformationByHandle) {
|
||||
BY_HANDLE_FILE_INFORMATION fi = {0};
|
||||
BY_HANDLE_FILE_INFORMATION fi = {0,0,0,0,0,0,0,0,0,0,0,0,0};
|
||||
if (pfcn_GetFileInformationByHandle(hFd, &fi)) {
|
||||
nlink = fi.nNumberOfLinks;
|
||||
}
|
||||
|
||||
@ -359,7 +359,7 @@ public:
|
||||
if ( stdinBuf.size_ == 0 ) {
|
||||
#if defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW__) || defined(_MSC_VER)
|
||||
DWORD fdwMode;
|
||||
_setmode(_fileno(stdin), O_BINARY);
|
||||
_setmode(fileno(stdin), O_BINARY);
|
||||
if ( !GetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), &fdwMode) ) { // failed: stdin has bytes!
|
||||
#else
|
||||
// http://stackoverflow.com/questions/34479795/make-c-not-wait-for-user-input/34479916#34479916
|
||||
|
||||
@ -202,9 +202,9 @@ STRUCTURE OF JPEG FILE: Reagan.jpg
|
||||
25635 | 0xffdd DRI | 4
|
||||
25641 | 0xffc4 DHT | 418
|
||||
26061 | 0xffda SOS
|
||||
MD5 (reagan_1.icc) = 264d91010fb585eeae33a8eeeaa0495f
|
||||
MD5 (reagan_2.icc) = 264d91010fb585eeae33a8eeeaa0495f
|
||||
MD5 (small_1.icc) = 75e766757c564c6c4305be96914ea923
|
||||
MD5 (small_2.icc) = 75e766757c564c6c4305be96914ea923
|
||||
MD5 (big_1.icc) = 1cb491b91a36649ef694c20f493e5d55
|
||||
MD5 (big_2.icc) = 1cb491b91a36649ef694c20f493e5d55
|
||||
264d91010fb585eeae33a8eeeaa0495f
|
||||
264d91010fb585eeae33a8eeeaa0495f
|
||||
75e766757c564c6c4305be96914ea923
|
||||
75e766757c564c6c4305be96914ea923
|
||||
1cb491b91a36649ef694c20f493e5d55
|
||||
1cb491b91a36649ef694c20f493e5d55
|
||||
|
||||
@ -414,6 +414,14 @@ copyVideoFiles ()
|
||||
popd 2>/dev/null >/dev/null
|
||||
}
|
||||
|
||||
##
|
||||
# print checksum for one file
|
||||
checkSum()
|
||||
{
|
||||
# cygwin checksum: http://esrg.sourceforge.net/utils_win_up/md5sum/
|
||||
md5 $1 | cut -d= -f 2 | sed -E -e 's/ //g' | cut '-d(' -f 1
|
||||
}
|
||||
|
||||
##
|
||||
# prepare temp files and other variables
|
||||
prepareTest()
|
||||
|
||||
@ -42,15 +42,14 @@ test2120() # --comment and -dc clobbered by writing ICC/JPG
|
||||
runTest exiv2 -eC --force $filename
|
||||
mv $iccname_ small_2.icc
|
||||
test2120
|
||||
|
||||
|
||||
|
||||
printf "md5 " >&3
|
||||
|
||||
for f in reagan small big; do for i in 1 2; do
|
||||
md5 ${f}_${i}.icc
|
||||
checkSum ${f}_${i}.icc
|
||||
done ; done
|
||||
|
||||
|
||||
|
||||
) 3>&1 > $results 2>&1
|
||||
|
||||
printf "\n"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user