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
Родитель 6e3edb0968
Коммит eeaaf71e76
2 изменённых файлов: 3 добавлений и 7 удалений

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

@ -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

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

@ -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());