GCCSDK GCC 4.7.4 Release 1 Development 4.7.4 2014-01-08
http://www.riscos.info/downloads/gccsdk/testing/4.7.4/gccsdk-gcc-bin-4.7.4-Rel1dev.zip
SharedUnixLibrary 1.12
VirtualRPC-Adjust RISCOS 4.39
The execute permission bit for Text files has changed to be the same as
for other filetypes. So the program below under gcc 4.1.2 gives:
Obey xxx
Text ---
and under gcc 4.7.4 gives:
Obey xxx
Text xxx
Was this change intentional? And will it stay like this, or be reverted
to the 4.1.2 behaviour? (It affects some of my regression tests).
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
static void prot(const char* filename,const char* cmd) {
system(cmd);
struct stat s;
stat(filename,&s);
printf("%s %c%c%c\n",&cmd[17],
(s.st_mode & S_IXUSR ? 'x' : '-'),
(s.st_mode & S_IXGRP ? 'x' : '-'),
(s.st_mode & S_IXOTH ? 'x' : '-'));
}
int main(void) {
system("Echo abc { > testfile }");
prot("testfile","SetType testfile Obey");
prot("testfile","SetType testfile Text");
system("Delete testfile");
return 0;
}
Regards
Duncan
_______________________________________________
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