mirror of
https://github.com/reactos/reactos.git
synced 2024-12-26 17:14:41 +00:00
mingw compatibility fixes
svn path=/trunk/; revision=17443
This commit is contained in:
parent
623af9cd28
commit
595c382dbc
4 changed files with 11 additions and 11 deletions
|
@ -14,8 +14,8 @@
|
||||||
#define nelem(x) ( sizeof(x) / sizeof(x[0]) )
|
#define nelem(x) ( sizeof(x) / sizeof(x[0]) )
|
||||||
#endif//nelem
|
#endif//nelem
|
||||||
|
|
||||||
using File::filesize_t;
|
typedef File::filesize_t filesize_t;
|
||||||
using File::fileoff_t;
|
typedef File::fileoff_t fileoff_t;
|
||||||
|
|
||||||
|
|
||||||
fileoff_t File::seek ( fileoff_t offset )
|
fileoff_t File::seek ( fileoff_t offset )
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
class File
|
class File
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
#ifdef _MSC_VER
|
#ifdef WIN32
|
||||||
typedef __int64 fileoff_t;
|
typedef __int64 fileoff_t;
|
||||||
typedef unsigned __int64 filesize_t;
|
typedef unsigned __int64 filesize_t;
|
||||||
#else//_MSC_VER
|
#else//_MSC_VER
|
||||||
|
|
|
@ -53,7 +53,7 @@ public:
|
||||||
{
|
{
|
||||||
ASSERT ( i < _end );
|
ASSERT ( i < _end );
|
||||||
reserve ( i + 1 );
|
reserve ( i + 1 );
|
||||||
_arr[i].reset ( ptr );
|
_arr[i].reset ( p );
|
||||||
}
|
}
|
||||||
|
|
||||||
void push_back ( auto_ptr<T>& p )
|
void push_back ( auto_ptr<T>& p )
|
||||||
|
|
|
@ -551,7 +551,7 @@ static bool numberfl(std::string& f, long double __n, char exp_sign, int size,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int string(std::string& f, const char* s, int len, int field_width, int precision, int flags)
|
static int stringa(std::string& f, const char* s, int len, int field_width, int precision, int flags)
|
||||||
{
|
{
|
||||||
int i, done = 0;
|
int i, done = 0;
|
||||||
if (s == NULL)
|
if (s == NULL)
|
||||||
|
@ -654,7 +654,7 @@ std::string ssvprintf ( const char *fmt, va_list args )
|
||||||
long double _ldouble;
|
long double _ldouble;
|
||||||
double _double;
|
double _double;
|
||||||
const char *s;
|
const char *s;
|
||||||
const unsigned short* sw;
|
const wchar_t* sw;
|
||||||
int result;
|
int result;
|
||||||
std::string f;
|
std::string f;
|
||||||
|
|
||||||
|
@ -793,12 +793,12 @@ std::string ssvprintf ( const char *fmt, va_list args )
|
||||||
case 's':
|
case 's':
|
||||||
if (qualifier == 'l' || qualifier == 'w') {
|
if (qualifier == 'l' || qualifier == 'w') {
|
||||||
/* print unicode string */
|
/* print unicode string */
|
||||||
sw = va_arg(args, wchar_t *);
|
sw = (const wchar_t*)va_arg(args, wchar_t *);
|
||||||
result = stringw(f, sw, -1, field_width, precision, flags);
|
result = stringw(f, sw, -1, field_width, precision, flags);
|
||||||
} else {
|
} else {
|
||||||
/* print ascii string */
|
/* print ascii string */
|
||||||
s = va_arg(args, char *);
|
s = va_arg(args, char *);
|
||||||
result = string(f, s, -1, field_width, precision, flags);
|
result = stringa(f, s, -1, field_width, precision, flags);
|
||||||
}
|
}
|
||||||
if (result < 0)
|
if (result < 0)
|
||||||
{
|
{
|
||||||
|
@ -811,10 +811,10 @@ std::string ssvprintf ( const char *fmt, va_list args )
|
||||||
if (qualifier == 'h') {
|
if (qualifier == 'h') {
|
||||||
/* print ascii string */
|
/* print ascii string */
|
||||||
s = va_arg(args, char *);
|
s = va_arg(args, char *);
|
||||||
result = string(f, s, -1, field_width, precision, flags);
|
result = stringa(f, s, -1, field_width, precision, flags);
|
||||||
} else {
|
} else {
|
||||||
/* print unicode string */
|
/* print unicode string */
|
||||||
sw = va_arg(args, wchar_t *);
|
sw = (const wchar_t*)va_arg(args, wchar_t *);
|
||||||
result = stringw(f, sw, -1, field_width, precision, flags);
|
result = stringw(f, sw, -1, field_width, precision, flags);
|
||||||
}
|
}
|
||||||
if (result < 0)
|
if (result < 0)
|
||||||
|
@ -846,7 +846,7 @@ std::string ssvprintf ( const char *fmt, va_list args )
|
||||||
s = pas->Buffer;
|
s = pas->Buffer;
|
||||||
len = pas->Length;
|
len = pas->Length;
|
||||||
}
|
}
|
||||||
result = string(f, s, -1, field_width, precision, flags);
|
result = stringa(f, s, -1, field_width, precision, flags);
|
||||||
}
|
}
|
||||||
if (result < 0)
|
if (result < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in a new issue