xref: /titanic_44/usr/src/lib/libast/i386/include/ast/swap.h (revision 5ee6ac27d4fd4c9412183aa8cc1143f36ae04a8c)
1 
2 /* : : generated by proto : : */
3 /***********************************************************************
4 *                                                                      *
5 *               This software is part of the ast package               *
6 *          Copyright (c) 1985-2010 AT&T Intellectual Property          *
7 *                      and is licensed under the                       *
8 *                  Common Public License, Version 1.0                  *
9 *                    by AT&T Intellectual Property                     *
10 *                                                                      *
11 *                A copy of the License is available at                 *
12 *            http://www.opensource.org/licenses/cpl1.0.txt             *
13 *         (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9)         *
14 *                                                                      *
15 *              Information and Software Systems Research               *
16 *                            AT&T Research                             *
17 *                           Florham Park NJ                            *
18 *                                                                      *
19 *                 Glenn Fowler <gsf@research.att.com>                  *
20 *                  David Korn <dgk@research.att.com>                   *
21 *                   Phong Vo <kpv@research.att.com>                    *
22 *                                                                      *
23 ***********************************************************************/
24 
25 /*
26  * Glenn Fowler
27  * AT&T Research
28  *
29  * integral representation conversion support definitions
30  * supports sizeof(integral_type)<=sizeof(intmax_t)
31  */
32 
33 #ifndef _SWAP_H
34 #if !defined(__PROTO__)
35 #include <prototyped.h>
36 #endif
37 #if !defined(__LINKAGE__)
38 #define __LINKAGE__		/* 2004-08-11 transition */
39 #endif
40 
41 #define _SWAP_H
42 
43 #include <ast_common.h>
44 
45 #define int_swap	_ast_intswap
46 
47 #define SWAP_MAX	8
48 
49 #define SWAPOP(n)	(((n)&int_swap)^(n))
50 
51 #if _BLD_ast && defined(__EXPORT__)
52 #undef __MANGLE__
53 #define __MANGLE__ __LINKAGE__		__EXPORT__
54 #endif
55 
56 extern __MANGLE__ __V_*		swapmem __PROTO__((int, const __V_*, __V_*, size_t));
57 extern __MANGLE__ intmax_t		swapget __PROTO__((int, const __V_*, int));
58 extern __MANGLE__ __V_*		swapput __PROTO__((int, __V_*, int, intmax_t));
59 extern __MANGLE__ int		swapop __PROTO__((const __V_*, const __V_*, int));
60 
61 #undef __MANGLE__
62 #define __MANGLE__ __LINKAGE__
63 
64 #endif
65