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
+7 -1
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
/*----------------------------------------------------------------------------*/
+8 -1
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 */