http://www.riscos.info/bugzilla3/show_bug.cgi?id=239
Summary: opendir() with trailing directory separator and RISC
OS filename semantics.
Product: GCC/GCCSDK
Version: other
Platform: Other
OS/Version: RISC OS
Status: NEW
Severity: normal
Priority: P1
Component: C compiler
AssignedTo: John.Tytgat@aaug.net
ReportedBy: duncan_moore@ntlworld.com
Estimated Hours: 0.0
GCCSDK GCC 4.1.2 Release 2 Development 2012-05-05
VRPC RISC OS 4.39
#include <stdio.h> // printf
#include <stdlib.h> // system
#include <dirent.h> // opendir
#include <unixlib/local.h> // __riscosify_control
int __riscosify_control;
//---------------------------------------------------------------------------
int main(void) {
system("CDir dir_u");
system("CDir dir_r");
__riscosify_control&=~__RISCOSIFY_NO_PROCESS; // Unix names
if (!opendir("dir_u/")) printf("Error with Unix names\n");
__riscosify_control|=__RISCOSIFY_NO_PROCESS; // RISC OS names
if (!opendir("dir_r.")) printf("Error with RISC OS names\n");
system("Delete dir_r");
system("Delete dir_u");
return 0;
}
opendir() works with Unix filename semantics, but fails with RISC OS semantics
when there is a trailing directory separator:
*test
Error with RISC OS names
*
It shouldn't give any output at all.
--
Configure bugmail: http://www.riscos.info/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
_______________________________________________
GCCSDK mailing list gcc@gccsdk.riscos.info
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK
No comments:
Post a Comment