Test initialisation of MUIA_List_AdjustWidth and MUIA_List_AdjustHeight, and
[AROS.git] / arch / all-unix / kernel / obtaininput.c
blob8727d7526b31e4677c7e492745c19ad3ebe6835a
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 /*
7 * Include these before AROS includes, because __unused as a macro in AROS,
8 * causing conflicts with __unused being a structure member name in Linux bits/stat.h.
9 */
10 #include <fcntl.h>
11 #include <unistd.h>
13 #include <aros/kernel.h>
14 #include <aros/libcall.h>
16 #include "kernel_base.h"
17 #include "kernel_intern.h"
19 AROS_LH0(int, KrnObtainInput,
20 struct KernelBase *, KernelBase, 33, Kernel)
22 AROS_LIBFUNC_INIT
24 int res;
26 /* Set our STDERR to non-blocking mode for RawMayGetChar() to work */
27 res = KernelBase->kb_PlatformData->iface->fcntl(STDERR_FILENO, F_GETFL);
28 AROS_HOST_BARRIER
29 res = KernelBase->kb_PlatformData->iface->fcntl(STDERR_FILENO, F_SETFL, res|O_NONBLOCK);
30 AROS_HOST_BARRIER
32 return (res == -1) ? 0 : 1;
34 AROS_LIBFUNC_EXIT