Changeset 3436702
- Timestamp:
- 10/26/05 16:32:07 (15 years ago)
- Branches:
- 4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, 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:
- 767bd50
- Parents:
- 6f75b9d
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
configure.in
r437d002 r3436702 121 121 AC_PROG_GCC_TRADITIONAL 122 122 AC_CHECK_FUNCS(socket strdup) 123 124 # configure time option for __attribute__((pure)) 125 test_pure=true 126 AC_ARG_WITH(pure, 127 AC_HELP_STRING([--with-pure], 128 [use __attribute__((pure)) for optimisation]), 129 [ 130 if test "$withval" = no 131 then 132 test_pure=false 133 else 134 test_pure=true 135 fi 136 ],[ 137 test_pure=true 138 ]) 139 140 libtrace_pure=false 141 if test "$test_pure" = true; then 142 AC_MSG_CHECKING([if compiler supports __attribute__((pure))]) 143 AC_COMPILE_IFELSE([AC_LANG_PROGRAM( 144 [[#define SIMPLE_FUNCTION __attribute__((pure))]])], 145 [AC_DEFINE(HAVE_ATTR_PURE,1,[define to test for __attribute__((pure)) support]) libtrace_pure=true], 146 [AC_DEFINE(HAVE_ATTR_PURE,0,[define to test for __attribute__((pure)) support]) libtrace_pure=false]) 147 148 AC_MSG_RESULT($libtrace_pure) 149 fi 123 150 124 151 # configure time options for man pages … … 288 315 reportopt "Compiled with PCAP support" $libtrace_pcap 289 316 reportopt "Compiled with compressed trace (zlib) support" $libtrace_zlib 317 reportopt "Compiled with __attribute__((pure))" $libtrace_pure 290 318 reportopt "Compiled with DAG support (libdag)" $libtrace_dag 291 319 reportopt "Compiled with DAG support (DAG 2.4)" $libtrace_dag2_4 -
lib/libtrace.h
r6f75b9d r3436702 34 34 #include <sys/types.h> 35 35 #include <netinet/in.h> 36 #include "config.h" 36 37 37 38 /** API version as 2 byte hex digits, eg 0xXXYYZZ */ … … 45 46 * parameters, used to hint gcc's optimisations 46 47 */ 47 #define SIMPLE_FUNCTION __attribute__((pure)) 48 #ifdef HAVE_ATTR_PURE 49 # define SIMPLE_FUNCTION __attribute__((pure)) 50 #else 51 # define SIMPLE_FUNCTION 52 #endif 53 48 54 49 55 /** @file
Note: See TracChangeset
for help on using the changeset viewer.