diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2009-07-01 19:11:17 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2009-07-01 19:11:17 +0000 |
commit | 6cb9c6d36f17c964a7e5b56c5452178f0e3abdb4 (patch) | |
tree | 88fe4f534351b5c93a74ef479771fe1acac3e764 | |
parent | 22d091b38d30cc22b923daca8cf0f0c0cffadcd7 (diff) |
Fix breakage by obsolete _P() for good
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
-rw-r--r-- | slirp/ip_icmp.h | 4 | ||||
-rw-r--r-- | slirp/mbuf.h | 16 | ||||
-rw-r--r-- | slirp/misc.h | 32 | ||||
-rw-r--r-- | slirp/sbuf.h | 10 | ||||
-rw-r--r-- | slirp/slirp.h | 81 | ||||
-rw-r--r-- | slirp/socket.h | 28 | ||||
-rw-r--r-- | slirp/tcp_timer.h | 6 | ||||
-rw-r--r-- | slirp/udp.h | 14 |
8 files changed, 92 insertions, 99 deletions
diff --git a/slirp/ip_icmp.h b/slirp/ip_icmp.h index 03301313e0..e793990d28 100644 --- a/slirp/ip_icmp.h +++ b/slirp/ip_icmp.h @@ -153,9 +153,9 @@ struct icmp { (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \ (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY) -void icmp_input _P((struct mbuf *, int)); +void icmp_input(struct mbuf *, int); void icmp_error(struct mbuf *msrc, u_char type, u_char code, int minsize, const char *message); -void icmp_reflect _P((struct mbuf *)); +void icmp_reflect(struct mbuf *); #endif diff --git a/slirp/mbuf.h b/slirp/mbuf.h index 99fca43898..97729e24b0 100644 --- a/slirp/mbuf.h +++ b/slirp/mbuf.h @@ -115,13 +115,13 @@ struct mbuf { #define M_DOFREE 0x08 /* when m_free is called on the mbuf, free() * it rather than putting it on the free list */ -void m_init _P((Slirp *)); -struct mbuf * m_get _P((Slirp *)); -void m_free _P((struct mbuf *)); -void m_cat _P((register struct mbuf *, register struct mbuf *)); -void m_inc _P((struct mbuf *, int)); -void m_adj _P((struct mbuf *, int)); -int m_copy _P((struct mbuf *, struct mbuf *, int, int)); -struct mbuf * dtom _P((Slirp *, void *)); +void m_init(Slirp *); +struct mbuf * m_get(Slirp *); +void m_free(struct mbuf *); +void m_cat(register struct mbuf *, register struct mbuf *); +void m_inc(struct mbuf *, int); +void m_adj(struct mbuf *, int); +int m_copy(struct mbuf *, struct mbuf *, int, int); +struct mbuf * dtom(Slirp *, void *); #endif diff --git a/slirp/misc.h b/slirp/misc.h index e43519dcba..c335394356 100644 --- a/slirp/misc.h +++ b/slirp/misc.h @@ -17,10 +17,10 @@ struct ex_list { }; #ifndef HAVE_STRDUP -char *strdup _P((const char *)); +char *strdup(const char *); #endif -void do_wait _P((int)); +void do_wait(int); #define EMU_NONE 0x0 @@ -58,20 +58,20 @@ struct emu_t { extern int x_port, x_server, x_display; -int show_x _P((char *, struct socket *)); -void redir_x _P((u_int32_t, int, int, int)); -void slirp_insque _P((void *, void *)); -void slirp_remque _P((void *)); -int add_exec _P((struct ex_list **, int, char *, struct in_addr, int)); -int slirp_openpty _P((int *, int *)); +int show_x(char *, struct socket *); +void redir_x(u_int32_t, int, int, int); +void slirp_insque(void *, void *); +void slirp_remque(void *); +int add_exec(struct ex_list **, int, char *, struct in_addr, int); +int slirp_openpty(int *, int *); int fork_exec(struct socket *so, const char *ex, int do_pty); -void snooze_hup _P((int)); -void snooze _P((void)); -void relay _P((int)); -void add_emu _P((char *)); -void u_sleep _P((int)); -void fd_nonblock _P((int)); -void fd_block _P((int)); -int rsh_exec _P((struct socket *, struct socket *, char *, char *, char *)); +void snooze_hup(int); +void snooze(void); +void relay(int); +void add_emu(char *); +void u_sleep(int); +void fd_nonblock(int); +void fd_block(int); +int rsh_exec(struct socket *, struct socket *, char *, char *, char *); #endif diff --git a/slirp/sbuf.h b/slirp/sbuf.h index a4f103623a..4f22e7c388 100644 --- a/slirp/sbuf.h +++ b/slirp/sbuf.h @@ -21,10 +21,10 @@ struct sbuf { char *sb_data; /* Actual data */ }; -void sbfree _P((struct sbuf *)); -void sbdrop _P((struct sbuf *, int)); -void sbreserve _P((struct sbuf *, int)); -void sbappend _P((struct socket *, struct mbuf *)); -void sbcopy _P((struct sbuf *, int, int, char *)); +void sbfree(struct sbuf *); +void sbdrop(struct sbuf *, int); +void sbreserve(struct sbuf *, int); +void sbappend(struct socket *, struct mbuf *); +void sbcopy(struct sbuf *, int, int, char *); #endif diff --git a/slirp/slirp.h b/slirp/slirp.h index 920d7a6213..22058cd05e 100644 --- a/slirp/slirp.h +++ b/slirp/slirp.h @@ -103,13 +103,6 @@ typedef unsigned char u_int8_t; #include <sys/uio.h> #endif -#undef _P -#ifndef NO_PROTOTYPES -# define _P(x) x -#else -# define _P(x) () -#endif - #ifndef _WIN32 #include <netinet/in.h> #include <arpa/inet.h> @@ -121,17 +114,17 @@ typedef unsigned char u_int8_t; /* Systems lacking strdup() definition in <string.h>. */ #if defined(ultrix) -char *strdup _P((const char *)); +char *strdup(const char *); #endif /* Systems lacking malloc() definition in <stdlib.h>. */ #if defined(ultrix) || defined(hcx) -void *malloc _P((size_t arg)); -void free _P((void *ptr)); +void *malloc(size_t arg); +void free(void *ptr); #endif #ifndef HAVE_INET_ATON -int inet_aton _P((const char *cp, struct in_addr *ia)); +int inet_aton(const char *cp, struct in_addr *ia); #endif #include <fcntl.h> @@ -270,38 +263,38 @@ extern Slirp *slirp_instance; #endif #ifndef FULL_BOLT -void if_start _P((Slirp *)); +void if_start(Slirp *); #else -void if_start _P((struct ttys *)); +void if_start(struct ttys *); #endif #ifdef BAD_SPRINTF # define vsprintf vsprintf_len # define sprintf sprintf_len - extern int vsprintf_len _P((char *, const char *, va_list)); - extern int sprintf_len _P((char *, const char *, ...)); + extern int vsprintf_len(char *, const char *, va_list); + extern int sprintf_len(char *, const char *, ...); #endif #ifdef DECLARE_SPRINTF # ifndef BAD_SPRINTF - extern int vsprintf _P((char *, const char *, va_list)); + extern int vsprintf(char *, const char *, va_list); # endif - extern int vfprintf _P((FILE *, const char *, va_list)); + extern int vfprintf(FILE *, const char *, va_list); #endif #ifndef HAVE_STRERROR - extern char *strerror _P((int error)); + extern char *strerror(int error); #endif #ifndef HAVE_INDEX - char *index _P((const char *, int)); + char *index(const char *, int); #endif #ifndef HAVE_GETHOSTID - long gethostid _P((void)); + long gethostid(void); #endif -void lprint _P((const char *, ...)); +void lprint(const char *, ...); #ifndef _WIN32 #include <netdb.h> @@ -316,39 +309,39 @@ void lprint _P((const char *, ...)); int cksum(struct mbuf *m, int len); /* if.c */ -void if_init _P((Slirp *)); -void if_output _P((struct socket *, struct mbuf *)); +void if_init(Slirp *); +void if_output(struct socket *, struct mbuf *); /* ip_input.c */ -void ip_init _P((Slirp *)); -void ip_input _P((struct mbuf *)); -void ip_slowtimo _P((Slirp *)); -void ip_stripoptions _P((register struct mbuf *, struct mbuf *)); +void ip_init(Slirp *); +void ip_input(struct mbuf *); +void ip_slowtimo(Slirp *); +void ip_stripoptions(register struct mbuf *, struct mbuf *); /* ip_output.c */ -int ip_output _P((struct socket *, struct mbuf *)); +int ip_output(struct socket *, struct mbuf *); /* tcp_input.c */ -void tcp_input _P((register struct mbuf *, int, struct socket *)); -int tcp_mss _P((register struct tcpcb *, u_int)); +void tcp_input(register struct mbuf *, int, struct socket *); +int tcp_mss(register struct tcpcb *, u_int); /* tcp_output.c */ -int tcp_output _P((register struct tcpcb *)); -void tcp_setpersist _P((register struct tcpcb *)); +int tcp_output(register struct tcpcb *); +void tcp_setpersist(register struct tcpcb *); /* tcp_subr.c */ -void tcp_init _P((Slirp *)); -void tcp_template _P((struct tcpcb *)); -void tcp_respond _P((struct tcpcb *, register struct tcpiphdr *, register struct mbuf *, tcp_seq, tcp_seq, int)); -struct tcpcb * tcp_newtcpcb _P((struct socket *)); -struct tcpcb * tcp_close _P((register struct tcpcb *)); -void tcp_sockclosed _P((struct tcpcb *)); -int tcp_fconnect _P((struct socket *)); -void tcp_connect _P((struct socket *)); -int tcp_attach _P((struct socket *)); -u_int8_t tcp_tos _P((struct socket *)); -int tcp_emu _P((struct socket *, struct mbuf *)); -int tcp_ctl _P((struct socket *)); +void tcp_init(Slirp *); +void tcp_template(struct tcpcb *); +void tcp_respond(struct tcpcb *, register struct tcpiphdr *, register struct mbuf *, tcp_seq, tcp_seq, int); +struct tcpcb * tcp_newtcpcb(struct socket *); +struct tcpcb * tcp_close(register struct tcpcb *); +void tcp_sockclosed(struct tcpcb *); +int tcp_fconnect(struct socket *); +void tcp_connect(struct socket *); +int tcp_attach(struct socket *); +u_int8_t tcp_tos(struct socket *); +int tcp_emu(struct socket *, struct mbuf *); +int tcp_ctl(struct socket *); struct tcpcb *tcp_drop(struct tcpcb *tp, int err); #ifdef USE_PPP diff --git a/slirp/socket.h b/slirp/socket.h index dcf27430b2..6e85d03588 100644 --- a/slirp/socket.h +++ b/slirp/socket.h @@ -74,20 +74,20 @@ struct socket { #define SS_HOSTFWD 0x1000 /* Socket describes host->guest forwarding */ #define SS_INCOMING 0x2000 /* Connection was initiated by a host on the internet */ -struct socket * solookup _P((struct socket *, struct in_addr, u_int, struct in_addr, u_int)); -struct socket * socreate _P((Slirp *)); -void sofree _P((struct socket *)); -int soread _P((struct socket *)); -void sorecvoob _P((struct socket *)); -int sosendoob _P((struct socket *)); -int sowrite _P((struct socket *)); -void sorecvfrom _P((struct socket *)); -int sosendto _P((struct socket *, struct mbuf *)); -struct socket * tcp_listen _P((Slirp *, u_int32_t, u_int, u_int32_t, u_int, - int)); -void soisfconnecting _P((register struct socket *)); -void soisfconnected _P((register struct socket *)); -void sofwdrain _P((struct socket *)); +struct socket * solookup(struct socket *, struct in_addr, u_int, struct in_addr, u_int); +struct socket * socreate(Slirp *); +void sofree(struct socket *); +int soread(struct socket *); +void sorecvoob(struct socket *); +int sosendoob(struct socket *); +int sowrite(struct socket *); +void sorecvfrom(struct socket *); +int sosendto(struct socket *, struct mbuf *); +struct socket * tcp_listen(Slirp *, u_int32_t, u_int, u_int32_t, u_int, + int); +void soisfconnecting(register struct socket *); +void soisfconnected(register struct socket *); +void sofwdrain(struct socket *); struct iovec; /* For win32 */ size_t sopreprbuf(struct socket *so, struct iovec *iov, int *np); int soreadbuf(struct socket *so, const char *buf, int size); diff --git a/slirp/tcp_timer.h b/slirp/tcp_timer.h index cfb06ffc87..ff17914f41 100644 --- a/slirp/tcp_timer.h +++ b/slirp/tcp_timer.h @@ -120,8 +120,8 @@ extern const int tcp_backoff[]; struct tcpcb; -void tcp_fasttimo _P((Slirp *)); -void tcp_slowtimo _P((Slirp *)); -void tcp_canceltimers _P((struct tcpcb *)); +void tcp_fasttimo(Slirp *); +void tcp_slowtimo(Slirp *); +void tcp_canceltimers(struct tcpcb *); #endif diff --git a/slirp/udp.h b/slirp/udp.h index cc814a3f48..47d2f3d4cd 100644 --- a/slirp/udp.h +++ b/slirp/udp.h @@ -73,13 +73,13 @@ struct udpiphdr { struct mbuf; -void udp_init _P((Slirp *)); -void udp_input _P((register struct mbuf *, int)); -int udp_output _P((struct socket *, struct mbuf *, struct sockaddr_in *)); -int udp_attach _P((struct socket *)); -void udp_detach _P((struct socket *)); -struct socket * udp_listen _P((Slirp *, u_int32_t, u_int, u_int32_t, u_int, - int)); +void udp_init(Slirp *); +void udp_input(register struct mbuf *, int); +int udp_output(struct socket *, struct mbuf *, struct sockaddr_in *); +int udp_attach(struct socket *); +void udp_detach(struct socket *); +struct socket * udp_listen(Slirp *, u_int32_t, u_int, u_int32_t, u_int, + int); int udp_output2(struct socket *so, struct mbuf *m, struct sockaddr_in *saddr, struct sockaddr_in *daddr, int iptos); |