security/nss/lib/dbm/include/cdefs.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/nss/lib/dbm/include/cdefs.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,126 @@
     1.4 +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/*
     1.6 + * Copyright (c) 1991, 1993
     1.7 + *	The Regents of the University of California.  All rights reserved.
     1.8 + *
     1.9 + * This code is derived from software contributed to Berkeley by
    1.10 + * Berkeley Software Design, Inc.
    1.11 + *
    1.12 + * Redistribution and use in source and binary forms, with or without
    1.13 + * modification, are permitted provided that the following conditions
    1.14 + * are met:
    1.15 + * 1. Redistributions of source code must retain the above copyright
    1.16 + *    notice, this list of conditions and the following disclaimer.
    1.17 + * 2. Redistributions in binary form must reproduce the above copyright
    1.18 + *    notice, this list of conditions and the following disclaimer in the
    1.19 + *    documentation and/or other materials provided with the distribution.
    1.20 + * 3. ***REMOVED*** - see 
    1.21 + *    ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
    1.22 + * 4. Neither the name of the University nor the names of its contributors
    1.23 + *    may be used to endorse or promote products derived from this software
    1.24 + *    without specific prior written permission.
    1.25 + *
    1.26 + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
    1.27 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    1.28 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    1.29 + * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
    1.30 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    1.31 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    1.32 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    1.33 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    1.34 + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    1.35 + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    1.36 + * SUCH DAMAGE.
    1.37 + *
    1.38 + *	@(#)cdefs.h	8.7 (Berkeley) 1/21/94
    1.39 + */
    1.40 +
    1.41 +#ifndef	_CDEFS_H_
    1.42 +#define	_CDEFS_H_
    1.43 +
    1.44 +#if defined(__cplusplus)
    1.45 +#define	__BEGIN_DECLS	extern "C" {
    1.46 +#define	__END_DECLS	}
    1.47 +#else
    1.48 +#define	__BEGIN_DECLS
    1.49 +#define	__END_DECLS
    1.50 +#endif
    1.51 +
    1.52 +/*
    1.53 + * The __CONCAT macro is used to concatenate parts of symbol names, e.g.
    1.54 + * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
    1.55 + * The __CONCAT macro is a bit tricky -- make sure you don't put spaces
    1.56 + * in between its arguments.  __CONCAT can also concatenate double-quoted
    1.57 + * strings produced by the __STRING macro, but this only works with ANSI C.
    1.58 + */
    1.59 +#if defined(__STDC__) || defined(__cplusplus) || defined(_WINDOWS) || defined(XP_OS2)
    1.60 +#define	__P(protos)	protos		/* full-blown ANSI C */
    1.61 +#define	__CONCAT(x,y)	x ## y
    1.62 +#define	__STRING(x)	#x
    1.63 +
    1.64 +/* On HP-UX 11.00, <sys/stdsyms.h> defines __const. */
    1.65 +#ifndef __const
    1.66 +#define	__const		const		/* define reserved names to standard */
    1.67 +#endif  /* __const */
    1.68 +#define	__signed	signed
    1.69 +#define	__volatile	volatile
    1.70 +#ifndef _WINDOWS
    1.71 +#if defined(__cplusplus)
    1.72 +#define	__inline	inline		/* convert to C++ keyword */
    1.73 +#else
    1.74 +#if !defined(__GNUC__) && !defined(__MWERKS__)
    1.75 +#define	__inline			/* delete GCC keyword */
    1.76 +#endif /* !__GNUC__ */
    1.77 +#endif /* !__cplusplus */
    1.78 +#endif /* !_WINDOWS */
    1.79 +
    1.80 +#else	/* !(__STDC__ || __cplusplus) */
    1.81 +#define	__P(protos)	()		/* traditional C preprocessor */
    1.82 +#define	__CONCAT(x,y)	x/**/y
    1.83 +#define	__STRING(x)	"x"
    1.84 +
    1.85 +#ifndef __GNUC__
    1.86 +#define	__const				/* delete pseudo-ANSI C keywords */
    1.87 +#define	__inline
    1.88 +#define	__signed
    1.89 +#define	__volatile
    1.90 +/*
    1.91 + * In non-ANSI C environments, new programs will want ANSI-only C keywords
    1.92 + * deleted from the program and old programs will want them left alone.
    1.93 + * When using a compiler other than gcc, programs using the ANSI C keywords
    1.94 + * const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS.
    1.95 + * When using "gcc -traditional", we assume that this is the intent; if
    1.96 + * __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone.
    1.97 + */
    1.98 +#ifndef	NO_ANSI_KEYWORDS
    1.99 +#define	const				/* delete ANSI C keywords */
   1.100 +#define	inline
   1.101 +#define	signed
   1.102 +#define	volatile
   1.103 +#endif
   1.104 +#endif	/* !__GNUC__ */
   1.105 +#endif	/* !(__STDC__ || __cplusplus) */
   1.106 +
   1.107 +/*
   1.108 + * GCC1 and some versions of GCC2 declare dead (non-returning) and
   1.109 + * pure (no side effects) functions using "volatile" and "const";
   1.110 + * unfortunately, these then cause warnings under "-ansi -pedantic".
   1.111 + * GCC2 uses a new, peculiar __attribute__((attrs)) style.  All of
   1.112 + * these work for GNU C++ (modulo a slight glitch in the C++ grammar
   1.113 + * in the distribution version of 2.5.5).
   1.114 + */
   1.115 +#if !defined(__GNUC__) || __GNUC__ < 2 || __GNUC_MINOR__ < 5
   1.116 +#define	__attribute__(x)	/* delete __attribute__ if non-gcc or gcc1 */
   1.117 +#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
   1.118 +#define	__dead		__volatile
   1.119 +#define	__pure		__const
   1.120 +#endif
   1.121 +#endif
   1.122 +
   1.123 +/* Delete pseudo-keywords wherever they are not available or needed. */
   1.124 +#ifndef __dead
   1.125 +#define	__dead
   1.126 +#define	__pure
   1.127 +#endif
   1.128 +
   1.129 +#endif /* !_CDEFS_H_ */

mercurial