cdefs.h (22975) | cdefs.h (25083) |
---|---|
1/* 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Berkeley Software Design, Inc. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * @(#)cdefs.h 8.8 (Berkeley) 1/9/95 | 1/* 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Berkeley Software Design, Inc. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * @(#)cdefs.h 8.8 (Berkeley) 1/9/95 |
37 * $Id$ | 37 * $Id: cdefs.h,v 1.13 1997/02/22 09:44:52 peter Exp $ |
38 */ 39 40#ifndef _SYS_CDEFS_H_ 41#define _SYS_CDEFS_H_ 42 43#if defined(__cplusplus) 44#define __BEGIN_DECLS extern "C" { 45#define __END_DECLS }; 46#else 47#define __BEGIN_DECLS 48#define __END_DECLS 49#endif 50 51/* 52 * The __CONCAT macro is used to concatenate parts of symbol names, e.g. 53 * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. 54 * The __CONCAT macro is a bit tricky -- make sure you don't put spaces 55 * in between its arguments. __CONCAT can also concatenate double-quoted 56 * strings produced by the __STRING macro, but this only works with ANSI C. | 38 */ 39 40#ifndef _SYS_CDEFS_H_ 41#define _SYS_CDEFS_H_ 42 43#if defined(__cplusplus) 44#define __BEGIN_DECLS extern "C" { 45#define __END_DECLS }; 46#else 47#define __BEGIN_DECLS 48#define __END_DECLS 49#endif 50 51/* 52 * The __CONCAT macro is used to concatenate parts of symbol names, e.g. 53 * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. 54 * The __CONCAT macro is a bit tricky -- make sure you don't put spaces 55 * in between its arguments. __CONCAT can also concatenate double-quoted 56 * strings produced by the __STRING macro, but this only works with ANSI C. |
57 * 58 * __XSTRING is like __STRING, but it expands any macros in its argument 59 * first. It is only available with ANSI C. |
|
57 */ 58#if defined(__STDC__) || defined(__cplusplus) 59#define __P(protos) protos /* full-blown ANSI C */ 60#define __CONCAT1(x,y) x ## y 61#define __CONCAT(x,y) __CONCAT1(x,y) | 60 */ 61#if defined(__STDC__) || defined(__cplusplus) 62#define __P(protos) protos /* full-blown ANSI C */ 63#define __CONCAT1(x,y) x ## y 64#define __CONCAT(x,y) __CONCAT1(x,y) |
62#define __STRING(x) #x | 65#define __STRING(x) #x /* stringify without expanding x */ 66#define __XSTRING(x) __STRING(x) /* expand x, then stringify */ |
63 64#define __const const /* define reserved names to standard */ 65#define __signed signed 66#define __volatile volatile 67#if defined(__cplusplus) 68#define __inline inline /* convert to C++ keyword */ 69#else 70#ifndef __GNUC__ --- 88 unchanged lines hidden --- | 67 68#define __const const /* define reserved names to standard */ 69#define __signed signed 70#define __volatile volatile 71#if defined(__cplusplus) 72#define __inline inline /* convert to C++ keyword */ 73#else 74#ifndef __GNUC__ --- 88 unchanged lines hidden --- |