summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@ozlabs.org>2020-12-29 16:08:24 +1100
committerPaul Mackerras <paulus@ozlabs.org>2020-12-29 16:08:24 +1100
commit75870d7b55e36af526a0786fff94912989c73fd1 (patch)
tree1de0db83a52899c60f3b7abc0934e377a1667ab7 /include
parent505ec5cbd15ec23ed84282462ae9e451a1978133 (diff)
downloadppp-75870d7b55e36af526a0786fff94912989c73fd1.tar.gz
Convert to ANSI C
This gets rid of the __P and __V macros that were used so that the code was in theory compilable by a K&R C compiler, and converts the function definitions to ANSI C style. In fact there were already quite a few function definitions in the ANSI C style, so it would not have been compilable by a K&R C compiler in fact. The Solaris and BSD kernel code modules have had __P removed but the function definitions have not been converted. There are some other minor changes here to remove warnings. Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ppp_defs.h8
-rw-r--r--include/net/if_ppp.h4
-rw-r--r--include/net/ppp-comp.h34
-rw-r--r--include/net/ppp_defs.h8
-rw-r--r--include/net/slcompress.h14
-rw-r--r--include/net/vjcompress.h16
6 files changed, 34 insertions, 50 deletions
diff --git a/include/linux/ppp_defs.h b/include/linux/ppp_defs.h
index 314339e..ef4232b 100644
--- a/include/linux/ppp_defs.h
+++ b/include/linux/ppp_defs.h
@@ -184,12 +184,4 @@ struct ppp_idle {
time_t recv_idle; /* time since last NP packet received */
};
-#ifndef __P
-#ifdef __STDC__
-#define __P(x) x
-#else
-#define __P(x) ()
-#endif
-#endif
-
#endif /* _PPP_DEFS_H_ */
diff --git a/include/net/if_ppp.h b/include/net/if_ppp.h
index bfec606..d08605e 100644
--- a/include/net/if_ppp.h
+++ b/include/net/if_ppp.h
@@ -150,7 +150,7 @@ struct ifpppcstatsreq {
#endif
#if (defined(_KERNEL) || defined(KERNEL)) && !defined(NeXT)
-void pppattach __P((void));
-void pppintr __P((void));
+void pppattach(void);
+void pppintr(void);
#endif
#endif /* _IF_PPP_H_ */
diff --git a/include/net/ppp-comp.h b/include/net/ppp-comp.h
index 088c73e..b09ef71 100644
--- a/include/net/ppp-comp.h
+++ b/include/net/ppp-comp.h
@@ -59,36 +59,36 @@ struct compressor {
int compress_proto; /* CCP compression protocol number */
/* Allocate space for a compressor (transmit side) */
- void *(*comp_alloc) __P((u_char *options, int opt_len));
+ void *(*comp_alloc)(u_char *options, int opt_len);
/* Free space used by a compressor */
- void (*comp_free) __P((void *state));
+ void (*comp_free)(void *state);
/* Initialize a compressor */
- int (*comp_init) __P((void *state, u_char *options, int opt_len,
- int unit, int hdrlen, int debug));
+ int (*comp_init)(void *state, u_char *options, int opt_len,
+ int unit, int hdrlen, int debug);
/* Reset a compressor */
- void (*comp_reset) __P((void *state));
+ void (*comp_reset)(void *state);
/* Compress a packet */
- int (*compress) __P((void *state, PACKETPTR *mret,
- PACKETPTR mp, int orig_len, int max_len));
+ int (*compress)(void *state, PACKETPTR *mret,
+ PACKETPTR mp, int orig_len, int max_len);
/* Return compression statistics */
- void (*comp_stat) __P((void *state, struct compstat *stats));
+ void (*comp_stat)(void *state, struct compstat *stats);
/* Allocate space for a decompressor (receive side) */
- void *(*decomp_alloc) __P((u_char *options, int opt_len));
+ void *(*decomp_alloc)(u_char *options, int opt_len);
/* Free space used by a decompressor */
- void (*decomp_free) __P((void *state));
+ void (*decomp_free)(void *state);
/* Initialize a decompressor */
- int (*decomp_init) __P((void *state, u_char *options, int opt_len,
- int unit, int hdrlen, int mru, int debug));
+ int (*decomp_init)(void *state, u_char *options, int opt_len,
+ int unit, int hdrlen, int mru, int debug);
/* Reset a decompressor */
- void (*decomp_reset) __P((void *state));
+ void (*decomp_reset)(void *state);
/* Decompress a packet. */
- int (*decompress) __P((void *state, PACKETPTR mp,
- PACKETPTR *dmpp));
+ int (*decompress)(void *state, PACKETPTR mp,
+ PACKETPTR *dmpp);
/* Update state for an incompressible packet received */
- void (*incomp) __P((void *state, PACKETPTR mp));
+ void (*incomp)(void *state, PACKETPTR mp);
/* Return decompression statistics */
- void (*decomp_stat) __P((void *state, struct compstat *stats));
+ void (*decomp_stat)(void *state, struct compstat *stats);
};
#endif /* PACKETPTR */
diff --git a/include/net/ppp_defs.h b/include/net/ppp_defs.h
index b06eda5..a5112b3 100644
--- a/include/net/ppp_defs.h
+++ b/include/net/ppp_defs.h
@@ -183,12 +183,4 @@ struct ppp_idle {
time_t recv_idle; /* time since last NP packet received */
};
-#ifndef __P
-#ifdef __STDC__
-#define __P(x) x
-#else
-#define __P(x) ()
-#endif
-#endif
-
#endif /* _PPP_DEFS_H_ */
diff --git a/include/net/slcompress.h b/include/net/slcompress.h
index d887dfc..3712a1a 100644
--- a/include/net/slcompress.h
+++ b/include/net/slcompress.h
@@ -137,12 +137,12 @@ struct slcompress {
/* flag values */
#define SLF_TOSS 1 /* tossing rcvd frames because of input err */
-void sl_compress_init __P((struct slcompress *));
-void sl_compress_setup __P((struct slcompress *, int));
-u_int sl_compress_tcp __P((struct mbuf *,
- struct ip *, struct slcompress *, int));
-int sl_uncompress_tcp __P((u_char **, int, u_int, struct slcompress *));
-int sl_uncompress_tcp_core __P((u_char *, int, int, u_int,
- struct slcompress *, u_char **, u_int *));
+void sl_compress_init(struct slcompress *);
+void sl_compress_setup(struct slcompress *, int);
+u_int sl_compress_tcp(struct mbuf *,
+ struct ip *, struct slcompress *, int);
+int sl_uncompress_tcp(u_char **, int, u_int, struct slcompress *);
+int sl_uncompress_tcp_core(u_char *, int, int, u_int,
+ struct slcompress *, u_char **, u_int *);
#endif /* _SLCOMPRESS_H_ */
diff --git a/include/net/vjcompress.h b/include/net/vjcompress.h
index 03a33bf..ba1ee1f 100644
--- a/include/net/vjcompress.h
+++ b/include/net/vjcompress.h
@@ -130,15 +130,15 @@ struct vjcompress {
/* flag values */
#define VJF_TOSS 1 /* tossing rcvd frames because of input err */
-extern void vj_compress_init __P((struct vjcompress *comp, int max_state));
-extern u_int vj_compress_tcp __P((struct ip *ip, u_int mlen,
+extern void vj_compress_init(struct vjcompress *comp, int max_state);
+extern u_int vj_compress_tcp(struct ip *ip, u_int mlen,
struct vjcompress *comp, int compress_cid_flag,
- u_char **vjhdrp));
-extern void vj_uncompress_err __P((struct vjcompress *comp));
-extern int vj_uncompress_uncomp __P((u_char *buf, int buflen,
- struct vjcompress *comp));
-extern int vj_uncompress_tcp __P((u_char *buf, int buflen, int total_len,
+ u_char **vjhdrp);
+extern void vj_uncompress_err(struct vjcompress *comp);
+extern int vj_uncompress_uncomp(u_char *buf, int buflen,
+ struct vjcompress *comp);
+extern int vj_uncompress_tcp(u_char *buf, int buflen, int total_len,
struct vjcompress *comp, u_char **hdrp,
- u_int *hlenp));
+ u_int *hlenp);
#endif /* _VJCOMPRESS_H_ */