RFR: 8303764: sunmscapi.dll cannot compile under permissive-

Julian Waters jwaters at openjdk.org
Thu Mar 9 08:33:11 UTC 2023


On Wed, 8 Mar 2023 14:46:55 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:

>> permissive- is a pretty big problem for Windows code in general, in particular our very jint and jlong typedefs themselves on Windows are completely broken on Windows and compiling with permissive- will straight up make the entire JDK explode. Change here is particular is a small part of a much bigger (JDK wide) fix, if that's what you meant by it happening in other files. I'm not sure if the code here could be redefined as a jchar from the start though, should I give it a try?
>
> Hi @TheShermanTanker What complier are you using? What command line?
> 
> `security.cpp` compiles just fine with `-permissive-` here, both debug and release. I'm using this compiler:
> 
>>cl.exe
> Microsoft (R) C/C++ Optimizing Compiler Version 19.33.31629 for x64
> Copyright (C) Microsoft Corporation.  All rights reserved.
> 
> you can find the cmdline under support/native/jdk.crypto.mscapi/libsunmscapi.

@djelinski After quite some time I think I know what the problem is: My fork is somehow missing the -Zc:wchar_t- flag in the configure script, and it's not because of the permissive- flag as I had initially though. Is there a reason we do this though? Barring this particular file it seems like the rest of the JDK compiles fine with it on my end. Maybe I could change this Pull Request to a build one instead of just a security-libs one in that case?

-------------

PR: https://git.openjdk.org/jdk/pull/12907



More information about the security-dev mailing list