Changeset a63a913


Ignore:
Timestamp:
05/29/14 16:34:15 (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:
265d6a5, 4cc8499, e3a639a
Parents:
5809145 (diff), abf01b6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'moregccattrs' into develop

Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • configure.in

    r10f924c rabf01b6  
    1919AC_CONFIG_MACRO_DIR([m4])
    2020AC_CONFIG_SRCDIR(lib/trace.c)
    21 AM_INIT_AUTOMAKE
     21AM_INIT_AUTOMAKE([subdir-objects])
    2222
    2323# Make sure we use the relatively silent automake output
     
    111111gl_VISIBILITY
    112112
     113gcc_PACKED
     114gcc_DEPRECATED
     115gcc_UNUSED
     116gcc_PURE
     117gcc_FORMAT
    113118       
    114119# Check for libtool
  • lib/Makefile.am

    r10f924c rbd119b3  
    5858endif
    5959
    60 INCLUDES= @ADD_INCLS@ -I../libwandio
     60AM_CPPFLAGS= @ADD_INCLS@ -I../libwandio
    6161libtrace_la_LIBADD = @LIBTRACE_LIBS@ @LTLIBOBJS@ $(DPDKLIBS)
    6262libtrace_la_LDFLAGS=-version-info @LIBTRACE_MAJOR@:@LIBTRACE_MINOR@:@LIBTRACE_MID@ @ADD_LDFLAGS@
  • lib/libtrace.h.in

    r10f924c rc7021d9  
    153153#endif
    154154
    155 /* Function does not depend on anything but its
    156  * parameters, used to hint gcc's optimisations
    157  *
    158  * TODO: Find a way to check for these that is not gcc-specific
    159  */
    160 #if __GNUC__ >= 3
     155/* Ensure these gcc optimisation attributes are defined consistently,
     156 * without requiring users to need to have access to the config.h
     157 * generated by running configure.
     158 */
     159
     160#define LT_USE_PACKED @HAVE_ATTRIBUTE_PACKED@
     161#define LT_USE_UNUSED @HAVE_ATTRIBUTE_UNUSED@
     162#define LT_USE_DEPRECATED @HAVE_ATTRIBUTE_DEPRECATED@
     163#define LT_USE_PURE @HAVE_ATTRIBUTE_PURE@
     164#define LT_USE_PRINTF @HAVE_ATTRIBUTE_FORMAT@
     165
     166#if LT_USE_PACKED
     167#  define PACKED __attribute__((packed))
     168#else
     169#  define PACKED
     170#endif
     171
     172#if LT_USE_UNUSED
     173#  define UNUSED __attribute__((unused))
     174#else
     175#  define UNUSED
     176#endif
     177
     178#if LT_USE_DEPRECATED
    161179#  define DEPRECATED __attribute__((deprecated))
    162 #  define SIMPLE_FUNCTION __attribute__((pure))
    163 #  define UNUSED __attribute__((unused))
    164 #  define PACKED __attribute__((packed))
    165 #  define PRINTF(formatpos,argpos) __attribute__((format(printf,formatpos,argpos)))
    166180#else
    167181#  define DEPRECATED
     182#endif
     183
     184#if LT_USE_PURE
     185#  define SIMPLE_FUNCTION __attribute__((pure))
     186#else
    168187#  define SIMPLE_FUNCTION
    169 #  define UNUSED
    170 #  define PACKED
    171 #  define PRINTF(formatpos,argpos)
     188#endif
     189
     190#if LT_USE_PRINTF
     191#  define PRINTF(formatpos, argpos) __attribute__((format(printf,formatpos, argpos)))
     192#else
     193#  define PRINTF(formatpos, argpos)
    172194#endif
    173195
  • libpacketdump/Makefile.am

    r8b49230 rbd119b3  
    172172dist_plugin_DATA = $(TXT_PROTOCOLS)
    173173
    174 INCLUDES= @ADD_INCLS@ -I../lib -I../libwandio
     174AM_CPPFLAGS= @ADD_INCLS@ -I../lib -I../libwandio
    175175
    176176# NOTE: You CANNOT add @LEXLIBS@ here, as they are statically compiled
     
    182182        @ADD_LDFLAGS@
    183183
    184 AM_CXXFLAGS=-g -Wall -DDIRNAME=\"$(plugindir)\" $(INCLUDES)
     184AM_CXXFLAGS=-g -Wall -DDIRNAME=\"$(plugindir)\" $(AM_CPPFLAGS)
    185185BUILT_SOURCES=parser.h
    186186AM_YFLAGS=-d
  • libwandio/Makefile.am

    r10f924c rbd119b3  
    2828                $(LIBTRACEIO_ZLIB) $(LIBTRACEIO_BZLIB) $(LIBTRACEIO_LZO)
    2929
    30 INCLUDES = @ADD_INCLS@
     30AM_CPPFLAGS = @ADD_INCLS@
    3131libwandio_la_LIBADD = @LIBWANDIO_LIBS@
    3232libwandio_la_LDFLAGS=-version-info 1:0:0 @ADD_LDFLAGS@
  • 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.