Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo in h2ph generates bogus perl code #413

Closed
p5pRT opened this issue Aug 21, 1999 · 2 comments
Closed

Typo in h2ph generates bogus perl code #413

p5pRT opened this issue Aug 21, 1999 · 2 comments

Comments

@p5pRT
Copy link

p5pRT commented Aug 21, 1999

Migrated from rt.perl.org#1248 (status was 'resolved')

Searchable as RT1248$

@p5pRT
Copy link
Author

p5pRT commented Aug 21, 1999

From pere@hungry.com

  unless defined(&LOG_PRI) {
  sub LOG_PRI {
  local($p) = @​_;
  eval "(($p) &LOG_PRIMASK)";
  }
  }

It was the result of the following from sys/syslog.h​:

  #define LOG_PRI(p) ((p) & LOG_PRIMASK)

Is this fixed in later versions?
--
##> Petter Reinholdtsen <## | pere@​td.org.uit.no
O- <SCRIPT Language="Javascript">window.close()</SCRIPT>
http​://www.hungry.com/~pere/ | Go Mozilla, go! Go!

@p5pRT
Copy link
Author

p5pRT commented Aug 21, 1999

From [Unknown Contact. See original ticket]

On Sat, Aug 21, 1999 at 08​:53​:45PM +0200, Petter Reinholdtsen wrote​:

I currently using perl5.004_04 on RedHat Linux 5.2, and I just
discovered a bug in h2ph generating bogus perl code. It writes
'unless defined(..) {...}' instead if 'unless (defined(...)) {...}'.
Example from sys/syslog.ph​:

unless defined\(&LOG\_PRI\) \{
sub LOG\_PRI \{
    local\($p\) = @&#8203;\_;
    eval "\(\($p\)   &LOG\_PRIMASK\)";
\}
\}

It was the result of the following from sys/syslog.h​:

\#define LOG\_PRI\(p\)      \(\(p\) & LOG\_PRIMASK\) 

Is this fixed in later versions?

  Yes.

  Peace,
* Kurt Starsinic (Kurt.Starsinic@​isinet.com) --------- Technical Specialist *
| `Perl is the Cliff Notes of Unix.' - Larry Wall |
Institute for Scientific Information http​://www.isinet.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant