Bug 429105 [Solaris] Failed to build mozilla-central on solaris in js module. brendan: review+

This commit is contained in:
Leon Sha 2008-09-02 10:03:18 +08:00
Родитель 04582c160e
Коммит e40a54cc3e
4 изменённых файлов: 19 добавлений и 0 удалений

Просмотреть файл

@ -4303,6 +4303,7 @@ JS_ObjectIsFunction(JSContext *cx, JSObject *obj)
return OBJ_GET_CLASS(cx, obj) == &js_FunctionClass;
}
JS_BEGIN_EXTERN_C
JS_STATIC_DLL_CALLBACK(JSBool)
js_generic_fast_native_method_dispatcher(JSContext *cx, uintN argc, jsval *vp)
{
@ -4413,6 +4414,7 @@ js_generic_native_method_dispatcher(JSContext *cx, JSObject *obj,
return fs->call(cx, JSVAL_TO_OBJECT(argv[-1]), argc, argv, rval);
}
JS_END_EXTERN_C
JS_PUBLIC_API(JSBool)
JS_DefineFunctions(JSContext *cx, JSObject *obj, JSFunctionSpec *fs)

Просмотреть файл

@ -80,6 +80,7 @@
static PRUintn threadTPIndex;
static JSBool tpIndexInited = JS_FALSE;
JS_BEGIN_EXTERN_C
JSBool
js_InitThreadPrivateIndex(void (JS_DLL_CALLBACK *ptr)(void *))
{
@ -94,6 +95,7 @@ js_InitThreadPrivateIndex(void (JS_DLL_CALLBACK *ptr)(void *))
tpIndexInited = JS_TRUE;
return status == PR_SUCCESS;
}
JS_END_EXTERN_C
/*
* Callback function to delete a JSThread info when the thread that owns it

Просмотреть файл

@ -851,6 +851,8 @@ DestroyGCChunk(jsuword chunk)
if (js_gcUseMmap) {
# if defined(XP_WIN)
VirtualFree((void *) chunk, 0, MEM_RELEASE);
# elif defined(SOLARIS)
munmap((char *) chunk, js_gcArenasPerChunk << GC_ARENA_SHIFT);
# else
munmap((void *) chunk, js_gcArenasPerChunk << GC_ARENA_SHIFT);
# endif
@ -1564,6 +1566,7 @@ js_named_root_dumper(JSDHashTable *table, JSDHashEntryHdr *hdr, uint32 number,
return JS_DHASH_NEXT;
}
JS_BEGIN_EXTERN_C
void
js_DumpNamedRoots(JSRuntime *rt,
void (*dump)(const char *name, void *rp, void *data),
@ -1575,6 +1578,7 @@ js_DumpNamedRoots(JSRuntime *rt,
args.data = data;
JS_DHashTableEnumerate(&rt->gcRootsHash, js_named_root_dumper, &args);
}
JS_END_EXTERN_C
#endif /* DEBUG */

Просмотреть файл

@ -73,8 +73,19 @@ JS_Assert(const char *s, const char *file, JSIntn ln);
* The macro can be used only in places where an "extern" declaration is
* allowed.
*/
/*
* Sun Studio C++ compiler has a bug
* "sizeof expression not accepted as size of array parameter"
* The bug number is 6688515. It is not public yet.
* Turn off this assert for Sun Studio until this bug is fixed.
*/
#ifdef __SUNPRO_CC
#define JS_STATIC_ASSERT(condition)
#else
#define JS_STATIC_ASSERT(condition) \
extern void js_static_assert(int arg[(condition) ? 1 : -1])
#endif
/*
* Abort the process in a non-graceful manner. This will cause a core file,