delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; q=dns; s= | |
default; b=CT1MxVHTM6oLCVLqNhYQBDwJANICFUEr8kONoAq7WHPMyY/tGkgX+ | |
/2CkJj586swgb/TPX+2XtNhbZlFumah22HDm/1XVSd8zJQ8Vcl2+pYHblPXq/2iF | |
6Y3ZeayTByYgRFJ7b8KLwiFgGRDIoqb/6jwMMc8jd7LlhSit0Z5Kzg= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; s=default; | |
bh=OUwf4nA65VejwgbAnwD4SoQ7dpg=; b=tANjfftM1h8LOkYmMoXE1jBshnp2 | |
2SI+gVVGnbe/qQX53rO3GUwug240zx7psmkullTu6sNvtMyWqIgUIqYmWhM2ASPB | |
27GdpSzlk2BYPazA7Rj6V6SxJqCurWWhcl74L3zO6qQy5mowYCX0cVE8dFgwYvkr | |
tzdMm1sUbwujOrg= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Authentication-Results: | sourceware.org; auth=none |
X-Virus-Found: | No |
X-Spam-SWARE-Status: | No, score=2.1 required=5.0 tests=AWL,BAYES_50,LIKELY_SPAM_SUBJECT autolearn=no version=3.3.2 |
X-HELO: | calimero.vinschen.de |
Date: | Wed, 11 Dec 2013 15:09:07 +0100 |
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: cant access to files more than 128 utf-8 symbol long names |
Message-ID: | <20131211140907.GD2527@calimero.vinschen.de> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <52A6BFA4 DOT 9010101 AT spektr-rfs DOT ru> <20131210102755 DOT GQ2527 AT calimero DOT vinschen DOT de> <20131211174922 DOT c0c8432e69ce1423511d2cbf AT nm DOT ru> |
MIME-Version: | 1.0 |
In-Reply-To: | <20131211174922.c0c8432e69ce1423511d2cbf@nm.ru> |
User-Agent: | Mutt/1.5.21 (2010-09-15) |
--FvpZCdL3V2P9482l Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Dec 11 17:49, Mikhail Usenko wrote: > On Tue, 10 Dec 2013 11:27:55 +0100 > Corinna Vinschen <...> wrote: >=20 >=20 > > Easier said than done. > >=20 > > Cygwin is using the native NT API > > and, occasionally, the Win32 UNICODE file API, which allows paths of up > > to 32767 chars. > > ... > > How do you represent this in a byte-oriented POSIX system? What do you > > set NAME_MAX to? You can't get it right due to the unfortunate multiby= te > > vs. UTF-16 encoding issue. > >=20 > > To cover all UTF-8 chars, NAME_MAX would have to be 1020. But then, > > applications relying on NAME_MAX will be surprised by ENAMETOOLONG > > errors for perfectly valid POSIX filenames. > >=20 > > If you make it 255, applications will be surprised by ENAMETOOLONG > > errors for perfectly valid Windows filenames. > >=20 >=20 > Strictly speaking, the NAME_MAX and PATH_MAX POSIX' limits must be > 32767*4 bytes, that is ~128K on Windows systems. With such a value no Strictly speaking you're wrong. NAME_MAX is the length of a single path component, not the length of a path: NAME_MAX vvv /foo/bar/baz\0 ^^^^^^^^^^^^^^ PATH_MAX Also, PATH_MAX is NOT the maximum length of a path, but the "Maximum number of bytes the implementation will store as a pathname in a user-supplied buffer of unspecified size, including the terminating null character." That does not mean there are no longer paths possible, just that you have to use, for instance, relative paths rather than absolute paths, if the absolute path becomes longer than PATH_MAX, and that the system does not guarantee to return paths if they are longer then PATH_MAX. Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --FvpZCdL3V2P9482l Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) iQIcBAEBAgAGBQJSqHICAAoJEPU2Bp2uRE+gKzUQAJyt0WSBKoW7tOGT8Nv1TRb7 h04VviM9qItYulOk2poIQm3DlT4eZVHyMjCT4cfBp8Azw2ElMeBuoTaiWWbMNLos wqH/xrCmsURFDW26HvhoELQgkLnRwhpntMFS7F784t7uz0JI26/E0yWWrFILaiVN IKuo4SYkYHvd/FwCVmKlvqIgX91GqvcQduF+4f+7CINBNAifLUsW8BFQ2r33Rgh/ 5CGeyr9fXCzeXGh+E+pUrSq4YhWgwJkgLWZpOQc3aYRkWyExKJaE54yfvpHwU2hD wVkD0FnP+ezzuecwtB5J0ynFIgoVfroM/Ce9zKNt8mxHIhRmrz7jl0S+ve9tzpDi RorS4P67F98KD3RgCsjG412mhiNTjkuNuucdJ/6PSG4IGaCwUlgJadFHaAqDPSjV t575j3t9ZNCbIOw2HSBdzrtscFkHelAaoa4VGZVBwU9KNLBnTBuQcK2BN8TLL4AC 62Ri7gXk5ufjAQ2EaAm4uVIS8RJwSzpA7YW3tYjfe9ZSFdS+RpKtCQkAr5HwEo1S 1nPPZAzHz37IzluFu/JX5LawI8OI0AAOcRfDATWKA03T2Y5/6THp20+piV9Aj95h 3ADcHK8lIzfnd8LY6eZZGUYhqCe1tuASKpl+jD0YoAfMrrp/bwoLlpnQnXPkbpq3 51gLWwEiqT1n4p+RUrF7 =k7Gq -----END PGP SIGNATURE----- --FvpZCdL3V2P9482l--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |