Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
46 lines (38 sloc) 983 Bytes
/*
* Copyright (c) 1998, 2000, 01
* Motoyuki Kasahara
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, 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 General Public License for more details.
*/
/*
* This program requires the following Autoconf macros:
* AC_TYPE_MODE_T
* AC_CHECK_HEADERS(unistd.h)
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <sys/types.h>
#include <sys/stat.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
/*
* Get the current umask.
*/
mode_t
get_umask()
{
mode_t current_umask;
current_umask = umask(022);
umask(current_umask);
return current_umask;
}