Martin Leung wrote:
Hi,
I am trying to build libmusclecard on Win32 and have a few questions.
Use this one:
http://www.inf.tu-dresden.de/~ko189283/MuscleCard/
It is a new version of the whole MuscleCard chain in development. But it
should work. Read the README or the Install.w32 respectively. You can
load everything to benefit (or that it works at all). Everything there
should be adapted to this (The PKCS#11 does not contain the last patches.)
But read this at the beginning to see the changes:
http://www.inf.tu-dresden.de/~ko189283/MuscleCard/libmusclecardChanges.html
1. How to create tokenparser.c on Win32?
Flex/Bison for Windows. If you read the Install.w32 thsi is clear and
will know how to get it. There is also a free build version if you have
no Visual Studio. Else use nmake of Visual Studio. Well, everything
mentioned in the install.w32.
There is no tokenparser.c in cvs. I downloaded the src to Fedora
and make tokenparser.c there. Is this the right way to do so?
Also, the tokenparser.c generated in this way doesn't include
<stdlib.h> (probably c_plusplus is not defined). Can I pass a
flag to bootstrap/configure/make to get stdlib include?
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#include <stdio.h>
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
#ifdef c_plusplus
#ifndef __cplusplus
#define __cplusplus
#endif
#endif
#ifdef __cplusplus
#include <stdlib.h>
/* Use prototypes in function declarations. */
#define YY_USE_PROTOS
2. Should pcsc extension in pcsclite.h be extracted into a separate
header file,say, pcsc_ext.h?
The current pcsclite.h reads:
#ifdef WIN32
#include <winscard.h>
#else
... win32 winscard equivalent ...
... pcsclite extensions ....
#endif
Win32 fails to compile due to missing of pcsclite extensions. Should
I extract the extensions to another file and include it inside
pcsclite.h?
3. How to handle unistd.h?
Multiple src files contain:
#include <unistd.h>
that causes error when compiling on win32. Should I use the
flag HAVE_UNISTD_H config.h.in or simply use,
#if !defined(WIN32)
#include <unistd.h>
#endif
4. To get tokenparser.c to compile on win32, I've to define:
#define YY_NEVER_INTERACTIVE 1
Is it correct? Should this go to win32/config.h
5. Currently MSC_SVC_DROPDIR is hardcoded:
#define MSC_SVC_DROPDIR "C:\\Program Files\\Muscle\\Services"
On Win32, I would suggest to read it from registry as in the
case of PKCS11. Any comment?
Done. It works this way in my version.
Regards, Karsten
Rgds.
Martin
------------------------------------------------------------------------
_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle
_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle