Skip to content

Commit

Permalink
Make sure Windows pointers are still 32-bit
Browse files Browse the repository at this point in the history
  • Loading branch information
ibmmqmet committed Jul 11, 2019
1 parent b4c6395 commit ebf6db5
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,6 @@ Mar 2019 (v5.1.0)

Apr 2019 (v5.1.1)
* The 912 changes broke QJST printing

Jul 2019 (v5.1.2)
* Make sure Windows program pointer sizes are correct
Binary file modified bin/aix/convH
Binary file not shown.
Binary file modified bin/aix/mqsmfcsv
Binary file not shown.
Binary file modified bin/linux/mqsmfcsv
Binary file not shown.
Binary file modified bin/win/mqsmfcsv.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion src/M
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ else
flags="$flags $optim"
fi

export PLATFLAGS=$flags CC=$cc VERS=912
export PLATFLAGS=$flags CC=$cc VERS=913
make -e -f Makefile.unix $*

rm -f $targdir/convH $targdir/mqsmfcsv
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.gcc.win
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
CC=i686-w64-mingw32-gcc
CFLAGS= -I. -m32 -O2
PLATFLAGS=
VERS=912
VERS=913
SRC = mqsmf.c \
smfDDL.c \
smfDate.c \
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.win
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CFLAGS=-nologo /D_CRT_SECURE_NO_WARNINGS /Zp1 /J /O2
VERS=912
VERS=913
SRC = mqsmf.c \
smfDDL.c \
smfDate.c \
Expand Down
3 changes: 2 additions & 1 deletion src/m2017.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
rem This sets the environment for Visual Studio 2017
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build"\vcvarsall x86_amd64
rem Make sure we set up for a 32-bit program
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build"\vcvarsall x86
9 changes: 6 additions & 3 deletions src/mqsmf.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,13 +228,14 @@ int main( int argc, char *argv[] )
if ((sizeof(short) != 2) ||
(sizeof(long) != 4) ||
(sizeof(long long) != 8) ||
(sizeof(int *) != 4) ||
(sizeof(int) != 4))
{
fprintf(stderr,"Data type sizes do not match requirements.\n");
fprintf(stderr,"Need to rebuild program with correct options.\n");
fprintf(stderr,"Here: short=%d int=%d long=%d long long=%d bytes\n",
(int)sizeof(short), (int)sizeof(int), (int)sizeof(long), (int)sizeof(long long));
fprintf(stderr,"Need: short=%d int=%d long=%d long long=%d bytes\n",2,4,4,8);
fprintf(stderr,"Here: short=%d int=%d long=%d long long=%d ptr=%d bytes\n",
(int)sizeof(short), (int)sizeof(int), (int)sizeof(long), (int)sizeof(long long),(int)sizeof(int *));
fprintf(stderr,"Need: short=%d int=%d long=%d long long=%d ptr=%d bytes\n",2,4,4,8,4);
exit(1);
}

Expand Down Expand Up @@ -947,6 +948,8 @@ int main( int argc, char *argv[] )
{
p = &dataBuf[triplet[2].offset ];
printWTAS((wtas *)p);
/* The wtasstrt is 8 bytes but the following fields combine to */
/* make a default correlation token. */
memcpy(correlid,&((wtas *)p)->wtasstrt,16);

if (conv32(((wtas *)p)->wtaswqct) > 0)
Expand Down

0 comments on commit ebf6db5

Please sign in to comment.