revert between 56095 -> 55830 in arch
[AROS.git] / workbench / network / stacks / AROSTCP / bsdsocket / sys / cdefs.h
blob5a2193839398cb8fe72e172551d2053651376bff
1 /*
2 * Copyright (C) 1993 AmiTCP/IP Group, <amitcp-group@hut.fi>
3 * Helsinki University of Technology, Finland.
4 * All rights reserved.
5 * Copyright (C) 2005 Neil Cafferkey
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
19 * MA 02111-1307, USA.
24 * Copyright (c) 1991 The Regents of the University of California.
25 * All rights reserved.
27 * Redistribution and use in source and binary forms, with or without
28 * modification, are permitted provided that the following conditions
29 * are met:
30 * 1. Redistributions of source code must retain the above copyright
31 * notice, this list of conditions and the following disclaimer.
32 * 2. Redistributions in binary form must reproduce the above copyright
33 * notice, this list of conditions and the following disclaimer in the
34 * documentation and/or other materials provided with the distribution.
35 * 3. All advertising materials mentioning features or use of this software
36 * must display the following acknowledgement:
37 * This product includes software developed by the University of
38 * California, Berkeley and its contributors.
39 * 4. Neither the name of the University nor the names of its contributors
40 * may be used to endorse or promote products derived from this software
41 * without specific prior written permission.
43 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
44 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
45 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
46 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
47 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
48 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
49 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
50 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
51 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
52 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
53 * SUCH DAMAGE.
55 * @(#)cdefs.h 7.6 (Berkeley) 5/4/91
58 #ifndef SYS_CDEFS_H
59 #define SYS_CDEFS_H
61 #if defined(__cplusplus)
62 #define __BEGIN_DECLS extern "C" {
63 #define __END_DECLS };
64 #else
65 #define __BEGIN_DECLS
66 #define __END_DECLS
67 #endif
70 * SAVEDS should be used in all function definitions which will be called
71 * from other tasks than AmiTCP/IP. It restores the global data base pointer
72 * as the first thing in the function body.
74 * REGARGFUN contains special keywords which should be used when functions
75 * used through shared library are referenced.
77 #if __SASC_60
78 #define SAVEDS __saveds
79 #define REGARGFUN __asm
80 #define STKARGFUN __stdargs
81 #define ALIGNED __aligned
82 #define ASM __asm
83 #define REG(x) register __##x
84 #else
85 #define SAVEDS
86 #define REGARGFUN
87 #define STKARGFUN
88 #define ALIGNED
89 #define ASM
90 #endif
93 * The __CONCAT macro is used to concatenate parts of symbol names, e.g.
94 * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
95 * The __CONCAT macro is a bit tricky -- make sure you don't put spaces
96 * in between its arguments. __CONCAT can also concatenate double-quoted
97 * strings produced by the __STRING macro, but this only works with ANSI C.
99 #if defined(__STDC__) || defined(__cplusplus)
100 #define __P(protos) protos /* full-blown ANSI C */
101 #define __CONCAT(x,y) x ## y
102 #define __STRING(x) #x
104 #if __SASC_60
105 #define inline __inline
106 #endif
108 #else /* !(__STDC__ || __cplusplus) */
109 #define __P(protos) () /* traditional C preprocessor */
110 #define __CONCAT(x,y) x/**/y
111 #define __STRING(x) "x"
113 #if __GNUC__
114 #define const __const__ /* GCC: ANSI C with -traditional */
115 #define inline __inline__
116 #define signed __signed__
117 #define volatile __volatile__
119 #else /* !__GNUC__ */
120 #define const /* delete ANSI C keywords */
121 #define inline
122 #define signed
123 #define volatile
124 #endif /* !__GNUC__ */
125 #endif /* !(__STDC__ || __cplusplus) */
127 #endif /* !SYS_CDEFS_H */