From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28356 invoked by alias); 29 Jan 2011 12:34:05 -0000 Received: (qmail 27392 invoked by uid 22791); 29 Jan 2011 12:33:56 -0000 X-Spam-Check-By: sourceware.org Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.83/v0.83-20-g38e4449) with ESMTP; Sat, 29 Jan 2011 12:33:52 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id E3B0A2CA2D6; Sat, 29 Jan 2011 13:33:49 +0100 (CET) Date: Sat, 29 Jan 2011 17:15:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com, bug-gnu-libiconv@gnu.org Subject: Re: Bug in libiconv? Message-ID: <20110129123349.GB8671@calimero.vinschen.de> Reply-To: cygwin@cygwin.com, bug-gnu-libiconv@gnu.org Mail-Followup-To: cygwin@cygwin.com, bug-gnu-libiconv@gnu.org References: <201101282312.50298.bruno@clisp.org> <4D438432.3070906@cwilson.fastmail.fm> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4D438432.3070906@cwilson.fastmail.fm> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2011-01/txt/msg00415.txt.bz2 On Jan 28 22:06, Charles Wilson wrote: > On 1/28/2011 5:12 PM, Bruno Haible wrote: > >> the old cygwin_conv_to_posix_path function as well. > > > > Is cygwin_conv_to_posix_path deprecated? Does it introduce limitations of > > some kind? > > Yes, and (and because:) yes. > > The limitation is, the old functions: > > extern int cygwin_win32_to_posix_path_list (const char *, char *) > extern int cygwin_win32_to_posix_path_list_buf_size (const char *) > extern int cygwin_posix_to_win32_path_list (const char *, char *) > extern int cygwin_posix_to_win32_path_list_buf_size (const char *) > extern int cygwin_conv_to_win32_path (const char *, char *) > extern int cygwin_conv_to_full_win32_path (const char *, char *) > extern int cygwin_conv_to_posix_path (const char *, char *) > extern int cygwin_conv_to_full_posix_path (const char *, char *) > > are all deprecated, because (a) they don't handle wide chars, (b) and > are limited to only 254 char path lengths. The replacement functions > > extern ssize_t cygwin_conv_path (cygwin_conv_path_t what, > const void *from, > void *to, size_t size); > > extern ssize_t cygwin_conv_path_list (cygwin_conv_path_t what, > const void *from, > void *to, size_t size); > > extern void *cygwin_create_path (cygwin_conv_path_t what, > const void *from); > > do not have these limitations (well, 4Kbytes/2k wchars for a single > filename; 32K? for pathlists). cygwin_conv_path_t controls the > behavior, and can accept the following values: Cygwin defines PATH_MAX == 4096 since we don't guarantee that an incoming filename of more than 4K is handled. However, the conversion itself does not restrict what we get from Windows, which is 32K pathnames. > However, by using the linux-ish facilities throughout and avoiding the > win32 stuff, you can ALSO avoid the necessity of calling any path > conversion functions at all -- and eliminate a lot of platform-specific > code. (e.g. let the cygwin dll do ALL the work) Exactly. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- 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