Skip to content

Commit

Permalink
Fix fseeko/ftello configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
beutlich committed Jan 26, 2024
1 parent 1db0717 commit 5af3474
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
4 changes: 4 additions & 0 deletions Modelica/Resources/BuildProjects/CMake/compiler_options.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
include(CheckSymbolExists)
check_symbol_exists(memcpy "string.h" HAVE_MEMCPY)
check_symbol_exists(fseeko "stdio.h" HAVE_FSEEKO)
check_symbol_exists(ftello "stdio.h" HAVE_FTELLO)
check_symbol_exists(fseeko64 "stdio.h" HAVE_FSEEKO64)
check_symbol_exists(ftello64 "stdio.h" HAVE_FTELLO64)

include(CheckIncludeFile)
check_include_file("dirent.h" HAVE_DIRENT_H)
Expand Down
12 changes: 12 additions & 0 deletions Modelica/Resources/BuildProjects/CMake/src.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@ endif()
if(HAVE_MEMCPY)
add_definitions(-DHAVE_MEMCPY)
endif()
if(HAVE_FSEEKO)
add_definitions(-DHAVE_FSEEKO)
endif()
if(HAVE_FTELLO)
add_definitions(-DHAVE_FTELLO)
endif()
if(HAVE_FSEEKO64)
add_definitions(-DHAVE_FSEEKO64)
endif()
if(HAVE_FTELLO64)
add_definitions(-DHAVE_FTELLO64)
endif()

if(UNIX)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -Wno-attributes -fno-delete-null-pointer-checks")
Expand Down
12 changes: 0 additions & 12 deletions Modelica/Resources/C-Sources/ModelicaMatIO.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,6 @@
/* Extended sparse matrix data types */
/* #undef EXTENDED_SPARSE */

/* Define to 1 if you have the `fseeko' function. */
#undef HAVE_FSEEKO

/* Define to 1 if you have the `ftello' function. */
#undef HAVE_FTELLO

/* Define to 1 if you have the `fseeko64' function. */
#undef HAVE_FSEEKO64

/* Define to 1 if you have the `ftello64' function. */
#undef HAVE_FTELLO64

/* Define to 1 if you have the `_fseeki64' function. */
#if defined(_MSC_VER) && _MSC_VER >= 1400
#define HAVE__FSEEKI64 1
Expand Down

0 comments on commit 5af3474

Please sign in to comment.