Blame src/sf_unistd.h

Packit Service 17f94a
/*
Packit Service 17f94a
** Copyright (C) 2002-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
Packit Service 17f94a
**
Packit Service 17f94a
** This program is free software; you can redistribute it and/or modify
Packit Service 17f94a
** it under the terms of the GNU Lesser General Public License as published by
Packit Service 17f94a
** the Free Software Foundation; either version 2.1 of the License, or
Packit Service 17f94a
** (at your option) any later version.
Packit Service 17f94a
**
Packit Service 17f94a
** This program is distributed in the hope that it will be useful,
Packit Service 17f94a
** but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 17f94a
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service 17f94a
** GNU Lesser General Public License for more details.
Packit Service 17f94a
**
Packit Service 17f94a
** You should have received a copy of the GNU Lesser General Public License
Packit Service 17f94a
** along with this program; if not, write to the Free Software
Packit Service 17f94a
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Packit Service 17f94a
*/
Packit Service 17f94a
Packit Service 17f94a
/* Some defines that microsoft 'forgot' to implement. */
Packit Service 17f94a
Packit Service 17f94a
#ifndef S_IRWXU
Packit Service 17f94a
#define	S_IRWXU 	0000700	/* rwx, owner */
Packit Service 17f94a
#endif
Packit Service 17f94a
Packit Service 17f94a
#ifndef		S_IRUSR
Packit Service 17f94a
#define		S_IRUSR	0000400	/* read permission, owner */
Packit Service 17f94a
#endif
Packit Service 17f94a
Packit Service 17f94a
#ifndef		S_IWUSR
Packit Service 17f94a
#define		S_IWUSR	0000200	/* write permission, owner */
Packit Service 17f94a
#endif
Packit Service 17f94a
Packit Service 17f94a
#ifndef		S_IXUSR
Packit Service 17f94a
#define		S_IXUSR	0000100	/* execute/search permission, owner */
Packit Service 17f94a
#endif
Packit Service 17f94a
Packit Service 17f94a
/* Windows doesn't have group permissions so set all these to zero. */
Packit Service 17f94a
#define	S_IRWXG		0	/* rwx, group */
Packit Service 17f94a
#define		S_IRGRP	0	/* read permission, group */
Packit Service 17f94a
#define		S_IWGRP	0	/* write permission, grougroup */
Packit Service 17f94a
#define		S_IXGRP	0	/* execute/search permission, group */
Packit Service 17f94a
Packit Service 17f94a
/* Windows doesn't have others permissions so set all these to zero. */
Packit Service 17f94a
#define	S_IRWXO		0	/* rwx, other */
Packit Service 17f94a
#define		S_IROTH	0	/* read permission, other */
Packit Service 17f94a
#define		S_IWOTH	0	/* write permission, other */
Packit Service 17f94a
#define		S_IXOTH	0	/* execute/search permission, other */
Packit Service 17f94a
Packit Service 17f94a
#ifndef S_ISFIFO
Packit Service 17f94a
#define S_ISFIFO(mode)	(((mode) & _S_IFMT) == _S_IFIFO)
Packit Service 17f94a
#endif
Packit Service 17f94a
Packit Service 17f94a
#ifndef S_ISREG
Packit Service 17f94a
#define	S_ISREG(mode)	(((mode) & _S_IFREG) == _S_IFREG)
Packit Service 17f94a
#endif
Packit Service 17f94a
Packit Service 17f94a
/*
Packit Service 17f94a
**	Don't know if these are still needed.
Packit Service 17f94a
**
Packit Service 17f94a
**	#define	_IFMT		_S_IFMT
Packit Service 17f94a
**	#define _IFREG		_S_IFREG
Packit Service 17f94a
*/
Packit Service 17f94a