mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
SMJS: Define XP_UNIX and others as 1, not as empty
This change is intended to prevent a macro redefinition warning if CFLAGS already contains -DXP_UNIX from pkg-config --cflags mozilla-js.
This commit is contained in:
parent
e22eae2e93
commit
8a89a627bc
@ -1,17 +1,22 @@
|
|||||||
#ifndef EL__ECMASCRIPT_SPIDERMONKEY_SHARED_H
|
#ifndef EL__ECMASCRIPT_SPIDERMONKEY_SHARED_H
|
||||||
#define EL__ECMASCRIPT_SPIDERMONKEY_SHARED_H
|
#define EL__ECMASCRIPT_SPIDERMONKEY_SHARED_H
|
||||||
|
|
||||||
/* For wild SpiderMonkey installations. */
|
/* Tell SpiderMonkey headers which operating system will be used.
|
||||||
|
* With standalone SpiderMonkey 1.8.5, "pkg-config --cflags mozjs185"
|
||||||
|
* does not define such a macro, so ELinks must do that here.
|
||||||
|
* With xulrunner 2.0 however, "pkg-config --cflags mozilla-js"
|
||||||
|
* already outputs -DXP_UNIX or similar. To prevent a warning about
|
||||||
|
* macro redefinition, define the macro as 1, like -D does. */
|
||||||
#ifdef CONFIG_OS_BEOS
|
#ifdef CONFIG_OS_BEOS
|
||||||
#define XP_BEOS
|
#define XP_BEOS 1
|
||||||
#elif CONFIG_OS_OS2
|
#elif CONFIG_OS_OS2
|
||||||
#define XP_OS2
|
#define XP_OS2 1
|
||||||
#elif CONFIG_OS_RISCOS
|
#elif CONFIG_OS_RISCOS
|
||||||
#error Out of luck, buddy!
|
#error Out of luck, buddy!
|
||||||
#elif CONFIG_OS_UNIX
|
#elif CONFIG_OS_UNIX
|
||||||
#define XP_UNIX
|
#define XP_UNIX 1
|
||||||
#elif CONFIG_OS_WIN32
|
#elif CONFIG_OS_WIN32
|
||||||
#define XP_WIN
|
#define XP_WIN 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <jsapi.h>
|
#include <jsapi.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user