Changeset 131 for cpp/frams/virtfile/virtfile.cpp
- Timestamp:
- 02/11/14 00:01:21 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/virtfile/virtfile.cpp
r123 r131 59 59 int fwrite(const void *ptr, size_t size, size_t nmemb, VirtFILE* f) {return f->Vwrite(ptr,size,nmemb);} 60 60 61 //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.h 62 #if defined __BORLANDC__ || defined _MSC_VER || defined __CYGWIN__ || defined SHP 61 62 //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.h 63 #if defined _MSC_VER || defined __CYGWIN__ || defined SHP 64 #pragma push_macro("feof") 65 #undef feof 66 #endif 67 #if defined __BORLANDC__ //does not support #pragma push_macro/pop_macro 63 68 #undef feof 64 69 #endif … … 67 72 68 73 //...and then restore the original macro: 74 #if defined _MSC_VER || defined __CYGWIN__ || defined SHP 75 #pragma pop_macro("feof") 76 #endif 69 77 #ifdef __BORLANDC__ 70 78 #define feof(__f) ((__f)->flags & _F_EOF) 71 #endif72 #ifdef _MSC_VER73 #define feof(_stream) ((_stream)->_flag & _IOEOF)74 #endif75 #ifdef __CYGWIN__76 #define feof(p) __sfeof(p)77 #endif78 #ifdef SHP79 restore original macro... if you ever want to compile this code on bada80 79 #endif 81 80
Note: See TracChangeset
for help on using the changeset viewer.