From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ma1-aaemail-dr-lapp02.apple.com (ma1-aaemail-dr-lapp02.apple.com [17.171.2.68]) by mx.groups.io with SMTP id smtpd.web10.8265.1604026493891967048 for ; Thu, 29 Oct 2020 19:54:54 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@apple.com header.s=20180706 header.b=iLWeThvU; spf=pass (domain: apple.com, ip: 17.171.2.68, mailfrom: afish@apple.com) Received: from pps.filterd (ma1-aaemail-dr-lapp02.apple.com [127.0.0.1]) by ma1-aaemail-dr-lapp02.apple.com (8.16.0.42/8.16.0.42) with SMTP id 09U2m5Et013185; Thu, 29 Oct 2020 19:54:47 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=from : message-id : content-type : mime-version : subject : date : in-reply-to : cc : to : references; s=20180706; bh=qpRy6c5KdSkI4ycSI9i/bFapCemnLywm0AWsnTOtwd4=; b=iLWeThvULyV+cu2kt2/aTERYUOOiVgA/WtE7Mf/BxK6wJMGywJuosOblBGC5J9SZM5m6 4dXp28yK73tEGHLhJyEl80GeHGRqPAG3nmmukP4yS6HsF3cL44NWSpkQW5FU88ckKqJD 8xPLJyz/eaOzGLLU8ovMAWkyZ1OCsjleP4w0b5iIyh1nGddKrD/mA0RFkB+vKvmrLwWB hIs7L7AA5rJjmAEC7TvjqMLp8IPjUS9E4WUuHERBnnK+B7AZ+IjsNCioLpBHq5dmuVGK FQSVpgtXaN5vqbmbH6GDYjG4nik4oweisKUOyZWbmaM0i1jRXBUvcUSzD06j+kX52ci3 aA== Received: from rn-mailsvcp-mta-lapp04.rno.apple.com (rn-mailsvcp-mta-lapp04.rno.apple.com [10.225.203.152]) by ma1-aaemail-dr-lapp02.apple.com with ESMTP id 34cgxx85gt-7 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Thu, 29 Oct 2020 19:54:47 -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-lapp04.rno.apple.com (Oracle Communications Messaging Server 8.1.0.6.20200729 64bit (built Jul 29 2020)) with ESMTPS id <0QIZ010T7URBKU80@rn-mailsvcp-mta-lapp04.rno.apple.com>; Thu, 29 Oct 2020 19:54:47 -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 <0QIZ00E00U3DRM00@rn-mailsvcp-mmp-lapp03.rno.apple.com>; Thu, 29 Oct 2020 19:54:47 -0700 (PDT) X-Va-A: X-Va-T-CD: 36e7a95c5a6048d9c36308b131fa87c1 X-Va-E-CD: df66502e155e8c18bafc524ebbb8b71a X-Va-R-CD: 731b2809dde838f438dabc6fde0477d4 X-Va-CD: 0 X-Va-ID: 9e2f509a-b4df-4d37-9426-95a2dc32d85c X-V-A: X-V-T-CD: 36e7a95c5a6048d9c36308b131fa87c1 X-V-E-CD: df66502e155e8c18bafc524ebbb8b71a X-V-R-CD: 731b2809dde838f438dabc6fde0477d4 X-V-CD: 0 X-V-ID: a72645da-15fc-436d-af81-411eef7269e1 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 <0QIZ00579UR9NZ00@rn-mailsvcp-mmp-lapp03.rno.apple.com>; Thu, 29 Oct 2020 19:54:46 -0700 (PDT) From: "Andrew Fish" Message-id: <93CD311F-B4D9-4AF9-8AD4-3093E04FBB0F@apple.com> 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:54:45 -0700 In-reply-to: <007801d6ae67$d99651a0$8cc2f4e0$@byosoft.com.cn> Cc: devel@edk2.groups.io To: gaoliming 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> <0167F6C2-E61F-4847-8193-3FE5C4D9ED2E@apple.com> <007801d6ae67$d99651a0$8cc2f4e0$@byosoft.com.cn> 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=_CB2DBED1-CB04-4E54-A2A1-61D43E1FEDD2" --Apple-Mail=_CB2DBED1-CB04-4E54-A2A1-61D43E1FEDD2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Does that work on Windows?=20 Thanks, Andrew Fish > On Oct 29, 2020, at 7:53 PM, gaoliming wrote: >=20 > Yes. #include is required for PATH_MAX > https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html = > > > =E5=8F=91=E4=BB=B6=E4=BA=BA: bounce+27952+66797+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 10:28 > =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io ; gaoliming@byosoft.com.cn > =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 7:25 PM, gaoliming > wrote: >> >> Andrew: >> Windows defines _MAX_PATH macro. But, its value is 260. It is not enou= gh. 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 >=20 >=20 >> #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.= io > =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. = PATH_MAX? >> >> >>=20 >>=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 le= ngth of entire 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 >>=20 >>=20 >>=20 >>> Thanks >>> Liming >>> =E5=8F=91=E4=BB=B6=E4=BA=BA: bounce+27952+66762+4905953+8761045@groups= .io > =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. PAT= H_MAX? >>> >>> Does anyone know why MAX_LONG_FILE_PATH [1] is hard coded to 500 vs. u= sing 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/C= ommon/CommonLib.h#L17 >>> >>> Thanks, >>> >>> Andrew Fish >>=20 >> >=20 > >=20 --Apple-Mail=_CB2DBED1-CB04-4E54-A2A1-61D43E1FEDD2 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Does that work on Windows= ? 

Thanks,

Andrew Fish

= On Oct 29, 2020, at 7:53 PM, gaoliming <gaoliming@byosoft.com.cn> wrote:

Yes. #= include <limits.h> is required for PATH_MAX=
=  
&= nbsp;
=E5=8F=91=E4=BB= = =B6=E4=BA=BA: bounce+27952+66797+4905953+8761045@group= s.io <bounce+27952+66797+4905953+8761045@g= roups.io> <= b class=3D"">=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 10:28
=E6=94=B6=E4=BB= =B6=E4=BA=BA: devel@edk2.groups.io; gaoliming@byosoft.com.cn
=E4=B8=BB=E9=A2=98: Re: [edk2-devel] Why is MAX_LONG_FILE_PATH= 500 vs. PATH_MAX?
 


<= blockquote style=3D"margin-top: 5pt; margin-bottom: 5pt;" class=3D"" type= =3D"cite">
 
Andrew:=
 = Windows defines _MAX_PATH macro. But, its value is 260. It is not enough. T= o fix your issue, MAX_LONG_FILE_PATH can be updated as below. 
 
 <= /div>
OK= I=E2=80=99ll file a BZ. It may also require adding an include?
 
Thanks,
 
Andrew Fish


#ifd= ef PATH_MAX
#define&nb= sp;MAX_LONG_FILE_PATH PATH_MAX<= o:p class=3D"">
#else<= /o:p>
#d= efine MAX_LONG_FILE_PATH 500
#endif
 <= /span>
Thanks=
<= /div>
Liming
=E5=8F=91=E4=BB=B6=E4=BA=BA: bounce+27952+66793+4905953+876= 1045@groups.io <bounce+27952+66793+4905953= +8761045@groups.io> =E4=BB=A3=E8=A1=A8 Andrew Fish via groups.io
=E5= = =8F=91=E9=80=81=E6=97=B6=E9=97=B4:<= /span> 2020=E5=B9=B410=E6=9C=8830=E6=97= =A5&= nbsp;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
=E4= =B8=BB=E9=A2=98: = Re: [edk2-devel] Why is MAX_LONG_FILE_PATH = 500 vs. PATH_MAX?
<= span lang=3D"EN-US" class=3D""> 
 



On Oct 29,= 2020, at 6:34 PM, gaoliming <gaoliming@b= yosoft.com.cn> wrote:
=
 
This macro is added to resolv= e the limitation on WINDOWS OS for the length of entire file path can=E2=80=99t be larger than 255. It us= e 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 h= it. Does Windows support PATH_MAX?
=
 
Thanks,
 
<= span lang=3D"EN-US" class=3D"">Andrew Fish



=
Thanks=
Liming
=E5=8F=91=E4=BB=B6=E4= =BA=BA: = bounce+27952+66762+49059= 53+8761045@groups.io = <bounce+27952+6676= 2+4905953+8761045@groups.io>&n= bsp;=E4=BB=A3=E8=A1=A8 <= /b>Andrew Fish via&= nbsp;groups.io
=E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4= :&= nbsp;2020=E5=B9=B410=E6=9C=8830= =E6=97=A5 1:24
=E6=94=B6=E4=BB=B6=E4=BA=BA: edk2-dev= el-groups-io <devel@edk2.groups.io>=E4=B8=BB=E9=A2=98: [edk2-de= vel] Why is MAX_LONG_FILE_PATH 500 vs. PATH_MAX?
 <= /span>
Does anyone know why MAX_LONG_FILE_PATH [1] is hard cod= ed to 500 vs. using the systems PATH_MAX?
&nbs= p;
On Linux I think PATH_MAX is 4KiB and on macOS it = is 1KiB.
 =
 
=
&nbs= p;
Thanks,
 
Andrew Fish=
 
 
=

--Apple-Mail=_CB2DBED1-CB04-4E54-A2A1-61D43E1FEDD2--