Closed PeterCoghlan closed 8 years ago
Hi Fish,
Many thanks for your efforts on this one.
Unfortunately, it is still failing for me. MLOCK is now #defined as __noop.
In hmacros.h, for non-MSVC compilers which don't already have it defined, __noop(...) is #defined as "do{;}while(0)" which does not return a suitable value as required for:
VERIFY( MLOCK( &sysblk, sizeof( SYSBLK )) == 0);
(I am having different problems with noop in dbgtrace.h where I have simply removed it from #define ASSERT and #define TRACE for now. This shows up when compiling sr.c for example. I see it is also lurking in qeth.c but I am not compiling that at present. I can come up with a #define for noop which looks like it should work in dbgtrace.h and another which looks like it should work in hmalloc.h but I can't come up with one that would have a chance of working in both, hence my suggestion to #define MLOCK(a, b) as 0).
Oops! Missed that. Sorry. I'll try to get that fixed for you right away. Re-opening...
Should now be fixed by commit da69c7364d3d6a764a86e1ba4ca938a0c4276e50.
Peter? Can you confirm? Thanks.
Many thanks.
The mlock issue is fixed now. I can compile impl.c without having to hack at hmalloc.h.
The new definition of noop may be a problem in dbgtrace.h and/or qeth.c but it's no worse for me than it was before so I'll leave that one for another day. I presume that noone else but me will pick up the #define of noop in hstructs.h so there should be no need to worry about anyone else being affected by this?
I see there has been some further work on this and the problems which I had with dbgtrace.h which I briefly alluded to have now gone away. Thanks!
However, my mlock problem is back again:
VERIFY( MLOCK( &sysblk, sizeof( SYSBLK )) == 0);
....^ %CC-E-CALLNEEDSFUNC, In this statement, "0" is not a function. at line number 544 in file impl.c
Could "#define MLOCK 0" in hmalloc.h be changed to "#define MLOCK(a,b) 0" or "#define MLOCK(...) 0" or something similar?
Right, this is __noop gone berserk. Fish, are you fixing it?
(Oops!) Typo. Sorry about that. s/b/ fixed now. Please try again. Thanks.
It's working great now. Many thanks!
When compiling on my VMS system which does not have
mlock()
, I end up generating a call tomlock()
from impl.c. Then, at link time,mlock()
can't be found.In hmalloc.h, at line 314,
MLOCK
is #defined to bemlock
, regardless of whetherHAVE_MLOCK
is defined or not. The same appliesmunlock()
although the issue does not arise here asMUNLOCK()
is never invoked.The following patch work around the problem for me, although there may be a more elegant solution: