Subject: Re: TenDRA compiler __RENAME and more
To: None <tech-userlevel@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: tech-userlevel
Date: 08/01/2004 21:45:22
In article <001201c47802$108bed90$d4c9f4d8@q>,
Sebastián J. D´Alessandro <wonb@uolsinectis.com.ar> wrote:
>
>Hello,
>
> I´ve compiled the Tendra C/C++ Compiler (http://www.ten15.org/),
>on NetBSD/i386 1.6ZI. I needed to make a few changes on the source files and
>finally it compiles (with gcc and tcc when it is available) and works. I
>would
>like to know if the changes are fine and if they are not, why?.
>
> There are two changes that I don´t fully understand, first the
>sources of TenDRA redefine: _POSIX_NGROUPS_MAX, _POSIX_OPEN_MAX,
>_POSIX_PATH_MAX. I commented them and let the ones of system effective, Is
>this correct?
>
> The second problem is about the definition of __RENAME, all the
>posibilities of defining __RENAME creates problems during compiling. I
>solved the problem adding to cdefs.h the following:
>
> + #ifdef __TenDRA__
> + #define __RENAME(x)
> + #else
> #error "No function renaming possible"
> + #endif
>
> What are the consecuences of the last change?. I would like to
>hear the opinion of an advanced user, that fully understand the play of
>_POSIX_NGROUPS_MAX, _POSIX_OPEN_MAX, _POSIX_PATH_MAX in the TenDRA sources
>and the play of __RENAME during the compilation of the compiler.
>
> A complete explanation of the changes and the way of repeat them
>is
>in my page http://webs.uolsinectis.com.ar/gdalessandro/tendra.htm.
>
>Thanks, Sebastián D´Alessandro.
The _POSIX_FOO defines, don't matter. The __RENAME(x) macro you need to
port to the equivalent for the tendra compiler.
void foo(void) __RENAME(__foo13);
is functionally equivalent to defining:
void __foo13(void);
to be the same as foo.
christos