Re: getpagesize() problems

Michele Alberti <[email protected]>
Newsgroups gmane.linux.lib.dietlibc
Message-ID <[email protected]>
2009/8/10 Felix von Leitner <[email protected]>:
>> I know about "diet" but I don't want/ or can not use it on the project.
>
> Uh... why?

Because we always use only dietlibc.a. Is a mistake to use dietlibc.a
and not use "diet"?
We ship your dietlibc.a library in our project and not diet.
A switch should be the same?

>
> That does not make much sense.  You cannot expect dietlibc code to work
> with code that uses glibc headers.  For example, struct stat has a
> different size.  This will cause memory corruption.
>
> And the environ issue you noticed.

Ok, now I understand. But there is another problem. Where can I found
dietlibc man pages?
I need them otherwise I can't know that diet stat struct is different.

>
>> I know that example works well with "diet gcc (...)" compiling and linking but
>> I have to use "dietlibc.a" in linking without "diet".
>> My Makefile looks like this:
>
>> cc -static -o output <some *.o files> -nostdlib -nostartfiles
>> ../dietlibc.a -lgcc
>
> This is by and large what died gcc -o output <some *.o files> does.

Ok.

>
>> and it works since dietlibc 0.31.
>
> By coincidence, not by design.

Uh, what a fortune. :)
Thanks Felix.
Ciao,

michele
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.