shiningstarpxx / google-glog

Automatically exported from code.google.com/p/google-glog
Other
0 stars 0 forks source link

Systems without O_NOFOLLOW #112

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Compile glog on system without O_NOFOLLOW

What is the expected output? What do you see instead?

Compiling fails with the following error: logging.cc:1654: error: 'O_NOFOLLOW' 
was not declared in this scope

What version of the product are you using? On what operating system?

Qnx crosscompiler on windows

Please provide any additional information below.

Is O_NOFOLLOW really needed? Can it be optional?

Original issue reported on code.google.com by Van...@gmail.com on 16 Jan 2012 at 4:46

GoogleCodeExporter commented 9 years ago
unistd.h is present in my system

Original comment by Van...@gmail.com on 16 Jan 2012 at 4:49

GoogleCodeExporter commented 9 years ago
I encouter the same question when I building google-log 0.3.3 on AIX.
In src/logging.cc line 1828

if (strncmp(procfd_prefix, path, strlen(procfd_prefix))) flags |= O_NOFOLLOW;

According to the code, it just appends O_NOFOLLOW to flags.

So I just ignore this line when there is no O_NOFOLLOW defined like this:

#ifdef O_NOFOLLOW
  if (strncmp(procfd_prefix, path, strlen(procfd_prefix))) flags |= O_NOFOLLOW;
#endif

Original comment by cement.x...@gmail.com on 24 May 2013 at 2:29