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

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /*
michael@0 3 * Copyright (c) 1991, 1993
michael@0 4 * The Regents of the University of California. All rights reserved.
michael@0 5 *
michael@0 6 * This code is derived from software contributed to Berkeley by
michael@0 7 * Berkeley Software Design, Inc.
michael@0 8 *
michael@0 9 * Redistribution and use in source and binary forms, with or without
michael@0 10 * modification, are permitted provided that the following conditions
michael@0 11 * are met:
michael@0 12 * 1. Redistributions of source code must retain the above copyright
michael@0 13 * notice, this list of conditions and the following disclaimer.
michael@0 14 * 2. Redistributions in binary form must reproduce the above copyright
michael@0 15 * notice, this list of conditions and the following disclaimer in the
michael@0 16 * documentation and/or other materials provided with the distribution.
michael@0 17 * 3. ***REMOVED*** - see
michael@0 18 * ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
michael@0 19 * 4. Neither the name of the University nor the names of its contributors
michael@0 20 * may be used to endorse or promote products derived from this software
michael@0 21 * without specific prior written permission.
michael@0 22 *
michael@0 23 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
michael@0 24 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
michael@0 25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
michael@0 26 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
michael@0 27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
michael@0 28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
michael@0 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
michael@0 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
michael@0 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
michael@0 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
michael@0 33 * SUCH DAMAGE.
michael@0 34 *
michael@0 35 * @(#)cdefs.h 8.7 (Berkeley) 1/21/94
michael@0 36 */
michael@0 37
michael@0 38 #ifndef _CDEFS_H_
michael@0 39 #define _CDEFS_H_
michael@0 40
michael@0 41 #if defined(__cplusplus)
michael@0 42 #define __BEGIN_DECLS extern "C" {
michael@0 43 #define __END_DECLS }
michael@0 44 #else
michael@0 45 #define __BEGIN_DECLS
michael@0 46 #define __END_DECLS
michael@0 47 #endif
michael@0 48
michael@0 49 /*
michael@0 50 * The __CONCAT macro is used to concatenate parts of symbol names, e.g.
michael@0 51 * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
michael@0 52 * The __CONCAT macro is a bit tricky -- make sure you don't put spaces
michael@0 53 * in between its arguments. __CONCAT can also concatenate double-quoted
michael@0 54 * strings produced by the __STRING macro, but this only works with ANSI C.
michael@0 55 */
michael@0 56 #if defined(__STDC__) || defined(__cplusplus) || defined(_WINDOWS) || defined(XP_OS2)
michael@0 57 #define __P(protos) protos /* full-blown ANSI C */
michael@0 58 #define __CONCAT(x,y) x ## y
michael@0 59 #define __STRING(x) #x
michael@0 60
michael@0 61 /* On HP-UX 11.00, <sys/stdsyms.h> defines __const. */
michael@0 62 #ifndef __const
michael@0 63 #define __const const /* define reserved names to standard */
michael@0 64 #endif /* __const */
michael@0 65 #define __signed signed
michael@0 66 #define __volatile volatile
michael@0 67 #ifndef _WINDOWS
michael@0 68 #if defined(__cplusplus)
michael@0 69 #define __inline inline /* convert to C++ keyword */
michael@0 70 #else
michael@0 71 #if !defined(__GNUC__) && !defined(__MWERKS__)
michael@0 72 #define __inline /* delete GCC keyword */
michael@0 73 #endif /* !__GNUC__ */
michael@0 74 #endif /* !__cplusplus */
michael@0 75 #endif /* !_WINDOWS */
michael@0 76
michael@0 77 #else /* !(__STDC__ || __cplusplus) */
michael@0 78 #define __P(protos) () /* traditional C preprocessor */
michael@0 79 #define __CONCAT(x,y) x/**/y
michael@0 80 #define __STRING(x) "x"
michael@0 81
michael@0 82 #ifndef __GNUC__
michael@0 83 #define __const /* delete pseudo-ANSI C keywords */
michael@0 84 #define __inline
michael@0 85 #define __signed
michael@0 86 #define __volatile
michael@0 87 /*
michael@0 88 * In non-ANSI C environments, new programs will want ANSI-only C keywords
michael@0 89 * deleted from the program and old programs will want them left alone.
michael@0 90 * When using a compiler other than gcc, programs using the ANSI C keywords
michael@0 91 * const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS.
michael@0 92 * When using "gcc -traditional", we assume that this is the intent; if
michael@0 93 * __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone.
michael@0 94 */
michael@0 95 #ifndef NO_ANSI_KEYWORDS
michael@0 96 #define const /* delete ANSI C keywords */
michael@0 97 #define inline
michael@0 98 #define signed
michael@0 99 #define volatile
michael@0 100 #endif
michael@0 101 #endif /* !__GNUC__ */
michael@0 102 #endif /* !(__STDC__ || __cplusplus) */
michael@0 103
michael@0 104 /*
michael@0 105 * GCC1 and some versions of GCC2 declare dead (non-returning) and
michael@0 106 * pure (no side effects) functions using "volatile" and "const";
michael@0 107 * unfortunately, these then cause warnings under "-ansi -pedantic".
michael@0 108 * GCC2 uses a new, peculiar __attribute__((attrs)) style. All of
michael@0 109 * these work for GNU C++ (modulo a slight glitch in the C++ grammar
michael@0 110 * in the distribution version of 2.5.5).
michael@0 111 */
michael@0 112 #if !defined(__GNUC__) || __GNUC__ < 2 || __GNUC_MINOR__ < 5
michael@0 113 #define __attribute__(x) /* delete __attribute__ if non-gcc or gcc1 */
michael@0 114 #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
michael@0 115 #define __dead __volatile
michael@0 116 #define __pure __const
michael@0 117 #endif
michael@0 118 #endif
michael@0 119
michael@0 120 /* Delete pseudo-keywords wherever they are not available or needed. */
michael@0 121 #ifndef __dead
michael@0 122 #define __dead
michael@0 123 #define __pure
michael@0 124 #endif
michael@0 125
michael@0 126 #endif /* !_CDEFS_H_ */

mercurial