source: issm/oecreview/Archive/24684-25833/ISSM-25638-25639.diff@ 25834

Last change on this file since 25834 was 25834, checked in by Mathieu Morlighem, 4 years ago

CHG: added 24684-25833

File size: 3.3 KB
  • ../trunk-jpl/src/c/modules/QmuStatisticsx/QmuStatisticsx.cpp

     
    173173
    174174                /*figure out size of file, and read the whole thing:*/
    175175                _printf0_("    reading file:\n");
    176                 fseek (fid, 0, SEEK_END);
     176                fseek(fid, 0, SEEK_END);
    177177                length = ftell (fid);
    178                 fseek (fid, 0, SEEK_SET);
     178                fseek(fid, 0, SEEK_SET);
    179179                buffer = xNew<char>(length);
    180                 fread (buffer, sizeof(char), length, fid);
     180                fread(buffer, sizeof(char), length, fid);
    181181
    182182                /*close file:*/
    183                 fclose (fid);
     183                fclose(fid);
    184184
    185185                /*create a memory stream with this buffer:*/
    186186                _printf0_("    processing file:\n");
  • ../trunk-jpl/m4/issm_options.m4

     
    191191        )
    192192
    193193        AC_MSG_CHECKING([if this is a Mac build])
     194        MAC_FMEMOPEN=0
    194195        case "${host_os}" in
    195196                *darwin*)
    196197                        IS_MAC=yes
     198                        if [[ $(system_profiler SPSoftwareDataType | $(which grep) "System Version:" | sed -e "s/[[:space:]]*System Version: macOS //" | cut -d "." -f 2) -ge 13 ]]; then
     199                                MAC_FMEMOPEN=yes
     200                        else
     201                                MAC_FMEMOPEN=no
     202                        fi
    197203                ;;
    198204                *)
    199205                        IS_MAC=no
     
    200206                ;;
    201207        esac
    202208        AM_CONDITIONAL([MAC], [test "${IS_MAC}" == "yes"])
     209        AM_CONDITIONAL([MAC_FMEMOPEN], [test "${MAC_FMEMOPEN}" == "yes"])
    203210        AC_MSG_RESULT([${IS_MAC}])
    204211
    205212        IS_WINDOWS=no
     
    23312338                AC_DEFINE([_HAVE_GMSH_], [1], [with Gmsh in ISSM src])
    23322339
    23332340                AC_MSG_CHECKING(for Gmsh version)
    2334                 GMSH_VERSION_MAJOR=`${GMSH_ROOT}/bin/gmsh -info | grep "Version" | sed -e "s/Version@<:@@<:@:blank:@:>@@:>@*:@<:@@<:@:blank:@:>@@:>@//" | cut -d "." -f1`
     2341                GMSH_VERSION_MAJOR=`${GMSH_ROOT}/bin/gmsh -info | grep "Version" | sed -e "s/Version@<:@@<:@:blank:@:>@@:>@*:@<:@@<:@:blank:@:>@@:>@//" | cut -d "." -f 1`
    23352342                AC_MSG_RESULT([${GMSH_VERSION_MAJOR}])
    23362343                AC_DEFINE_UNQUOTED(_GMSH_VERSION_MAJOR_, $GMSH_VERSION_MAJOR, [Gmsh major version])
    23372344        fi     
  • ../trunk-jpl/src/c/modules/QmuStatisticsx/QmuStatisticsx.h

     
    66
    77#include "../../classes/classes.h"
    88
     9#if MAC && !MAC_FMEMOPEN
     10#include "../../ext/fmemopen/fmemopen.h"
     11#endif
     12
    913int ComputeMeanVariance(Parameters* parameters,Results* results,int color, ISSM_MPI_Comm statcomm);
    1014int ComputeSampleSeries(Parameters* parameters,Results* results,int color, ISSM_MPI_Comm statcomm);
    1115int OutputStatistics(Parameters* parameters,Results* results,int color,ISSM_MPI_Comm statcomm);
  • ../trunk-jpl/src/c/Makefile.am

     
    2020#}}}
    2121
    2222#Core sources
     23issm_sources =
     24
     25#GLIBC sources {{{
     26if MAC
     27if !MAC_FMEMOPEN
     28issm_sources += \
     29        ./ext/fmemopen/fmemopen.c
     30endif
     31endif
     32#}}}
     33
    2334#BAMG sources  {{{
    24 issm_sources =
    2535if BAMG
    2636issm_sources += \
    2737        ./bamg/BamgGeom.cpp \
Note: See TracBrowser for help on using the repository browser.