]> sourceware.org Git - newlib-cygwin.git/blob - winsup/cygserver/woutsup.h
cygserver: Only print basename of source in debug output to raise readability
[newlib-cygwin.git] / winsup / cygserver / woutsup.h
1 /* woutsup.h: for Cygwin code compiled outside the DLL (i.e. cygserver).
2
3 This file is part of Cygwin.
4
5 This software is a copyrighted work licensed under the terms of the
6 Cygwin license. Please consult the file "CYGWIN_LICENSE" for
7 details. */
8
9 #define _MT_SAFE 1
10
11 #ifdef __INSIDE_CYGWIN__
12 #error "woutsup.h is not for code being compiled inside the dll"
13 #endif
14
15 #ifndef _WIN32_WINNT
16 #define _WIN32_WINNT 0x0500
17 #endif
18
19 #if _WIN32_WINNT < 0x0500
20 #undef _WIN32_WINNT
21 #define _WIN32_WINNT 0x0500
22 #endif
23
24 #include "winlean.h"
25
26 #include "bsd_helper.h"
27 #include "bsd_log.h"
28 #include "bsd_mutex.h"
29
30 /* The one function we use from winuser.h most of the time */
31 extern "C" DWORD WINAPI GetLastError (void);
32
33 extern int cygserver_running;
34
35 #define SIGHANDLE(SIG) \
36 do \
37 { \
38 struct sigaction act; \
39 \
40 act.sa_handler = &handle_signal; \
41 act.sa_mask = 0; \
42 act.sa_flags = 0; \
43 \
44 if (sigaction (SIG, &act, NULL) == -1) \
45 { \
46 panic ("failed to install handler for " #SIG ": %s", \
47 strerror (errno)); \
48 exit (1); \
49 } \
50 } while (false)
51
52 #define debug_printf(f,...) debug((f),##__VA_ARGS__)
53 #define syscall_printf(f,...) log(LOG_ERR,(f),##__VA_ARGS__)
54 #define system_printf(f,...) log(LOG_ERR,(f),##__VA_ARGS__)
This page took 0.036571 seconds and 5 git commands to generate.