mirror of
https://git.code.sf.net/p/ngspice/ngspice
synced 2026-08-22 05:47:42 +02:00
VC++ 2008 compatibility
This commit is contained in:
@@ -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
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user