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_offsets4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/gentls_offsets b/winsup/cygwin/gentls_offsets
index de9f1b993..2c96487d4 100755
--- a/winsup/cygwin/gentls_offsets
+++ b/winsup/cygwin/gentls_offsets
@@ -14,10 +14,10 @@ my $struct = '';
my @fields = ();
my $def = '';
$tls = join('', <TLS>);
-$tls =~ s/\A.*\n#pragma once\n//os;
$tls =~ s/\n[^\n]*gentls_offsets[^\n]*\n(.+)\Z/$1/os;
my $pre = $`;
substr($tls, 0, length($pre)) = '';
+$pre =~ s/\n#ifndef _[^\n]+\n/\n/os;
$pre .= "\n//*/";
$tls =~ s%/\*\s*gentls_offsets.*?/\*\s*gentls_offsets\s*\*/%%ogs;
foreach ($tls =~ /^.*\n/mg) {
@@ -60,7 +60,7 @@ main(int argc, char **argv)
# define poffset(f) (((char *) &(foo->f)) - ((char *) foo))
EOF
print TMP 'puts ("//;# autogenerated: Do not edit.\n");', "\n\n";
- print TMP "printf (\"//; \$tls::start_offset = -%d;\\n\", CYGTLS_PADSIZE);\n";
+ print TMP "printf (\"//; \$tls::sizeof_$struct = %d;\\n\", sizeof($struct\));\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";