Small fixes for windows compilation (Visual Studio Express 2005)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2855 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
c3e85106c7
commit
9213a29a34
|
@ -25,6 +25,22 @@
|
|||
#define isatty _isatty
|
||||
#endif
|
||||
|
||||
#ifndef strnicmp
|
||||
#define strnicmp _strnicmp
|
||||
#endif
|
||||
|
||||
#ifndef stricmp
|
||||
#define stricmp _stricmp
|
||||
#endif
|
||||
|
||||
#ifndef strdup
|
||||
#define strdup _strdup
|
||||
#endif
|
||||
|
||||
#ifndef fileno
|
||||
#define fileno _fileno
|
||||
#endif
|
||||
|
||||
#ifndef mkdir
|
||||
#define mkdir _mkdir
|
||||
#endif
|
||||
|
@ -33,6 +49,14 @@
|
|||
#define access _access
|
||||
#endif
|
||||
|
||||
#ifndef unlink
|
||||
#define unlink _unlink
|
||||
#endif
|
||||
|
||||
#ifndef putenv
|
||||
#define putenv _putenv
|
||||
#endif
|
||||
|
||||
#ifndef R_OK
|
||||
#define R_OK 4 /* test whether readable. */
|
||||
#define W_OK 2 /* test whether writable. */
|
||||
|
|
|
@ -28,13 +28,11 @@ libopensc_la_SOURCES = \
|
|||
card-cardos.c card-tcos.c card-emv.c card-default.c \
|
||||
card-mcrd.c card-starcos.c card-openpgp.c card-jcop.c \
|
||||
card-oberthur.c card-belpic.c card-atrust-acos.c \
|
||||
card-incrypto34.c \
|
||||
card-piv.c \
|
||||
card-incrypto34.c card-piv.c \
|
||||
\
|
||||
pkcs15-piv.c \
|
||||
pkcs15-openpgp.c pkcs15-infocamere.c pkcs15-starcert.c \
|
||||
pkcs15-tcos.c pkcs15-esteid.c pkcs15-postecert.c pkcs15-gemsafe.c \
|
||||
pkcs15-actalis.c pkcs15-atrust-acos.c pkcs15-tccardos.c
|
||||
pkcs15-actalis.c pkcs15-atrust-acos.c pkcs15-tccardos.c pkcs15-piv.c
|
||||
libopensc_la_LDFLAGS = -version-info @OPENSC_LT_CURRENT@:@OPENSC_LT_REVISION@:@OPENSC_LT_AGE@
|
||||
libopensc_la_LIBADD = @LIBSCCONF@ $(OPENSSL_LIBS) $(OPENCT_LIBS) $(PCSC_LIBS) $(LTLIBLTDL)
|
||||
|
||||
|
|
|
@ -27,12 +27,12 @@ OBJECTS = \
|
|||
card-cardos.obj card-tcos.obj card-emv.obj card-default.obj \
|
||||
card-mcrd.obj card-starcos.obj card-openpgp.obj card-jcop.obj \
|
||||
card-oberthur.obj card-belpic.obj card-atrust-acos.obj \
|
||||
card-incrypto34.obj \
|
||||
card-incrypto34.obj card-piv.obj\
|
||||
\
|
||||
pkcs15-openpgp.obj pkcs15-infocamere.obj pkcs15-starcert.obj \
|
||||
pkcs15-tcos.obj pkcs15-esteid.obj pkcs15-postecert.obj \
|
||||
pkcs15-gemsafe.obj pkcs15-actalis.obj pkcs15-atrust-acos.obj \
|
||||
pkcs15-tccardos.obj \
|
||||
pkcs15-tccardos.obj pkcs15-piv.obj\
|
||||
\
|
||||
$(TOPDIR)\win32\version.res
|
||||
|
||||
|
|
|
@ -522,7 +522,7 @@ int sc_select_file(sc_card_t *card,
|
|||
SC_FUNC_RETURN(card->ctx, 2, SC_ERROR_INVALID_ARGUMENTS);
|
||||
}
|
||||
}
|
||||
if (card->ops->select_file == NULL)
|
||||
if (card->ops->select_file == NULL)
|
||||
SC_FUNC_RETURN(card->ctx, 2, SC_ERROR_NOT_SUPPORTED);
|
||||
r = card->ops->select_file(card, in_path, file);
|
||||
/* Remember file path */
|
||||
|
@ -900,10 +900,10 @@ scconf_block *sc_get_conf_block(sc_context_t *ctx, const char *name1, const char
|
|||
scconf_block **blocks;
|
||||
|
||||
blocks = scconf_find_blocks(ctx->conf, ctx->conf_blocks[i], name1, name2);
|
||||
if (!blocks)
|
||||
return NULL;
|
||||
conf_block = blocks[0];
|
||||
free(blocks);
|
||||
if (blocks != NULL) {
|
||||
conf_block = blocks[0];
|
||||
free(blocks);
|
||||
}
|
||||
if (conf_block != NULL && priority)
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "internal.h"
|
||||
#include <opensc/pkcs15.h>
|
||||
#include <opensc/log.h>
|
||||
#include <opensc/cardctl.h>
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "internal.h"
|
||||
#include <opensc/pkcs15.h>
|
||||
#include <opensc/log.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "internal.h"
|
||||
#include <opensc/pkcs15.h>
|
||||
#include <opensc/log.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "internal.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "internal.h"
|
||||
#include <opensc/pkcs15.h>
|
||||
#include <opensc/cardctl.h>
|
||||
#include <opensc/log.h>
|
||||
|
|
|
@ -349,7 +349,7 @@ static sc_timestamp_t get_current_time(void)
|
|||
curr += tv.tv_usec / 1000;
|
||||
#else
|
||||
struct _timeb time_buf;
|
||||
timestamp_t curr;
|
||||
sc_timestamp_t curr;
|
||||
|
||||
_ftime(&time_buf);
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ OPENSSL_LIB = C:\openssl\out32dll\libeay32.lib
|
|||
PKCS15_INIT = pkcs15-init.exe
|
||||
!ENDIF
|
||||
|
||||
COPTS = /Zi /MD /nologo /DHAVE_CONFIG_H /I$(TOPDIR)\src\include /I$(TOPDIR)\src\include\opensc $(OPENSSL_INCL_DIR) $(LIBLTDL_INCL) /D_WIN32_WINNT=0x0400 $(OPENSSL_DEF)
|
||||
COPTS = /D_CRT_SECURE_NO_DEPRECATE /Zi /MD /nologo /DHAVE_CONFIG_H /I$(TOPDIR)\src\include /I$(TOPDIR)\src\include\opensc $(OPENSSL_INCL_DIR) $(LIBLTDL_INCL) /D_WIN32_WINNT=0x0400 $(OPENSSL_DEF)
|
||||
LINKFLAGS = /DEBUG /NOLOGO /INCREMENTAL:NO /MACHINE:IX86
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ TARGET = version.res
|
|||
|
||||
VERSION_RC = version.rc
|
||||
|
||||
RSC_PROJ=/l 0x809 /fo"version.res"
|
||||
RSC_PROJ=/l 0x809 /r /fo"version.res"
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
|
|
|
@ -1,7 +1,17 @@
|
|||
#ifdef APSTUDIO_INVOKED
|
||||
#define APSTUDIO_HIDDEN_SYMBOLS // Ignore following symbols
|
||||
#endif
|
||||
|
||||
#ifndef WINVER
|
||||
#define WINVER 0x0400 // default to Windows Version 4 (NT 4)
|
||||
#endif
|
||||
|
||||
#include <winresrc.h>
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#undef APSTUDIO_HIDDEN_SYMBOLS
|
||||
#endif
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
#include "afxres.h"
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG)
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
|
||||
|
|
Loading…
Reference in New Issue