>>>>> "Lars" == Lars Gullik Bj�nnes <[EMAIL PROTECTED]> writes:

[Michael, I'm not sure you saw Lars' answer, since you may not be on
the list... So I leave it complete]

Lars> Michael <[EMAIL PROTECTED]> writes: | Content-Type: text/plain;
Lars> charset=iso-8859-1 | Content-Transfer-Encoding: base64 | |
Lars> Jean-Marc Lasgouttes wrote: | | > What is the reason for the
Lars> -I/usr/include ion the command line? | | I saw "no prototype for
Lars> kill" and "no definition for errno" and such | so I included
Lars> this.

Lars> Could it be that you need a

Lars> using std::errno; ?

Lars> Try that instead of inluding errno.h

It seems that CC defines many (all?) C functions in std namespace. How
are we going to handle that? Does adding 'using' directives make sense
on other compilers?

Lars> | 3. |
Lars> ------------------------------------------------------------------------
Lars> | /bin/sh ../../libtool --mode=compile CC -DHAVE_CONFIG_H -I.
Lars> -I. | -I../../src -I./../ -I/usr/local/include |
Lars> -I/workshop/SUNWspro/SC5.0/include/CC -I/home/fan/local/include
Lars> | -I/usr/openwin/include -g -c figinset.C | CC -DHAVE_CONFIG_H
Lars> -I. -I. -I../../src -I./../ -I/usr/local/include |
Lars> -I/workshop/SUNWspro/SC5.0/include/CC -I/home/fan/local/include
Lars> | -I/usr/openwin/include -g -c figinset.C -o | figinset.o |
Lars> "/usr/include/sys/signal.h", line 72: Warning (Anachronism):
Lars> Attempt | to redefine SIGRTMIN without using #undef. |
Lars> "/usr/include/sys/signal.h", line 73: Warning (Anachronism):
Lars> Attempt |to redefine SIGRTMAX without using #undef.

Lars> I am inclined to put those two down as "bugs" in the libraries.
Lars> We could of course check that we don't ever include signal.h
Lars> ourselves.

Lars> | "../../src/insets/insetbib.h", line 132: Warning: |
Lars> InsetBibtex::display hides the virtual function |
Lars> Inset::display(bool).

Lars> This is a bogus warning. It is a perfectly overloaded member
Lars> function.

Of course not. The Inset::display is not 'const'.

Lars> | "../../src/support/filetools.h", line 102: Error: errno is not
Lars> | defined.

Lars> try using std::errno;

Lars> | "figinset.C", line 257: Error: The function "kill" must have a
Lars> prototype. | "figinset.C", line 272: Error: The function "kill"
Lars> must have a prototype. | "figinset.C", line 472: Error: The
Lars> function "kill" must have a | prototype.

Lars> kill is not C or C++ and should not be in c++ headers... but
Lars> perhaps you could try the using trick here too.

Lars> using std::kill;

Lars> | "figinset.C", line 1727: Error: Unknown preprocessor
Lars> directive.

Lars> I am not sure what this referes too.

Lars> | 4. | -------------------------------------------- |
Lars> "figinset.C", line 1728: Error: Unknown preprocessor directive.
Lars> | --------------------------------------------- | I comment out
Lars> "#warning rewrite this method to use ifstream" in
Lars> |src/insets/figinset.C and go on

Lars> I thought compilers were required to ignore unknown preprocessor
Lars> directives.

Should we test for that in configure?

Lars> | | 5. |
Lars> ----------------------------------------------------------------------
Lars> | "insetlatexaccent.C", line 645: Error: |
Lars> InsetLatexAccent::ACCENT_TYPES is not accessible from file
Lars> level. |
Lars> -----------------------------------------------------------------------
Lars> | I make InsetLatexAccent::ACCENT_TYPES "public" in |
Lars> src/insets/insetlatexaccent.h and go on | don't blame me for
Lars> ruining OO party:( I think this is a silly | compiler, how come
Lars> a friend couldn't access private member I don't | understand.

Lars> A bit strange, but I think I actually agree with the compiler...
Lars> move the public: down below ACCENT_TYPES and remove the friend.

Lars> | 7. |
Lars> -------------------------------------------------------------------------
Lars> | "filetools.C", line 325: Error: Formal argument 1 of type
Lars> char* in | call to putenv(char*) is being passed const char*. |
Lars> 1 Error(s) detected. |
Lars> -------------------------------------------------------------------------
Lars> | change line 325 from | retval = putenv((new
Lars> string(envstr))->c_str()); | to | retval = putenv((char*)((new
Lars> string(envstr))->c_str())); | and go on

Lars> I wonder if we use putenv correcly at all... Or do we leak
Lars> memory here?

putenv() needs a char const * argument in all OS I've checked _except_
solaris 7 which wants char * (solaris 2.6 uses char const *). I really
do not know what to do about that... It seems that putenv() is not
standard at all. Should we prefer using setenv()?

Lars> | 8. finally stuck here: |
Lars> ----------------------------------------------------------- |
Lars> "lstrings.C", line 178: Error: Could not find a match for |
Lars> std::count<>(const char*, const char*, const char).

Lars> Does CC support member templates? It seems that it is missing
Lars> the correct count prototype.

Lars> This can be bypassed like this:

Lars>  string::size_type n = 0; count(x.begin(), x.end(), n); return
Lars> n;

Lars> | Yes, no I explicitly include this but I think it's not
Lars> nessary. Our | system just got overhauled and I suspect
Lars> something was setup | correctly.

Lars> incorreclty?

I guess that's what Michael meant.

JMarc

Reply via email to