Skip to content

Commit

Permalink
konkretreg: ignore KONKRET_REGISTRATION macro in library
Browse files Browse the repository at this point in the history
On some systems the KONKRET_REGISTRATION macro definition gets
compiled into the provider library and then konkretreg generates
incorrect registration file. This commit adds a check for this
case.

Fixes #6.
  • Loading branch information
Radek Novacek committed Aug 4, 2015
1 parent 4e66715 commit 4934aad
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/konkretreg/main.cpp
Expand Up @@ -180,6 +180,15 @@ int main(int argc, char** argv)
{
if (memcmp(p, REG, sizeof(REG)-1) == 0)
{
if (n > 0 && *(p - 1) == '"')
{
// Some systems generate entry for the macro itself, we're not
// interested in it. There is a doublequote sign before name
// of the entry.
p++;
n--;
continue;
}
char buf[4096];

size_t r = strlen(p) + 1;
Expand Down

0 comments on commit 4934aad

Please sign in to comment.