Changeset 10f924c for libwandio/wandio.h


Ignore:
Timestamp:
05/23/14 17:31:26 (7 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 :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.