From ce8ee8d9b401c9c2828df3457815c2f4ceed4900 Mon Sep 17 00:00:00 2001 From: David McCullough Date: Wed, 11 Jul 2001 13:47:45 +0000 Subject: Added __BEGIN_DECLS and __END_DECLS to the files that didn't have it and that I could see needed it. Should be pretty low impact as these are only defined when using C++. --- include/cfgfile.h | 3 +++ include/crypt.h | 5 +++++ include/ctype.h | 4 ++++ include/errno.h | 3 +++ include/grp.h | 4 ++++ include/locale.h | 4 ++++ include/malloc.h | 4 ++++ include/math.h | 5 +++++ include/net/slcompress.h | 6 +++++- include/net/vjcompress.h | 6 +++++- include/pty.h | 3 +++ include/pwd.h | 3 +++ include/resolv.h | 4 ++++ include/stdlib.h | 3 +++ include/string.h | 5 ++++- include/sys/utsname.h | 2 ++ include/termcap.h | 4 ++++ include/utime.h | 4 ++++ include/utmp.h | 4 ++++ 19 files changed, 73 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/cfgfile.h b/include/cfgfile.h index 1eae1bc94..3e26f9c4c 100644 --- a/include/cfgfile.h +++ b/include/cfgfile.h @@ -2,7 +2,10 @@ #define __CFGFILE_H__ #include + +__BEGIN_DECLS char ** cfgread(FILE *fp); char ** cfgfind(FILE *fp, char *var); +__END_DECLS #endif /* __CFGFILE_H__ */ diff --git a/include/crypt.h b/include/crypt.h index fd5d0f67f..6c7f6c85d 100644 --- a/include/crypt.h +++ b/include/crypt.h @@ -27,6 +27,8 @@ #include +__BEGIN_DECLS + /* Encrypt characters from KEY using salt to perturb the encryption method. * If salt begins with "$1$", md5 hashing is used instead of DES. */ extern char *crypt (const char *__key, const char *__salt); @@ -65,4 +67,7 @@ extern void setkey_r (const char *__key, extern void encrypt_r (char *__block, int __edflag, struct crypt_data * __data); + +__END_DECLS + #endif /* crypt.h */ diff --git a/include/ctype.h b/include/ctype.h index 9ed73879c..477fac9b8 100644 --- a/include/ctype.h +++ b/include/ctype.h @@ -6,6 +6,8 @@ #include +__BEGIN_DECLS + /* For now, just always use the functions instead of the macros...*/ #define __USE_CTYPE_C_FUNCTIONS @@ -58,4 +60,6 @@ extern int toupper(int c); #endif +__END_DECLS + #endif /* __CTYPE_H */ diff --git a/include/errno.h b/include/errno.h index da7f7a0e4..aa7e6bcae 100644 --- a/include/errno.h +++ b/include/errno.h @@ -4,6 +4,8 @@ #include #include +__BEGIN_DECLS + extern int sys_nerr; extern const char *const sys_errlist[]; @@ -16,5 +18,6 @@ extern int errno; extern void perror __P ((__const char* __s)); extern char* strerror __P ((int __errno)); +__END_DECLS #endif diff --git a/include/grp.h b/include/grp.h index 4ecef44f0..c0db17e44 100644 --- a/include/grp.h +++ b/include/grp.h @@ -5,6 +5,8 @@ #include #include +__BEGIN_DECLS + /* The group structure */ struct group { @@ -31,6 +33,8 @@ extern int initgroups __P ((__const char * user, gid_t gid)); extern struct group * __getgrent __P ((int grp_fd)); #endif +__END_DECLS + #endif /* _GRP_H */ diff --git a/include/locale.h b/include/locale.h index 937c0f0d1..00e75d5b5 100644 --- a/include/locale.h +++ b/include/locale.h @@ -70,9 +70,13 @@ struct lconv char n_sign_posn; }; +__BEGIN_DECLS + extern char *setlocale(int __category, __const char *__locale); /* Return the numeric/monetary information for the current locale. */ extern struct lconv *localeconv __P ((void)); +__END_DECLS + #endif /* locale.h */ diff --git a/include/malloc.h b/include/malloc.h index c35ffe459..7ef63d8c7 100644 --- a/include/malloc.h +++ b/include/malloc.h @@ -4,6 +4,8 @@ #include #include +__BEGIN_DECLS + extern void free __P((void *)); extern void *malloc __P((size_t)); extern void *realloc __P((void *, size_t)); @@ -11,4 +13,6 @@ extern void *alloca __P((size_t)); extern void *(*__alloca_alloc) __P((size_t)); +__END_DECLS + #endif diff --git a/include/math.h b/include/math.h index 9aada8e42..752b12bdf 100644 --- a/include/math.h +++ b/include/math.h @@ -184,8 +184,10 @@ typedef struct /* Variable for error reporting. See mtherr.c. */ +__BEGIN_DECLS extern int mtherr(char *name, int code); extern int merror; +__END_DECLS /* If you define UNK, then be sure to set BIGENDIAN properly. */ @@ -197,6 +199,7 @@ extern int merror; #endif + #define __USE_ISOC9X /* Get general and ISO C 9X specific information. */ #include @@ -265,6 +268,7 @@ enum (sizeof (x) == sizeof (float) ? __fpclassifyf (x) : __fpclassify (x)) #endif +__BEGIN_DECLS #ifdef __UCLIBC_HAS_LIBM_DOUBLE__ /* Return nonzero value if sign of X is negative. */ @@ -610,5 +614,6 @@ extern long double fmal(long double x, long double y, long double z); fpclassify (__u) == FP_NAN || fpclassify (__v) == FP_NAN; })) # endif +__END_DECLS #endif /* math.h */ diff --git a/include/net/slcompress.h b/include/net/slcompress.h index 658edb7f8..fc3b000a9 100644 --- a/include/net/slcompress.h +++ b/include/net/slcompress.h @@ -1,7 +1,7 @@ /* * Definitions for tcp compression routines. * - * $Id: slcompress.h,v 1.1 2001/01/16 10:03:48 andersen Exp $ + * $Id: slcompress.h,v 1.2 2001/07/11 13:47:42 davidm Exp $ * * Copyright (c) 1989 Regents of the University of California. * All rights reserved. @@ -137,6 +137,8 @@ struct slcompress { /* flag values */ #define SLF_TOSS 1 /* tossing rcvd frames because of input err */ +__BEGIN_DECLS + void sl_compress_init __P((struct slcompress *)); void sl_compress_setup __P((struct slcompress *, int)); u_int sl_compress_tcp __P((struct mbuf *, @@ -145,4 +147,6 @@ 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 *)); +__END_DECLS + #endif /* _SLCOMPRESS_H_ */ diff --git a/include/net/vjcompress.h b/include/net/vjcompress.h index 83785b277..c792fe5e7 100644 --- a/include/net/vjcompress.h +++ b/include/net/vjcompress.h @@ -1,7 +1,7 @@ /* * Definitions for tcp compression routines. * - * $Id: vjcompress.h,v 1.1 2001/01/16 10:03:48 andersen Exp $ + * $Id: vjcompress.h,v 1.2 2001/07/11 13:47:42 davidm Exp $ * * Copyright (c) 1989 Regents of the University of California. * All rights reserved. @@ -130,6 +130,8 @@ struct vjcompress { /* flag values */ #define VJF_TOSS 1 /* tossing rcvd frames because of input err */ +__BEGIN_DECLS + 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, struct vjcompress *comp, int compress_cid_flag, @@ -141,4 +143,6 @@ extern int vj_uncompress_tcp __P((u_char *buf, int buflen, int total_len, struct vjcompress *comp, u_char **hdrp, u_int *hlenp)); +__END_DECLS + #endif /* _VJCOMPRESS_H_ */ diff --git a/include/pty.h b/include/pty.h index d8550840e..7c64359d2 100644 --- a/include/pty.h +++ b/include/pty.h @@ -25,6 +25,7 @@ #include #include +__BEGIN_DECLS /* Create pseudo tty master slave pair with NAME and set terminal attributes according to TERMP and WINP and return handles for both @@ -37,4 +38,6 @@ extern int openpty (int *__amaster, int *__aslave, char *__name, extern int forkpty (int *__amaster, char *__name, struct termios *__termp, struct winsize *__winp); +__END_DECLS + #endif /* pty.h */ diff --git a/include/pwd.h b/include/pwd.h index 64d8bc6ef..3377afd88 100644 --- a/include/pwd.h +++ b/include/pwd.h @@ -5,6 +5,8 @@ #include #include +__BEGIN_DECLS + /* The passwd structure. */ struct passwd { @@ -53,6 +55,7 @@ extern int __getpwent_r(struct passwd * passwd, char * line_buff, size_t buflen, int pwd_fd); #endif +__END_DECLS #endif /* pwd.h */ diff --git a/include/resolv.h b/include/resolv.h index e988347ad..9ac45959a 100644 --- a/include/resolv.h +++ b/include/resolv.h @@ -23,6 +23,8 @@ #include #include +__BEGIN_DECLS + struct resolv_header { int id; int qr,opcode,aa,tc,rd,ra,rcode; @@ -83,4 +85,6 @@ extern int res_init(void); extern int res_query(const char *dname, int class, int type, unsigned char *answer, int anslen); +__END_DECLS + #endif /*_RESOLV_H_*/ diff --git a/include/stdlib.h b/include/stdlib.h index cdb3e8fee..e5588cb3b 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -6,6 +6,8 @@ #include #include +__BEGIN_DECLS + /* Don't overwrite user definitions of NULL */ #ifndef NULL #define NULL ((void *) 0) @@ -121,5 +123,6 @@ extern ldiv_t ldiv __P ((long int __numer, long int __denom)) __attribute__ ((__ extern char *mktemp __P ((char *__template)); extern int mkstemp __P ((char *__template)); +__END_DECLS #endif /* __STDLIB_H */ diff --git a/include/string.h b/include/string.h index 939b1a4b5..7122b7959 100644 --- a/include/string.h +++ b/include/string.h @@ -5,6 +5,7 @@ #include #include +__BEGIN_DECLS /* Basic string functions */ /* Return the length of S. */ @@ -117,7 +118,7 @@ extern size_t strspn __P ((__const char *__s, __const char *__accept)); extern char *strsignal __P ((int __sig)); /* More BSD compatabilty */ -int bcmp(const void *s1, const void *s2, size_t n); +extern int bcmp(const void *s1, const void *s2, size_t n); /* Linux silly hour */ char *strfry __P ((char *)); @@ -147,4 +148,6 @@ extern size_t strnlen __P ((__const char *__string, size_t __maxlen)); (char *) memcpy (__new, __old, __len); \ })) +__END_DECLS + #endif diff --git a/include/sys/utsname.h b/include/sys/utsname.h index 0cbc37f2a..7625a5b6b 100644 --- a/include/sys/utsname.h +++ b/include/sys/utsname.h @@ -13,6 +13,8 @@ struct utsname { char domainname[65]; }; +__BEGIN_DECLS extern int uname __P ((struct utsname * __utsbuf)); +__END_DECLS #endif diff --git a/include/termcap.h b/include/termcap.h index a7ae37b72..97624192c 100644 --- a/include/termcap.h +++ b/include/termcap.h @@ -5,6 +5,8 @@ #include #include +__BEGIN_DECLS + extern char PC; extern char *UP; extern char *BC; @@ -18,4 +20,6 @@ extern char *tgetstr __P((const char *, char **)); extern int tputs __P((const char *, int, int (*)(int))); extern char *tgoto __P((const char *, int, int)); +__END_DECLS + #endif /* _TERMCAP_H */ diff --git a/include/utime.h b/include/utime.h index 687e1348e..d2e42b275 100644 --- a/include/utime.h +++ b/include/utime.h @@ -4,6 +4,8 @@ #include #include +__BEGIN_DECLS + struct utimbuf { time_t actime; time_t modtime; @@ -11,5 +13,7 @@ struct utimbuf { extern int utime __P ((const char *__filename, struct utimbuf *__utimebuf)); +__END_DECLS + #endif diff --git a/include/utmp.h b/include/utmp.h index e362181aa..a9d5f53eb 100644 --- a/include/utmp.h +++ b/include/utmp.h @@ -23,6 +23,8 @@ #define USER_PROCESS 7 #define DEAD_PROCESS 8 +__BEGIN_DECLS + struct utmp { short ut_type; /* type of login */ @@ -52,5 +54,7 @@ extern void logwtmp (const char *line, const char *name, const char *host); struct utmp * __getutent __P ((int)); #endif +__END_DECLS + #endif /* __UTMP_H */ -- cgit v1.2.3