You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Bert Huijben <be...@qqmail.nl> on 2010/03/12 11:48:09 UTC

RE: svn commit: r921306 - /apr/apr/branches/1.5.x/file_io/win32/open.c


> -----Original Message-----
> From: jfclere@apache.org [mailto:jfclere@apache.org]
> Sent: woensdag 10 maart 2010 12:18
> To: commits@apr.apache.org
> Subject: svn commit: r921306 -
> /apr/apr/branches/1.5.x/file_io/win32/open.c
> 
> Author: jfclere
> Date: Wed Mar 10 11:18:28 2010
> New Revision: 921306
> 
> URL: http://svn.apache.org/viewvc?rev=921306&view=rev
> Log:
> typos? Otherwise it won't compile.
> 
> Modified:
>     apr/apr/branches/1.5.x/file_io/win32/open.c
> 
> Modified: apr/apr/branches/1.5.x/file_io/win32/open.c
> URL:
> http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/file_io/win32/open.c
> ?rev=921306&r1=921305&r2=921306&view=diff
> ==========================================================
> ====================
> --- apr/apr/branches/1.5.x/file_io/win32/open.c (original)
> +++ apr/apr/branches/1.5.x/file_io/win32/open.c Wed Mar 10 11:18:28 2010
> @@ -605,8 +605,8 @@ APR_DECLARE(apr_status_t) apr_file_link(
>  #endif
>  #if APR_HAS_ANSI_FS
>      ELSE_WIN_OS_IS_ANSI {
> -        if (!CreateHardLinkA(wto_path, wfrom_path))
> -                return apr_get_os_error()
> +        if (!CreateHardLinkA(to_path, from_path))
> +                return apr_get_os_error();
>      }
>  #endif
>      return rv;
> 

Why do we even have this block?

CreateHardLinkA is only implemented in Windows 2000 and later, which implies unicode support. 
(Why support an ansi version of an API that is only implemented on unicode capable systems?)

	Bert



RE: svn commit: r921306 - /apr/apr/branches/1.5.x/file_io/win32/open.c

Posted by Bert Huijben <be...@qqmail.nl>.

> -----Original Message-----
> From: jean-frederic clere [mailto:jfclere@gmail.com]
> Sent: vrijdag 12 maart 2010 12:12
> To: Bert Huijben
> Cc: dev@apr.apache.org
> Subject: Re: svn commit: r921306 -
> /apr/apr/branches/1.5.x/file_io/win32/open.c
> 
> On 03/12/2010 11:48 AM, Bert Huijben wrote:
> > Why do we even have this block?
> >
> > CreateHardLinkA is only implemented in Windows 2000 and later, which
> implies unicode support.
> > (Why support an ansi version of an API that is only implemented on
> unicode capable systems?)
> >
> > 	Bert
> >
> >
> 
> See http://msdn.microsoft.com/en-us/library/aa363860%28VS.85%29.aspx

That doesn't answer my question. (I checked that exact same page or a local copy of that page to check if Windows '9X might have supported it for network drives)

We have a unicode check right above that block which uses CreateHardLinkW. What I tried to say was that there are no Windows versions that don't support the W variant but do support the A variant. 

I don't think we really have to extend the ansi layer for systems that support unicode. And the Windows NT development line where Windows 2000 is from, always uses unicode internally. Why translate to the OEM or Ansi code page just to make Windows convert it to Unicode again?
(The documentation doesn't mention CE, so neither variant works there)

	Bert


Re: svn commit: r921306 - /apr/apr/branches/1.5.x/file_io/win32/open.c

Posted by jean-frederic clere <jf...@gmail.com>.
On 03/12/2010 11:48 AM, Bert Huijben wrote:
> Why do we even have this block?
> 
> CreateHardLinkA is only implemented in Windows 2000 and later, which implies unicode support. 
> (Why support an ansi version of an API that is only implemented on unicode capable systems?)
> 
> 	Bert
> 
> 

See http://msdn.microsoft.com/en-us/library/aa363860%28VS.85%29.aspx

Cheers

Jean-Frederic

Re: svn commit: r921306 - /apr/apr/branches/1.5.x/file_io/win32/open.c

Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On 3/12/2010 4:48 AM, Bert Huijben wrote:
> 
> Why do we even have this block?

Why, indeed?

> CreateHardLinkA is only implemented in Windows 2000 and later, which implies unicode support. 
> (Why support an ansi version of an API that is only implemented on unicode capable systems?)

Because they can, and because there are local code page users who have done things such
as this, and breaking this functionality (especially resulting in non-compilation) for
the legacy branch is impolite.  I'm personally fine with declaring APR 2 unicode (utf-8)
only as of apr 2.0, but would like to see others' thoughts on this.

I don't think failing to load on NT SP6/Win 9x is rude any longer, though.  Simply
attaching such machines to the public internet is something that should be actively
discouraged, if not scorned and shamed.