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