Thomas Harning Jr. wrote:
On Sat, 2007-01-06 at 16:28 +0100, Nils Larsch wrote:
OpenSC wrote:
#128: Patch: PIV Card update patch
-------------------------+--------------------------------------------------
 Reporter:  harningt     |        Owner:  [email protected]
Type: enhancement | Status: new Priority: normal | Milestone: 0.11.2 Component: opensc | Version: 0.11.1 Severity: normal | Resolution: Keywords: patch, piv | -------------------------+--------------------------------------------------
Comment (by harningt):

 Attached is a new update to the patch, it accounts for the location of
 'malloc' on OSX (stdlib.h, not malloc.h) and cleans up one of the 'hacks'
 that I had in place.
according to c99 malloc(3) should be in stdlib.h so this isn't really
a osx issue. Btw: why do include "memory.h" in compression.c ?

Oops.. 'wrong' header for memset, string.h appears to be the correct
header

yep

my Linux implementation #includes 'string.h' for 'memory.h's content).

mine as well but I doubt that this is the case on all platforms on
which opensc should run.


some first comments: your patch exports a new header file compression
(btw: why export it ? it looks more like an internal header). But the
names used for constanst and functions are very generic. *IF* we want
to export this header file the functions/constants within the file
should have a opensc prefix (i.e. normally "sc_" for functions and "SC_"
for constants). Furthermore it would be nice if the compilation of
compression.c|h is dependent on the presence of zlib support.

It exports it because I figure it would be useful in developing external
card plugins w/o duplicating the compression.h header/sources.

hmm, interesting question ... actually opensc IMHO needs to kinds
of APIs: one for external application using opensc for sc access and
one for card drivers ...

 I also
suppose for that case I should have exported p15card-helper.h.
Not exporting it could work just as well, in which case any external
plugins would just have duplicate code.

Cheers,
Nils
_______________________________________________
opensc-devel mailing list
[email protected]
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to