From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: insyde.com, ip: 210.71.195.42, mailfrom: tim.lewis@insyde.com) Received: from out01.hibox.biz (out01.hibox.biz [210.71.195.42]) by groups.io with SMTP; Wed, 04 Sep 2019 15:25:59 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2AXAwA6N3Bd/ww0GKxmGgEBAQEBAgE?= =?us-ascii?q?BAQEHAgEBAQGBZwKBFIFvjW6QO4c+hBOGC4F6CQEBAQEBAQEBAQgvAQGHFjw?= =?us-ascii?q?CDQILAQEFAQEBAQEGBIVYT4VZAh0BBVkFFlI/AQQeBYMTgR2vKwIxGgKFLoU?= =?us-ascii?q?EgTQBgWKMLIRhhRGFFgSUb15DlhQHlwMbjXUDinOmboF+gWJwgz0+kGiQNAE?= =?us-ascii?q?B?= X-IronPort-AV: E=Sophos;i="5.64,468,1559491200"; d="scan'208,217";a="42054623" Received: from unknown (HELO hb3-BKT202.hibox.biz) ([172.24.52.12]) by out01.hibox.biz with ESMTP; 05 Sep 2019 06:25:56 +0800 Received: from unknown (HELO hb3-BKT102.hibox.biz) ([172.24.51.12]) by hb3-BKT202.hibox.biz with ESMTP; 05 Sep 2019 06:25:55 +0800 Received: from unknown (HELO hb3-IN02.hibox.biz) ([172.24.12.12]) by hb3-BKT102.hibox.biz with ESMTP; 05 Sep 2019 06:25:55 +0800 X-Remote-IP: 172.24.136.144 X-Remote-Host: No hostname X-SBRS: None X-MID: 27798060 X-Auth-ID: tim.lewis@insyde.com X-EnvelopeFrom: tim.lewis@insyde.com hiBox-Sender: 1 Received: from unknown (HELO DESKTOPHG9V3E8) ([172.24.136.144]) by hb3-IN02.hibox.biz with ESMTP/TLS/AES256-SHA; 05 Sep 2019 06:25:54 +0800 From: "Tim Lewis" To: Subject: Q: StdLib and mappings Date: Wed, 4 Sep 2019 15:25:51 -0700 Message-ID: <00f001d5636f$b79c4850$26d4d8f0$@insyde.com> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AdVjbx3A2Pedim7XTN+u+MdQusaYZQ== Content-Type: multipart/alternative; boundary="----=_NextPart_000_00F1_01D56335.0B3E81C0" Content-Language: en-us ------=_NextPart_000_00F1_01D56335.0B3E81C0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit When using StdLib, I found that access and open have difficulty if the mapping name is not the same case as the mapping name in the path. I have traced this down to a line in DevSearch.c (line 68) if(wcsncmp(DevName, WorkNode->DevName, wcslen(WorkNode->DevName)) == 0) { It appears that (a) the shell itself does not make a distinction between cases (just try fs0: and FS0:) but (b) the StdLib does. I ran into this while porting an app that searches through the path environment variable (where they are all in caps) but open() kept failing because of this. The simple fix would be to use wcsncasecmp (which is listed in namespace.h) but that is not actually implemented. And the non-standard (but common) wcsnicmp is also not implemented. 1. Is my understanding correct here for mappings? 2. Is there another wide-character case-insensitive mapping function to use? Thanks, Tim ------=_NextPart_000_00F1_01D56335.0B3E81C0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

When using StdLib, I found that access and open have = difficulty if the mapping name is not the same case as the mapping name = in the path. I have traced this down to a line in DevSearch.c (line 68) =

 

  &n= bsp;       if(wcsncmp(DevNa= me, WorkNode->DevName, wcslen(WorkNode->DevName)) =3D=3D 0) = {

 

It appears that (a) the shell itself does not make a = distinction between cases (just try fs0: and FS0:) but (b) the StdLib = does.

 

I ran into this while porting an app that searches = through the path environment variable (where they are all in caps) but = open() kept failing because of this.

 

The simple = fix would be to use wcsncasecmp (which is listed in namespace.h) but = that is not actually implemented. And the non-standard (but common) = wcsnicmp is also not implemented.

 

  1. Is my understanding = correct here for mappings?
  2. Is there another = wide-character case-insensitive mapping function to = use?

 

Thanks,

 

Tim

------=_NextPart_000_00F1_01D56335.0B3E81C0--