This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] support: Implement support_quote_string


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);
../ recipe for target
'/home/rl/Projekty/glibc/build/glibc/posix/bug-regex24.o' failed

Please fix.  Also please see below:

27.11.2018 18:24 Florian Weimer <> 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?



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]