Bug 8612 - cproto error
cproto error
Product: Red Hat Linux
Classification: Retired
Component: cproto (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Depends On:
  Show dependency treegraph
Reported: 2000-01-19 11:24 EST by santini
Modified: 2014-03-16 22:12 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-02-01 15:44:19 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description santini 2000-01-19 11:24:27 EST
The cproto command does not work as espected. If any "#include <>"
statement is present in the source file, an error is returned, an easy way
to reproduce the error is:

  bash$ echo "#include <stdio.h>" | cproto -
  /* - */
  "/usr/include/bits/types.h", line 37: syntax error at token 'typedef'

while, if a preprocessor is specified, the error vanishes:

  bash$ echo "#include <stdio.h>" | cproto -E/lib/cpp -
  /* - */

This is strange since, according the manual, /lib/cpp should be the default
value for option -E. The strace of the first executions ends in a SIGSEV:

  read(3, "\n\n\n \n\n\n\n\n \ntypedef struct\n  {\n  "..., 4096) = 4096
  write(2, "\"/usr/include/bits/types.h\", lin"...,
38"/usr/include/bits/types.h", line 37: ) = 38
  write(2, "syntax error at token \'typedef\'\n", 32syntax error at token
'typedef' ) = 32
  --- SIGSEGV (Segmentation fault) ---
  +++ killed by SIGSEGV +++

Not a big problem (-E/lib/cpp solves it), but somehow annoyng...

	Massimo Santini

These are the relevant packages I have installed:
cproto-4.6-2 (containing cproto itself)
glibc-devel-2.1.2-11 (containing the include files)
cpp-1.1.2-24 (containing cpp)
Comment 1 Bill Nottingham 2000-02-01 15:44:59 EST
Fixed in cproto-4.6-3.

Note You need to log in before you can comment on or make changes to this bug.