Changeset 1150 for trunk/gsdl/lib


Ignore:
Timestamp:
2000-05-04T20:32:31+12:00 (24 years ago)
Author:
sjboddie
Message:

modifications for windows ports of GCC

Location:
trunk/gsdl/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/lib/fileutil.cpp

    r1076 r1150  
    2828/*
    2929   $Log$
     30   Revision 1.15  2000/05/04 08:27:28  sjboddie
     31   modifications for windows ports of GCC
     32
    3033   Revision 1.14  2000/04/06 19:57:59  cs025
    3134   Correcting a correction - reinstated all lib files due to silly
     
    168171}
    169172
    170 #if defined __WIN32__
     173#if defined(__WIN32__) && !defined(__GNUC__)
    171174
    172175#include <windows.h>
    173176
    174 BOOL read_dir (const text_t &dirname, text_tarray &filelist) {
     177bool read_dir (const text_t &dirname, text_tarray &filelist) {
    175178 
    176179  WIN32_FIND_DATA FileData; 
    177180  HANDLE hSearch;
    178   DWORD dwAttrs;
    179181  char *dirpath = dirname.getcstr();
    180182  strcat (dirpath, "\\*");
    181 
    182   BOOL finished = false;
    183183 
    184184  hSearch = FindFirstFile(dirpath, &FileData);
  • trunk/gsdl/lib/gsdlconf.h

    r1076 r1150  
    3030#define GSDLCONF_H
    3131
    32 #ifndef __WIN32__
     32#if defined(__WIN32__)
     33#include "../win32cfg.h"
     34#else
    3335#include "../config.h"
    3436#endif
     
    8486#include <io.h>
    8587#include <sys/locking.h>
     88#if defined(__GNUC__)
     89#define GSDL_GET_FILEDESC(str) str.filedesc()
     90#else
    8691#define GSDL_GET_FILEDESC(str) str.fd()
    87 #define GSDL_UNLOCK_FILE(fd) _locking(fd, LK_UNLCK, 200)
     92#endif
     93#define GSDL_UNLOCK_FILE(fd) _locking(fd, LK_UNLOCK, 200)
    8894#define GSDL_LOCK_FILE(fd) lock_val = _locking(fd, LK_NBLCK, 200)
    8995
Note: See TracChangeset for help on using the changeset viewer.