Rudiments: /home/dmuse/temp/rudiments/include/rudiments/private/errorincludes.h Source File

Rudiments

errorincludes.h
1 // Copyright (c) 1999-2018 David Muse
2 // See the COPYING file for more information.
3
4 #include <rudiments/private/dll.h>
5 #include <errno.h>
6 #include <rudiments/private/inttypes.h>
7
8 #ifdef RUDIMENTS_ENOSYS_NOTIFY
9
10 #include <rudiments/stdio.h>
11
12 #ifdef __GNUC__
13 #define RUDIMENTS_CURRENT_FUNCTION __PRETTY_FUNCTION__
14 #else
15 #define RUDIMENTS_CURRENT_FUNCTION __FUNCTION__
16 #endif
17
18
19 #define RUDIMENTS_SET_ENOSYS \
20 { \
21 error::setErrorNumber(ENOSYS); \
22 stderror.printf("warning: %s set ENOSYS\n", \
23 RUDIMENTS_CURRENT_FUNCTION); \
24 }
25
26 #else
27
28 #define RUDIMENTS_SET_ENOSYS \
29 error::setErrorNumber(ENOSYS);
30
31 #endif