{"action":"created","issue":{"url":"https://api.github.com/repos/svaarala/duktape/issues/361","labels_url":"https://api.github.com/repos/svaarala/duktape/issues/361/labels{/name}","comments_url":"https://api.github.com/repos/svaarala/duktape/issues/361/comments","events_url":"https://api.github.com/repos/svaarala/duktape/issues/361/events","html_url":"https://github.com/svaarala/duktape/issues/361","id":107001286,"number":361,"title":"#define DUK_USE_TARGET_INFO in duk_custom.h causes macro redefinition error","user":{"login":"fatcerberus","id":4097841,"avatar_url":"https://avatars.githubusercontent.com/u/4097841?v=3","gravatar_id":"","url":"https://api.github.com/users/fatcerberus","html_url":"https://github.com/fatcerberus","followers_url":"https://api.github.com/users/fatcerberus/followers","following_url":"https://api.github.com/users/fatcerberus/following{/other_user}","gists_url":"https://api.github.com/users/fatcerberus/gists{/gist_id}","starred_url":"https://api.github.com/users/fatcerberus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fatcerberus/subscriptions","organizations_url":"https://api.github.com/users/fatcerberus/orgs","repos_url":"https://api.github.com/users/fatcerberus/repos","events_url":"https://api.github.com/users/fatcerberus/events{/privacy}","received_events_url":"https://api.github.com/users/fatcerberus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":23,"created_at":"2015-09-17T14:45:45Z","updated_at":"2015-09-17T16:25:47Z","closed_at":null,"body":"So I recently discovered `duk_custom.h`, which is a lifesaver with me constantly testing out different branches, etc. as my config customizations don't get overwritten.  Everything mostly works okay, except for one issue: defining DUK_USE_TARGET_INFO results in warnings.\r\n\r\nHere's my duk_custom.h:\r\n```c\r\n#include \"version.h\"\r\n\r\n#define DUK_OPT_FASTINT\r\n\r\n#ifndef MINISPHERE_REDIST\r\n#define DUK_USE_TARGET_INFO ENGINE_NAME\r\n#define DUK_USE_DEBUGGER_SUPPORT\r\n#define DUK_USE_DEBUGGER_FWD_PRINTALERT\r\n#define DUK_USE_DEBUGGER_PAUSE_UNCAUGHT\r\n#define DUK_USE_INTERRUPT_COUNTER\r\n#endif\r\n```\r\n\r\nAnd here's the warning this generates:\r\n```\r\n1>d:\\src\\minisphere\\src\\duk_custom.h(6): warning C4005: 'DUK_USE_TARGET_INFO': macro redefinition (compiling source file ..\\src\\vector.c)\r\n1>  d:\\src\\minisphere\\src\\duk_config.h(2256): note: see previous definition of 'DUK_USE_TARGET_INFO' (compiling source file ..\\src\\vector.c)\r\n```\r\n\r\nI can of course #undef the macro first, but that seems a bit awkward, and since the rest of the DUK_USE_ directives don't cause similar warnings, I'm going to assume this is a bug."},"comment":{"url":"https://api.github.com/repos/svaarala/duktape/issues/comments/141139805","html_url":"https://github.com/svaarala/duktape/issues/361#issuecomment-141139805","issue_url":"https://api.github.com/repos/svaarala/duktape/issues/361","id":141139805,"user":{"login":"fatcerberus","id":4097841,"avatar_url":"https://avatars.githubusercontent.com/u/4097841?v=3","gravatar_id":"","url":"https://api.github.com/users/fatcerberus","html_url":"https://github.com/fatcerberus","followers_url":"https://api.github.com/users/fatcerberus/followers","following_url":"https://api.github.com/users/fatcerberus/following{/other_user}","gists_url":"https://api.github.com/users/fatcerberus/gists{/gist_id}","starred_url":"https://api.github.com/users/fatcerberus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fatcerberus/subscriptions","organizations_url":"https://api.github.com/users/fatcerberus/orgs","repos_url":"https://api.github.com/users/fatcerberus/repos","events_url":"https://api.github.com/users/fatcerberus/events{/privacy}","received_events_url":"https://api.github.com/users/fatcerberus/received_events","type":"User","site_admin":false},"created_at":"2015-09-17T16:25:47Z","updated_at":"2015-09-17T16:25:47Z","body":"As for the defaults, couldn't they be defined *after* the fixup, and guarded with an #ifdef (don't redefine if already defined)?"}}