[FFmpeg-devel] Patch: libssh on Windows
Reimar.Doeffinger at gmx.de
Sat Dec 28 16:18:23 CET 2013
On 28.12.2013, at 16:12, Nicolas George <george at nsup.org> wrote:
> L'octidi 8 nivôse, an CCXXII, Reimar Döffinger a écrit :
>> Do fix it, libssh would either have to provide its own constants or do
>> a translation, since it does neither,
> I believe it provides its own constants:
> /* File mode */
> /* Read, write, execute/search by owner */
> #define LIBSSH2_SFTP_S_IRWXU 0000700 /* RWX mask for owner */
> #define LIBSSH2_SFTP_S_IRUSR 0000400 /* R for owner */
> #define LIBSSH2_SFTP_S_IWUSR 0000200 /* W for owner */
> #define LIBSSH2_SFTP_S_IXUSR 0000100 /* X for owner */
> /* Read, write, execute/search by group */
> #define LIBSSH2_SFTP_S_IRWXG 0000070 /* RWX mask for group */
> #define LIBSSH2_SFTP_S_IRGRP 0000040 /* R for group */
> #define LIBSSH2_SFTP_S_IWGRP 0000020 /* W for group */
> #define LIBSSH2_SFTP_S_IXGRP 0000010 /* X for group */
> /* Read, write, execute/search by others */
> #define LIBSSH2_SFTP_S_IRWXO 0000007 /* RWX mask for other */
> #define LIBSSH2_SFTP_S_IROTH 0000004 /* R for other */
> #define LIBSSH2_SFTP_S_IWOTH 0000002 /* W for other */
> #define LIBSSH2_SFTP_S_IXOTH 0000001 /* X for other */
> (libssh2_sftp.h on Debian stable or unstable). They just are a bit verbose.
I stand corrected.
I would suggest to use those if that header is generally available, or a fixed constant otherwise.
I suspect the current default of 0664 is because that's what files are created with on most distributions with default umask, but you are right that 0666 would make more sense (though this is a separate issue really).
More information about the ffmpeg-devel