- Wait for mouse acks properly.
[cake.git] / compiler / clib / umask.c
blob9991d822ed15689cfa668044a0bf8ad80b300790
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include "__arosc_privdata.h"
8 #include <aros/symbolsets.h>
9 #include <sys/types.h>
10 #include <sys/stat.h>
12 #warning FIXME: Implement umask() properly
14 /*****************************************************************************
16 NAME */
18 mode_t umask(
20 /* SYNOPSIS */
21 mode_t numask)
23 /* FUNCTION
25 INPUTS
27 RESULT
29 NOTES
31 EXAMPLE
33 BUGS
35 SEE ALSO
37 INTERNALS
39 ******************************************************************************/
41 mode_t oumask = __umask;
43 __umask = numask;
45 return oumask;
48 static int __umask_init(void)
50 struct arosc_privdata *privdata = __get_arosc_privdata();
52 if (privdata->acpd_oldprivdata)
53 privdata->acpd_umask = privdata->acpd_oldprivdata->acpd_umask;
54 else
55 privdata->acpd_umask = S_IWGRP|S_IWOTH;
57 return 1;
60 ADD2INIT(__umask_init, 0);