Forum Jump

Select Group :
Select Forum :
Sorted By :
Sort Order :
From The :
 
Thread Tools  Search this thread 
porthos3
Total Points:
10
Registered User
July 7, 2009 3:13 PM PDT
error: identifier "S_ISUID" is undefined
I am attempting to port a benchmark from linux to windows. I am using the Intel C++ Compiler,
and I have C99 support enabled. When I try to build the project, I get the following errors:
.\decoder.c(192): error: identifier "S_ISUID" is undefined
      fchmod(fd, ~(S_ISUID | S_ISGID |S_IXGRP | S_IXUSR | S_IXOTH));
                   ^

.\decoder.c(192): error: identifier "S_ISGID" is undefined
      fchmod(fd, ~(S_ISUID | S_ISGID |S_IXGRP | S_IXUSR | S_IXOTH));
                             ^

.\decoder.c(192): error: identifier "S_IXGRP" is undefined
      fchmod(fd, ~(S_ISUID | S_ISGID |S_IXGRP | S_IXUSR | S_IXOTH));
                                      ^

.\decoder.c(192): error: identifier "S_IXUSR" is undefined
      fchmod(fd, ~(S_ISUID | S_ISGID |S_IXGRP | S_IXUSR | S_IXOTH));
                                                ^

.\decoder.c(192): error: identifier "S_IXOTH" is undefined
      fchmod(fd, ~(S_ISUID | S_ISGID |S_IXGRP | S_IXUSR | S_IXOTH));
                                                          ^

The portion of code that appears to be causing the errors is this:

Reassemble(void * args) {
  int chunkcount = 0;

  int fd = -1;
  struct chunk_list * list_head, * p;
  list_head = NULL;

  if (args != NULL) {
    fd = open((char *)args, O_CREAT|O_WRONLY|O_TRUNC);
    if (fd < 0) 
      perror("Reassemble open");
    fchmod(fd, ~(S_ISUID | S_ISGID |S_IXGRP | S_IXUSR | S_IXOTH)); //Error points to this line.
  }
  
  //The rest of the function...
  
}

tim18
Total Points:
68,267
Status Points:
68,267
Black Belt
July 7, 2009 5:58 PM PDT
Rate
 
#1
fchmod() isn't C99; it's an IEEE 1003.1 "posix" function not found in a basic Windows installation.  SFU "services for linux" might support it in a compatible form.


Om Sachan (Intel)
Total Points:
7,230
Status Points:
6,730
Brown Belt
July 8, 2009 11:49 PM PDT
Rate
 
#2 Reply to #1

You may need to change your code and use fileAccessControl() to implement this on Windows.





Intel Software Network Forums Statistics

8445 users have contributed to 31553 threads and 100398 posts to date.
In the past 24 hours, we have 10 new thread(s) 30 new posts(s), and 43 new user(s).

In the past 3 days, the most popular thread for everyone has been Lost in MKL The most posts were made to TBB on linux segfaulting The post with the most views is Hi,if you were using imsl yo

Please welcome our newest member nonamez