New upstream version 1.9.6

obs.osmocom.org
Ludovic Rousseau 7 months ago
parent 8360e0e1aa
commit 6bed2b05f1
  1. 18
      ChangeLog
  2. 736
      ChangeLog.git
  3. 1
      Makefile.in
  4. 23
      README
  5. 1500
      config.guess
  6. 2609
      config.sub
  7. 365
      configure
  8. 21
      configure.ac
  9. 1
      doc/Makefile.in
  10. 1
      doc/example/Makefile.in
  11. 28
      doc/pcscd.8.in
  12. 17
      doc/reader.conf.5.in
  13. 1
      etc/Makefile.in
  14. 827
      ltmain.sh
  15. 229
      m4/libtool.m4
  16. 13
      m4/ltversion.m4
  17. 4
      src/Makefile.am
  18. 9
      src/Makefile.in
  19. 4
      src/PCSC/debuglog.h
  20. 309
      src/PCSC/pcsclite.h
  21. 2
      src/configfile.c
  22. 2
      src/configfile.l
  23. 2
      src/debuglog.c
  24. 9
      src/hotplug_generic.c
  25. 22
      src/hotplug_libudev.c
  26. 9
      src/hotplug_libusb.c
  27. 7
      src/hotplug_macosx.c
  28. 86
      src/pcscd.h
  29. 1
      src/pcscd.h.in
  30. 33
      src/pcscdaemon.c
  31. 20
      src/readerfactory.c
  32. 9
      src/readerfactory.h
  33. 1
      src/spy/Makefile.in
  34. 9
      src/testpcsc.c
  35. 17
      src/winscard_clnt.c
  36. 8
      src/winscard_svc.c

@ -1,3 +1,19 @@
1.9.6: Ludovic Rousseau
11 May 2022
- do not fail reader removal in some specific cases (USB/Thunderbolt port)
- improve documentation regarding /etc/reader.conf.d/
- SCardGetStatusChange: speedup the case DISABLE_AUTO_POWER_ON
- configure:
. add --disable-strict option
By default the compiler arguments are now:
-Wall -Wextra -Wno-unused-parameter -Werror ${CFLAGS}
. fail if flex is not found
- fix different data races
- pcscdaemon: -v displays internal constants values:
MAX_READERNAME & PCSCLITE_MAX_READERS_CONTEXTS
- Some other minor improvements
1.9.5: Ludovic Rousseau
4 December 2021
- pcscd: autoexit even if no client connects
@ -6,11 +22,13 @@
- Add and use tag TAG_IFD_DEVICE_REMOVED
- UnitaryTests: port code to Python 3
1.9.4: Ludovic Rousseau
1 October 2021
- fix a memory leak when libusb is used for hotplug (i.e. non-Linux
systems)
1.9.3: Ludovic Rousseau
6 August 2021
- fix a stupid regression with systemd introduced in the previous version

@ -1,4 +1,736 @@
commit d92b5d4fad5dea95ce8d12fac07fe1eec2150ad1 (HEAD -> master)
commit c783224e5109258a17856f9ef90c044093bfc949 (HEAD -> master, zotac/master, origin/master, origin/HEAD, github/master)
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Wed May 11 17:06:28 2022 +0200
Release 1.9.6
Signed-off-by: Ludovic Rousseau <ludovic.rousseau@free.fr>
ChangeLog | 18 ++++++++++++++++++
configure.ac | 2 +-
2 files changed, 19 insertions(+), 1 deletion(-)
commit 28f9f0e249d9378e34e887bc6006acdcd0b9f539
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Tue May 10 21:52:37 2022 +0200
Fix warning reported by clang scan-build
readerfactory.c:622:7: warning: Value stored to 'ret' is never read [deadcode.DeadStores]
ret = IFDSetCapabilities(sReadersContexts[i],
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/readerfactory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit c906ccf5ccfb8ac0fb0e8fece0a1405f2327e269
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Tue May 10 21:50:26 2022 +0200
Fix warning reported by clang scan-build
pcscdaemon.c:750:2: warning: Value stored to 'rv' is never read [deadcode.DeadStores]
rv = HPSearchHotPluggables();
^ ~~~~~~~~~~~~~~~~~~~~~~~
src/pcscdaemon.c | 2 ++
1 file changed, 2 insertions(+)
commit a3e09df033e024541314bc6bb7dba6f4b5d05d6e
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Tue May 3 21:23:13 2022 +0200
libudev: do not fail removal if the device has no parent
With some USB devices (like Yubikey) a new USB bus is created when the
device is inserted. The USB bus is then destroyed when the token is
removed.
The USB device has no parent any more and the call to
udev_device_get_parent_with_subsystem_devtype() fails. The device is
then NOT removed and you get a loop of:
ccid_usb.c:886:WriteUSB() write failed (3/2): LIBUSB_ERROR_NO_DEVICE
src/ifdwrapper.c:364:IFDStatusICC() Card not transacted: 617
src/eventhandler.c:336:EHStatusHandlerThread() Error communicating to: Yubico YubiKey OTP+FIDO+CCID 00 00
Closes: https://github.com/LudovicRousseau/PCSC/issues/125
Thanks to oddlama for the bug report
src/hotplug_libudev.c | 20 --------------------
1 file changed, 20 deletions(-)
commit a2f8a23685d2ff7bd607bafbea4ab3c0ecfc6c37 (debug/master)
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sun Apr 3 15:37:26 2022 +0200
SCardTransmit(): check the reception buffer is large enough
This check is already made on the server side at winscard_svc.c line
683.
But the client may be connected to a rogue server. So double check does
not hurt.
Thanks to Coverity for the bug report:
CID 1503364 (#1 of 1): Untrusted loop bound (TAINTED_SCALAR)
15. tainted_data: Passing tainted expression scTransmitStruct.pcbRecvLength to MessageReceive, which uses it as a loop boundary.
src/winscard_clnt.c | 7 +++++++
1 file changed, 7 insertions(+)
commit 2977de7b4101e53f7b1fde7df32fd4173e6af51b
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sun Apr 3 15:28:41 2022 +0200
SCardControl(): check the reception buffer is large enough
This check is already made on the server side at winscard_svc.c line
737.
But the client may be connected to a rogue server. So double check does
not hurt.
Thanks to Coverity for the bug report:
CID 1503367 (#1 of 1): Untrusted loop bound (TAINTED_SCALAR)
10. tainted_data: Passing tainted expression scControlStruct.dwBytesReturned to MessageReceive, which uses it as a loop boundary.
src/winscard_clnt.c | 8 ++++++++
1 file changed, 8 insertions(+)
commit a07ca483f24bcefcf0c81c4bf497f4225ee9227b
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sun Apr 3 15:12:48 2022 +0200
testpcsc: simplify code
Remove a test code duplication
Thanks to Coverity for the bug report:
CID 1503368 (#1 of 1): Untrusted loop bound (TAINTED_SCALAR)
45. tainted_data: Using tainted variable iReader as a loop boundary.
src/testpcsc.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
commit cda0df14731c6b5e11521564b0b13eb89c1fe0eb
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sun Apr 3 14:58:01 2022 +0200
HPAddDevice(): fix memory leak in case of error
Thansk to Coverity for the bug report:
CID 1503363 (#1 of 1): Resource leak (RESOURCE_LEAK)
26. leaked_storage: Variable deviceName going out of scope leaks the storage it points to.
src/hotplug_libudev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 3f89340785934785cf1490d3e788eefb25c50a69
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Fri Mar 25 17:26:14 2022 +0100
configure.ac: fail if flex is not found
Thanks to Ian Norton for the bug report
Closes https://github.com/LudovicRousseau/PCSC/issues/124
configure.ac | 4 ++++
1 file changed, 4 insertions(+)
commit dfd05d56b7a0f415e2d8c44cd4de7eb9091eb2f3
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Fri Feb 18 10:35:44 2022 +0100
Makefile.am: do not include pcsclite.h in archive
The file src/PCSC/pcsclite.h is generated from src/PCSC/pcsclite.h.in by
./configure
No need to include it in the tarball archive.
Also no need to patch the .h in additon to the .h.in to update the value
of PCSCLITE_MAX_READERS_CONTEXTS as done in the Fedora package.
src/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit c7e62a42e8536f4657b35a08e619fc62da09d83e
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Fri Feb 18 10:30:50 2022 +0100
Makefile.am: do not include pcscd.h in archive
The file pcscd.h is generated from pcscd.h.in by ./configure
No need to include it in the tarball archive.
src/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 3835a22cd359c95940b10fd9eec3c76c77b97c14
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Wed Feb 16 11:59:11 2022 +0100
Fix compiler warning: comparison of integers of different signs
winscard_svc.c:441:18: warning: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'LONG' (aka 'int') [-Wsign-compare]
if (waStr.rv != SCARD_F_INTERNAL_ERROR)
~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~
Thanks to Александр for the bug report
Fixes: https://github.com/LudovicRousseau/PCSC/issues/120
src/winscard_svc.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
commit 7aa2e8fd024c1ddbaf786a27575d23c7fa1a9d4e
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Feb 12 18:39:33 2022 +0100
pcscdaemon: -v displays internal constants values
If the option -v|--version is used then pcscd displays 2 constant
values: MAX_READERNAME & PCSCLITE_MAX_READERS_CONTEXTS
It is interesting to display PCSCLITE_MAX_READERS_CONTEXTS because
Fedora includes a patch to increase the value from 16 (default) to 48.
This change will help diagnose problems like Fedora + flatpak
https://github.com/LudovicRousseau/PCSC/issues/118
src/pcscdaemon.c | 2 ++
1 file changed, 2 insertions(+)
commit c88055cebe0cd435c5415832726fc978538c563f
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Feb 12 18:37:50 2022 +0100
pcscdaemon: update copyright date
src/pcscdaemon.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
commit 8d3ac33ff515e4eb61b8903efa68771347d530a8
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Feb 12 18:36:52 2022 +0100
pcscdaemon: code reformat
src/pcscdaemon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 7e56d2773be27bb2e2935ee80a6deb5f47f1c936
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Feb 12 18:25:45 2022 +0100
pcscd.h.in: remove unused MAX_DEVICENAME
src/pcscd.h.in | 1 -
1 file changed, 1 deletion(-)
commit 9b485539159396ad866edc9ede7548feed3623c4
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Feb 12 18:18:38 2022 +0100
hotplug_libusb: use asprintf(3) instead of MAX_DEVICENAME
src/hotplug_libusb.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
commit d0cebfb784a9e22e9fa0d4dc29f84c9cf1f8b33c
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Feb 12 18:16:51 2022 +0100
hotplug_macosx: use asprintf(3) instead of MAX_DEVICENAME
src/hotplug_macosx.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
commit 111788c902daf09c81b47487e014c2cd9bcce19d
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Fri Feb 11 17:15:53 2022 +0100
Fix compiler warning: variable ‘newReaderConfig’ set but not used
If "--disable-serial" is used we get:
pcscdaemon.c:263:15: warning: variable ‘newReaderConfig’ set but not used [-Wunused-but-set-variable]
263 | char *newReaderConfig;
| ^~~~~~~~~~~~~~~
This issue was discovered while playing with PC/SC in flatpak(1)
projects.
src/pcscdaemon.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
commit c49ea4bf88f08070a695f7d05f28db72a0dbad7b
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sun Feb 6 16:52:53 2022 +0100
ISSUE_TEMPLATE.md: add "Issue" section
### Issue
* What do you do?
* What result do you expect?
* What result do you get instead?
.github/ISSUE_TEMPLATE.md | 6 ++++++
1 file changed, 6 insertions(+)
commit dcee5370b33f2e2ff6556d6a435e817cc0eca969
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Jan 22 17:19:01 2022 +0100
SCardGetStatusChange: speedup the case DISABLE_AUTO_POWER_ON
If DISABLE_AUTO_POWER_ON is defined then we do not waste time waiting
for the card to be powered. The card may not be powered before long.
Since we wait PCSCLITE_STATUS_POLL_RATE (400000 µs) for each card, the
delay can be very long for an 8 slots reader (sysmoOCTSIM):
400ms * 8 = 3.2 seconds
or very very long for a 96 slots reader (sysmoSIMBANK-96):
400ms * 96 = 38.4 seconds
src/winscard_clnt.c | 2 ++
1 file changed, 2 insertions(+)
commit 731e929d2f1c1d6c6db03a6337f35cf4fd1c12fb (debug-zotac/master)
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sun Dec 19 17:42:02 2021 +0100
Initialize Atomic field of struct RdrCliHandles
src/readerfactory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 0e78fde711a28c0de8a46371207469466f41e490
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sun Dec 19 17:34:38 2021 +0100
Initialize Atomic fields of struct ReaderContext
The elements of array READER_CONTEXT *
sReadersContexts[PCSCLITE_MAX_READERS_CONTEXTS] are dynamically allocated
so they also need to be dynamically initialized for atomic fields.
src/readerfactory.c | 4 ++++
1 file changed, 4 insertions(+)
commit 84555bcdcdd3b014f414710ffca2c4350cb25aba
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Wed Dec 15 18:57:17 2021 +0100
github actions: add --enable-debugatr
.github/workflows/build.yml | 1 +
1 file changed, 1 insertion(+)
commit 9d54ed3fe1d89d539bdadcc63b5a7ef098c9231e
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Wed Dec 15 18:56:56 2021 +0100
github actions: reformat
.github/workflows/build.yml | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
commit d942a8c895760191257ddcb792fdeb7ac2a7ef24
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Wed Dec 15 18:48:06 2021 +0100
github actions: run "make distcheck" only for --disable-strict
.github/workflows/build.yml | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
commit 451daab067b23718e179f4b6931c5f07fd21487a
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Wed Dec 15 18:40:20 2021 +0100
github action; remove double make
.github/workflows/build.yml | 1 -
1 file changed, 1 deletion(-)
commit 8d2e26ddfa613c0a411fcf4d07aa7e5f374eecc4
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Wed Dec 15 12:06:19 2021 +0100
github actions: build default config
.github/workflows/build.yml | 53 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
commit 5d920fb14b8320f6ea82036df89bde7431e0f828
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Wed Dec 15 14:58:04 2021 +0100
Fix compiler warning for --enable-embedded
debuglog.c: In function ‘DebugLogSetCategory’:
debuglog.c:89:9: error: ‘return’ with a value, in function returning void [-Werror=return-type]
89 | return 0;
| ^
debuglog.c:85:15: note: declared here
85 | INTERNAL void DebugLogSetCategory(const int dbginfo)
| ^~~~~~~~~~~~~~~~~~~
src/debuglog.c | 2 --
1 file changed, 2 deletions(-)
commit 8650c062eed45e25fa05e35dbc8b5130cf8ab061
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Wed Dec 15 15:03:53 2021 +0100
Fix compiler warnings for --enable-embedded
readerfactory.c: In function ‘RFAddReader’:
readerfactory.c:392:7: error: variable ‘log_level’ set but not used [-Werror=unused-but-set-variable]
392 | int log_level = PCSC_LOG_ERROR;
| ^~~~~~~~~
CC pcscd-hotplug_libusb.o
readerfactory.c: In function ‘RFInitializeReader’:
readerfactory.c:1143:7: error: variable ‘log_level’ set but not used [-Werror=unused-but-set-variable]
1143 | int log_level = PCSC_LOG_CRITICAL;
| ^~~~~~~~~
src/PCSC/debuglog.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
commit 9124a59d8f1a8536f0b46f5ef2a1b4a1711f96b2
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Wed Dec 15 14:34:05 2021 +0100
configure: add --disable-strict option
By default the compiler arguments are now:
-Wall -Wextra -Wno-unused-parameter -Werror ${CFLAGS}
configure.ac | 11 +++++++++++
1 file changed, 11 insertions(+)
commit 5f6519a7b25b31d1d5fbfde70a3083741f824715
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Wed Dec 15 11:51:15 2021 +0100
hotplug_generic: remove useless #include
src/hotplug_generic.c | 2 --
1 file changed, 2 deletions(-)
commit 618359945ede2de12bbe53f5cbafea3c3c608111
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Wed Dec 15 11:49:42 2021 +0100
hotplug_generic: remove dead code
src/hotplug_generic.c | 5 -----
1 file changed, 5 deletions(-)
commit 25db7bc5504cb74336d45224ed33bd4ea88e835f
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Wed Dec 15 11:48:52 2021 +0100
hotplug_generic: Fix compiler warnings:
hotplug_generic.c:53:6: warning: no previous prototype for ‘HPSearchHotPluggables’ [-Wmissing-prototypes]
53 | LONG HPSearchHotPluggables(void)
| ^~~~~~~~~~~~~~~~~~~~~
hotplug_generic.c:58:7: warning: no previous prototype for ‘HPRegisterForHotplugEvents’ [-Wmissing-prototypes]
58 | ULONG HPRegisterForHotplugEvents(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
hotplug_generic.c:63:6: warning: no previous prototype for ‘HPStopHotPluggables’ [-Wmissing-prototypes]
63 | LONG HPStopHotPluggables(void)
| ^~~~~~~~~~~~~~~~~~~
hotplug_generic.c:68:6: warning: no previous prototype for ‘HPReCheckSerialReaders’ [-Wmissing-prototypes]
68 | void HPReCheckSerialReaders(void)
| ^~~~~~~~~~~~~~~~~~~~~~
src/hotplug_generic.c | 2 ++
1 file changed, 2 insertions(+)
commit a4bdfd2eb6e908c8306fe421137a83573ba05d8c
Author: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Tue Dec 14 08:20:59 2021 +0100
src/hotplug_generic.c: fix build without lib{udev,usb}
Fix the following build failure without lib{udev,usb} raised since
version 1.9.5 and
https://github.com/LudovicRousseau/PCSC/commit/6f8f170db3c88c59a5ddb5ae5319b921a901a6aa:
/home/giuliobenetti/autobuild/run/instance-2/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/11.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: pcscd-pcscdaemon.o: in function `signal_thread':
pcscdaemon.c:(.text+0x444): undefined reference to `HPReCheckSerialReaders'
Fixes:
- http://autobuild.buildroot.org/results/6cf323229f32967aa554418410dc94b7094d09af
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
src/hotplug_generic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit d56ed18dbebc4423506ce7f61d3e3bcf4bdc4cb0
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sun Dec 12 17:26:09 2021 +0100
Remove mutex and use _Atomic instead
Remove the mutex "reference_lock" used to protect modifications of
"reference".
"reference" is now "_Atomic int" so +1 and -1 operations are managed by
C11 language itself.
src/readerfactory.c | 8 --------
src/readerfactory.h | 3 +--
2 files changed, 1 insertion(+), 10 deletions(-)
commit c2d6e38e0a3d871718b8f06b37fa04aa4c245eb2
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sun Dec 12 16:56:32 2021 +0100
Fix race with dwEventStatus
The problem is (in part) with the switch() that may read the variable
more than once.
==================
WARNING: ThreadSanitizer: data race (pid=10828)
Write of size 8 at 0x7b040000ae78 by thread T6 (mutexes: write M0):
#0 RFSetReaderEventState PCSC/src/readerfactory.c:1321:32 (pcscd+0x4c45ce)
#1 EHStatusHandlerThread PCSC/src/eventhandler.c:382:11 (pcscd+0x4bee54)
Previous read of size 8 at 0x7b040000ae78 by thread T8:
#0 RFCheckReaderEventState PCSC/src/readerfactory.c:1350:24 (pcscd+0x4c46c6)
#1 SCardStatus PCSC/src/winscard.c:1286:7 (pcscd+0x4ce7b5)
#2 ContextThread PCSC/src/winscard_svc.c:635:16 (pcscd+0x4d0cc1)
Location is heap block of size 16 at 0x7b040000ae70 allocated by thread T8:
#0 malloc <null> (pcscd+0x42a65c)
#1 RFAddReaderHandle PCSC/src/readerfactory.c:1249:14 (pcscd+0x4c43b4)
#2 SCardConnect PCSC/src/winscard.c:491:7 (pcscd+0x4ccc16)
#3 ContextThread PCSC/src/winscard_svc.c:502:16 (pcscd+0x4d0a70)
Mutex M0 (0x7b4c000000a0) created at:
#0 pthread_mutex_init <null> (pcscd+0x42d2fd)
#1 RFAddReader PCSC/src/readerfactory.c:329:8 (pcscd+0x4c1d18)
#2 HPAddDevice PCSC/src/hotplug_libudev.c:534:8 (pcscd+0x4cba1c)
#3 HPEstablishUSBNotifications PCSC/src/hotplug_libudev.c:668:6 (pcscd+0x4cb4d4)
Thread T6 (tid=11122, running) created by thread T2 at:
#0 pthread_create <null> (pcscd+0x42be8b)
#1 ThreadCreate PCSC/src/utils.c:184:8 (pcscd+0x4cc2dc)
#2 EHSpawnEventHandler PCSC/src/eventhandler.c:237:7 (pcscd+0x4beb59)
#3 RFAddReader PCSC/src/readerfactory.c:426:8 (pcscd+0x4c21b9)
#4 HPAddDevice PCSC/src/hotplug_libudev.c:534:8 (pcscd+0x4cba1c)
#5 HPEstablishUSBNotifications PCSC/src/hotplug_libudev.c:668:6 (pcscd+0x4cb4d4)
Thread T8 (tid=11173, running) created by main thread at:
#0 pthread_create <null> (pcscd+0x42be8b)
#1 ThreadCreate PCSC/src/utils.c:184:8 (pcscd+0x4cc2dc)
#2 CreateContextThread PCSC/src/winscard_svc.c:236:7 (pcscd+0x4cfd8b)
#3 SVCServiceRunLoop PCSC/src/pcscdaemon.c:134:9 (pcscd+0x4c1082)
#4 main PCSC/src/pcscdaemon.c:786:2 (pcscd+0x4c09c4)
SUMMARY: ThreadSanitizer: data race PCSC/src/readerfactory.c:1321:32 in RFSetReaderEventState
==================
src/readerfactory.c | 4 +++-
src/readerfactory.h | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
commit 4a2fb8f770ec307c6bca50b8176674dedab2a205
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sun Dec 12 15:44:24 2021 +0100
readerfactory.h: fix data race with contexts field
The .contexts field is used in read/write from different threads. We
must protect the accesses by declaring it _Atomic (from C11).
Thanks to andrei-datcu for the patch
"No data races in EHStatusHandlerThread #112"
https://github.com/LudovicRousseau/PCSC/pull/112
src/readerfactory.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 49655255c7c5519cdd61045ea5d3cefb72f8ae7b
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sun Dec 12 15:40:27 2021 +0100
readerfactory.h: fix data race with hLockId
"volatile" does not help solve data races in multi-thread programs.
See https://en.cppreference.com/w/c/language/volatile
" Note that volatile variables are not suitable for communication
between threads; they do not offer atomicity, synchronization, or memory
ordering. A read from a volatile variable that is modified by another
thread without synchronization or concurrent modification from two
unsynchronized threads is undefined behavior due to a data race. "
We must use "_Atomic" from C11 instead.
Thanks to andrei-datcu for the patch
"No data races in EHStatusHandlerThread #112"
https://github.com/LudovicRousseau/PCSC/pull/112
src/readerfactory.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit e46aad0c3571bd5f9da4cd4544fa3d6201dc3890
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sun Dec 12 15:25:32 2021 +0100
pcscdaemon.c: Fix data race for AraKiri variable
Issue reported by clang ThreadSanitizer
WARNING: ThreadSanitizer: data race (pid=14419)
Read of size 1 at 0x000000f3a9c8 by main thread:
#0 SVCServiceRunLoop <null> (pcscd+0x4c0da9)
#1 main <null> (pcscd+0x4c0694)
Previous write of size 1 at 0x000000f3a9c8 by thread T1:
#0 signal_thread <null> (pcscd+0x4c0aca)
As if synchronized via sleep:
#0 nanosleep <null> (pcscd+0x4297dd)
#1 SYS_USleep <null> (pcscd+0x4c6c36)
#2 SVCServiceRunLoop <null> (pcscd+0x4c0cef)
#3 main <null> (pcscd+0x4c0694)
Location is global 'AraKiri' of size 1 at 0x000000f3a9c8 (pcscd+0x000000f3a9c8)
Thread T1 (tid=14421, running) created by main thread at:
#0 pthread_create <null> (pcscd+0x42be9b)
#1 main <null> (pcscd+0x4c01c8)
SUMMARY: ThreadSanitizer: data race (/home/rousseau/sc/costa/PCSC/src/pcscd+0x4c0da9) in SVCServiceRunLoop
src/pcscdaemon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 7e63856e6661b67a84871bfd4f4783f9b971509a
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sun Dec 5 14:31:44 2021 +0100
pcscd.8: improve documentation of --config
doc/pcscd.8.in | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
commit e706590870f2422921bf24b680df84efedf52b1f
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sun Dec 5 14:21:30 2021 +0100
pcscd: improve messages about reader.conf.d
Thanks to Kirill Elagin
" Misleading references to /etc/reader.conf throughout the documentation #115 "
https://github.com/LudovicRousseau/PCSC/issues/115
src/pcscdaemon.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
commit 68da917fb086e318eac2910877e2c87f9f49b370
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Dec 4 21:46:42 2021 +0100
configure.ac: better documentation for --disable-serial
Thanks to Kirill Elagin
" Misleading references to /etc/reader.conf throughout the documentation #115 "
https://github.com/LudovicRousseau/PCSC/issues/115
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 0fb14511c3820499837e2e6c1ec4f760816ed0fc
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Dec 4 21:45:02 2021 +0100
configfile.l: update reader.conf warning for USB
Thanks to Kirill Elagin
" Misleading references to /etc/reader.conf throughout the documentation #115 "
https://github.com/LudovicRousseau/PCSC/issues/115
src/configfile.l | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit ded8c3246fb16d133ed5a5c3f288583f016ba462
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Dec 4 21:43:12 2021 +0100
pcscd.8: update /etc/reader.conf.d/ documentation
Thanks to Kirill Elagin
" Misleading references to /etc/reader.conf throughout the documentation #115 "
https://github.com/LudovicRousseau/PCSC/issues/115
doc/pcscd.8.in | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
commit e4afdbad265601170e4cfa2f304a513d863c3b77
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Dec 4 17:54:09 2021 +0100
reader.conf.5: update /etc/reader.conf.d/ documentation
Thanks to Kirill Elagin
" Misleading references to /etc/reader.conf throughout the documentation #115 "
https://github.com/LudovicRousseau/PCSC/issues/115
doc/reader.conf.5.in | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
commit 1f99fa0bc497db6c376968d7fe996b7c669b11e4
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Dec 4 17:37:13 2021 +0100
Remove useless src/utils/
"installifd" is for non-USB drivers. Not very usefull any more
"formaticc" can be replaced by scriptor from pcsc-tools
src/utils/Makefile.am | 14 ---
src/utils/README | 27 -----
src/utils/formaticc.c | 316 -------------------------------------------------
src/utils/installifd.c | 166 --------------------------
src/utils/sample.ibm | 1 -
src/utils/sample.in | 6 -
src/utils/sample.out | 1 -
7 files changed, 531 deletions(-)
commit 2d52b510be2b77d266f8de89d10029fd67b46783
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Dec 4 17:32:21 2021 +0100
README: improve documentation about /etc/reader.conf.d/
Thanks to Kirill Elagin
" Misleading references to /etc/reader.conf throughout the documentation #115 "
https://github.com/LudovicRousseau/PCSC/issues/115
README | 23 ++++++++++-------------
1 file changed, 10 insertions(+), 13 deletions(-)
commit 9a24ac2f978d6a762eaf62b56a65a3426c39e822
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Dec 4 17:19:31 2021 +0100
configure.ac: update --enable-confdir= documentation
The default value is "${sysconfdir}/reader.conf.d" and not
"/etc/reader.conf.d".
This makes it more explicit that ${sysconfdir} is used.
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit d92b5d4fad5dea95ce8d12fac07fe1eec2150ad1 (tag: 1.9.5)
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Dec 4 13:16:36 2021 +0100
@ -36,7 +768,7 @@ Date: Sat Dec 4 13:23:53 2021 +0100
etc/Makefile.am | 4 ++++
1 file changed, 4 insertions(+)
commit 4b39499ac201116a90dee5151dcc7b5af6ac153d (origin/master, origin/HEAD, github/master)
commit 4b39499ac201116a90dee5151dcc7b5af6ac153d
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Dec 4 12:46:18 2021 +0100

@ -235,6 +235,7 @@ EGREP = @EGREP@
ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
FILECMD = @FILECMD@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@

@ -61,23 +61,20 @@ By running pcscd under a priveledged account you can link to
libpcsclite.so and it will act as a client to the pcscd allowing multiple
applications to be run under non-priveledged accounts.
Then type make install to copy etc/reader.conf to
/etc/reader.conf and the libraries to /usr/local/lib. If you choose
not to have your reader.conf in /etc then use --enable-confdir=DIR
Then type "make install" to copy the libraries to /usr/local/lib. If you
choose not to have your reader configuration file in /etc/reader.conf.d/
then use --enable-confdir=DIR
You must be root to do make install in the default locations.
Be sure to edit the /etc/reader.conf file to fit your needs and make sure
your IFD Handler driver is located in the path specified as LIBRARYPATH
in reader.conf. If you are using a reader with multiple smart card slots
all you have to do is define a different FRIENDLYNAME in the reader.conf
for each reader. Both will have the same information otherwise.
Be sure to edit the /etc/reader.conf.d/my_reader.conf file for your
reader to fit your needs and make sure your IFD Handler driver is
located in the path specified as LIBRARYPATH in my_reader.conf. If you
are using a reader with multiple smart card slots all you have to do is
define a different FRIENDLYNAME in the my_reader.conf for each reader.
Both will have the same information otherwise.
There is an config file generator in the utils directory. It is called
installifd. You may use this to generate the /etc/reader.conf file.
USB users shall not use /etc/reader.conf. pcscd will give
a warning that the file does not exist or contain anything useful.
USB users shall not use /etc/reader.conf.d/ to configure USB drivers.
There is a test program with this package:

1500
config.guess vendored

File diff suppressed because it is too large Load Diff

2609
config.sub vendored

File diff suppressed because it is too large Load Diff

365
configure vendored

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.71 for pcsc-lite 1.9.5.
# Generated by GNU Autoconf 2.71 for pcsc-lite 1.9.6.
#
#
# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
@ -618,8 +618,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='pcsc-lite'
PACKAGE_TARNAME='pcsc-lite'
PACKAGE_VERSION='1.9.5'
PACKAGE_STRING='pcsc-lite 1.9.5'
PACKAGE_VERSION='1.9.6'
PACKAGE_STRING='pcsc-lite 1.9.6'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@ -701,6 +701,7 @@ MANIFEST_TOOL
RANLIB
DLLTOOL
OBJDUMP
FILECMD
NM
ac_ct_DUMPBIN
DUMPBIN
@ -852,6 +853,7 @@ enable_debugatr
enable_ipcdir
enable_confdir
enable_filter
enable_strict
'
ac_precious_vars='build_alias
host_alias
@ -1422,7 +1424,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures pcsc-lite 1.9.5 to adapt to many kinds of systems.
\`configure' configures pcsc-lite 1.9.6 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1493,7 +1495,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of pcsc-lite 1.9.5:";;
short | recursive ) echo "Configuration of pcsc-lite 1.9.6:";;
esac
cat <<\_ACEOF
@ -1517,7 +1519,7 @@ Optional Features:
--disable-libtool-lock avoid locking (might break parallel builds)
--disable-documentation do not build documentation
--disable-libsystemd do not use libsystemd
--disable-serial do not use serial reader.conf file
--disable-serial do not use serial reader.conf files
--disable-usb do not use usb hotplug
--disable-libudev do not use libudev
--enable-libusb use libusb
@ -1529,10 +1531,11 @@ Optional Features:
--enable-debugatr enable ATR debug messages from pcscd
--enable-ipcdir=DIR directory containing IPC files (default /run/pcscd)
--enable-confdir=DIR directory containing reader configurations (default
/etc/reader.conf.d)
${sysconfdir}/reader.conf.d)
--disable-filter disable reader filtering using
PCSCLITE_FILTER_IGNORE_READER_NAMES and
PCSCLITE_FILTER_EXTEND_READER_NAMES
--disable-strict disable strict compile mode [enabled]
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@ -1646,7 +1649,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
pcsc-lite configure 1.9.5
pcsc-lite configure 1.9.6
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
@ -2062,7 +2065,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by pcsc-lite $as_me 1.9.5, which was
It was created by pcsc-lite $as_me 1.9.6, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
@ -3333,7 +3336,7 @@ fi
# Define the identity of the package.
PACKAGE='pcsc-lite'
VERSION='1.9.5'
VERSION='1.9.6'
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@ -5529,6 +5532,10 @@ fi
rm -f conftest.l $LEX_OUTPUT_ROOT.c
fi
if test $LEX = ":"
then
as_fn_error $? "no lex or flex found" "$LINENO" 5
fi
@ -6859,8 +6866,8 @@ esac
macro_version='2.4.6'
macro_revision='2.4.6'
macro_version='2.4.7'
macro_revision='2.4.7'
@ -7271,13 +7278,13 @@ else
mingw*) lt_bad_file=conftest.nm/nofile ;;
*) lt_bad_file=/dev/null ;;
esac
case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
*$lt_bad_file* | *'Invalid file or object type'*)
lt_cv_path_NM="$tmp_nm -B"
break 2
;;
*)
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
*/dev/null*)
lt_cv_path_NM="$tmp_nm -p"
break 2
@ -7415,7 +7422,7 @@ esac
fi
fi
case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
*COFF*)
DUMPBIN="$DUMPBIN -symbols -headers"
;;
@ -7508,7 +7515,7 @@ else $as_nop
lt_cv_sys_max_cmd_len=8192;
;;
bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
# This has been around since 386BSD, at least. Likely further.
if test -x /sbin/sysctl; then
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@ -7551,7 +7558,7 @@ else $as_nop
sysv5* | sco5v6* | sysv4.2uw2*)
kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
if test -n "$kargmax"; then
lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[ ]//'`
else
lt_cv_sys_max_cmd_len=32768
fi
@ -7756,6 +7763,114 @@ esac
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}file", so it can be a program name with args.
set dummy ${ac_tool_prefix}file; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_FILECMD+y}
then :
printf %s "(cached) " >&6
else $as_nop
if test -n "$FILECMD"; then
ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
case $as_dir in #(((
'') as_dir=./ ;;
*/) ;;
*) as_dir=$as_dir/ ;;
esac
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_FILECMD="${ac_tool_prefix}file"
printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
FILECMD=$ac_cv_prog_FILECMD
if test -n "$FILECMD"; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FILECMD" >&5
printf "%s\n" "$FILECMD" >&6; }
else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi
fi
if test -z "$ac_cv_prog_FILECMD"; then
ac_ct_FILECMD=$FILECMD
# Extract the first word of "file", so it can be a program name with args.
set dummy file; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_FILECMD+y}
then :
printf %s "(cached) " >&6
else $as_nop
if test -n "$ac_ct_FILECMD"; then
ac_cv_prog_ac_ct_FILECMD="$ac_ct_FILECMD" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
case $as_dir in #(((
'') as_dir=./ ;;
*/) ;;
*) as_dir=$as_dir/ ;;
esac
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_FILECMD="file"
printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
ac_ct_FILECMD=$ac_cv_prog_ac_ct_FILECMD
if test -n "$ac_ct_FILECMD"; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FILECMD" >&5
printf "%s\n" "$ac_ct_FILECMD" >&6; }
else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_FILECMD" = x; then
FILECMD=":"
else
case $cross_compiling:$ac_tool_warned in
yes:)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
FILECMD=$ac_ct_FILECMD
fi
else
FILECMD="$ac_cv_prog_FILECMD"
fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
set dummy ${ac_tool_prefix}objdump; ac_word=$2
@ -7899,7 +8014,7 @@ beos*)
bsdi[45]*)
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
lt_cv_file_magic_cmd='/usr/bin/file -L'
lt_cv_file_magic_cmd='$FILECMD -L'
lt_cv_file_magic_test_file=/shlib/libc.so
;;
@ -7933,14 +8048,14 @@ darwin* | rhapsody*)
lt_cv_deplibs_check_method=pass_all
;;
freebsd* | dragonfly*)
freebsd* | dragonfly* | midnightbsd*)
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
# Not sure whether the presence of OpenBSD here was a mistake.
# Let's accept both of them until this is cleared up.
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_cmd=$FILECMD
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
;;
esac
@ -7954,7 +8069,7 @@ haiku*)
;;
hpux10.20* | hpux11*)
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_cmd=$FILECMD
case $host_cpu in
ia64*)
lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
@ -8001,7 +8116,7 @@ netbsd* | netbsdelf*-gnu)
newos6*)
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_cmd=$FILECMD
lt_cv_file_magic_test_file=/usr/lib/libnls.so
;;
@ -8374,13 +8489,29 @@ esac
fi
: ${AR=ar}
: ${AR_FLAGS=cr}
# Use ARFLAGS variable as AR's operation code to sync the variable naming with
# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
# higher priority because thats what people were doing historically (setting
# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS
# variable obsoleted/removed.
test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
lt_ar_flags=$AR_FLAGS
# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override
# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
@ -8797,7 +8928,7 @@ esac
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
# Gets list of data symbols to import.
lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
# Adjust the below global symbol transforms to fixup imported variables.
lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
@ -8815,20 +8946,20 @@ fi
# Transform an extracted symbol line into a proper C declaration.
# Some systems (esp. on ia64) link data and code symbols differently,
# so use this general approach.
lt_cv_sys_global_symbol_to_cdecl="sed -n"\
lt_cv_sys_global_symbol_to_cdecl="$SED -n"\
$lt_cdecl_hook\
" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
# Transform an extracted symbol line into symbol name and symbol address
lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
$lt_c_name_hook\
" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
# Transform an extracted symbol line into symbol name with lib prefix and
# symbol address.
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
$lt_c_name_lib_hook\
" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
@ -8852,7 +8983,7 @@ for ac_symprfx in "" "_"; do
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
# Fake it for dumpbin and say T for any non-static function,
# D for any global variable and I for any imported variable.
# Also find C++ and __fastcall symbols from MSVC++,
# Also find C++ and __fastcall symbols from MSVC++ or ICC,
# which start with @ or ?.
lt_cv_sys_global_symbol_pipe="$AWK '"\
" {last_section=section; section=\$ 3};"\
@ -8870,9 +9001,9 @@ for ac_symprfx in "" "_"; do
" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
" ' prfx=^$ac_symprfx"
else
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
fi
lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
# Check to see that the pipe works correctly.
pipe_works=no
@ -9072,7 +9203,7 @@ case $with_sysroot in #(
fi
;; #(
/*)
lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
;; #(
no|'')
;; #(
@ -9197,7 +9328,7 @@ ia64-*-hpux*)
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
case `/usr/bin/file conftest.$ac_objext` in
case `$FILECMD conftest.$ac_objext` in
*ELF-32*)
HPUX_IA64_MODE=32
;;
@ -9218,7 +9349,7 @@ ia64-*-hpux*)
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
if test yes = "$lt_cv_prog_gnu_ld"; then
case `/usr/bin/file conftest.$ac_objext` in
case `$FILECMD conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -melf32bsmip"
;;
@ -9230,7 +9361,7 @@ ia64-*-hpux*)
;;
esac
else
case `/usr/bin/file conftest.$ac_objext` in
case `$FILECMD conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -32"
;;
@ -9256,7 +9387,7 @@ mips64*-*linux*)
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
emul=elf
case `/usr/bin/file conftest.$ac_objext` in
case `$FILECMD conftest.$ac_objext` in
*32-bit*)
emul="${emul}32"
;;
@ -9264,7 +9395,7 @@ mips64*-*linux*)
emul="${emul}64"
;;
esac
case `/usr/bin/file conftest.$ac_objext` in
case `$FILECMD conftest.$ac_objext` in
*MSB*)
emul="${emul}btsmip"
;;
@ -9272,7 +9403,7 @@ mips64*-*linux*)
emul="${emul}ltsmip"
;;
esac
case `/usr/bin/file conftest.$ac_objext` in
case `$FILECMD conftest.$ac_objext` in
*N32*)
emul="${emul}n32"
;;
@ -9296,14 +9427,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
case `/usr/bin/file conftest.o` in
case `$FILECMD conftest.o` in
*32-bit*)
case $host in
x86_64-*kfreebsd*-gnu)
LD="${LD-ld} -m elf_i386_fbsd"
;;
x86_64-*linux*)
case `/usr/bin/file conftest.o` in
case `$FILECMD conftest.o` in
*x86-64*)
LD="${LD-ld} -m elf32_x86_64"
;;
@ -9411,7 +9542,7 @@ printf "%s\n" "$lt_cv_cc_needs_belf" >&6; }
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
case `/usr/bin/file conftest.o` in
case `$FILECMD conftest.o` in
*64-bit*)
case $lt_cv_prog_gnu_ld in
yes*)
@ -10194,8 +10325,8 @@ int forced_loaded() { return 2;}
_LT_EOF
echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
echo "$AR cr libconftest.a conftest.o" >&5
$AR cr libconftest.a conftest.o 2>&5
echo "$AR $AR_FLAGS libconftest.a conftest.o" >&5
$AR $AR_FLAGS libconftest.a conftest.o 2>&5
echo "$RANLIB libconftest.a" >&5
$RANLIB libconftest.a 2>&5
cat > conftest.c << _LT_EOF
@ -10222,17 +10353,12 @@ printf "%s\n" "$lt_cv_ld_force_load" >&6; }
_lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
darwin1.*)
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
darwin*) # darwin 5.x on
# if running on 10.5 or later, the deployment target defaults
# to the OS version, if on x86, and 10.4, the deployment
# target defaults to 10.4. Don't you love it?
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10.0,*86*-darwin8*|10.0,*-darwin[912]*)
_lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10.[012][,.]*)
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10.*|11.*)
_lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
darwin*)
case $MACOSX_DEPLOYMENT_TARGET,$host in
10.[012],*|,*powerpc*-darwin[5-8]*)
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
*)
_lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
esac
;;
esac
@ -10590,8 +10716,8 @@ esac
ofile=libtool
can_build_shared=yes
# All known linkers require a '.a' archive for static linking (except MSVC,
# which needs '.lib').
# All known linkers require a '.a' archive for static linking (except MSVC and
# ICC, which need '.lib').
libext=a
with_gnu_ld=$lt_cv_prog_gnu_ld
@ -11109,7 +11235,7 @@ lt_prog_compiler_static=
lt_prog_compiler_static='-qstaticlink'
;;
*)
case `$CC -V 2>&1 | sed 5q` in
case `$CC -V 2>&1 | $SED 5q` in
*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
# Sun Fortran 8.3 passes all unrecognized flags to the linker
lt_prog_compiler_pic='-KPIC'
@ -11532,15 +11658,15 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries
case $host_os in
cygwin* | mingw* | pw32* | cegcc*)
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# Microsoft Visual C++ or Intel C++ Compiler.
if test yes != "$GCC"; then
with_gnu_ld=no
fi
;;
interix*)
# we just hope/assume this is gcc and not c89 (= MSVC++)
# we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
with_gnu_ld=yes
;;
openbsd* | bitrig*)
@ -11595,7 +11721,7 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries
whole_archive_flag_spec=
fi
supports_anon_versioning=no
case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
*GNU\ gold*) supports_anon_versioning=yes ;;
*\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
@ -11707,6 +11833,7 @@ _LT_EOF
emximp -o $lib $output_objdir/$libname.def'
old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
enable_shared_with_static_runtimes=yes
file_list_spec='@'
;;
interix[3-9]*)
@ -11721,7 +11848,7 @@ _LT_EOF
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
@ -11764,7 +11891,7 @@ _LT_EOF
compiler_needs_object=yes
;;
esac
case `$CC -V 2>&1 | sed 5q` in
case `$CC -V 2>&1 | $SED 5q` in
*Sun\ C*) # Sun C 5.9
whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
compiler_needs_object=yes
@ -11776,13 +11903,14 @@ _LT_EOF
if test yes = "$supports_anon_versioning"; then
archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
echo "local: *; };" >> $output_objdir/$libname.ver~
$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
fi
case $cc_basename in
tcc*)
hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
export_dynamic_flag_spec='-rdynamic'
;;
xlf* | bgf* | bgxlf* | mpixlf*)
@ -11792,7 +11920,7 @@ _LT_EOF
archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
if test yes = "$supports_anon_versioning"; then
archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
echo "local: *; };" >> $output_objdir/$libname.ver~
$LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
fi
@ -11924,7 +12052,7 @@ _LT_EOF
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
else
export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
fi
aix_use_runtimelinking=no
@ -12195,12 +12323,12 @@ fi
cygwin* | mingw* | pw32* | cegcc*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# Microsoft Visual C++ or Intel C++ Compiler.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
case $cc_basename in
cl*)
# Native MSVC
cl* | icl*)
# Native MSVC or ICC
hardcode_libdir_flag_spec=' '
allow_undefined_flag=unsupported
always_export_symbols=yes
@ -12241,7 +12369,7 @@ fi
fi'
;;
*)
# Assume MSVC wrapper