msvcrt: Convert the open functions to use MS ABI varargs.

This commit is contained in:
Alexandre Julliard 2009-01-02 21:46:24 +01:00
parent f8de2ebb0b
commit dd34f924be
1 changed files with 13 additions and 13 deletions

View File

@ -1418,7 +1418,7 @@ int CDECL MSVCRT__pipe(int *pfds, unsigned int psize, int textmode)
*/
int CDECL MSVCRT__sopen( const char *path, int oflags, int shflags, ... )
{
va_list ap;
__ms_va_list ap;
int pmode;
DWORD access = 0, creation = 0, attrib;
DWORD sharing;
@ -1440,9 +1440,9 @@ int CDECL MSVCRT__sopen( const char *path, int oflags, int shflags, ... )
if (oflags & MSVCRT__O_CREAT)
{
va_start(ap, shflags);
pmode = va_arg(ap, int);
va_end(ap);
__ms_va_start(ap, shflags);
pmode = va_arg(ap, int);
__ms_va_end(ap);
if(pmode & ~(MSVCRT__S_IREAD | MSVCRT__S_IWRITE))
FIXME(": pmode 0x%04x ignored\n", pmode);
@ -1516,12 +1516,12 @@ int CDECL MSVCRT__wsopen( const MSVCRT_wchar_t* path, int oflags, int shflags, .
{
const unsigned int len = strlenW(path);
char *patha = MSVCRT_calloc(len + 1,1);
va_list ap;
__ms_va_list ap;
int pmode;
va_start(ap, shflags);
__ms_va_start(ap, shflags);
pmode = va_arg(ap, int);
va_end(ap);
__ms_va_end(ap);
if (patha && WideCharToMultiByte(CP_ACP,0,path,len,patha,len,NULL,NULL))
{
@ -1539,14 +1539,14 @@ int CDECL MSVCRT__wsopen( const MSVCRT_wchar_t* path, int oflags, int shflags, .
*/
int CDECL MSVCRT__open( const char *path, int flags, ... )
{
va_list ap;
__ms_va_list ap;
if (flags & MSVCRT__O_CREAT)
{
int pmode;
va_start(ap, flags);
__ms_va_start(ap, flags);
pmode = va_arg(ap, int);
va_end(ap);
__ms_va_end(ap);
return MSVCRT__sopen( path, flags, MSVCRT__SH_DENYNO, pmode );
}
else
@ -1560,12 +1560,12 @@ int CDECL _wopen(const MSVCRT_wchar_t *path,int flags,...)
{
const unsigned int len = strlenW(path);
char *patha = MSVCRT_calloc(len + 1,1);
va_list ap;
__ms_va_list ap;
int pmode;
va_start(ap, flags);
__ms_va_start(ap, flags);
pmode = va_arg(ap, int);
va_end(ap);
__ms_va_end(ap);
if (patha && WideCharToMultiByte(CP_ACP,0,path,len,patha,len,NULL,NULL))
{