[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20140429152417.GB17247@birch.djwong.org>
Date: Tue, 29 Apr 2014 08:24:17 -0700
From: "Darrick J. Wong" <darrick.wong@...cle.com>
To: Martin Liška <mliska@...e.cz>
Cc: linux-ext4 <linux-ext4@...r.kernel.org>
Subject: Re: PATCH - e2fsprogs - rename static variable link
On Tue, Apr 29, 2014 at 11:04:54AM +0200, Martin Liška wrote:
> Hello,
> I've been testing gentoo packages: http://marxin.github.io/blog/2014/04/24/gentoo-linux-packages-with-gcc-4-dot-9-lto/
> and I met few gentoo packages that have conflicting variable with
> compile_et:
>
> https://github.com/krb5/krb5/issues/106
>
> I would like to ask you if you can apply attached patch. It's
> suggestion, maybe you will find better variable name.
>
> Compiles fine for x86_64, test suite passes.
Looks ok to me, but you should add a Signed-off-by: and send to
linux-ext4@...r.kernel.org [cc'd] so Ted can have a look and possibly apply it.
It's sort of surprising that LTO can't deal with a static variable that shadows
a global symbol, but then I haven't looked at LTO.
--D
>
> Thank you,
> Martin
> diff --git a/lib/et/et_c.awk b/lib/et/et_c.awk
> index 99c33ba..8680279 100644
> --- a/lib/et/et_c.awk
> +++ b/lib/et/et_c.awk
> @@ -238,7 +238,7 @@ END {
> tab_base_low, table_item_count) > outfile
> }
> print "" > outfile
> - print "static struct et_list link = { 0, 0 };" > outfile
> + print "static struct et_list link_ = { 0, 0 };" > outfile
> print "" > outfile
> print "void initialize_" table_name "_error_table_r(struct et_list **list);" > outfile
> print "void initialize_" table_name "_error_table(void);" > outfile
> @@ -257,8 +257,8 @@ END {
> print " return;" > outfile
> print " et = malloc(sizeof(struct et_list));" > outfile
> print " if (et == 0) {" > outfile
> - print " if (!link.table)" > outfile
> - print " et = &link;" > outfile
> + print " if (!link_.table)" > outfile
> + print " et = &link_;" > outfile
> print " else" > outfile
> print " return;" > outfile
> print " }" > outfile
> diff --git a/lib/et/test_cases/continuation.c b/lib/et/test_cases/continuation.c
> index 1207897..1e17ba4 100644
> --- a/lib/et/test_cases/continuation.c
> +++ b/lib/et/test_cases/continuation.c
> @@ -25,7 +25,7 @@ extern struct et_list *_et_list;
>
> const struct error_table et_ovk_error_table = { text, 43787520L, 1 };
>
> -static struct et_list link = { 0, 0 };
> +static struct et_list link_ = { 0, 0 };
>
> void initialize_ovk_error_table_r(struct et_list **list);
> void initialize_ovk_error_table(void);
> @@ -44,8 +44,8 @@ void initialize_ovk_error_table_r(struct et_list **list)
> return;
> et = malloc(sizeof(struct et_list));
> if (et == 0) {
> - if (!link.table)
> - et = &link;
> + if (!link_.table)
> + et = &link_;
> else
> return;
> }
> diff --git a/lib/et/test_cases/heimdal.c b/lib/et/test_cases/heimdal.c
> index d9be4ce..192c9bb 100644
> --- a/lib/et/test_cases/heimdal.c
> +++ b/lib/et/test_cases/heimdal.c
> @@ -106,7 +106,7 @@ extern struct et_list *_et_list;
>
> const struct error_table et_krb_error_table = { text, 39525376L, 82 };
>
> -static struct et_list link = { 0, 0 };
> +static struct et_list link_ = { 0, 0 };
>
> void initialize_krb_error_table_r(struct et_list **list);
> void initialize_krb_error_table(void);
> @@ -125,8 +125,8 @@ void initialize_krb_error_table_r(struct et_list **list)
> return;
> et = malloc(sizeof(struct et_list));
> if (et == 0) {
> - if (!link.table)
> - et = &link;
> + if (!link_.table)
> + et = &link_;
> else
> return;
> }
> diff --git a/lib/et/test_cases/heimdal2.c b/lib/et/test_cases/heimdal2.c
> index a8d4c11..ec5b646 100644
> --- a/lib/et/test_cases/heimdal2.c
> +++ b/lib/et/test_cases/heimdal2.c
> @@ -92,7 +92,7 @@ extern struct et_list *_et_list;
>
> const struct error_table et_kadm_error_table = { text, -1783126272L, 68 };
>
> -static struct et_list link = { 0, 0 };
> +static struct et_list link_ = { 0, 0 };
>
> void initialize_kadm_error_table_r(struct et_list **list);
> void initialize_kadm_error_table(void);
> @@ -111,8 +111,8 @@ void initialize_kadm_error_table_r(struct et_list **list)
> return;
> et = malloc(sizeof(struct et_list));
> if (et == 0) {
> - if (!link.table)
> - et = &link;
> + if (!link_.table)
> + et = &link_;
> else
> return;
> }
> diff --git a/lib/et/test_cases/heimdal3.c b/lib/et/test_cases/heimdal3.c
> index b8b9b73..4ffbb1b 100644
> --- a/lib/et/test_cases/heimdal3.c
> +++ b/lib/et/test_cases/heimdal3.c
> @@ -26,7 +26,7 @@ extern struct et_list *_et_list;
>
> const struct error_table et_h3test_error_table = { text, 43787520L, 2 };
>
> -static struct et_list link = { 0, 0 };
> +static struct et_list link_ = { 0, 0 };
>
> void initialize_h3test_error_table_r(struct et_list **list);
> void initialize_h3test_error_table(void);
> @@ -45,8 +45,8 @@ void initialize_h3test_error_table_r(struct et_list **list)
> return;
> et = malloc(sizeof(struct et_list));
> if (et == 0) {
> - if (!link.table)
> - et = &link;
> + if (!link_.table)
> + et = &link_;
> else
> return;
> }
> diff --git a/lib/et/test_cases/imap_err.c b/lib/et/test_cases/imap_err.c
> index 6f576d3..ca5414e 100644
> --- a/lib/et/test_cases/imap_err.c
> +++ b/lib/et/test_cases/imap_err.c
> @@ -54,7 +54,7 @@ extern struct et_list *_et_list;
>
> const struct error_table et_imap_error_table = { text, -1904809472L, 30 };
>
> -static struct et_list link = { 0, 0 };
> +static struct et_list link_ = { 0, 0 };
>
> void initialize_imap_error_table_r(struct et_list **list);
> void initialize_imap_error_table(void);
> @@ -73,8 +73,8 @@ void initialize_imap_error_table_r(struct et_list **list)
> return;
> et = malloc(sizeof(struct et_list));
> if (et == 0) {
> - if (!link.table)
> - et = &link;
> + if (!link_.table)
> + et = &link_;
> else
> return;
> }
> diff --git a/lib/et/test_cases/simple.c b/lib/et/test_cases/simple.c
> index 10ab1a3..76b64ec 100644
> --- a/lib/et/test_cases/simple.c
> +++ b/lib/et/test_cases/simple.c
> @@ -46,7 +46,7 @@ extern struct et_list *_et_list;
>
> const struct error_table et_krb_error_table = { text, 39525376L, 22 };
>
> -static struct et_list link = { 0, 0 };
> +static struct et_list link_ = { 0, 0 };
>
> void initialize_krb_error_table_r(struct et_list **list);
> void initialize_krb_error_table(void);
> @@ -65,8 +65,8 @@ void initialize_krb_error_table_r(struct et_list **list)
> return;
> et = malloc(sizeof(struct et_list));
> if (et == 0) {
> - if (!link.table)
> - et = &link;
> + if (!link_.table)
> + et = &link_;
> else
> return;
> }
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists