Sunday, 29 April 2012

[gccsdk] [Bug 231] New: GCC 4.1.2 Rel 2 Dev 2012-04-28 glob() top-bit char problem.

http://www.riscos.info/bugzilla3/show_bug.cgi?id=231

Summary: GCC 4.1.2 Rel 2 Dev 2012-04-28 glob() top-bit char
problem.
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-04-28
SharedUnixLibrary 1.12
VRPC RISC OS 4.39

Bug fix 229 has sorted some of the problems with top-bit set characters, but
not all of them.

#include <stdio.h>
#include <glob.h>
int main(int argc,char** argv) {
--argc;++argv;
glob_t file_list;
int err=glob(*argv,0,NULL,&file_list);
printf("err = %i\n",err);
printf("file_list->gl_pathc = %lu\n",file_list.gl_pathc);
for (size_t i=0;i<file_list.gl_pathc;++i) {
printf("%lu %s\n",i,file_list.gl_pathv[i]);
}
return 0;
}

With just these 3 files in a directory:

mem
m m hard space
mém

This is correct:

*test m*
err = 0
file_list->gl_pathc = 3
0 mem
1 m m hard space
2 mém

The rest are incorrect:

*test m m hard space
err = -3
file_list->gl_pathc = 0

*test mém
err = -3
file_list->gl_pathc = 0

*test "m m" normal space
err = 0
file_list->gl_pathc = 1
0 m m normal space

--
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