freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/freetype][master] * builds/unix/configure.raw [mmap suppo


From: Werner Lemberg
Subject: [Git][freetype/freetype][master] * builds/unix/configure.raw [mmap support]: Correctly handle Windows.
Date: Tue, 02 Feb 2021 09:34:33 +0000

Werner Lemberg pushed to branch master at FreeType / FreeType

Commits:

2 changed files:

Changes:

  • ChangeLog
    1
    +2021-01-31  Werner Lemberg  <wl@gnu.org>
    
    2
    +
    
    3
    +	* builds/unix/configure.raw [mmap support]: Correctly handle Windows.
    
    4
    +
    
    5
    +	Fixes #1024.
    
    6
    +
    
    1 7
     2021-01-31  Werner Lemberg  <wl@gnu.org>
    
    2 8
     
    
    3 9
     	* builds/windows/ftdebug.c: Synchronize with `src/base/ftdebug.c`.
    

  • builds/unix/configure.raw
    ... ... @@ -192,39 +192,51 @@ AC_SUBST(INSTALL_FT2_CONFIG, [$enable_freetype_config])
    192 192
     AC_SYS_LARGEFILE
    
    193 193
     
    
    194 194
     # Here we check whether we can use our mmap file component.
    
    195
    +#
    
    196
    +# Note that `ftsystem.c` for Windows has its own mmap-like implementation
    
    197
    +# not covered by `AC_FUNC_MMAP` and/or `FT_UNMAP_PARAM`.
    
    195 198
     
    
    196 199
     AC_ARG_ENABLE([mmap],
    
    197 200
       AS_HELP_STRING([--disable-mmap],
    
    198 201
                      [do not check mmap() and do not use]),
    
    199 202
       [enable_mmap="no"], [enable_mmap="yes"])
    
    200 203
     if test "x${enable_mmap}" != "xno"; then
    
    201
    -  AC_FUNC_MMAP
    
    202
    -fi
    
    203
    -if test "x${enable_mmap}" = "xno" \
    
    204
    -   -o "$ac_cv_func_mmap_fixed_mapped" != "yes"; then
    
    205 204
       case "$host" in
    
    206 205
       *-*-mingw*)
    
    207
    -    FTSYS_SRC='$(PLATFORM_DIR)/ftsystem.c'
    
    206
    +    ac_cv_func_mmap_fixed_mapped="yes"
    
    207
    +    AC_MSG_CHECKING([for working mmap])
    
    208
    +    AC_MSG_RESULT([using Windows-specific equivalent])
    
    208 209
         ;;
    
    209 210
       *)
    
    210
    -    FTSYS_SRC='$(BASE_DIR)/ftsystem.c'
    
    211
    +    AC_FUNC_MMAP
    
    212
    +    ;;
    
    211 213
       esac
    
    214
    +fi
    
    215
    +if test "x${enable_mmap}" = "xno" \
    
    216
    +   -o "$ac_cv_func_mmap_fixed_mapped" != "yes"; then
    
    217
    +  FTSYS_SRC='$(BASE_DIR)/ftsystem.c'
    
    212 218
     else
    
    213 219
       FTSYS_SRC='$(PLATFORM_DIR)/ftsystem.c'
    
    214 220
     
    
    215
    -  AC_CHECK_DECLS([munmap],
    
    216
    -    [],
    
    217
    -    [],
    
    218
    -    [
    
    221
    +  case "$host" in
    
    222
    +  *-*-mingw*)
    
    223
    +    ;;
    
    224
    +  *)
    
    225
    +    AC_CHECK_DECLS([munmap],
    
    226
    +      [],
    
    227
    +      [],
    
    228
    +      [
    
    219 229
     
    
    220 230
     #ifdef HAVE_UNISTD_H
    
    221 231
     #include <unistd.h>
    
    222 232
     #endif
    
    223 233
     #include <sys/mman.h>
    
    224 234
     
    
    225
    -    ])
    
    235
    +      ])
    
    226 236
     
    
    227
    -  FT_MUNMAP_PARAM
    
    237
    +    FT_MUNMAP_PARAM
    
    238
    +    ;;
    
    239
    +  esac
    
    228 240
     fi
    
    229 241
     AC_SUBST([FTSYS_SRC])
    
    230 242
     
    


  • reply via email to

    [Prev in Thread] Current Thread [Next in Thread]