From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ma1-aaemail-dr-lapp03.apple.com (ma1-aaemail-dr-lapp03.apple.com [17.171.2.72]) by mx.groups.io with SMTP id smtpd.web10.7982.1604024872890369754 for ; Thu, 29 Oct 2020 19:27:53 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@apple.com header.s=20180706 header.b=ImSkYxGG; spf=pass (domain: apple.com, ip: 17.171.2.72, mailfrom: afish@apple.com) Received: from pps.filterd (ma1-aaemail-dr-lapp03.apple.com [127.0.0.1]) by ma1-aaemail-dr-lapp03.apple.com (8.16.0.42/8.16.0.42) with SMTP id 09U2OPxA055025; Thu, 29 Oct 2020 19:27:46 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=from : content-type : mime-version : subject : date : references : to : in-reply-to : message-id; s=20180706; bh=v7kWoM8pUHnNwZDH2SYe01E32Q5el6BlWGGfcRKmI2k=; b=ImSkYxGGBIxtQnY6CjPoWogQifmMuR6q1TPI8E9dexAJ71ZhJJxwDR5qrONrVkeufqLZ hl8+DHcpJ26UbXusVTJ4PxOTH3Jv3g3lIdhmoRdn/Zvj0/fJedJWnmthBkgsiBMxktgP 7HYBuX163uk3nUW1jKVOqT8anLm9RPPV4k2JG5XkHL53zW91BAfJVbhgN1+U8L0eGyL2 YKD2EBC6g3wQ7KjQOh4zaCf1jlHVjY2vs33i6hY0gl7UMrDrVg/k7ZpyE0u8tT/4M3oJ aS3OF4FlHaWQBfEY5oStBpJUl1EYIbENXGgjVZxm9dKVhquYdDuCjGRwPQ7J6czGFQwN oQ== Received: from rn-mailsvcp-mta-lapp02.rno.apple.com (rn-mailsvcp-mta-lapp02.rno.apple.com [10.225.203.150]) by ma1-aaemail-dr-lapp03.apple.com with ESMTP id 34ck8wxaab-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Thu, 29 Oct 2020 19:27:46 -0700 Received: from rn-mailsvcp-mmp-lapp03.rno.apple.com (rn-mailsvcp-mmp-lapp03.rno.apple.com [17.179.253.16]) by rn-mailsvcp-mta-lapp02.rno.apple.com (Oracle Communications Messaging Server 8.1.0.6.20200729 64bit (built Jul 29 2020)) with ESMTPS id <0QIZ00EZ3TI9DX60@rn-mailsvcp-mta-lapp02.rno.apple.com>; Thu, 29 Oct 2020 19:27:45 -0700 (PDT) Received: from process_milters-daemon.rn-mailsvcp-mmp-lapp03.rno.apple.com by rn-mailsvcp-mmp-lapp03.rno.apple.com (Oracle Communications Messaging Server 8.1.0.6.20200729 64bit (built Jul 29 2020)) id <0QIZ00B00TEAQX00@rn-mailsvcp-mmp-lapp03.rno.apple.com>; Thu, 29 Oct 2020 19:27:45 -0700 (PDT) X-Va-A: X-Va-T-CD: 5e0eb0128cd4845aea4df6f143e2a033 X-Va-E-CD: df66502e155e8c18bafc524ebbb8b71a X-Va-R-CD: 731b2809dde838f438dabc6fde0477d4 X-Va-CD: 0 X-Va-ID: c69fe6ed-ae3d-4474-9134-27ddcc62ce89 X-V-A: X-V-T-CD: 5e0eb0128cd4845aea4df6f143e2a033 X-V-E-CD: df66502e155e8c18bafc524ebbb8b71a X-V-R-CD: 731b2809dde838f438dabc6fde0477d4 X-V-CD: 0 X-V-ID: 4dc95350-7a71-41fb-a918-85f380d41c02 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312,18.0.737 definitions=2020-10-29_12:2020-10-29,2020-10-29 signatures=0 Received: from [17.235.35.78] (unknown [17.235.35.78]) by rn-mailsvcp-mmp-lapp03.rno.apple.com (Oracle Communications Messaging Server 8.1.0.6.20200729 64bit (built Jul 29 2020)) with ESMTPSA id <0QIZ00WH8TI8GY00@rn-mailsvcp-mmp-lapp03.rno.apple.com>; Thu, 29 Oct 2020 19:27:45 -0700 (PDT) From: "Andrew Fish" MIME-version: 1.0 (Mac OS X Mail 14.0 \(3654.20.0.2.1\)) Subject: Re: [edk2-devel] Why is MAX_LONG_FILE_PATH 500 vs. PATH_MAX? Date: Thu, 29 Oct 2020 19:27:43 -0700 References: <86A23533-E614-4B71-BA87-6BFF8338E0FA@apple.com> <004d01d6ae5c$e1228b10$a367a130$@byosoft.com.cn> <8807A0D5-BEDB-45CB-A344-051A9274354D@apple.com> <006b01d6ae63$ed567570$c8036050$@byosoft.com.cn> To: devel@edk2.groups.io, gaoliming@byosoft.com.cn In-reply-to: <006b01d6ae63$ed567570$c8036050$@byosoft.com.cn> Message-id: <0167F6C2-E61F-4847-8193-3FE5C4D9ED2E@apple.com> X-Mailer: Apple Mail (2.3654.20.0.2.1) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312,18.0.737 definitions=2020-10-29_12:2020-10-29,2020-10-29 signatures=0 Content-type: multipart/alternative; boundary="Apple-Mail=_82DC3DE2-52BD-4E4C-B935-326CB9FD3ED4" --Apple-Mail=_82DC3DE2-52BD-4E4C-B935-326CB9FD3ED4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Oct 29, 2020, at 7:25 PM, gaoliming wrote: >=20 > Andrew: > Windows defines _MAX_PATH macro. But, its value is 260. It is not enoug= h. To fix your issue, MAX_LONG_FILE_PATH can be updated as below.=20 > OK I=E2=80=99ll file a BZ. It may also require adding an include? Thanks, Andrew Fish > #ifdef PATH_MAX > #define MAX_LONG_FILE_PATH PATH_MAX > #else > #define MAX_LONG_FILE_PATH 500 > #endif > > Thanks > Liming > =E5=8F=91=E4=BB=B6=E4=BA=BA: bounce+27952+66793+4905953+8761045@groups.i= o > =E4=BB=A3=E8=A1=A8 Andrew Fish via groups.io > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2020=E5=B9=B410=E6=9C=8830=E6=97= =A5 9:37 > =E6=94=B6=E4=BB=B6=E4=BA=BA: gaoliming > > =E6=8A=84=E9=80=81: devel@edk2.groups.io > =E4=B8=BB=E9=A2=98: Re: [edk2-devel] Why is MAX_LONG_FILE_PATH 500 vs. P= ATH_MAX? > > >=20 >=20 > On Oct 29, 2020, at 6:34 PM, gaoliming > wrote: > > This macro is added to resolve the limitation on WINDOWS OS for the leng= th of entire file path can=E2=80=99t be larger than 255. It use the hard co= de 500, because 500 is enough for most case. Do you meet with the problem t= hat the file path length exceeds 500? > > > Yes locally we have changed it to PATH_MAX to fix a build break we hit. = Does Windows support PATH_MAX? > > Thanks, > > Andrew Fish >=20 >=20 > Thanks > Liming > =E5=8F=91=E4=BB=B6=E4=BA=BA: bounce+27952+66762+4905953+8761045@groups.i= o > =E4=BB=A3=E8=A1=A8 Andrew Fish via groups.io > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2020=E5=B9=B410=E6=9C=8830=E6=97= =A5 1:24 > =E6=94=B6=E4=BB=B6=E4=BA=BA: edk2-devel-groups-io > > =E4=B8=BB=E9=A2=98: [edk2-devel] Why is MAX_LONG_FILE_PATH 500 vs. PATH_= MAX? > > Does anyone know why MAX_LONG_FILE_PATH [1] is hard coded to 500 vs. usi= ng the systems PATH_MAX? > > On Linux I think PATH_MAX is 4KiB and on macOS it is 1KiB. > > > [1] https://github.com/tianocore/edk2/blob/master/BaseTools/Source/C/Com= mon/CommonLib.h#L17 > > Thanks, > > Andrew Fish > >=20 --Apple-Mail=_82DC3DE2-52BD-4E4C-B935-326CB9FD3ED4 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On Oct 29, 2= 020, at 7:25 PM, gaoliming <gaoliming@byosoft.com.cn> wrote:

Andrew:
 Windows defines _MAX_PATH macro. But= , its value is 260. It is not enough. To fix your issue, MAX_LONG_FILE_PATH= can be updated as below. 
 

OK I=E2=80=99ll file a BZ. It may also require adding an = include?

Thanks,

Andrew Fish

#ifdef PATH_MAX
#define = MAX_LONG_FILE_PATH PATH_MAX
#else
#define MAX_LONG_FILE_PATH 500
#endif
=  
Thanks
Liming
=E5=8F=91=E4= =BB=B6=E4=BA=BA: bounce+27952+66793+4905953+8761045@grou= ps.io <bounce+27952+66793+4905953+8761045@= groups.io> = =E4=BB=A3=E8=A1=A8&= nbsp;Andrew Fish via groups.io
=E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2020=E5=B9=B410=E6=9C=8830= =E6=97=A5 9:37
=E6=94=B6=E4=BB= =B6=E4=BA=BA: gaoliming = <gaoliming@byosoft.com.cn>
=E6=8A=84=E9=80=81: devel@edk2.groups.io<= br class=3D"">=E4=B8=BB=E9=A2=98: Re: [edk2-devel] Why is MAX_LONG_FILE_PATH 50= 0 vs. PATH_MAX?
 =
 =


On Oct 29, 2020, at= 6:34 PM, gaoliming <gaoliming@byosoft= .com.cn> wrote:
 <= /div>
This = macro is added to resolve the limitation on WINDOWS OS for the length of en= tire file path can=E2=80=99t be= larger than 255. It use the hard code 500, because 500 is enough for most = case. Do you meet with the problem that the file path length exceeds 500?
 
 
Yes locally we have changed it to PATH_MAX to fix a build break we= hit. Does Windows support PATH_MAX?
 
Thanks,
 
Andrew Fish
=


Thanks<= /o:p>
Li= ming
=E5=8F=91=E4=BB=B6=E4=BA= =BA: bounce+27952+66762+4905953+= 8761045@groups.io <= ;bounce+27952+66762+4905= 953+8761045@groups.io> =E4=BB=A3=E8=A1=A8 <= span lang=3D"EN-US" style=3D"font-size: 11pt; font-family: =E7=AD=89=E7=BA= =BF;" class=3D"">Andrew Fish via&nbs= p;groups.io
= =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: = 2020=E5=B9=B410=E6=9C=8830=E6= =97=A5 1:24
=E6=94=B6=E4=BB=B6=E4=BA=BA: edk2-devel-gr= oups-io <devel@edk2.groups.io>
=E4=B8=BB=E9=A2=98: [edk2-devel] = Why is MAX_LONG_FILE_PATH 500 vs. PATH_MAX?
=
 
Does anyone k= now why MAX_LONG_FILE_PATH [1] is hard coded to 500 vs. using the syst= ems PATH_MAX?
 
On Linux I think PATH_MAX is 4KiB and on macOS it = is 1KiB.
 
 
 
Thanks,
 <= o:p class=3D"">
Andrew Fish
 


= --Apple-Mail=_82DC3DE2-52BD-4E4C-B935-326CB9FD3ED4--