This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: opendir crashes with -mno-cygwin
Here is more info about the problem.
The program is built with:
gcc -g -mno-cygwin test_dir.c -o test_dir
cygcheck -v ./test_dir.exe gives:
Found: .\test_dir.exe
.\test_dir.exe- os=4.0 img=1.0 sys=4.0
C:\WINNT\System32\KERNEL32.dll - os=5.0 img=5.0 sys=4.0
"KERNEL32.dll" v0.0 ts=2000/5/3 19:43
C:\WINNT\System32\NTDLL.DLL - os=5.0 img=5.0 sys=4.0
"ntdll.dll" v0.0 ts=2000/5/23 20:17
C:\WINNT\System32\msvcrt.dll - os=4.0 img=0.0 sys=4.0
"MSVCRT.dll" v0.0 ts=1999/9/29 21:45
C:\WINNT\System32\KERNEL32.dll (already done)
Use -h to see help about each section
I tried gcc 2.95.3-1 and 2.95.3-2 with both NT 4.0 SP6A and Windows 2000 SP1.
I attached a copy of the faulty executable. It has been renamed
test_dir.bug to avoid triggering email virus filters.
At 09:46 2001-03-30 -0500, Earnie wrote:
>"Larry Hall (RFK Partners, Inc)" wrote:
> >
> > At 10:53 AM 3/29/2001, Andre Bleau wrote:
> > >The following very simple program segfaults in opendir when compiled
> with -mno-cygwin but runs OK when not compiled with -mno-cygwin. I tried
> with both gcc 2.95.3-1 and gcc 2.95.3-2.
> > >
>-8<-
> > >
> > >When compiled with -mno-cygwin, if the directory given as an argument
> to the program does not exist, opendir returns NULL as it should. If the
> directory does exist, for example ".", opendir segfaults.
> >
>
>Works for me. gcc-2.95.2-9. NT 4 sp4
>
> > Where are you getting the implementation of opendir() for -mno-cygwin?
> >
>
>It's a MinGW default library function.
>
>Earnie.
Right, it is from the latest mingw package for Cygwin. The include file is
/usr/include/mingw/dirent.h and the lib is /usr/lib/mingw/libmingw32.a .
test_dir.bug
André Bleau, ing., associé de recherche
bleau@igb.umontreal.ca
Laboratoire de recherche en Imagerie et en Orthopédie
École de Technologie Supérieure
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple