don't build any PPP file if PPP support is disabled

This commit is contained in:
Sylvain Rochet 2012-06-03 16:38:26 +02:00
parent 89d2c2917f
commit 2f5f86d6fc
23 changed files with 78 additions and 38 deletions

View File

@ -69,6 +69,7 @@
*/
#include "lwip/opt.h"
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
#if 0 /* UNUSED */
#include <stdio.h>
@ -2580,3 +2581,5 @@ free_wordlist(wp)
}
}
#endif /* UNUSED */
#endif /* PPP_SUPPORT */

View File

@ -31,8 +31,6 @@
#include "lwip/opt.h"
#if PPP_SUPPORT && CCP_SUPPORT /* don't build if not configured for use in lwipopts.h */
#define RCSID "$Id: ccp.c,v 1.50 2005/06/26 19:34:41 carlsonj Exp $"
#include <stdlib.h>
#include <string.h>
@ -47,8 +45,6 @@
#include "lcp.h" /* lcp_close(), lcp_fsm */
#endif
static const char rcsid[] = RCSID;
/*
* Unfortunately there is a bug in zlib which means that using a
* size of 8 (window size = 256) for Deflate compression will cause

View File

@ -31,8 +31,6 @@
#include "lwip/opt.h"
#if PPP_SUPPORT && CHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */
#define RCSID "$Id: chap-new.c,v 1.9 2007/06/19 02:08:35 carlsonj Exp $"
#if 0 /* UNUSED */
#include <stdlib.h>
#include <string.h>

View File

@ -58,8 +58,6 @@
#include "ipcp.h"
#include "lcp.h"
static const char rcsid[] = RCSID;
char *frame;
int framelen;
int framemax;

View File

@ -60,10 +60,6 @@
#include "lwip/opt.h"
#if PPP_SUPPORT && ECP_SUPPORT /* don't build if not configured for use in lwipopts.h */
#define RCSID "$Id: ecp.c,v 1.4 2004/11/04 10:02:26 paulus Exp $"
static const char rcsid[] = RCSID;
#include <string.h>
#include "ppp.h"

View File

@ -41,8 +41,7 @@
*/
#include "lwip/opt.h"
#define RCSID "$Id: fsm.c,v 1.23 2004/11/13 02:28:15 paulus Exp $"
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
/*
* TODO:
@ -60,8 +59,6 @@
#include "fsm.h"
static const char rcsid[] = RCSID;
static void fsm_timeout __P((void *));
static void fsm_rconfreq __P((fsm *, int, u_char *, int));
static void fsm_rconfack __P((fsm *, int, u_char *, int));
@ -820,3 +817,5 @@ fsm_sdata(f, code, id, data, datalen)
PUTSHORT(outlen, outp);
ppp_write(f->unit, outpacket_buf, outlen + PPP_HDRLEN);
}
#endif /* PPP_SUPPORT */

View File

@ -42,6 +42,9 @@
* $Id: fsm.h,v 1.10 2004/11/13 02:28:15 paulus Exp $
*/
#include "lwip/opt.h"
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
/*
* Packet header = Code, id, length.
*/
@ -166,3 +169,5 @@ void fsm_sdata __P((fsm *, int, int, u_char *, int));
* Variables
*/
extern int peer_mru[]; /* currently negotiated peer MRU (per unit) */
#endif /* PPP_SUPPORT */

View File

@ -41,8 +41,7 @@
*/
#include "lwip/opt.h"
#define RCSID "$Id: ipcp.c,v 1.73 2008/05/26 08:33:22 paulus Exp $"
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
/*
* TODO:
@ -65,8 +64,6 @@
#include "fsm.h"
#include "ipcp.h"
static const char rcsid[] = RCSID;
/* global vars */
ipcp_options ipcp_wantoptions[NUM_PPP]; /* Options that we want to request */
ipcp_options ipcp_gotoptions[NUM_PPP]; /* Options that peer ack'd */
@ -2268,3 +2265,5 @@ ip_active_pkt(pkt, len)
return 1;
}
#endif /* DEMAND_SUPPORT */
#endif /* PPP_SUPPORT */

View File

@ -42,6 +42,9 @@
* $Id: ipcp.h,v 1.14 2002/12/04 23:03:32 paulus Exp $
*/
#include "lwip/opt.h"
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
/*
* Options.
*/
@ -97,3 +100,5 @@ char *ip_ntoa __P((u_int32_t));
#endif /* UNUSED, already defined by lwIP */
extern struct protent ipcp_protent;
#endif /* PPP_SUPPORT */

View File

@ -41,6 +41,7 @@
*/
#include "lwip/opt.h"
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
/*
* TODO:
@ -2735,3 +2736,5 @@ lcp_echo_lowerdown (unit)
lcp_echo_timer_running = 0;
}
}
#endif /* PPP_SUPPORT */

View File

@ -42,6 +42,9 @@
* $Id: lcp.h,v 1.20 2004/11/14 22:53:42 carlsonj Exp $
*/
#include "lwip/opt.h"
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
/*
* Options.
*/
@ -145,3 +148,5 @@ extern struct protent lcp_protent;
/* Default number of times we receive our magic number from the peer
before deciding the link is looped-back. */
#define DEFLOOPBACKFAIL 10
#endif /* PPP_SUPPORT */

View File

@ -74,12 +74,12 @@
* Extracted from avos.
*****************************************************************************/
#ifndef MAGIC_H
#define MAGIC_H
#include "lwip/opt.h"
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
#ifndef MAGIC_H
#define MAGIC_H
/***********************
*** PUBLIC FUNCTIONS ***
***********************/
@ -114,5 +114,6 @@ u32_t magic(void); /* Returns the next magic number */
void random_bytes(unsigned char *buf, u32_t len);
#endif /* PPP_MD5_RANDM */
#endif /* PPP_SUPPORT */
#endif /* MAGIC_H */
#endif /* PPP_SUPPORT */

View File

@ -29,6 +29,7 @@
*/
#include "lwip/opt.h"
#if PPP_SUPPORT && HAVE_MULTILINK /* don't build if not configured for use in lwipopts.h */
/* Multilink support
*
@ -39,8 +40,6 @@
* or dropping multilink support at all.
*/
#ifdef HAVE_MULTILINK
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
@ -607,4 +606,4 @@ str_to_epdisc(ep, str)
return 1;
}
#endif /* HAVE_MULTILINK */
#endif /* PPP_SUPPORT && HAVE_MULTILINK */

View File

@ -41,8 +41,7 @@
*/
#include "lwip/opt.h"
#define RCSID "$Id: options.c,v 1.102 2008/06/15 06:53:06 paulus Exp $"
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
#include <ctype.h>
#include <stdio.h>
@ -82,8 +81,6 @@
char *strdup __P((char *));
#endif
static const char rcsid[] = RCSID;
struct option_value {
struct option_value *next;
const char *source;
@ -1647,3 +1644,5 @@ loadplugin(argv)
}
#endif /* PLUGIN */
#endif /* PPP_OPTIONS */
#endif /* PPP_SUPPORT */

View File

@ -32,6 +32,10 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "lwip/opt.h"
#if LWIP_INCLUDED_POLARSSL_DES
#ifndef LWIP_INCLUDED_POLARSSL_DES_H
#define LWIP_INCLUDED_POLARSSL_DES_H
@ -84,3 +88,5 @@ void des_crypt_ecb( des_context *ctx,
#endif
#endif /* LWIP_INCLUDED_POLARSSL_DES_H */
#endif /* LWIP_INCLUDED_POLARSSL_DES */

View File

@ -32,6 +32,10 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "lwip/opt.h"
#if LWIP_INCLUDED_POLARSSL_MD4
#ifndef LWIP_INCLUDED_POLARSSL_MD4_H
#define LWIP_INCLUDED_POLARSSL_MD4_H
@ -89,3 +93,5 @@ void md4( unsigned char *input, int ilen, unsigned char output[16] );
#endif
#endif /* LWIP_INCLUDED_POLARSSL_MD4_H */
#endif /* LWIP_INCLUDED_POLARSSL_MD4 */

View File

@ -32,6 +32,10 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "lwip/opt.h"
#if LWIP_INCLUDED_POLARSSL_MD5
#ifndef LWIP_INCLUDED_POLARSSL_MD5_H
#define LWIP_INCLUDED_POLARSSL_MD5_H
@ -88,3 +92,5 @@ void md5( unsigned char *input, int ilen, unsigned char output[16] );
#endif
#endif /* LWIP_INCLUDED_POLARSSL_MD5_H */
#endif /* LWIP_INCLUDED_POLARSSL_MD5 */

View File

@ -32,6 +32,10 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "lwip/opt.h"
#if LWIP_INCLUDED_POLARSSL_SHA1
#ifndef LWIP_INCLUDED_POLARSSL_SHA1_H
#define LWIP_INCLUDED_POLARSSL_SHA1_H
@ -88,3 +92,5 @@ void sha1( unsigned char *input, int ilen, unsigned char output[20] );
#endif
#endif /* LWIP_INCLUDED_POLARSSL_SHA1_H */
#endif /* LWIP_INCLUDED_POLARSSL_SHA1 */

View File

@ -6,6 +6,7 @@
*/
#include "lwip/opt.h"
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
#include "lwip/pbuf.h"
#include "lwip/stats.h"
@ -1571,3 +1572,5 @@ void print_link_stats() {
}
}
#endif /* PPP_STATS_SUPPORT */
#endif /* PPP_SUPPORT */

View File

@ -6,6 +6,7 @@
*/
#include "lwip/opt.h"
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
#ifndef PPPMY_H_
#define PPPMY_H_
@ -744,3 +745,5 @@ void dump_packet __P((const char *, u_char *, int));
#endif /* PPPMY_H_ */
#endif /* PPP_SUPPORT */

View File

@ -69,7 +69,7 @@
*/
#include "lwip/opt.h"
#if PPPOE_SUPPORT /* don't build if not configured for use in lwipopts.h */
#if PPP_SUPPORT && PPPOE_SUPPORT /* don't build if not configured for use in lwipopts.h */
#if 0 /* UNUSED */
#include <string.h>
@ -1126,5 +1126,4 @@ pppoe_clear_softc(struct pppoe_softc *sc, const char *message)
sc->sc_session = 0;
}
#endif /* PPPOE_SUPPORT */
#endif /* PPP_SUPPORT && PPPOE_SUPPORT */

View File

@ -33,6 +33,10 @@
*
*****************************************************************************
*/
#include "lwip/opt.h"
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
#ifndef PPPDEBUG_H
#define PPPDEBUG_H
@ -72,3 +76,5 @@
#endif /* PPP_DEBUG */
#endif /* PPPDEBUG_H */
#endif /* PPP_SUPPORT */

View File

@ -29,8 +29,7 @@
*/
#include "lwip/opt.h"
#define RCSID "$Id: utils.c,v 1.25 2008/06/03 12:06:37 paulus Exp $"
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
#if 0 /* UNUSED */
#include <stdio.h>
@ -66,8 +65,6 @@
#include "fsm.h"
#include "lcp.h"
static const char rcsid[] = RCSID;
#if defined(SUNOS4)
extern char *strerror();
#endif
@ -1084,3 +1081,5 @@ unlock()
}
#endif /* Unused */
#endif /* PPP_SUPPORT */