[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r10060 - trunk/subversion/libsvn_fs

From: <kfogel_at_collab.net>
Date: 2004-06-23 21:33:07 CEST

ghudson@tigris.org writes:
> +#ifndef WIN32
> +/* Required for the sgid code in svn_fs_create */
> +#include <sys/stat.h>
> +#include <sys/types.h>
> +#include <unistd.h>
> +#endif

Is this our normal way of saying "if Unix-like operating system"?

> +#ifndef WIN32
> + /* Set the sgid bit on the directory, to ensure that group ownership
> + of new files and directories will be inherited from the parent
> + rather than determined by the primary gid. APR provides no
> + mechanism for setting this bit, so we do it the Unix way. If we
> + fail, don't sweat it; such a failure probably indicates the
> + filesystem doesn't support that bit. */
> + {
> + struct stat st;
> +
> + if (stat (path, &st) == 0)
> + chmod (path, (st.st_mode & ~S_IFMT) | S_ISGID);
> + }
> +#endif

(Same question, of course.)

I'm not necessarily objecting, just surprised that we test for the
*presence* of this functionality by seeing if we're *not* on a
particular OS.

-K

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jun 23 22:58:41 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.