Ticket #1630: sge-qmake-glob-glibc227.patch

File sge-qmake-glob-glibc227.patch, 2.2 KB (added by opoplawski, 19 months ago)

patch for qmake

  • source/3rdparty/qmake/configure.in

    commit 48c8a116a914a325a0497721f5d8b58d5bba34d4
    Author: Paul Smith <psmith@gnu.org>
    Date:   Sun Nov 19 15:09:16 2017 -0500
    
        * configure.ac: Support GLIBC glob interface version 2
    
    commit 193f1e81edd6b1b56b0eb0ff8aa4b41c7b4257b4
    Author: Paul Eggert <eggert@cs.ucla.edu>
    Date:   Sun Sep 24 09:12:58 2017 -0400
    
        glob: Do not assume glibc glob internals.
        
        It has been proposed that glibc glob start using gl_lstat,
        which the API allows it to do.  GNU 'make' should not get in
        the way of this.  See:
        https://sourceware.org/ml/libc-alpha/2017-09/msg00409.html
        
        * dir.c (local_lstat): New function, like local_stat.
        (dir_setup_glob): Use it to initialize gl_lstat too, as the API
        requires.
    
    old new  
    353353#include <glob.h>
    354354#include <fnmatch.h>
    355355
    356 #define GLOB_INTERFACE_VERSION 1
    357356#if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
    358357# include <gnu-versions.h>
    359 # if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION
     358# if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2
    360359   gnu glob
    361360# endif
    362361#endif
  • source/3rdparty/qmake/dir.c

    old new  
    12061206}
    12071207#endif
    12081208
     1209/* Similarly for lstat.  */
     1210#if !defined(lstat) && !defined(WINDOWS32) || defined(VMS)
     1211# ifndef VMS
     1212#  ifndef HAVE_SYS_STAT_H
     1213int lstat (const char *path, struct stat *sbuf);
     1214#  endif
     1215# else
     1216    /* We are done with the fake lstat.  Go back to the real lstat */
     1217#   ifdef lstat
     1218#     undef lstat
     1219#   endif
     1220# endif
     1221# define local_lstat lstat
     1222#elif defined(WINDOWS32)
     1223/* Windows doesn't support lstat().  */
     1224# define local_lstat local_stat
     1225#else
     1226static int
     1227local_lstat (const char *path, struct stat *buf)
     1228{
     1229  int e;
     1230  EINTRLOOP (e, lstat (path, buf));
     1231  return e;
     1232}
     1233#endif
     1234
    12091235void
    12101236dir_setup_glob (glob_t *gl)
    12111237{
    12121238  gl->gl_opendir = open_dirstream;
    12131239  gl->gl_readdir = read_dirstream;
    12141240  gl->gl_closedir = ansi_free;
     1241  gl->gl_lstat = local_lstat;
    12151242  gl->gl_stat = local_stat;
    1216   /* We don't bother setting gl_lstat, since glob never calls it.
    1217      The slot is only there for compatibility with 4.4 BSD.  */
    12181243}
    12191244
    12201245void