aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-11-10 06:52:29 +0000
committerMike Frysinger <vapier@gentoo.org>2008-11-10 06:52:29 +0000
commit189734b5b1fffa6495ef0062b8fdfdccb7f3f5eb (patch)
tree69ab15967c501322064642c7b2ec78767286dec6 /scripts
parentsvn2cl: also update xsl to 0.9 (diff)
downloadsandbox-189734b5b1fffa6495ef0062b8fdfdccb7f3f5eb.tar.gz
sandbox-189734b5b1fffa6495ef0062b8fdfdccb7f3f5eb.tar.bz2
sandbox-189734b5b1fffa6495ef0062b8fdfdccb7f3f5eb.zip
scripts: strip whitespace
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/gen_symbol_header.awk20
-rw-r--r--scripts/gen_symbol_version_map.awk20
2 files changed, 20 insertions, 20 deletions
diff --git a/scripts/gen_symbol_header.awk b/scripts/gen_symbol_header.awk
index ef5a29f..7416243 100644
--- a/scripts/gen_symbol_header.awk
+++ b/scripts/gen_symbol_header.awk
@@ -36,7 +36,7 @@ BEGIN {
break;
}
}
-
+
if (ADD) {
SYMBOL_LIST[symbol_array[1]] = SYMBOL_LIST[symbol_array[1]] " " $NF;
PROCESSED_SYMBOLS[$NF] = $NF;
@@ -46,7 +46,7 @@ BEGIN {
sym_regex = "^__" SYMBOLS[x] "(@@|$)";
if (($5 == "WEAK") && ($NF ~ sym_regex)) {
split($NF, symbol_array, /@@/);
-
+
# Don't add local symbols of versioned libc's
if (VERSIONED_LIBC && !symbol_array[2])
continue;
@@ -68,7 +68,7 @@ BEGIN {
break;
}
}
-
+
if (ADD) {
WEAK_SYMBOLS[SYMBOLS[x]] = WEAK_SYMBOLS[SYMBOLS[x]] " " $NF;
PROCESSED_SYMBOLS[$NF] = $NF;
@@ -85,10 +85,10 @@ END {
for (i = 1; i <= COUNT; i++) {
sym_index = SYMBOLS[i];
split(SYMBOL_LIST[sym_index], sym_full_names);
-
+
for (x in sym_full_names) {
split(sym_full_names[x], symbol_array, /@|@@/);
-
+
# Defualt symbol have '@@' and not '@', so name it by
# prepending '__' rather than the symbol version so
# that we know what the name is in libsandbox.c ...
@@ -99,7 +99,7 @@ END {
sym_real_name = sym_full_names[x];
gsub(/@|\./, "_", sym_real_name);
}
-
+
printf("#define symname_%s \"%s\"\n", sym_real_name, sym_index);
# We handle non-versioned libc's by setting symver_*
@@ -109,7 +109,7 @@ END {
else
printf("#define symver_%s \"%s\"\n", sym_real_name,
symbol_array[2]);
-
+
printf("#define EXTERN_NAME %s\n", sym_index);
printf("#define WRAPPER_NAME %s\n", sym_real_name);
printf("#define WRAPPER_TRUE_NAME true_%s\n", sym_real_name);
@@ -121,7 +121,7 @@ END {
printf("#undef WRAPPER_TRUE_NAME\n");
printf("#undef WRAPPER_SYMNAME\n");
printf("#undef WRAPPER_SYMVER\n");
-
+
if (symbol_array[2]) {
# Only add symbol versions for versioned libc's
if (sym_full_names[x] ~ /@@/)
@@ -138,7 +138,7 @@ END {
if (WEAK_SYMBOLS[sym_index]) {
split(WEAK_SYMBOLS[sym_index], sym_weak_full);
-
+
for (y in sym_weak_full) {
split(sym_weak_full[y], sym_weak_array, /@@/);
@@ -150,7 +150,7 @@ END {
sym_weak_array[1]);
}
}
-
+
printf("\n");
}
}
diff --git a/scripts/gen_symbol_version_map.awk b/scripts/gen_symbol_version_map.awk
index 1423514..78ffa3c 100644
--- a/scripts/gen_symbol_version_map.awk
+++ b/scripts/gen_symbol_version_map.awk
@@ -27,7 +27,7 @@ BEGIN {
# Handle non-versioned libc's like uClibc ...
if (!symbol_array[2])
symbol_array[2] = "";
-
+
# We have a versioned libc
if (symbol_array[2] && !VERSIONED_LIBC)
VERSIONED_LIBC = 1;
@@ -40,7 +40,7 @@ BEGIN {
break;
}
}
-
+
if (ADD) {
SYMBOL_LIST[symbol_array[2]] = SYMBOL_LIST[symbol_array[2]] " " symbol_array[1];
PROCESSED_SYMBOLS[$NF] = $NF;
@@ -50,7 +50,7 @@ BEGIN {
sym_regex = "^__" SYMBOLS[x] "(@@|$)";
if (($5 == "WEAK") && ($NF ~ sym_regex)) {
split($NF, symbol_array, /@@/);
-
+
# Don't add local symbols of versioned libc's
if (VERSIONED_LIBC && !symbol_array[2])
continue;
@@ -63,7 +63,7 @@ BEGIN {
# Handle non-versioned libc's like uClibc ...
if (!symbol_array[2])
symbol_array[2] = "";
-
+
# We have a versioned libc
if (symbol_array[2] && !VERSIONED_LIBC)
VERSIONED_LIBC = 1;
@@ -76,7 +76,7 @@ BEGIN {
break;
}
}
-
+
if (ADD) {
SYMBOL_LIST[symbol_array[2]] = SYMBOL_LIST[symbol_array[2]] " " symbol_array[1];
PROCESSED_SYMBOLS[$NF] = $NF;
@@ -99,7 +99,7 @@ END {
# Handle non-versioned libc's like uClibc ...
COUNT = 1;
}
-
+
for (i = 1; i <= COUNT; i++) {
if (VERSION_LIST[i]) {
sym_version = VERSION_LIST[i];
@@ -109,11 +109,11 @@ END {
sym_version = "";
printf("{\n");
}
-
+
printf(" global:\n");
-
+
split(SYMBOL_LIST[sym_version], sym_names);
-
+
for (x in sym_names) {
printf(" %s;\n", sym_names[x]);
}
@@ -125,7 +125,7 @@ END {
} else {
printf("} %s;\n", old_sym_version);
}
-
+
old_sym_version = sym_version;
}
}