[Pcsclite-git-commit] [PCSC] 07/11: Enable Trace and Profile features using compiler flags

Ludovic Rousseau rousseau at moszumanska.debian.org
Fri Mar 11 17:54:48 UTC 2016


This is an automated email from the git hooks/post-receive script.

rousseau pushed a commit to branch master
in repository PCSC.

commit ea0a50bf2088906d888cf1888b4439f3391eb111
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date:   Fri Mar 11 10:36:56 2016 +0100

    Enable Trace and Profile features using compiler flags
    
    " I have a couple of small suggestions regarding the tracing feature of
    the PC/SC-Lite's client side library. This feature is controlled by
    the "DO_TRACE" preprocessor definition.
    
    First, it's impossible to trigger this feature using the compiler
    flags: for some reason, the winscard_clnt.c file contains directive
    "#undef DO_TRACE". If it were a commented "#define" directive, then
    this would be more useful: the feature could be triggered both by
    editing the source file and by modifying the compiler flags. "
    
    The code now uses
    //#define DO_TRACE
    instead of
    
    It is now possible to enable this feature using the compiler flag
    -DDO_TRACE without modifying the source code.
    
    Same thing for DO_PROFILE.
    
    Thanks to Maksim Ivanov for the bug idea
    http://lists.alioth.debian.org/pipermail/pcsclite-muscle/Week-of-Mon-20160307/000537.html
---
 src/winscard_clnt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/winscard_clnt.c b/src/winscard_clnt.c
index de65d2b..547fa9e 100644
--- a/src/winscard_clnt.c
+++ b/src/winscard_clnt.c
@@ -127,10 +127,10 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 /* Display, on stderr, a trace of the WinSCard calls with arguments and
  * results */
-#undef DO_TRACE
+//#define DO_TRACE
 
 /* Profile the execution time of WinSCard calls */
-#undef DO_PROFILE
+//#define DO_PROFILE
 
 
 /** used for backward compatibility */

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pcsclite/PCSC.git



More information about the Pcsclite-cvs-commit mailing list