[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: C library problem



I get the same linking problems with developer board LX and linux 2.4.
Seams like alphasort and scandir are missing in uC-libc. Maybe
you can port them from glibc or get them from the Lineo uC-libc?

/Mikael

-----Original Message-----
From: owner-dev-etrax@xxxxxxx.com]On">mailto:owner-dev-etrax@xxxxxxx.com]On
Behalf Of Dragan Stancevic
Sent: Friday, April 27, 2001 3:34 AM
To: dev-etrax
Subject: Re: C library problem


On Tue, Apr 24, 2001 at 09:08:25AM -0700, Dragan Stancevic wrote:

Can anyone with an LX board try to compile this code for me, and let me know
if it works, it doesn't work on my etrax100 board? It fails during linking.

> 
> Can anyone try to compile this code and and see if it works on devboard LX?
> 
> #include <dirent.h>
> 
> int sort_dir(char *path){
>     int err;
>     struct dirent **nlist;
>  
>     err = scandir(path, &nlist, 0, alphasort);
>  
>     if (err < 0){
>         perror(__FUNCTION__);
>         return errno;
>     }
>     else
>         while(err--) printf("%s\n", nlist[err]->d_name);
>  
>     return 0;
> }  
> 
> int main(){
> 	sort_dir(".");
> 	return 0;
> }

-- 
                                    | 1. Wild enthusiam
Historic Project Stages for all     | 2. Gradual disillusionment
Silicon Valley Projects.            | 3. Search for the guilty
                                    | 4. Punishment of the innocents
Where are you at?                   | 5. Promotion of non-participants