Merge branch 'hotfix-0.4.1'
This commit is contained in:
commit
6deb4fabb4
@ -41,7 +41,7 @@ include(CMakeDependentOption)
|
|||||||
|
|
||||||
set(GMIO_VERSION_MAJOR 0)
|
set(GMIO_VERSION_MAJOR 0)
|
||||||
set(GMIO_VERSION_MINOR 4)
|
set(GMIO_VERSION_MINOR 4)
|
||||||
set(GMIO_VERSION_PATCH 0)
|
set(GMIO_VERSION_PATCH 1)
|
||||||
set(GMIO_VERSION
|
set(GMIO_VERSION
|
||||||
${GMIO_VERSION_MAJOR}.${GMIO_VERSION_MINOR}.${GMIO_VERSION_PATCH})
|
${GMIO_VERSION_MAJOR}.${GMIO_VERSION_MINOR}.${GMIO_VERSION_PATCH})
|
||||||
|
|
||||||
@ -251,16 +251,24 @@ endif()
|
|||||||
if(CMAKE_C_COMPILER_IS_GCC_COMPATIBLE)
|
if(CMAKE_C_COMPILER_IS_GCC_COMPATIBLE)
|
||||||
list(APPEND CMAKE_REQUIRED_LIBRARIES m) # -lm
|
list(APPEND CMAKE_REQUIRED_LIBRARIES m) # -lm
|
||||||
endif()
|
endif()
|
||||||
check_function_exists(powf GMIO_HAVE_POWF_FUNC)
|
check_symbol_exists(powf math.h GMIO_HAVE_POWF)
|
||||||
check_function_exists(sqrtf GMIO_HAVE_SQRTF_FUNC)
|
check_symbol_exists(sqrtf math.h GMIO_HAVE_SQRTF)
|
||||||
check_function_exists(strtof GMIO_HAVE_STRTOF_FUNC)
|
check_symbol_exists(strtof stdlib.h GMIO_HAVE_STRTOF)
|
||||||
check_symbol_exists(isfinite math.h GMIO_HAVE_ISFINITE_SYM)
|
check_symbol_exists(isfinite math.h GMIO_HAVE_ISFINITE)
|
||||||
check_symbol_exists(isnan math.h GMIO_HAVE_ISNAN_SYM)
|
check_symbol_exists(isnan math.h GMIO_HAVE_ISNAN)
|
||||||
if(WIN32 AND NOT GMIO_HAVE_ISNAN_SYM)
|
check_symbol_exists(snprintf "stdio.h;stdlib.h" GMIO_HAVE_SNPRINTF)
|
||||||
check_symbol_exists(_finite float.h GMIO_HAVE_WIN__FINITE_SYM)
|
check_symbol_exists(vsnprintf stdio.h GMIO_HAVE_VSNPRINTF)
|
||||||
|
if(WIN32 AND NOT GMIO_HAVE_ISNAN)
|
||||||
|
check_symbol_exists(_finite float.h GMIO_HAVE_WIN__FINITE)
|
||||||
endif()
|
endif()
|
||||||
if(WIN32 AND NOT GMIO_HAVE_ISNAN_SYM)
|
if(WIN32 AND NOT GMIO_HAVE_ISNAN)
|
||||||
check_symbol_exists(_isnan float.h GMIO_HAVE_WIN__ISNAN_SYM)
|
check_symbol_exists(_isnan float.h GMIO_HAVE_WIN__ISNAN)
|
||||||
|
endif()
|
||||||
|
if(WIN32 AND NOT GMIO_HAVE_SNPRINTF)
|
||||||
|
check_symbol_exists(_snprintf stdio.h GMIO_HAVE_WIN__SNPRINTF)
|
||||||
|
endif()
|
||||||
|
if(WIN32 AND NOT GMIO_HAVE_VSNPRINTF)
|
||||||
|
check_symbol_exists(_vsnprintf stdio.h GMIO_HAVE_WIN__VSNPRINTF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(CMAKE_REQUIRED_LIBRARIES) # Pop changes
|
set(CMAKE_REQUIRED_LIBRARIES) # Pop changes
|
||||||
@ -270,16 +278,6 @@ check_c_source_compiles(
|
|||||||
int main() { const bool c = 0; return 0; }"
|
int main() { const bool c = 0; return 0; }"
|
||||||
GMIO_HAVE_C99_BOOL)
|
GMIO_HAVE_C99_BOOL)
|
||||||
|
|
||||||
check_function_exists(snprintf GMIO_HAVE_SNPRINTF_FUNC)
|
|
||||||
if(WIN32 AND NOT GMIO_HAVE_SNPRINTF_FUNC)
|
|
||||||
check_function_exists(_snprintf GMIO_HAVE_WIN__SNPRINTF_FUNC)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
check_function_exists(vsnprintf GMIO_HAVE_VSNPRINTF_FUNC)
|
|
||||||
if(WIN32 AND NOT GMIO_HAVE_VSNPRINTF_FUNC)
|
|
||||||
check_function_exists(_vsnprintf GMIO_HAVE_WIN__VSNPRINTF_FUNC)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Check available POSIX features
|
# Check available POSIX features
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
# See:
|
# See:
|
||||||
@ -306,22 +304,22 @@ if (NOT DEFINED HAVE_SYS_STAT_H)
|
|||||||
check_include_files(sys/stat.h GMIO_HAVE_SYS_STAT_H)
|
check_include_files(sys/stat.h GMIO_HAVE_SYS_STAT_H)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
check_function_exists(fileno GMIO_HAVE_POSIX_FILENO_FUNC)
|
check_function_exists(fileno GMIO_HAVE_POSIX_FILENO)
|
||||||
|
|
||||||
# Have fstat64() ?
|
# Have fstat64() ?
|
||||||
check_c_source_compiles(
|
check_c_source_compiles(
|
||||||
"#include <sys/stat.h>
|
"#include <sys/stat.h>
|
||||||
int main() { fstat64(0, NULL); return 0; }"
|
int main() { fstat64(0, NULL); return 0; }"
|
||||||
GMIO_HAVE_POSIX_FSTAT64_FUNC)
|
GMIO_HAVE_POSIX_FSTAT64)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
check_function_exists(_fstat64 GMIO_HAVE_WIN__FSTAT64_FUNC)
|
check_function_exists(_fstat64 GMIO_HAVE_WIN__FSTAT64)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Check size(in bytes) of stat::st_size
|
# Check size(in bytes) of stat::st_size
|
||||||
set(CMAKE_EXTRA_INCLUDE_FILES sys/stat.h)
|
set(CMAKE_EXTRA_INCLUDE_FILES sys/stat.h)
|
||||||
if(GMIO_HAVE_WIN__FSTAT64_FUNC)
|
if(GMIO_HAVE_WIN__FSTAT64)
|
||||||
check_type_size("((struct _stat64*)0)->st_size" GMIO_SIZEOF_STRUCT_STAT_ST_SIZE)
|
check_type_size("((struct _stat64*)0)->st_size" GMIO_SIZEOF_STRUCT_STAT_ST_SIZE)
|
||||||
elseif(GMIO_HAVE_POSIX_FSTAT64_FUNC)
|
elseif(GMIO_HAVE_POSIX_FSTAT64)
|
||||||
check_type_size("((struct stat64*)0)->st_size" GMIO_SIZEOF_STRUCT_STAT_ST_SIZE)
|
check_type_size("((struct stat64*)0)->st_size" GMIO_SIZEOF_STRUCT_STAT_ST_SIZE)
|
||||||
else()
|
else()
|
||||||
check_type_size("((struct stat*)0)->st_size" GMIO_SIZEOF_STRUCT_STAT_ST_SIZE)
|
check_type_size("((struct stat*)0)->st_size" GMIO_SIZEOF_STRUCT_STAT_ST_SIZE)
|
||||||
@ -342,15 +340,15 @@ if(CMAKE_C_COMPILER_IS_GCC_COMPATIBLE)
|
|||||||
# See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52624
|
# See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52624
|
||||||
check_c_source_compiles(
|
check_c_source_compiles(
|
||||||
"int main() { return (int)__builtin_bswap16(0x1122); }"
|
"int main() { return (int)__builtin_bswap16(0x1122); }"
|
||||||
GMIO_HAVE_GCC_BUILTIN_BSWAP16_FUNC)
|
GMIO_HAVE_GCC_BUILTIN_BSWAP16)
|
||||||
check_c_source_compiles(
|
check_c_source_compiles(
|
||||||
"int main() { return (int)__builtin_bswap32(0x11223344); }"
|
"int main() { return (int)__builtin_bswap32(0x11223344); }"
|
||||||
GMIO_HAVE_GCC_BUILTIN_BSWAP32_FUNC)
|
GMIO_HAVE_GCC_BUILTIN_BSWAP32)
|
||||||
elseif(MSVC)
|
elseif(MSVC)
|
||||||
check_c_source_compiles(
|
check_c_source_compiles(
|
||||||
"#include <stdlib.h>
|
"#include <stdlib.h>
|
||||||
int main() { return (int)_byteswap_ulong(0x11223344); }"
|
int main() { return (int)_byteswap_ulong(0x11223344); }"
|
||||||
GMIO_HAVE_MSVC_BUILTIN_BSWAP_FUNC)
|
GMIO_HAVE_MSVC_BUILTIN_BSWAP)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
#set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
</a>
|
</a>
|
||||||
[](https://codecov.io/gh/fougue/gmio/branch/master)
|
[](https://codecov.io/gh/fougue/gmio/branch/master)
|
||||||
[](https://github.com/fougue/gmio/blob/master/LICENSE.txt)
|
[](https://github.com/fougue/gmio/blob/master/LICENSE.txt)
|
||||||
[](https://github.com/fougue/gmio/releases)
|
[](https://github.com/fougue/gmio/releases)
|
||||||
|
|
||||||
|
|
||||||
C library for geometry input/output
|
C library for geometry input/output
|
||||||
|
@ -128,7 +128,8 @@ FULL_PATH_NAMES = YES
|
|||||||
# If left blank the directory from which doxygen is run is used as the
|
# If left blank the directory from which doxygen is run is used as the
|
||||||
# path to strip.
|
# path to strip.
|
||||||
|
|
||||||
STRIP_FROM_PATH = @CMAKE_CURRENT_SOURCE_DIR@/../src
|
STRIP_FROM_PATH = @CMAKE_CURRENT_SOURCE_DIR@/../src \
|
||||||
|
@CMAKE_CURRENT_BINARY_DIR@/../src
|
||||||
|
|
||||||
# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
|
# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
|
||||||
# the path mentioned in the documentation of a class, which tells
|
# the path mentioned in the documentation of a class, which tells
|
||||||
@ -642,7 +643,8 @@ WARN_LOGFILE =
|
|||||||
# with spaces.
|
# with spaces.
|
||||||
|
|
||||||
INPUT = @CMAKE_CURRENT_SOURCE_DIR@/../doc/mainpage.dox \
|
INPUT = @CMAKE_CURRENT_SOURCE_DIR@/../doc/mainpage.dox \
|
||||||
@CMAKE_CURRENT_SOURCE_DIR@/../src
|
@CMAKE_CURRENT_SOURCE_DIR@/../src \
|
||||||
|
@CMAKE_CURRENT_BINARY_DIR@/../src/gmio_core/version.h
|
||||||
|
|
||||||
# This tag can be used to specify the character encoding of the source files
|
# This tag can be used to specify the character encoding of the source files
|
||||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
|
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
|
||||||
|
@ -14,7 +14,7 @@ if not ARGV.empty? then
|
|||||||
script_dir_name = File.expand_path(File.dirname(__FILE__))
|
script_dir_name = File.expand_path(File.dirname(__FILE__))
|
||||||
|
|
||||||
# CMakeLists.txt
|
# CMakeLists.txt
|
||||||
path_CMakeLists_txt = "#{script_dir_name}/CMakeLists.txt"
|
path_CMakeLists_txt = "#{script_dir_name}/../CMakeLists.txt"
|
||||||
CMakeLists_txt = File.open(path_CMakeLists_txt, "r").read
|
CMakeLists_txt = File.open(path_CMakeLists_txt, "r").read
|
||||||
CMakeLists_txt.sub!(/(set\(GMIO_VERSION_MAJOR\s+)\d+/, "\\1#{major}")
|
CMakeLists_txt.sub!(/(set\(GMIO_VERSION_MAJOR\s+)\d+/, "\\1#{major}")
|
||||||
CMakeLists_txt.sub!(/(set\(GMIO_VERSION_MINOR\s+)\d+/, "\\1#{minor}")
|
CMakeLists_txt.sub!(/(set\(GMIO_VERSION_MINOR\s+)\d+/, "\\1#{minor}")
|
||||||
@ -23,7 +23,7 @@ if not ARGV.empty? then
|
|||||||
puts "Bumped #{path_CMakeLists_txt}"
|
puts "Bumped #{path_CMakeLists_txt}"
|
||||||
|
|
||||||
# README.md
|
# README.md
|
||||||
path_README_md = "#{script_dir_name}/README.md"
|
path_README_md = "#{script_dir_name}/../README.md"
|
||||||
README_md = File.open(path_README_md, "r").read
|
README_md = File.open(path_README_md, "r").read
|
||||||
README_md.sub!(
|
README_md.sub!(
|
||||||
/(img\.shields\.io\/badge\/version\-v)\d+\.\d+\.\d+/,
|
/(img\.shields\.io\/badge\/version\-v)\d+\.\d+\.\d+/,
|
||||||
@ -35,7 +35,7 @@ if not ARGV.empty? then
|
|||||||
puts "Bumped #{path_README_md}"
|
puts "Bumped #{path_README_md}"
|
||||||
|
|
||||||
# appveyor.yml
|
# appveyor.yml
|
||||||
path_appveyor_yml = "#{script_dir_name}/appveyor.yml"
|
path_appveyor_yml = "#{script_dir_name}/../appveyor.yml"
|
||||||
appveyor_yml = File.open(path_appveyor_yml, "r").read
|
appveyor_yml = File.open(path_appveyor_yml, "r").read
|
||||||
appveyor_yml.sub!(
|
appveyor_yml.sub!(
|
||||||
/(version:\s+)\d+\.\d+(_build)/,
|
/(version:\s+)\d+\.\d+(_build)/,
|
||||||
|
@ -53,30 +53,30 @@
|
|||||||
#cmakedefine GMIO_HAVE_C99_BOOL
|
#cmakedefine GMIO_HAVE_C99_BOOL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#cmakedefine GMIO_HAVE_STRTOF_FUNC
|
#cmakedefine GMIO_HAVE_STRTOF
|
||||||
#cmakedefine GMIO_HAVE_POWF_FUNC
|
#cmakedefine GMIO_HAVE_POWF
|
||||||
#cmakedefine GMIO_HAVE_SNPRINTF_FUNC
|
#cmakedefine GMIO_HAVE_SNPRINTF
|
||||||
#cmakedefine GMIO_HAVE_WIN__SNPRINTF_FUNC
|
#cmakedefine GMIO_HAVE_WIN__SNPRINTF
|
||||||
#cmakedefine GMIO_HAVE_VSNPRINTF_FUNC
|
#cmakedefine GMIO_HAVE_VSNPRINTF
|
||||||
#cmakedefine GMIO_HAVE_WIN__VSNPRINTF_FUNC
|
#cmakedefine GMIO_HAVE_WIN__VSNPRINTF
|
||||||
|
|
||||||
#cmakedefine GMIO_HAVE_ISFINITE_SYM
|
#cmakedefine GMIO_HAVE_ISFINITE
|
||||||
#cmakedefine GMIO_HAVE_WIN__FINITE_SYM
|
#cmakedefine GMIO_HAVE_WIN__FINITE
|
||||||
#cmakedefine GMIO_HAVE_ISNAN_SYM
|
#cmakedefine GMIO_HAVE_ISNAN
|
||||||
#cmakedefine GMIO_HAVE_WIN__ISNAN_SYM
|
#cmakedefine GMIO_HAVE_WIN__ISNAN
|
||||||
|
|
||||||
/* POSIX */
|
/* POSIX */
|
||||||
#cmakedefine GMIO_HAVE_SYS_TYPES_H
|
#cmakedefine GMIO_HAVE_SYS_TYPES_H
|
||||||
#cmakedefine GMIO_HAVE_SYS_STAT_H
|
#cmakedefine GMIO_HAVE_SYS_STAT_H
|
||||||
#cmakedefine GMIO_HAVE_POSIX_FILENO_FUNC
|
#cmakedefine GMIO_HAVE_POSIX_FILENO
|
||||||
#cmakedefine GMIO_HAVE_POSIX_FSTAT64_FUNC
|
#cmakedefine GMIO_HAVE_POSIX_FSTAT64
|
||||||
#cmakedefine GMIO_HAVE_WIN__FSTAT64_FUNC
|
#cmakedefine GMIO_HAVE_WIN__FSTAT64
|
||||||
|
|
||||||
/* Compiler byte-swap functions */
|
/* Compiler byte-swap functions */
|
||||||
#cmakedefine GMIO_HAVE_GCC_BUILTIN_BSWAP16_FUNC
|
#cmakedefine GMIO_HAVE_GCC_BUILTIN_BSWAP16
|
||||||
#cmakedefine GMIO_HAVE_GCC_BUILTIN_BSWAP32_FUNC
|
#cmakedefine GMIO_HAVE_GCC_BUILTIN_BSWAP32
|
||||||
|
|
||||||
#cmakedefine GMIO_HAVE_MSVC_BUILTIN_BSWAP_FUNC
|
#cmakedefine GMIO_HAVE_MSVC_BUILTIN_BSWAP
|
||||||
|
|
||||||
/* Target architecture */
|
/* Target architecture */
|
||||||
#cmakedefine GMIO_HOST_IS_BIG_ENDIAN
|
#cmakedefine GMIO_HOST_IS_BIG_ENDIAN
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include "../global.h"
|
#include "../global.h"
|
||||||
|
|
||||||
#ifdef GMIO_HAVE_MSVC_BUILTIN_BSWAP_FUNC
|
#ifdef GMIO_HAVE_MSVC_BUILTIN_BSWAP
|
||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -39,9 +39,9 @@
|
|||||||
* functions if available */
|
* functions if available */
|
||||||
GMIO_INLINE uint16_t gmio_uint16_bswap(uint16_t val)
|
GMIO_INLINE uint16_t gmio_uint16_bswap(uint16_t val)
|
||||||
{
|
{
|
||||||
#ifdef GMIO_HAVE_GCC_BUILTIN_BSWAP16_FUNC
|
#ifdef GMIO_HAVE_GCC_BUILTIN_BSWAP16
|
||||||
return __builtin_bswap16(val);
|
return __builtin_bswap16(val);
|
||||||
#elif defined(GMIO_HAVE_MSVC_BUILTIN_BSWAP_FUNC)
|
#elif defined(GMIO_HAVE_MSVC_BUILTIN_BSWAP)
|
||||||
return _byteswap_ushort(val);
|
return _byteswap_ushort(val);
|
||||||
#else
|
#else
|
||||||
return ((val & 0x00FF) << 8) | ((val >> 8) & 0x00FF);
|
return ((val & 0x00FF) << 8) | ((val >> 8) & 0x00FF);
|
||||||
@ -52,9 +52,9 @@ GMIO_INLINE uint16_t gmio_uint16_bswap(uint16_t val)
|
|||||||
* functions if available */
|
* functions if available */
|
||||||
GMIO_INLINE uint32_t gmio_uint32_bswap(uint32_t val)
|
GMIO_INLINE uint32_t gmio_uint32_bswap(uint32_t val)
|
||||||
{
|
{
|
||||||
#ifdef GMIO_HAVE_GCC_BUILTIN_BSWAP32_FUNC
|
#ifdef GMIO_HAVE_GCC_BUILTIN_BSWAP32
|
||||||
return __builtin_bswap32(val);
|
return __builtin_bswap32(val);
|
||||||
#elif defined(GMIO_HAVE_MSVC_BUILTIN_BSWAP_FUNC)
|
#elif defined(GMIO_HAVE_MSVC_BUILTIN_BSWAP)
|
||||||
return _byteswap_ulong(val);
|
return _byteswap_ulong(val);
|
||||||
#else
|
#else
|
||||||
return ((val & 0x000000FF) << 24)
|
return ((val & 0x000000FF) << 24)
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
#include "../global.h"
|
#include "../global.h"
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#ifdef GMIO_HAVE_POWF_FUNC
|
#ifdef GMIO_HAVE_POWF
|
||||||
# define gmio_powf powf
|
# define gmio_powf powf
|
||||||
#else
|
#else
|
||||||
/* No powf() function, call pow(double) as fallback */
|
/* No powf() function, call pow(double) as fallback */
|
||||||
@ -40,7 +40,7 @@ GMIO_INLINE float gmio_powf(float base, float exponent)
|
|||||||
{ return (float)pow((double)base, (double)exponent); }
|
{ return (float)pow((double)base, (double)exponent); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GMIO_HAVE_SQRTF_FUNC
|
#ifdef GMIO_HAVE_SQRTF
|
||||||
# define gmio_sqrtf sqrtf
|
# define gmio_sqrtf sqrtf
|
||||||
#else
|
#else
|
||||||
/* No sqrtf() function, call sqrt(double) as fallback */
|
/* No sqrtf() function, call sqrt(double) as fallback */
|
||||||
@ -48,9 +48,9 @@ GMIO_INLINE float gmio_sqrtf(float x)
|
|||||||
{ return (float)sqrt((double)x); }
|
{ return (float)sqrt((double)x); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(GMIO_HAVE_ISFINITE_SYM)
|
#if defined(GMIO_HAVE_ISFINITE)
|
||||||
# define gmio_isfinite(x) isfinite(x)
|
# define gmio_isfinite(x) isfinite(x)
|
||||||
#elif defined(GMIO_HAVE_WIN__FINITE_SYM)
|
#elif defined(GMIO_HAVE_WIN__FINITE)
|
||||||
# include <float.h>
|
# include <float.h>
|
||||||
# define gmio_isfinite(x) _finite(x)
|
# define gmio_isfinite(x) _finite(x)
|
||||||
#else
|
#else
|
||||||
@ -58,9 +58,9 @@ GMIO_INLINE float gmio_sqrtf(float x)
|
|||||||
# define gmio_isfinite(x) (((x) != NAN) && ((x) != INFINITY))
|
# define gmio_isfinite(x) (((x) != NAN) && ((x) != INFINITY))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(GMIO_HAVE_ISNAN_SYM)
|
#if defined(GMIO_HAVE_ISNAN)
|
||||||
# define gmio_isnan(x) isnan(x)
|
# define gmio_isnan(x) isnan(x)
|
||||||
#elif defined(GMIO_HAVE_WIN__ISNAN_SYM)
|
#elif defined(GMIO_HAVE_WIN__ISNAN)
|
||||||
# include <float.h>
|
# include <float.h>
|
||||||
# define gmio_isnan(x) _isnan(x)
|
# define gmio_isnan(x) _isnan(x)
|
||||||
#else
|
#else
|
||||||
|
@ -41,9 +41,9 @@
|
|||||||
*
|
*
|
||||||
* vsnprintf() appeared in C99
|
* vsnprintf() appeared in C99
|
||||||
*/
|
*/
|
||||||
#ifdef GMIO_HAVE_VSNPRINTF_FUNC
|
#ifdef GMIO_HAVE_VSNPRINTF
|
||||||
# define gmio_vsnprintf vsnprintf
|
# define gmio_vsnprintf vsnprintf
|
||||||
#elif defined(GMIO_HAVE_WIN__VSNPRINTF_FUNC)
|
#elif defined(GMIO_HAVE_WIN__VSNPRINTF)
|
||||||
# define gmio_vsnprintf _vsnprintf
|
# define gmio_vsnprintf _vsnprintf
|
||||||
#else
|
#else
|
||||||
/* No vsnprintf()-like function, call unsafe vsprintf() as fallback */
|
/* No vsnprintf()-like function, call unsafe vsprintf() as fallback */
|
||||||
@ -61,9 +61,9 @@ GMIO_INLINE int gmio_vsnprintf(
|
|||||||
*
|
*
|
||||||
* snprintf() appeared in C99
|
* snprintf() appeared in C99
|
||||||
*/
|
*/
|
||||||
#ifdef GMIO_HAVE_SNPRINTF_FUNC
|
#ifdef GMIO_HAVE_SNPRINTF
|
||||||
# define gmio_snprintf snprintf
|
# define gmio_snprintf snprintf
|
||||||
#elif defined(GMIO_HAVE_WIN__SNPRINTF_FUNC)
|
#elif defined(GMIO_HAVE_WIN__SNPRINTF)
|
||||||
# define gmio_snprintf _snprintf
|
# define gmio_snprintf _snprintf
|
||||||
#else
|
#else
|
||||||
/* No snprintf()-like function, translate to gmio_vsnprintf() call */
|
/* No snprintf()-like function, translate to gmio_vsnprintf() call */
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#ifdef GMIO_HAVE_STRTOF_FUNC
|
#ifdef GMIO_HAVE_STRTOF
|
||||||
# define gmio_strtof strtof
|
# define gmio_strtof strtof
|
||||||
#else
|
#else
|
||||||
/* No strtof() function, call strtod() as fallback */
|
/* No strtof() function, call strtod() as fallback */
|
||||||
|
@ -40,10 +40,10 @@
|
|||||||
/* gmio_stat_t: type alias on the stat structure
|
/* gmio_stat_t: type alias on the stat structure
|
||||||
* GMIO_FSTAT_FUNC_NAME: alias on the fstat() function
|
* GMIO_FSTAT_FUNC_NAME: alias on the fstat() function
|
||||||
*/
|
*/
|
||||||
# if defined(GMIO_HAVE_WIN__FSTAT64_FUNC)
|
# if defined(GMIO_HAVE_WIN__FSTAT64)
|
||||||
typedef struct __stat64 gmio_stat_t;
|
typedef struct __stat64 gmio_stat_t;
|
||||||
# define GMIO_FSTAT_FUNC_NAME _fstat64
|
# define GMIO_FSTAT_FUNC_NAME _fstat64
|
||||||
# elif defined(GMIO_HAVE_POSIX_FSTAT64_FUNC)
|
# elif defined(GMIO_HAVE_POSIX_FSTAT64)
|
||||||
typedef struct stat64 gmio_stat_t;
|
typedef struct stat64 gmio_stat_t;
|
||||||
# define GMIO_FSTAT_FUNC_NAME fstat64
|
# define GMIO_FSTAT_FUNC_NAME fstat64
|
||||||
# else
|
# else
|
||||||
@ -93,7 +93,7 @@ static gmio_streamsize_t gmio_stream_stdio_size(void* cookie)
|
|||||||
|
|
||||||
#if defined(GMIO_HAVE_SYS_TYPES_H) \
|
#if defined(GMIO_HAVE_SYS_TYPES_H) \
|
||||||
&& defined(GMIO_HAVE_SYS_STAT_H) \
|
&& defined(GMIO_HAVE_SYS_STAT_H) \
|
||||||
&& defined(GMIO_HAVE_POSIX_FILENO_FUNC)
|
&& defined(GMIO_HAVE_POSIX_FILENO)
|
||||||
|
|
||||||
const int fd = fileno(file);
|
const int fd = fileno(file);
|
||||||
if (fd != -1) {
|
if (fd != -1) {
|
||||||
|
@ -29,11 +29,29 @@
|
|||||||
|
|
||||||
/* Generated by CMake */
|
/* Generated by CMake */
|
||||||
|
|
||||||
|
/*! \file version.h
|
||||||
|
* Declaration of macros specifying gmio's version
|
||||||
|
*
|
||||||
|
* \addtogroup gmio_core
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
/*! Expands to gmio's major version number */
|
||||||
#define GMIO_VERSION_MAJOR @GMIO_VERSION_MAJOR@
|
#define GMIO_VERSION_MAJOR @GMIO_VERSION_MAJOR@
|
||||||
|
|
||||||
|
/*! Expands to gmio's minor version number */
|
||||||
#define GMIO_VERSION_MINOR @GMIO_VERSION_MINOR@
|
#define GMIO_VERSION_MINOR @GMIO_VERSION_MINOR@
|
||||||
|
|
||||||
|
/*! Expands to gmio's patch version number */
|
||||||
#define GMIO_VERSION_PATCH @GMIO_VERSION_PATCH@
|
#define GMIO_VERSION_PATCH @GMIO_VERSION_PATCH@
|
||||||
|
|
||||||
|
/*! Expands to a string that specifies gmio's version number */
|
||||||
#define GMIO_VERSION_STR "@GMIO_VERSION@"
|
#define GMIO_VERSION_STR "@GMIO_VERSION@"
|
||||||
|
|
||||||
|
/*! Expands to an hexadecimal value of the form \c 0xMMNNPP (MM=major, NN=minor,
|
||||||
|
* PP=patch) that specifies gmio's version number */
|
||||||
#define GMIO_VERSION 0x0@GMIO_VERSION_MAJOR@0@GMIO_VERSION_MINOR@0@GMIO_VERSION_PATCH@
|
#define GMIO_VERSION 0x0@GMIO_VERSION_MAJOR@0@GMIO_VERSION_MINOR@0@GMIO_VERSION_PATCH@
|
||||||
|
|
||||||
|
/*! @} */
|
||||||
|
@ -118,6 +118,8 @@ GMIO_C_LINKAGE_BEGIN
|
|||||||
* \p flags is a bitor combination of \c gmio_stl_info_flag values and is used
|
* \p flags is a bitor combination of \c gmio_stl_info_flag values and is used
|
||||||
* to select the informations to retrieve.
|
* to select the informations to retrieve.
|
||||||
*
|
*
|
||||||
|
* The position of the input stream is preserved.
|
||||||
|
*
|
||||||
* \pre <tt> infos != NULL </tt>
|
* \pre <tt> infos != NULL </tt>
|
||||||
* \pre <tt> stream != NULL </tt>
|
* \pre <tt> stream != NULL </tt>
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user