On Sunday, March 23, 2003, at 12:25 PM, Anton Ertl wrote:


=?ISO-8859-1?Q?Jorge_Acereda_Maci=E1?= wrote:

Found the problem.


I was configuring with -D_POSIX_SOURCE defined.

That resulted in a config.h telling that fseeko() was available and
ftello() wasn't (or viceversa). That caused strange behaviour when
calling read-line within save-input/restore-input (read-line returned
-37 for wior, probably due to a non-working reposition-file).

I will package gforth for fink configuring as:

./configure --enable-force-reg --enable-direct-threaded --without-debug
CC=gcc2 CFLAGS="-I%p/include -no-cpp-precomp"

--enable-force-reg: no effect on Power/PPC


--enable-direct-threaded: no effect on Gforth >=0.6.0

--without-debug: this is the default

Hey, what a success :-)



-no-cpp-precomp: The gcc version I use disables cpp-precomp with "-traditional-cpp". Is the -no-cpp-precomp flag available in all Mac versions of gcc? I did not find it in the docs when I looked.

In this case it probably doesn't matter. -no-cpp-precomp is Apple-specific.


From the Apple gcc manual page:

<quote>
       -no-cpp-precomp
           By default, Apple's GCC preprocesses C and Objective-C
           with a special preprocessor called cpp-precomp that
           supports precompiled headers.  This preprocessor can-
           not always handle every construct that GCC supports;
           use -no-cpp-precomp to switch to using GNU cpp
           instead.  (APPLE ONLY)
</quote>

From the fink porting manual at:
http://fink.sourceforge.net/doc/porting/basics.php#compiler

<quote>
Long story: The compiler tool chain in the Mac OS X Developer Tools is a strange beast. The compiler is based on the gcc 2.95.2 suite, with modifications to support the Objective C language and some Darwin quirks. The preprocessor (cpp) is available in two versions. One is the standard precompiler (from gcc 2.95.2), the other one is a special precompiler written by Apple, with support for precompiled headers. The latter one is used by default, because it is faster. However, some code doesn't compile with Apple's precompiler, so you must use the -no-cpp-precomp option to get the standard precompiler. (Note: I previously recommended the -traditional-cpp option. The semantics of this option have changed slightly with GCC 3, breaking most packages that use it. -no-cpp-precomp has the desired effect on both the current Developer Tools and future compilers based on GCC 3.)
</quote>



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to