Re: [PATCH xserver] sdksyms: Skip empty symbols

2018-04-12 Thread Jeff Smith
> my awk skills are non-existent but shouldn't this be $symbol? The condition a 
> few
> lines above uses $n == "" instead of n == ""
>
> with that change, Reviewed-by: Peter Hutterer 
>
> Cheers,
>Peter

Well, awk is a bit peculiar in that respect.
Noting that awk automatically splits a read line into tokens $1, $2,
$3, and so on (and $0 is the whole),
where n == 2, $n would be equal to the second token of the
most-recently read line.

"symbol" without the dollar sign is actually correct.

 - Jeff
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xserver] sdksyms: Skip empty symbols

2018-04-12 Thread Thomas Klausner
On Wed, Apr 11, 2018 at 03:39:33PM -0400, Adam Jackson wrote:
> Apparently on NetBSD we can hit failures like this:
> 
> sdksyms.c:1773:15: error: expected expression before ',' token
>  (void *) &,  /* 
> ../../dri3/dri3.h:110 */
> 
> I've been unable to reproduce that locally (even in a NetBSD vm), but
> an obvious workaround might be to just notice empty symbol names and
> ignore them rather than emit invalid C code.
> 
> Cc: Thomas Klausner 
> Signed-off-by: Adam Jackson 
> ---
>  hw/xfree86/sdksyms.sh | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

That patch fixes the problem for me, thank you!

I had another local change to the file, it doesn't look related but
perhaps it is; full patch attached.

Looking at the package, I have more changes that are not integrated,
I'll prepare a changeset later.

Thanks,
 Thomas


patch-hw_xfree86_sdksyms.sh
Description: Bourne shell script
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xserver] sdksyms: Skip empty symbols

2018-04-11 Thread Peter Hutterer
On Wed, Apr 11, 2018 at 03:39:33PM -0400, Adam Jackson wrote:
> Apparently on NetBSD we can hit failures like this:
> 
> sdksyms.c:1773:15: error: expected expression before ',' token
>  (void *) &,  /* 
> ../../dri3/dri3.h:110 */
> 
> I've been unable to reproduce that locally (even in a NetBSD vm), but
> an obvious workaround might be to just notice empty symbol names and
> ignore them rather than emit invalid C code.
> 
> Cc: Thomas Klausner 
> Signed-off-by: Adam Jackson 
> ---
>  hw/xfree86/sdksyms.sh | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/xfree86/sdksyms.sh b/hw/xfree86/sdksyms.sh
> index d927fcd165..fc171d9188 100755
> --- a/hw/xfree86/sdksyms.sh
> +++ b/hw/xfree86/sdksyms.sh
> @@ -415,7 +415,8 @@ BEGIN {
>   sub(/[^a-zA-Z0-9_].*/, "", symbol);
>  
>   #print;
> - printf("(void *) &%-50s /* %s:%s */\n", symbol ",", header, line);
> + if (symbol != "")

my awk skills are non-existent but shouldn't this be $symbol? The condition a 
few
lines above uses $n == "" instead of n == ""

with that change, Reviewed-by: Peter Hutterer 

Cheers,
   Peter

> + printf("(void *) &%-50s /* %s:%s */\n", symbol ",", header, 
> line);
>  }
>  }
>  
> -- 
> 2.17.0
> 
> ___
> xorg-devel@lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel
> 
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

[PATCH xserver] sdksyms: Skip empty symbols

2018-04-11 Thread Adam Jackson
Apparently on NetBSD we can hit failures like this:

sdksyms.c:1773:15: error: expected expression before ',' token
 (void *) &,  /* 
../../dri3/dri3.h:110 */

I've been unable to reproduce that locally (even in a NetBSD vm), but
an obvious workaround might be to just notice empty symbol names and
ignore them rather than emit invalid C code.

Cc: Thomas Klausner 
Signed-off-by: Adam Jackson 
---
 hw/xfree86/sdksyms.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/xfree86/sdksyms.sh b/hw/xfree86/sdksyms.sh
index d927fcd165..fc171d9188 100755
--- a/hw/xfree86/sdksyms.sh
+++ b/hw/xfree86/sdksyms.sh
@@ -415,7 +415,8 @@ BEGIN {
sub(/[^a-zA-Z0-9_].*/, "", symbol);
 
#print;
-   printf("(void *) &%-50s /* %s:%s */\n", symbol ",", header, line);
+   if (symbol != "")
+   printf("(void *) &%-50s /* %s:%s */\n", symbol ",", header, 
line);
 }
 }
 
-- 
2.17.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel