This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] support: Implement support_quote_string
* Rafal Luzynski:
> After this commit now "make check" fails with:
> bug-regex24.c:5:13: error: expected ';', ',' or ')' before string constant
> #define str "civic"
> ../support/support.h:75:41: note: in expansion of macro 'str'
> char *support_quote_string (const char *str);
> ../o-iterator.mk:9: recipe for target
> '/home/rl/Projekty/glibc/build/glibc/posix/bug-regex24.o' failed
> Please fix. Also please see below:
Sorry, now fixed. I assumed I had tested the entire tree before
pushing, but evidently not.
> 27.11.2018 18:24 Florian Weimer <email@example.com> wrote:
>> diff --git a/support/support.h b/support/support.h
>> index 9418cd11ef..835e7173eb 100644
>> --- a/support/support.h
>> +++ b/support/support.h
>> @@ -69,6 +69,11 @@ void support_write_file_string (const char *path, const
>> char *contents);
>> the result). */
>> char *support_quote_blob (const void *blob, size_t length);
>> +/* Quote the contents of the at STR, in such a way that the result
>> + string can be included in a C literal (in single/double quotes,
>> + without putting the quotes into the result). */
>> +char *support_quote_string (const char *str);
> It seems that this line does not like to be included after
> “#define str "civic"”. But I'm unable to decide which file is wrong.
> Would “#undef str” in bug-regex24.c fix the problem?
There are many different ways for fixing this. Converting
posix/bug-regex24.c to the current test driver is another example.