From e6ef32ebc2208a016354b80f794832302c1bb615 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Thu, 9 Aug 2012 10:30:02 -0700 Subject: [PATCH] Make conditional directives case insensitive Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Config.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index 8ea284ada..cdd28b30d 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -1898,9 +1898,9 @@ sub process_conditional( $$$$ ) { print "CD===> $line\n" if $debug; - cond_error( "Invalid compiler directive ($line)" , $filename, $linenumber ) unless $line =~ /^\s*\?(IF\s+|ELSE|ELSIF\s+|ENDIF)(.*)$/; + cond_error( "Invalid compiler directive ($line)" , $filename, $linenumber ) unless $line =~ /^\s*\?(IF\s+|ELSE|ELSIF\s+|ENDIF)(.*)$/i; - my ($keyword, $expression) = ( $1, $2 ); + my ($keyword, $expression) = ( uc $1, $2 ); if ( supplied $expression ) { $expression =~ s/#.*//; @@ -2508,7 +2508,7 @@ sub read_a_line($) { # # Handle conditionals # - if ( /^\s*\?(?:IF|ELSE|ELSIF|ENDIF)/ ) { + if ( /^\s*\?(?:IF|ELSE|ELSIF|ENDIF)/i ) { $omitting = process_conditional( $omitting, $_, $currentfilename, $. ); next; }