VC++ 2008 compatibility

This commit is contained in:
h_vogt 2008-09-23 22:10:56 +00:00
parent 4b055a4ca8
commit 73e581f015
4 changed files with 21 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2008-09-24 Holger Vogt
* wstdio.h, scalb.c, complex.h
Small changes to allow compilation with MS Visual C++ 2008
main.c, util.c: path of *.cir input file as search path for .include files (Windows only)
2008-09-22 Holger Vogt
* complex.h, measure.c, resource.c, windisp.c, xpressn.c, rawfile.c, runcoms.c, readhelp.c,
defines.h, ngspice.h, b4soild.c, hsm1eval102.c, hsm1eval112.c, hsm1eval120.c, wstdio.h

View File

@ -43,8 +43,11 @@ int vfp_r_i_n_t_f(FILE * __stream, const char * __format, void * __arglist);
/*int vfs_c_a_n_f(FILE * __stream, const char * __format, void * __arglist);*/
int vp_r_i_n_t_f(const char * __format, void * __arglist);
/*int vs_c_a_n_f(const char * __format, void * __arglist); */
#ifdef _MSC_VER
#ifdef _MSC_VER
/* VC++ 2008 */
_CRTIMP int __cdecl read(int fd, _Out_bytecap_(_MaxCharCount) void * __buf, _In_ unsigned int __n);
/* VC++ 2005 */
//_CRTIMP int __cdecl read(int fd, void * __buf, unsigned int __n);
#else
int r_e_a_d(int fd, char * __buf, int __n);
#endif
@ -100,6 +103,9 @@ int fp_u_t_char(int __c);
#define fileno _fileno
#define getcwd _getcwd
#define isnan _isnan
#define scalb _scalb
#endif
/*----------------------------------------------------------------------------*/

View File

@ -7,7 +7,7 @@ Copyright 1991 Regents of the University of California. All rights reserved.
#ifndef HAVE_SCALB
# ifdef HAVE_SCALBN
# define scalb scalbn
#else /* Chris Inbody */
# else /* Chris Inbody */
double
scalb(double x, int n)
@ -30,5 +30,12 @@ scalb(double x, int n)
}
# endif /* HAVE_SCALBN */
#else /* HAVE_SCALB */
# ifndef HAVE_SCALBN
extern scalb(double x, long n);
scalbn(double x, int n)
{
return scalb(x, (long)n);
}
# endif
int Dummy_Symbol_1;
#endif /* HAVE_SCALB */

View File

@ -1,4 +1,5 @@
Makefile
Makefile.in
.deps
autoconf.h
*.cache