S_IRUSR S_IWUSR
-
I have following line of code:
open(pathname, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
which generate 2 errors:
error C2065: 'S_IRUSR' : undeclared identifier
error C2065: 'S_IWUSR' : undeclared identifierI've read on internet that these IDs are declared inside
#include
but inside this file I don't have such IDs. But I replaced them with:open(pathname, O_RDWR | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
(I mean: S_IREAD | S_IWRITE) Just to be sure, it is ok like that ?
-
I have following line of code:
open(pathname, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
which generate 2 errors:
error C2065: 'S_IRUSR' : undeclared identifier
error C2065: 'S_IWUSR' : undeclared identifierI've read on internet that these IDs are declared inside
#include
but inside this file I don't have such IDs. But I replaced them with:open(pathname, O_RDWR | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
(I mean: S_IREAD | S_IWRITE) Just to be sure, it is ok like that ?
-
I have following line of code:
open(pathname, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
which generate 2 errors:
error C2065: 'S_IRUSR' : undeclared identifier
error C2065: 'S_IWUSR' : undeclared identifierI've read on internet that these IDs are declared inside
#include
but inside this file I don't have such IDs. But I replaced them with:open(pathname, O_RDWR | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
(I mean: S_IREAD | S_IWRITE) Just to be sure, it is ok like that ?
_Flaviu wrote:
it is ok like that ?
As long as
S_IREAD
has the same value asS_IRUSR
andS_IWRITE
has the same value asS_IWUSR
."One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
I have following line of code:
open(pathname, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
which generate 2 errors:
error C2065: 'S_IRUSR' : undeclared identifier
error C2065: 'S_IWUSR' : undeclared identifierI've read on internet that these IDs are declared inside
#include
but inside this file I don't have such IDs. But I replaced them with:open(pathname, O_RDWR | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
(I mean: S_IREAD | S_IWRITE) Just to be sure, it is ok like that ?