Changeset c7021d9 for libwandio


Ignore:
Timestamp:
05/29/14 16:00:48 (7 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
9b42f3e
Parents:
5809145
Message:

Added m4 macros to check for gcc compiler attributes

Instead of relying on GNUC, we now individually check
whether each attribute is supported by the C compiler and set
preprocessor macros accordingly.

Removed similar attribute definitions from wandio.h, as these are
not used at all by libwandio.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libwandio/wandio.h

    r10f924c rc7021d9  
    5151
    5252// TODO: Use a proper check for these attribute rather than gcc version check
    53 #if __GNUC__ >= 3
    54 #  define DEPRECATED __attribute__((deprecated))
    55 #  define SIMPLE_FUNCTION __attribute__((pure))
    56 #  define UNUSED __attribute__((unused))
    57 #  define PACKED __attribute__((packed))
    58 #  define PRINTF(formatpos,argpos) __attribute__((format(printf,formatpos,argpos)))
    59 #else
    60 #  define DEPRECATED
    61 #  define SIMPLE_FUNCTION
    62 #  define UNUSED
    63 #  define PACKED
    64 #  define PRINTF(formatpos,argpos)
    65 #endif
    66 
    6753
    6854/** @file
Note: See TracChangeset for help on using the changeset viewer.