mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 508905 - /Zc:wchar_t- is no longer required (wince part) r=doug.turner
--HG-- extra : rebase_source : 13d6dadb676ca5e29b7e7bcfff5bbb1c964f78e4
This commit is contained in:
parent
07bde20ee7
commit
f2c3c460bb
@ -159,8 +159,8 @@ getenv(const char* name)
|
||||
}
|
||||
|
||||
char
|
||||
GetEnvironmentVariableW(const unsigned short* lpName,
|
||||
unsigned short* lpBuffer,
|
||||
GetEnvironmentVariableW(const WCHAR* lpName,
|
||||
WCHAR* lpBuffer,
|
||||
unsigned long nSize)
|
||||
{
|
||||
char key[256];
|
||||
@ -180,8 +180,8 @@ GetEnvironmentVariableW(const unsigned short* lpName,
|
||||
}
|
||||
|
||||
char
|
||||
SetEnvironmentVariableW(const unsigned short* name,
|
||||
const unsigned short* value)
|
||||
SetEnvironmentVariableW(const WCHAR* name,
|
||||
const WCHAR* value)
|
||||
{
|
||||
char key[256];
|
||||
char val[256];
|
||||
@ -204,8 +204,8 @@ SetEnvironmentVariableW(const unsigned short* name,
|
||||
}
|
||||
|
||||
|
||||
unsigned int ExpandEnvironmentStringsW(const unsigned short* lpSrc,
|
||||
unsigned short* lpDst,
|
||||
unsigned int ExpandEnvironmentStringsW(const WCHAR* lpSrc,
|
||||
WCHAR* lpDst,
|
||||
unsigned int nSize)
|
||||
{
|
||||
if ( NULL == lpDst )
|
||||
@ -215,8 +215,8 @@ unsigned int ExpandEnvironmentStringsW(const unsigned short* lpSrc,
|
||||
unsigned int index = 0;
|
||||
unsigned int origLen = wcslen(lpSrc);
|
||||
|
||||
const unsigned short *pIn = lpSrc;
|
||||
unsigned short *pOut = lpDst;
|
||||
const WCHAR *pIn = lpSrc;
|
||||
WCHAR *pOut = lpDst;
|
||||
|
||||
while ( index < origLen ) {
|
||||
|
||||
@ -228,7 +228,7 @@ unsigned int ExpandEnvironmentStringsW(const unsigned short* lpSrc,
|
||||
|
||||
// Have a starting '%' - look for matching '%'
|
||||
int envlen = 0;
|
||||
const unsigned short *pTmp = pIn + 1;
|
||||
const WCHAR *pTmp = pIn + 1;
|
||||
while ( *pTmp != L'%' && *pTmp != L' ' ) {
|
||||
envlen++, pTmp++;
|
||||
if ( origLen < index + envlen ) { // Ran past end of original
|
||||
@ -274,7 +274,7 @@ unsigned int ExpandEnvironmentStringsW(const unsigned short* lpSrc,
|
||||
return size;
|
||||
}
|
||||
|
||||
unsigned short *
|
||||
WCHAR *
|
||||
mozce_GetEnvironmentCL()
|
||||
{
|
||||
env_entry *entry = env_head;
|
||||
|
@ -47,14 +47,14 @@ extern "C" {
|
||||
/* Environment stuff */
|
||||
char* getenv(const char* inName);
|
||||
int putenv(const char *a);
|
||||
char SetEnvironmentVariableW(const unsigned short * name, const unsigned short * value );
|
||||
char GetEnvironmentVariableW(const unsigned short * lpName, unsigned short* lpBuffer, unsigned long nSize);
|
||||
char SetEnvironmentVariableW(const wchar_t * name, const wchar_t * value );
|
||||
char GetEnvironmentVariableW(const wchar_t * lpName, wchar_t* lpBuffer, unsigned long nSize);
|
||||
|
||||
unsigned int ExpandEnvironmentStringsW(const unsigned short* lpSrc,
|
||||
unsigned short* lpDst,
|
||||
unsigned int ExpandEnvironmentStringsW(const wchar_t* lpSrc,
|
||||
wchar_t* lpDst,
|
||||
unsigned int nSize);
|
||||
|
||||
unsigned short* mozce_GetEnvironmentCL();
|
||||
wchar_t* mozce_GetEnvironmentCL();
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
|
@ -38,8 +38,6 @@
|
||||
#ifndef MOZCE_SHUNT_H
|
||||
#define MOZCE_SHUNT_H
|
||||
|
||||
#include "environment.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@ -53,6 +51,8 @@ typedef unsigned short wchar_t;
|
||||
} //extern "C"
|
||||
#endif
|
||||
|
||||
#include "environment.h"
|
||||
|
||||
#ifdef MOZ_MEMORY
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -182,18 +182,18 @@ void abort(void);
|
||||
/* Environment stuff */
|
||||
char* getenv(const char* inName);
|
||||
int putenv(const char *a);
|
||||
char SetEnvironmentVariableW(const unsigned short * name, const unsigned short * value );
|
||||
char GetEnvironmentVariableW(const unsigned short * lpName, unsigned short* lpBuffer, unsigned long nSize);
|
||||
char SetEnvironmentVariableW(const wchar_t * name, const wchar_t * value );
|
||||
char GetEnvironmentVariableW(const wchar_t * lpName, wchar_t* lpBuffer, unsigned long nSize);
|
||||
|
||||
unsigned int ExpandEnvironmentStringsW(const unsigned short* lpSrc,
|
||||
unsigned short* lpDst,
|
||||
unsigned int ExpandEnvironmentStringsW(const wchar_t* lpSrc,
|
||||
wchar_t* lpDst,
|
||||
unsigned int nSize);
|
||||
|
||||
/* File system stuff */
|
||||
unsigned short * _wgetcwd(unsigned short* dir, unsigned long size);
|
||||
unsigned short *_wfullpath( unsigned short *absPath, const unsigned short *relPath, unsigned long maxLength );
|
||||
wchar_t * _wgetcwd(wchar_t* dir, unsigned long size);
|
||||
wchar_t *_wfullpath(wchar_t *absPath, const wchar_t *relPath, unsigned long maxLength );
|
||||
int _unlink(const char *filename );
|
||||
int _wchdir(const unsigned short* path);
|
||||
int _wchdir(const wchar_t* path);
|
||||
|
||||
/* The time stuff should be defined here, but it can't be because it
|
||||
is already defined in time.h.
|
||||
@ -228,7 +228,7 @@ struct tm* localtime_r(const time_t* inTimeT, struct tm* outRetval);
|
||||
*/
|
||||
|
||||
|
||||
unsigned short* mozce_GetEnvironmentCL();
|
||||
wchar_t* mozce_GetEnvironmentCL();
|
||||
|
||||
/* square root of 1/2, missing from math.h */
|
||||
#define M_SQRT1_2 0.707106781186547524401
|
||||
|
@ -113,15 +113,15 @@ int errno = 0;
|
||||
// File System Stuff
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
unsigned short * _wgetcwd(unsigned short * dir, unsigned long size)
|
||||
wchar_t * _wgetcwd(wchar_t * dir, unsigned long size)
|
||||
{
|
||||
unsigned short tmp[MAX_PATH] = {0};
|
||||
wchar_t tmp[MAX_PATH] = {0};
|
||||
GetEnvironmentVariableW(L"CWD", tmp, size);
|
||||
if (tmp && tmp[0]) {
|
||||
if (wcslen(tmp) > size)
|
||||
return 0;
|
||||
if (!dir) {
|
||||
dir = (unsigned short*)malloc(sizeof(unsigned short) * (wcslen(tmp) + 2));
|
||||
dir = (wchar_t*)malloc(sizeof(wchar_t) * (wcslen(tmp) + 2));
|
||||
if (!dir)
|
||||
return 0;
|
||||
}
|
||||
@ -129,7 +129,7 @@ unsigned short * _wgetcwd(unsigned short * dir, unsigned long size)
|
||||
} else {
|
||||
unsigned long i;
|
||||
if (!dir) {
|
||||
dir = (unsigned short*)malloc(sizeof(unsigned short) * (MAX_PATH + 1));
|
||||
dir = (wchar_t*)malloc(sizeof(wchar_t) * (MAX_PATH + 1));
|
||||
if (!dir)
|
||||
return 0;
|
||||
}
|
||||
@ -147,12 +147,12 @@ unsigned short * _wgetcwd(unsigned short * dir, unsigned long size)
|
||||
return dir;
|
||||
}
|
||||
|
||||
unsigned short *_wfullpath( unsigned short *absPath, const unsigned short *relPath, unsigned long maxLength )
|
||||
wchar_t *_wfullpath( wchar_t *absPath, const wchar_t *relPath, unsigned long maxLength )
|
||||
{
|
||||
if(absPath == NULL){
|
||||
absPath = (unsigned short *)malloc(maxLength*sizeof(unsigned short));
|
||||
absPath = (wchar_t *)malloc(maxLength*sizeof(wchar_t));
|
||||
}
|
||||
unsigned short cwd[MAX_PATH];
|
||||
wchar_t cwd[MAX_PATH];
|
||||
if (NULL == _wgetcwd( cwd, MAX_PATH))
|
||||
return NULL;
|
||||
|
||||
@ -181,7 +181,7 @@ int _wchdir(const WCHAR* path) {
|
||||
|
||||
int _unlink(const char *filename)
|
||||
{
|
||||
unsigned short wname[MAX_PATH];
|
||||
wchar_t wname[MAX_PATH];
|
||||
|
||||
MultiByteToWideChar(CP_ACP,
|
||||
0,
|
||||
|
@ -197,8 +197,8 @@ GRE_GetGREPathWithProperties(const GREVersionRange *versions,
|
||||
#elif WINCE
|
||||
if (p[0] != '\\')
|
||||
{
|
||||
unsigned short dir[MAX_PATH];
|
||||
unsigned short path[MAX_PATH];
|
||||
WCHAR dir[MAX_PATH];
|
||||
WCHAR path[MAX_PATH];
|
||||
MultiByteToWideChar(CP_ACP, 0, p, -1, path, MAX_PATH);
|
||||
_wfullpath(dir,path,MAX_PATH);
|
||||
WideCharToMultiByte(CP_ACP, 0, dir, -1, aBuffer, MAX_PATH, NULL, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user