- define PICCDEV at compile time via configure option

- fixed compile error due to missing semi colon


git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@332 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
frankmorgner
2010-10-14 05:39:01 +00:00
parent 5f9aa5704e
commit 4aedda5e1b
3 changed files with 12 additions and 5 deletions

View File

@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.65])
AC_INIT([picc_to_pcsc], [0.1], [oepen@informatik.hu-berlin.de])
AC_INIT([picc_to_pcsc], [0.1], [http://sourceforge.net/projects/vsmartcard/support])
AC_CONFIG_SRCDIR([src/picc_to_pcsc.c])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE
@@ -32,6 +32,13 @@ CPPFLAGS="$saved_CPPFLAGS"
LIBS="$saved_LIBS"
# --enable-piccdev=DEV
piccdev_default=
AC_ARG_ENABLE(piccdev,
AC_HELP_STRING([--enable-piccdev=DEV],[OpenPICC character device (default: /dev/ttyACM0)]),
[piccdev="${enableval}"], [piccdev="/dev/ttyACM0"])
AC_DEFINE_UNQUOTED(PICCDEV, "${piccdev}", [OpenPICC character device])
# Checks for header files.
AC_CHECK_HEADERS([fcntl.h stdint.h stdlib.h string.h unistd.h])

View File

@@ -7,4 +7,4 @@ picc_to_pcsc_SOURCES = picc_to_pcsc.c pcscutil.c
picc_to_pcsc_LDADD = $(PCSC_LIBS)
picc_to_pcsc_CFLAGS = $(PCSC_CFLAGS)
noinst_HEADERS = picc_to_pcsc.h pcscutil.h
noinst_HEADERS = pcscutil.h

View File

@@ -29,7 +29,7 @@
#include <string.h>
#include <errno.h>
#include "picc_to_pcsc.h"
#include "config.h"
#include "pcscutil.h"
static FILE *picc_fd = NULL; /*filehandle used for PICCDEV*/
@@ -41,8 +41,8 @@ static SCARDHANDLE hCard = 0;
/* Forward declaration */
static void cleanup_exit(int signo);
static void cleanup(void);
static size_t picc_decode_apdu(char *inbuf, size_t inlen, unsigned char **outbuf)
static size_t picc_encode_rapdu(unsigned char *inbuf, size_t inlen, char **outbuf)
static size_t picc_decode_apdu(char *inbuf, size_t inlen, unsigned char **outbuf);
static size_t picc_encode_rapdu(unsigned char *inbuf, size_t inlen, char **outbuf);
void cleanup_exit(int signo){
cleanup();