unix make fixes
unix "missing initializer" warnings
This commit is contained in:
rginda%netscape.com 2001-04-14 18:57:00 +00:00
Родитель 453cbe83eb
Коммит 8358704e96
6 изменённых файлов: 45 добавлений и 44 удалений

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

@ -35,7 +35,7 @@ DIRS += jsdb
REQUIRES = java js
EXPORTS = $(srcdir)/jsdebug.h
EXPORTS = jsdebug.h
ifdef JS_THREADSAFE
DEFINES += -DJS_THREADSAFE

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

@ -67,6 +67,7 @@ JS_BEGIN_EXTERN_C
#include "jsapi.h"
#include "jsobj.h"
#include "jsfun.h"
#include "jsscope.h"
#include "jsdbgapi.h"
#include "jsd_lock.h"
#include <stdio.h>

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

@ -153,6 +153,14 @@ _destroyJSDScript(JSDContext* jsdc,
/***************************************************************************/
#ifdef JSD_DUMP
#ifndef XP_WIN
void
OutputDebugString (char *buf)
{
fprintf (stderr, "%s", buf);
}
#endif
static void
_dumpJSDScript(JSDContext* jsdc, JSDScript* jsdscript, const char* leadingtext)
{

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

@ -27,29 +27,17 @@ srcdir = @srcdir@
include $(DEPTH)/config/autoconf.mk
VPATH = ../../src
CSRCS = jsdrefl.c jsdb.c
EXPORTS = jsdb.h
CSRCS = \
js.c \
jsdb.c \
jsdrefl.c
MODULE = jsd_refl
LIBRARY_NAME = jsdr
PROGRAM = js
EXTRA_LIBS = $(NSPR_LIBS)
LIBS = \
-ljsd \
-lmozjs \
$(NSPR_LIBS)
REQUIRES = jsd mozjs
ifdef JS_THREADSAFE
DEFINES += -DJS_THREADSAFE
endif
DEFINES += -DJSDEBUGGER -DJSDEBUGGER_C_UI -DJSD_LOWLEVEL_SOURCE -DJSFILE
include $(topsrcdir)/config/rules.mk
INCLUDES += -I../../src -I.

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

@ -320,19 +320,20 @@ NativeBreak(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
}
static JSFunctionSpec debugger_functions[] = {
{"version", Version, 0},
{"load", Load, 1},
{"write", Write, 0},
{"gets", Gets, 0},
{"safeEval", SafeEval, 3},
{"nativeBreak", NativeBreak, 0},
{0}
{"version", Version, 0, 0, 0},
{"load", Load, 1, 0, 0},
{"write", Write, 0, 0, 0},
{"gets", Gets, 0, 0, 0},
{"safeEval", SafeEval, 3, 0, 0},
{"nativeBreak", NativeBreak, 0, 0, 0},
{0, 0, 0, 0, 0}
};
static JSClass debugger_global_class = {
"debugger_global", 0,
JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_PropertyStub,
JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, JS_FinalizeStub
JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, JS_FinalizeStub,
JSCLASS_NO_OPTIONAL_MEMBERS
};
/***************************************************************************/
@ -429,11 +430,12 @@ JSDB_InitDebugger(JSRuntime* rt, JSDContext* jsdc, int depth)
if(data->debuggerDepth < MAX_DEBUGGER_DEPTH)
{
JSDContext* jsdc;
if(!(jsdc = JSD_DebuggerOnForUser(data->rtDebugger, NULL, NULL)))
return _initReturn("failed to create jsdc for nested debugger", JS_FALSE);
JSD_JSContextInUse(jsdc, data->cxDebugger);
if(!JSDB_InitDebugger(data->rtDebugger, jsdc, data->debuggerDepth))
JSDContext* local_jsdc;
if(!(local_jsdc = JSD_DebuggerOnForUser(data->rtDebugger, NULL, NULL)))
return _initReturn("failed to create jsdc for nested debugger",
JS_FALSE);
JSD_JSContextInUse(local_jsdc, data->cxDebugger);
if(!JSDB_InitDebugger(data->rtDebugger, local_jsdc, data->debuggerDepth))
return _initReturn("failed to init nested debugger", JS_FALSE);
}

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

@ -51,12 +51,12 @@ enum jsd_prop_ids
};
static JSPropertySpec jsd_properties[] = {
{_str_ThreadStateHandle, JSD_PROP_ID_THREADSTATE_HANDLE, JSPROP_ENUMERATE|JSPROP_PERMANENT},
{_str_InterruptSet, JSD_PROP_ID_INTERRUPT_SET, JSPROP_ENUMERATE|JSPROP_PERMANENT},
{_str_Evaluating, JSD_PROP_ID_EVALUATING, JSPROP_ENUMERATE|JSPROP_PERMANENT},
{_str_DebuggerDepth, JSD_PROP_ID_DEBUGGER_DEPTH, JSPROP_ENUMERATE|JSPROP_PERMANENT},
{_str_ReturnExpression, JSD_PROP_ID_RETURN_EXPRESSION, JSPROP_ENUMERATE|JSPROP_PERMANENT},
{0}
{_str_ThreadStateHandle, JSD_PROP_ID_THREADSTATE_HANDLE, JSPROP_ENUMERATE|JSPROP_PERMANENT, 0, 0},
{_str_InterruptSet, JSD_PROP_ID_INTERRUPT_SET, JSPROP_ENUMERATE|JSPROP_PERMANENT, 0, 0},
{_str_Evaluating, JSD_PROP_ID_EVALUATING, JSPROP_ENUMERATE|JSPROP_PERMANENT, 0, 0},
{_str_DebuggerDepth, JSD_PROP_ID_DEBUGGER_DEPTH, JSPROP_ENUMERATE|JSPROP_PERMANENT, 0, 0},
{_str_ReturnExpression, JSD_PROP_ID_RETURN_EXPRESSION, JSPROP_ENUMERATE|JSPROP_PERMANENT, 0, 0},
{0, 0, 0, 0, 0}
};
static JSBool
@ -158,7 +158,8 @@ JSClass jsdb_HandleClass = {
"JSDHandle",
JSCLASS_HAS_PRIVATE,
JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_PropertyStub,
JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, handle_finalize
JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, handle_finalize,
JSCLASS_NO_OPTIONAL_MEMBERS
};
JS_STATIC_DLL_CALLBACK(JSBool)
@ -174,8 +175,8 @@ handle_toString(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rv
}
static JSFunctionSpec handle_methods[] = {
{"toString", handle_toString, 0},
{0}
{"toString", handle_toString, 0, 0, 0},
{0, 0, 0, 0, 0}
};
void*
@ -2050,7 +2051,7 @@ GetValueForObject(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *
* FUN_SPEC(GetMajorVersion,0) ->
* {"GetMajorVersion",GetMajorVersion,0,JSPROP_ENUMERATE},
*/
#define FUN_SPEC(x,n) {#x,x,n,JSPROP_ENUMERATE},
#define FUN_SPEC(x,n) {#x,x,n,JSPROP_ENUMERATE,0},
static JSFunctionSpec jsd_functions[] = {
/* High Level calls */
@ -2142,7 +2143,7 @@ static JSFunctionSpec jsd_functions[] = {
FUN_SPEC(GetObjectConstructorName, 1)
FUN_SPEC(GetObjectForValue, 1)
FUN_SPEC(GetValueForObject, 1)
{0}
{0,0,0,0,0}
};
/***************************************************************************/
@ -2193,7 +2194,7 @@ static ConstProp const_props[] = {
CONST_PROP(JSDPD_VARIABLE)
CONST_PROP(JSDPD_HINTED)
{0}
{0,0}
};
JSBool
@ -2216,7 +2217,8 @@ _defineConstProperties(JSDB_Data* data)
static JSClass jsd_class = {
"JSD", 0,
JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_PropertyStub,
JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, JS_FinalizeStub
JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, JS_FinalizeStub,
JSCLASS_NO_OPTIONAL_MEMBERS
};
/***************************************************************************/