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

Generated by: LCOV version 1.10