Changeset 10f924c
- Timestamp:
- 05/23/14 17:31:26 (7 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:
- 2a7047c
- Parents:
- d3b6b91
- Files:
-
- 2 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
configure.in
r12e6a39 r10f924c 105 105 LIBWANDIO_LIBS="" 106 106 107 # Set our C compiler flags based on the gcc version 108 if test "$GCC" = "yes"; then 107 CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wextra -DLT_BUILDING_DLL=1" 108 CXXFLAGS="$CXXFLAGS -Wall -DLT_BUILDING_DLL=1" 109 110 # Check for -fvisibility 111 gl_VISIBILITY 112 109 113 110 gcc_version=`$CC -dumpversion`111 112 # This is probably not the most reliable way to test whether our113 # compiler supports visibility, but it's better than nothing114 #115 # According to the gcc wiki - http://gcc.gnu.org/wiki/Visibility -116 # visibility is supported in gcc 4.0 or later, so we just need to117 # check the major version number118 119 major=$(echo $gcc_version | cut -d'.' -f1)120 121 #major=${gcc_version%\.*\.*}122 123 if test "$major" -lt 4; then124 vis=no125 else126 vis=yes127 fi128 129 CFLAGS="$CFLAGS -Wall -Wmissing-prototypes"130 CXXFLAGS="$CXXFLAGS -Wall"131 LIBCFLAGS="$CFLAGS"132 LIBCFLAGS="$LIBCFLAGS -DLT_BUILDING_DLL=1"133 LIBCXXFLAGS="$CXXFLAGS"134 LIBCXXFLAGS="$CXXFLAGS -DLT_BUILDING_DLL=1"135 136 if test "$vis" = "yes"; then137 LIBCFLAGS="$LIBCFLAGS -Wextra -fvisibility=hidden"138 LIBCXXFLAGS="$CXXFLAGS -Wextra -fvisibility=hidden"139 fi140 fi141 142 114 # Check for libtool 143 115 AC_PROG_LIBTOOL -
lib/Makefile.am
r2138553 r10f924c 2 2 include_HEADERS = libtrace.h dagformat.h lt_inttypes.h daglegacy.h rt_protocol.h erftypes.h 3 3 4 AM_CFLAGS=@LIBCFLAGS@ 5 AM_CXXFLAGS=@LIBCXXFLAGS@ 4 AM_CFLAGS=@LIBCFLAGS@ @CFLAG_VISIBILITY@ 5 AM_CXXFLAGS=@LIBCXXFLAGS@ @CFLAG_VISIBILITY@ 6 6 7 7 extra_DIST = format_template.c -
lib/libtrace.h.in
r74ecbc7 r10f924c 80 80 #if defined(LITTLE_ENDIAN) && !defined(__LITTLE_ENDIAN) 81 81 #define __LITTLE_ENDIAN LITTLE_ENDIAN 82 #endif83 84 #ifdef _MSC_VER85 /* define the following from MSVC's internal types */86 typedef __int8 int8_t;87 typedef __int16 int16_t;88 typedef __int32 int32_t;89 typedef __int64 int64_t;90 typedef unsigned __int8 uint8_t;91 typedef unsigned __int16 uint16_t;92 typedef unsigned __int32 uint32_t;93 typedef unsigned __int64 uint64_t;94 #ifdef LT_BUILDING_DLL95 #define DLLEXPORT __declspec(dllexport)96 #else97 #define DLLEXPORT __declspec(dllimport)98 #endif99 #define DLLLOCAL100 /* Windows pads bitfields out to to the size of their parent type101 * however gcc warns that this doesn't meet with the iso C specification102 * so produces warnings for this behaviour. sigh.103 */104 #define LT_BITFIELD8 uint8_t105 #define LT_BITFIELD16 uint16_t106 #define LT_BITFIELD32 uint32_t107 #define LT_BITFIELD64 uint64_t108 #else109 #ifdef HAVE_STDINT_H110 # include <stdint.h>111 #endif112 #if __GNUC__ >= 4113 #ifdef LT_BUILDING_DLL114 #define DLLEXPORT __attribute__ ((visibility("default")))115 #define DLLLOCAL __attribute__ ((visibility("hidden")))116 #else117 #define DLLEXPORT118 #define DLLLOCAL119 #endif120 #else121 #define DLLEXPORT122 #define DLLLOCAL123 #endif124 /* GCC warns if the bitfield type is not "unsigned int", however windows125 * generates incorrect code for this (see above), so we define these126 * macros. How Hideous. So much for C's portability.127 */128 #define LT_BITFIELD8 unsigned int129 #define LT_BITFIELD16 unsigned int130 #define LT_BITFIELD32 unsigned int131 #define LT_BITFIELD64 unsigned int132 82 #endif 133 83 … … 170 120 #endif 171 121 122 #ifdef _MSC_VER 123 /* define the following from MSVC's internal types */ 124 typedef __int8 int8_t; 125 typedef __int16 int16_t; 126 typedef __int32 int32_t; 127 typedef __int64 int64_t; 128 typedef unsigned __int8 uint8_t; 129 typedef unsigned __int16 uint16_t; 130 typedef unsigned __int32 uint32_t; 131 typedef unsigned __int64 uint64_t; 132 133 /* Windows pads bitfields out to to the size of their parent type 134 * however gcc warns that this doesn't meet with the iso C specification 135 * so produces warnings for this behaviour. sigh. 136 */ 137 #define LT_BITFIELD8 uint8_t 138 #define LT_BITFIELD16 uint16_t 139 #define LT_BITFIELD32 uint32_t 140 #define LT_BITFIELD64 uint64_t 141 #else 142 #ifdef HAVE_STDINT_H 143 # include <stdint.h> 144 #endif 145 /* GCC warns if the bitfield type is not "unsigned int", however windows 146 * generates incorrect code for this (see above), so we define these 147 * macros. How Hideous. So much for C's portability. 148 */ 149 #define LT_BITFIELD8 unsigned int 150 #define LT_BITFIELD16 unsigned int 151 #define LT_BITFIELD32 unsigned int 152 #define LT_BITFIELD64 unsigned int 153 #endif 154 172 155 /* Function does not depend on anything but its 173 156 * parameters, used to hint gcc's optimisations 157 * 158 * TODO: Find a way to check for these that is not gcc-specific 174 159 */ 175 160 #if __GNUC__ >= 3 … … 186 171 # define PRINTF(formatpos,argpos) 187 172 #endif 173 174 #ifdef _MSC_VER 175 #ifdef LT_BUILDING_DLL 176 #define DLLEXPORT __declspec(dllexport) 177 #else 178 #define DLLEXPORT __declspec(dllimport) 179 #endif 180 #define DLLLOCAL 181 #else 182 #ifndef DLLEXPORT 183 #if HAVE_VISIBILITY && LT_BUILDING_DLL 184 #define DLLEXPORT __attribute__ ((visibility("default"))) 185 #define DLLLOCAL __attribute__ ((visibility("hidden"))) 186 #else 187 #define DLLEXPORT 188 #define DLLLOCAL 189 #endif 190 #endif 191 #endif 192 188 193 189 194 /** Opaque structure holding information about an output trace */ -
lib/libtrace_int.h
r8b49230 r10f924c 147 147 #include "bpf-jit/bpf-jit.h" 148 148 #endif 149 149 150 150 151 //#define RP_BUFSIZE 65536U -
lib/protocols_ospf.c
r8753bb8 r10f924c 32 32 */ 33 33 34 #include "libtrace_int.h" 34 35 #include "libtrace.h" 35 36 #include "protocols.h" -
lib/protocols_transport.c
rc909fad r10f924c 33 33 34 34 35 #include "libtrace_int.h" 35 36 #include "libtrace.h" 36 37 #include "protocols.h" -
libwandio/Makefile.am
r60f3c4c r10f924c 3 3 include_HEADERS=wandio.h 4 4 5 AM_CFLAGS=@LIBCFLAGS@ 6 AM_CXXFLAGS=@LIBCXXFLAGS@ 5 AM_CFLAGS=@LIBCFLAGS@ @CFLAG_VISIBILITY@ 6 AM_CXXFLAGS=@LIBCXXFLAGS@ @CFLAG_VISIBILITY@ 7 7 8 8 if HAVE_ZLIB … … 25 25 26 26 libwandio_la_SOURCES=wandio.c ior-peek.c ior-stdio.c ior-thread.c \ 27 iow-stdio.c iow-thread.c wandio.h \27 iow-stdio.c iow-thread.c wandio.h wandio_internal.h \ 28 28 $(LIBTRACEIO_ZLIB) $(LIBTRACEIO_BZLIB) $(LIBTRACEIO_LZO) 29 29 -
libwandio/ior-stdio.c
r60f3c4c r10f924c 34 34 35 35 #define _GNU_SOURCE 1 36 #include "wandio_internal.h" 36 37 #include "wandio.h" 37 38 #include <sys/types.h> -
libwandio/ior-thread.c
r954577b9 r10f924c 34 34 35 35 #include "config.h" 36 #include "wandio_internal.h" 36 37 #include "wandio.h" 37 38 #include <sys/types.h> -
libwandio/iow-stdio.c
r60f3c4c r10f924c 34 34 35 35 #define _GNU_SOURCE 1 36 #include "wandio_internal.h" 36 37 #include "wandio.h" 37 38 #include <sys/types.h> -
libwandio/iow-thread.c
r954577b9 r10f924c 34 34 #include "config.h" 35 35 #include "wandio.h" 36 #include "wandio_internal.h" 36 37 #include <sys/types.h> 37 38 #include <sys/stat.h> -
libwandio/wandio.c
r808eeef r10f924c 34 34 35 35 #include "config.h" 36 #include "wandio_internal.h" 36 37 #include "wandio.h" 37 38 #include <stdlib.h> -
libwandio/wandio.h
r0acfd1e r10f924c 34 34 #ifndef IO_H 35 35 #define IO_H 1 /**< Guard Define */ 36 #include "config.h"37 36 #include <sys/types.h> 38 37 #include <stdio.h> … … 40 39 #include <stdbool.h> 41 40 42 #if __GNUC__ >= 4 43 #ifdef LT_BUILDING_DLL 44 #define DLLEXPORT __attribute__ ((visibility("default"))) 45 #define DLLLOCAL __attribute__ ((visibility("hidden"))) 46 #else 47 #define DLLEXPORT 48 #define DLLLOCAL 49 #endif 50 #else 51 #define DLLEXPORT 52 #define DLLLOCAL 41 42 #ifndef DLLEXPORT 43 #if HAVE_VISIBILITY && LT_BUILDING_DLL 44 #define DLLEXPORT __attribute__ ((visibility("default"))) 45 #define DLLLOCAL __attribute__ ((visibility("hidden"))) 46 #else 47 #define DLLEXPORT 48 #define DLLLOCAL 49 #endif 53 50 #endif 54 51 52 // TODO: Use a proper check for these attribute rather than gcc version check 55 53 #if __GNUC__ >= 3 56 54 # define DEPRECATED __attribute__((deprecated)) … … 330 328 /** @} */ 331 329 332 /** @name libtraceio options333 * @{ */334 extern int force_directio_read;335 extern int force_directio_write;336 extern uint64_t write_waits;337 extern uint64_t read_waits;338 extern unsigned int use_threads;339 extern unsigned int max_buffers;340 /* @} */341 342 330 #endif
Note: See TracChangeset
for help on using the changeset viewer.