瀏覽代碼

S_IXGRP and S_IXOTH are not available on windows...

Samuel Thibault 4 年之前
父節點
當前提交
bee7627e77
共有 2 個文件被更改,包括 17 次插入2 次删除
  1. 9 1
      tools/starpu_fxt_data_trace.c
  2. 8 1
      tools/starpu_perfmodel_plot.c

+ 9 - 1
tools/starpu_fxt_data_trace.c

@@ -164,7 +164,15 @@ static void write_gp(char *dir, int argc, char **argv)
 	}
 
 	/* Make the gnuplot scrit executable for the owner */
-	ret = chmod(file_name, sb.st_mode|S_IXUSR|S_IXGRP|S_IXOTH);
+	ret = chmod(file_name, sb.st_mode|S_IXUSR
+#ifdef S_IXGRP
+					 |S_IXGRP
+#endif
+#ifdef S_IXOTH
+					 |S_IXOTH
+#endif
+					 );
+
 	if (ret)
 	{
 		perror("chmod");

+ 8 - 1
tools/starpu_perfmodel_plot.c

@@ -634,7 +634,14 @@ int main(int argc, char **argv)
 			}
 
 			/* Make the gnuplot scrit executable */
-			ret = chmod(gnuplot_file_name, sb.st_mode|S_IXUSR|S_IXGRP|S_IXOTH);
+			ret = chmod(gnuplot_file_name, sb.st_mode|S_IXUSR
+#ifdef S_IXGRP
+								 |S_IXGRP
+#endif
+#ifdef S_IXOTH
+								 |S_IXOTH
+#endif
+								 );
 			if (ret)
 			{
 				perror("chmod");