Try compiling the option -D__GW32__ Kees Zeelenberg
----- Oorspronkelijk bericht ----- Van: "Keith Hargrove" <[EMAIL PROTECTED]> Aan: <[EMAIL PROTECTED]> Verzonden: dinsdag 7 september 2004 23:03 Onderwerp: [GnuWin32-Users] Stat does not work with libgw32c > I have been trying to get libgw32c to work but it seems stat is broken. > > so I was going to try to make a new version with out stat. > but it seems to need some patch for mingw that is no where to be found. > > Can anyone make libgw32c from sorce?? > If so what is the magic to make it work.. > > > > > ###################################################################### > > # wc .MegaTunix/config > 27 58 1326 .MegaTunix/config > > If I use mingw's stat I get 1326 but if I use gw32c I get 0 > including winx/*.h does not change it one way or the other. > ###################################################################### > # stat test program ## > ####################### > /* > mingw under windows > > gcc -IC:/GTK/include/glib-2.0 -IC:/GTK/lib/glib-2.0/include test.c -lws2_32 > -lole32 -luuid gcc -I/mingw/include/glibc -IC:/GTK/include/glib-2.0 > -IC:/GTK/lib/glib-2.0/include test.c -lgw32c -lws2_32 -l ole32 -luuid > > mingw cross under linux > > i386-mingw32msvc-gcc -I/target/include/gtk-2.0 -I/target/lib/gtk-2.0/includ e > -I/target/include/glib-2.0 -I/ta rget/lib/glib-2.0/include test.c -lws2_32 > -lole32 -luuid > > i386-mingw32msvc-gcc -I/target/include/glibc -I/target/include/gtk-2.0 > -I/target/lib/gtk-2.0/include -I/targe t/include/glib-2.0 > -I/target/lib/glib-2.0/include test.c -lgw32c -lws2_32 -lole32 -luuid */ > #include <stdio.h> > #include <winx/stdiox.h> > #include <stdlib.h> > #include <winx/stdlibx.h> > #include <string.h> > #include <winx/stringx.h> > #include <glib.h> > #include <sys/stat.h> > #include <winx/sys/statx.h> > > #define filename ".MegaTunix/config" > main () > { > > printf ("tesing stat \n"); > > FILE *file; > gchar *buffer, **lines, *tmp; > gint i; > struct stat stats; > > if (stat(filename, &stats) == -1) > printf("no file!\n"); > if (!(file = fopen(filename, "r"))) > printf("open error!\n"); > printf( "File length after: %ld\n", _filelength( file ) ); > printf("bytes %d %s\n" , stats.st_size, filename); > > > } > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > GnuWin32-Users mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/gnuwin32-users > ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php _______________________________________________ GnuWin32-Users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/gnuwin32-users