Small changes, e.g. _MS_VER macro, added to allow compilation of tclspice with MS VC++ 2008
This commit is contained in:
parent
ee349375bd
commit
3dc3d42553
|
|
@ -1,3 +1,6 @@
|
||||||
|
2008-10-05 Holger Vogt
|
||||||
|
* Macros added to allow compilation of tclspice with MS Visual C++ 2008
|
||||||
|
|
||||||
2008-09-24 Holger Vogt
|
2008-09-24 Holger Vogt
|
||||||
* wstdio.h, scalb.c, complex.h
|
* wstdio.h, scalb.c, complex.h
|
||||||
Small changes to allow compilation with MS Visual C++ 2008
|
Small changes to allow compilation with MS Visual C++ 2008
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,10 @@
|
||||||
#include "vectors.h"
|
#include "vectors.h"
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#define strcasecmp _stricmp
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct measure
|
typedef struct measure
|
||||||
{
|
{
|
||||||
char *result;
|
char *result;
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ $Id$
|
||||||
#include "variable.h"
|
#include "variable.h"
|
||||||
#include "cktdefs.h"
|
#include "cktdefs.h"
|
||||||
|
|
||||||
|
/* not apply top directory searcpath because config.h should not be used */
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#include "../misc/misc_time.h" /* timediff */
|
#include "../misc/misc_time.h" /* timediff */
|
||||||
#else
|
#else
|
||||||
|
|
@ -36,7 +37,12 @@ $Id$
|
||||||
/* gtri - end - 12/12/90 */
|
/* gtri - end - 12/12/90 */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAS_WINDOWS
|
/* We might compile for Windows, but only as a console application (e.g. tcl) */
|
||||||
|
#if defined (HAS_WINDOWS) || defined(__MINGW32) || defined(_MSC_VER)
|
||||||
|
#define HAVE_WIN32
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_WIN32
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
/* At least Windows 2000 is needed
|
/* At least Windows 2000 is needed
|
||||||
* Undefine _WIN32_WINNT 0x0500 if you want to compile under Windows ME
|
* Undefine _WIN32_WINNT 0x0500 if you want to compile under Windows ME
|
||||||
|
|
@ -65,7 +71,7 @@ $Id$
|
||||||
static void printres(char *name);
|
static void printres(char *name);
|
||||||
static void fprintmem(FILE* stream, unsigned long int memory);
|
static void fprintmem(FILE* stream, unsigned long int memory);
|
||||||
|
|
||||||
#if defined(HAS_WINDOWS) || defined(HAVE__PROC_MEMINFO)
|
#if defined(HAVE_WIN32) || defined(HAVE__PROC_MEMINFO)
|
||||||
static size_t get_procm(struct proc_mem *memall);
|
static size_t get_procm(struct proc_mem *memall);
|
||||||
static size_t get_sysmem(struct sys_mem *memall);
|
static size_t get_sysmem(struct sys_mem *memall);
|
||||||
|
|
||||||
|
|
@ -83,7 +89,7 @@ char *enddata;
|
||||||
void
|
void
|
||||||
init_rlimits(void)
|
init_rlimits(void)
|
||||||
{
|
{
|
||||||
# if defined(HAS_WINDOWS) || defined(HAVE__PROC_MEMINFO)
|
# if defined(HAVE_WIN32) || defined(HAVE__PROC_MEMINFO)
|
||||||
get_procm(&mem_ng);
|
get_procm(&mem_ng);
|
||||||
get_sysmem(&mem_t);
|
get_sysmem(&mem_t);
|
||||||
# else
|
# else
|
||||||
|
|
@ -142,7 +148,7 @@ ft_ckspace(void)
|
||||||
{
|
{
|
||||||
unsigned long int usage, limit;
|
unsigned long int usage, limit;
|
||||||
|
|
||||||
#if defined(HAS_WINDOWS) || defined(HAVE__PROC_MEMINFO)
|
#if defined(HAVE_WIN32) || defined(HAVE__PROC_MEMINFO)
|
||||||
get_procm(&mem_ng_act);
|
get_procm(&mem_ng_act);
|
||||||
usage = mem_ng_act.size*1024;
|
usage = mem_ng_act.size*1024;
|
||||||
limit = mem_t.free;
|
limit = mem_t.free;
|
||||||
|
|
@ -259,7 +265,7 @@ printres(char *name)
|
||||||
lastusec -= 1000;
|
lastusec -= 1000;
|
||||||
lastsec += 1;
|
lastsec += 1;
|
||||||
}
|
}
|
||||||
#ifndef HAS_WINDOWS
|
#ifndef HAVE_WIN32
|
||||||
fprintf(cp_out, "%s time since last call: %lu.%03lu seconds.\n",
|
fprintf(cp_out, "%s time since last call: %lu.%03lu seconds.\n",
|
||||||
cpu_elapsed, lastsec, lastusec);
|
cpu_elapsed, lastsec, lastusec);
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -316,7 +322,7 @@ printres(char *name)
|
||||||
# endif /* HAVE_GETRLIMIT */
|
# endif /* HAVE_GETRLIMIT */
|
||||||
#endif /* ipsc */
|
#endif /* ipsc */
|
||||||
|
|
||||||
#if defined(HAS_WINDOWS) || defined(HAVE__PROC_MEMINFO)
|
#if defined(HAVE_WIN32) || defined(HAVE__PROC_MEMINFO)
|
||||||
|
|
||||||
get_procm(&mem_ng_act);
|
get_procm(&mem_ng_act);
|
||||||
get_sysmem(&mem_t_act);
|
get_sysmem(&mem_t_act);
|
||||||
|
|
@ -450,7 +456,7 @@ fprintmem(FILE* stream, unsigned long int memory) {
|
||||||
fprintf(stream, "%lu bytes", memory);
|
fprintf(stream, "%lu bytes", memory);
|
||||||
}
|
}
|
||||||
|
|
||||||
# if defined(HAS_WINDOWS) || defined(HAVE__PROC_MEMINFO)
|
# if defined(HAVE_WIN32) || defined(HAVE__PROC_MEMINFO)
|
||||||
|
|
||||||
static size_t get_procm(struct proc_mem *memall) {
|
static size_t get_procm(struct proc_mem *memall) {
|
||||||
#ifdef HAS_WINDOWS
|
#ifdef HAS_WINDOWS
|
||||||
|
|
@ -508,7 +514,7 @@ static size_t get_procm(struct proc_mem *memall) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static size_t get_sysmem(struct sys_mem *memall) {
|
static size_t get_sysmem(struct sys_mem *memall) {
|
||||||
#ifdef HAS_WINDOWS
|
#ifdef HAVE_WIN32
|
||||||
#if ( _WIN32_WINNT >= 0x0500)
|
#if ( _WIN32_WINNT >= 0x0500)
|
||||||
MEMORYSTATUSEX ms;
|
MEMORYSTATUSEX ms;
|
||||||
ms.dwLength = sizeof(MEMORYSTATUSEX);
|
ms.dwLength = sizeof(MEMORYSTATUSEX);
|
||||||
|
|
@ -601,7 +607,7 @@ fault(void)
|
||||||
static void *
|
static void *
|
||||||
baseaddr(void)
|
baseaddr(void)
|
||||||
{
|
{
|
||||||
#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(HAS_WINDOWS) || defined(__APPLE__)
|
#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(HAVE_WIN32) || defined(__APPLE__)
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
#else
|
||||||
char *low, *high, *at;
|
char *low, *high, *at;
|
||||||
|
|
|
||||||
|
|
@ -139,6 +139,17 @@ struct timeb timebegin;
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined (_MSC_VER)
|
||||||
|
#define strdup _strdup
|
||||||
|
#define unlink _unlink
|
||||||
|
#define fileno _fileno
|
||||||
|
#define getcwd _getcwd
|
||||||
|
#define isnan _isnan
|
||||||
|
#define finite _finite
|
||||||
|
#define scalb _scalb
|
||||||
|
//#define logb _logb /* not available in spsmp.c */
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_RANDOM
|
#ifndef HAVE_RANDOM
|
||||||
#define srandom(a) srand(a)
|
#define srandom(a) srand(a)
|
||||||
#define random rand
|
#define random rand
|
||||||
|
|
@ -159,10 +170,6 @@ struct timeb timebegin;
|
||||||
#define HUGE HUGE_VAL
|
#define HUGE HUGE_VAL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined (_MSC_VER)
|
|
||||||
#define finite _finite
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern char *gettok(char **s);
|
extern char *gettok(char **s);
|
||||||
extern char *gettok_noparens(char **s);
|
extern char *gettok_noparens(char **s);
|
||||||
extern char *gettok_node(char **s);
|
extern char *gettok_node(char **s);
|
||||||
|
|
@ -219,7 +226,9 @@ extern int tcl_printf(const char *format, ...);
|
||||||
extern int tcl_fprintf(FILE *f, const char *format, ...);
|
extern int tcl_fprintf(FILE *f, const char *format, ...);
|
||||||
|
|
||||||
#undef printf
|
#undef printf
|
||||||
|
//#undef fprintf
|
||||||
#define printf tcl_printf
|
#define printf tcl_printf
|
||||||
|
//#define fprintf tcl_fprintf
|
||||||
|
|
||||||
#undef perror
|
#undef perror
|
||||||
#define perror(string) fprintf(stderr,"%s: %s\n",string,sys_errlist[errno])
|
#define perror(string) fprintf(stderr,"%s: %s\n",string,sys_errlist[errno])
|
||||||
|
|
|
||||||
|
|
@ -97,16 +97,6 @@ int fp_u_t_char(int __c);
|
||||||
#define fgetchar fg_e_t_char
|
#define fgetchar fg_e_t_char
|
||||||
#define fputchar fp_u_t_char
|
#define fputchar fp_u_t_char
|
||||||
|
|
||||||
#if defined (_MSC_VER)
|
|
||||||
#define strdup _strdup
|
|
||||||
#define unlink _unlink
|
|
||||||
#define fileno _fileno
|
|
||||||
#define getcwd _getcwd
|
|
||||||
#define isnan _isnan
|
|
||||||
|
|
||||||
#define scalb _scalb
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
||||||
10
src/main.c
10
src/main.c
|
|
@ -996,7 +996,7 @@ bot:
|
||||||
current algorithm is uniform at the expense of a little
|
current algorithm is uniform at the expense of a little
|
||||||
startup time. */
|
startup time. */
|
||||||
FILE *tempfile;
|
FILE *tempfile;
|
||||||
#ifdef HAS_WINDOWS
|
#if defined(HAS_WINDOWS) || defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
char *tpf; /* temporary file */
|
char *tpf; /* temporary file */
|
||||||
char *dname = NULL; /* directory of input file*/
|
char *dname = NULL; /* directory of input file*/
|
||||||
bool has_smk = FALSE;
|
bool has_smk = FALSE;
|
||||||
|
|
@ -1004,7 +1004,7 @@ bot:
|
||||||
tempfile = tmpfile();
|
tempfile = tmpfile();
|
||||||
/* tmpfile() returns NULL, if in MS Windows as non admin user
|
/* tmpfile() returns NULL, if in MS Windows as non admin user
|
||||||
then we add a tempfile in the local directory */
|
then we add a tempfile in the local directory */
|
||||||
#ifdef HAS_WINDOWS
|
#if defined(HAS_WINDOWS) || defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
if (tempfile == NULL) {
|
if (tempfile == NULL) {
|
||||||
tpf = smktemp("sp");
|
tpf = smktemp("sp");
|
||||||
tempfile = fopen(tpf, "w+b");
|
tempfile = fopen(tpf, "w+b");
|
||||||
|
|
@ -1031,7 +1031,7 @@ bot:
|
||||||
err = 1;
|
err = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#ifdef HAS_WINDOWS
|
#if defined(HAS_WINDOWS) || defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
/* Copy the input file name which otherwise will be lost due to the
|
/* Copy the input file name which otherwise will be lost due to the
|
||||||
temporary file */
|
temporary file */
|
||||||
dname = copy(arg);
|
dname = copy(arg);
|
||||||
|
|
@ -1042,7 +1042,7 @@ bot:
|
||||||
fseek(tempfile, (long) 0, 0);
|
fseek(tempfile, (long) 0, 0);
|
||||||
|
|
||||||
if (tempfile && (!err || !ft_batchmode)) {
|
if (tempfile && (!err || !ft_batchmode)) {
|
||||||
#ifdef HAS_WINDOWS
|
#if defined(HAS_WINDOWS) || defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
/* Copy the input file name for adding another file search path */
|
/* Copy the input file name for adding another file search path */
|
||||||
inp_spsource(tempfile, FALSE, dname);
|
inp_spsource(tempfile, FALSE, dname);
|
||||||
tfree(dname);
|
tfree(dname);
|
||||||
|
|
@ -1051,7 +1051,7 @@ bot:
|
||||||
#endif
|
#endif
|
||||||
gotone = TRUE;
|
gotone = TRUE;
|
||||||
}
|
}
|
||||||
#ifdef HAS_WINDOWS
|
#if defined(HAS_WINDOWS) || defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
if (tempfile && has_smk) {
|
if (tempfile && has_smk) {
|
||||||
if (remove(tpf))
|
if (remove(tpf))
|
||||||
perror("Could not delete temp file");
|
perror("Could not delete temp file");
|
||||||
|
|
|
||||||
|
|
@ -188,7 +188,7 @@ basename(const char *name)
|
||||||
return base;
|
return base;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAS_WINDOWS
|
#if defined(HAS_WINDOWS) || defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
/* allow back slashes \\ */
|
/* allow back slashes \\ */
|
||||||
char *
|
char *
|
||||||
dirname(const char *name)
|
dirname(const char *name)
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
#ifdef XSPICE
|
#ifdef XSPICE
|
||||||
/*saj headers for xspice*/
|
/*saj headers for xspice*/
|
||||||
#include <string.h> /* for strcpy, strcat*/
|
#include <string.h> /* for strcpy, strcat*/
|
||||||
#if (!defined HAS_WINDOWS) && (!defined __MINGW32__)
|
#if (!defined HAS_WINDOWS) && (!defined __MINGW32__) && (!defined _MSC_VER)
|
||||||
#include <dlfcn.h> /* to load libraries*/
|
#include <dlfcn.h> /* to load libraries*/
|
||||||
#else /* ifdef HAS_WINDOWS */
|
#else /* ifdef HAS_WINDOWS */
|
||||||
#undef BOOLEAN
|
#undef BOOLEAN
|
||||||
|
|
@ -485,7 +485,7 @@ int load_opus(char *name){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__MINGW32__) || defined(HAS_WINDOWS)
|
#if defined(__MINGW32__) || defined(HAS_WINDOWS) || defined(_MSC_VER)
|
||||||
|
|
||||||
void *dlopen(const char *name,int type)
|
void *dlopen(const char *name,int type)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,12 @@
|
||||||
#define TCLSPICE_name "spice"
|
#define TCLSPICE_name "spice"
|
||||||
#define TCLSPICE_prefix "spice::"
|
#define TCLSPICE_prefix "spice::"
|
||||||
#define TCLSPICE_namespace "spice"
|
#define TCLSPICE_namespace "spice"
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#define TCLSPICE_version "17.1"
|
||||||
|
#define STDIN_FILENO 0
|
||||||
|
#define STDOUT_FILENO 1
|
||||||
|
#define STDERR_FILENO 2
|
||||||
|
#endif
|
||||||
|
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
/* Header files for C functions */
|
/* Header files for C functions */
|
||||||
|
|
@ -22,7 +28,7 @@
|
||||||
/*Use Tcl threads if on W32 without pthreads*/
|
/*Use Tcl threads if on W32 without pthreads*/
|
||||||
#ifndef HAVE_LIBPTHREAD
|
#ifndef HAVE_LIBPTHREAD
|
||||||
|
|
||||||
#ifdef __MINGW32__
|
#if defined(__MINGW32__) || defined(_MSC_VER)
|
||||||
|
|
||||||
#define mutex_lock(a) Tcl_MutexLock(a)
|
#define mutex_lock(a) Tcl_MutexLock(a)
|
||||||
#define mutex_unlock(a) Tcl_MutexUnlock(a)
|
#define mutex_unlock(a) Tcl_MutexUnlock(a)
|
||||||
|
|
@ -52,7 +58,7 @@ typedef pthread_t threadId_t;
|
||||||
#ifdef HAVE_STRING_H
|
#ifdef HAVE_STRING_H
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#endif /* HAVE_STRING_H */
|
#endif /* HAVE_STRING_H */
|
||||||
#ifdef __MINGW32__
|
#if defined(__MINGW32__)
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
/* remove type incompatibility with winnt.h*/
|
/* remove type incompatibility with winnt.h*/
|
||||||
#undef BOOLEAN
|
#undef BOOLEAN
|
||||||
|
|
@ -61,6 +67,14 @@ typedef pthread_t threadId_t;
|
||||||
#ifndef srandom
|
#ifndef srandom
|
||||||
#define srandom(a) srand(a) /* srandom */
|
#define srandom(a) srand(a) /* srandom */
|
||||||
#endif
|
#endif
|
||||||
|
#elif defined(_MSC_VER)
|
||||||
|
#include <stdarg.h>
|
||||||
|
/* remove type incompatibility with winnt.h*/
|
||||||
|
#undef BOOLEAN
|
||||||
|
#include <windows.h> /* Sleep */
|
||||||
|
#ifndef srandom
|
||||||
|
#define srandom(a) srand(a) /* srandom */
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#include <unistd.h> /* usleep */
|
#include <unistd.h> /* usleep */
|
||||||
#endif /* __MINGW32__ */
|
#endif /* __MINGW32__ */
|
||||||
|
|
@ -74,10 +88,14 @@ typedef pthread_t threadId_t;
|
||||||
#include <spicelib/analysis/analysis.h>
|
#include <spicelib/analysis/analysis.h>
|
||||||
#include <misc/ivars.h>
|
#include <misc/ivars.h>
|
||||||
#include <frontend/resource.h>
|
#include <frontend/resource.h>
|
||||||
|
#ifndef _MSC_VER /* avoid second definition of VT_BOOL */
|
||||||
#include <frontend/variable.h>
|
#include <frontend/variable.h>
|
||||||
|
#else
|
||||||
|
#include <stdio.h>
|
||||||
|
#define snprintf _snprintf
|
||||||
|
#endif
|
||||||
#include <frontend/outitf.h>
|
#include <frontend/outitf.h>
|
||||||
#include <memory.h>
|
#include <memory.h>
|
||||||
|
|
||||||
#include <frontend/com_measure2.h>
|
#include <frontend/com_measure2.h>
|
||||||
|
|
||||||
#ifndef HAVE_GETRUSAGE
|
#ifndef HAVE_GETRUSAGE
|
||||||
|
|
@ -117,6 +135,10 @@ extern JMP_BUF jbuf;
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#define S_IRWXU _S_IWRITE
|
||||||
|
#endif
|
||||||
|
|
||||||
//#include <stdarg.h> /* for va_copy() */
|
//#include <stdarg.h> /* for va_copy() */
|
||||||
|
|
||||||
extern IFfrontEnd nutmeginfo;
|
extern IFfrontEnd nutmeginfo;
|
||||||
|
|
@ -155,7 +177,7 @@ do {\
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
/*helper function*/
|
/*helper function*/
|
||||||
inline static struct plot * get_plot(int plot){
|
/*inline*/ static struct plot * get_plot(int plot){
|
||||||
struct plot *pl;
|
struct plot *pl;
|
||||||
pl = plot_list;
|
pl = plot_list;
|
||||||
for(;0 < plot;plot--){
|
for(;0 < plot;plot--){
|
||||||
|
|
@ -428,6 +450,7 @@ static int vectoblt TCL_CMDPROCARGS(clientData,interp,argc,argv) {
|
||||||
char *realBlt, *imagBlt, *var;
|
char *realBlt, *imagBlt, *var;
|
||||||
struct dvec *var_dvec;
|
struct dvec *var_dvec;
|
||||||
double *realData, *compData;
|
double *realData, *compData;
|
||||||
|
int compIndex; //index to loop inside the vectors' data
|
||||||
|
|
||||||
if (argc < 3 || argc > 4){
|
if (argc < 3 || argc > 4){
|
||||||
Tcl_SetResult(interp, "Wrong # args. spice::vectoblt spice_variable real_bltVector [imag_bltVector]",TCL_STATIC);
|
Tcl_SetResult(interp, "Wrong # args. spice::vectoblt spice_variable real_bltVector [imag_bltVector]",TCL_STATIC);
|
||||||
|
|
@ -458,7 +481,7 @@ static int vectoblt TCL_CMDPROCARGS(clientData,interp,argc,argv) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*If data is complex, it is harder (more complex :) to export...*/
|
/*If data is complex, it is harder (more complex :) to export...*/
|
||||||
int compIndex; //index to loop inside the vectors' data
|
// int compIndex; //index to loop inside the vectors' data
|
||||||
if (var_dvec->v_realdata==NULL){
|
if (var_dvec->v_realdata==NULL){
|
||||||
if (var_dvec->v_compdata==NULL){
|
if (var_dvec->v_compdata==NULL){
|
||||||
Tcl_SetResult(interp, "The vector contains no data",TCL_STATIC);
|
Tcl_SetResult(interp, "The vector contains no data",TCL_STATIC);
|
||||||
|
|
@ -591,7 +614,7 @@ static int _thread_stop(){
|
||||||
while(!fl_exited && timeout < 100){
|
while(!fl_exited && timeout < 100){
|
||||||
ft_intrpt = TRUE;
|
ft_intrpt = TRUE;
|
||||||
timeout++;
|
timeout++;
|
||||||
#ifdef __MINGW32__
|
#if defined(__MINGW32__) || defined(_MSC_VER)
|
||||||
Sleep(10); /* va: windows native */
|
Sleep(10); /* va: windows native */
|
||||||
#else
|
#else
|
||||||
usleep(10000);
|
usleep(10000);
|
||||||
|
|
@ -2089,7 +2112,7 @@ static int tmeasure TCL_CMDPROCARGS(clientData,interp,argc,argv){
|
||||||
/* Initialise spice and setup native methods */
|
/* Initialise spice and setup native methods */
|
||||||
/*******************************************************/
|
/*******************************************************/
|
||||||
|
|
||||||
#ifdef __MINGW32__
|
#if defined(__MINGW32__) || defined(_MSC_VER)
|
||||||
__declspec(dllexport)
|
__declspec(dllexport)
|
||||||
#endif
|
#endif
|
||||||
int Spice_Init(Tcl_Interp *interp) {
|
int Spice_Init(Tcl_Interp *interp) {
|
||||||
|
|
@ -2101,7 +2124,7 @@ int Spice_Init(Tcl_Interp *interp) {
|
||||||
return TCL_ERROR;
|
return TCL_ERROR;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Tcl_PkgProvide(interp, (char*)TCLSPICE_name, (char*)TCLSPICE_version);
|
Tcl_PkgProvide(interp, (char*) TCLSPICE_name, (char*) TCLSPICE_version);
|
||||||
|
|
||||||
Tcl_Eval(interp, "namespace eval " TCLSPICE_namespace " { }");
|
Tcl_Eval(interp, "namespace eval " TCLSPICE_namespace " { }");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue