Fix MSVC compile issues

This commit is contained in:
Wilson Snyder 2010-04-10 06:46:24 -04:00
parent ef51de72c9
commit 57d00946be
8 changed files with 16 additions and 8 deletions

View File

@ -260,10 +260,10 @@ void VerilatedVcd::bufferFlush () {
if (VL_UNLIKELY(!isOpen())) return;
char* wp = m_wrBufp;
while (1) {
size_t remaining = (m_writep - wp);
ssize_t remaining = (m_writep - wp);
if (remaining==0) break;
errno = 0;
int got = write (m_fd, wp, remaining);
ssize_t got = write (m_fd, wp, remaining);
if (got>0) {
wp += got;
m_wroteBytes += got;

View File

@ -146,6 +146,14 @@ typedef unsigned __int32 vluint32_t; ///< 32-bit unsigned type
typedef signed __int64 vlsint64_t; ///< 64-bit signed type
typedef unsigned __int64 vluint64_t; ///< 64-bit unsigned type
# ifndef _SSIZE_T_DEFINED
# ifdef _WIN64
typedef signed __int64 ssize_t; ///< signed size_t; returned from read()
# else
typedef signed __int32 ssize_t; ///< signed size_t; returned from read()
# endif
# endif
#else // Linux or compliant Unix flavors, -m64
# include <stdint.h> // Linux and most flavors

View File

@ -14,7 +14,7 @@
//*************************************************************************
#include <cstdio>
#include <svdpi.h>
#include "svdpi.h"
//======================================================================

View File

@ -14,7 +14,7 @@
//*************************************************************************
#include <cstdio>
#include <svdpi.h>
#include "svdpi.h"
//======================================================================

View File

@ -14,8 +14,8 @@
//*************************************************************************
#include <cstdio>
#include <svdpi.h>
#include <cstring>
#include "svdpi.h"
#ifdef _WIN32
# define T_PRI64 "I64"

View File

@ -15,7 +15,7 @@
#include <cstdio>
#include <cstring>
#include <svdpi.h>
#include "svdpi.h"
//======================================================================

View File

@ -14,7 +14,7 @@
//*************************************************************************
#include <cstdio>
#include <svdpi.h>
#include "svdpi.h"
//======================================================================

View File

@ -14,7 +14,7 @@
//*************************************************************************
#include <cstdio>
#include <svdpi.h>
#include "svdpi.h"
//======================================================================