On 01/31/2011 07:33 PM, William A. Rowe Jr. wrote:
On 1/31/2011 12:17 PM, Mladen Turk wrote:

If we resist on using CRT stuff like strcpy_l/strcpy_s, _fstat64i32 and
other weirdness from contemporary CRTs, we'd be fine.

Actually most of those date back to msvcrt.dll or have been added over the
years.  I was rather shocked while researching the i64 stubs of zlib to find
that everything required is already in VC6/msvcrt.dll.


Sure. At my day job I'm using WinDDK7.1 which is VS2008 (_MSC_VER 15.0)
I had to create a stub for 3 missing exports (_getpid, _environ and _wenviron)
and beside hassle of linking with additional missing stub that comes
with DDK, it works perfectly.
I even have a batch file (well toolkit) that compiles a custom VC distribution
out of DDK and latest windows SDK.

Not saying this is necessary a solution for us, but there might
be problems with modules that use JNI, since JDK is build with VS 2003,
and of course with getenv/putenv at least.

Perhaps for well-known problematic stuff like getenv/putenv we
should use PostgreSQL approach for example [1].
They call _putenv on *all* in-proc MSVCRTnn.dll possibilities
so they all get the same environment.

[1] 
http://git.postgresql.org/gitweb?p=postgresql.git;a=blob_plain;f=src/port/win32env.c


Regards
--
^TM

Reply via email to