Changeset 3155


Ignore:
Timestamp:
2002-06-17T21:20:27+12:00 (20 years ago)
Author:
sjboddie
Message:

Removed the crappy GSDL_GET_FILEDESC stuff as it's no longer needed now
that we're using C style I/O when file locking is required.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/lib/gsdlconf.h

    r3052 r3155  
    100100#endif
    101101
    102 #if defined (GSDL_USE_IOS_H)
    103102#include <io.h>
    104103#include <sys/locking.h>
    105 
    106 #if defined(__GNUC__) /* not gcc >= 3 - this has GSDL_USE_IOS_H */
    107 #define GSDL_GET_FILEDESC(str) str.filedesc()
    108 #else
    109 #define GSDL_GET_FILEDESC(str) str.fd()
    110 #endif
    111104
    112105#define GSDL_UNLOCK_FILE(fd) _locking(fd, LK_UNLCK, 200)
    113106#define GSDL_LOCK_FILE(fd) lock_val = _locking(fd, LK_NBLCK, 200)
    114107
    115 #else    /* ifdef GSDL_USE_IOS_H */
    116 
    117 // when using <fstream> (i.e. VC++ 6.0) I can't work out how
    118 // to return a filedesc. File locking won't currently work
    119 // for those windows compilers requiring GSDL_USE_IOS_H to
    120 // not be set -- Stefan.
    121 #define GSDL_GET_FILEDESC(str) 1
    122 #define GSDL_LOCK_FILE(fd) lock_val = 0
    123 #define GSDL_UNLOCK_FILE(fd) 0
    124 #endif
    125 
    126108#else     /* not WIN32 */
    127 // darwin (Mac OS X) requires _STREAM_COMPAT to be set when
    128 // including <fstream.h> for filedesc() to be declared...
    129 #define GSDL_GET_FILEDESC(str) str.filedesc()
    130109
    131110#if GSDL_USE_FLOCK
Note: See TracChangeset for help on using the changeset viewer.