зеркало из https://github.com/mozilla/pjs.git
MinGW fix for bug 250392 p=brofield@jellycan.com r=me sr=dmose
This commit is contained in:
Родитель
ad231457ee
Коммит
563a1b886b
|
@ -528,9 +528,9 @@ MangleTextToValidFilename(nsString & aText)
|
||||||
|
|
||||||
aText.StripChars(FILE_PATH_SEPARATOR FILE_ILLEGAL_CHARACTERS);
|
aText.StripChars(FILE_PATH_SEPARATOR FILE_ILLEGAL_CHARACTERS);
|
||||||
aText.CompressWhitespace(PR_TRUE, PR_TRUE);
|
aText.CompressWhitespace(PR_TRUE, PR_TRUE);
|
||||||
int nameLen;
|
PRUint32 nameLen;
|
||||||
for (int n = 0; n < NS_ARRAY_LENGTH(forbiddenNames); ++n) {
|
for (size_t n = 0; n < NS_ARRAY_LENGTH(forbiddenNames); ++n) {
|
||||||
nameLen = strlen(forbiddenNames[n]);
|
nameLen = (PRUint32) strlen(forbiddenNames[n]);
|
||||||
if (aText.EqualsIgnoreCase(forbiddenNames[n], nameLen)) {
|
if (aText.EqualsIgnoreCase(forbiddenNames[n], nameLen)) {
|
||||||
// invalid name is either the entire string, or a prefix with a period
|
// invalid name is either the entire string, or a prefix with a period
|
||||||
if (aText.Length() == nameLen || aText.CharAt(nameLen) == PRUnichar('.')) {
|
if (aText.Length() == nameLen || aText.CharAt(nameLen) == PRUnichar('.')) {
|
||||||
|
|
|
@ -63,6 +63,46 @@
|
||||||
#define CFSTR_INETURLW "UniformResourceLocatorW"
|
#define CFSTR_INETURLW "UniformResourceLocatorW"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// For support of MinGW w32api v2.4.
|
||||||
|
// When the next version of w32api is released with shlobj.h rev 1.35
|
||||||
|
// http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/winsup/w32api/include/shlobj.h?cvsroot=src
|
||||||
|
// then that can be made the base required version and this code should be removed.
|
||||||
|
#ifndef CFSTR_FILEDESCRIPTORA
|
||||||
|
# define CFSTR_FILEDESCRIPTORA "FileGroupDescriptor"
|
||||||
|
#endif
|
||||||
|
#ifndef CFSTR_FILEDESCRIPTORW
|
||||||
|
# define CFSTR_FILEDESCRIPTORW "FileGroupDescriptorW"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __MINGW32__
|
||||||
|
# include <w32api.h>
|
||||||
|
# if __W32API_MAJOR_VERSION < 3 || (__W32API_MAJOR_VERSION == 3 && __W32API_MINOR_VERSION == 0)
|
||||||
|
# ifndef FILEGROUPDESCRIPTORA
|
||||||
|
# define FILEGROUPDESCRIPTORA FILEGROUPDESCRIPTOR
|
||||||
|
# endif
|
||||||
|
# ifndef LPFILEGROUPDESCRIPTORA
|
||||||
|
# define LPFILEGROUPDESCRIPTORA LPFILEGROUPDESCRIPTOR
|
||||||
|
# endif
|
||||||
|
typedef struct _FILEDESCRIPTORW {
|
||||||
|
DWORD dwFlags;
|
||||||
|
CLSID clsid;
|
||||||
|
SIZEL sizel;
|
||||||
|
POINTL pointl;
|
||||||
|
DWORD dwFileAttributes;
|
||||||
|
FILETIME ftCreationTime;
|
||||||
|
FILETIME ftLastAccessTime;
|
||||||
|
FILETIME ftLastWriteTime;
|
||||||
|
DWORD nFileSizeHigh;
|
||||||
|
DWORD nFileSizeLow;
|
||||||
|
WCHAR cFileName[MAX_PATH];
|
||||||
|
} FILEDESCRIPTORW,*LPFILEDESCRIPTORW;
|
||||||
|
typedef struct _FILEGROUPDESCRIPTORW {
|
||||||
|
UINT cItems;
|
||||||
|
FILEDESCRIPTORW fgd[1];
|
||||||
|
} FILEGROUPDESCRIPTORW,*LPFILEGROUPDESCRIPTORW;
|
||||||
|
# endif /*__W32API_MAJOR_VERSION*/
|
||||||
|
#endif /*__MINGW32__*/
|
||||||
|
|
||||||
class nsVoidArray;
|
class nsVoidArray;
|
||||||
class CEnumFormatEtc;
|
class CEnumFormatEtc;
|
||||||
class nsITransferable;
|
class nsITransferable;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче