cccp

David Korn dkorn@pixelpower.com
Tue Apr 17 06:44:00 GMT 2001


>-----Original Message-----
>From: J F [ mailto:kclinik@dangerous.net ]
>Sent: 17 April 2001 14:12

>I've done a modification in cccp (the preprocessor not the 
>soviets ;-) ), I added two 'macros' that i called 'system' and 'shell'.
>System is equivalent to the c command and shell call 
>popen(command,"r"). for example you can do :
>
>#if ! system( [ -e /usr/bin/perl ] )
>#define HAVE_PERL
>#endif
>#define UNAME shell(uname)

  This is an interesting notion, but it means that building the code
with a cross compiler will either not work or go wrong, really.  This
is something that gcc tries very hard to avoid; in theory, a cross
compiler running on any host should generate exactly the same code as a
native compiler.  It might be better if you cast the functions as gnu C
extensions using the __system__ and __shell__ format.

>do you want to add it in the official project ?

  Not my place to say.  Seems to me like it would be useful for projects
that didn't need to go the whole autoconf hog, but the problem with
broken cross compiles might deter some people from thinking this is a
useful extension.

      DaveK
-- 
"screams erupted at a Seattle hotel where Microsoft founder Bill Gates was
addressing an education and technology conference. He was whisked away as
his audience bolted for the exits. Some audience members were knocked down
by others trying to get out."
       -- CNN 2/28/01


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



More information about the Gcc mailing list