mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-05 14:04:38 +08:00
removed all system headers except the strict minimum
This commit is contained in:
parent
5531bca078
commit
e1261c9620
@ -70,6 +70,7 @@
|
|||||||
|
|
||||||
#include "lwip/opt.h"
|
#include "lwip/opt.h"
|
||||||
|
|
||||||
|
#if 0 /* UNUSED */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -80,21 +81,16 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#if 0
|
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <utmp.h>
|
#include <utmp.h>
|
||||||
#endif
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#if defined(_PATH_LASTLOG) && defined(__linux__)
|
#if defined(_PATH_LASTLOG) && defined(__linux__)
|
||||||
#include <lastlog.h>
|
#include <lastlog.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0
|
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAS_SHADOW
|
#ifdef HAS_SHADOW
|
||||||
#include <shadow.h>
|
#include <shadow.h>
|
||||||
@ -102,7 +98,9 @@
|
|||||||
#define PW_PPP PW_LOGIN
|
#define PW_PPP PW_LOGIN
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#endif /* UNUSED */
|
||||||
|
|
||||||
#include "ppp.h"
|
#include "ppp.h"
|
||||||
|
|
||||||
|
@ -31,8 +31,10 @@
|
|||||||
#include "lwip/opt.h"
|
#include "lwip/opt.h"
|
||||||
#if PPP_SUPPORT && CHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && CHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
|
#if 0 /* UNUSED */
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#endif /* UNUSED */
|
||||||
|
|
||||||
#include "ppp.h"
|
#include "ppp.h"
|
||||||
|
|
||||||
|
@ -33,8 +33,10 @@
|
|||||||
|
|
||||||
#define RCSID "$Id: chap-new.c,v 1.9 2007/06/19 02:08:35 carlsonj Exp $"
|
#define RCSID "$Id: chap-new.c,v 1.9 2007/06/19 02:08:35 carlsonj Exp $"
|
||||||
|
|
||||||
|
#if 0 /* UNUSED */
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#endif /* UNUSED */
|
||||||
|
|
||||||
#include "ppp.h"
|
#include "ppp.h"
|
||||||
|
|
||||||
|
@ -77,6 +77,7 @@
|
|||||||
#include "lwip/opt.h"
|
#include "lwip/opt.h"
|
||||||
#if PPP_SUPPORT && MSCHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && MSCHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
|
#if 0 /* UNUSED */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -84,6 +85,7 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#endif /* UNUSED */
|
||||||
|
|
||||||
#include "ppp.h"
|
#include "ppp.h"
|
||||||
|
|
||||||
|
@ -50,9 +50,11 @@
|
|||||||
* Deal with variable outgoing MTU.
|
* Deal with variable outgoing MTU.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if 0 /* UNUSED */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#endif /* UNUSED */
|
||||||
|
|
||||||
#include "ppp.h"
|
#include "ppp.h"
|
||||||
|
|
||||||
|
@ -48,19 +48,17 @@
|
|||||||
* TODO:
|
* TODO:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if 0 /* UNUSED */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#if 0
|
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#endif
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#if 0
|
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#endif
|
#endif /* UNUSED */
|
||||||
|
|
||||||
#include "ppp.h"
|
#include "ppp.h"
|
||||||
|
|
||||||
|
@ -46,9 +46,11 @@
|
|||||||
* TODO:
|
* TODO:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if 0 /* UNUSED */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#endif /* UNUSED */
|
||||||
|
|
||||||
#include "ppp.h"
|
#include "ppp.h"
|
||||||
|
|
||||||
|
@ -10,16 +10,7 @@
|
|||||||
#ifndef PPPMY_H_
|
#ifndef PPPMY_H_
|
||||||
#define PPPMY_H_
|
#define PPPMY_H_
|
||||||
|
|
||||||
#include "lwip/netif.h"
|
#include <stdio.h> /* formats */
|
||||||
#include "lwip/def.h"
|
|
||||||
#include "lwip/timers.h"
|
|
||||||
|
|
||||||
#include "pppdebug.h"
|
|
||||||
#include "net/ppp_defs.h" /* FIXME: merge linux/ppp_defs.h content here */
|
|
||||||
|
|
||||||
#ifdef INET6
|
|
||||||
#include "eui64.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__STDC__)
|
#if defined(__STDC__)
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
@ -31,6 +22,17 @@
|
|||||||
#define volatile
|
#define volatile
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "lwip/netif.h"
|
||||||
|
#include "lwip/def.h"
|
||||||
|
#include "lwip/timers.h"
|
||||||
|
|
||||||
|
#include "pppdebug.h"
|
||||||
|
#include "net/ppp_defs.h" /* FIXME: merge linux/ppp_defs.h content here */
|
||||||
|
|
||||||
|
#ifdef INET6
|
||||||
|
#include "eui64.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Limits.
|
* Limits.
|
||||||
*/
|
*/
|
||||||
|
@ -69,20 +69,20 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "lwip/opt.h"
|
#include "lwip/opt.h"
|
||||||
|
|
||||||
#if PPPOE_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPPOE_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#include "netif/ppp_oe.h"
|
#if 0 /* UNUSED */
|
||||||
|
#include <string.h>
|
||||||
#include "ppp.h"
|
#include <stdio.h>
|
||||||
|
#endif /* UNUSED */
|
||||||
|
|
||||||
#include "lwip/timers.h"
|
#include "lwip/timers.h"
|
||||||
#include "lwip/memp.h"
|
#include "lwip/memp.h"
|
||||||
#include "lwip/stats.h"
|
#include "lwip/stats.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include "ppp.h"
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
|
#include "netif/ppp_oe.h"
|
||||||
|
|
||||||
/* Add a 16 bit unsigned value to a buffer pointed to by PTR */
|
/* Add a 16 bit unsigned value to a buffer pointed to by PTR */
|
||||||
#define PPPOE_ADD_16(PTR, VAL) \
|
#define PPPOE_ADD_16(PTR, VAL) \
|
||||||
|
@ -47,8 +47,10 @@
|
|||||||
* TODO:
|
* TODO:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if 0 /* UNUSED */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#endif /* UNUSED */
|
||||||
|
|
||||||
#include "ppp.h"
|
#include "ppp.h"
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
#define RCSID "$Id: utils.c,v 1.25 2008/06/03 12:06:37 paulus Exp $"
|
#define RCSID "$Id: utils.c,v 1.25 2008/06/03 12:06:37 paulus Exp $"
|
||||||
|
|
||||||
|
#if 0 /* UNUSED */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -40,14 +41,10 @@
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#if 0
|
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#endif
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#if 0
|
|
||||||
#include <utmp.h>
|
#include <utmp.h>
|
||||||
#endif
|
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@ -55,13 +52,14 @@
|
|||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#if 0
|
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#endif
|
|
||||||
#ifdef SVR4
|
#ifdef SVR4
|
||||||
#include <sys/mkdev.h>
|
#include <sys/mkdev.h>
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* UNUSED */
|
||||||
|
|
||||||
|
#include <ctype.h> /* isdigit() */
|
||||||
|
|
||||||
#include "ppp.h"
|
#include "ppp.h"
|
||||||
|
|
||||||
@ -175,7 +173,9 @@ vslprintf(buf, buflen, fmt, args)
|
|||||||
char *str, *f, *buf0;
|
char *str, *f, *buf0;
|
||||||
unsigned char *p;
|
unsigned char *p;
|
||||||
char num[32];
|
char num[32];
|
||||||
|
#if 0 /* need port */
|
||||||
time_t t;
|
time_t t;
|
||||||
|
#endif /* need port */
|
||||||
u_int32_t ip;
|
u_int32_t ip;
|
||||||
static char hexchars[] = "0123456789abcdef";
|
static char hexchars[] = "0123456789abcdef";
|
||||||
#if PRINTPKT_SUPPORT
|
#if PRINTPKT_SUPPORT
|
||||||
@ -313,12 +313,14 @@ vslprintf(buf, buflen, fmt, args)
|
|||||||
buflen -= n;
|
buflen -= n;
|
||||||
continue;
|
continue;
|
||||||
#endif
|
#endif
|
||||||
|
#if 0 /* need port */
|
||||||
case 't':
|
case 't':
|
||||||
time(&t);
|
time(&t);
|
||||||
str = ctime(&t);
|
str = ctime(&t);
|
||||||
str += 4; /* chop off the day name */
|
str += 4; /* chop off the day name */
|
||||||
str[15] = 0; /* chop off year and newline */
|
str[15] = 0; /* chop off year and newline */
|
||||||
break;
|
break;
|
||||||
|
#endif /* need port */
|
||||||
case 'v': /* "visible" string */
|
case 'v': /* "visible" string */
|
||||||
case 'q': /* quoted string */
|
case 'q': /* quoted string */
|
||||||
quoted = c == 'q';
|
quoted = c == 'q';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user