purge remaining gpl code from clib, and make clib build again
[tangerine.git] / compiler / clib / umask.c
blobebb4999ab8bd666e0a8f6c4936b4f67b1e0b293c
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
13 mode_t umask(mode_t numask)
15 mode_t oumask = __umask;
17 __umask = numask;
19 return oumask;
22 static int __umask_init(void)
24 struct arosc_privdata *privdata = __get_arosc_privdata();
26 if (privdata->acpd_oldprivdata)
27 privdata->acpd_umask = privdata->acpd_oldprivdata->acpd_umask;
28 else
29 privdata->acpd_umask = S_IWGRP|S_IWOTH;
31 return 1;
34 ADD2INIT(__umask_init, 0);