Commit 52f61fdeec9debd499776f58ef485df76e4b38a5

Authored by ths
1 parent c26c1c4b

Windows build fix, namespace cleanup, fix error message, by Stefan Weil.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2268 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 23 additions and 19 deletions
... ... @@ -281,7 +281,7 @@ int register_ioport_write(int start, int length, int size,
281 281 for(i = start; i < start + length; i += size) {
282 282 ioport_write_table[bsize][i] = func;
283 283 if (ioport_opaque[i] != NULL && ioport_opaque[i] != opaque)
284   - hw_error("register_ioport_read: invalid opaque");
  284 + hw_error("register_ioport_write: invalid opaque");
285 285 ioport_opaque[i] = opaque;
286 286 }
287 287 return 0;
... ... @@ -1096,7 +1096,7 @@ static void null_chr_add_read_handler(CharDriverState *chr,
1096 1096 {
1097 1097 }
1098 1098  
1099   -CharDriverState *qemu_chr_open_null(void)
  1099 +static CharDriverState *qemu_chr_open_null(void)
1100 1100 {
1101 1101 CharDriverState *chr;
1102 1102  
... ... @@ -1264,7 +1264,7 @@ static void fd_chr_add_read_handler(CharDriverState *chr,
1264 1264 }
1265 1265  
1266 1266 /* open a character device to a unix fd */
1267   -CharDriverState *qemu_chr_open_fd(int fd_in, int fd_out)
  1267 +static CharDriverState *qemu_chr_open_fd(int fd_in, int fd_out)
1268 1268 {
1269 1269 CharDriverState *chr;
1270 1270 FDCharDriver *s;
... ... @@ -1285,7 +1285,7 @@ CharDriverState *qemu_chr_open_fd(int fd_in, int fd_out)
1285 1285 return chr;
1286 1286 }
1287 1287  
1288   -CharDriverState *qemu_chr_open_file_out(const char *file_out)
  1288 +static CharDriverState *qemu_chr_open_file_out(const char *file_out)
1289 1289 {
1290 1290 int fd_out;
1291 1291  
... ... @@ -1295,7 +1295,7 @@ CharDriverState *qemu_chr_open_file_out(const char *file_out)
1295 1295 return qemu_chr_open_fd(-1, fd_out);
1296 1296 }
1297 1297  
1298   -CharDriverState *qemu_chr_open_pipe(const char *filename)
  1298 +static CharDriverState *qemu_chr_open_pipe(const char *filename)
1299 1299 {
1300 1300 int fd_in, fd_out;
1301 1301 char filename_in[256], filename_out[256];
... ... @@ -1520,7 +1520,7 @@ static void term_init(void)
1520 1520 fcntl(0, F_SETFL, O_NONBLOCK);
1521 1521 }
1522 1522  
1523   -CharDriverState *qemu_chr_open_stdio(void)
  1523 +static CharDriverState *qemu_chr_open_stdio(void)
1524 1524 {
1525 1525 CharDriverState *chr;
1526 1526  
... ... @@ -1546,7 +1546,7 @@ CharDriverState *qemu_chr_open_stdio(void)
1546 1546 }
1547 1547  
1548 1548 #if defined(__linux__)
1549   -CharDriverState *qemu_chr_open_pty(void)
  1549 +static CharDriverState *qemu_chr_open_pty(void)
1550 1550 {
1551 1551 struct termios tty;
1552 1552 char slave_name[1024];
... ... @@ -1685,7 +1685,7 @@ static int tty_serial_ioctl(CharDriverState *chr, int cmd, void *arg)
1685 1685 return 0;
1686 1686 }
1687 1687  
1688   -CharDriverState *qemu_chr_open_tty(const char *filename)
  1688 +static CharDriverState *qemu_chr_open_tty(const char *filename)
1689 1689 {
1690 1690 CharDriverState *chr;
1691 1691 int fd;
... ... @@ -1739,7 +1739,7 @@ static int pp_ioctl(CharDriverState *chr, int cmd, void *arg)
1739 1739 return 0;
1740 1740 }
1741 1741  
1742   -CharDriverState *qemu_chr_open_pp(const char *filename)
  1742 +static CharDriverState *qemu_chr_open_pp(const char *filename)
1743 1743 {
1744 1744 CharDriverState *chr;
1745 1745 int fd;
... ... @@ -1766,7 +1766,7 @@ CharDriverState *qemu_chr_open_pp(const char *filename)
1766 1766 }
1767 1767  
1768 1768 #else
1769   -CharDriverState *qemu_chr_open_pty(void)
  1769 +static CharDriverState *qemu_chr_open_pty(void)
1770 1770 {
1771 1771 return NULL;
1772 1772 }
... ... @@ -1984,7 +1984,7 @@ static void win_chr_add_read_handler(CharDriverState *chr,
1984 1984 s->win_opaque = opaque;
1985 1985 }
1986 1986  
1987   -CharDriverState *qemu_chr_open_win(const char *filename)
  1987 +static CharDriverState *qemu_chr_open_win(const char *filename)
1988 1988 {
1989 1989 CharDriverState *chr;
1990 1990 WinCharState *s;
... ... @@ -2087,7 +2087,7 @@ static int win_chr_pipe_init(WinCharState *s, const char *filename)
2087 2087 }
2088 2088  
2089 2089  
2090   -CharDriverState *qemu_chr_open_win_pipe(const char *filename)
  2090 +static CharDriverState *qemu_chr_open_win_pipe(const char *filename)
2091 2091 {
2092 2092 CharDriverState *chr;
2093 2093 WinCharState *s;
... ... @@ -2113,7 +2113,7 @@ CharDriverState *qemu_chr_open_win_pipe(const char *filename)
2113 2113 return chr;
2114 2114 }
2115 2115  
2116   -CharDriverState *qemu_chr_open_win_file(HANDLE fd_out)
  2116 +static CharDriverState *qemu_chr_open_win_file(HANDLE fd_out)
2117 2117 {
2118 2118 CharDriverState *chr;
2119 2119 WinCharState *s;
... ... @@ -2133,7 +2133,7 @@ CharDriverState *qemu_chr_open_win_file(HANDLE fd_out)
2133 2133 return chr;
2134 2134 }
2135 2135  
2136   -CharDriverState *qemu_chr_open_win_file_out(const char *file_out)
  2136 +static CharDriverState *qemu_chr_open_win_file_out(const char *file_out)
2137 2137 {
2138 2138 HANDLE fd_out;
2139 2139  
... ... @@ -2223,12 +2223,14 @@ static void udp_chr_add_read_handler(CharDriverState *chr,
2223 2223 }
2224 2224  
2225 2225 int parse_host_port(struct sockaddr_in *saddr, const char *str);
2226   -int parse_unix_path(struct sockaddr_un *uaddr, const char *str);
  2226 +#ifndef _WIN32
  2227 +static int parse_unix_path(struct sockaddr_un *uaddr, const char *str);
  2228 +#endif
2227 2229 int parse_host_src_port(struct sockaddr_in *haddr,
2228 2230 struct sockaddr_in *saddr,
2229 2231 const char *str);
2230 2232  
2231   -CharDriverState *qemu_chr_open_udp(const char *def)
  2233 +static CharDriverState *qemu_chr_open_udp(const char *def)
2232 2234 {
2233 2235 CharDriverState *chr = NULL;
2234 2236 NetCharDriver *s = NULL;
... ... @@ -2818,7 +2820,8 @@ int parse_host_port(struct sockaddr_in *saddr, const char *str)
2818 2820 return 0;
2819 2821 }
2820 2822  
2821   -int parse_unix_path(struct sockaddr_un *uaddr, const char *str)
  2823 +#ifndef _WIN32
  2824 +static int parse_unix_path(struct sockaddr_un *uaddr, const char *str)
2822 2825 {
2823 2826 const char *p;
2824 2827 int len;
... ... @@ -2835,6 +2838,7 @@ int parse_unix_path(struct sockaddr_un *uaddr, const char *str)
2835 2838  
2836 2839 return 0;
2837 2840 }
  2841 +#endif
2838 2842  
2839 2843 /* find or alloc a new VLAN */
2840 2844 VLANState *qemu_find_vlan(int id)
... ... @@ -3691,7 +3695,7 @@ static int get_param_value(char *buf, int buf_size,
3691 3695 return 0;
3692 3696 }
3693 3697  
3694   -int net_client_init(const char *str)
  3698 +static int net_client_init(const char *str)
3695 3699 {
3696 3700 const char *p;
3697 3701 char *q;
... ... @@ -5880,7 +5884,7 @@ void qemu_register_reset(QEMUResetHandler *func, void *opaque)
5880 5884 *pre = re;
5881 5885 }
5882 5886  
5883   -void qemu_system_reset(void)
  5887 +static void qemu_system_reset(void)
5884 5888 {
5885 5889 QEMUResetEntry *re;
5886 5890  
... ...