LCOV - code coverage report
Current view: top level - home/alexis/m2osw/zipios/BUILD/zipios_coverage/zipios++ - zipios-config.hpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 2 2 100.0 %
Date: 2015-04-12 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : #pragma once
       2             : #ifndef ZIPIOS_CONFIG_HPP
       3             : #define ZIPIOS_CONFIG_HPP
       4             : 
       5             : /*
       6             :   Zipios++ - a small C++ library that provides easy access to .zip files.
       7             :   Copyright (C) 2000-2015  Thomas Sondergaard
       8             : 
       9             :   This library is free software; you can redistribute it and/or
      10             :   modify it under the terms of the GNU Lesser General Public
      11             :   License as published by the Free Software Foundation; either
      12             :   version 2 of the License, or (at your option) any later version.
      13             : 
      14             :   This library is distributed in the hope that it will be useful,
      15             :   but WITHOUT ANY WARRANTY; without even the implied warranty of
      16             :   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      17             :   Lesser General Public License for more details.
      18             : 
      19             :   You should have received a copy of the GNU Lesser General Public
      20             :   License along with this library; if not, write to the Free Software
      21             :   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
      22             : */
      23             : 
      24             : /** \file
      25             :  * \brief zipios configuration header.
      26             :  *
      27             :  * Various configuration parameters, all of which are defined using
      28             :  * system specific \#ifdef and similar preprocessor tests.
      29             :  *
      30             :  * This file also includes some general information such as the library
      31             :  * version and common functions and types that are public.
      32             :  */
      33             : 
      34             : #include <sys/stat.h>
      35             : 
      36             : #include <iostream>
      37             : 
      38             : #include <stdio.h>
      39             : 
      40             : 
      41             : #define    ZIPIOS_VERSION_MAJOR   2
      42             : #define    ZIPIOS_VERSION_MINOR   0
      43             : #define    ZIPIOS_VERSION_PATCH   3
      44             : #define    ZIPIOS_VERSION_STRING  "2.0.3"
      45             : 
      46             : 
      47             : namespace zipios
      48             : {
      49             : 
      50             : 
      51             : inline char const *getVersion()
      52             : {
      53             :     return ZIPIOS_VERSION_STRING;
      54             : }
      55             : 
      56             : 
      57             : typedef std::streamoff      offset_t;
      58             : 
      59             : 
      60     4502416 : inline size_t getBufferSize()
      61             : {
      62     4502416 :     return BUFSIZ;
      63             : }
      64             : 
      65             : 
      66             : } // zipios namespace
      67             : 
      68             : 
      69             : // Visual C++
      70             : #ifdef _MSC_VER
      71             : 
      72             : // Disable class-browser warning about truncated template-names
      73             : // Still needed? TBD
      74             : //#pragma warning( disable : 4786 )
      75             : 
      76             : #endif //_MSC_VER
      77             : 
      78             : #ifdef WIN32
      79             : 
      80             : // Needed for FilePath
      81             : #define S_ISREG(mode)   (((mode) & _S_IFREG) == _S_IFREG)
      82             : #define S_ISDIR(mode)   (((mode) & _S_IFDIR) == _S_IFDIR)
      83             : #define S_ISCHR(mode)   (((mode) & _S_IFCHR) == _S_IFCHR)
      84             : #define S_ISBLK(mode)   0
      85             : #define S_ISSOCK(mode)  0
      86             : #define S_ISFIFO(mode)  (((mode) & _S_IFIFO) == _S_IFIFO)
      87             : 
      88             : // TODO: change to _stat64 or whatever is required to get full 64 bit support
      89             : typedef struct stat     os_stat_t;
      90             : 
      91             : #else
      92             : 
      93             : typedef struct stat     os_stat_t;
      94             : 
      95             : #endif
      96             : 
      97             : // vim: ts=4 sw=4 et
      98             : #endif

Generated by: LCOV version 1.10