bug-cflow
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-cflow] cflow-1.1 doesn't find main


From: Sergey Poznyakoff
Subject: Re: [Bug-cflow] cflow-1.1 doesn't find main
Date: Sat, 09 Sep 2006 06:51:49 +0300

Robert E. Michael <address@hidden> wrote:

> So there
> seems to be something wrong with the definition of _LIBC, such
> that it allows the alias of program_name to program_invocation_name,
> but somehow program_invocation_name is never set.

In fact, _LIBC is never defined, so this part of code is not
compiled.  What happens is that program_invocation_name *is* set
(lib/argp-pin.c), whereas program_name is not.  The define you are
talking about was designed to compensate for it in case of glibc code,
but it has no force otherwise.  That is why placing `#define
program_name program_invocation_name' in your config.h should fix it.
Actually, that should have been done by configure, but somehow I
forgotten to make it there:)

>     If I place "if (program_name != NULL)" before line 275 and
> recompile, then cflow runs and generates dozens of "redefined"
> error messages.  I am not sure I understand enough about the
> details of how cflow handles compiler variables like __STDC__
> and __cplusplus.

Yes, this is described in detail in the documentation (chapter 8,
"Running Preprocessor".  The online copy available at
http://www.gnu.org/software/cflow/manual).  Run it with preprocessor and
the messages will go away.  E.g.:

$ cd cflow-1.1/src
$ cflow -I.. -I. c.c

Regards,
Sergey
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]