1*31615c96Sdholland /* 2*31615c96Sdholland * Copyright (c) 2009 David A. Holland. 3*31615c96Sdholland * All rights reserved. 4*31615c96Sdholland * 5*31615c96Sdholland * Redistribution and use in source and binary forms, with or without 6*31615c96Sdholland * modification, are permitted provided that the following conditions 7*31615c96Sdholland * are met: 8*31615c96Sdholland * 1. Redistributions of source code must retain the above copyright 9*31615c96Sdholland * notice, this list of conditions and the following disclaimer. 10*31615c96Sdholland * 2. Redistributions in binary form must reproduce the above copyright 11*31615c96Sdholland * notice, this list of conditions and the following disclaimer in the 12*31615c96Sdholland * documentation and/or other materials provided with the distribution. 13*31615c96Sdholland * 3. Neither the name of the Author nor the names of any contributors 14*31615c96Sdholland * may be used to endorse or promote products derived from this software 15*31615c96Sdholland * without specific prior written permission. 16*31615c96Sdholland * 17*31615c96Sdholland * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18*31615c96Sdholland * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19*31615c96Sdholland * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20*31615c96Sdholland * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21*31615c96Sdholland * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22*31615c96Sdholland * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23*31615c96Sdholland * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24*31615c96Sdholland * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25*31615c96Sdholland * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26*31615c96Sdholland * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27*31615c96Sdholland * SUCH DAMAGE. 28*31615c96Sdholland */ 29*31615c96Sdholland 30*31615c96Sdholland #if defined(__GNUC__) && !defined(__GNUC_STDC_INLINE__) 31*31615c96Sdholland /* gcc's non-C99 inline semantics */ 32*31615c96Sdholland #define C99INLINE extern inline 33*31615c96Sdholland #elif defined(__STDC__) && __STDC_VERSION__ >= 199901L 34*31615c96Sdholland /* C99 */ 35*31615c96Sdholland #define C99INLINE inline 36*31615c96Sdholland #else 37*31615c96Sdholland /* something else; static inline is safest */ 38*31615c96Sdholland #define C99INLINE static inline 39*31615c96Sdholland #endif 40