> I thought that unicows had to be linked as the first library, so I
> manually added -lunicows at the beginning of the LIBRARIES variable in
> apps/Makefile, after Configure had completed.

Great! Formally unicows should appear prior whatever it is supposed to
override. For example is doesn't have to appear prior -lcrypto or -lssl,
because they don't export any symbols unicows can override. Having it
absolutely first is simply best practice.

> You can see the gcc command for linking in the attached file
> "linking_unicows.gcc". I also tried passing the --verbose option to ld by
> adding -Wl,--verbose to CFLAGS. I think this also confirms unicows as
> the first library. I am attaching an extract from the log as
> "linking_unicows.details".

Looks fine.

> Attempting to run the openssl.exe file as
> openssl.exe version -a gives error messages similar to the previous one
> I reported, attached as "version.unicows". Of interest, the executable
> file doesn't show dependence on the unicows.dll. The dependencies on
> system dll's are:

No dependency on unicows.dll is expected. unicows.lib (or libunicows.a)
is not an "import" library for unicows.dll. It contains actual object
modules which explicitly load unicows.dll with LoadLibrary.

>>      else /*if (GetLastError()==ERROR_NO_UNICODE_TRANSLATION)*/
>>
>> I'm not suggesting this a fix, just trying to understand what happens
>> exactly.
> 
> This seems to make the problems go away. With this commented out, the
> application doesn't crash. Linking with libunicows does not appear
> necessary. For openssl.exe version -a, see the attached file
> "version.good".

I don't quite understand what happens if you do *not* uncomment and do
*not* link with unicows? As mentioned I'm not comfortable with removing
the above mentioned if clause, I'd rather adjust it. The fact that it
works is proof enough that it's actually MultiByteToWideChar that
returned 1004 and not wfopen. So could you test

        else if ((ret=GetLastError())==ERROR_NO_UNICODE_TRANSLATION
                || ret==ERROR_INVALID_FLAGS)

You'd have to add 'DWORD ret;' declaration after #ifdef _WIN32 in the
beginning of function. A.


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [email protected]

Reply via email to