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

Generated by: LCOV version 1.12