1 /* 2 * BEGIN illumos section 3 * This is an unstable interface; changes may be made 4 * without notice. 5 * END illumos section 6 */ 7 /*********************************************************************** 8 * * 9 * This software is part of the ast package * 10 * Copyright (c) 1985-2011 AT&T Intellectual Property * 11 * and is licensed under the * 12 * Eclipse Public License, Version 1.0 * 13 * by AT&T Intellectual Property * 14 * * 15 * A copy of the License is available at * 16 * http://www.eclipse.org/org/documents/epl-v10.html * 17 * (with md5 checksum b35adb5213ca9657e911e9befb180842) * 18 * * 19 * Information and Software Systems Research * 20 * AT&T Research * 21 * Florham Park NJ * 22 * * 23 * Glenn Fowler <gsf@research.att.com> * 24 * David Korn <dgk@research.att.com> * 25 * Phong Vo <kpv@research.att.com> * 26 * * 27 ***********************************************************************/ 28 #pragma prototyped 29 /* 30 * Glenn Fowler 31 * AT&T Research 32 * 33 * integral representation conversion support definitions 34 * supports sizeof(integral_type)<=sizeof(intmax_t) 35 */ 36 37 #ifndef _SWAP_H 38 #define _SWAP_H 39 40 #include <ast_common.h> 41 42 #define int_swap _ast_intswap 43 44 #define SWAP_MAX 8 45 46 #define SWAPOP(n) (((n)&int_swap)^(n)) 47 48 #if _BLD_ast && defined(__EXPORT__) 49 #define extern __EXPORT__ 50 #endif 51 52 extern void* swapmem(int, const void*, void*, size_t); 53 extern intmax_t swapget(int, const void*, int); 54 extern void* swapput(int, void*, int, intmax_t); 55 extern int swapop(const void*, const void*, int); 56 57 #undef extern 58 59 #endif 60