Bug 735191 - shared-libraries-win32.cc fails to crosscompile on case-sensitive OSes r=ehsan
--- a/tools/profiler/shared-libraries-win32.cc
+++ b/tools/profiler/shared-libraries-win32.cc
@@ -34,17 +34,17 @@
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include <windows.h>
#include <tlhelp32.h>
-#include <Dbghelp.h>
+#include <dbghelp.h>
#include "shared-libraries.h"
#include "nsWindowsHelpers.h"
#define CV_SIGNATURE 0x53445352 // 'SDSR'
struct CodeViewRecord70
{
--- a/tools/profiler/sps_sampler.h
+++ b/tools/profiler/sps_sampler.h
@@ -37,16 +37,17 @@
* ***** END LICENSE BLOCK ***** */
#include <stdlib.h>
#include <signal.h>
#include "thread_helper.h"
#include "nscore.h"
#include "jsapi.h"
#include "mozilla/TimeStamp.h"
+#include "mozilla/Util.h"
using mozilla::TimeStamp;
using mozilla::TimeDuration;
extern mozilla::tls::key pkey_stack;
extern mozilla::tls::key pkey_ticker;
extern bool stack_key_initialized;
@@ -178,17 +179,17 @@ public:
void addMarker(const char *aMarker)
{
if (mQueueClearMarker) {
clearMarkers();
}
if (!aMarker) {
return; //discard
}
- if (mMarkerPointer == 1024) {
+ if (mMarkerPointer == mozilla::ArrayLength(mMarkers)) {
return; //array full, silently drop
}
mMarkers[mMarkerPointer] = aMarker;
STORE_SEQUENCER();
mMarkerPointer++;
}
// called within signal. Function must be reentrant
@@ -207,17 +208,17 @@ public:
void clearMarkers()
{
mMarkerPointer = 0;
mQueueClearMarker = false;
}
void push(const char *aName)
{
- if (mStackPointer >= 1024) {
+ if (mStackPointer >= mozilla::ArrayLength(mStack)) {
mDroppedStackEntries++;
return;
}
// Make sure we increment the pointer after the name has
// been written such that mStack is always consistent.
mStack[mStackPointer] = aName;
// Prevent the optimizer from re-ordering these instructions
--- a/tools/profiler/thread_helper.h
+++ b/tools/profiler/thread_helper.h
@@ -46,17 +46,17 @@
// # include <windef.h>
// # include <winbase.h>
// Unfortunately, even including these headers causes
// us to add a bunch of ugly to our namespace. e.g #define CreateEvent CreateEventW
extern "C" {
__declspec(dllimport) void * __stdcall TlsGetValue(unsigned long);
__declspec(dllimport) int __stdcall TlsSetValue(unsigned long, void *);
__declspec(dllimport) unsigned long __stdcall TlsAlloc();
-};
+}
#else
# include <pthread.h>
# include <signal.h>
#endif
namespace mozilla {
#if defined(XP_WIN)