Ignore:
Timestamp:
Jan 21, 2018, 12:10:09 AM (6 years ago)
Author:
coas-nagasima
Message:

prototoolに関連するプロジェクトをnewlibからmuslを使うよう変更・更新
ntshellをnewlibの下位の実装から、muslのsyscallの実装に変更・更新
以下のOSSをアップデート
・mruby-1.3.0
・musl-1.1.18
・onigmo-6.1.3
・tcc-0.9.27
以下のOSSを追加
・openssl-1.1.0e
・curl-7.57.0
・zlib-1.2.11
以下のmrbgemsを追加
・iij/mruby-digest
・iij/mruby-env
・iij/mruby-errno
・iij/mruby-iijson
・iij/mruby-ipaddr
・iij/mruby-mock
・iij/mruby-require
・iij/mruby-tls-openssl

Location:
EcnlProtoTool/trunk/mruby-1.3.0
Files:
5 edited
1 moved

Legend:

Unmodified
Added
Removed
  • EcnlProtoTool/trunk/mruby-1.3.0/mrbgems/mruby-random/src/mt19937ar.c

    r321 r331  
    22** mt19937ar.c - MT Random functions
    33**
    4 ** See Copyright Notice in mruby.h
     4** Copyright (C) 1997 - 2016, Makoto Matsumoto and Takuji Nishimura,
     5** All rights reserved.
     6**
     7** Permission is hereby granted, free of charge, to any person obtaining
     8** a copy of this software and associated documentation files (the
     9** "Software"), to deal in the Software without restriction, including
     10** without limitation the rights to use, copy, modify, merge, publish,
     11** distribute, sublicense, and/or sell copies of the Software, and to
     12** permit persons to whom the Software is furnished to do so, subject to
     13** the following conditions:
     14**
     15** The above copyright notice and this permission notice shall be
     16** included in all copies or substantial portions of the Software.
     17**
     18** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
     19** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
     20** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
     21** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
     22** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
     23** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
     24** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
     25**
     26** [ MIT license: http://www.opensource.org/licenses/mit-license.php ]
     27**
     28** Any feedback is very welcome.
     29** http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html
     30** email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space)
     31**
     32** This version is modified by mruby developers. If you see any problem,
     33** contact us first at https://github.com/mruby/mruby/issues
    534*/
    635
    7 #include "mruby.h"
     36#include <mruby.h>
    837#include "mt19937ar.h"
    938
  • EcnlProtoTool/trunk/mruby-1.3.0/mrbgems/mruby-random/src/mt19937ar.h

    r321 r331  
    22** mt19937ar.h - MT Random functions
    33**
    4 ** See Copyright Notice in mruby.h
     4** Copyright (C) 1997 - 2016, Makoto Matsumoto and Takuji Nishimura,
     5** All rights reserved.
     6**
     7** Permission is hereby granted, free of charge, to any person obtaining
     8** a copy of this software and associated documentation files (the
     9** "Software"), to deal in the Software without restriction, including
     10** without limitation the rights to use, copy, modify, merge, publish,
     11** distribute, sublicense, and/or sell copies of the Software, and to
     12** permit persons to whom the Software is furnished to do so, subject to
     13** the following conditions:
     14**
     15** The above copyright notice and this permission notice shall be
     16** included in all copies or substantial portions of the Software.
     17**
     18** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
     19** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
     20** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
     21** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
     22** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
     23** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
     24** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
     25**
     26** [ MIT license: http://www.opensource.org/licenses/mit-license.php ]
     27**
     28** Any feedback is very welcome.
     29** http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html
     30** email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space)
     31**
     32** This version is modified by mruby developers. If you see any problem,
     33** contact us first at https://github.com/mruby/mruby/issues
    534*/
    635
  • EcnlProtoTool/trunk/mruby-1.3.0/mrbgems/mruby-random/src/random.c

    r321 r331  
    55*/
    66
    7 #include "mruby.h"
    8 #include "mruby/variable.h"
    9 #include "mruby/class.h"
    10 #include "mruby/data.h"
    11 #include "mruby/array.h"
     7#include <mruby.h>
     8#include <mruby/variable.h>
     9#include <mruby/class.h>
     10#include <mruby/data.h>
     11#include <mruby/array.h>
    1212#include "mt19937ar.h"
    1313
     
    8080
    8181  if (!mrb_nil_p(arg)) {
    82     if (!mrb_fixnum_p(arg)) {
     82    arg = mrb_check_convert_type(mrb, arg, MRB_TT_FIXNUM, "Fixnum", "to_int");
     83    if (mrb_nil_p(arg)) {
    8384      mrb_raise(mrb, E_ARGUMENT_ERROR, "invalid argument type");
    8485    }
    85     arg = mrb_check_convert_type(mrb, arg, MRB_TT_FIXNUM, "Fixnum", "to_int");
    8686    if (mrb_fixnum(arg) < 0) {
    8787      arg = mrb_fixnum_value(0 - mrb_fixnum(arg));
     
    125125  mt_state *t;
    126126
     127  seed = get_opt(mrb);
     128
    127129  /* avoid memory leaks */
    128130  t = (mt_state*)DATA_PTR(self);
     
    135137  t->mti = N + 1;
    136138
    137   seed = get_opt(mrb);
    138139  seed = mrb_random_mt_srand(mrb, t, seed);
    139140  if (mrb_nil_p(seed)) {
     
    267268  mrb_bool given;
    268269  mt_state *random = NULL;
    269   mrb_int len = RARRAY_LEN(ary);
     270  mrb_int len;
    270271
    271272  mrb_get_args(mrb, "|i?d", &n, &given, &random, &mt_state_type);
     
    275276  mrb_random_rand_seed(mrb, random);
    276277  mt_rand(random);
     278  len = RARRAY_LEN(ary);
    277279  if (!given) {                 /* pick one element */
    278280    switch (len) {
  • EcnlProtoTool/trunk/mruby-1.3.0/mrbgems/mruby-random/src/random.h

    r321 r331  
    55*/
    66
    7 #ifndef RANDOM_H
    8 #define RANDOM_H
     7#ifndef MRUBY_RANDOM_H
     8#define MRUBY_RANDOM_H
    99
    1010void mrb_mruby_random_gem_init(mrb_state *mrb);
  • EcnlProtoTool/trunk/mruby-1.3.0/mrbgems/mruby-random/test/random.rb

    r321 r331  
    7575  ary1 != [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] and 10.times { |x| ary1.include? x } and ary1 == ary2
    7676end
     77
     78assert('Array#sample checks input length after reading arguments') do
     79  $ary = [1, 2, 3]
     80  class ArrayChange
     81    def to_i
     82      $ary << 4
     83      4
     84    end
     85  end
     86
     87  assert_equal [1, 2, 3, 4], $ary.sample(ArrayChange.new).sort
     88end
Note: See TracChangeset for help on using the changeset viewer.