[31284] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

krb5 commit: Make def-check.pl work with Windows git-bash perl

daemon@ATHENA.MIT.EDU (ghudson@mit.edu)
Tue Oct 31 01:20:59 2023

From: ghudson@mit.edu
To: <cvs-krb5@mit.edu>
Message-ID: <20231031052051.E223E10180D@krbdev.mit.edu>
Date: Tue, 31 Oct 2023 01:20:51 -0400 (EDT)
MIME-Version: 1.0
Reply-To: krbdev@mit.edu
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

https://github.com/krb5/krb5/commit/c20251dafd6120fa08c76b19315cb9deb1a1b24e
commit c20251dafd6120fa08c76b19315cb9deb1a1b24e
Author: unknown <ghudson@mit.edu>
Date:   Mon Oct 23 18:29:14 2023 -0700

    Make def-check.pl work with Windows git-bash perl
    
    The version of Perl included in git-bash does not translate line
    endings or filter out the end-of-file marker when reading from files
    in text mode.  Adjust def-check.pl to work in this environment.

 src/util/def-check.pl | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/util/def-check.pl b/src/util/def-check.pl
index ccdf8ef16..2f48c0296 100644
--- a/src/util/def-check.pl
+++ b/src/util/def-check.pl
@@ -40,12 +40,12 @@ my $vararg;
 LINE:
 while (! $h->eof()) {
     $_ = $h->getline();
-    chop;
+    s/(\r)?\n$//;
     # get calling convention info for function decls
     # what about function pointer typedefs?
     # need to verify unhandled syntax actually triggers a report, not ignored
     # blank lines
-    if (/^[ \t]*$/) {
+    if (/^[ \t\cZ]*$/) {
         next LINE;
     }
   Top:
@@ -79,7 +79,7 @@ while (! $h->eof()) {
 	$_ .= " ";
 	$len1 = length;
 	$_ .= $h->getline();
-	chop if $len1 < length;
+	s/(\r)?\n$// if $len1 < length;
 	goto Cloop1 if /\/\*./;
     }
     # blank lines
@@ -101,7 +101,7 @@ while (! $h->eof()) {
 	$_ .= "\n";
 	$len1 = length;
 	$_ .= $h->getline();
-	chop if $len1 < length;
+	s/(\r)?\n$// if $len1 < length;
 	goto Struct1;
     }
   Semi:
@@ -109,7 +109,7 @@ while (! $h->eof()) {
 	$_ .= "\n";
 	$len1 = length;
 	$_ .= $h->getline();
-	chop if $len1 < length;
+	s/(\r)?\n$// if $len1 < length;
 	s/\n/ /g;
 	s/[ \t]+/ /g;
 	s/^[ \t]*//;
@@ -212,7 +212,7 @@ if (!$d) {
 LINE2:
 while (! $d->eof()) {
     $_ = $d->getline();
-    chop;
+    s/[\r\n]+$//;
     #
     if (/^;/) {
         $printit = 0;
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post