From 584584a5ba085dc800423dfe196436e47cb7a932 Mon Sep 17 00:00:00 2001 From: ceriel Date: Fri, 25 Oct 1991 14:44:21 +0000 Subject: [PATCH] protect against multiple inclusion --- include/_tail_cc/assert.h | 4 ++++ include/_tail_cc/ctype.h | 5 +++++ include/_tail_cc/math.h | 5 +++++ include/_tail_cc/setjmp.h | 6 ++++++ include/_tail_cc/sgtty.h | 5 +++++ include/_tail_cc/stdio.h | 6 ++++++ include/_tail_cc/sys/dir.h | 5 +++++ include/_tail_cc/sys/stat.h | 6 ++++++ include/_tail_cc/varargs.h | 4 ++++ 9 files changed, 46 insertions(+) diff --git a/include/_tail_cc/assert.h b/include/_tail_cc/assert.h index 8b5e1c3e4..2571abf15 100644 --- a/include/_tail_cc/assert.h +++ b/include/_tail_cc/assert.h @@ -5,6 +5,9 @@ /* $Header$ */ /* A S S E R T I O N M A C R O D E F I N I T I O N */ +#ifndef _ASSERT_H +#define _ASSERT_H + #ifndef NDEBUG /* Note: this macro uses parameter substitution inside strings */ #define assert(exp) (exp || (fprintf(stderr,"Assertion \"%s\" failed: file %s, line %d\n", "exp", __FILE__, __LINE__), exit(1))) @@ -13,3 +16,4 @@ #define assert(exp) (1) #define _assert(exp) (1) #endif NDEBUG +#endif /* _ASSERT_H */ diff --git a/include/_tail_cc/ctype.h b/include/_tail_cc/ctype.h index bd078e489..cbbfc2686 100644 --- a/include/_tail_cc/ctype.h +++ b/include/_tail_cc/ctype.h @@ -3,6 +3,10 @@ * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. * See the copyright notice in the ACK home directory, in the file "Copyright". */ + +#ifndef _CTYPE_H +#define _CTYPE_H + /* File : ctypes.h Author : Richard A. O'Keefe. Updated: 26 April 1984 @@ -48,3 +52,4 @@ extern char _c2type[]; #define tocntrl(c) (((((c)+1)&~96)-1)&127) #define toascii(c) ((c)&127) +#endif /* _CTYPE_H */ diff --git a/include/_tail_cc/math.h b/include/_tail_cc/math.h index 5a0d619c9..52a41e3da 100644 --- a/include/_tail_cc/math.h +++ b/include/_tail_cc/math.h @@ -5,6 +5,9 @@ /* $Header$ */ +#ifndef _MATH_H +#define _MATH_H + /* some constants (Hart & Cheney) */ #define M_PI 3.14159265358979323846264338327950288 @@ -74,3 +77,5 @@ extern double sinh(), tanh(), cosh(); #define HUGE M_MAX_D #define MAXDOUBLE M_MAX_D + +#endif /* _MATH_H */ diff --git a/include/_tail_cc/setjmp.h b/include/_tail_cc/setjmp.h index dc1083666..e4fb878c1 100644 --- a/include/_tail_cc/setjmp.h +++ b/include/_tail_cc/setjmp.h @@ -3,4 +3,10 @@ * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. * See the copyright notice in the ACK home directory, in the file "Copyright". */ + +#ifndef _SETJMP_H +#define _SETJMP_H + typedef char jmp_buf[256]; + +#endif /* _SETJMP_H */ diff --git a/include/_tail_cc/sgtty.h b/include/_tail_cc/sgtty.h index a44338309..1974720d3 100644 --- a/include/_tail_cc/sgtty.h +++ b/include/_tail_cc/sgtty.h @@ -5,6 +5,9 @@ */ /* Data structures for ioctl/stty/gtty, sufficient for ACK libraries */ +#ifndef _SGTTY_H +#define _SGTTY_H + struct sgttyb { char sg_ispeed; /* input speed (not used) */ char sg_ospeed; /* output speed (not used) */ @@ -104,3 +107,5 @@ struct tchars { #define B9600 13 #define EXTA 14 #define EXTB 15 + +#endif /* _SGTTY_H */ diff --git a/include/_tail_cc/stdio.h b/include/_tail_cc/stdio.h index 780bb721f..9701326a3 100644 --- a/include/_tail_cc/stdio.h +++ b/include/_tail_cc/stdio.h @@ -3,6 +3,10 @@ * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. * See the copyright notice in the ACK home directory, in the file "Copyright". */ + +#ifndef _STDIO_H +#define _STDIO_H + #define BUFSIZ 1024 #ifdef __vax #define _NBF 8 @@ -75,3 +79,5 @@ extern FILE *fopen(), *fdopen(), *freopen(), *popen(); extern long ftell(); extern setbuf(), rewind(); extern char *fgets(), *gets(); + +#endif /* _STDIO_H */ diff --git a/include/_tail_cc/sys/dir.h b/include/_tail_cc/sys/dir.h index 6f3573c06..f1f6f909d 100644 --- a/include/_tail_cc/sys/dir.h +++ b/include/_tail_cc/sys/dir.h @@ -3,6 +3,9 @@ * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. * See the copyright notice in the ACK home directory, in the file "Copyright". */ +#ifndef _DIR_H +#define _DIR_H + #ifdef __BSD4_2 #define MAXNAMLEN 255 #else @@ -38,3 +41,5 @@ extern long telldir(); extern seekdir(); #define rewinddir(dirp) seekdir((dirp), 0L) extern closedir(); + +#endif /* _DIR_H */ diff --git a/include/_tail_cc/sys/stat.h b/include/_tail_cc/sys/stat.h index 9cfa27ee3..afa95aa04 100644 --- a/include/_tail_cc/sys/stat.h +++ b/include/_tail_cc/sys/stat.h @@ -3,6 +3,10 @@ * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. * See the copyright notice in the ACK home directory, in the file "Copyright". */ + +#ifndef _STAT_H +#define _STAT_H + struct stat { dev_t st_dev; ino_t st_ino; @@ -51,3 +55,5 @@ struct stat { #define S_IREAD 0000400 #define S_IWRITE 0000200 #define S_IEXEC 0000100 + +#endif /* _STAT_H */ diff --git a/include/_tail_cc/varargs.h b/include/_tail_cc/varargs.h index 6e3ba9bef..140836d6f 100644 --- a/include/_tail_cc/varargs.h +++ b/include/_tail_cc/varargs.h @@ -4,9 +4,13 @@ */ /* $Header$ */ +#ifndef _VARARGS_H +#define _VARARGS_H + typedef char *va_list; # define __va_sz(mode) (((sizeof(mode) + sizeof(int) - 1) / sizeof(int)) * sizeof(int)) # define va_dcl int va_alist; # define va_start(list) (list = (char *) &va_alist) # define va_end(list) # define va_arg(list,mode) (*((mode *)((list += __va_sz(mode)) - __va_sz(mode)))) +#endif /* _VARARGS_H */ -- 2.34.1