Changeset 10f924c for libwandio


Ignore:
Timestamp:
05/23/14 17:31:26 (8 years ago)
Author:
Shane Alcock <salcock@…>
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
Message:

Fixed broken -fvisibility check in configure

  • Added a m4 script that does this properly rather than our hax gcc version check.
  • Tidied up CFLAGS in configure so we aren't adding the same sets of flags multiple times
  • Created a wandio_internal.h file for storing global variables that shouldn't be made public

Thanks to Alistair King, whose patch to try and make this work for
non-gcc systems brought my attention to just how broken this was :)

Location:
libwandio
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • libwandio/Makefile.am

    r60f3c4c r10f924c  
    33include_HEADERS=wandio.h
    44
    5 AM_CFLAGS=@LIBCFLAGS@
    6 AM_CXXFLAGS=@LIBCXXFLAGS@
     5AM_CFLAGS=@LIBCFLAGS@ @CFLAG_VISIBILITY@
     6AM_CXXFLAGS=@LIBCXXFLAGS@ @CFLAG_VISIBILITY@
    77
    88if HAVE_ZLIB
     
    2525
    2626libwandio_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 \
    2828                $(LIBTRACEIO_ZLIB) $(LIBTRACEIO_BZLIB) $(LIBTRACEIO_LZO)
    2929
  • libwandio/ior-stdio.c

    r60f3c4c r10f924c  
    3434
    3535#define _GNU_SOURCE 1
     36#include "wandio_internal.h"
    3637#include "wandio.h"
    3738#include <sys/types.h>
  • libwandio/ior-thread.c

    r954577b9 r10f924c  
    3434
    3535#include "config.h"
     36#include "wandio_internal.h"
    3637#include "wandio.h"
    3738#include <sys/types.h>
  • libwandio/iow-stdio.c

    r60f3c4c r10f924c  
    3434
    3535#define _GNU_SOURCE 1
     36#include "wandio_internal.h"
    3637#include "wandio.h"
    3738#include <sys/types.h>
  • libwandio/iow-thread.c

    r954577b9 r10f924c  
    3434#include "config.h"
    3535#include "wandio.h"
     36#include "wandio_internal.h"
    3637#include <sys/types.h>
    3738#include <sys/stat.h>
  • libwandio/wandio.c

    r808eeef r10f924c  
    3434
    3535#include "config.h"
     36#include "wandio_internal.h"
    3637#include "wandio.h"
    3738#include <stdlib.h>
  • libwandio/wandio.h

    r0acfd1e r10f924c  
    3434#ifndef IO_H
    3535#define IO_H 1 /**< Guard Define */
    36 #include "config.h"
    3736#include <sys/types.h>
    3837#include <stdio.h>
     
    4039#include <stdbool.h>
    4140
    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
    5350#endif
    5451
     52// TODO: Use a proper check for these attribute rather than gcc version check
    5553#if __GNUC__ >= 3
    5654#  define DEPRECATED __attribute__((deprecated))
     
    330328/** @} */
    331329
    332 /** @name libtraceio options
    333  * @{ */
    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 
    342330#endif
Note: See TracChangeset for help on using the changeset viewer.