mirror of https://github.com/encounter/SDL.git
dynapi: Make gendynapi.pl work on older Perl releases.
This commit is contained in:
parent
c61ca915fb
commit
b38a5ba062
|
@ -49,9 +49,9 @@ open(SDL_DYNAPI_PROCS_H, '>>', $sdl_dynapi_procs_h) or die("Can't open $sdl_dyna
|
||||||
open(SDL_DYNAPI_OVERRIDES_H, '>>', $sdl_dynapi_overrides_h) or die("Can't open $sdl_dynapi_overrides_h: $!\n");
|
open(SDL_DYNAPI_OVERRIDES_H, '>>', $sdl_dynapi_overrides_h) or die("Can't open $sdl_dynapi_overrides_h: $!\n");
|
||||||
|
|
||||||
opendir(HEADERS, 'include') or die("Can't open include dir: $!\n");
|
opendir(HEADERS, 'include') or die("Can't open include dir: $!\n");
|
||||||
while (readdir(HEADERS)) {
|
while (my $d = readdir(HEADERS)) {
|
||||||
next if not /\.h\Z/;
|
next if not $d =~ /\.h\Z/;
|
||||||
my $header = "include/$_";
|
my $header = "include/$d";
|
||||||
open(HEADER, '<', $header) or die("Can't open $header: $!\n");
|
open(HEADER, '<', $header) or die("Can't open $header: $!\n");
|
||||||
while (<HEADER>) {
|
while (<HEADER>) {
|
||||||
chomp;
|
chomp;
|
||||||
|
|
Loading…
Reference in New Issue