]> sourceware.org Git - newlib-cygwin.git/blame - winsup/cygserver/woutsup.h
Remove dependency from Cygwin internal code.
[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
26#define WIN32_LEAN_AND_MEAN 1
27#define _WINGDI_H
28#define _WINUSER_H
29#define _WINNLS_H
30#define _WINVER_H
31#define _WINNETWK_H
32#define _WINSVC_H
33#include <windows.h>
34#include <wincrypt.h>
35#include <lmcons.h>
36#undef _WINGDI_H
37#undef _WINUSER_H
38#undef _WINNLS_H
39#undef _WINVER_H
40#undef _WINNETWK_H
41#undef _WINSVC_H
42
282113ba
CV
43#include "bsd_helper.h"
44#include "bsd_log.h"
45#include "bsd_mutex.h"
46
1c001dd2
CS
47/* The one function we use from winuser.h most of the time */
48extern "C" DWORD WINAPI GetLastError (void);
49
50extern int cygserver_running;
51
282113ba
CV
52#define SIGHANDLE(SIG) \
53 do \
54 { \
55 struct sigaction act; \
56 \
57 act.sa_handler = &handle_signal; \
58 act.sa_mask = 0; \
59 act.sa_flags = 0; \
60 \
61 if (sigaction (SIG, &act, NULL) == -1) \
62 { \
63 panic ("failed to install handler for " #SIG ": %s", \
64 strerror (errno)); \
65 exit (1); \
66 } \
1c001dd2
CS
67 } while (false)
68
282113ba
CV
69#define debug_printf(f,...) debug((f),##__VA_ARGS__)
70#define syscall_printf(f,...) log(LOG_ERR,(f),##__VA_ARGS__)
71#define system_printf(f,...) log(LOG_ERR,(f),##__VA_ARGS__)
This page took 0.118225 seconds and 5 git commands to generate.