1*b00ab754SHans Petter Selasky /* -*- Mode: c; tab-width: 8; indent-tabs-mode: 1; c-basic-offset: 8; -*- */ 2*b00ab754SHans Petter Selasky /* 3*b00ab754SHans Petter Selasky * Copyright (c) 1993, 1994, 1995, 1996, 1997 4*b00ab754SHans Petter Selasky * The Regents of the University of California. All rights reserved. 5*b00ab754SHans Petter Selasky * 6*b00ab754SHans Petter Selasky * Redistribution and use in source and binary forms, with or without 7*b00ab754SHans Petter Selasky * modification, are permitted provided that the following conditions 8*b00ab754SHans Petter Selasky * are met: 9*b00ab754SHans Petter Selasky * 1. Redistributions of source code must retain the above copyright 10*b00ab754SHans Petter Selasky * notice, this list of conditions and the following disclaimer. 11*b00ab754SHans Petter Selasky * 2. Redistributions in binary form must reproduce the above copyright 12*b00ab754SHans Petter Selasky * notice, this list of conditions and the following disclaimer in the 13*b00ab754SHans Petter Selasky * documentation and/or other materials provided with the distribution. 14*b00ab754SHans Petter Selasky * 3. All advertising materials mentioning features or use of this software 15*b00ab754SHans Petter Selasky * must display the following acknowledgement: 16*b00ab754SHans Petter Selasky * This product includes software developed by the Computer Systems 17*b00ab754SHans Petter Selasky * Engineering Group at Lawrence Berkeley Laboratory. 18*b00ab754SHans Petter Selasky * 4. Neither the name of the University nor of the Laboratory may be used 19*b00ab754SHans Petter Selasky * to endorse or promote products derived from this software without 20*b00ab754SHans Petter Selasky * specific prior written permission. 21*b00ab754SHans Petter Selasky * 22*b00ab754SHans Petter Selasky * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23*b00ab754SHans Petter Selasky * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24*b00ab754SHans Petter Selasky * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25*b00ab754SHans Petter Selasky * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26*b00ab754SHans Petter Selasky * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27*b00ab754SHans Petter Selasky * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28*b00ab754SHans Petter Selasky * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29*b00ab754SHans Petter Selasky * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30*b00ab754SHans Petter Selasky * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31*b00ab754SHans Petter Selasky * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32*b00ab754SHans Petter Selasky * SUCH DAMAGE. 33*b00ab754SHans Petter Selasky */ 34*b00ab754SHans Petter Selasky 35*b00ab754SHans Petter Selasky #ifndef varattrs_h 36*b00ab754SHans Petter Selasky #define varattrs_h 37*b00ab754SHans Petter Selasky 38*b00ab754SHans Petter Selasky #include <pcap/compiler-tests.h> 39*b00ab754SHans Petter Selasky 40*b00ab754SHans Petter Selasky /* 41*b00ab754SHans Petter Selasky * Attributes to apply to variables, using various compiler-specific 42*b00ab754SHans Petter Selasky * extensions. 43*b00ab754SHans Petter Selasky */ 44*b00ab754SHans Petter Selasky 45*b00ab754SHans Petter Selasky #if __has_attribute(unused) \ 46*b00ab754SHans Petter Selasky || PCAP_IS_AT_LEAST_GNUC_VERSION(2,0) 47*b00ab754SHans Petter Selasky /* 48*b00ab754SHans Petter Selasky * Compiler with support for __attribute__((unused)), or GCC 2.0 and 49*b00ab754SHans Petter Selasky * later, so it supports __attribute__((unused)). 50*b00ab754SHans Petter Selasky */ 51*b00ab754SHans Petter Selasky #define _U_ __attribute__((unused)) 52*b00ab754SHans Petter Selasky #else 53*b00ab754SHans Petter Selasky /* 54*b00ab754SHans Petter Selasky * We don't know of any way to mark a variable as unused. 55*b00ab754SHans Petter Selasky */ 56*b00ab754SHans Petter Selasky #define _U_ 57*b00ab754SHans Petter Selasky #endif 58*b00ab754SHans Petter Selasky 59*b00ab754SHans Petter Selasky #endif 60