[ rdesktop-Bugs-3353558 ] Compilation with pcsc 1.6.6

SourceForge.net <[email protected]> Tue, 15 Nov 2011 03:57:52 -0800
Newsgroups gmane.network.rdesktop.devel
Message-ID <[email protected]>
Bugs item #3353558, was opened at 2011-07-04 01:52
Message generated for change (Settings changed) made by astrand
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=381347&aid=3353558&group_id=24366

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: v1.7.1
Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Anna Martynova (broom_)
Assigned to: Henrik Andersson (hean01)
Summary: Compilation with pcsc 1.6.6

Initial Comment:
When I try to compile rdesktop 1.7.0 with pcsc 1.6.6, I get such messages:

gcc -g -O2 -Wall -I/usr/include -pthread -I/usr/include/PCSC     -DPACKAGE_NAME=\"rdesktop\" -DPACKAGE_TARNAME=\"rdesktop\" -DPACKAGE_VERSION=\"1.7.0\" -DPACKAGE_STRING=\"rdesktop\ 1.7.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DL_ENDIAN=1 -DHAVE_SYS_SELECT_H=1 -DHAVE_LOCALE_H=1 -DHAVE_LANGINFO_H=1 -DHAVE_SYSEXITS_H=1 -Dssldir=\"/usr\" -DWITH_SCARD=1 -DEGD_SOCKET=\"/var/run/egd-pool\" -DWITH_RDPSND=1 -DRDPSND_OSS=1 -DHAVE_DIRENT_H=1 -DHAVE_DIRFD=1 -DHAVE_DECL_DIRFD=1 -DHAVE_ICONV_H=1 -DHAVE_ICONV=1 -DICONV_CONST= -DHAVE_SYS_VFS_H=1 -DHAVE_SYS_STATVFS_H=1 -DHAVE_SYS_STATFS_H=1 -DHAVE_SYS_PARAM_H=1 -DH
 AVE_SYS_MOUNT_H=1 -DSTAT_STATVFS=1 -DHAVE_STRUCT_STATVFS_F_NAMEMAX=1 -DHAVE_STRUCT_STATFS_F_NAMELEN=1 -D_FILE_OFFSET_BITS=64 -DHAVE_MNTENT_H=1 -DHAVE_SETMNTENT=1 -DKEYMAP_PATH=\"/usr/local/share/rdesktop/keymaps/\" -o scard.o -c scard.c
In file included from scard.c:42:
scard.h:53: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'MYPCSC_SCARD_READERSTATE_A'
scard.h:54: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'MYPCSC_LPSCARD_READERSTATE_A'
scard.c:974: error: expected ')' before 'src'
scard.c:993: error: expected declaration specifiers or '...' before 'MYPCSC_LPSCARD_READERSTATE_A'
scard.c: In function 'copyReaderState_ServerToMyPCSC':
scard.c:997: error: 'MYPCSC_LPSCARD_READERSTATE_A' undeclared (first use in this function)
scard.c:997: error: (Each undeclared identifier is reported only once
scard.c:997: error: for each function it appears in.)
scard.c:997: error: expected ';' before 'dstIter'
scard.c:1000: error: 'dstIter' undeclared (first use in this function)
scard.c:1000: error: 'dst' undeclared (first use in this function)
scard.c: In function 'TS_SCardGetStatusChange':
scard.c:1020: error: 'MYPCSC_LPSCARD_READERSTATE_A' undeclared (first use in this function)
scard.c:1020: error: expected ';' before 'myRsArray'
scard.c:1077: error: 'myRsArray' undeclared (first use in this function)
scard.c:1077: error: 'MYPCSC_SCARD_READERSTATE_A' undeclared (first use in this function)
scard.c:1081: error: too many arguments to function 'copyReaderState_ServerToMyPCSC'
scard.c:1085: warning: implicit declaration of function 'copyReaderState_MyPCSCToServer'
scard.c: In function 'TS_SCardLocateCardsByATR':
scard.c:1156: error: 'MYPCSC_LPSCARD_READERSTATE_A' undeclared (first use in this function)
scard.c:1156: error: expected ';' before 'myRsArray'
scard.c:1168: error: 'SCARD_READERSTATE_A' undeclared (first use in this function)
scard.c:1223: error: 'myRsArray' undeclared (first use in this function)
scard.c:1223: error: 'MYPCSC_SCARD_READERSTATE_A' undeclared (first use in this function)
scard.c:1226: error: too many arguments to function 'copyReaderState_ServerToMyPCSC'
make: *** [scard.o] Error 1

The patch to fix is available in Gentoo repo: http://web.archiveorange.com/archive/v/a7O9XEzTKbR8C8iN9RDw
Direct link to patch: http://mirror.yandex.ru/gentoo-portage/net-misc/rdesktop/files/rdesktop-1.7.0%2bpcsc-lite-1.6.6.patch

I tried, and this patch solved the issue. Why not to include it to rdesktop source?

----------------------------------------------------------------------

Comment By: Henrik Andersson (hean01)
Date: 2011-11-15 00:43

Message:
Commit r1643 applies the patch and does not break build of previous
versions of
pcsclite due to SCARD_READERSTATE is an typedef of SCARD_READERSTATE_A.


----------------------------------------------------------------------

Comment By: Henrik Andersson (hean01)
Date: 2011-10-10 04:42

Message:
Since pcsc 1.6.2 this patch is needed which will break compile against
older version, 
add checks to configure and defines to support old and new version.



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=381347&aid=3353558&group_id=24366

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1