Commit 719a4fca authored by unknown's avatar unknown

Change ::fileno() to fileno() in ndb/common/util/File.cpp.

fileno(), and many other stdio functions, may be macros
(at least on *BSD).

Don't explicitly qualify it with global scope (::fileno()),
because it causes syntax errors.

<cstdio> doesn't define *most* of these macros.

It still has a macro for fileno(), however, on FreeBSD 6.1,
so even using <cstdio> isn't a fix for this.  Better to
just avoid ::standard_library_function() in general, in
order to be portable.


storage/ndb/src/common/util/File.cpp:
  fileno(), and many other stdio functions, may be macros
  (at least on *BSD).
  
  Don't explicitly qualify it with global scope (::fileno()),
  because it causes syntax errors.
  
  Note that <cstdio> doesn't define *most* of these macros.
  It still has a macro for fileno(), however, on FreeBSD 6.1,
  so even using <cstdio> isn't a fix for this.  Better to
  just avoid ::standard_library_function() in general, in
  order to be portable.
parent 39ccc1d2
...@@ -51,7 +51,7 @@ File_class::size(FILE* f) ...@@ -51,7 +51,7 @@ File_class::size(FILE* f)
MY_STAT s; MY_STAT s;
// Note that my_fstat behaves *differently* than my_stat. ARGGGHH! // Note that my_fstat behaves *differently* than my_stat. ARGGGHH!
if(my_fstat(::fileno(f), &s, MYF(0))) if (my_fstat(fileno(f), &s, MYF(0)))
return 0; return 0;
return s.st_size; return s.st_size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment