bug 577589 bustage fix - define DLL_PREFIX and DLL_SUFFIX as strings in the Makefile to handle empty values

This commit is contained in:
Ted Mielczarek 2010-07-13 12:03:41 -04:00
parent 3ab5e497d0
commit 4d63535946
2 changed files with 3 additions and 7 deletions

View File

@ -449,7 +449,7 @@ endif
ifdef JS_HAS_CTYPES
DEFINES += -DJS_HAS_CTYPES
DEFINES += -DDLL_PREFIX=$(DLL_PREFIX) -DDLL_SUFFIX=$(DLL_SUFFIX)
DEFINES += -DDLL_PREFIX=\"$(DLL_PREFIX)\" -DDLL_SUFFIX=\"$(DLL_SUFFIX)\"
endif
ifdef JS_NO_THIN_LOCKS

View File

@ -97,14 +97,10 @@ Library::Name(JSContext* cx, uintN argc, jsval *vp)
return JS_FALSE;
}
#define _S(x) #x
#define STRINGIFY(x) _S(x)
AutoString resultString;
AppendString(resultString, STRINGIFY(DLL_PREFIX));
AppendString(resultString, DLL_PREFIX);
AppendString(resultString, str);
AppendString(resultString, STRINGIFY(DLL_SUFFIX));
#undef _S
#undef STRINGIFY
AppendString(resultString, DLL_SUFFIX);
JSString *result = JS_NewUCStringCopyN(cx, resultString.begin(),
resultString.length());