Commit 6cb9c6d36f17c964a7e5b56c5452178f0e3abdb4
1 parent
22d091b3
Fix breakage by obsolete _P() for good
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Showing
8 changed files
with
92 additions
and
99 deletions
slirp/ip_icmp.h
| @@ -153,9 +153,9 @@ struct icmp { | @@ -153,9 +153,9 @@ struct icmp { | ||
| 153 | (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \ | 153 | (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \ |
| 154 | (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY) | 154 | (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY) |
| 155 | 155 | ||
| 156 | -void icmp_input _P((struct mbuf *, int)); | 156 | +void icmp_input(struct mbuf *, int); |
| 157 | void icmp_error(struct mbuf *msrc, u_char type, u_char code, int minsize, | 157 | void icmp_error(struct mbuf *msrc, u_char type, u_char code, int minsize, |
| 158 | const char *message); | 158 | const char *message); |
| 159 | -void icmp_reflect _P((struct mbuf *)); | 159 | +void icmp_reflect(struct mbuf *); |
| 160 | 160 | ||
| 161 | #endif | 161 | #endif |
slirp/mbuf.h
| @@ -115,13 +115,13 @@ struct mbuf { | @@ -115,13 +115,13 @@ struct mbuf { | ||
| 115 | #define M_DOFREE 0x08 /* when m_free is called on the mbuf, free() | 115 | #define M_DOFREE 0x08 /* when m_free is called on the mbuf, free() |
| 116 | * it rather than putting it on the free list */ | 116 | * it rather than putting it on the free list */ |
| 117 | 117 | ||
| 118 | -void m_init _P((Slirp *)); | ||
| 119 | -struct mbuf * m_get _P((Slirp *)); | ||
| 120 | -void m_free _P((struct mbuf *)); | ||
| 121 | -void m_cat _P((register struct mbuf *, register struct mbuf *)); | ||
| 122 | -void m_inc _P((struct mbuf *, int)); | ||
| 123 | -void m_adj _P((struct mbuf *, int)); | ||
| 124 | -int m_copy _P((struct mbuf *, struct mbuf *, int, int)); | ||
| 125 | -struct mbuf * dtom _P((Slirp *, void *)); | 118 | +void m_init(Slirp *); |
| 119 | +struct mbuf * m_get(Slirp *); | ||
| 120 | +void m_free(struct mbuf *); | ||
| 121 | +void m_cat(register struct mbuf *, register struct mbuf *); | ||
| 122 | +void m_inc(struct mbuf *, int); | ||
| 123 | +void m_adj(struct mbuf *, int); | ||
| 124 | +int m_copy(struct mbuf *, struct mbuf *, int, int); | ||
| 125 | +struct mbuf * dtom(Slirp *, void *); | ||
| 126 | 126 | ||
| 127 | #endif | 127 | #endif |
slirp/misc.h
| @@ -17,10 +17,10 @@ struct ex_list { | @@ -17,10 +17,10 @@ struct ex_list { | ||
| 17 | }; | 17 | }; |
| 18 | 18 | ||
| 19 | #ifndef HAVE_STRDUP | 19 | #ifndef HAVE_STRDUP |
| 20 | -char *strdup _P((const char *)); | 20 | +char *strdup(const char *); |
| 21 | #endif | 21 | #endif |
| 22 | 22 | ||
| 23 | -void do_wait _P((int)); | 23 | +void do_wait(int); |
| 24 | 24 | ||
| 25 | #define EMU_NONE 0x0 | 25 | #define EMU_NONE 0x0 |
| 26 | 26 | ||
| @@ -58,20 +58,20 @@ struct emu_t { | @@ -58,20 +58,20 @@ struct emu_t { | ||
| 58 | 58 | ||
| 59 | extern int x_port, x_server, x_display; | 59 | extern int x_port, x_server, x_display; |
| 60 | 60 | ||
| 61 | -int show_x _P((char *, struct socket *)); | ||
| 62 | -void redir_x _P((u_int32_t, int, int, int)); | ||
| 63 | -void slirp_insque _P((void *, void *)); | ||
| 64 | -void slirp_remque _P((void *)); | ||
| 65 | -int add_exec _P((struct ex_list **, int, char *, struct in_addr, int)); | ||
| 66 | -int slirp_openpty _P((int *, int *)); | 61 | +int show_x(char *, struct socket *); |
| 62 | +void redir_x(u_int32_t, int, int, int); | ||
| 63 | +void slirp_insque(void *, void *); | ||
| 64 | +void slirp_remque(void *); | ||
| 65 | +int add_exec(struct ex_list **, int, char *, struct in_addr, int); | ||
| 66 | +int slirp_openpty(int *, int *); | ||
| 67 | int fork_exec(struct socket *so, const char *ex, int do_pty); | 67 | int fork_exec(struct socket *so, const char *ex, int do_pty); |
| 68 | -void snooze_hup _P((int)); | ||
| 69 | -void snooze _P((void)); | ||
| 70 | -void relay _P((int)); | ||
| 71 | -void add_emu _P((char *)); | ||
| 72 | -void u_sleep _P((int)); | ||
| 73 | -void fd_nonblock _P((int)); | ||
| 74 | -void fd_block _P((int)); | ||
| 75 | -int rsh_exec _P((struct socket *, struct socket *, char *, char *, char *)); | 68 | +void snooze_hup(int); |
| 69 | +void snooze(void); | ||
| 70 | +void relay(int); | ||
| 71 | +void add_emu(char *); | ||
| 72 | +void u_sleep(int); | ||
| 73 | +void fd_nonblock(int); | ||
| 74 | +void fd_block(int); | ||
| 75 | +int rsh_exec(struct socket *, struct socket *, char *, char *, char *); | ||
| 76 | 76 | ||
| 77 | #endif | 77 | #endif |
slirp/sbuf.h
| @@ -21,10 +21,10 @@ struct sbuf { | @@ -21,10 +21,10 @@ struct sbuf { | ||
| 21 | char *sb_data; /* Actual data */ | 21 | char *sb_data; /* Actual data */ |
| 22 | }; | 22 | }; |
| 23 | 23 | ||
| 24 | -void sbfree _P((struct sbuf *)); | ||
| 25 | -void sbdrop _P((struct sbuf *, int)); | ||
| 26 | -void sbreserve _P((struct sbuf *, int)); | ||
| 27 | -void sbappend _P((struct socket *, struct mbuf *)); | ||
| 28 | -void sbcopy _P((struct sbuf *, int, int, char *)); | 24 | +void sbfree(struct sbuf *); |
| 25 | +void sbdrop(struct sbuf *, int); | ||
| 26 | +void sbreserve(struct sbuf *, int); | ||
| 27 | +void sbappend(struct socket *, struct mbuf *); | ||
| 28 | +void sbcopy(struct sbuf *, int, int, char *); | ||
| 29 | 29 | ||
| 30 | #endif | 30 | #endif |
slirp/slirp.h
| @@ -103,13 +103,6 @@ typedef unsigned char u_int8_t; | @@ -103,13 +103,6 @@ typedef unsigned char u_int8_t; | ||
| 103 | #include <sys/uio.h> | 103 | #include <sys/uio.h> |
| 104 | #endif | 104 | #endif |
| 105 | 105 | ||
| 106 | -#undef _P | ||
| 107 | -#ifndef NO_PROTOTYPES | ||
| 108 | -# define _P(x) x | ||
| 109 | -#else | ||
| 110 | -# define _P(x) () | ||
| 111 | -#endif | ||
| 112 | - | ||
| 113 | #ifndef _WIN32 | 106 | #ifndef _WIN32 |
| 114 | #include <netinet/in.h> | 107 | #include <netinet/in.h> |
| 115 | #include <arpa/inet.h> | 108 | #include <arpa/inet.h> |
| @@ -121,17 +114,17 @@ typedef unsigned char u_int8_t; | @@ -121,17 +114,17 @@ typedef unsigned char u_int8_t; | ||
| 121 | 114 | ||
| 122 | /* Systems lacking strdup() definition in <string.h>. */ | 115 | /* Systems lacking strdup() definition in <string.h>. */ |
| 123 | #if defined(ultrix) | 116 | #if defined(ultrix) |
| 124 | -char *strdup _P((const char *)); | 117 | +char *strdup(const char *); |
| 125 | #endif | 118 | #endif |
| 126 | 119 | ||
| 127 | /* Systems lacking malloc() definition in <stdlib.h>. */ | 120 | /* Systems lacking malloc() definition in <stdlib.h>. */ |
| 128 | #if defined(ultrix) || defined(hcx) | 121 | #if defined(ultrix) || defined(hcx) |
| 129 | -void *malloc _P((size_t arg)); | ||
| 130 | -void free _P((void *ptr)); | 122 | +void *malloc(size_t arg); |
| 123 | +void free(void *ptr); | ||
| 131 | #endif | 124 | #endif |
| 132 | 125 | ||
| 133 | #ifndef HAVE_INET_ATON | 126 | #ifndef HAVE_INET_ATON |
| 134 | -int inet_aton _P((const char *cp, struct in_addr *ia)); | 127 | +int inet_aton(const char *cp, struct in_addr *ia); |
| 135 | #endif | 128 | #endif |
| 136 | 129 | ||
| 137 | #include <fcntl.h> | 130 | #include <fcntl.h> |
| @@ -270,38 +263,38 @@ extern Slirp *slirp_instance; | @@ -270,38 +263,38 @@ extern Slirp *slirp_instance; | ||
| 270 | #endif | 263 | #endif |
| 271 | 264 | ||
| 272 | #ifndef FULL_BOLT | 265 | #ifndef FULL_BOLT |
| 273 | -void if_start _P((Slirp *)); | 266 | +void if_start(Slirp *); |
| 274 | #else | 267 | #else |
| 275 | -void if_start _P((struct ttys *)); | 268 | +void if_start(struct ttys *); |
| 276 | #endif | 269 | #endif |
| 277 | 270 | ||
| 278 | #ifdef BAD_SPRINTF | 271 | #ifdef BAD_SPRINTF |
| 279 | # define vsprintf vsprintf_len | 272 | # define vsprintf vsprintf_len |
| 280 | # define sprintf sprintf_len | 273 | # define sprintf sprintf_len |
| 281 | - extern int vsprintf_len _P((char *, const char *, va_list)); | ||
| 282 | - extern int sprintf_len _P((char *, const char *, ...)); | 274 | + extern int vsprintf_len(char *, const char *, va_list); |
| 275 | + extern int sprintf_len(char *, const char *, ...); | ||
| 283 | #endif | 276 | #endif |
| 284 | 277 | ||
| 285 | #ifdef DECLARE_SPRINTF | 278 | #ifdef DECLARE_SPRINTF |
| 286 | # ifndef BAD_SPRINTF | 279 | # ifndef BAD_SPRINTF |
| 287 | - extern int vsprintf _P((char *, const char *, va_list)); | 280 | + extern int vsprintf(char *, const char *, va_list); |
| 288 | # endif | 281 | # endif |
| 289 | - extern int vfprintf _P((FILE *, const char *, va_list)); | 282 | + extern int vfprintf(FILE *, const char *, va_list); |
| 290 | #endif | 283 | #endif |
| 291 | 284 | ||
| 292 | #ifndef HAVE_STRERROR | 285 | #ifndef HAVE_STRERROR |
| 293 | - extern char *strerror _P((int error)); | 286 | + extern char *strerror(int error); |
| 294 | #endif | 287 | #endif |
| 295 | 288 | ||
| 296 | #ifndef HAVE_INDEX | 289 | #ifndef HAVE_INDEX |
| 297 | - char *index _P((const char *, int)); | 290 | + char *index(const char *, int); |
| 298 | #endif | 291 | #endif |
| 299 | 292 | ||
| 300 | #ifndef HAVE_GETHOSTID | 293 | #ifndef HAVE_GETHOSTID |
| 301 | - long gethostid _P((void)); | 294 | + long gethostid(void); |
| 302 | #endif | 295 | #endif |
| 303 | 296 | ||
| 304 | -void lprint _P((const char *, ...)); | 297 | +void lprint(const char *, ...); |
| 305 | 298 | ||
| 306 | #ifndef _WIN32 | 299 | #ifndef _WIN32 |
| 307 | #include <netdb.h> | 300 | #include <netdb.h> |
| @@ -316,39 +309,39 @@ void lprint _P((const char *, ...)); | @@ -316,39 +309,39 @@ void lprint _P((const char *, ...)); | ||
| 316 | int cksum(struct mbuf *m, int len); | 309 | int cksum(struct mbuf *m, int len); |
| 317 | 310 | ||
| 318 | /* if.c */ | 311 | /* if.c */ |
| 319 | -void if_init _P((Slirp *)); | ||
| 320 | -void if_output _P((struct socket *, struct mbuf *)); | 312 | +void if_init(Slirp *); |
| 313 | +void if_output(struct socket *, struct mbuf *); | ||
| 321 | 314 | ||
| 322 | /* ip_input.c */ | 315 | /* ip_input.c */ |
| 323 | -void ip_init _P((Slirp *)); | ||
| 324 | -void ip_input _P((struct mbuf *)); | ||
| 325 | -void ip_slowtimo _P((Slirp *)); | ||
| 326 | -void ip_stripoptions _P((register struct mbuf *, struct mbuf *)); | 316 | +void ip_init(Slirp *); |
| 317 | +void ip_input(struct mbuf *); | ||
| 318 | +void ip_slowtimo(Slirp *); | ||
| 319 | +void ip_stripoptions(register struct mbuf *, struct mbuf *); | ||
| 327 | 320 | ||
| 328 | /* ip_output.c */ | 321 | /* ip_output.c */ |
| 329 | -int ip_output _P((struct socket *, struct mbuf *)); | 322 | +int ip_output(struct socket *, struct mbuf *); |
| 330 | 323 | ||
| 331 | /* tcp_input.c */ | 324 | /* tcp_input.c */ |
| 332 | -void tcp_input _P((register struct mbuf *, int, struct socket *)); | ||
| 333 | -int tcp_mss _P((register struct tcpcb *, u_int)); | 325 | +void tcp_input(register struct mbuf *, int, struct socket *); |
| 326 | +int tcp_mss(register struct tcpcb *, u_int); | ||
| 334 | 327 | ||
| 335 | /* tcp_output.c */ | 328 | /* tcp_output.c */ |
| 336 | -int tcp_output _P((register struct tcpcb *)); | ||
| 337 | -void tcp_setpersist _P((register struct tcpcb *)); | 329 | +int tcp_output(register struct tcpcb *); |
| 330 | +void tcp_setpersist(register struct tcpcb *); | ||
| 338 | 331 | ||
| 339 | /* tcp_subr.c */ | 332 | /* tcp_subr.c */ |
| 340 | -void tcp_init _P((Slirp *)); | ||
| 341 | -void tcp_template _P((struct tcpcb *)); | ||
| 342 | -void tcp_respond _P((struct tcpcb *, register struct tcpiphdr *, register struct mbuf *, tcp_seq, tcp_seq, int)); | ||
| 343 | -struct tcpcb * tcp_newtcpcb _P((struct socket *)); | ||
| 344 | -struct tcpcb * tcp_close _P((register struct tcpcb *)); | ||
| 345 | -void tcp_sockclosed _P((struct tcpcb *)); | ||
| 346 | -int tcp_fconnect _P((struct socket *)); | ||
| 347 | -void tcp_connect _P((struct socket *)); | ||
| 348 | -int tcp_attach _P((struct socket *)); | ||
| 349 | -u_int8_t tcp_tos _P((struct socket *)); | ||
| 350 | -int tcp_emu _P((struct socket *, struct mbuf *)); | ||
| 351 | -int tcp_ctl _P((struct socket *)); | 333 | +void tcp_init(Slirp *); |
| 334 | +void tcp_template(struct tcpcb *); | ||
| 335 | +void tcp_respond(struct tcpcb *, register struct tcpiphdr *, register struct mbuf *, tcp_seq, tcp_seq, int); | ||
| 336 | +struct tcpcb * tcp_newtcpcb(struct socket *); | ||
| 337 | +struct tcpcb * tcp_close(register struct tcpcb *); | ||
| 338 | +void tcp_sockclosed(struct tcpcb *); | ||
| 339 | +int tcp_fconnect(struct socket *); | ||
| 340 | +void tcp_connect(struct socket *); | ||
| 341 | +int tcp_attach(struct socket *); | ||
| 342 | +u_int8_t tcp_tos(struct socket *); | ||
| 343 | +int tcp_emu(struct socket *, struct mbuf *); | ||
| 344 | +int tcp_ctl(struct socket *); | ||
| 352 | struct tcpcb *tcp_drop(struct tcpcb *tp, int err); | 345 | struct tcpcb *tcp_drop(struct tcpcb *tp, int err); |
| 353 | 346 | ||
| 354 | #ifdef USE_PPP | 347 | #ifdef USE_PPP |
slirp/socket.h
| @@ -74,20 +74,20 @@ struct socket { | @@ -74,20 +74,20 @@ struct socket { | ||
| 74 | #define SS_HOSTFWD 0x1000 /* Socket describes host->guest forwarding */ | 74 | #define SS_HOSTFWD 0x1000 /* Socket describes host->guest forwarding */ |
| 75 | #define SS_INCOMING 0x2000 /* Connection was initiated by a host on the internet */ | 75 | #define SS_INCOMING 0x2000 /* Connection was initiated by a host on the internet */ |
| 76 | 76 | ||
| 77 | -struct socket * solookup _P((struct socket *, struct in_addr, u_int, struct in_addr, u_int)); | ||
| 78 | -struct socket * socreate _P((Slirp *)); | ||
| 79 | -void sofree _P((struct socket *)); | ||
| 80 | -int soread _P((struct socket *)); | ||
| 81 | -void sorecvoob _P((struct socket *)); | ||
| 82 | -int sosendoob _P((struct socket *)); | ||
| 83 | -int sowrite _P((struct socket *)); | ||
| 84 | -void sorecvfrom _P((struct socket *)); | ||
| 85 | -int sosendto _P((struct socket *, struct mbuf *)); | ||
| 86 | -struct socket * tcp_listen _P((Slirp *, u_int32_t, u_int, u_int32_t, u_int, | ||
| 87 | - int)); | ||
| 88 | -void soisfconnecting _P((register struct socket *)); | ||
| 89 | -void soisfconnected _P((register struct socket *)); | ||
| 90 | -void sofwdrain _P((struct socket *)); | 77 | +struct socket * solookup(struct socket *, struct in_addr, u_int, struct in_addr, u_int); |
| 78 | +struct socket * socreate(Slirp *); | ||
| 79 | +void sofree(struct socket *); | ||
| 80 | +int soread(struct socket *); | ||
| 81 | +void sorecvoob(struct socket *); | ||
| 82 | +int sosendoob(struct socket *); | ||
| 83 | +int sowrite(struct socket *); | ||
| 84 | +void sorecvfrom(struct socket *); | ||
| 85 | +int sosendto(struct socket *, struct mbuf *); | ||
| 86 | +struct socket * tcp_listen(Slirp *, u_int32_t, u_int, u_int32_t, u_int, | ||
| 87 | + int); | ||
| 88 | +void soisfconnecting(register struct socket *); | ||
| 89 | +void soisfconnected(register struct socket *); | ||
| 90 | +void sofwdrain(struct socket *); | ||
| 91 | struct iovec; /* For win32 */ | 91 | struct iovec; /* For win32 */ |
| 92 | size_t sopreprbuf(struct socket *so, struct iovec *iov, int *np); | 92 | size_t sopreprbuf(struct socket *so, struct iovec *iov, int *np); |
| 93 | int soreadbuf(struct socket *so, const char *buf, int size); | 93 | int soreadbuf(struct socket *so, const char *buf, int size); |
slirp/tcp_timer.h
| @@ -120,8 +120,8 @@ extern const int tcp_backoff[]; | @@ -120,8 +120,8 @@ extern const int tcp_backoff[]; | ||
| 120 | 120 | ||
| 121 | struct tcpcb; | 121 | struct tcpcb; |
| 122 | 122 | ||
| 123 | -void tcp_fasttimo _P((Slirp *)); | ||
| 124 | -void tcp_slowtimo _P((Slirp *)); | ||
| 125 | -void tcp_canceltimers _P((struct tcpcb *)); | 123 | +void tcp_fasttimo(Slirp *); |
| 124 | +void tcp_slowtimo(Slirp *); | ||
| 125 | +void tcp_canceltimers(struct tcpcb *); | ||
| 126 | 126 | ||
| 127 | #endif | 127 | #endif |
slirp/udp.h
| @@ -73,13 +73,13 @@ struct udpiphdr { | @@ -73,13 +73,13 @@ struct udpiphdr { | ||
| 73 | 73 | ||
| 74 | struct mbuf; | 74 | struct mbuf; |
| 75 | 75 | ||
| 76 | -void udp_init _P((Slirp *)); | ||
| 77 | -void udp_input _P((register struct mbuf *, int)); | ||
| 78 | -int udp_output _P((struct socket *, struct mbuf *, struct sockaddr_in *)); | ||
| 79 | -int udp_attach _P((struct socket *)); | ||
| 80 | -void udp_detach _P((struct socket *)); | ||
| 81 | -struct socket * udp_listen _P((Slirp *, u_int32_t, u_int, u_int32_t, u_int, | ||
| 82 | - int)); | 76 | +void udp_init(Slirp *); |
| 77 | +void udp_input(register struct mbuf *, int); | ||
| 78 | +int udp_output(struct socket *, struct mbuf *, struct sockaddr_in *); | ||
| 79 | +int udp_attach(struct socket *); | ||
| 80 | +void udp_detach(struct socket *); | ||
| 81 | +struct socket * udp_listen(Slirp *, u_int32_t, u_int, u_int32_t, u_int, | ||
| 82 | + int); | ||
| 83 | int udp_output2(struct socket *so, struct mbuf *m, | 83 | int udp_output2(struct socket *so, struct mbuf *m, |
| 84 | struct sockaddr_in *saddr, struct sockaddr_in *daddr, | 84 | struct sockaddr_in *saddr, struct sockaddr_in *daddr, |
| 85 | int iptos); | 85 | int iptos); |