delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/12/11/08:50:04

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:in-reply-to
:references:mime-version:content-type:content-transfer-encoding;
q=dns; s=default; b=FfK7D92jySeTTDFogjhH9NCvX+5paIIZAC8U0KOJoIr
xajsQ6+k6N0W+uWcVQafa7m9OkgjY7M2SC1AHLl7kBZ1Nc1V7gzTIELQs494Kwj1
Nh0CsKPEKHmB+q9incv7kagAnt4lZp4UVrOOyl2JR3PRmvmumt4+UJ/g9JmQjbLw
=
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:in-reply-to
:references:mime-version:content-type:content-transfer-encoding;
s=default; bh=wFpD+vX7czQJTj8wjkPGh3IENvI=; b=gEX4aUYIyIz8/Hb/E
s/AC5obrB3Drlgp5iGsUvGCB6KSamj+1KZCMFXtEQyTVH0PkXQJfFRRnGrO5aHRr
rtqFHhEHTdCtOvQt+8V+QE4pFHWa42DaltJTHJ6v3sk+BtzJdtL04NKMqefhSE5q
2dygxvpNQDd/IHJUQCsAiTkh+k=
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=-0.9 required=5.0 tests=AWL,BAYES_50,DNS_FROM_AHBL_RHSBL,LIKELY_SPAM_SUBJECT,RCVD_IN_PSBL,SPF_PASS autolearn=no version=3.3.2
X-HELO: mail3.ks.pochta.ru
Date: Wed, 11 Dec 2013 17:49:22 +0400
From: Mikhail Usenko <mikeus AT nm DOT ru>
To: cygwin AT cygwin DOT com
Subject: Re: cant access to files more than 128 utf-8 symbol long names
Message-Id: <20131211174922.c0c8432e69ce1423511d2cbf@nm.ru>
In-Reply-To: <20131210102755.GQ2527@calimero.vinschen.de>
References: <52A6BFA4 DOT 9010101 AT spektr-rfs DOT ru> <20131210102755 DOT GQ2527 AT calimero DOT vinschen DOT de>
Mime-Version: 1.0
X-RSpam-Score: 30
X-RSpam-Report: This message is unlikely spam.

On Tue, 10 Dec 2013 11:27:55 +0100
Corinna Vinschen <...> wrote:


> Easier said than done.
> 
> 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 multibyte
> vs. UTF-16 encoding issue.
> 
> 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.
> 
> If you make it 255, applications will be surprised by ENAMETOOLONG
> errors for perfectly valid Windows filenames.
> 

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 one Cygwin application running on the Windows does not come across the ENAMETOOLONG error because of the nonexistence of the actual filenames with this length (and hence POSIX filenames too). Did I understand rigth?

-- 


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019