[ruby-cvs:71753] nobu:r64661 (trunk): util.c: qsort_s in C11

nobu at ruby-lang.org nobu at ruby-lang.org
Sun Sep 9 16:49:05 JST 2018


nobu	2018-09-09 16:49:04 +0900 (Sun, 09 Sep 2018)

  New Revision: 64661

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64661

  Log:
    util.c: qsort_s in C11
    
    * configure.ac: macro for C11 to use qsort_s.
    
    * util.c (ruby_qsort): fix for C11 qsort_s.  the comparison function
      for MSVCRT qsort_s is compatible with BSD qsort_r, but not with C11
      qsort_s, in spite of its name.
      note that mingw defines __STDC_VERSION__ but uses qsort_s in MSVCRT,
      so the MSVCRT block needs to preced the C11 block.
      [ruby-core:88899] [Bug #15091]

  Modified files:
    trunk/configure.ac
    trunk/util.c


More information about the ruby-cvs mailing list