This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

building gcc-3.2.3 as a cross compiler to make cygwin programs


hello

i have build gcc-3.2.3 as a cross compiler on a linux pc to make cygwin programs (host=i686-pc-gnu-linux target=i686-pc-cygwin).
Those work fine but the programs produced by the compiler doesn't work under cygwin. In fact it seems that they cannot access the filesystems.


for example this program:
__Begin_of_program__
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>

main()
{
	struct stat st;
	if (stat ("/mnt", &st) < 0
	  || S_ISDIR (st.st_mode))
	printf("-1\n");
	else
	printf("0\n");
}
__end_of_program__

it compile without any error or warning but under cygwin i have 0 as a result but the directory /mnt exist and the same program built with cygwin's gcc or gcc-3.2.3 compiled under cygwin work.

if anyone had an idea


------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]