diff options
author | Lorry <lorry@roadtrain.codethink.co.uk> | 2012-07-18 20:35:05 +0100 |
---|---|---|
committer | Lorry <lorry@roadtrain.codethink.co.uk> | 2012-07-18 20:35:05 +0100 |
commit | aceb1f30497619786f1827e4c65992b890a07410 (patch) | |
tree | ce33ac9d0d076a8ec4f993e614cf71a4d5daa7e7 /src/sf_unistd.h | |
download | libsndfile-aceb1f30497619786f1827e4c65992b890a07410.tar.gz |
Tarball conversion
Diffstat (limited to 'src/sf_unistd.h')
-rw-r--r-- | src/sf_unistd.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/src/sf_unistd.h b/src/sf_unistd.h new file mode 100644 index 0000000..9fca68e --- /dev/null +++ b/src/sf_unistd.h @@ -0,0 +1,63 @@ +/* +** Copyright (C) 2002-2011 Erik de Castro Lopo <erikd@mega-nerd.com> +** +** This program is free software; you can redistribute it and/or modify +** it under the terms of the GNU Lesser General Public License as published by +** the Free Software Foundation; either version 2.1 of the License, or +** (at your option) any later version. +** +** This program is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU Lesser General Public License for more details. +** +** You should have received a copy of the GNU Lesser General Public License +** along with this program; if not, write to the Free Software +** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +/* Some defines that microsoft 'forgot' to implement. */ + +#ifndef S_IRWXU +#define S_IRWXU 0000700 /* rwx, owner */ +#endif + +#ifndef S_IRUSR +#define S_IRUSR 0000400 /* read permission, owner */ +#endif + +#ifndef S_IWUSR +#define S_IWUSR 0000200 /* write permission, owner */ +#endif + +#ifndef S_IXUSR +#define S_IXUSR 0000100 /* execute/search permission, owner */ +#endif + +/* Windows doesn't have group permissions so set all these to zero. */ +#define S_IRWXG 0 /* rwx, group */ +#define S_IRGRP 0 /* read permission, group */ +#define S_IWGRP 0 /* write permission, grougroup */ +#define S_IXGRP 0 /* execute/search permission, group */ + +/* Windows doesn't have others permissions so set all these to zero. */ +#define S_IRWXO 0 /* rwx, other */ +#define S_IROTH 0 /* read permission, other */ +#define S_IWOTH 0 /* write permission, other */ +#define S_IXOTH 0 /* execute/search permission, other */ + +#ifndef S_ISFIFO +#define S_ISFIFO(mode) (((mode) & _S_IFMT) == _S_IFIFO) +#endif + +#ifndef S_ISREG +#define S_ISREG(mode) (((mode) & _S_IFREG) == _S_IFREG) +#endif + +/* +** Don't know if these are still needed. +** +** #define _IFMT _S_IFMT +** #define _IFREG _S_IFREG +*/ + |