xixip / google-glog

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

C library file io functions are in std namespace #114

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Compile glog with qnx cross compiler

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

I expect compilation without errors. I see compilation errors such as:

ISO C++ forbids declaration of 'FILE' with no type

Under QNX, fdopen is in std namespace.

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

glog 0.3.2
QNX 6.5.0

Please provide any additional information below.

This patch fixes all compilation errors:

src/logging.cc

@@ -76,8 +75,19 @@
 using std::min;
 using std::ostream;
 using std::ostringstream;
 using std::strstream;

+using std::FILE;
+using std::fwrite;
+using std::fclose;
+using std::fflush;
+using std::fprintf;
+using std::perror;
+
+#ifdef __QNX__
+using std::fdopen;
+#endif
+
 // There is no thread annotation support.
 #define EXCLUSIVE_LOCKS_REQUIRED(mu)

Original issue reported on code.google.com by Van...@gmail.com on 23 Jan 2012 at 1:17

GoogleCodeExporter commented 9 years ago
Sorry for the big latency. This patch looks good to me, thanks!

Could you sign our Individual Contributor License Agreement, please? It
seems that we need to ask you to sign this to avoid any troubles. The
process is just submitting an HTML form, and it shouldn't take your
time so much.

http://code.google.com/legal/individual-cla-v1.0.html

Please note that these forms do not transfer copyright: the
contributor retains her ownership in the work. The CLA just grants
Google a "perpetual, non-exclusive, royalty-free, etc..." right to use
the work, sublicense it, and so on.

Original comment by shinichi...@gmail.com on 9 May 2012 at 8:29

GoogleCodeExporter commented 9 years ago
I've already signed it months ago. Do I need to sign it again?

Original comment by Van...@gmail.com on 9 May 2012 at 8:54

GoogleCodeExporter commented 9 years ago
Oops, sorry. I missed it. I'll apply the patch. Thanks!

Original comment by shinichi...@gmail.com on 9 May 2012 at 9:00

GoogleCodeExporter commented 9 years ago
Fixed by http://code.google.com/p/google-glog/source/detail?r=111

Thanks for your patch!

Original comment by shinichi...@gmail.com on 14 May 2012 at 7:47