#440: xpcom/
This commit is contained in:
parent
81e2358bec
commit
9bb17e851d
|
@ -15,6 +15,10 @@
|
||||||
#elif defined(XP_UNIX)
|
#elif defined(XP_UNIX)
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "mozilla-config.h"
|
||||||
|
#include "plvmx.h"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
@ -117,7 +121,7 @@ private:
|
||||||
// PATH. Only do so if argv[0] looks like a path (contains a /).
|
// PATH. Only do so if argv[0] looks like a path (contains a /).
|
||||||
// 2) manually walk through the PATH and look for ourself
|
// 2) manually walk through the PATH and look for ourself
|
||||||
// 3) give up
|
// 3) give up
|
||||||
if (strchr(aArgv0, '/') && realpath(aArgv0, aResult) &&
|
if (VMX_STRCHR(aArgv0, '/') && realpath(aArgv0, aResult) &&
|
||||||
stat(aResult, &fileStat) == 0) {
|
stat(aResult, &fileStat) == 0) {
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,9 @@
|
||||||
|
|
||||||
#include "nsUnicharUtils.h"
|
#include "nsUnicharUtils.h"
|
||||||
|
|
||||||
|
#include "mozilla-config.h"
|
||||||
|
#include "plvmx.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
static const char sWhitespaces[] = " \t";
|
static const char sWhitespaces[] = " \t";
|
||||||
|
@ -264,7 +267,7 @@ Tokenizer::Parse(Token& aToken) const
|
||||||
state = PARSE_CRLF;
|
state = PARSE_CRLF;
|
||||||
} else if (*next == '\n') {
|
} else if (*next == '\n') {
|
||||||
state = PARSE_LF;
|
state = PARSE_LF;
|
||||||
} else if (strchr(mWhitespaces, *next)) { // not UTF-8 friendly?
|
} else if (VMX_STRCHR(mWhitespaces, *next)) { // not UTF-8 friendly?
|
||||||
state = PARSE_WS;
|
state = PARSE_WS;
|
||||||
} else {
|
} else {
|
||||||
state = PARSE_CHAR;
|
state = PARSE_CHAR;
|
||||||
|
@ -339,7 +342,7 @@ Tokenizer::IsWordFirst(const char aInput) const
|
||||||
return (ToLowerCase(static_cast<uint32_t>(aInput)) !=
|
return (ToLowerCase(static_cast<uint32_t>(aInput)) !=
|
||||||
ToUpperCase(static_cast<uint32_t>(aInput))) ||
|
ToUpperCase(static_cast<uint32_t>(aInput))) ||
|
||||||
'_' == aInput ||
|
'_' == aInput ||
|
||||||
(mAdditionalWordChars ? !!strchr(mAdditionalWordChars, aInput) : false);
|
(mAdditionalWordChars ? !!VMX_STRCHR(mAdditionalWordChars, aInput) : false);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
|
@ -60,6 +60,9 @@
|
||||||
#include "prmem.h"
|
#include "prmem.h"
|
||||||
#include "plbase64.h"
|
#include "plbase64.h"
|
||||||
|
|
||||||
|
#include "mozilla-config.h"
|
||||||
|
#include "plvmx.h"
|
||||||
|
|
||||||
static nsresult MacErrorMapper(OSErr inErr);
|
static nsresult MacErrorMapper(OSErr inErr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -334,7 +337,7 @@ nsLocalFile::CreateAllAncestors(uint32_t aPermissions)
|
||||||
fprintf(stderr, "nsIFile: before: %s\n", buffer);
|
fprintf(stderr, "nsIFile: before: %s\n", buffer);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
while ((slashp = strchr(slashp + 1, '/'))) {
|
while ((slashp = VMX_STRCHR(slashp + 1, '/'))) {
|
||||||
/*
|
/*
|
||||||
* Sequences of '/' are equivalent to a single '/'.
|
* Sequences of '/' are equivalent to a single '/'.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -8,6 +8,9 @@
|
||||||
#include "mozilla/double-conversion.h"
|
#include "mozilla/double-conversion.h"
|
||||||
#include "mozilla/MemoryReporting.h"
|
#include "mozilla/MemoryReporting.h"
|
||||||
|
|
||||||
|
#include "mozilla-config.h"
|
||||||
|
#include "plvmx.h"
|
||||||
|
|
||||||
using double_conversion::DoubleToStringConverter;
|
using double_conversion::DoubleToStringConverter;
|
||||||
|
|
||||||
#ifdef XPCOM_STRING_CONSTRUCTOR_OUT_OF_LINE
|
#ifdef XPCOM_STRING_CONSTRUCTOR_OUT_OF_LINE
|
||||||
|
@ -938,7 +941,7 @@ FormatWithoutTrailingZeros(char (&aBuf)[40], double aDouble,
|
||||||
}
|
}
|
||||||
|
|
||||||
char* end = formattedDouble + length;
|
char* end = formattedDouble + length;
|
||||||
char* decimalPoint = strchr(aBuf, '.');
|
char* decimalPoint = VMX_STRCHR(aBuf, '.');
|
||||||
// No trailing zeros to remove.
|
// No trailing zeros to remove.
|
||||||
if (!decimalPoint) {
|
if (!decimalPoint) {
|
||||||
return length;
|
return length;
|
||||||
|
|
|
@ -10,6 +10,9 @@
|
||||||
#include "nscore.h"
|
#include "nscore.h"
|
||||||
#include <string.h> /* strchr */
|
#include <string.h> /* strchr */
|
||||||
|
|
||||||
|
#include "mozilla-config.h"
|
||||||
|
#include "plvmx.h"
|
||||||
|
|
||||||
static PRBool
|
static PRBool
|
||||||
CheckForRepeat(XPTCursor *cursor, void **addrp, XPTPool pool, uint32_t len,
|
CheckForRepeat(XPTCursor *cursor, void **addrp, XPTPool pool, uint32_t len,
|
||||||
XPTCursor *new_cursor, PRBool *already);
|
XPTCursor *new_cursor, PRBool *already);
|
||||||
|
@ -407,7 +410,7 @@ XPT_DoCString(XPTArena *arena, XPTCursor *cursor, char **identp)
|
||||||
my_cursor.state = cursor->state;
|
my_cursor.state = cursor->state;
|
||||||
start = &CURS_POINT(&my_cursor);
|
start = &CURS_POINT(&my_cursor);
|
||||||
|
|
||||||
end = strchr(start, 0); /* find the end of the string */
|
end = VMX_STRCHR(start, 0); /* find the end of the string */
|
||||||
if (!end) {
|
if (!end) {
|
||||||
fprintf(stderr, "didn't find end of string on decode!\n");
|
fprintf(stderr, "didn't find end of string on decode!\n");
|
||||||
return PR_FALSE;
|
return PR_FALSE;
|
||||||
|
|
Loading…
Reference in New Issue