Correct wrong symbol reference on sparc.

The awk script was incorrectly referencing the struct name, and
not the struct variable.
  Also added some comments to sdksyms.sh, for the reason it generates
the "symbol table" and add a message to the generated file, telling
is was automatically generated.
This commit is contained in:
Paulo Cesar Pereira de Andrade 2008-12-08 22:11:50 -02:00
commit 7c8720c143
2 changed files with 12 additions and 6 deletions

View file

@ -1,6 +1,8 @@
#!/bin/sh
cat > sdksyms.c << EOF
/* This file is automatically generated by sdksyms.sh. */
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
@ -320,6 +322,10 @@ EOF
cpp -DXorgLoader $@ sdksyms.c | awk '
BEGIN {
sdk = 0;
print("/*");
print(" * These symbols are referenced to ensure they");
print(" * will be available in the X Server binary.");
print(" */");
print("_X_HIDDEN void *xorg_symbols[] = {");
}
/^# [0-9]+/ {
@ -345,11 +351,8 @@ BEGIN {
n++;
# match
# extern _X_EXPORT struct name {
if ($n == "{")
n--;
# extern _X_EXPORT type (* name[])(...)
else if ($n ~ /^[^[:alnum:]_]+$/)
if ($n ~ /^[^[:alnum:]_]+$/)
n++;
# match
@ -389,4 +392,6 @@ STATUS=$?
cat _sdksyms.c >> sdksyms.c
rm _sdksyms.c
[ $? != 0 ] && exit $?
exit $STATUS