[14951] in Athena Bugs

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

Re: sun4 8.0J: perl (/usr/athena/lib/perl/sys/socket.ph)

daemon@ATHENA.MIT.EDU (Albert Dvornik)
Tue Feb 11 16:18:11 1997

From: "Albert Dvornik" <bert@MIT.EDU>
To: Greg Hudson <ghudson@MIT.EDU>
Cc: bugs@MIT.EDU
In-Reply-To: ghudson@mit.edu's message of 10 Feb 1997 (22:00:51 GMT).
             <199702102200.WAA25379@opus.MIT.EDU> 
Date: Tue, 11 Feb 1997 16:18:06 EST


> We correct bugs in third-party software depending on how important it
> is to us and how easy it is to do so.  The h2ph screw is a serious
> design flaw and is very difficult to correct.  We can try to work
> around particular cases which are important to users, but it does
> require inventing some machinery which we don't currently have in the
> build process.

This suggests that we should consider pushing the supported version to
Perl 5 (which has *much* less of this problem) in release =~ /^8.[2-9]$/.

Apart from that, I made a patch to h2ph that gets rid of this problem, and
also fixes a couple of easy-to-fix bugs I noticed while looking at the
differences between the output of "old" and "new" h2ph.  I've skimmed most
of the diffs, and I'm fairly certain that the output is, at worst, no more
broken than it was previously. =)

--bert


*** h2ph	Wed May  8 14:59:20 1996
--- h2ph	Tue Feb 11 15:35:35 1997
***************
*** 2,7 ****
--- 2,9 ----
  'di';
  'ig00';
  
+ # $Id$
+ 
  $perlincl = '/usr/athena/lib/perl';
  
  chdir '/usr/include' || die "Can't cd /usr/include";
***************
*** 143,149 ****
      while ($_ ne '') {
  	s/^(\s+)//		&& do {$new .= ' '; next;};
  	s/^(0x[0-9a-fA-F]+)//	&& do {$new .= $1; next;};
! 	s/^(\d+)//		&& do {$new .= $1; next;};
  	s/^("(\\"|[^"])*")//	&& do {$new .= $1; next;};
  	s/^'((\\"|[^"])*)'//	&& do {
  	    if ($curargs{$1}) {
--- 145,154 ----
      while ($_ ne '') {
  	s/^(\s+)//		&& do {$new .= ' '; next;};
  	s/^(0x[0-9a-fA-F]+)//	&& do {$new .= $1; next;};
! 	s/^0X([0-9a-fA-F]+)//	&& do {$new .= '0x' . $1; next;};
! 	s/^(\d+\.\d*([eE][+-]?\d+))[fFlL]?//	&& do {$new .= $1; next;};
! 	   s/^(\.\d+([eE][+-]?\d+))[fFlL]?//	&& do {$new .= $1; next;};
! 	s/^(\d+)[lL]?//		&& do {$new .= $1; next;};
  	s/^("(\\"|[^"])*")//	&& do {$new .= $1; next;};
  	s/^'((\\"|[^"])*)'//	&& do {
  	    if ($curargs{$1}) {
***************
*** 175,180 ****
--- 180,186 ----
  	    }
  	    elsif ($id eq 'defined') {
  		$new .= 'defined';
+ 		$no_eval = 1;
  	    }
  	    elsif (/^\(/) {
  		s/^\((\w),/("$1",/ if $id =~ /^_IO[WR]*$/i;	# cheat
***************
*** 193,199 ****
  		}
  	    }
  	    else {
! 		$new .= ' &' . $id;
  	    }
  	    next;
  	};
--- 199,210 ----
  		}
  	    }
  	    else {
! 		if ($no_eval) {
! 		  $new .= ' &' . $id;
! 		  $no_eval = 0;
! 		} else {
! 		  $new .= "eval('&$id')";
! 		}
  	    }
  	    next;
  	};

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