On 2010-9-29 22:33, Kai Tietz wrote:
>>>> On Wed, Sep 29, 2010 at 5:56 PM, JonY <jo...@users.sourceforge.net> wrote:
>>>>> As far as I know, this is not a bug. That comment means that it is
>>>>> available with Windows 7.
>>>>>
>>>>> Until its reimplemented in libmingwex, the proper fix would be not to
>>>>> call it if you expect your program to run on earlier versions of windows.
>>>>

No, this is not possible/acceptable. For example, the following code is very 
general:

# if HAVE_WCSNLEN
#  define local_wcsnlen wcsnlen
# else
static size_t
local_wcsnlen (const wchar_t *s, size_t maxlen)
{
  const wchar_t *ptr;

  for (ptr = s; maxlen > 0 && *ptr != (wchar_t) 0; ptr++, maxlen--)
    ;
  return ptr - s;
}
# endif

But since wcsnlen in both headers and libmsvrt.a, the autotools always
report 'yes, your target platform have wcsnlen' !!!

If we do not want to drop these symbols not in windows XP, we should declare:

mingw-64 maybe generate invalid dll/exe files on target platform older than 
windows 7.
Because these files maybe reference symbols only valid on windows 7, please 
check your
dll/exe files carefully after build.

> The only general solution for this would be that someone contributes
> an implementation for this function. So we don't dependent here. The
> only issue I see here is that this wcstrnlen possibly depends on
> internal undocumented stuff. I'll do some research for this.

Maybe there have another solution:

S1: the intersection of XP and 2k3 symbols in msvcrt.dll
S2: the intersection of VISTA and 2k8 symbols in msvcrt.dll
S3: the Windows 7 symbols in msvcrt.dll

libmsvcrt: S1
libvista:  (S2 - S1)
libwin7: (S3 - S1) or (S3 - S2)

If user want to use symbols in VISTA/2K8, they should put libvista in 
additional library list.
Then the generated files only valid on vista/2k8 or later is acceptable for 
these users.

If user want to use symbols in Windows 7, they should put libwin7 in additional 
library list.
Then the generated files only valid on Windows 7 or later is acceptable for 
these users.

Regards,
Dongsheng

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to