Statistics
| Branch: | Revision:

root / qemu-os-win32.h @ 0056c093

History | View | Annotate | Download (1.9 kB)

1 39626c03 Jes Sorensen
/*
2 39626c03 Jes Sorensen
 * win32 specific declarations
3 39626c03 Jes Sorensen
 *
4 39626c03 Jes Sorensen
 * Copyright (c) 2003-2008 Fabrice Bellard
5 39626c03 Jes Sorensen
 * Copyright (c) 2010 Jes Sorensen <Jes.Sorensen@redhat.com>
6 39626c03 Jes Sorensen
 *
7 39626c03 Jes Sorensen
 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 39626c03 Jes Sorensen
 * of this software and associated documentation files (the "Software"), to deal
9 39626c03 Jes Sorensen
 * in the Software without restriction, including without limitation the rights
10 39626c03 Jes Sorensen
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 39626c03 Jes Sorensen
 * copies of the Software, and to permit persons to whom the Software is
12 39626c03 Jes Sorensen
 * furnished to do so, subject to the following conditions:
13 39626c03 Jes Sorensen
 *
14 39626c03 Jes Sorensen
 * The above copyright notice and this permission notice shall be included in
15 39626c03 Jes Sorensen
 * all copies or substantial portions of the Software.
16 39626c03 Jes Sorensen
 *
17 39626c03 Jes Sorensen
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 39626c03 Jes Sorensen
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 39626c03 Jes Sorensen
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 39626c03 Jes Sorensen
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 39626c03 Jes Sorensen
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 39626c03 Jes Sorensen
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 39626c03 Jes Sorensen
 * THE SOFTWARE.
24 39626c03 Jes Sorensen
 */
25 39626c03 Jes Sorensen
26 39626c03 Jes Sorensen
#ifndef QEMU_OS_WIN32_H
27 39626c03 Jes Sorensen
#define QEMU_OS_WIN32_H
28 39626c03 Jes Sorensen
29 082b5557 Blue Swirl
#include <windows.h>
30 082b5557 Blue Swirl
#include <winsock2.h>
31 44a9b356 Paolo Bonzini
#include "main-loop.h"
32 082b5557 Blue Swirl
33 077030d1 Stefan Weil
/* Declaration of ffs() is missing in MinGW's strings.h. */
34 077030d1 Stefan Weil
int ffs(int i);
35 077030d1 Stefan Weil
36 8d963e6a Jes Sorensen
static inline void os_setup_signal_handling(void) {}
37 eb505be1 Jes Sorensen
static inline void os_daemonize(void) {}
38 eb505be1 Jes Sorensen
static inline void os_setup_post(void) {}
39 6650b710 Stefan Weil
void os_set_line_buffering(void);
40 ce798cf2 Jes Sorensen
static inline void os_set_proc_name(const char *dummy) {}
41 8d963e6a Jes Sorensen
42 5635efc3 Stefan Weil
#if !defined(EPROTONOSUPPORT)
43 5635efc3 Stefan Weil
# define EPROTONOSUPPORT EINVAL
44 5635efc3 Stefan Weil
#endif
45 5635efc3 Stefan Weil
46 dc786bc9 Jes Sorensen
int setenv(const char *name, const char *value, int overwrite);
47 dc786bc9 Jes Sorensen
48 dc786bc9 Jes Sorensen
typedef struct {
49 dc786bc9 Jes Sorensen
    long tv_sec;
50 dc786bc9 Jes Sorensen
    long tv_usec;
51 dc786bc9 Jes Sorensen
} qemu_timeval;
52 dc786bc9 Jes Sorensen
int qemu_gettimeofday(qemu_timeval *tp);
53 dc786bc9 Jes Sorensen
54 39626c03 Jes Sorensen
#endif