Make UEFI boot-platform build again
[haiku.git] / headers / private / libroot / errno_private.h
blobeb776e1596cf2ac6f3e78098827d2ebf0457491b
1 /*
2 * Copyright 2011, Oliver Tappe, zooey@hirschkaefer.de.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _ERRNO_PRIVATE_H
6 #define _ERRNO_PRIVATE_H
9 #include <errno.h>
11 //#define TRACE_ERRNO
13 #if defined(TRACE_ERRNO) && !defined(_KERNEL_MODE)
14 # include <OS.h>
15 # define __set_errno(x) \
16 do { \
17 int error = (x); \
18 debug_printf("%s:%d - setting errno to %x\n", __FILE__, __LINE__, \
19 error); \
20 errno = error; \
21 } while (0)
22 #else
23 # define __set_errno(x) \
24 do { errno = (x); } while (0)
25 #endif
28 #endif // _ERRNO_PRIVATE_H