d95d8c5393
* external.cc (CW_SETERRNO): Implement. * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 192 to reflect the above change. * path.cc (path_prefix_p): Treat X: as equivalent to x:. * mkglobals_h: Remove unneeded #define. * spawn.cc (spawn_guts): Avoid overly wordy initialization to zero.
29 lines
639 B
Perl
Executable File
29 lines
639 B
Perl
Executable File
#!/usr/bin/perl
|
|
my @argv = @ARGV;
|
|
$_ = join('', <>);
|
|
s/\n[^\n]*!globals.h[^\n]*\n/\n/sog;
|
|
s%/\*.*?\*/%%sog;
|
|
s/(enum\s.*?{.*?})/munge($1)/soge;
|
|
s/^(\s*)([a-zA-Z_])/$1extern $2/mog;
|
|
s/extern (extern|enum)/$1/sog;
|
|
s/\n\s*extern static[^\n]*\n/\n/sog;
|
|
s/\s+=.*?;/;/sog;
|
|
s/^\n+//sog;
|
|
s/#include "winsup\.h"\n//so;
|
|
s/-NL-/\n/sog;
|
|
s/-EQ-/=/sog;
|
|
s/\s+\n/\n/sog;
|
|
s/\n{2,}/\n/sog;
|
|
print <<PRELUDE,$_,"#endif /*_GLOBALS_H*/\n";
|
|
/* $target - Autogenerated from @argv. Look there for comments. */
|
|
|
|
#ifndef _GLOBALS_H
|
|
PRELUDE
|
|
close $target_fd;
|
|
sub munge($) {
|
|
my $val = shift;
|
|
$val =~ s/\n/-NL-/sog;
|
|
$val =~ s/=/-EQ-/sog;
|
|
return $val;
|
|
}
|