msvcrt: Rename functions conflicting with mingw headers.

This commit is contained in:
Piotr Caban 2010-03-29 00:00:26 +02:00 committed by Alexandre Julliard
parent 0f01be47ee
commit b90320652d
8 changed files with 32 additions and 31 deletions

View File

@ -962,7 +962,7 @@ int CDECL MSVCRT_fseek(MSVCRT_FILE* file, MSVCRT_long offset, int whence)
/*********************************************************************
* _chsize (MSVCRT.@)
*/
int CDECL _chsize(int fd, MSVCRT_long size)
int CDECL MSVCRT__chsize(int fd, MSVCRT_long size)
{
LONG cur, pos;
HANDLE handle;
@ -2049,7 +2049,7 @@ int CDECL MSVCRT__wstat(const MSVCRT_wchar_t* path, struct MSVCRT__stat * buf)
/*********************************************************************
* _tell (MSVCRT.@)
*/
MSVCRT_long CDECL _tell(int fd)
MSVCRT_long CDECL MSVCRT__tell(int fd)
{
return MSVCRT__lseek(fd, 0, SEEK_CUR);
}
@ -2817,7 +2817,7 @@ MSVCRT_size_t CDECL MSVCRT_fread(void *ptr, MSVCRT_size_t size, MSVCRT_size_t nm
* _wfreopen (MSVCRT.@)
*
*/
MSVCRT_FILE* CDECL _wfreopen(const MSVCRT_wchar_t *path, const MSVCRT_wchar_t *mode, MSVCRT_FILE* file)
MSVCRT_FILE* CDECL MSVCRT__wfreopen(const MSVCRT_wchar_t *path, const MSVCRT_wchar_t *mode, MSVCRT_FILE* file)
{
int open_flags, stream_flags, fd;
@ -2866,7 +2866,7 @@ MSVCRT_FILE* CDECL MSVCRT_freopen(const char *path, const char *mode, MSVCRT_FIL
return NULL;
}
ret = _wfreopen(pathW, modeW, file);
ret = MSVCRT__wfreopen(pathW, modeW, file);
MSVCRT_free(pathW);
MSVCRT_free(modeW);
@ -2902,7 +2902,7 @@ LONG CDECL MSVCRT_ftell(MSVCRT_FILE* file)
/* TODO: just call fgetpos and return lower half of result */
int off=0;
MSVCRT_long pos;
pos = _tell(file->_file);
pos = MSVCRT__tell(file->_file);
if(pos == -1) return -1;
if(file->_bufsiz) {
if( file->_flag & MSVCRT__IOWRT ) {

View File

@ -436,7 +436,7 @@ double CDECL _logb(double num)
/*********************************************************************
* _lrotl (MSVCRT.@)
*/
MSVCRT_ulong CDECL _lrotl(MSVCRT_ulong num, int shift)
MSVCRT_ulong CDECL MSVCRT__lrotl(MSVCRT_ulong num, int shift)
{
shift &= 0x1f;
return (num << shift) | (num >> (32-shift));
@ -445,7 +445,7 @@ MSVCRT_ulong CDECL _lrotl(MSVCRT_ulong num, int shift)
/*********************************************************************
* _lrotr (MSVCRT.@)
*/
MSVCRT_ulong CDECL _lrotr(MSVCRT_ulong num, int shift)
MSVCRT_ulong CDECL MSVCRT__lrotr(MSVCRT_ulong num, int shift)
{
shift &= 0x1f;
return (num >> shift) | (num << (32-shift));
@ -463,7 +463,7 @@ unsigned int CDECL _rotr(unsigned int num, int shift)
/*********************************************************************
* _scalb (MSVCRT.@)
*/
double CDECL _scalb(double num, MSVCRT_long power)
double CDECL MSVCRT__scalb(double num, MSVCRT_long power)
{
/* Note - Can't forward directly as libc expects y as double */
double dblpower = (double)power;

View File

@ -145,7 +145,7 @@ static inline unsigned char *u__strset( unsigned char *s, unsigned char c )
static inline unsigned char *u__strnset( unsigned char *s, unsigned char c, MSVCRT_size_t len )
{
return (unsigned char*) _strnset( (char*)s, c, len );
return (unsigned char*) MSVCRT__strnset( (char*)s, c, len );
}
static inline MSVCRT_size_t u_strcspn( const unsigned char *s, const unsigned char *rej )

View File

@ -744,14 +744,14 @@ int __cdecl MSVCRT__write(int,const void*,unsigned int);
int __cdecl _getch(void);
int __cdecl _ismbblead(unsigned int);
int __cdecl _ismbstrail(const unsigned char* start, const unsigned char* str);
MSVCRT_intptr_t __cdecl _spawnve(int,const char*,const char* const *,const char* const *);
MSVCRT_intptr_t __cdecl _spawnvpe(int,const char*,const char* const *,const char* const *);
MSVCRT_intptr_t __cdecl MSVCRT__spawnve(int,const char*,const char* const *,const char* const *);
MSVCRT_intptr_t __cdecl MSVRT__spawnvpe(int,const char*,const char* const *,const char* const *);
MSVCRT_intptr_t __cdecl _wspawnve(int,const MSVCRT_wchar_t*,const MSVCRT_wchar_t* const *,const MSVCRT_wchar_t* const *);
MSVCRT_intptr_t __cdecl _wspawnvpe(int,const MSVCRT_wchar_t*,const MSVCRT_wchar_t* const *,const MSVCRT_wchar_t* const *);
void __cdecl _searchenv(const char*,const char*,char*);
int __cdecl _getdrive(void);
char* __cdecl _strdup(const char*);
char* __cdecl _strnset(char*,int,MSVCRT_size_t);
char* __cdecl MSVCRT__strnset(char*,int,MSVCRT_size_t);
char* __cdecl _strset(char*,int);
int __cdecl _ungetch(int);
int __cdecl _cputs(const char*);
@ -770,6 +770,7 @@ int __cdecl MSVCRT__dup2(int, int);
int __cdecl MSVCRT__pipe(int *, unsigned int, int);
MSVCRT_wchar_t* __cdecl _wgetenv(const MSVCRT_wchar_t*);
void __cdecl _wsearchenv(const MSVCRT_wchar_t*, const MSVCRT_wchar_t*, MSVCRT_wchar_t*);
MSVCRT_intptr_t __cdecl MSVCRT__spawnvpe(int, const char*, const char* const*, const char* const*);
#endif
#endif /* __WINE_MSVCRT_H */

View File

@ -289,7 +289,7 @@
@ cdecl _chgsign( double )
@ cdecl -i386 -norelay _chkesp()
@ cdecl _chmod(str long) MSVCRT__chmod
@ cdecl _chsize (long long)
@ cdecl _chsize(long long) MSVCRT__chsize
# stub _chsize_s
# stub _chvalidator
# stub _chvalidator_l
@ -587,8 +587,8 @@
@ cdecl _locking(long long long) MSVCRT__locking
@ cdecl _logb( double )
@ cdecl -i386 _longjmpex(ptr long) MSVCRT_longjmp
@ cdecl _lrotl(long long)
@ cdecl _lrotr(long long)
@ cdecl _lrotl(long long) MSVCRT__lrotl
@ cdecl _lrotr(long long) MSVCRT__lrotr
@ cdecl _lsearch(ptr ptr long long ptr)
# stub _lsearch_s
@ cdecl _lseek(long long long) MSVCRT__lseek
@ -792,7 +792,7 @@
@ cdecl -arch=i386 _safe_fdivr()
@ cdecl -arch=i386 _safe_fprem()
@ cdecl -arch=i386 _safe_fprem1()
@ cdecl _scalb( double long)
@ cdecl _scalb(double long) MSVCRT__scalb
# stub _scanf_l
# stub _scanf_s_l
# stub _scprintf
@ -847,9 +847,9 @@
@ varargs _spawnlp(long str str)
@ varargs _spawnlpe(long str str)
@ cdecl _spawnv(long str ptr)
@ cdecl _spawnve(long str ptr ptr)
@ cdecl _spawnve(long str ptr ptr) MSVCRT__spawnve
@ cdecl _spawnvp(long str ptr)
@ cdecl _spawnvpe(long str ptr ptr)
@ cdecl _spawnvpe(long str ptr ptr) MSVCRT__spawnvpe
@ cdecl _splitpath(str ptr ptr ptr ptr) ntdll._splitpath
# stub _splitpath_s
# stub _sprintf_l
@ -883,7 +883,7 @@
# stub _strnicmp_l
@ stub _strnicoll #(str str long)
# stub _strnicoll_l
@ cdecl _strnset(str long long)
@ cdecl _strnset(str long long) MSVCRT__strnset
# stub _strnset_s
@ cdecl _strrev(str)
@ cdecl _strset(str long)
@ -912,7 +912,7 @@
# stub _swscanf_s_l
@ extern _sys_errlist MSVCRT__sys_errlist
@ extern _sys_nerr MSVCRT__sys_nerr
@ cdecl _tell(long)
@ cdecl _tell(long) MSVCRT__tell
@ cdecl -ret64 _telli64(long)
@ cdecl _tempnam(str str)
# stub _tempnam_dbg
@ -1028,7 +1028,7 @@
# stub _wcsnicmp_l
@ stub _wcsnicoll #(wstr wstr long)
# stub _wcsnicoll_l
@ cdecl _wcsnset(wstr long long)
@ cdecl _wcsnset(wstr long long) MSVCRT__wcsnset
# stub _wcsnset_s
@ cdecl _wcsrev(wstr)
@ cdecl _wcsset(wstr long)
@ -1072,7 +1072,7 @@
@ cdecl _wfindnexti64(long ptr) MSVCRT__wfindnexti64
@ cdecl _wfopen(wstr wstr) MSVCRT__wfopen
# stub _wfopen_s
@ cdecl _wfreopen(wstr wstr ptr)
@ cdecl _wfreopen(wstr wstr ptr) MSVCRT__wfreopen
# stub _wfreopen_s
@ cdecl _wfsopen(wstr wstr long) MSVCRT__wfsopen
@ cdecl _wfullpath(ptr wstr long)

View File

@ -612,7 +612,7 @@ MSVCRT_intptr_t CDECL _wexecv(const MSVCRT_wchar_t* name, MSVCRT_wchar_t* const*
*/
MSVCRT_intptr_t CDECL _execv(const char* name, char* const* argv)
{
return _spawnve(MSVCRT__P_OVERLAY, name, (const char* const*) argv, NULL);
return MSVCRT__spawnve(MSVCRT__P_OVERLAY, name, (const char* const*) argv, NULL);
}
/*********************************************************************
@ -633,7 +633,7 @@ MSVCRT_intptr_t CDECL _wexecve(const MSVCRT_wchar_t* name, MSVCRT_wchar_t* const
*/
MSVCRT_intptr_t CDECL MSVCRT__execve(const char* name, char* const* argv, const char* const* envv)
{
return _spawnve(MSVCRT__P_OVERLAY, name, (const char* const*) argv, envv);
return MSVCRT__spawnve(MSVCRT__P_OVERLAY, name, (const char* const*) argv, envv);
}
/*********************************************************************
@ -654,7 +654,7 @@ MSVCRT_intptr_t CDECL _wexecvpe(const MSVCRT_wchar_t* name, MSVCRT_wchar_t* cons
*/
MSVCRT_intptr_t CDECL _execvpe(const char* name, char* const* argv, const char* const* envv)
{
return _spawnvpe(MSVCRT__P_OVERLAY, name, (const char* const*) argv, envv);
return MSVCRT__spawnvpe(MSVCRT__P_OVERLAY, name, (const char* const*) argv, envv);
}
/*********************************************************************
@ -894,7 +894,7 @@ MSVCRT_intptr_t CDECL _spawnlpe(int flags, const char* name, const char* arg0, .
* Like on Windows, this function does not handle arguments with spaces
* or double-quotes.
*/
MSVCRT_intptr_t CDECL _spawnve(int flags, const char* name, const char* const* argv,
MSVCRT_intptr_t CDECL MSVCRT__spawnve(int flags, const char* name, const char* const* argv,
const char* const* envv)
{
MSVCRT_wchar_t *nameW, *args, *envs;
@ -942,7 +942,7 @@ MSVCRT_intptr_t CDECL _wspawnve(int flags, const MSVCRT_wchar_t* name, const MSV
*/
MSVCRT_intptr_t CDECL _spawnv(int flags, const char* name, const char* const* argv)
{
return _spawnve(flags, name, argv, NULL);
return MSVCRT__spawnve(flags, name, argv, NULL);
}
/*********************************************************************
@ -961,7 +961,7 @@ MSVCRT_intptr_t CDECL _wspawnv(int flags, const MSVCRT_wchar_t* name, const MSVC
* Like on Windows, this function does not handle arguments with spaces
* or double-quotes.
*/
MSVCRT_intptr_t CDECL _spawnvpe(int flags, const char* name, const char* const* argv,
MSVCRT_intptr_t CDECL MSVCRT__spawnvpe(int flags, const char* name, const char* const* argv,
const char* const* envv)
{
MSVCRT_wchar_t *nameW, *args, *envs;
@ -1009,7 +1009,7 @@ MSVCRT_intptr_t CDECL _wspawnvpe(int flags, const MSVCRT_wchar_t* name, const MS
*/
MSVCRT_intptr_t CDECL _spawnvp(int flags, const char* name, const char* const* argv)
{
return _spawnvpe(flags, name, argv, NULL);
return MSVCRT__spawnvpe(flags, name, argv, NULL);
}
/*********************************************************************

View File

@ -49,7 +49,7 @@ char* CDECL _strdup(const char* str)
/*********************************************************************
* _strnset (MSVCRT.@)
*/
char* CDECL _strnset(char* str, int value, MSVCRT_size_t len)
char* CDECL MSVCRT__strnset(char* str, int value, MSVCRT_size_t len)
{
if (len > 0 && str)
while (*str && len--)

View File

@ -57,7 +57,7 @@ INT CDECL _wcsicoll( const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* str2 )
/*********************************************************************
* _wcsnset (MSVCRT.@)
*/
MSVCRT_wchar_t* CDECL _wcsnset( MSVCRT_wchar_t* str, MSVCRT_wchar_t c, MSVCRT_size_t n )
MSVCRT_wchar_t* CDECL MSVCRT__wcsnset( MSVCRT_wchar_t* str, MSVCRT_wchar_t c, MSVCRT_size_t n )
{
MSVCRT_wchar_t* ret = str;
while ((n-- > 0) && *str) *str++ = c;