- Rename sysdep_timestamp_t to sc_timestamp_t
- Add missing function prototype for sc_current_time git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1384 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
8cf5945900
commit
2b3db944e0
|
@ -178,9 +178,9 @@ extern "C" {
|
|||
|
||||
/* A 64-bit uint, used in sc_current_time() */
|
||||
#ifndef _WIN32
|
||||
typedef unsigned long long sysdep_timestamp_t;
|
||||
typedef unsigned long long sc_timestamp_t;
|
||||
#else
|
||||
typedef unsigned __int64 sysdep_timestamp_t;
|
||||
typedef unsigned __int64 sc_timestamp_t;
|
||||
#endif
|
||||
|
||||
/* Event masks for sc_wait_for_event() */
|
||||
|
@ -603,7 +603,7 @@ int sc_base64_encode(const u8 *in, size_t inlen, u8 *out, size_t outlen,
|
|||
int sc_base64_decode(const char *in, u8 *out, size_t outlen);
|
||||
|
||||
/* Returns the current time in milliseconds */
|
||||
sysdep_timestamp_t sc_current_time();
|
||||
sc_timestamp_t sc_current_time(void);
|
||||
|
||||
/* APDU handling functions */
|
||||
int sc_transmit_apdu(struct sc_card *card, struct sc_apdu *apdu);
|
||||
|
|
|
@ -119,11 +119,11 @@ sc_mutex_free(sc_mutex_t *p)
|
|||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
sysdep_timestamp_t sc_current_time()
|
||||
sc_timestamp_t sc_current_time(void)
|
||||
{
|
||||
struct timeval tv;
|
||||
struct timezone tz;
|
||||
sysdep_timestamp_t curr;
|
||||
sc_timestamp_t curr;
|
||||
|
||||
if (gettimeofday(&tv, &tz) != 0)
|
||||
return 0;
|
||||
|
@ -135,10 +135,10 @@ sysdep_timestamp_t sc_current_time()
|
|||
return curr;
|
||||
}
|
||||
#else
|
||||
sysdep_timestamp_t sc_current_time()
|
||||
sc_timestamp_t sc_current_time(void)
|
||||
{
|
||||
struct _timeb time_buf;
|
||||
sysdep_timestamp_t curr;
|
||||
sc_timestamp_t curr;
|
||||
|
||||
_ftime(&time_buf);
|
||||
|
||||
|
|
|
@ -187,7 +187,7 @@ out: sc_pkcs11_unlock();
|
|||
CK_RV C_GetSlotInfo(CK_SLOT_ID slotID, CK_SLOT_INFO_PTR pInfo)
|
||||
{
|
||||
struct sc_pkcs11_slot *slot;
|
||||
sysdep_timestamp_t now;
|
||||
sc_timestamp_t now;
|
||||
CK_RV rv;
|
||||
|
||||
rv = sc_pkcs11_lock();
|
||||
|
|
|
@ -178,7 +178,7 @@ struct sc_pkcs11_card {
|
|||
struct sc_card *card;
|
||||
struct sc_pkcs11_framework_ops *framework;
|
||||
void *fw_data;
|
||||
sysdep_timestamp_t slot_state_expires;
|
||||
sc_timestamp_t slot_state_expires;
|
||||
|
||||
/* Number of slots owned by this card object */
|
||||
unsigned int num_slots;
|
||||
|
|
Loading…
Reference in New Issue