Re: [COMMITTERS] pgsql: Use symbolic names not octal constants for file permission flags
От | Magnus Hagander |
---|---|
Тема | Re: [COMMITTERS] pgsql: Use symbolic names not octal constants for file permission flags |
Дата | |
Msg-id | AANLkTikAPjmQL7ojb+wEW4GS+Sx3hX6=dXtfb2i3zWXm@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [COMMITTERS] pgsql: Use symbolic names not octal constants for file permission flags (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: [COMMITTERS] pgsql: Use symbolic names not octal constants for file permission flags
Re: [COMMITTERS] pgsql: Use symbolic names not octal constants for file permission flags |
Список | pgsql-hackers |
On Sat, Dec 11, 2010 at 17:55, Tom Lane <tgl@sss.pgh.pa.us> wrote: > Magnus Hagander <magnus@hagander.net> writes: >> On Sat, Dec 11, 2010 at 17:38, Tom Lane <tgl@sss.pgh.pa.us> wrote: >>> No, it isn't. There's an apparently-useless definition of _S_IRWXU >>> there, but no S_IRWXU. > >> Hmm. You're right, of course. > >> A search on my windows box finds the text string S_IRWXU in the >> following "*.h" files across the whole filesystem: >> c:\perl\lib\CORE\perl.h >> c:\perl64\lib\CORE\perl.h >> c:\pgsql\src\include\pg_config_os.h >> c:\pgsql\src\include\port\win32.h > >> that's it. > > OK, now I'm really confused. We have at least two questions: > > 1. How did all those pre-existing references to S_IRXWU compile? Yeah, that's weird. IIRC (I stopped looking for the moment, need a step back) some of them were protected by #ifndef WIN32, but not all of them.. > 2. Why didn't the previously hard-wired constants passed to chmod > and umask fail on Windows? The M$ documentation I can find at the > moment suggests that *only* _S_IREAD and _S_IWRITE bits are allowed > in the inputs to those functions, which apparently is untrue or none > of this code would have executed successfully. Probably it ignores any flags it doesn't know about? -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/
В списке pgsql-hackers по дате отправления: