fixes to allow merge to compile, due to weird bug in clang have had to slightly break the __clang__ definition so that it actually compiles with libstdc++ - will obviously need checking on another OS

pull/1/head
James Coxon 2015-08-23 16:14:46 +01:00
rodzic 3fa6610928
commit e8f001fde7
7 zmienionych plików z 32 dodań i 32 usunięć

Wyświetl plik

@ -368,7 +368,7 @@ extern Fl_Tabs *tabsRig;
extern Fl_Check_Button *btnPTTrightchannel;
extern Fl_Group *grpHWPTT;
extern Fl_Round_Button *btnTTYptt;
extern Fl_ListBox *inpTTYdev;
extern Fl_ComboBox *inpTTYdev;
extern Fl_Round_Button *btnRTSptt;
extern Fl_Round_Button *btnRTSplusV;
extern Fl_Round_Button *btnDTRptt;
@ -383,7 +383,7 @@ extern Fl_Check_Button *chkUSERIGCAT;
extern Fl_Group *grpRigCAT;
extern Fl_Output *txtXmlRigFilename;
extern Fl_Button *btnSelectRigXmlFile;
extern Fl_ListBox *inpXmlRigDevice;
extern Fl_ComboBox *inpXmlRigDevice;
extern Fl_Value_Input2 *cntRigCatRetries;
extern Fl_Value_Input2 *cntRigCatTimeout;
extern Fl_Value_Input2 *cntRigCatWait;
@ -405,8 +405,8 @@ extern Fl_Value_Input2 *cntRigCatInitDelay;
extern Fl_Group *tabHamlib;
extern Fl_Check_Button *chkUSEHAMLIB;
extern Fl_Group *grpHamlib;
extern Fl_ListBox *cboHamlibRig;
extern Fl_ListBox *inpRIGdev;
extern Fl_ComboBox *cboHamlibRig;
extern Fl_ComboBox *inpRIGdev;
extern Fl_Value_Input2 *cntHamlibRetries;
extern Fl_Value_Input2 *cntHamlibTimeout;
extern Fl_Value_Input2 *cntHamlibWriteDelay;
@ -431,10 +431,12 @@ extern Fl_Group *tabSoundCard;
extern Fl_Tabs *tabsSoundCard;
extern Fl_Group *tabAudio;
extern Fl_Group *AudioOSS;
extern Fl_ListBox *menuOSSDev;
#include <FL/Fl_Input_Choice.H>
extern Fl_Input_Choice *menuOSSDev;
extern Fl_Group *AudioPort;
extern Fl_ListBox *menuPortInDev;
extern Fl_ListBox *menuPortOutDev;
#include <FL/Fl_Choice.H>
extern Fl_Choice *menuPortInDev;
extern Fl_Choice *menuPortOutDev;
extern Fl_Group *AudioPulse;
extern Fl_Input2 *inpPulseServer;
extern Fl_Group *AudioNull;
@ -605,7 +607,6 @@ extern Fl_Counter2 *cntTrackFreqMax;
#include <FL/Fl_Float_Input.H>
extern Fl_Float_Input *stationary_lat;
extern Fl_Float_Input *stationary_lon;
#include <FL/Fl_Input_Choice.H>
extern Fl_Input_Choice *inpGPSdev;
#include <FL/Fl_Spinner.H>
extern Fl_Output *gps_pos_lat;
@ -618,7 +619,6 @@ extern Fl_Group *tabDLFlights;
#include <FL/Fl_Browser.H>
extern Fl_Browser *flight_browser;
extern Fl_Button *flight_docs_refresh_a;
#include <FL/Fl_Choice.H>
extern Fl_Choice *flight_payload_list;
extern Fl_Button *payload_autoconfigure_a;
extern Fl_Choice *flight_payload_transmission_list;

Wyświetl plik

@ -1550,13 +1550,13 @@ SOAPBOX: \n\n",
return;
}
#ifdef __clang__
# include <unordered_map>
typedef std::unordered_map<string, unsigned> dxcc_entity_cache_t;
#else
//#ifdef __clang__
//# include <unordered_map>
// typedef std::unordered_map<string, unsigned> dxcc_entity_cache_t;
//#else
# include <tr1/unordered_map>
typedef tr1::unordered_map<string, unsigned> dxcc_entity_cache_t;
#endif
//#endif
static dxcc_entity_cache_t dxcc_entity_cache;
static bool dxcc_entity_cache_enabled = false;

Wyświetl plik

@ -44,13 +44,13 @@
using namespace std;
#ifdef __clang__
# include <unordered_map>
using std::unordered_map;
#else
//#ifdef __clang__
//# include <unordered_map>
// using std::unordered_map;
//#else
# include <tr1/unordered_map>
using tr1::unordered_map;
#endif
//#endif
dxcc::dxcc(const char* cn, int cq, int itu, const char* ct, float lat, float lon, float tz)
: country(cn), cq_zone(cq), itu_zone(itu), latitude(lat), longitude(lon), gmt_offset(tz)

Wyświetl plik

@ -120,21 +120,21 @@ void re_t::suboff(size_t n, int* start, int* end) const
}
}
#ifdef __clang__
# include <functional>
#else
//#ifdef __clang__
//# include <functional>
//#else
# include <tr1/functional>
#endif
//#endif
size_t re_t::hash(void) const
{
#ifdef __clang__
size_t h = std::hash<string>()(pattern);
return h ^ (std::hash<int>()(cflags) + 0x9e3779b9 + (h << 6) + (h >> 2));
#else
//#ifdef __clang__
// size_t h = std::hash<string>()(pattern);
// return h ^ (std::hash<int>()(cflags) + 0x9e3779b9 + (h << 6) + (h >> 2));
//#else
size_t h = tr1::hash<string>()(pattern);
return h ^ (tr1::hash<int>()(cflags) + 0x9e3779b9 + (h << 6) + (h >> 2));
#endif
//#endif
}
// ------------------------------------------------------------------------

Wyświetl plik

@ -35,7 +35,7 @@
#include "timeops.h"
#ifdef __clang__
#ifdef __zclang__
# define MAP_TYPE std::unordered_map
# include <unordered_map>
#else

Wyświetl plik

@ -50,7 +50,7 @@
#include <algorithm>
#include <fstream>
#if __clang__
#if __zclang__
# define MAP_TYPE std::unordered_map
#define HASH_TYPE std::hash
# include <unordered_map>

Wyświetl plik

@ -23,7 +23,7 @@
#include <config.h>
#include <list>
#ifdef __clang__
#ifdef __zclang__
#include <unordered_map>
#else
#include <tr1/unordered_map>
@ -64,7 +64,7 @@ struct fre_comp : std::unary_function<const fre_t*, bool>
};
typedef list<callback_t*> callback_p_list_t;
#ifdef __clang__
#ifdef __zclang__
typedef std::unordered_map<fre_t*, callback_p_list_t, fre_hash, fre_comp> rcblist_t;
static std::unordered_map<int, string> buffers;
#else