From be06aa39ab6f996128485dd0b35bd6ce80ea224d Mon Sep 17 00:00:00 2001 From: Christian Taedcke Date: Sat, 24 Oct 2015 14:20:07 +0200 Subject: [PATCH 1/2] Remove unused static function basename. --- t-dll-api.cc | 7 ------- t-dll.cc | 7 ------- 2 files changed, 14 deletions(-) diff --git a/t-dll-api.cc b/t-dll-api.cc index a4e33852e..79bc73a2b 100644 --- a/t-dll-api.cc +++ b/t-dll-api.cc @@ -171,13 +171,6 @@ extern "C" unsigned ivl_expr_lineno(ivl_expr_t net) return net->lineno; } -inline static const char *basename(ivl_scope_t scope, const char *inst) -{ - inst += strlen(ivl_scope_name(scope)); - assert(*inst == '.'); - return inst+1; -} - extern "C" ivl_variable_type_t ivl_const_type(ivl_net_const_t net) { assert(net); diff --git a/t-dll.cc b/t-dll.cc index 23be1f7ce..c3ad49d0e 100644 --- a/t-dll.cc +++ b/t-dll.cc @@ -151,13 +151,6 @@ void ivl_net_const_s::operator delete(void*, size_t) static StringHeapLex net_const_strings; -inline static const char *basename(ivl_scope_t scope, const char *inst) -{ - inst += strlen(ivl_scope_name(scope)); - assert(*inst == '.'); - return inst+1; -} - static perm_string make_scope_name(const hname_t&name) { if (! name.has_numbers()) From 3ffe6684e2560710c033141c7a92c846ce81050a Mon Sep 17 00:00:00 2001 From: Christian Taedcke Date: Sat, 24 Oct 2015 14:21:42 +0200 Subject: [PATCH 2/2] Add definition of _DEFAULT_SOURCE. Since glibc version 2.20, _SVID_SOURCE is deprecated, see 'man 7 feature_test_macros'. To be able to compile this code without compiler warnings in new and old glibc versions, both _DEFAULT_SOURCE and _SVID_SOURCE must be defined. --- vpi/sys_scanf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/vpi/sys_scanf.c b/vpi/sys_scanf.c index f05b6245f..2e86cae2d 100644 --- a/vpi/sys_scanf.c +++ b/vpi/sys_scanf.c @@ -20,6 +20,7 @@ /* round() is ISO C99 from math.h. This define should enable it. */ # define _ISOC99_SOURCE 1 # define _SVID_SOURCE 1 +# define _DEFAULT_SOURCE 1 # include "sys_priv.h" # include