You might want to look at _dosmaperror() in src/port/win32error.c - it
contains the different win32 error ccodes that we match to EACCESS. I
don't see us mapping *anything* to EPERM.
Actually, I think that may be your problem - you are testing against
EPERM instead of EACCESS. On my linux manpage, EPERM isn't even a
valid return code from open().
//Magnus
2010/3/1 Greg Stark <gsstark(at)mit(dot)edu>:
> This isn't working. The Windows ports are all saying "permission
> denied" but apparently that's not because errno is set to EPERM.
> Anyone know how to detect "permission denied" errors from open() on
> windows?
>
> On Mon, Mar 1, 2010 at 12:04 AM, Greg Stark <stark(at)postgresql(dot)org> wrote:
>> Log Message:
>> -----------
>> add EPERM to the list of return codes to expect from opening directories based on Vista results
>>
>> Modified Files:
>> --------------
>> pgsql/src/port:
>> copydir.c (r1.34 -> r1.35)
>> (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/port/copydir.c?r1=1.34&r2=1.35)
>>
>> --
>> Sent via pgsql-committers mailing list (pgsql-committers(at)postgresql(dot)org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-committers
>>
>
>
>
> --
> greg
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
In response to
Responses
pgsql-hackers by date
| Next: | From: Andrew Dunstan | Date: 2010-03-01 13:53:37 |
| Subject: Re: remove contrib/xml2 |
| Previous: | From: Greg Stark | Date: 2010-03-01 13:26:08 |
| Subject: Re: pgsql: add EPERM to the list of return codes to expect from opening |
pgsql-committers by date
| Next: | From: Tom Lane | Date: 2010-03-01 14:54:00 |
| Subject: pgsql: Buildfarm still unhappy, so I'll bet it's EACCES not EPERM. |
| Previous: | From: Greg Stark | Date: 2010-03-01 13:26:08 |
| Subject: Re: pgsql: add EPERM to the list of return codes to expect from opening |