haiku/src/system/libroot/posix/sys/umask.c
Axel Dörfler 160f2d1081 * Added private header defining __gUmask which is now used everywhere where
needed.
* Some cleanup in Directory.cpp, and File.cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31086 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-17 14:09:40 +00:00

27 lines
388 B
C

/*
* Copyright 2004-2009, Axel Dörfler, axeld@pinc-software.de.
* Distributed under the terms of the MIT License.
*/
#include <sys/stat.h>
#include <errno.h>
#include <syscalls.h>
#include <umask.h>
mode_t __gUmask = 022;
// this must be made available to open() and friends
mode_t
umask(mode_t newMask)
{
mode_t oldMask = __gUmask;
__gUmask = newMask;
return oldMask;
}