From: Paul Mackerras Date: Mon, 8 Mar 1999 05:34:46 +0000 (+0000) Subject: minor changes so it compiles with pre-ansi compiler; X-Git-Tag: RELEASE_2_3_6~3 X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=commitdiff_plain;h=baef0b4051b99779132e712a304c0fe52ab9042e minor changes so it compiles with pre-ansi compiler; move hangup_modem back into main.c --- diff --git a/pppd/ipcp.c b/pppd/ipcp.c index 724a86b..225e30a 100644 --- a/pppd/ipcp.c +++ b/pppd/ipcp.c @@ -18,7 +18,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: ipcp.c,v 1.36 1999/03/02 05:35:09 paulus Exp $"; +static char rcsid[] = "$Id: ipcp.c,v 1.37 1999/03/08 05:34:43 paulus Exp $"; #endif /* @@ -1605,7 +1605,8 @@ ipcp_finished(f) * has finished. */ static void -ipcp_script_done(void *arg) +ipcp_script_done(arg) + void *arg; { ipcp_script_pid = 0; switch (ipcp_script_state) { diff --git a/pppd/main.c b/pppd/main.c index 4ec593e..0921954 100644 --- a/pppd/main.c +++ b/pppd/main.c @@ -18,7 +18,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: main.c,v 1.56 1999/03/06 11:28:10 paulus Exp $"; +static char rcsid[] = "$Id: main.c,v 1.57 1999/03/08 05:34:43 paulus Exp $"; #endif #include @@ -854,6 +854,15 @@ close_tty() ttyfd = -1; } +/* + * hangup_modem - hang up the modem by clearing DTR. + */ +void hangup_modem(ttyfd) + int ttyfd; +{ + setdtr(ttyfd, 0); +} + struct callout { struct timeval c_time; /* time at which to call routine */ diff --git a/pppd/options.c b/pppd/options.c index cc70023..2371ed3 100644 --- a/pppd/options.c +++ b/pppd/options.c @@ -18,7 +18,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: options.c,v 1.49 1999/03/08 01:47:24 paulus Exp $"; +static char rcsid[] = "$Id: options.c,v 1.50 1999/03/08 05:34:44 paulus Exp $"; #endif #include @@ -472,7 +472,8 @@ options_for_tty() * This could be optimized by using a hash table. */ static option_t * -find_option(char *name) +find_option(name) + char *name; { option_t *opt; int i; @@ -617,7 +618,8 @@ process_option(opt, argv) * n_arguments - tell how many arguments an option takes */ static int -n_arguments(option_t *opt) +n_arguments(opt) + option_t *opt; { return (opt->type == o_bool || opt->type == o_special_noarg || (opt->flags & OPT_NOARG))? 0: 1; diff --git a/pppd/pppd.h b/pppd/pppd.h index 509015c..2388b78 100644 --- a/pppd/pppd.h +++ b/pppd/pppd.h @@ -16,7 +16,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: pppd.h,v 1.27 1999/03/06 11:28:11 paulus Exp $ + * $Id: pppd.h,v 1.28 1999/03/08 05:34:45 paulus Exp $ */ /* @@ -244,6 +244,7 @@ int fmtmsg __P((char *, int, char *, ...)); /* sprintf++ */ int vfmtmsg __P((char *, int, char *, va_list)); /* vsprintf++ */ void script_setenv __P((char *, char *)); /* set script env var */ void script_unsetenv __P((char *)); /* unset script env var */ +void hangup_modem __P((int)); /* Make modem hang up */ /* Procedures exported from auth.c */ void link_required __P((int)); /* we are starting to use the link */ @@ -345,7 +346,6 @@ void logwtmp __P((const char *, const char *, const char *)); /* Write entry to wtmp file */ int get_host_seed __P((void)); /* Get host-dependent random number seed */ int have_route_to __P((u_int32_t)); /* Check if route to addr exists */ -void hangup_modem __P((int)); /* Make modem hang up */ #ifdef PPP_FILTER int set_filters __P((struct bpf_program *pass, struct bpf_program *active)); /* Set filter programs in kernel */ diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c index 061a94f..7514063 100644 --- a/pppd/sys-linux.c +++ b/pppd/sys-linux.c @@ -741,14 +741,6 @@ void set_up_tty(int tty_fd, int local) restore_term = TRUE; } -/* - * hangup_modem - hang up the modem by clearing DTR. - */ -void hangup_modem(int ttyfd) -{ - setdtr(ttyfd, 0); -} - /******************************************************************** * * setdtr - control the DTR line on the serial port. diff --git a/pppd/sys-sunos4.c b/pppd/sys-sunos4.c index 615a548..75bc29f 100644 --- a/pppd/sys-sunos4.c +++ b/pppd/sys-sunos4.c @@ -26,7 +26,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: sys-sunos4.c,v 1.11 1999/03/08 01:46:24 paulus Exp $"; +static char rcsid[] = "$Id: sys-sunos4.c,v 1.12 1999/03/08 05:34:46 paulus Exp $"; #endif #include @@ -1224,7 +1224,8 @@ get_ether_addr(ipaddr, hwaddr) * For demand mode to work properly, we have to ignore routes * through our own interface. */ -int have_route_to(u_int32_t addr) +int have_route_to(addr) + u_int32_t addr; { return -1; } diff --git a/pppd/sys-svr4.c b/pppd/sys-svr4.c index 7724bc6..d525064 100644 --- a/pppd/sys-svr4.c +++ b/pppd/sys-svr4.c @@ -26,7 +26,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: sys-svr4.c,v 1.22 1999/03/08 04:48:48 paulus Exp $"; +static char rcsid[] = "$Id: sys-svr4.c,v 1.23 1999/03/08 05:34:46 paulus Exp $"; #endif #include @@ -628,14 +628,6 @@ restore_tty(fd) } } -/* - * hangup_modem - hang up the modem by clearing DTR. - */ -void hangup_modem(int ttyfd) -{ - setdtr(ttyfd, 0); -} - /* * setdtr - control the DTR line on the serial port. * This is called from die(), so it shouldn't call die().