Browse Source

VC++ 2008 compatibility

pre-master-46
h_vogt 18 years ago
parent
commit
73e581f015
  1. 5
      ChangeLog
  2. 8
      src/include/wstdio.h
  3. 9
      src/maths/misc/scalb.c
  4. 1
      xgraph/.cvsignore

5
ChangeLog

@ -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

8
src/include/wstdio.h

@ -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
/*----------------------------------------------------------------------------*/

9
src/maths/misc/scalb.c

@ -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 */

1
xgraph/.cvsignore

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

Loading…
Cancel
Save