include/File.h
changeset 8 21a6c17f4e3e
parent 2 851de24ecb61
child 9 629f61203db1
     1.1 --- a/include/File.h	Sun Sep 20 21:25:47 2009 -0700
     1.2 +++ b/include/File.h	Mon Sep 28 23:39:08 2009 -0700
     1.3 @@ -31,7 +31,7 @@
     1.4      
     1.5      
     1.6      File (const char *filename, bool writeable =false, bool create =false)  throw(Error);
     1.7 -    File (const char *filename, int oflag)  throw(Error);
     1.8 +    File (const char *filename, int oflag, bool locked)  throw(Error);
     1.9      ~File();
    1.10      
    1.11      off_t length() const  throw(Error);
    1.12 @@ -89,9 +89,11 @@
    1.13      
    1.14  private:
    1.15      static int _open (const char *filename, int posixMode)  throw(Error);
    1.16 +    static int _check (int result)  throw(Error);
    1.17 +#ifdef OSX /* On linux, these are the same type signature to gcc */
    1.18      static ssize_t _check (ssize_t result)  throw(Error)    {_check((int)result); return result;}
    1.19      static off_t _check (off_t result)  throw(Error)    {_check((int)result); return result;}
    1.20 -    static int _check (int result)  throw(Error);
    1.21 +#endif
    1.22      static void _checkRead (ssize_t result, size_t expectedSize)  throw(Error);
    1.23      bool _lock (bool block);
    1.24      void _unlock();
    1.25 @@ -106,4 +108,4 @@
    1.26  
    1.27  }
    1.28  
    1.29 -#endif _MOOSEYARD_FILE_
    1.30 +#endif /* _MOOSEYARD_FILE_ */