This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bug in libiconv?

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

> 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)



Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]