New upstream version 1.8.24

obs.osmocom.org
Ludovic Rousseau 4 years ago
parent c13142777b
commit e4a22c05f5
  1. 24
      COPYING
  2. 13
      ChangeLog
  3. 643
      ChangeLog.git
  4. 28
      DRIVERS
  5. 5
      HELP
  6. 320
      INSTALL
  7. 2
      Makefile.am
  8. 27
      Makefile.in
  9. 195
      aclocal.m4
  10. 2
      ar-lib
  11. 2
      compile
  12. 584
      config.guess
  13. 258
      config.sub
  14. 211
      configure
  15. 2
      configure.ac
  16. 10
      depcomp
  17. 15
      doc/Makefile.in
  18. 34
      doc/example/Makefile.in
  19. 2
      doc/example/pcsc_demo.c
  20. 2
      doc/org.debian.pcsc-lite.policy
  21. 2
      doc/pcscd.8.in
  22. 13
      etc/Makefile.in
  23. 1
      etc/pcscd.service.in
  24. 373
      install-sh
  25. 552
      ltmain.sh
  26. 7
      m4/ltsugar.m4
  27. 7
      m4/lt~obsolete.m4
  28. 2
      missing
  29. 321
      src/Makefile.in
  30. 2
      src/PCSC/debuglog.h
  31. 13
      src/PCSC/ifdhandler.h
  32. 4
      src/PCSC/pcsclite.h
  33. 2
      src/PCSC/pcsclite.h.in
  34. 2
      src/PCSC/reader.h
  35. 2
      src/PCSC/winscard.h
  36. 2
      src/PCSC/wintypes.h
  37. 2
      src/atrhandler.c
  38. 2
      src/atrhandler.h
  39. 2
      src/auth.c
  40. 2
      src/auth.h
  41. 242
      src/configfile.c
  42. 2
      src/configfile.h
  43. 4
      src/configfile.l
  44. 2
      src/debug.c
  45. 14
      src/debuglog.c
  46. 2
      src/dyn_generic.h
  47. 2
      src/dyn_hpux.c
  48. 2
      src/dyn_macosx.c
  49. 2
      src/dyn_unix.c
  50. 2
      src/error.c
  51. 8
      src/eventhandler.c
  52. 2
      src/eventhandler.h
  53. 2
      src/hotplug.h
  54. 2
      src/hotplug_generic.c
  55. 4
      src/hotplug_libudev.c
  56. 2
      src/hotplug_libusb.c
  57. 2
      src/hotplug_linux.c
  58. 2
      src/hotplug_macosx.c
  59. 2
      src/ifdwrapper.c
  60. 2
      src/ifdwrapper.h
  61. 2
      src/misc.h
  62. 2
      src/parser.h
  63. 2
      src/pcsc-wirecheck-dist.c
  64. 6
      src/pcscd.h
  65. 4
      src/pcscd.h.in
  66. 2
      src/pcscdaemon.c
  67. 2
      src/prothandler.c
  68. 2
      src/prothandler.h
  69. 2
      src/readerfactory.c
  70. 2
      src/readerfactory.h
  71. 5
      src/simclist.c
  72. 34
      src/spy/Makefile.in
  73. 10
      src/spy/pcsc-spy
  74. 2
      src/sys_generic.h
  75. 2
      src/sys_unix.c
  76. 2
      src/testpcsc.c
  77. 861
      src/tokenparser.c
  78. 2
      src/tokenparser.l
  79. 2
      src/utils.c
  80. 2
      src/utils.h
  81. 12
      src/winscard.c
  82. 84
      src/winscard_clnt.c
  83. 6
      src/winscard_msg.c
  84. 4
      src/winscard_msg.h
  85. 4
      src/winscard_msg_srv.c
  86. 98
      src/winscard_svc.c
  87. 3
      src/winscard_svc.h
  88. 6
      ylwrap

@ -78,30 +78,6 @@ Files src/auth.c and src/auth.h are:
* Author: Nikos Mavrogiannopoulos <nmav@redhat.com>
Files src/sd-daemon.c and src/sd-daemon.h are:
Copyright 2010 Lennart Poettering
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
(the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Files src/simclist.c and src/simclist.h are:
* Copyright (c) 2007,2008,2009,2010,2011 Mij <mij@bitchx.it>
*

@ -1,3 +1,16 @@
1.8.24: Ludovic Rousseau
12 October 2018
- the project moved to https://pcsclite.apdu.fr/
- SCardGetStatusChange(): Fix a rare race condition
- SCardReleaseContext(): do not release a lock owned by another context
- SCardReconnect(): suspend card auto power off
- Allow "=" in serial driver filenames
- Add the thread id in the pcscd log lines
- pcsc-spy: correctly handle incomplete log file
- Simclist: avoid to divide by zero in list_findpos()
- Some other minor improvements
1.8.23: Ludovic Rousseau
18 December 2017
- use libsystemd instead sd-daemon.{c,h}

@ -1,4 +1,639 @@
commit 09f0f85b86e7488cf26642dd17150f76bed5300c (HEAD -> master)
commit 73d95ada3221c060cbd7b6aa2375453f9d0e359b (HEAD -> master, origin/master, origin/HEAD)
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Fri Oct 12 10:43:51 2018 +0200
Release 1.8.23
ChangeLog | 13 +++++++++++++
configure.ac | 2 +-
2 files changed, 14 insertions(+), 1 deletion(-)
commit eaaf8edac2a960feb884bcf4cd90720757fca0bb
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Fri Oct 12 11:00:56 2018 +0200
Fix compiler warning: output may be truncated
winscard_msg.c: In function ‘ClientSetupSession’:
winscard_msg.c:134:2: warning: ‘strncpy’ output may be truncated copying 108 bytes from a string of length 109 [-Wstringop-truncation]
strncpy(svc_addr.sun_path, socketName, sizeof(svc_addr.sun_path));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The source was sizeof(struct sockaddr_un) bytes long.
But the destination was sizeof(svc_addr.sun_path) bytes long only.
svc_addr is a struct sockaddr_un but the sun_path field is shorter (1
byte shorter according to the compiler) than the complete struct
sockaddr_un.
src/winscard_msg.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
commit 2bef09483a51c9835ae70f4647791c9c00b98861
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Fri Oct 12 10:53:41 2018 +0200
Fix compiler warning: cast between incompatible function
hotplug_libudev.c: In function ‘HPRegisterForHotplugEvents’:
hotplug_libudev.c:769:3: warning: cast between incompatible function types from ‘void (*)(void *)’ to ‘void * (*)(void *)’ [-Wcast-function-type]
(PCSCLITE_THREAD_FUNCTION( )) HPEstablishUSBNotifications, udev_monitor))
^
src/hotplug_libudev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 3c80087b60fa30b45ee240f3c58a8562275c08f4
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Fri Oct 12 10:52:47 2018 +0200
Fix compiler warning: cast between incompatible function
eventhandler.c: In function ‘EHSpawnEventHandler’:
eventhandler.c:234:3: warning: cast between incompatible function types from ‘void (*)(READER_CONTEXT *)’ {aka ‘void (*)(struct ReaderContext *)’} to ‘void * (*)(void *)’ [-Wcast-function-type]
(PCSCLITE_THREAD_FUNCTION( ))EHStatusHandlerThread, (LPVOID) rContext);
^
src/eventhandler.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
commit d6ba979b448901a063af537ef8ad68ca0b76727a
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Fri Oct 12 10:51:48 2018 +0200
Fix compiler warning: cast between incompatible function
winscard_svc.c: In function ‘CreateContextThread’:
winscard_svc.c:237:3: warning: cast between incompatible function types from ‘void (*)(void *)’ to ‘void * (*)(void *)’ [-Wcast-function-type]
(PCSCLITE_THREAD_FUNCTION( )) ContextThread, (LPVOID) newContext);
^
src/winscard_svc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
commit 0984e0f4a03e5e29bb5725b6f149f56c9e9c73c2
Author: Mateusz Piotrowski <0mp@FreeBSD.org>
Date: Tue Oct 9 12:10:13 2018 +0200
Remove license information for src/sd-daemon.{c,h}
Those files were removed in 30e10951.
COPYING | 24 ------------------------
1 file changed, 24 deletions(-)
commit db6b67acf7027ecbc275cdb8242cddf3e6508b26 (zotac/master, zmaster)
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Mon Oct 8 14:41:53 2018 +0200
Rename POWER_STATE_INUSE -> POWER_STATE_IN_USE
src/pcscd.h.in | 2 +-
src/winscard.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
commit 5467a3896755f05e406fda15be090b9376909d6e
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Mon Oct 8 14:29:20 2018 +0200
UT for SCardReconnect(): suspend card auto power off
Check the card is not auto powered off after 5 seconds when
SCardReconnect() is used.
UnitaryTests/CheckAutoPowerOff.py | 91 +++++++++++++++++++++++++++++++++++++++
1 file changed, 91 insertions(+)
commit 02dd27bfd19a88c051b91885472e5f6144f7a0a5
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Mon Oct 8 14:24:18 2018 +0200
SCardReconnect(): suspend card auto power off
When the card is reconnected the power state must be changed to
POWER_STATE_INUSE so that card auto power off is not triggered.
See associated Unitary Test CheckAutoPowerOff.py
Thanks to Christophe Ferrando for the bug report
src/winscard.c | 6 ++++++
1 file changed, 6 insertions(+)
commit c3bcdeb702658cd6233133b5f092292c9360a7d9
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Thu Oct 4 15:12:19 2018 +0200
MSGRemoveContext(): always disconnect the card
We need to call SCardDisconnect() in all cases so that the card use
counter is always decremented when a client disappear.
- when no lock is in use
- when a lock is in use
- but the lock is held by another context
- the lock is held by the current context
The bug effect was that smart card auto power off was not working
correctly.
src/winscard_svc.c | 3 +++
1 file changed, 3 insertions(+)
commit 46d174c492791bdb8205f29b3d5bfd903f4a798d
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Thu Oct 4 14:45:12 2018 +0200
MSGRemoveContext(): Do not reset the card if no lock
If the card was not locked (PC/SC transaction) then no need to reset it
when the context is released.
src/winscard_svc.c | 46 +++++++++++++++++++++++++++-------------------
1 file changed, 27 insertions(+), 19 deletions(-)
commit c2d79706d8074cc19c6d1e0a1b7a08137936911c
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Thu Oct 4 14:36:27 2018 +0200
MSGRemoveContext(): disconnect also if no lock is ongoing
If SCardDisconnect() is not called by the application it should be
called by pcscd to enable card auto power off.
This fixes a regression added by 57092b3.
src/winscard_svc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit dde4deb7f709c2a54d791249a3e08f94a3763ca5
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Tue Oct 2 14:30:11 2018 +0200
Unit Test for bug fixed in 57092b3
UnitaryTests/SCardBeginTransaction_SharedMode.py | 132 +++++++++++++++++++++++
1 file changed, 132 insertions(+)
commit 57092b35cab35a9d939cd9094c49d8ecac85f1d2
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Tue Oct 2 14:22:48 2018 +0200
MSGRemoveContext(): only release a owned transaction
SCardReleaseContext() shall NOT release a lock (PC/SC transaction)
owned by another context.
Thanks to Frederic Hoerni for the bug report
"[Pcsclite-muscle] closing client cancels ongoing transaction"
http://lists.infradead.org/pipermail/pcsclite-muscle/2018-September/001126.html
src/winscard_svc.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
commit ea1ecdeb0fcfb77863ac03615f2c82b48d9a9c9a
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Sep 15 18:20:46 2018 +0200
Add the thread id in the log lines
src/debuglog.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
commit ded26af34a07d4bde9e86334519dc1799fbe6633
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Fri Jul 27 16:29:37 2018 +0200
Fix compiler warning: missing field 'rv' initializer
winscard_svc.c:814:44: warning: missing field 'rv' initializer
[-Wmissing-field-initializers]
struct wait_reader_state_change waStr = {0};
^
src/winscard_svc.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
commit e632d595fc7f1a7be73353ba2c9d89b509389917
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Fri Jul 27 16:28:35 2018 +0200
Fix compiler warning missing field 'rv' initializer
winscard_svc.c:428:47: warning: missing field 'rv' initializer
[-Wmissing-field-initializers]
struct wait_reader_state_change waStr = {0};
src/winscard_svc.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
commit 54224a4cbf60f95f2da5f0978c62656f3369b700
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Fri Jul 27 16:00:49 2018 +0200
Fix SCardGetStatusChange() broken in a previous patch 984f84df
The patch in 984f84df10e2d0f432039e3b31f94c74e95092eb broke the
execution of SCardGetStatusChange() when SCardCancel() is used.
The client was waiting for a message that was never sent by the server.
Fortunately the broken code was never released in a stable version of
pcsc-lite.
Thanks to Sam Van Den Berge for the bug report
"[Pcsclite-muscle] SCardCancel broken"
http://lists.infradead.org/pipermail/pcsclite-muscle/2018-July/001096.html
Hello,
It seems like SCardGetStatusChange is currently broken.
This can be tested with UnitaryTests/SCardCancel.
Before commit 984f84df10e2d0f432039e3b31f94c74e95092eb:
$ LD_LIBRARY_PATH=../src/.libs/ ./SCardCancel
SCardEstablishContext:[0x00000000] Command successful.
Press Enter to cancel within 3 seconds
Entering blocking call
Calling SCardCancel...
SCardGetStatusChange:[0x80100002] Command cancelled.
Blocking call canceled
Good
SCardCancel:[0x00000000] Command successful.
SCardReleaseContext:[0x00000000] Command successful.
Waiting thread...
After commit 984f84df10e2d0f432039e3b31f94c74e95092eb:
$ LD_LIBRARY_PATH=../src/.libs/ ./SCardCancel
SCardEstablishContext:[0x00000000] Command successful.
Press Enter to cancel within 3 seconds
Entering blocking call
Calling SCardCancel...
SCardCancel:[0x00000000] Command successful.
<<<<<<<<< SCardGetStatusChange hangs here >>>>>>>>>
I don't have a fix but I just wanted to report this. Besides this big
thank you for all your great work!
Kr,
Sam.
src/winscard_clnt.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
commit ddf725874447a339f4ed69c70e1ad70b3d6c4d1c
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Fri Jun 29 17:16:03 2018 +0200
Doxygen: documentation moved to pcsclite.apdu.fr
Update the update.sh script to update the Doxygen documentation pages.
doc/update.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 01677078a426d82f913ca43583390f6cb9e5b29c
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Fri Jun 29 16:31:30 2018 +0200
Allow "=" in serial driver filenames
For example the configuration:
LIBPATH /tmp/lib/pcsc/drivers/lib=ccid.dylib
failed with:
00000057 configfile.l:165:evaluatetoken() Error with library /tmp/lib/pcsc/drivers/lib: No such file or directory
The problem was detected on Android 8.0 with file names such as:
/data/app/com.baimobile.android.enterprise.credential.service-4wM9GBtoaS74ZiA0Y25YuQ==/lib/arm64/lib_some_reader_driver.so
Thanks to Alan Kozlay for the bug report and patch.
src/configfile.l | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 08664ae6e9b442ce6e6d54385dcba4d9cb70b2ca
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Fri Jun 29 16:28:13 2018 +0200
Doxygen: fix warning
PCSC/src/PCSC/ifdhandler.h:84: warning: Unsupported xml/html tag
<string> found
src/PCSC/ifdhandler.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit d412c4bb65cc26f124fd5adb5f81299b08789d8e
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Fri Jun 29 16:23:39 2018 +0200
Doxygen: do not document disabled functions
If USE_LIBSYSTEMD is not defined then ListenExistingSocket() is not
implemented and the associated Doxygen documentation should not be
present.
Fix Doxygen warning:
PCSC/src/winscard_msg_srv.c:193: warning: argument 'fd' of command @param is not found in the argument list of ProcessEventsServer(uint32_t *pdwClientID)
src/winscard_msg_srv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit e4f50dc1cf264e0159524043a6f5fc1263942c32
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Fri Jun 29 16:19:55 2018 +0200
Doxygen: Use " " for FRIENDLYNAME
The FRIENDLYNAME declaration for reader.conf files must use " " if space
characters are present in the name.
src/PCSC/ifdhandler.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit f14658076f12dde739a0e94a71036f62f83b1259
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Mon May 28 11:32:21 2018 +0200
Makefile.am: do not distribute DRIVERS
The DRIVERS files has been removed because it was obsolete. Do not
include it in the generated tarball.
Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 5616594ce51a9b1e1fa6d913b3f8001289924a15
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Mon May 21 23:06:44 2018 +0200
ifdhandler.h: fix PC/SC Driver Developers Kit URL
It is now at https://muscle.apdu.fr/musclecard.com/sourcedrivers.html
src/PCSC/ifdhandler.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit e93d7199fe69f35267421b51e673eca3b0e18b49
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Mon May 21 23:05:52 2018 +0200
HELP: fix Musle mailing list information
Move from muscle@lists.musclecard.com to pcsclite-muscle@lists.infradead.org
HELP | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
commit dd40b62179791d108de37dc164da672a12b39064
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Mon May 21 23:01:51 2018 +0200
DRIVERS: remove outdated file
Fixes issue #37
"drivers aren't available at given location"
https://github.com/LudovicRousseau/PCSC/issues/37
DRIVERS | 28 ----------------------------
1 file changed, 28 deletions(-)
commit 378ed84c4cfa0b373b793e62540549bf0eeb9b79
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Fri May 18 17:54:07 2018 +0200
Fix project URL
Move from pcsclite.alioth.debian.org to pcsclite.apdu.fr
UnitaryTests/BufferOverflow_SCardControl.c | 2 +-
UnitaryTests/BufferOverflow_SCardGetAttrib.c | 2 +-
UnitaryTests/BufferOverflow_SCardTransmit.c | 2 +-
doc/example/pcsc_demo.c | 2 +-
doc/org.debian.pcsc-lite.policy | 2 +-
doc/pcscd.8.in | 2 +-
src/PCSC/debuglog.h | 2 +-
src/PCSC/ifdhandler.h | 7 +++----
src/PCSC/pcsclite.h.in | 2 +-
src/PCSC/reader.h | 2 +-
src/PCSC/winscard.h | 2 +-
src/PCSC/wintypes.h | 2 +-
src/atrhandler.c | 2 +-
src/atrhandler.h | 2 +-
src/auth.c | 2 +-
src/auth.h | 2 +-
src/configfile.h | 2 +-
src/configfile.l | 2 +-
src/debug.c | 2 +-
src/debuglog.c | 2 +-
src/dyn_generic.h | 2 +-
src/dyn_hpux.c | 2 +-
src/dyn_macosx.c | 2 +-
src/dyn_unix.c | 2 +-
src/error.c | 2 +-
src/eventhandler.c | 2 +-
src/eventhandler.h | 2 +-
src/hotplug.h | 2 +-
src/hotplug_generic.c | 2 +-
src/hotplug_libudev.c | 2 +-
src/hotplug_libusb.c | 2 +-
src/hotplug_linux.c | 2 +-
src/hotplug_macosx.c | 2 +-
src/ifdwrapper.c | 2 +-
src/ifdwrapper.h | 2 +-
src/misc.h | 2 +-
src/parser.h | 2 +-
src/pcscd.h.in | 2 +-
src/pcscdaemon.c | 2 +-
src/prothandler.c | 2 +-
src/prothandler.h | 2 +-
src/readerfactory.c | 2 +-
src/readerfactory.h | 2 +-
src/strlcpycat.h | 2 +-
src/sys_generic.h | 2 +-
src/sys_unix.c | 2 +-
src/testpcsc.c | 2 +-
src/tokenparser.l | 2 +-
src/utils.c | 2 +-
src/utils.h | 2 +-
src/utils/formaticc.c | 2 +-
src/utils/installifd.c | 2 +-
src/winscard.c | 2 +-
src/winscard_clnt.c | 2 +-
src/winscard_msg.c | 2 +-
src/winscard_msg.h | 2 +-
src/winscard_msg_srv.c | 2 +-
src/winscard_svc.c | 2 +-
src/winscard_svc.h | 2 +-
59 files changed, 61 insertions(+), 62 deletions(-)
commit 78505c8b025454de296331652b767e7bd198e593
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Fri May 18 17:26:13 2018 +0200
README.md: Fix project URL
Move from pcsclite.alioth.debian.org to pcsclite.apdu.fr
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 984f84df10e2d0f432039e3b31f94c74e95092eb
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Mon Apr 23 10:03:21 2018 +0200
Fix a rare race condition in SCardGetStatusChange()
Thanks to Maximilian Stein for the patch
[Pcsclite-muscle] Rare race condition in SCardGetStatusChange()
http://lists.infradead.org/pipermail/pcsclite-muscle/2018-April/001068.html
" Hello all,
recently we stumbled upon another (rare) race condition in the
SCardGetStatusChange() function. I especially ask Maksim Ivanov and
Florian Kaiser kindly to share their opinion about the problem and the
proposed fix, since they did a good job in improving
SCardGetStatusChange/SCardCancel in the recent past.
The problem:
The problem is basically the small gap between fetching the reader
states from pcscd [winscard_clnt.c:1741 and 2119] and registering for
event notifications [winscard_clnt.c:2070]. If a notification is sent in
this time period, SCardGetStatusChange() will sleep until another event
or the internal time-out is reached. Consider the following flow of
execution and events:
Precondition: [client] knows the current state of all readers from a
previous call to SCardGetStatusChange() and no changes happened since
then. Basically consider a thread that monitors the reader states which
calls SCardGetStatusChange() in a loop.
1. [client] calls SCardGetStatusChange() and fetches the reader states
from pcscd (line 1741). The fetched states are equal to the already
known states.
2. [pcscd] notices a change in any terminal state (smartcard movement or
number of connected clients to the smartcard changes) and sends a signal
to all *registered* clients via EHSignalEventToClients(). [client] is
not yet registered for event notifications, so EHSignalEventToClients()
won't send anything.
3. [client] continues execution and compares the given reader states to
the states fetched before [pcscd] noticed the change. The states are
equal so it registers for event notifications (line 2070). No
notification was sent, so [client] sleeps until the internal time-out
(60 seconds) is reached.
4. [client] reaches the internal time-out and fetches the current reader
states from [pcscd]. Now the states are different and
SCardGetStatusChange returns.
In the end the state change is noticed thanks to the internal polling
mechanism, but in automated environments, 60 seconds is a very long time
until a state change is detected. The error is most likely to occur if
multiple readers are used and state changes are frequent. Even more
likely it occurs if reader state polling is used by pcscd, i.e. when the
IFD handler does not support asynchronous card event notification (no
capability TAG_IFD_POLLING_THREAD_WITH_TIMEOUT). Then multiple readers
can accumulate their events to be processed in a very small time frame.
Suggestion for a fix:
The proposed fix makes fetching the reader states and registering for
event notifications an atomic action. The command
CMD_WAIT_READER_STATE_CHANGE expected no return value anyway, so I made
it return the reader states equal to CMD_GET_READERS_STATE. The action
is protected by the ClientsWaitingForEvent_lock in eventhandler.c, which
prevents parallel calls of MSGSignalClient() via
EHSignalEventToClients(). This is necessary to prevent a signal before
the reader states are sent, which would appear as garbage in the client
socket.
With the proposed fix, the client is registered for events after the
reader states were fetched. So if any difference is found in the local
and remote state (so that SCardGetStatusChange() returns) we have to
unregister from events. This was not necessary before, but works just
like unregistering after a timeout. This could be refined by checking
why the loop was exited and only unregister if necessary.
Unfortunately the proposed fix will slightly alter the internal protocol
between libpcsclite and pcscd, breaking statically linked client
applications with newer pcscd versions.
Further related thoughts:
I'm a bit uncertain if my proposed fix works nicely with SCardCancel(),
because I can think of one very rare situation when
SCardGetStatusChange() times out and unregisters from event
notifications, then gets cancelled but is not informed about that. Then
it re-registers for notifications, because no changes happened. Thus it
will not returned despite it was cancelled. But this should have been an
issue even before my fix.
I think the notification mechanism could be improved by using "response
headers" analogous to the server side, or just an additional field
"command" in the data structs. This way every message related to reader
state events could be identified by the client and handled respectively.
As I understand it, some of the past issues were because of signal,
cancel or stop-reader-state-change messages messing up the client socket
data. With a command field it can be decided what data the client
received, and what data is still expected to be received.
Best regards
Maximilian Stein "
src/eventhandler.c | 2 ++
src/winscard_clnt.c | 79 ++++++++++++++++++++++++++++++++++++-----------------
src/winscard_msg.h | 2 +-
src/winscard_svc.c | 31 +++++++++++++--------
src/winscard_svc.h | 1 +
5 files changed, 78 insertions(+), 37 deletions(-)
commit 0127d3c73d0ad2072407d880b92baf454992b27d
Author: Nicolas Dusart <dusartnicolas@gmail.com>
Date: Wed Mar 21 18:00:26 2018 +0100
Simclist: avoid to divide by zero in list_findpos()
A division by zero with float is undefined in C.
For example gcc 6.3.0 reports (when detected):
dividebyzero.c:5:20: warning: division by zero [-Wdiv-by-zero]
float a = (float)1/0;
But the code does NOT crash. The value of a is just infinity.
The problem is when Free Pascal runtime is used. In this case the code crashed.
src/simclist.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
commit 2f99e761e000c2c0ef1eb3bd6954b770ac294f22
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Fri Feb 2 15:21:25 2018 +0100
pcsc-spy: correctly handle incomplete log file
If the application is interrupted in the middle of a PC/SC call then we
do not get the returned values of the PC/SC call.
The total execution time is then not known and -1 seconds is displayed
instead.
src/spy/pcsc-spy | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
commit cc70541a47058fc0c6f16a964c75dfcd5b7c88e2
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Tue Dec 19 16:13:42 2017 +0100
systemd pcscd.service: add Documentation key
For now the documentation refers to pcscd(8) manpage.
etc/pcscd.service.in | 1 +
1 file changed, 1 insertion(+)
commit 09f0f85b86e7488cf26642dd17150f76bed5300c (tag: pcsc-1.8.23)
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Mon Dec 18 19:56:49 2017 +0100
@ -8,7 +643,7 @@ Date: Mon Dec 18 19:56:49 2017 +0100
configure.ac | 2 +-
2 files changed, 9 insertions(+), 1 deletion(-)
commit 1dde8427236fa988e9f488baa46d7316691a5555 (origin/master, origin/HEAD)
commit 1dde8427236fa988e9f488baa46d7316691a5555
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Tue Nov 14 15:09:25 2017 +0100
@ -194,7 +829,7 @@ Date: Tue Aug 1 10:11:29 2017 +0200
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 8946edadaca353d65112664a5fcd7bbe1be54ed5
commit 8946edadaca353d65112664a5fcd7bbe1be54ed5 (zotac/fix)
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Wed Jul 12 17:59:48 2017 +0200
@ -209,7 +844,7 @@ Date: Wed Jul 12 17:59:48 2017 +0200
src/simclist.c | 7 +++++++
1 file changed, 7 insertions(+)
commit 30e10951f81b9480e788965f89d0d4d0aee909c0 (zotac/master, github/master)
commit 30e10951f81b9480e788965f89d0d4d0aee909c0
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Thu Jul 13 17:52:13 2017 +0200

@ -1,28 +0,0 @@
DRIVERS
To install USB drivers, download the driver from
http://musclecard.com/software.html and copy it to a temporary location.
After you have unarchived the files copy the directory to
/usr/local/pcsc/drivers/. If the directory /usr/local/pcsc/drivers/
does not exist create it before copying the driver directory to it.
Example Mac OS X, Linux 2.4:
tar -xzvf driver.bundle-0.1.0.tar.gz
cp -r driver.bundle /usr/local/pcsc/drivers/
cd /usr/local/pcsc/drivers/driver.bundle
build or use Project Builder to build
The /usr/local/pcsc/drivers/ directory should contain bundle directories only.
You must restart pcscd to use the new driver.
All OS's:
For non-USB users, you must edit the /etc/reader.conf file.
You can do this easily by running the installifd program in the utils/
directory of pcsc-lite. Some newer drivers require you to specify 1 as the
port and then make a symlink from /dev/pcsc/1 to /dev/ttyS* so you can
enumerate your ports on any Unix without changing the driver.
Refer to the driver README for more information.

@ -1,6 +1,7 @@
General questions:
Contact the mailing list muscle@lists.musclecard.com
(you must subscribe first at http://musclecard.com/list.html)
Contact the mailing list pcsclite-muscle@lists.infradead.org
(you must subscribe first at
https://lists.infradead.org/mailman/listinfo/pcsclite-muscle )
Contract work:

@ -1,8 +1,8 @@
Installation Instructions
*************************
Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
Inc.
Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software
Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
@ -12,97 +12,96 @@ without warranty of any kind.
Basic Installation
==================
Briefly, the shell command `./configure && make && make install'
Briefly, the shell command './configure && make && make install'
should configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
more-detailed instructions are generic; see the 'README' file for
instructions specific to this package. Some packages provide this
`INSTALL' file but do not implement all of the features documented
'INSTALL' file but do not implement all of the features documented
below. The lack of an optional feature in a given package is not
necessarily a bug. More recommendations for GNU packages can be found
in *note Makefile Conventions: (standards)Makefile Conventions.
The `configure' shell script attempts to guess correct values for
The 'configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
those values to create a 'Makefile' in each directory of the package.
It may also create one or more '.h' files containing system-dependent
definitions. Finally, it creates a shell script 'config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
file 'config.log' containing compiler output (useful mainly for
debugging 'configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. Caching is
disabled by default to prevent problems with accidental use of stale
cache files.
It can also use an optional file (typically called 'config.cache' and
enabled with '--cache-file=config.cache' or simply '-C') that saves the
results of its tests to speed up reconfiguring. Caching is disabled by
default to prevent problems with accidental use of stale cache files.
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
to figure out how 'configure' could check whether to do them, and mail
diffs or instructions to the address given in the 'README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
some point 'config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You need `configure.ac' if
you want to change it or regenerate `configure' using a newer version
of `autoconf'.
The file 'configure.ac' (or 'configure.in') is used to create
'configure' by a program called 'autoconf'. You need 'configure.ac' if
you want to change it or regenerate 'configure' using a newer version of
'autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system.
1. 'cd' to the directory containing the package's source code and type
'./configure' to configure the package for your system.
Running `configure' might take a while. While running, it prints
Running 'configure' might take a while. While running, it prints
some messages telling which features it is checking for.
2. Type `make' to compile the package.
2. Type 'make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
3. Optionally, type 'make check' to run any self-tests that come with
the package, generally using the just-built uninstalled binaries.
4. Type `make install' to install the programs and any data files and
4. Type 'make install' to install the programs and any data files and
documentation. When installing into a prefix owned by root, it is
recommended that the package be configured and built as a regular
user, and only the `make install' phase executed with root
user, and only the 'make install' phase executed with root
privileges.
5. Optionally, type `make installcheck' to repeat any self-tests, but
5. Optionally, type 'make installcheck' to repeat any self-tests, but
this time using the binaries in their final installed location.
This target does not install anything. Running this target as a
regular user, particularly if the prior `make install' required
regular user, particularly if the prior 'make install' required
root privileges, verifies that the installation completed
correctly.
6. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
source code directory by typing 'make clean'. To also remove the
files that 'configure' created (so you can compile the package for
a different kind of computer), type 'make distclean'. There is
also a 'make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
7. Often, you can also type `make uninstall' to remove the installed
7. Often, you can also type 'make uninstall' to remove the installed
files again. In practice, not all packages have tested that
uninstallation works correctly, even though it is required by the
GNU Coding Standards.
8. Some packages, particularly those that use Automake, provide `make
8. Some packages, particularly those that use Automake, provide 'make
distcheck', which can by used by developers to test that all other
targets like `make install' and `make uninstall' work correctly.
targets like 'make install' and 'make uninstall' work correctly.
This target is generally not run by end users.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. Run `./configure --help'
the 'configure' script does not know about. Run './configure --help'
for details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
You can give 'configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here is
an example:
./configure CC=c99 CFLAGS=-g LIBS=-lposix
@ -113,21 +112,21 @@ Compiling For Multiple Architectures
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you can use GNU `make'. `cd' to the
own directory. To do this, you can use GNU 'make'. 'cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'. This
is known as a "VPATH" build.
the 'configure' script. 'configure' automatically checks for the source
code in the directory that 'configure' is in and in '..'. This is known
as a "VPATH" build.
With a non-GNU `make', it is safer to compile the package for one
With a non-GNU 'make', it is safer to compile the package for one
architecture at a time in the source code directory. After you have
installed the package for one architecture, use `make distclean' before
installed the package for one architecture, use 'make distclean' before
reconfiguring for another architecture.
On MacOS X 10.5 and later systems, you can create libraries and
executables that work on multiple system types--known as "fat" or
"universal" binaries--by specifying multiple `-arch' options to the
compiler but only a single `-arch' option to the preprocessor. Like
"universal" binaries--by specifying multiple '-arch' options to the
compiler but only a single '-arch' option to the preprocessor. Like
this:
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
@ -136,105 +135,104 @@ this:
This is not guaranteed to produce working output in all cases, you
may have to build one architecture at a time and combine the results
using the `lipo' tool if you have problems.
using the 'lipo' tool if you have problems.
Installation Names
==================
By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX', where PREFIX must be an
By default, 'make install' installs the package's commands under
'/usr/local/bin', include files under '/usr/local/include', etc. You
can specify an installation prefix other than '/usr/local' by giving
'configure' the option '--prefix=PREFIX', where PREFIX must be an
absolute file name.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
pass the option '--exec-prefix=PREFIX' to 'configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them. In general, the
default for these options is expressed in terms of `${prefix}', so that
specifying just `--prefix' will affect all of the other directory
options like '--bindir=DIR' to specify different values for particular
kinds of files. Run 'configure --help' for a list of the directories
you can set and what kinds of files go in them. In general, the default
for these options is expressed in terms of '${prefix}', so that
specifying just '--prefix' will affect all of the other directory
specifications that were not explicitly provided.
The most portable way to affect installation locations is to pass the
correct locations to `configure'; however, many packages provide one or
correct locations to 'configure'; however, many packages provide one or
both of the following shortcuts of passing variable assignments to the
`make install' command line to change installation locations without
'make install' command line to change installation locations without
having to reconfigure or recompile.
The first method involves providing an override variable for each
affected directory. For example, `make install
affected directory. For example, 'make install
prefix=/alternate/directory' will choose an alternate location for all
directory configuration variables that were expressed in terms of
`${prefix}'. Any directories that were specified during `configure',
but not in terms of `${prefix}', must each be overridden at install
time for the entire installation to be relocated. The approach of
makefile variable overrides for each directory variable is required by
the GNU Coding Standards, and ideally causes no recompilation.
However, some platforms have known limitations with the semantics of
shared libraries that end up requiring recompilation when using this
method, particularly noticeable in packages that use GNU Libtool.
The second method involves providing the `DESTDIR' variable. For
example, `make install DESTDIR=/alternate/directory' will prepend
`/alternate/directory' before all installation names. The approach of
`DESTDIR' overrides is not required by the GNU Coding Standards, and
'${prefix}'. Any directories that were specified during 'configure',
but not in terms of '${prefix}', must each be overridden at install time
for the entire installation to be relocated. The approach of makefile
variable overrides for each directory variable is required by the GNU
Coding Standards, and ideally causes no recompilation. However, some
platforms have known limitations with the semantics of shared libraries
that end up requiring recompilation when using this method, particularly
noticeable in packages that use GNU Libtool.
The second method involves providing the 'DESTDIR' variable. For
example, 'make install DESTDIR=/alternate/directory' will prepend
'/alternate/directory' before all installation names. The approach of
'DESTDIR' overrides is not required by the GNU Coding Standards, and
does not work on platforms that have drive letters. On the other hand,
it does better at avoiding recompilation issues, and works well even
when some directory options were not specified in terms of `${prefix}'
at `configure' time.
when some directory options were not specified in terms of '${prefix}'
at 'configure' time.
Optional Features
=================
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
with an extra prefix or suffix on their names by giving 'configure' the
option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'.
Some packages pay attention to '--enable-FEATURE' options to
'configure', where FEATURE indicates an optional part of the package.
They may also pay attention to '--with-PACKAGE' options, where PACKAGE
is something like 'gnu-as' or 'x' (for the X Window System). The
'README' should mention any '--enable-' and '--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
For packages that use the X Window System, 'configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
you can use the 'configure' options '--x-includes=DIR' and
'--x-libraries=DIR' to specify their locations.
Some packages offer the ability to configure how verbose the
execution of `make' will be. For these packages, running `./configure
execution of 'make' will be. For these packages, running './configure
--enable-silent-rules' sets the default to minimal output, which can be
overridden with `make V=1'; while running `./configure
overridden with 'make V=1'; while running './configure
--disable-silent-rules' sets the default to verbose, which can be
overridden with `make V=0'.
overridden with 'make V=0'.
Particular systems
==================
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
CC is not installed, it is recommended to use the following options in
On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC
is not installed, it is recommended to use the following options in
order to use an ANSI C compiler:
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
HP-UX `make' updates targets which have the same time stamps as
their prerequisites, which makes it generally unusable when shipped
generated files such as `configure' are involved. Use GNU `make'
instead.
HP-UX 'make' updates targets which have the same time stamps as their
prerequisites, which makes it generally unusable when shipped generated
files such as 'configure' are involved. Use GNU 'make' instead.
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
a workaround. If GNU CC is not installed, it is therefore recommended
to try
parse its '<wchar.h>' header file. The option '-nodtk' can be used as a
workaround. If GNU CC is not installed, it is therefore recommended to
try
./configure CC="cc"
@ -242,26 +240,26 @@ and if that doesn't work, try
./configure CC="cc -nodtk"
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
On Solaris, don't put '/usr/ucb' early in your 'PATH'. This
directory contains several dysfunctional programs; working variants of
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
in your `PATH', put it _after_ `/usr/bin'.
these programs are available in '/usr/bin'. So, if you need '/usr/ucb'
in your 'PATH', put it _after_ '/usr/bin'.
On Haiku, software installed for all users goes in `/boot/common',
not `/usr/local'. It is recommended to use the following options:
On Haiku, software installed for all users goes in '/boot/common',
not '/usr/local'. It is recommended to use the following options:
./configure --prefix=/boot/common
Specifying the System Type
==========================
There may be some features `configure' cannot figure out
There may be some features 'configure' cannot figure out
automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the
_same_ architectures, `configure' can figure that out, but if it prints
_same_ architectures, 'configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
'--build=TYPE' option. TYPE can either be a short name for the system
type, such as 'sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
@ -270,101 +268,101 @@ where SYSTEM can have one of these forms:
OS
KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
See the file 'config.sub' for the possible values of each field. If
'config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the option `--target=TYPE' to select the type of system they will
use the option '--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
eventually be run) with '--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
If you want to set default values for 'configure' scripts to share,
you can create a site shell script called 'config.site' that gives
default values for variables like 'CC', 'cache_file', and 'prefix'.
'configure' looks for 'PREFIX/share/config.site' if it exists, then
'PREFIX/etc/config.site' if it exists. Or, you can set the
'CONFIG_SITE' environment variable to the location of the site script.
A warning: not all 'configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
environment passed to 'configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
them in the 'configure' command line, using 'VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
causes the specified 'gcc' to be used as the C compiler (unless it is
overridden in the site shell script).
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
an Autoconf limitation. Until the limitation is lifted, you can use
this workaround:
Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an
Autoconf limitation. Until the limitation is lifted, you can use this
workaround:
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation
'configure' Invocation
======================
`configure' recognizes the following options to control how it
'configure' recognizes the following options to control how it
operates.
`--help'
`-h'
Print a summary of all of the options to `configure', and exit.
'--help'
'-h'
Print a summary of all of the options to 'configure', and exit.
`--help=short'
`--help=recursive'
'--help=short'
'--help=recursive'
Print a summary of the options unique to this package's
`configure', and exit. The `short' variant lists options used
only in the top level, while the `recursive' variant lists options
also present in any nested packages.
'configure', and exit. The 'short' variant lists options used only
in the top level, while the 'recursive' variant lists options also
present in any nested packages.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
'--version'
'-V'
Print the version of Autoconf used to generate the 'configure'
script, and exit.
`--cache-file=FILE'
'--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
traditionally 'config.cache'. FILE defaults to '/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
'--config-cache'
'-C'
Alias for '--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
'--quiet'
'--silent'
'-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
suppress all normal output, redirect it to '/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
'--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
'configure' can determine that directory automatically.
`--prefix=DIR'
Use DIR as the installation prefix. *note Installation Names::
for more details, including other options available for fine-tuning
the installation locations.
'--prefix=DIR'
Use DIR as the installation prefix. *note Installation Names:: for
more details, including other options available for fine-tuning the
installation locations.
`--no-create'
`-n'
'--no-create'
'-n'
Run the configure checks, but stop before creating any output
files.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.
'configure' also accepts some other, not widely useful, options. Run
'configure --help' for more details.

@ -12,7 +12,7 @@ EXTRA_DIST = \
GPL-3.0.txt \
bootstrap \
ChangeLog.git \
DRIVERS SECURITY \
SECURITY \
HELP \
m4/ax_pthread.m4 \
m4/as-ac-expand.m4

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.15 from Makefile.am.
# Makefile.in generated by automake 1.16.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -138,7 +138,7 @@ am__recursive_targets = \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
cscope distdir dist dist-all distcheck
cscope distdir distdir-am dist dist-all distcheck
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
$(LISP)config.h.in
# Read a list of newline-separated strings from the standard input,
@ -164,7 +164,7 @@ DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/src/PCSC/pcsclite.h.in AUTHORS COPYING ChangeLog \
INSTALL NEWS README TODO ar-lib compile config.guess \
config.sub depcomp install-sh ltmain.sh missing ylwrap
config.sub install-sh ltmain.sh missing ylwrap
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
@ -368,7 +368,7 @@ EXTRA_DIST = \
GPL-3.0.txt \
bootstrap \
ChangeLog.git \
DRIVERS SECURITY \
SECURITY \
HELP \
m4/ax_pthread.m4 \
m4/as-ac-expand.m4
@ -399,8 +399,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@ -544,7 +544,10 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
distdir: $(DISTFILES)
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
distdir-am: $(DISTFILES)
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@ -609,7 +612,7 @@ distdir: $(DISTFILES)
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
$(am__post_remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
@ -634,7 +637,7 @@ dist-shar: distdir
@echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
$(am__post_remove_distdir)
dist-zip: distdir
@ -652,7 +655,7 @@ dist dist-all:
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \
@ -662,7 +665,7 @@ distcheck: dist
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac

195
aclocal.m4 vendored

@ -1,6 +1,6 @@
# generated automatically by aclocal 1.15 -*- Autoconf -*-
# generated automatically by aclocal 1.16.1 -*- Autoconf -*-
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -296,7 +296,7 @@ AS_VAR_COPY([$1], [pkg_cv_][$1])
AS_VAR_IF([$1], [""], [$5], [$4])dnl
])dnl PKG_CHECK_VAR
# Copyright (C) 2002-2014 Free Software Foundation, Inc.
# Copyright (C) 2002-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -308,10 +308,10 @@ AS_VAR_IF([$1], [""], [$5], [$4])dnl
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.15'
[am__api_version='1.16'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.15], [],
m4_if([$1], [1.16.1], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@ -327,12 +327,12 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.15])dnl
[AM_AUTOMAKE_VERSION([1.16.1])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# Copyright (C) 2011-2014 Free Software Foundation, Inc.
# Copyright (C) 2011-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -394,7 +394,7 @@ AC_SUBST([AR])dnl
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001-2014 Free Software Foundation, Inc.
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -446,7 +446,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# Copyright (C) 1997-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -477,7 +477,7 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -668,13 +668,12 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],