Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/gentls_offsets')
-rwxr-xr-xwinsup/cygwin/gentls_offsets3
1 files changed, 3 insertions, 0 deletions
diff --git a/winsup/cygwin/gentls_offsets b/winsup/cygwin/gentls_offsets
index 375b66840..c69488a36 100755
--- a/winsup/cygwin/gentls_offsets
+++ b/winsup/cygwin/gentls_offsets
@@ -50,14 +50,17 @@ main(int argc, char **argv)
$struct foo[1];
# define foo_end ((char *) (foo + 1))
# define offset(f) (((char *) &(foo->f)) - foo_end)
+# define poffset(f) (((char *) &(foo->f)) - ((char *) foo))
EOF
print TMP 'puts ("//;# autogenerated: Do not edit.\n");', "\n\n";
for my $f (@fields) {
print TMP ' printf ("//; $tls::', $f, ' = %d;\n", ', "offset($f));\n";
+ print TMP ' printf ("//; $tls::p', $f, ' = %d;\n", ', "poffset($f));\n";
}
print TMP ' puts ("//; __DATA__\n");', "\n";
for my $f (@fields) {
print TMP ' printf ("#define tls_', $f, ' (%d)\n", ', "offset($f));\n";
+ print TMP ' printf ("#define tls_p', $f, ' (%d)\n", ', "poffset($f));\n";
}
print TMP <<EOF;