Changeset 131 for cpp/frams/virtfile/virtfile.h
- Timestamp:
- 02/11/14 00:01:21 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/virtfile/virtfile.h
r123 r131 72 72 73 73 74 //for some systems, we need to #undef feof which is unfortunately defined as a macro... we have to #undef just to be able to define our own function with this name. Same in virtfile.cpp 75 #if defined __BORLANDC__ || defined _MSC_VER || defined __CYGWIN__ || defined SHP 74 //since we want our own feof(VirtFILE*) function and some systems unfortunately define feof as a macro, we need to #undef it. Same as in virtfile.cpp 75 #if defined _MSC_VER || defined __CYGWIN__ || defined SHP 76 #pragma push_macro("feof") 77 #undef feof 78 #endif 79 #if defined __BORLANDC__ //does not support #pragma push_macro/pop_macro 76 80 #undef feof 77 81 #endif … … 80 84 81 85 //...and then restore the original macro: 86 #if defined _MSC_VER || defined __CYGWIN__ || defined SHP 87 #pragma pop_macro("feof") 88 #endif 82 89 #ifdef __BORLANDC__ 83 90 #define feof(__f) ((__f)->flags & _F_EOF) 84 #endif85 #ifdef _MSC_VER86 #define feof(_stream) ((_stream)->_flag & _IOEOF)87 #endif88 #ifdef __CYGWIN__89 #define feof(p) __sfeof(p)90 #endif91 #ifdef SHP92 restore original macro... if you ever want to compile this code on bada93 91 #endif 94 92
Note: See TracChangeset
for help on using the changeset viewer.