Merge "Define DEFFILEMODE and friends"

This commit is contained in:
Elliott Hughes 2012-11-29 14:31:19 -08:00 committed by Gerrit Code Review
commit 7811422080
4 changed files with 11 additions and 4 deletions

View File

@ -112,6 +112,13 @@ struct stat {
#define st_mtimensec st_mtime_nsec
#define st_ctimensec st_ctime_nsec
#ifdef __USE_BSD
/* Permission macros provided by glibc for compatibility with BSDs. */
#define ACCESSPERMS (S_IRWXU | S_IRWXG | S_IRWXO) /* 0777 */
#define ALLPERMS (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO) /* 07777 */
#define DEFFILEMODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH) /* 0666 */
#endif
extern int chmod(const char *, mode_t);
extern int fchmod(int, mode_t);
extern int mkdir(const char *, mode_t);

View File

@ -31,6 +31,8 @@
* SUCH DAMAGE.
*/
#define __USE_BSD
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

View File

@ -31,6 +31,8 @@
* SUCH DAMAGE.
*/
#define __USE_BSD
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

View File

@ -35,10 +35,6 @@
#include "wcio.h"
#include "fileext.h"
#ifndef DEFFILEMODE
#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
#endif
/*
* Information local to this implementation of stdio,