Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Date: Fri, 3 Dec 1999 03:10:58 +0100 From: Ivan Marcak Message-Id: <199912030210.DAA09104@a1fel.feld.cvut.cz> To: cygwin AT sourceware DOT cygnus DOT com Subject: strange fopen Hi, I have problem with fopen() files with char '%' in name (cygwin-b20 under Win98). Here is example: /*---------------------------------------------------------*/ #include #include #include int main(void) { FILE *fp; WIN32_FIND_DATA l1; HANDLE hDir; hDir=FindFirstFile("*",&l1); do { if(strcmp(l1.cFileName,".")==0) continue; if(strcmp(l1.cFileName,"..")==0) continue; printf("name:%s ",l1.cFileName); if((fp=fopen(l1.cFileName,"rb"))!=NULL) { printf("ok\n"); fclose(fp); } else { printf("err:%s\n",strerror(errno)); }; } while(FindNextFile(hDir,&l1)==TRUE); } /*---------------------------------------------------------*/ and results: $ gcc d.c $ ls -la a----w 301765 03-Dec-99 2:59:44 a.exe a----w 500 03-Dec-99 2:57:02 d.c a----w 7 03-Dec-99 2:31:38 test% 3 files. $ a.exe name:test% err:No such file or directory name:d.c ok name:a.exe ok Strange is that if I'm using -mno-cygwin it works fine: $ gcc d.c -mno-cygwin $ ls -la a----w 172168 03-Dec-99 3:03:00 a.exe a----w 500 03-Dec-99 2:57:02 d.c a----w 7 03-Dec-99 2:31:38 test% 3 files. $ a.exe name:a.exe ok name:test% ok name:d.c ok Can anybody tell me where is problem ? -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com